@botpress/webchat 2.2.15 → 2.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/dist/index.js +3436 -3386
- package/dist/index.umd.cjs +47 -47
- package/dist/style.css +1 -1
- package/dist/styles/classes.d.ts +8 -0
- package/package.json +2 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],E):(Te=typeof globalThis<"u"?globalThis:Te||self,E(Te.Webchat={},Te.React,Te.ReactDOM))})(this,function(Te,E,rr){"use strict";var mce=Object.defineProperty;var yce=(Te,E,rr)=>E in Te?mce(Te,E,{enumerable:!0,configurable:!0,writable:!0,value:rr}):Te[E]=rr;var he=(Te,E,rr)=>(yce(Te,typeof E!="symbol"?E+"":E,rr),rr);function Xy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const O=Xy(E),DT=Xy(rr);var Ye;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var rf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(rf||(rf={}));const ge=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=Ye.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"]),jT=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Bn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bn.create=e=>new Bn(e);const ya=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let Qy=ya;function FT(e){Qy=e}function Qs(){return Qy}const ec=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},LT=[];function be(e,t){const n=ec({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qs(),ya].filter(r=>!!r)});e.common.issues.push(n)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Re;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Re;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Re=Object.freeze({status:"aborted"}),ev=e=>({status:"dirty",value:e}),an=e=>({status:"valid",value:e}),of=e=>e.status==="aborted",af=e=>e.status==="dirty",va=e=>e.status==="valid",tc=e=>typeof Promise<"u"&&e instanceof Promise;var Ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ee||(Ee={}));class or{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}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}}const tv=(e,t)=>{if(va(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bn(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:o}}class De{constructor(t){this.spa=this.safeParseAsync,this._def=t,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(t){return Jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return tv(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(tc(o)?o:Promise.resolve(o));return tv(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:se.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new qn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ar.create(this,this._def)}nullable(){return Ro.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this,this._def)}promise(){return ui.create(this,this._def)}or(t){return xa.create([this,t],this._def)}and(t){return Sa.create(this,t,this._def)}transform(t){return new qn({...Me(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ca({...Me(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new rv({typeName:Ae.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sc({...Me(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ta.create(this,t)}readonly(){return lc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const BT=/^c[^\s-]{8,}$/i,UT=/^[a-z][a-z0-9]*$/,zT=/^[0-9A-HJKMNP-TV-Z]{26}$/,qT=/^[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,HT=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,WT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sf;const VT=/^(((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}))$/,KT=/^(([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})))$/,GT=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.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$"):e.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 ZT(e,t){return!!((t==="v4"||!t)&&VT.test(e)||(t==="v6"||!t)&&KT.test(e))}class Un extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.string,received:i.parsedType}),Re}const r=new Yt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?be(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&be(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")HT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"email",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")sf||(sf=new RegExp(WT,"u")),sf.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"emoji",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")qT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"uuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")BT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"cuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")UT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"cuid2",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")zT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"ulid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),be(o,{validation:"url",code:se.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"regex",code:se.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?GT(i).test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?ZT(t.data,i.version)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"ip",code:se.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:se.invalid_string,...Ee.errToObj(r)})}_addCheck(t){return new Un({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ee.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ee.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ee.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ee.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ee.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ee.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ee.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ee.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ee.errToObj(n)})}nonempty(t){return this.min(1,Ee.errToObj(t))}trim(){return new Un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Un.create=e=>{var t;return new Un({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function YT(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.number,received:i.parsedType}),Re}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:se.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?YT(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Xr.create=e=>new Xr({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Qr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ge.bigint){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.bigint,received:i.parsedType}),Re}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Qr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Qr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qr.create=e=>{var t;return new Qr({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class ga extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Re}return an(t.data)}}ga.create=e=>new ga({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Ao extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.date,received:i.parsedType}),Re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_date}),Re}const r=new Yt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ee.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ee.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ao.create=e=>new Ao({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Me(e)});class nc extends De{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Re}return an(t.data)}}nc.create=e=>new nc({typeName:Ae.ZodSymbol,...Me(e)});class ba extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Re}return an(t.data)}}ba.create=e=>new ba({typeName:Ae.ZodUndefined,...Me(e)});class wa extends De{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Re}return an(t.data)}}wa.create=e=>new wa({typeName:Ae.ZodNull,...Me(e)});class si extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return an(t.data)}}si.create=e=>new si({typeName:Ae.ZodAny,...Me(e)});class Po extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return an(t.data)}}Po.create=e=>new Po({typeName:Ae.ZodUnknown,...Me(e)});class Or extends De{_parse(t){const n=this._getOrReturnCtx(t);return be(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Re}}Or.create=e=>new Or({typeName:Ae.ZodNever,...Me(e)});class rc extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Re}return an(t.data)}}rc.create=e=>new rc({typeName:Ae.ZodVoid,...Me(e)});class zn extends De{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ge.array)return be(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Re;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(be(n,{code:a?se.too_big:se.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(be(n,{code:se.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(be(n,{code:se.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new or(n,a,n.path,s)))).then(a=>Yt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new or(n,a,n.path,s)));return Yt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new zn({...this._def,minLength:{value:t,message:Ee.toString(n)}})}max(t,n){return new zn({...this._def,maxLength:{value:t,message:Ee.toString(n)}})}length(t,n){return new zn({...this._def,exactLength:{value:t,message:Ee.toString(n)}})}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Me(t)});function ci(e){if(e instanceof yt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ar.create(ci(r))}return new yt({...e._def,shape:()=>t})}else return e instanceof zn?new zn({...e._def,type:ci(e.element)}):e instanceof Ar?Ar.create(ci(e.unwrap())):e instanceof Ro?Ro.create(ci(e.unwrap())):e instanceof ir?ir.create(e.items.map(t=>ci(t))):e}class yt extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return be(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Re}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new or(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Or){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(be(o,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new or(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key;l.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Yt.mergeObjectSync(r,l)):Yt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ee.errToObj,new yt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ee.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(t){return new yt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new yt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new yt({...this._def,catchall:t})}pick(t){const n={};return Ye.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}omit(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}deepPartial(){return ci(this)}partial(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new yt({...this._def,shape:()=>n})}required(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ar;)i=i._def.innerType;n[r]=i}}),new yt({...this._def,shape:()=>n})}keyof(){return nv(Ye.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)}),yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)}),yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)});class xa extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Bn(s.ctx.common.issues));return be(n,{code:se.invalid_union,unionErrors:a}),Re}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Bn(c));return be(n,{code:se.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}}xa.create=(e,t)=>new xa({options:e,typeName:Ae.ZodUnion,...Me(t)});const oc=e=>e instanceof _a?oc(e.schema):e instanceof qn?oc(e.innerType()):e instanceof $a?[e.value]:e instanceof eo?e.options:e instanceof ka?Object.keys(e.enum):e instanceof Ca?oc(e._def.innerType):e instanceof ba?[void 0]:e instanceof wa?[null]:null;class ic extends De{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return be(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Re;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(be(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=oc(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new ic({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function cf(e,t){const n=Jr(e),r=Jr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=cf(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=cf(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sa extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(of(i)||of(a))return Re;const s=cf(i.value,a.value);return s.valid?((af(i)||af(a))&&n.dirty(),{status:n.value,value:s.data}):(be(r,{code:se.invalid_intersection_types}),Re)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sa.create=(e,t,n)=>new Sa({left:e,right:t,typeName:Ae.ZodIntersection,...Me(n)});class ir extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return be(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Re;if(r.data.length<this._def.items.length)return be(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&r.data.length>this._def.items.length&&(be(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new or(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Yt.mergeArray(n,a)):Yt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ir({...this._def,rest:t})}}ir.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ir({items:e,typeName:Ae.ZodTuple,rest:null,...Me(t)})};class Ea extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return be(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Re;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new or(r,s,r.path,s)),value:a._parse(new or(r,r.data[s],r.path,s))});return r.common.async?Yt.mergeObjectAsync(n,o):Yt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof De?new Ea({keyType:t,valueType:n,typeName:Ae.ZodRecord,...Me(r)}):new Ea({keyType:Un.create(),valueType:t,typeName:Ae.ZodRecord,...Me(n)})}}class ac extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return be(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Re;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,c],l)=>({key:o._parse(new or(r,s,r.path,[l,"key"])),value:i._parse(new or(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}ac.create=(e,t,n)=>new ac({valueType:t,keyType:e,typeName:Ae.ZodMap,...Me(n)});class Io extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return be(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Re;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(be(r,{code:se.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(be(r,{code:se.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Re;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>i._parse(new or(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new Io({...this._def,minSize:{value:t,message:Ee.toString(n)}})}max(t,n){return new Io({...this._def,maxSize:{value:t,message:Ee.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Io.create=(e,t)=>new Io({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Me(t)});class li extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return be(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Re;function r(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:c}})}function o(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ui){const s=this;return an(async function(...c){const l=new Bn([]),u=await s._def.args.parseAsync(c,i).catch(d=>{throw l.addIssue(r(c,d)),l}),f=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(f,i).catch(d=>{throw l.addIssue(o(f,d)),l})})}else{const s=this;return an(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Bn([r(c,l.error)]);const u=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(u,i);if(!f.success)throw new Bn([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new li({...this._def,args:ir.create(t).rest(Po.create())})}returns(t){return new li({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new li({args:t||ir.create([]).rest(Po.create()),returns:n||Po.create(),typeName:Ae.ZodFunction,...Me(r)})}}class _a extends De{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}_a.create=(e,t)=>new _a({getter:e,typeName:Ae.ZodLazy,...Me(t)});class $a extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return be(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}$a.create=(e,t)=>new $a({value:e,typeName:Ae.ZodLiteral,...Me(t)});function nv(e,t){return new eo({values:e,typeName:Ae.ZodEnum,...Me(t)})}class eo extends De{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{expected:Ye.joinValues(r),received:n.parsedType,code:se.invalid_type}),Re}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{received:n.data,code:se.invalid_enum_value,options:r}),Re}return an(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return eo.create(t)}exclude(t){return eo.create(this.options.filter(n=>!t.includes(n)))}}eo.create=nv;class ka extends De{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const o=Ye.objectValues(n);return be(r,{expected:Ye.joinValues(o),received:r.parsedType,code:se.invalid_type}),Re}if(n.indexOf(t.data)===-1){const o=Ye.objectValues(n);return be(r,{received:r.data,code:se.invalid_enum_value,options:o}),Re}return an(t.data)}get enum(){return this._def.values}}ka.create=(e,t)=>new ka({values:e,typeName:Ae.ZodNativeEnum,...Me(t)});class ui extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return be(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Re;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return an(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ui.create=(e,t)=>new ui({type:e,typeName:Ae.ZodPromise,...Me(t)});class qn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{be(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!va(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>va(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Ye.assertNever(o)}}qn.create=(e,t,n)=>new qn({schema:e,typeName:Ae.ZodEffects,effect:t,...Me(n)}),qn.createWithPreprocess=(e,t,n)=>new qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Me(n)});class Ar extends De{_parse(t){return this._getType(t)===ge.undefined?an(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ar.create=(e,t)=>new Ar({innerType:e,typeName:Ae.ZodOptional,...Me(t)});class Ro extends De{_parse(t){return this._getType(t)===ge.null?an(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ro.create=(e,t)=>new Ro({innerType:e,typeName:Ae.ZodNullable,...Me(t)});class Ca extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ca.create=(e,t)=>new Ca({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class sc extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class cc extends De{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Re}return{status:"valid",value:t.data}}}cc.create=e=>new cc({typeName:Ae.ZodNaN,...Me(e)});const JT=Symbol("zod_brand");class rv extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ta extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Re:i.status==="dirty"?(n.dirty(),ev(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Re:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ta({in:t,out:n,typeName:Ae.ZodPipeline})}}class lc extends De{_parse(t){const n=this._def.innerType._parse(t);return va(n)&&(n.value=Object.freeze(n.value)),n}}lc.create=(e,t)=>new lc({innerType:e,typeName:Ae.ZodReadonly,...Me(t)});const ov=(e,t={},n)=>e?si.create().superRefine((r,o)=>{var i,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):si.create(),XT={object:yt.lazycreate};var Ae;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const QT=(e,t={message:`Input not instance of ${e.name}`})=>ov(n=>n instanceof e,t),iv=Un.create,av=Xr.create,eO=cc.create,tO=Qr.create,sv=ga.create,nO=Ao.create,rO=nc.create,oO=ba.create,iO=wa.create,aO=si.create,sO=Po.create,cO=Or.create,lO=rc.create,uO=zn.create,fO=yt.create,dO=yt.strictCreate,pO=xa.create,hO=ic.create,mO=Sa.create,yO=ir.create,vO=Ea.create,gO=ac.create,bO=Io.create,wO=li.create,xO=_a.create,SO=$a.create,EO=eo.create,_O=ka.create,$O=ui.create,cv=qn.create,kO=Ar.create,CO=Ro.create,TO=qn.createWithPreprocess,OO=Ta.create;var x=Object.freeze({__proto__:null,defaultErrorMap:ya,setErrorMap:FT,getErrorMap:Qs,makeIssue:ec,EMPTY_PATH:LT,addIssueToContext:be,ParseStatus:Yt,INVALID:Re,DIRTY:ev,OK:an,isAborted:of,isDirty:af,isValid:va,isAsync:tc,get util(){return Ye},get objectUtil(){return rf},ZodParsedType:ge,getParsedType:Jr,ZodType:De,ZodString:Un,ZodNumber:Xr,ZodBigInt:Qr,ZodBoolean:ga,ZodDate:Ao,ZodSymbol:nc,ZodUndefined:ba,ZodNull:wa,ZodAny:si,ZodUnknown:Po,ZodNever:Or,ZodVoid:rc,ZodArray:zn,ZodObject:yt,ZodUnion:xa,ZodDiscriminatedUnion:ic,ZodIntersection:Sa,ZodTuple:ir,ZodRecord:Ea,ZodMap:ac,ZodSet:Io,ZodFunction:li,ZodLazy:_a,ZodLiteral:$a,ZodEnum:eo,ZodNativeEnum:ka,ZodPromise:ui,ZodEffects:qn,ZodTransformer:qn,ZodOptional:Ar,ZodNullable:Ro,ZodDefault:Ca,ZodCatch:sc,ZodNaN:cc,BRAND:JT,ZodBranded:rv,ZodPipeline:Ta,ZodReadonly:lc,custom:ov,Schema:De,ZodSchema:De,late:XT,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:e=>Un.create({...e,coerce:!0}),number:e=>Xr.create({...e,coerce:!0}),boolean:e=>ga.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>Ao.create({...e,coerce:!0})},any:aO,array:uO,bigint:tO,boolean:sv,date:nO,discriminatedUnion:hO,effect:cv,enum:EO,function:wO,instanceof:QT,intersection:mO,lazy:xO,literal:SO,map:gO,nan:eO,nativeEnum:_O,never:cO,null:iO,nullable:CO,number:av,object:fO,oboolean:()=>sv().optional(),onumber:()=>av().optional(),optional:kO,ostring:()=>iv().optional(),pipeline:OO,preprocess:TO,promise:$O,record:vO,set:bO,strictObject:dO,string:iv,symbol:rO,transformer:cv,tuple:yO,undefined:oO,union:pO,unknown:sO,void:lO,NEVER:Re,ZodIssueCode:se,quotelessJson:jT,ZodError:Bn});const sn=x.string().min(1),lv=x.object({text:sn}),uv=x.object({markdown:sn}),fv=x.object({imageUrl:sn}),dv=x.object({audioUrl:sn}),pv=x.object({videoUrl:sn}),hv=x.object({fileUrl:sn,title:sn.optional()}),mv=x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),yv=x.object({title:sn,subtitle:sn.optional(),imageUrl:sn.optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:sn,value:sn}))}),vv=x.object({text:sn,options:x.array(x.object({label:sn,value:sn}))}),AO=x.object({items:x.array(yv)}),PO=x.discriminatedUnion("type",[x.object({type:x.literal("text"),payload:lv}),x.object({type:x.literal("markdown"),payload:uv}),x.object({type:x.literal("image"),payload:fv}),x.object({type:x.literal("audio"),payload:dv}),x.object({type:x.literal("video"),payload:pv}),x.object({type:x.literal("file"),payload:hv}),x.object({type:x.literal("location"),payload:mv})]),IO=x.object({items:x.array(PO)}),ar={text:{schema:lv},markdown:{schema:uv},image:{schema:fv},audio:{schema:dv},video:{schema:pv},file:{schema:hv},location:{schema:mv},carousel:{schema:AO},card:{schema:yv},dropdown:{schema:vv},choice:{schema:vv},bloc:{schema:IO}},Hn={className:x.string().describe("CSS className to apply to the message").optional()},gv=ar.audio.schema.extend({...Hn,type:x.literal("audio")}),lf=ar.card.schema.extend({type:x.literal("card"),subtitle:x.string().optional(),imageUrl:x.string().optional(),...Hn}),RO=lf.omit({type:!0}),bv=x.object({items:x.array(RO),...Hn,type:x.literal("carousel")}),wv=ar.choice.schema.extend({text:x.string(),...Hn,type:x.literal("choice"),disableFreeText:x.boolean().optional()}),xv=ar.dropdown.schema.extend({text:x.string(),...Hn,type:x.literal("dropdown")}),Sv=ar.file.schema.extend({...Hn,type:x.literal("file")}),Ev=ar.image.schema.extend({...Hn,type:x.literal("image")}),_v=ar.location.schema.extend({...Hn,type:x.literal("location")}),$v=ar.markdown.schema.extend({...Hn,type:x.literal("markdown")}),kv=ar.text.schema.extend({...Hn,type:x.literal("text")}),Cv=ar.video.schema.extend({...Hn,type:x.literal("video")}),Tv=x.union([gv,lf,bv,wv,xv,Sv,Ev,_v,$v,kv,Cv]),Ov=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),Av=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.any())})}),Pv=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.any())})}),Iv=x.union([Ov,Av,Pv]),MO=Iv,NO=x.object({type:x.literal("message_created"),data:Tv}),DO=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:gv,cardSchema:lf,carouselSchema:bv,choiceSchema:wv,customSchema:Pv,dropdownSchema:xv,fileSchema:Sv,imageSchema:Ev,locationSchema:_v,markdownSchema:$v,messageCreatedSchema:NO,messageSchema:Tv,textSchema:kv,triggerSchema:Iv,triggerSignalSchema:MO,videoSchema:Cv,webchatConfigSchema:Av,webchatVisibilitySchema:Ov},Symbol.toStringTag,{value:"Module"})),sr=x.object({className:x.string().optional(),avatarUrl:x.string().url().optional()}),Rv=sr.extend({type:x.literal("audio"),audio:x.string(),title:x.string().optional()}),jO=x.union([x.object({title:x.string(),action:x.literal("Say something"),text:x.string()}),x.object({title:x.string(),action:x.literal("Open URL"),url:x.string()}),x.object({title:x.string(),action:x.literal("Postback"),payload:x.string()})]),uf=sr.extend({type:x.literal("card"),title:x.string(),subtitle:x.string().optional(),image:x.string().optional(),actions:x.array(jO)}),Mv=sr.extend({type:x.literal("carousel"),items:x.array(uf)}),Nv=sr.extend({type:x.literal("dropdown"),message:x.string().optional(),options:x.array(x.object({label:x.string(),value:x.string()})),allowCreation:x.boolean().optional(),placeholderText:x.string().optional(),allowMultiple:x.boolean().optional(),buttonText:x.string().optional(),width:x.number().optional(),displayInKeyboard:x.boolean().optional(),markdown:x.boolean().optional(),text:x.string().optional()}),Dv=sr.extend({type:x.literal("file"),file:x.string(),title:x.string().optional()}),jv=sr.extend({type:x.literal("image"),image:x.string()}),Fv=sr.extend({type:x.literal("location"),latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),Lv=sr.extend({type:x.literal("single-choice"),text:x.string(),disableFreeText:x.boolean().optional(),choices:x.array(x.object({title:x.string(),value:x.string()}))}),Bv=sr.extend({type:x.literal("text"),text:x.string(),markdown:x.boolean().optional()}),Uv=sr.extend({type:x.literal("video"),video:x.string(),title:x.string().optional()}),zv=x.object({type:x.literal("quick_reply"),text:x.string(),payload:x.string().optional()}),uc=x.union([Rv,uf,Mv,Nv,Dv,jv,Fv,Lv,Bv,Uv,zv]),qv=x.object({type:x.literal("webchat-visibility"),visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])}),Hv=x.object({type:x.literal("webchat-config"),config:x.record(x.any())}),Wv=x.object({type:x.literal("custom-event"),event:x.record(x.any())}),Vv=x.union([qv,Hv,Wv]),FO=x.object({type:x.literal("trigger"),trigger:Vv}),LO=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Rv,cardSchema:uf,carouselSchame:Mv,customEventSchema:Wv,dropdownSchema:Nv,fileSchema:Dv,imageSchema:jv,locationSchema:Fv,messageSchema:uc,messageSignalSchema:uc,quickReplySchema:zv,singleChoiceSchema:Lv,textSchema:Bv,triggerSchema:Vv,triggerSignalSchema:FO,videoSchema:Uv,webchatConfigSchema:Hv,webchatVisibilitySchema:qv},Symbol.toStringTag,{value:"Module"})),BO=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let fc;const UO=new Uint8Array(16);function zO(){if(!fc&&(fc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fc(UO)}const Ht=[];for(let e=0;e<256;++e)Ht.push((e+256).toString(16).slice(1));function qO(e,t=0){return Ht[e[t+0]]+Ht[e[t+1]]+Ht[e[t+2]]+Ht[e[t+3]]+"-"+Ht[e[t+4]]+Ht[e[t+5]]+"-"+Ht[e[t+6]]+Ht[e[t+7]]+"-"+Ht[e[t+8]]+Ht[e[t+9]]+"-"+Ht[e[t+10]]+Ht[e[t+11]]+Ht[e[t+12]]+Ht[e[t+13]]+Ht[e[t+14]]+Ht[e[t+15]]}const Kv={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dc(e,t,n){if(Kv.randomUUID&&!t&&!e)return Kv.randomUUID();e=e||{};const r=e.random||(e.rng||zO)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return qO(r)}const pc=e=>({block:e,type:"bubble"}),HO=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},Gv=({title:e,image:t,actions:n,subtitle:r})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),r&&o.push({type:"text",text:r}),n.length>0&&o.push({type:"row",blocks:n.map(HO)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},WO=({choices:e,text:t})=>{const n=dc(),r=pc({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:n}))}]}},VO=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},ff=({type:e,audio:t})=>({payload:{type:e,url:t}}),df=e=>({payload:pc(Gv(e))}),pf=({items:e})=>({payload:{type:"carousel",blocks:e.map(Gv)}}),hf=e=>({disableInput:e.disableFreeText,payload:WO(e)}),mf=e=>({disableInput:!0,payload:pc(VO(e))}),yf=({file:e,...t})=>({payload:{url:e,...t}}),vf=({type:e,image:t})=>({payload:{type:e,url:t}}),gf=({type:e,latitude:t,longitude:n,title:r,address:o})=>({payload:{type:e,latitude:t,longitude:n,title:r??o??"View on map"}}),Zv=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),hc=({type:e,text:t})=>({payload:pc({type:e,text:t})}),bf=({type:e,video:t})=>({payload:{type:e,url:t}}),wf=e=>{switch(e.type){case"audio":return ff(e);case"card":return df(e);case"carousel":return pf(e);case"single-choice":return hf(e);case"dropdown":return mf(e);case"file":return yf(e);case"image":return vf(e);case"location":return gf(e);case"quick_reply":return Zv(e);case"text":return hc(e);case"video":return bf(e);default:throw new Error("Unsuported message type")}},KO=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:ff,cardAdapter:df,carouselAdapter:pf,choiceAdapter:hf,dropdownAdapter:mf,fileAdapter:yf,imageAdapter:vf,locationAdapter:gf,messageAdapter:wf,quickReplyAdapter:Zv,textAdapter:hc,videoAdapter:bf},Symbol.toStringTag,{value:"Module"})),Yv=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(GO)}),GO=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},ZO=e=>({...e,type:"audio",audioUrl:e.audio}),YO=e=>Yv(e),JO=e=>({...e,type:"carousel",items:e.items.map(Yv)}),XO=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),QO=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),eA=e=>({...e,type:"image",imageUrl:e.image}),tA=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),nA=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),rA=e=>({...e,type:"text",text:e.text}),oA=e=>({...e,type:"video",videoUrl:e.video}),iA=e=>({...e,type:"text",text:e.text??e.payload}),aA=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return ZO(e);case"card":return YO(e);case"carousel":return JO(e);case"dropdown":return XO(e);case"file":return QO(e);case"image":return eA(e);case"location":return tA(e);case"single-choice":return nA(e);case"text":return rA(e);case"video":return oA(e);case"quick_reply":return iA(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),Jv=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(sA)}),sA=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},xf=e=>({...e,type:"audio",audio:e.audioUrl}),Sf=e=>Jv(e),Ef=e=>({...e,type:"carousel",items:e.items.map(Jv)}),_f=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),$f=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),kf=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),Cf=e=>({...e,type:"image",image:e.imageUrl}),Tf=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),Of=e=>({...e,type:"text",text:e.markdown,markdown:!0}),Af=e=>({...e,type:"text",text:e.text,markdown:!0}),Pf=e=>({...e,type:"video",video:e.videoUrl}),cA=e=>{switch(e.type){case"audio":return xf(e);case"card":return Sf(e);case"carousel":return Ef(e);case"choice":return _f(e);case"dropdown":return $f(e);case"file":return kf(e);case"image":return Cf(e);case"location":return Tf(e);case"markdown":return Of(e);case"text":return Af(e);case"video":return Pf(e);default:throw new Error("Unsuported message type")}},Xv=e=>({type:"webchat-visibility",visibility:e.data.visibility}),Qv=e=>({type:"webchat-config",config:e.data.config}),eg=e=>({type:"custom-event",event:e.data.event}),lA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:xf,cardAdapter:Sf,carouselAdapter:Ef,choiceAdapter:_f,customAdapter:eg,dropdownAdapter:$f,fileAdapter:kf,imageAdapter:Cf,locationAdapter:Tf,markdownAdapter:Of,messageAdapter:cA,textAdapter:Af,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return Xv(e);case"webchat_config":return Qv(e);case"custom":return eg(e);default:throw new Error("unknown trigger type")}},videoAdapter:Pf,webchatConfigAdapter:Qv,webchatVisibilityAdapter:Xv},Symbol.toStringTag,{value:"Module"})),tg=e=>{const t=xf(e);return ff(t)},ng=e=>{const t=Sf(e);return df(t)},rg=e=>{const t=Ef(e);return pf(t)},og=e=>{const t=_f(e);return hf(t)},ig=e=>{const t=$f(e);return mf(t)},ag=e=>{const t=kf(e);return yf(t)},sg=e=>{const t=Cf(e);return vf(t)},cg=e=>{const t=Tf(e);return gf(t)},lg=e=>{const t=Of(e);return hc(t)},ug=e=>{const t=Af(e);return hc(t)},fg=e=>{const t=Pf(e);return bf(t)},dg=e=>{switch(e.type){case"audio":return tg(e);case"card":return ng(e);case"carousel":return rg(e);case"choice":return og(e);case"dropdown":return ig(e);case"file":return ag(e);case"image":return sg(e);case"location":return cg(e);case"markdown":return lg(e);case"text":return ug(e);case"video":return fg(e);default:throw new Error("Unsuported message type")}},uA=Object.freeze(Object.defineProperty({__proto__:null,messaging:LO,messagingToTarget:KO,messagingToWebChat:aA,target:BO,webchat:DO,webchatToMessaging:lA,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:tg,cardAdapter:ng,carouselAdapter:rg,choiceAdapter:og,dropdownAdapter:ig,fileAdapter:ag,imageAdapter:sg,locationAdapter:cg,markdownAdapter:lg,messageAdapter:dg,textAdapter:ug,videoAdapter:fg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pg(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var If={exports:{}},Oa={};/**
|
|
1
|
+
(function(Te,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],E):(Te=typeof globalThis<"u"?globalThis:Te||self,E(Te.Webchat={},Te.React,Te.ReactDOM))})(this,function(Te,E,rr){"use strict";var vce=Object.defineProperty;var gce=(Te,E,rr)=>E in Te?vce(Te,E,{enumerable:!0,configurable:!0,writable:!0,value:rr}):Te[E]=rr;var he=(Te,E,rr)=>(gce(Te,typeof E!="symbol"?E+"":E,rr),rr);function Xy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=Xy(E),DT=Xy(rr);var Ye;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ye||(Ye={}));var rf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(rf||(rf={}));const ge=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return ge.undefined;case"string":return ge.string;case"number":return isNaN(e)?ge.nan:ge.number;case"boolean":return ge.boolean;case"function":return ge.function;case"bigint":return ge.bigint;case"symbol":return ge.symbol;case"object":return Array.isArray(e)?ge.array:e===null?ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ge.promise:typeof Map<"u"&&e instanceof Map?ge.map:typeof Set<"u"&&e instanceof Set?ge.set:typeof Date<"u"&&e instanceof Date?ge.date:ge.object;default:return ge.unknown}},se=Ye.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"]),jT=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Bn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bn.create=e=>new Bn(e);const ya=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ge.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ye.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ye.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ye.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${Ye.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ye.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ye.assertNever(e)}return{message:n}};let Qy=ya;function FT(e){Qy=e}function Qs(){return Qy}const ec=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},LT=[];function be(e,t){const n=ec({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qs(),ya].filter(r=>!!r)});e.common.issues.push(n)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Re;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Re;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Re=Object.freeze({status:"aborted"}),ev=e=>({status:"dirty",value:e}),an=e=>({status:"valid",value:e}),of=e=>e.status==="aborted",af=e=>e.status==="dirty",va=e=>e.status==="valid",tc=e=>typeof Promise<"u"&&e instanceof Promise;var Ee;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ee||(Ee={}));class or{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}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}}const tv=(e,t)=>{if(va(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bn(e.common.issues);return this._error=n,this._error}}};function Me(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:o}}class De{constructor(t){this.spa=this.safeParseAsync,this._def=t,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(t){return Jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return tv(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(tc(o)?o:Promise.resolve(o));return tv(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:se.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new qn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ar.create(this,this._def)}nullable(){return Ro.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this,this._def)}promise(){return ui.create(this,this._def)}or(t){return xa.create([this,t],this._def)}and(t){return Sa.create(this,t,this._def)}transform(t){return new qn({...Me(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ca({...Me(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new rv({typeName:Ae.ZodBranded,type:this,...Me(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sc({...Me(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ta.create(this,t)}readonly(){return lc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const BT=/^c[^\s-]{8,}$/i,UT=/^[a-z][a-z0-9]*$/,zT=/^[0-9A-HJKMNP-TV-Z]{26}$/,qT=/^[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,HT=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sf;const WT=/^(((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}))$/,KT=/^(([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})))$/,GT=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.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$"):e.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 ZT(e,t){return!!((t==="v4"||!t)&&WT.test(e)||(t==="v6"||!t)&&KT.test(e))}class Un extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ge.string){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.string,received:i.parsedType}),Re}const r=new Yt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?be(o,{code:se.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&be(o,{code:se.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")HT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"email",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")sf||(sf=new RegExp(VT,"u")),sf.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"emoji",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")qT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"uuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")BT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"cuid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")UT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"cuid2",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")zT.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"ulid",code:se.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),be(o,{validation:"url",code:se.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"regex",code:se.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?GT(i).test(t.data)||(o=this._getOrReturnCtx(t,o),be(o,{code:se.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?ZT(t.data,i.version)||(o=this._getOrReturnCtx(t,o),be(o,{validation:"ip",code:se.invalid_string,message:i.message}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:se.invalid_string,...Ee.errToObj(r)})}_addCheck(t){return new Un({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ee.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ee.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ee.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ee.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ee.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ee.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ee.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ee.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ee.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ee.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ee.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ee.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ee.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ee.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ee.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ee.errToObj(n)})}nonempty(t){return this.min(1,Ee.errToObj(t))}trim(){return new Un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Un.create=e=>{var t;return new Un({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};function YT(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class Xr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ge.number){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.number,received:i.parsedType}),Re}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="int"?Ye.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:se.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?YT(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_finite,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Xr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ee.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ee.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ee.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ee.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ye.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Xr.create=e=>new Xr({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Qr extends De{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ge.bigint){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.bigint,received:i.parsedType}),Re}let r;const o=new Yt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),be(r,{code:se.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ye.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ee.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ee.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ee.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ee.toString(n))}setLimit(t,n,r,o){return new Qr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ee.toString(o)}]})}_addCheck(t){return new Qr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ee.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ee.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ee.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qr.create=e=>{var t;return new Qr({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Me(e)})};class ga extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ge.boolean){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.boolean,received:r.parsedType}),Re}return an(t.data)}}ga.create=e=>new ga({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Me(e)});class Ao extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ge.date){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_type,expected:ge.date,received:i.parsedType}),Re}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return be(i,{code:se.invalid_date}),Re}const r=new Yt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),be(o,{code:se.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ye.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ao({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ee.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ee.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ao.create=e=>new Ao({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Me(e)});class nc extends De{_parse(t){if(this._getType(t)!==ge.symbol){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.symbol,received:r.parsedType}),Re}return an(t.data)}}nc.create=e=>new nc({typeName:Ae.ZodSymbol,...Me(e)});class ba extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.undefined,received:r.parsedType}),Re}return an(t.data)}}ba.create=e=>new ba({typeName:Ae.ZodUndefined,...Me(e)});class wa extends De{_parse(t){if(this._getType(t)!==ge.null){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.null,received:r.parsedType}),Re}return an(t.data)}}wa.create=e=>new wa({typeName:Ae.ZodNull,...Me(e)});class si extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return an(t.data)}}si.create=e=>new si({typeName:Ae.ZodAny,...Me(e)});class Po extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return an(t.data)}}Po.create=e=>new Po({typeName:Ae.ZodUnknown,...Me(e)});class Or extends De{_parse(t){const n=this._getOrReturnCtx(t);return be(n,{code:se.invalid_type,expected:ge.never,received:n.parsedType}),Re}}Or.create=e=>new Or({typeName:Ae.ZodNever,...Me(e)});class rc extends De{_parse(t){if(this._getType(t)!==ge.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.void,received:r.parsedType}),Re}return an(t.data)}}rc.create=e=>new rc({typeName:Ae.ZodVoid,...Me(e)});class zn extends De{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ge.array)return be(n,{code:se.invalid_type,expected:ge.array,received:n.parsedType}),Re;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(be(n,{code:a?se.too_big:se.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(be(n,{code:se.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(be(n,{code:se.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new or(n,a,n.path,s)))).then(a=>Yt.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new or(n,a,n.path,s)));return Yt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new zn({...this._def,minLength:{value:t,message:Ee.toString(n)}})}max(t,n){return new zn({...this._def,maxLength:{value:t,message:Ee.toString(n)}})}length(t,n){return new zn({...this._def,exactLength:{value:t,message:Ee.toString(n)}})}nonempty(t){return this.min(1,t)}}zn.create=(e,t)=>new zn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Me(t)});function ci(e){if(e instanceof yt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ar.create(ci(r))}return new yt({...e._def,shape:()=>t})}else return e instanceof zn?new zn({...e._def,type:ci(e.element)}):e instanceof Ar?Ar.create(ci(e.unwrap())):e instanceof Ro?Ro.create(ci(e.unwrap())):e instanceof ir?ir.create(e.items.map(t=>ci(t))):e}class yt extends De{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ye.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ge.object){const l=this._getOrReturnCtx(t);return be(l,{code:se.invalid_type,expected:ge.object,received:l.parsedType}),Re}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],f=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new or(o,f,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Or){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(be(o,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const f=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new or(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key;l.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Yt.mergeObjectSync(r,l)):Yt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ee.errToObj,new yt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ee.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(t){return new yt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new yt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ae.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new yt({...this._def,catchall:t})}pick(t){const n={};return Ye.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}omit(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new yt({...this._def,shape:()=>n})}deepPartial(){return ci(this)}partial(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new yt({...this._def,shape:()=>n})}required(t){const n={};return Ye.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ar;)i=i._def.innerType;n[r]=i}}),new yt({...this._def,shape:()=>n})}keyof(){return nv(Ye.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)}),yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)}),yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:Or.create(),typeName:Ae.ZodObject,...Me(t)});class xa extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Bn(s.ctx.common.issues));return be(n,{code:se.invalid_union,unionErrors:a}),Re}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Bn(c));return be(n,{code:se.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}}xa.create=(e,t)=>new xa({options:e,typeName:Ae.ZodUnion,...Me(t)});const oc=e=>e instanceof _a?oc(e.schema):e instanceof qn?oc(e.innerType()):e instanceof $a?[e.value]:e instanceof eo?e.options:e instanceof ka?Object.keys(e.enum):e instanceof Ca?oc(e._def.innerType):e instanceof ba?[void 0]:e instanceof wa?[null]:null;class ic extends De{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.object)return be(n,{code:se.invalid_type,expected:ge.object,received:n.parsedType}),Re;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(be(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const a=oc(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new ic({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Me(r)})}}function cf(e,t){const n=Jr(e),r=Jr(t);if(e===t)return{valid:!0,data:e};if(n===ge.object&&r===ge.object){const o=Ye.objectKeys(t),i=Ye.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=cf(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===ge.array&&r===ge.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=cf(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===ge.date&&r===ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sa extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(of(i)||of(a))return Re;const s=cf(i.value,a.value);return s.valid?((af(i)||af(a))&&n.dirty(),{status:n.value,value:s.data}):(be(r,{code:se.invalid_intersection_types}),Re)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Sa.create=(e,t,n)=>new Sa({left:e,right:t,typeName:Ae.ZodIntersection,...Me(n)});class ir extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.array)return be(r,{code:se.invalid_type,expected:ge.array,received:r.parsedType}),Re;if(r.data.length<this._def.items.length)return be(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&r.data.length>this._def.items.length&&(be(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new or(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Yt.mergeArray(n,a)):Yt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ir({...this._def,rest:t})}}ir.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ir({items:e,typeName:Ae.ZodTuple,rest:null,...Me(t)})};class Ea extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.object)return be(r,{code:se.invalid_type,expected:ge.object,received:r.parsedType}),Re;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in r.data)o.push({key:i._parse(new or(r,s,r.path,s)),value:a._parse(new or(r,r.data[s],r.path,s))});return r.common.async?Yt.mergeObjectAsync(n,o):Yt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof De?new Ea({keyType:t,valueType:n,typeName:Ae.ZodRecord,...Me(r)}):new Ea({keyType:Un.create(),valueType:t,typeName:Ae.ZodRecord,...Me(n)})}}class ac extends De{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.map)return be(r,{code:se.invalid_type,expected:ge.map,received:r.parsedType}),Re;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,c],l)=>({key:o._parse(new or(r,s,r.path,[l,"key"])),value:i._parse(new or(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Re;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}ac.create=(e,t,n)=>new ac({valueType:t,keyType:e,typeName:Ae.ZodMap,...Me(n)});class Io extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ge.set)return be(r,{code:se.invalid_type,expected:ge.set,received:r.parsedType}),Re;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(be(r,{code:se.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(be(r,{code:se.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Re;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>i._parse(new or(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new Io({...this._def,minSize:{value:t,message:Ee.toString(n)}})}max(t,n){return new Io({...this._def,maxSize:{value:t,message:Ee.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Io.create=(e,t)=>new Io({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Me(t)});class li extends De{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.function)return be(n,{code:se.invalid_type,expected:ge.function,received:n.parsedType}),Re;function r(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_arguments,argumentsError:c}})}function o(s,c){return ec({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qs(),ya].filter(l=>!!l),issueData:{code:se.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof ui){const s=this;return an(async function(...c){const l=new Bn([]),u=await s._def.args.parseAsync(c,i).catch(d=>{throw l.addIssue(r(c,d)),l}),f=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(f,i).catch(d=>{throw l.addIssue(o(f,d)),l})})}else{const s=this;return an(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Bn([r(c,l.error)]);const u=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(u,i);if(!f.success)throw new Bn([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new li({...this._def,args:ir.create(t).rest(Po.create())})}returns(t){return new li({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new li({args:t||ir.create([]).rest(Po.create()),returns:n||Po.create(),typeName:Ae.ZodFunction,...Me(r)})}}class _a extends De{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}_a.create=(e,t)=>new _a({getter:e,typeName:Ae.ZodLazy,...Me(t)});class $a extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return be(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}$a.create=(e,t)=>new $a({value:e,typeName:Ae.ZodLiteral,...Me(t)});function nv(e,t){return new eo({values:e,typeName:Ae.ZodEnum,...Me(t)})}class eo extends De{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{expected:Ye.joinValues(r),received:n.parsedType,code:se.invalid_type}),Re}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{received:n.data,code:se.invalid_enum_value,options:r}),Re}return an(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return eo.create(t)}exclude(t){return eo.create(this.options.filter(n=>!t.includes(n)))}}eo.create=nv;class ka extends De{_parse(t){const n=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ge.string&&r.parsedType!==ge.number){const o=Ye.objectValues(n);return be(r,{expected:Ye.joinValues(o),received:r.parsedType,code:se.invalid_type}),Re}if(n.indexOf(t.data)===-1){const o=Ye.objectValues(n);return be(r,{received:r.data,code:se.invalid_enum_value,options:o}),Re}return an(t.data)}get enum(){return this._def.values}}ka.create=(e,t)=>new ka({values:e,typeName:Ae.ZodNativeEnum,...Me(t)});class ui extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ge.promise&&n.common.async===!1)return be(n,{code:se.invalid_type,expected:ge.promise,received:n.parsedType}),Re;const r=n.parsedType===ge.promise?n.data:Promise.resolve(n.data);return an(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ui.create=(e,t)=>new ui({type:e,typeName:Ae.ZodPromise,...Me(t)});class qn extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{be(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Re:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!va(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>va(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):a);Ye.assertNever(o)}}qn.create=(e,t,n)=>new qn({schema:e,typeName:Ae.ZodEffects,effect:t,...Me(n)}),qn.createWithPreprocess=(e,t,n)=>new qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Me(n)});class Ar extends De{_parse(t){return this._getType(t)===ge.undefined?an(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ar.create=(e,t)=>new Ar({innerType:e,typeName:Ae.ZodOptional,...Me(t)});class Ro extends De{_parse(t){return this._getType(t)===ge.null?an(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ro.create=(e,t)=>new Ro({innerType:e,typeName:Ae.ZodNullable,...Me(t)});class Ca extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ge.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ca.create=(e,t)=>new Ca({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Me(t)});class sc extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Bn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Me(t)});class cc extends De{_parse(t){if(this._getType(t)!==ge.nan){const r=this._getOrReturnCtx(t);return be(r,{code:se.invalid_type,expected:ge.nan,received:r.parsedType}),Re}return{status:"valid",value:t.data}}}cc.create=e=>new cc({typeName:Ae.ZodNaN,...Me(e)});const JT=Symbol("zod_brand");class rv extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ta extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Re:i.status==="dirty"?(n.dirty(),ev(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Re:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Ta({in:t,out:n,typeName:Ae.ZodPipeline})}}class lc extends De{_parse(t){const n=this._def.innerType._parse(t);return va(n)&&(n.value=Object.freeze(n.value)),n}}lc.create=(e,t)=>new lc({innerType:e,typeName:Ae.ZodReadonly,...Me(t)});const ov=(e,t={},n)=>e?si.create().superRefine((r,o)=>{var i,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):si.create(),XT={object:yt.lazycreate};var Ae;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const QT=(e,t={message:`Input not instance of ${e.name}`})=>ov(n=>n instanceof e,t),iv=Un.create,av=Xr.create,eO=cc.create,tO=Qr.create,sv=ga.create,nO=Ao.create,rO=nc.create,oO=ba.create,iO=wa.create,aO=si.create,sO=Po.create,cO=Or.create,lO=rc.create,uO=zn.create,fO=yt.create,dO=yt.strictCreate,pO=xa.create,hO=ic.create,mO=Sa.create,yO=ir.create,vO=Ea.create,gO=ac.create,bO=Io.create,wO=li.create,xO=_a.create,SO=$a.create,EO=eo.create,_O=ka.create,$O=ui.create,cv=qn.create,kO=Ar.create,CO=Ro.create,TO=qn.createWithPreprocess,OO=Ta.create;var x=Object.freeze({__proto__:null,defaultErrorMap:ya,setErrorMap:FT,getErrorMap:Qs,makeIssue:ec,EMPTY_PATH:LT,addIssueToContext:be,ParseStatus:Yt,INVALID:Re,DIRTY:ev,OK:an,isAborted:of,isDirty:af,isValid:va,isAsync:tc,get util(){return Ye},get objectUtil(){return rf},ZodParsedType:ge,getParsedType:Jr,ZodType:De,ZodString:Un,ZodNumber:Xr,ZodBigInt:Qr,ZodBoolean:ga,ZodDate:Ao,ZodSymbol:nc,ZodUndefined:ba,ZodNull:wa,ZodAny:si,ZodUnknown:Po,ZodNever:Or,ZodVoid:rc,ZodArray:zn,ZodObject:yt,ZodUnion:xa,ZodDiscriminatedUnion:ic,ZodIntersection:Sa,ZodTuple:ir,ZodRecord:Ea,ZodMap:ac,ZodSet:Io,ZodFunction:li,ZodLazy:_a,ZodLiteral:$a,ZodEnum:eo,ZodNativeEnum:ka,ZodPromise:ui,ZodEffects:qn,ZodTransformer:qn,ZodOptional:Ar,ZodNullable:Ro,ZodDefault:Ca,ZodCatch:sc,ZodNaN:cc,BRAND:JT,ZodBranded:rv,ZodPipeline:Ta,ZodReadonly:lc,custom:ov,Schema:De,ZodSchema:De,late:XT,get ZodFirstPartyTypeKind(){return Ae},coerce:{string:e=>Un.create({...e,coerce:!0}),number:e=>Xr.create({...e,coerce:!0}),boolean:e=>ga.create({...e,coerce:!0}),bigint:e=>Qr.create({...e,coerce:!0}),date:e=>Ao.create({...e,coerce:!0})},any:aO,array:uO,bigint:tO,boolean:sv,date:nO,discriminatedUnion:hO,effect:cv,enum:EO,function:wO,instanceof:QT,intersection:mO,lazy:xO,literal:SO,map:gO,nan:eO,nativeEnum:_O,never:cO,null:iO,nullable:CO,number:av,object:fO,oboolean:()=>sv().optional(),onumber:()=>av().optional(),optional:kO,ostring:()=>iv().optional(),pipeline:OO,preprocess:TO,promise:$O,record:vO,set:bO,strictObject:dO,string:iv,symbol:rO,transformer:cv,tuple:yO,undefined:oO,union:pO,unknown:sO,void:lO,NEVER:Re,ZodIssueCode:se,quotelessJson:jT,ZodError:Bn});const sn=x.string().min(1),lv=x.object({text:sn}),uv=x.object({markdown:sn}),fv=x.object({imageUrl:sn}),dv=x.object({audioUrl:sn}),pv=x.object({videoUrl:sn}),hv=x.object({fileUrl:sn,title:sn.optional()}),mv=x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),yv=x.object({title:sn,subtitle:sn.optional(),imageUrl:sn.optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:sn,value:sn}))}),vv=x.object({text:sn,options:x.array(x.object({label:sn,value:sn}))}),AO=x.object({items:x.array(yv)}),PO=x.discriminatedUnion("type",[x.object({type:x.literal("text"),payload:lv}),x.object({type:x.literal("markdown"),payload:uv}),x.object({type:x.literal("image"),payload:fv}),x.object({type:x.literal("audio"),payload:dv}),x.object({type:x.literal("video"),payload:pv}),x.object({type:x.literal("file"),payload:hv}),x.object({type:x.literal("location"),payload:mv})]),IO=x.object({items:x.array(PO)}),ar={text:{schema:lv},markdown:{schema:uv},image:{schema:fv},audio:{schema:dv},video:{schema:pv},file:{schema:hv},location:{schema:mv},carousel:{schema:AO},card:{schema:yv},dropdown:{schema:vv},choice:{schema:vv},bloc:{schema:IO}},Hn={className:x.string().describe("CSS className to apply to the message").optional()},gv=ar.audio.schema.extend({...Hn,type:x.literal("audio")}),lf=ar.card.schema.extend({type:x.literal("card"),subtitle:x.string().optional(),imageUrl:x.string().optional(),...Hn}),RO=lf.omit({type:!0}),bv=x.object({items:x.array(RO),...Hn,type:x.literal("carousel")}),wv=ar.choice.schema.extend({text:x.string(),...Hn,type:x.literal("choice"),disableFreeText:x.boolean().optional()}),xv=ar.dropdown.schema.extend({text:x.string(),...Hn,type:x.literal("dropdown")}),Sv=ar.file.schema.extend({...Hn,type:x.literal("file")}),Ev=ar.image.schema.extend({...Hn,type:x.literal("image")}),_v=ar.location.schema.extend({...Hn,type:x.literal("location")}),$v=ar.markdown.schema.extend({...Hn,type:x.literal("markdown")}),kv=ar.text.schema.extend({...Hn,type:x.literal("text")}),Cv=ar.video.schema.extend({...Hn,type:x.literal("video")}),Tv=x.union([gv,lf,bv,wv,xv,Sv,Ev,_v,$v,kv,Cv]),Ov=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),Av=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.any())})}),Pv=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.any())})}),Iv=x.union([Ov,Av,Pv]),MO=Iv,NO=x.object({type:x.literal("message_created"),data:Tv}),DO=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:gv,cardSchema:lf,carouselSchema:bv,choiceSchema:wv,customSchema:Pv,dropdownSchema:xv,fileSchema:Sv,imageSchema:Ev,locationSchema:_v,markdownSchema:$v,messageCreatedSchema:NO,messageSchema:Tv,textSchema:kv,triggerSchema:Iv,triggerSignalSchema:MO,videoSchema:Cv,webchatConfigSchema:Av,webchatVisibilitySchema:Ov},Symbol.toStringTag,{value:"Module"})),sr=x.object({className:x.string().optional(),avatarUrl:x.string().url().optional()}),Rv=sr.extend({type:x.literal("audio"),audio:x.string(),title:x.string().optional()}),jO=x.union([x.object({title:x.string(),action:x.literal("Say something"),text:x.string()}),x.object({title:x.string(),action:x.literal("Open URL"),url:x.string()}),x.object({title:x.string(),action:x.literal("Postback"),payload:x.string()})]),uf=sr.extend({type:x.literal("card"),title:x.string(),subtitle:x.string().optional(),image:x.string().optional(),actions:x.array(jO)}),Mv=sr.extend({type:x.literal("carousel"),items:x.array(uf)}),Nv=sr.extend({type:x.literal("dropdown"),message:x.string().optional(),options:x.array(x.object({label:x.string(),value:x.string()})),allowCreation:x.boolean().optional(),placeholderText:x.string().optional(),allowMultiple:x.boolean().optional(),buttonText:x.string().optional(),width:x.number().optional(),displayInKeyboard:x.boolean().optional(),markdown:x.boolean().optional(),text:x.string().optional()}),Dv=sr.extend({type:x.literal("file"),file:x.string(),title:x.string().optional()}),jv=sr.extend({type:x.literal("image"),image:x.string()}),Fv=sr.extend({type:x.literal("location"),latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional()}),Lv=sr.extend({type:x.literal("single-choice"),text:x.string(),disableFreeText:x.boolean().optional(),choices:x.array(x.object({title:x.string(),value:x.string()}))}),Bv=sr.extend({type:x.literal("text"),text:x.string(),markdown:x.boolean().optional()}),Uv=sr.extend({type:x.literal("video"),video:x.string(),title:x.string().optional()}),zv=x.object({type:x.literal("quick_reply"),text:x.string(),payload:x.string().optional()}),uc=x.union([Rv,uf,Mv,Nv,Dv,jv,Fv,Lv,Bv,Uv,zv]),qv=x.object({type:x.literal("webchat-visibility"),visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])}),Hv=x.object({type:x.literal("webchat-config"),config:x.record(x.any())}),Vv=x.object({type:x.literal("custom-event"),event:x.record(x.any())}),Wv=x.union([qv,Hv,Vv]),FO=x.object({type:x.literal("trigger"),trigger:Wv}),LO=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:Rv,cardSchema:uf,carouselSchame:Mv,customEventSchema:Vv,dropdownSchema:Nv,fileSchema:Dv,imageSchema:jv,locationSchema:Fv,messageSchema:uc,messageSignalSchema:uc,quickReplySchema:zv,singleChoiceSchema:Lv,textSchema:Bv,triggerSchema:Wv,triggerSignalSchema:FO,videoSchema:Uv,webchatConfigSchema:Hv,webchatVisibilitySchema:qv},Symbol.toStringTag,{value:"Module"})),BO=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let fc;const UO=new Uint8Array(16);function zO(){if(!fc&&(fc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fc(UO)}const Ht=[];for(let e=0;e<256;++e)Ht.push((e+256).toString(16).slice(1));function qO(e,t=0){return Ht[e[t+0]]+Ht[e[t+1]]+Ht[e[t+2]]+Ht[e[t+3]]+"-"+Ht[e[t+4]]+Ht[e[t+5]]+"-"+Ht[e[t+6]]+Ht[e[t+7]]+"-"+Ht[e[t+8]]+Ht[e[t+9]]+"-"+Ht[e[t+10]]+Ht[e[t+11]]+Ht[e[t+12]]+Ht[e[t+13]]+Ht[e[t+14]]+Ht[e[t+15]]}const Kv={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dc(e,t,n){if(Kv.randomUUID&&!t&&!e)return Kv.randomUUID();e=e||{};const r=e.random||(e.rng||zO)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return qO(r)}const pc=e=>({block:e,type:"bubble"}),HO=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},Gv=({title:e,image:t,actions:n,subtitle:r})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),r&&o.push({type:"text",text:r}),n.length>0&&o.push({type:"row",blocks:n.map(HO)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},VO=({choices:e,text:t})=>{const n=dc(),r=pc({type:"text",text:t});return e.length===0?r:{type:"column",horizontalAlignment:"left",blocks:[r,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:n}))}]}},WO=({options:e,text:t})=>{const n=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&n.unshift({type:"text",text:t}),{type:"column",blocks:n}},ff=({type:e,audio:t})=>({payload:{type:e,url:t}}),df=e=>({payload:pc(Gv(e))}),pf=({items:e})=>({payload:{type:"carousel",blocks:e.map(Gv)}}),hf=e=>({disableInput:e.disableFreeText,payload:VO(e)}),mf=e=>({disableInput:!0,payload:pc(WO(e))}),yf=({file:e,...t})=>({payload:{url:e,...t}}),vf=({type:e,image:t})=>({payload:{type:e,url:t}}),gf=({type:e,latitude:t,longitude:n,title:r,address:o})=>({payload:{type:e,latitude:t,longitude:n,title:r??o??"View on map"}}),Zv=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),hc=({type:e,text:t})=>({payload:pc({type:e,text:t})}),bf=({type:e,video:t})=>({payload:{type:e,url:t}}),wf=e=>{switch(e.type){case"audio":return ff(e);case"card":return df(e);case"carousel":return pf(e);case"single-choice":return hf(e);case"dropdown":return mf(e);case"file":return yf(e);case"image":return vf(e);case"location":return gf(e);case"quick_reply":return Zv(e);case"text":return hc(e);case"video":return bf(e);default:throw new Error("Unsuported message type")}},KO=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:ff,cardAdapter:df,carouselAdapter:pf,choiceAdapter:hf,dropdownAdapter:mf,fileAdapter:yf,imageAdapter:vf,locationAdapter:gf,messageAdapter:wf,quickReplyAdapter:Zv,textAdapter:hc,videoAdapter:bf},Symbol.toStringTag,{value:"Module"})),Yv=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(GO)}),GO=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},ZO=e=>({...e,type:"audio",audioUrl:e.audio}),YO=e=>Yv(e),JO=e=>({...e,type:"carousel",items:e.items.map(Yv)}),XO=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),QO=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),eA=e=>({...e,type:"image",imageUrl:e.image}),tA=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),nA=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),rA=e=>({...e,type:"text",text:e.text}),oA=e=>({...e,type:"video",videoUrl:e.video}),iA=e=>({...e,type:"text",text:e.text??e.payload}),aA=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return ZO(e);case"card":return YO(e);case"carousel":return JO(e);case"dropdown":return XO(e);case"file":return QO(e);case"image":return eA(e);case"location":return tA(e);case"single-choice":return nA(e);case"text":return rA(e);case"video":return oA(e);case"quick_reply":return iA(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),Jv=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(sA)}),sA=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},xf=e=>({...e,type:"audio",audio:e.audioUrl}),Sf=e=>Jv(e),Ef=e=>({...e,type:"carousel",items:e.items.map(Jv)}),_f=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),$f=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),kf=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),Cf=e=>({...e,type:"image",image:e.imageUrl}),Tf=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),Of=e=>({...e,type:"text",text:e.markdown,markdown:!0}),Af=e=>({...e,type:"text",text:e.text,markdown:!0}),Pf=e=>({...e,type:"video",video:e.videoUrl}),cA=e=>{switch(e.type){case"audio":return xf(e);case"card":return Sf(e);case"carousel":return Ef(e);case"choice":return _f(e);case"dropdown":return $f(e);case"file":return kf(e);case"image":return Cf(e);case"location":return Tf(e);case"markdown":return Of(e);case"text":return Af(e);case"video":return Pf(e);default:throw new Error("Unsuported message type")}},Xv=e=>({type:"webchat-visibility",visibility:e.data.visibility}),Qv=e=>({type:"webchat-config",config:e.data.config}),eg=e=>({type:"custom-event",event:e.data.event}),lA=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:xf,cardAdapter:Sf,carouselAdapter:Ef,choiceAdapter:_f,customAdapter:eg,dropdownAdapter:$f,fileAdapter:kf,imageAdapter:Cf,locationAdapter:Tf,markdownAdapter:Of,messageAdapter:cA,textAdapter:Af,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return Xv(e);case"webchat_config":return Qv(e);case"custom":return eg(e);default:throw new Error("unknown trigger type")}},videoAdapter:Pf,webchatConfigAdapter:Qv,webchatVisibilityAdapter:Xv},Symbol.toStringTag,{value:"Module"})),tg=e=>{const t=xf(e);return ff(t)},ng=e=>{const t=Sf(e);return df(t)},rg=e=>{const t=Ef(e);return pf(t)},og=e=>{const t=_f(e);return hf(t)},ig=e=>{const t=$f(e);return mf(t)},ag=e=>{const t=kf(e);return yf(t)},sg=e=>{const t=Cf(e);return vf(t)},cg=e=>{const t=Tf(e);return gf(t)},lg=e=>{const t=Of(e);return hc(t)},ug=e=>{const t=Af(e);return hc(t)},fg=e=>{const t=Pf(e);return bf(t)},dg=e=>{switch(e.type){case"audio":return tg(e);case"card":return ng(e);case"carousel":return rg(e);case"choice":return og(e);case"dropdown":return ig(e);case"file":return ag(e);case"image":return sg(e);case"location":return cg(e);case"markdown":return lg(e);case"text":return ug(e);case"video":return fg(e);default:throw new Error("Unsuported message type")}},uA=Object.freeze(Object.defineProperty({__proto__:null,messaging:LO,messagingToTarget:KO,messagingToWebChat:aA,target:BO,webchat:DO,webchatToMessaging:lA,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:tg,cardAdapter:ng,carouselAdapter:rg,choiceAdapter:og,dropdownAdapter:ig,fileAdapter:ag,imageAdapter:sg,locationAdapter:cg,markdownAdapter:lg,messageAdapter:dg,textAdapter:ug,videoAdapter:fg},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pg(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var If={exports:{}},Oa={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -14,58 +14,58 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var mg;function dA(){return mg||(mg=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function v(A){if(A===null||typeof A!="object")return null;var ne=h&&A[h]||A[m];return typeof ne=="function"?ne:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(A){{for(var ne=arguments.length,ye=new Array(ne>1?ne-1:0),Ie=1;Ie<ne;Ie++)ye[Ie-1]=arguments[Ie];b("error",A,ye)}}function b(A,ne,ye){{var Ie=y.ReactDebugCurrentFrame,Qe=Ie.getStackAddendum();Qe!==""&&(ne+="%s",ye=ye.concat([Qe]));var ft=ye.map(function(Ke){return String(Ke)});ft.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,ft)}}var k=!1,S=!1,$=!1,
|
|
17
|
+
*/var mg;function dA(){return mg||(mg=1,process.env.NODE_ENV!=="production"&&function(){var e=E,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function v(A){if(A===null||typeof A!="object")return null;var ne=h&&A[h]||A[m];return typeof ne=="function"?ne:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(A){{for(var ne=arguments.length,ye=new Array(ne>1?ne-1:0),Ie=1;Ie<ne;Ie++)ye[Ie-1]=arguments[Ie];b("error",A,ye)}}function b(A,ne,ye){{var Ie=y.ReactDebugCurrentFrame,Qe=Ie.getStackAddendum();Qe!==""&&(ne+="%s",ye=ye.concat([Qe]));var ft=ye.map(function(Ke){return String(Ke)});ft.unshift("Warning: "+ne),Function.prototype.apply.call(console[A],console,ft)}}var k=!1,S=!1,$=!1,O=!1,I=!1,B;B=Symbol.for("react.module.reference");function T(A){return!!(typeof A=="string"||typeof A=="function"||A===r||A===i||I||A===o||A===l||A===u||O||A===d||k||S||$||typeof A=="object"&&A!==null&&(A.$$typeof===p||A.$$typeof===f||A.$$typeof===a||A.$$typeof===s||A.$$typeof===c||A.$$typeof===B||A.getModuleId!==void 0))}function M(A,ne,ye){var Ie=A.displayName;if(Ie)return Ie;var Qe=ne.displayName||ne.name||"";return Qe!==""?ye+"("+Qe+")":ye}function R(A){return A.displayName||"Context"}function j(A){if(A==null)return null;if(typeof A.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case s:var ne=A;return R(ne)+".Consumer";case a:var ye=A;return R(ye._context)+".Provider";case c:return M(A,A.render,"ForwardRef");case f:var Ie=A.displayName||null;return Ie!==null?Ie:j(A.type)||"Memo";case p:{var Qe=A,ft=Qe._payload,Ke=Qe._init;try{return j(Ke(ft))}catch{return null}}}return null}var U=Object.assign,D=0,F,K,V,N,w,q,W;function _(){}_.__reactDisabledLog=!0;function J(){{if(D===0){F=console.log,K=console.info,V=console.warn,N=console.error,w=console.group,q=console.groupCollapsed,W=console.groupEnd;var A={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}D++}}function ae(){{if(D--,D===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},A,{value:F}),info:U({},A,{value:K}),warn:U({},A,{value:V}),error:U({},A,{value:N}),group:U({},A,{value:w}),groupCollapsed:U({},A,{value:q}),groupEnd:U({},A,{value:W})})}D<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=y.ReactCurrentDispatcher,le;function pe(A,ne,ye){{if(le===void 0)try{throw Error()}catch(Qe){var Ie=Qe.stack.trim().match(/\n( *(at )?)/);le=Ie&&Ie[1]||""}return`
|
|
18
18
|
`+le+A}}var me=!1,ce;{var Q=typeof WeakMap=="function"?WeakMap:Map;ce=new Q}function G(A,ne){if(!A||me)return"";{var ye=ce.get(A);if(ye!==void 0)return ye}var Ie;me=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ft;ft=re.current,re.current=null,J();try{if(ne){var Ke=function(){throw Error()};if(Object.defineProperty(Ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ke,[])}catch(Yr){Ie=Yr}Reflect.construct(A,[],Ke)}else{try{Ke.call()}catch(Yr){Ie=Yr}A.call(Ke.prototype)}}else{try{throw Error()}catch(Yr){Ie=Yr}A()}}catch(Yr){if(Yr&&Ie&&typeof Yr.stack=="string"){for(var He=Yr.stack.split(`
|
|
19
19
|
`),fn=Ie.stack.split(`
|
|
20
20
|
`),St=He.length-1,Ct=fn.length-1;St>=1&&Ct>=0&&He[St]!==fn[Ct];)Ct--;for(;St>=1&&Ct>=0;St--,Ct--)if(He[St]!==fn[Ct]){if(St!==1||Ct!==1)do if(St--,Ct--,Ct<0||He[St]!==fn[Ct]){var Ln=`
|
|
21
|
-
`+He[St].replace(" at new "," at ");return A.displayName&&Ln.includes("<anonymous>")&&(Ln=Ln.replace("<anonymous>",A.displayName)),typeof A=="function"&&ce.set(A,Ln),Ln}while(St>=1&&Ct>=0);break}}}finally{me=!1,re.current=ft,ae(),Error.prepareStackTrace=Qe}var ha=A?A.displayName||A.name:"",NT=ha?pe(ha):"";return typeof A=="function"&&ce.set(A,NT),NT}function fe(A,ne,ye){return G(A,!1)}function ve(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function _e(A,ne,ye){if(A==null)return"";if(typeof A=="function")return G(A,ve(A));if(typeof A=="string")return pe(A);switch(A){case l:return pe("Suspense");case u:return pe("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return fe(A.render);case f:return _e(A.type,ne,ye);case p:{var Ie=A,Qe=Ie._payload,ft=Ie._init;try{return _e(ft(Qe),ne,ye)}catch{}}}return""}var
|
|
21
|
+
`+He[St].replace(" at new "," at ");return A.displayName&&Ln.includes("<anonymous>")&&(Ln=Ln.replace("<anonymous>",A.displayName)),typeof A=="function"&&ce.set(A,Ln),Ln}while(St>=1&&Ct>=0);break}}}finally{me=!1,re.current=ft,ae(),Error.prepareStackTrace=Qe}var ha=A?A.displayName||A.name:"",NT=ha?pe(ha):"";return typeof A=="function"&&ce.set(A,NT),NT}function fe(A,ne,ye){return G(A,!1)}function ve(A){var ne=A.prototype;return!!(ne&&ne.isReactComponent)}function _e(A,ne,ye){if(A==null)return"";if(typeof A=="function")return G(A,ve(A));if(typeof A=="string")return pe(A);switch(A){case l:return pe("Suspense");case u:return pe("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case c:return fe(A.render);case f:return _e(A.type,ne,ye);case p:{var Ie=A,Qe=Ie._payload,ft=Ie._init;try{return _e(ft(Qe),ne,ye)}catch{}}}return""}var P=Object.prototype.hasOwnProperty,X={},oe=y.ReactDebugCurrentFrame;function ee(A){if(A){var ne=A._owner,ye=_e(A.type,A._source,ne?ne.type:null);oe.setExtraStackFrame(ye)}else oe.setExtraStackFrame(null)}function xe(A,ne,ye,Ie,Qe){{var ft=Function.call.bind(P);for(var Ke in A)if(ft(A,Ke)){var He=void 0;try{if(typeof A[Ke]!="function"){var fn=Error((Ie||"React class")+": "+ye+" type `"+Ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[Ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}He=A[Ke](ne,Ke,Ie,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(St){He=St}He&&!(He instanceof Error)&&(ee(Qe),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ie||"React class",ye,Ke,typeof He),ee(null)),He instanceof Error&&!(He.message in X)&&(X[He.message]=!0,ee(Qe),g("Failed %s type: %s",ye,He.message),ee(null))}}}var we=Array.isArray;function ke(A){return we(A)}function Fe(A){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,ye=ne&&A[Symbol.toStringTag]||A.constructor.name||"Object";return ye}}function Oe(A){try{return z(A),!1}catch{return!0}}function z(A){return""+A}function Z(A){if(Oe(A))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fe(A)),z(A)}var H=y.ReactCurrentOwner,te={key:!0,ref:!0,__self:!0,__source:!0},de,Pe,Ce;Ce={};function Be(A){if(P.call(A,"ref")){var ne=Object.getOwnPropertyDescriptor(A,"ref").get;if(ne&&ne.isReactWarning)return!1}return A.ref!==void 0}function ut(A){if(P.call(A,"key")){var ne=Object.getOwnPropertyDescriptor(A,"key").get;if(ne&&ne.isReactWarning)return!1}return A.key!==void 0}function Nt(A,ne){if(typeof A.ref=="string"&&H.current&&ne&&H.current.stateNode!==ne){var ye=j(H.current.type);Ce[ye]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(H.current.type),A.ref),Ce[ye]=!0)}}function ot(A,ne){{var ye=function(){de||(de=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};ye.isReactWarning=!0,Object.defineProperty(A,"key",{get:ye,configurable:!0})}}function nt(A,ne){{var ye=function(){Pe||(Pe=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};ye.isReactWarning=!0,Object.defineProperty(A,"ref",{get:ye,configurable:!0})}}var pt=function(A,ne,ye,Ie,Qe,ft,Ke){var He={$$typeof:t,type:A,key:ne,ref:ye,props:Ke,_owner:ft};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function ht(A,ne,ye,Ie,Qe){{var ft,Ke={},He=null,fn=null;ye!==void 0&&(Z(ye),He=""+ye),ut(ne)&&(Z(ne.key),He=""+ne.key),Be(ne)&&(fn=ne.ref,Nt(ne,Qe));for(ft in ne)P.call(ne,ft)&&!te.hasOwnProperty(ft)&&(Ke[ft]=ne[ft]);if(A&&A.defaultProps){var St=A.defaultProps;for(ft in St)Ke[ft]===void 0&&(Ke[ft]=St[ft])}if(He||fn){var Ct=typeof A=="function"?A.displayName||A.name||"Unknown":A;He&&ot(Ke,Ct),fn&&nt(Ke,Ct)}return pt(A,He,fn,Qe,Ie,H.current,Ke)}}var wn=y.ReactCurrentOwner,Pn=y.ReactDebugCurrentFrame;function er(A){if(A){var ne=A._owner,ye=_e(A.type,A._source,ne?ne.type:null);Pn.setExtraStackFrame(ye)}else Pn.setExtraStackFrame(null)}var Gr;Gr=!1;function Tr(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function tr(){{if(wn.current){var A=j(wn.current.type);if(A)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+A+"`."}return""}}function Zr(A){{if(A!==void 0){var ne=A.fileName.replace(/^.*[\\\/]/,""),ye=A.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+ne+":"+ye+"."}return""}}var it={};function mt(A){{var ne=tr();if(!ne){var ye=typeof A=="string"?A:A.displayName||A.name;ye&&(ne=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+ye+">.")}return ne}}function Dt(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ye=mt(ne);if(it[ye])return;it[ye]=!0;var Ie="";A&&A._owner&&A._owner!==wn.current&&(Ie=" It was passed a child from "+L(A._owner.type)+"."),er(A),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Ie),er(null)}}function jt(A,ne){{if(typeof A!="object")return;if(ke(A))for(var ye=0;ye<A.length;ye++){var Ie=A[ye];Tr(Ie)&&Dt(Ie,ne)}else if(Tr(A))A._store&&(A._store.validated=!0);else if(A){var Qe=v(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var ft=Qe.call(A),Ke;!(Ke=ft.next()).done;)Tr(Ke.value)&&Dt(Ke.value,ne)}}}function Zt(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ye;if(typeof ne=="function")ye=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ye=ne.propTypes;else return;if(ye){var Ie=L(ne);xe(ye,A.props,"prop",Ie,A)}else if(ne.PropTypes!==void 0&&!Gr){Gr=!0;var Qe=L(ne);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(A){{for(var ne=Object.keys(A.props),ye=0;ye<ne.length;ye++){var Ie=ne[ye];if(Ie!=="children"&&Ie!=="key"){er(A),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ie),er(null);break}}A.ref!==null&&(er(A),g("Invalid attribute `ref` supplied to `React.Fragment`."),er(null))}}function Fn(A,ne,ye,Ie,Qe,ft){{var Ke=T(A);if(!Ke){var He="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(He+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fn=Zr(Qe);fn?He+=fn:He+=tr();var St;A===null?St="null":ke(A)?St="array":A!==void 0&&A.$$typeof===t?(St="<"+(L(A.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):St=typeof A,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",St,He)}var Ct=ht(A,ne,ye,Qe,ft);if(Ct==null)return Ct;if(Ke){var Ln=ne.children;if(Ln!==void 0)if(Ie)if(ke(Ln)){for(var ha=0;ha<Ln.length;ha++)jt(Ln[ha],A);Object.freeze&&Object.freeze(Ln)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else jt(Ln,A)}return A===r?Ft(Ct):Zt(Ct),Ct}}function nr(A,ne,ye){return Fn(A,ne,ye,!0)}function Oo(A,ne,ye){return Fn(A,ne,ye,!1)}var pce=Oo,hce=nr;Aa.Fragment=r,Aa.jsx=pce,Aa.jsxs=hce}()),Aa}process.env.NODE_ENV==="production"?If.exports=fA():If.exports=dA();var j=If.exports;function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}function Rf(e,t=[]){let n=[];function r(i,a){const s=E.createContext(a),c=n.length;n=[...n,a];function l(f){const{scope:p,children:d,...h}=f,m=(p==null?void 0:p[e][c])||s,v=E.useMemo(()=>h,Object.values(h));return E.createElement(m.Provider,{value:v},d)}function u(f,p){const d=(p==null?void 0:p[e][c])||s,h=E.useContext(d);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(a=>E.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,pA(o,...t)]}function pA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function to(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Pa=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function hA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yg(...e){return t=>e.forEach(n=>hA(n,t))}function Mo(...e){return E.useCallback(yg(...e),e)}const Mf=E.forwardRef((e,t)=>{const{children:n,...r}=e,o=E.Children.toArray(n),i=o.find(yA);if(i){const a=i.props.children,s=o.map(c=>c===i?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:c);return E.createElement(Nf,no({},r,{ref:t}),E.isValidElement(a)?E.cloneElement(a,void 0,s):null)}return E.createElement(Nf,no({},r,{ref:t}),n)});Mf.displayName="Slot";const Nf=E.forwardRef((e,t)=>{const{children:n,...r}=e;return E.isValidElement(n)?E.cloneElement(n,{...vA(r,n.props),ref:t?yg(t,n.ref):n.ref}):E.Children.count(n)>1?E.Children.only(null):null});Nf.displayName="SlotClone";const mA=({children:e})=>E.createElement(E.Fragment,null,e);function yA(e){return E.isValidElement(e)&&e.type===mA}function vA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=E.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Mf:t;return E.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),E.createElement(s,no({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gA(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}const vg="Avatar",[bA,Tce]=Rf(vg),[wA,gg]=bA(vg),bg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=E.useState("idle");return E.createElement(wA,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i},E.createElement(In.span,Tt({},r,{ref:t})))}),xA="AvatarImage",wg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=gg(xA,n),s=EA(r),c=to(l=>{o(l),a.onImageLoadingStatusChange(l)});return Pa(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?E.createElement(In.img,Tt({},i,{ref:t,src:r})):null}),SA="AvatarFallback",xg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=gg(SA,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.createElement(In.span,Tt({},o,{ref:t})):null});function EA(e){const[t,n]=E.useState("idle");return E.useEffect(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function Df(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(c=>c+c).join(""));const o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function _A(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const $A=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Sg(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const kA=2.4,CA=.2126729,TA=.7151522,OA=.072175,AA=.56,PA=.57,IA=.62,RA=.65,mc=.022,Eg=1.414,MA=1.14,NA=1.14,DA=.035991,jA=.035991,FA=27.7847239587675,LA=27.7847239587675,_g=.027,$g=.027,kg=.001,BA=5e-4;function Cg(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**kA;return CA*o(t)+TA*o(n)+OA*o(r)}function Tg(e,t){if(!e||!t)return 0;let n=Cg(Df(e)),r=Cg(Df(t)),o=0,i=0;return n=n>mc?n:n+(mc-n)**Eg,r=r>mc?r:r+(mc-r)**Eg,Math.abs(r-n)<BA?0:(r>n?(o=(r**AA-n**PA)*MA,i=o<kg?0:o<DA?o-o*FA*_g:o-_g):(o=(r**RA-n**IA)*NA,i=o>-kg?0:o>-jA?o-o*LA*$g:o+$g),Math.abs(i*100))}let jf=class{constructor(){he(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var o;(o=this.eventMap[t])==null||o.delete(n)}}emit(t,n){var r,o;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:n})})}};const UA=new jf;function Og(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function Ag(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",f="month",p="quarter",d="year",h="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var N=["th","st","nd","rd"],D=z%100;return"["+z+(N[(D-20)%10]||N[D]||N[0])+"]"}},b=function(z,N,D){var K=String(z);return!K||K.length>=N?z:""+Array(N+1-K.length).join(D)+z},k={s:b,z:function(z){var N=-z.utcOffset(),D=Math.abs(N),K=Math.floor(D/60),W=D%60;return(N<=0?"+":"-")+b(K,2,"0")+":"+b(W,2,"0")},m:function z(N,D){if(N.date()<D.date())return-z(D,N);var K=12*(D.year()-N.year())+(D.month()-N.month()),W=N.clone().add(K,f),M=D-W<0,w=N.clone().add(K+(M?-1:1),f);return+(-(K+(D-W)/(M?W-w:w-W))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:d,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",$={};$[S]=g;var C="$isDayjsObject",P=function(z){return z instanceof H||!(!z||!z[C])},F=function z(N,D,K){var W;if(!N)return S;if(typeof N=="string"){var M=N.toLowerCase();$[M]&&(W=M),D&&($[M]=D,W=M);var w=N.split("-");if(!W&&w.length>1)return z(w[0])}else{var U=N.name;$[U]=N,W=U}return!K&&W&&(S=W),W||!K&&S},T=function(z,N){if(P(z))return z.clone();var D=typeof N=="object"?N:{};return D.date=z,D.args=arguments,new H(D)},R=k;R.l=F,R.i=P,R.w=function(z,N){return T(z,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var H=function(){function z(D){this.$L=F(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[C]=!0}var N=z.prototype;return N.parse=function(D){this.$d=function(K){var W=K.date,M=K.utc;if(W===null)return new Date(NaN);if(R.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var w=W.match(v);if(w){var U=w[2]-1||0,V=(w[7]||"0").substring(0,3);return M?new Date(Date.UTC(w[1],U,w[3]||1,w[4]||0,w[5]||0,w[6]||0,V)):new Date(w[1],U,w[3]||1,w[4]||0,w[5]||0,w[6]||0,V)}}return new Date(W)}(D),this.init()},N.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},N.$utils=function(){return R},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(D,K){var W=T(D);return this.startOf(K)<=W&&W<=this.endOf(K)},N.isAfter=function(D,K){return T(D)<this.startOf(K)},N.isBefore=function(D,K){return this.endOf(K)<T(D)},N.$g=function(D,K,W){return R.u(D)?this[K]:this.set(W,D)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(D,K){var W=this,M=!!R.u(K)||K,w=R.p(D),U=function(me,ce){var Q=R.w(W.$u?Date.UTC(W.$y,ce,me):new Date(W.$y,ce,me),W);return M?Q:Q.endOf(l)},V=function(me,ce){return R.w(W.toDate()[me].apply(W.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(ce)),W)},_=this.$W,J=this.$M,ae=this.$D,re="set"+(this.$u?"UTC":"");switch(w){case d:return M?U(1,0):U(31,11);case f:return M?U(1,J):U(0,J+1);case u:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return U(M?ae-pe:ae+(6-pe),J);case l:case h:return V(re+"Hours",0);case c:return V(re+"Minutes",1);case s:return V(re+"Seconds",2);case a:return V(re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(D){return this.startOf(D,!1)},N.$set=function(D,K){var W,M=R.p(D),w="set"+(this.$u?"UTC":""),U=(W={},W[l]=w+"Date",W[h]=w+"Date",W[f]=w+"Month",W[d]=w+"FullYear",W[c]=w+"Hours",W[s]=w+"Minutes",W[a]=w+"Seconds",W[i]=w+"Milliseconds",W)[M],V=M===l?this.$D+(K-this.$W):K;if(M===f||M===d){var _=this.clone().set(h,1);_.$d[U](V),_.init(),this.$d=_.set(h,Math.min(this.$D,_.daysInMonth())).$d}else U&&this.$d[U](V);return this.init(),this},N.set=function(D,K){return this.clone().$set(D,K)},N.get=function(D){return this[R.p(D)]()},N.add=function(D,K){var W,M=this;D=Number(D);var w=R.p(K),U=function(J){var ae=T(M);return R.w(ae.date(ae.date()+Math.round(J*D)),M)};if(w===f)return this.set(f,this.$M+D);if(w===d)return this.set(d,this.$y+D);if(w===l)return U(1);if(w===u)return U(7);var V=(W={},W[s]=r,W[c]=o,W[a]=n,W)[w]||1,_=this.$d.getTime()+D*V;return R.w(_,this)},N.subtract=function(D,K){return this.add(-1*D,K)},N.format=function(D){var K=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var M=D||"YYYY-MM-DDTHH:mm:ssZ",w=R.z(this),U=this.$H,V=this.$m,_=this.$M,J=W.weekdays,ae=W.months,re=W.meridiem,le=function(ce,Q,G,fe){return ce&&(ce[Q]||ce(K,M))||G[Q].slice(0,fe)},pe=function(ce){return R.s(U%12||12,ce,"0")},me=re||function(ce,Q,G){var fe=ce<12?"AM":"PM";return G?fe.toLowerCase():fe};return M.replace(y,function(ce,Q){return Q||function(G){switch(G){case"YY":return String(K.$y).slice(-2);case"YYYY":return R.s(K.$y,4,"0");case"M":return _+1;case"MM":return R.s(_+1,2,"0");case"MMM":return le(W.monthsShort,_,ae,3);case"MMMM":return le(ae,_);case"D":return K.$D;case"DD":return R.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return le(W.weekdaysMin,K.$W,J,2);case"ddd":return le(W.weekdaysShort,K.$W,J,3);case"dddd":return J[K.$W];case"H":return String(U);case"HH":return R.s(U,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return me(U,V,!0);case"A":return me(U,V,!1);case"m":return String(V);case"mm":return R.s(V,2,"0");case"s":return String(K.$s);case"ss":return R.s(K.$s,2,"0");case"SSS":return R.s(K.$ms,3,"0");case"Z":return w}return null}(ce)||w.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(D,K,W){var M,w=this,U=R.p(K),V=T(D),_=(V.utcOffset()-this.utcOffset())*r,J=this-V,ae=function(){return R.m(w,V)};switch(U){case d:M=ae()/12;break;case f:M=ae();break;case p:M=ae()/3;break;case u:M=(J-_)/6048e5;break;case l:M=(J-_)/864e5;break;case c:M=J/o;break;case s:M=J/r;break;case a:M=J/n;break;default:M=J}return W?M:R.a(M)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return $[this.$L]},N.locale=function(D,K){if(!D)return this.$L;var W=this.clone(),M=F(D,K,!0);return M&&(W.$L=M),W},N.clone=function(){return R.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},z}(),L=H.prototype;return T.prototype=L,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",f],["$y",d],["$D",h]].forEach(function(z){L[z[1]]=function(N){return this.$g(N,z[0],z[1])}}),T.extend=function(z,N){return z.$i||(z(N,H,T),z.$i=!0),T},T.locale=F,T.isDayjs=P,T.unix=function(z){return T(1e3*z)},T.en=$[S],T.Ls=$,T.p={},T})})(Pg);var zA=Pg.exports;const yc=Ue(zA);var Ig={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(Ig);var qA=Ig.exports;const HA=Ue(qA);var Rg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(Rg);var WA=Rg.exports;const VA=Ue(WA);yc.extend(HA),yc.extend(VA);function KA(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(Mg(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const o=e[r].timestamp,i=e[r+1].timestamp;yc(o).isSame(i,t)||n.push(Mg(i))}return n}function Mg(e){return{id:dc(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:GA(e)}}}function GA(e,t=!1){const n=yc(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function ZA(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function YA(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function JA(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function XA(e,t){return e.map(n=>Math.round(n*t))}const Ia=e=>t=>JA(t,e),Ra=e=>t=>XA(t,e),QA={50:Ia(.95),100:Ia(.9),200:Ia(.75),300:Ia(.6),400:Ia(.3),500:e=>e,600:Ra(.9),700:Ra(.6),800:Ra(.45),900:Ra(.3),950:Ra(.2)};function Ng(e,t=QA){const n={},r=ZA(e);for(const[o,i]of Object.entries(t))n[o]=YA(i(r));return n}const fi=x.object({title:x.string().optional(),link:x.string().optional()}),Ff=x.object({color:x.string().optional(),variant:x.enum(["soft","solid"]).optional(),themeMode:x.enum(["light","dark"]).optional(),fontFamily:x.enum(["rubik","inter","ibm","fira"]).optional(),radius:x.number().min(.5).max(4).optional()}),Dg=x.object({composerPlaceholder:x.string().optional(),botName:x.string().optional(),botAvatar:x.string().optional(),botDescription:x.string().optional(),website:fi.optional(),email:fi.optional(),phone:fi.optional(),privacyPolicy:fi.optional(),termsOfService:fi.optional(),showPoweredBy:x.boolean().optional()}).merge(Ff),jg=x.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Fg=x.object({}).passthrough().transform(e=>e),ue=x.object({className:x.string().optional(),style:Fg.optional()}),vc=x.object({container:ue.optional(),image:ue.optional(),fallback:ue.optional()}),Lg=x.object({button:ue.optional(),text:x.record(jg,ue.optional()),image:x.object({image:ue.optional(),placeholder:ue.optional()}).optional(),audio:ue.optional(),video:ue.optional(),file:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),location:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),column:ue.optional(),row:ue.optional(),bubble:ue.optional(),carousel:x.object({container:ue.optional(),slidesContainer:ue.optional(),backButton:ue.optional(),nextButton:ue.optional()}).optional(),dropdown:x.object({button:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional()}).optional(),content:x.object({container:ue.optional(),item:ue.optional()}).optional()}).optional()}),Bg=x.object({container:ue.optional(),modal:x.object({overlay:ue.optional(),container:ue.optional(),dialog:x.object({container:ue.optional(),title:x.object({container:ue.optional(),text:ue.optional(),closeIcon:ue.optional()}).optional(),content:ue.optional(),newConversation:x.object({text:ue.optional(),button:ue.optional()}).optional()}).optional()}).optional(),notification:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),icon:ue.optional(),closeIcon:ue.optional()}).optional(),header:x.object({container:ue.optional(),content:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),actions:x.object({container:ue.optional(),icons:ue.optional()}).optional()}),expandedContent:x.object({container:ue.optional(),group:ue.optional(),descriptionItems:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional(),link:ue.optional(),poweredBy:ue.optional()}).optional()}).optional(),description:x.object({container:ue.optional(),title:ue.optional(),subtitle:ue.optional()}).optional(),newConversationIcon:ue.optional()}).optional(),composer:x.object({container:ue.optional(),input:ue.optional(),uploadButton:x.object({container:ue.optional(),icon:ue.optional()}).optional(),button:x.object({container:ue.optional(),icon:ue.optional()}).optional()}).optional(),fab:x.object({icon:ue.optional(),container:ue.optional()}).optional(),messageList:x.object({scrollbar:x.object({container:ue.optional(),viewport:ue.optional(),thumb:ue.optional(),corner:ue.optional(),background:ue.optional()}).optional(),container:ue.optional(),marquee:x.object({content:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),container:ue.optional()}).optional(),scrollDownButton:x.object({container:ue.optional(),button:ue.optional(),icon:ue.optional()}).optional()}).optional(),message:x.object({container:ue.optional(),avatar:vc.optional(),blocks:Lg.optional()}).optional(),loadingIndicator:x.object({container:ue.optional(),loader:ue.optional()}).optional()}),Ug=x.enum(["opened","closed","initial"]),zg=x.object({name:x.string().optional(),pictureUrl:x.string().optional(),data:x.record(x.unknown()).optional()}),qg=x.enum(["messaging","pushpin"]),Hg=x.object({configuration:Dg.optional().catch(void 0),theme:Bg.optional().catch(void 0),style:x.string().optional().catch(void 0),user:zg.optional().catch(void 0)}),eP=Hg.extend({clientId:x.string(),botId:x.string(),selector:x.string().optional().catch(void 0),webchatScriptUrl:x.string().optional().catch(void 0),fabScriptUrl:x.string().optional().catch(void 0),messagingUrl:x.string().optional().catch(void 0),pushpinUrl:x.string().optional().catch(void 0),clientMode:qg.optional().catch(void 0),defaultState:Ug.optional().catch(void 0)});function Wg(e){const{fontFamily:t,radius:n,themeMode:r,variant:o,color:i}=Ff.parse(e);let a={},s={};if(i){const u=Ng(i),f=r==="dark"?Sg(u):u,p=Ng(_A($A(Df(i)))),d=r==="dark"?Sg(p):p,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((v,[y,g])=>({...v,[`--bpPrimary-${y}`]:g}),{});const m=Object.entries({...d,1:h}).reduce((v,[y,g])=>({...v,[`--bpGray-${y}`]:g}),{});a={...s,...m}}n&&(a={...a,"--bpRadius-scale":n.toString()});const c=s?Tg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Tg(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...l},Og(":root",a)+(t?Og(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const Lf=E.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=Ag(e??"",15);return j.jsxs(bg,{ref:a,"data-color":s,...n,...i,children:[j.jsx(wg,{src:t,...r}),j.jsx(xg,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function Oce(){}function Ace(){}function tP(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oP={};function Vg(e,t){return((t||oP).jsx?rP:nP).test(e)}const iP=/[ \t\n\f\r]/g;function aP(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(iP,"")===""}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function Gg(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function Bf(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let sP=0;const je=No(),Et=No(),Zg=No(),ie=No(),dt=No(),di=No(),xn=No();function No(){return 2**++sP}const Uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Et,commaOrSpaceSeparated:xn,commaSeparated:di,number:ie,overloadedBoolean:Zg,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Uf);class qf extends Rn{constructor(t,n,r,o){let i=-1;if(super(t,n),Yg(this,"space",o),typeof r=="number")for(;++i<zf.length;){const a=zf[i];Yg(this,zf[i],(r&Uf[a])===Uf[a])}}}qf.prototype.defined=!0;function Yg(e,t,n){n&&(e[t]=n)}const cP={}.hasOwnProperty;function pi(e){const t={},n={};let r;for(r in e.properties)if(cP.call(e.properties,r)){const o=e.properties[r],i=new qf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Bf(r)]=r,n[Bf(i.attribute)]=r}return new Ma(t,n,e.space)}const Jg=pi({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Xg=pi({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Qg(e,t){return t in e?e[t]:t}function eb(e,t){return Qg(e,t.toLowerCase())}const tb=pi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:eb,properties:{xmlns:null,xmlnsXLink:null}}),nb=pi({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:dt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ie,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:dt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Et,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),lP=pi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:eb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:di,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:dt,autoFocus:je,autoPlay:je,capture:je,charSet:null,checked:je,cite:null,className:dt,cols:ie,colSpan:null,content:null,contentEditable:Et,controls:je,controlsList:dt,coords:ie|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Zg,draggable:Et,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:dt,height:ie,hidden:je,high:ie,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:dt,itemRef:dt,itemScope:je,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:ie,pattern:null,ping:dt,placeholder:null,playsInline:je,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:dt,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:dt,scope:null,scoped:je,seamless:je,selected:je,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Et,width:ie,wrap:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ie,security:null,unselectable:null}}),uP=pi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Qg,properties:{about:xn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:di,g2:di,glyphName:di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xn,to:null,transform:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),fP=/^data[-\w.:]+$/i,rb=/-[a-z]/g,dP=/[A-Z]/g;function pP(e,t){const n=Bf(t);let r=t,o=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fP.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(rb,mP);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!rb.test(i)){let a=i.replace(dP,hP);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=qf}return new o(r,t)}function hP(e){return"-"+e.toLowerCase()}function mP(e){return e.charAt(1).toUpperCase()}const yP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vP=Gg([Xg,Jg,tb,nb,lP],"html"),Hf=Gg([Xg,Jg,tb,nb,uP],"svg");function gP(e){return e.join(" ").trim()}var ob={},ib=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,bP=/\n/g,wP=/^\s*/,xP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,SP=/^:\s*/,EP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_P=/^[;\s]*/,$P=/^\s+|\s+$/g,kP=`
|
|
28
|
-
`,ab="/",sb="*",Do="",CP="comment",TP="declaration",OP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(bP);m&&(n+=m.length);var v=h.lastIndexOf(kP);r=~v?h.length-v:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),l(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(h){var m=h.exec(e);if(m){var v=m[0];return o(v),e=e.slice(v.length),m}}function l(){c(wP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=i();if(!(ab!=e.charAt(0)||sb!=e.charAt(1))){for(var m=2;Do!=e.charAt(m)&&(sb!=e.charAt(m)||ab!=e.charAt(m+1));)++m;if(m+=2,Do===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return r+=2,o(v),e=e.slice(m),r+=2,h({type:CP,comment:v})}}function p(){var h=i(),m=c(xP);if(m){if(f(),!c(SP))return s("property missing ':'");var v=c(EP),y=h({type:TP,property:cb(m[0].replace(ib,Do)),value:v?cb(v[0].replace(ib,Do)):Do});return c(_P),y}}function d(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return l(),d()};function cb(e){return e?e.replace($P,Do):Do}var AP=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ob,"__esModule",{value:!0});var PP=AP(OP);function IP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,PP.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}var lb=ob.default=IP;const RP=lb.default||lb,ub=fb("end"),Wf=fb("start");function fb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function MP(e){const t=Wf(e),n=ub(e);if(t&&n)return{start:t,end:n}}function Na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?db(e.position):"start"in e||"end"in e?db(e):"line"in e||"column"in e?Vf(e):""}function Vf(e){return pb(e&&e.line)+":"+pb(e&&e.column)}function db(e){return Vf(e&&e.start)+"-"+Vf(e&&e.end)}function pb(e){return e&&typeof e=="number"?e:1}class Jt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Na(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const Kf={}.hasOwnProperty,NP=new Map,DP=/[A-Z]/g,jP=/-([a-z])/g,FP=new Set(["table","tbody","thead","tfoot","tr"]),LP=new Set(["td","th"]),hb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=GP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=KP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Hf:vP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=mb(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function mb(e,t,n){if(t.type==="element")return UP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return HP(e,t,n);if(t.type==="mdxjsEsm")return qP(e,t);if(t.type==="root")return WP(e,t,n);if(t.type==="text")return VP(e,t)}function UP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Hf,e.schema=o),e.ancestors.push(t);const i=vb(e,t.tagName,!1),a=ZP(e,t);let s=Zf(e,t);return FP.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!aP(c):!0})),yb(e,a,i,t),Gf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function zP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Da(e,t.position)}function qP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Da(e,t.position)}function HP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Hf,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:vb(e,t.name,!0),a=YP(e,t),s=Zf(e,t);return yb(e,a,i,t),Gf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function WP(e,t,n){const r={};return Gf(r,Zf(e,t)),e.create(t,e.Fragment,r,n)}function VP(e,t){return t.value}function yb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function KP(e,t,n){return r;function r(o,i,a,s){const l=Array.isArray(a.children)?n:t;return s?l(i,a,s):l(i,a)}}function GP(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),c=Wf(r);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ZP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Kf.call(t.properties,o)){const i=JP(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&LP.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function YP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Da(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Da(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Zf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:NP;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=mb(e,i,a);s!==void 0&&n.push(s)}return n}function JP(e,t,n){const r=pP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tP(n):gP(n)),r.property==="style"){let o=typeof n=="object"?n:XP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=QP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?yP[r.property]||r.property:r.attribute,n]}}function XP(e,t){const n={};try{RP(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Jt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=hb+"#cannot-parse-style-attribute",a}}return n;function r(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(jP,tI)),n[a]=i}}function vb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Vg(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Vg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Kf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Da(e)}function Da(e,t){const n=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QP(e){const t={};let n;for(n in e)Kf.call(e,n)&&(t[eI(n)]=e[n]);return t}function eI(e){let t=e.replace(DP,nI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tI(e,t){return t.toUpperCase()}function nI(e){return"-"+e.toLowerCase()}const Yf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rI={};function Jf(e,t){const n=t||rI,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gb(e,r,o)}function gb(e,t,n){if(oI(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bb(e.children,t,n)}return Array.isArray(e)?bb(e,t,n):""}function bb(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=gb(e[o],t,n);return r.join("")}function oI(e){return!!(e&&typeof e=="object")}const wb=document.createElement("i");function Xf(e){const t="&"+e+";";wb.innerHTML=t;const n=wb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Sn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Mn(e,t){return e.length>0?(Sn(e,e.length,0,t),e):t}const xb={}.hasOwnProperty;function Sb(e){const t={};let n=-1;for(;++n<e.length;)iI(t,e[n]);return t}function iI(e,t){let n;for(n in t){const o=(xb.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){xb.call(o,a)||(o[a]=[]);const s=i[a];aI(o[a],Array.isArray(s)?s:s?[s]:[])}}}function aI(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Sn(e,0,0,r)}function Eb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=ro(/[A-Za-z]/),Xt=ro(/[\dA-Za-z]/),sI=ro(/[#-'*+\--9=?A-Z^-~]/);function gc(e){return e!==null&&(e<32||e===127)}const Qf=ro(/\d/),cI=ro(/[\dA-Fa-f]/),lI=ro(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const bc=ro(/\p{P}|\p{S}/u),jo=ro(/\s/);function ro(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Xt(e.charCodeAt(n+1))&&Xt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function We(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return Le(c)?(e.enter(n),s(c)):t(c)}function s(c){return Le(c)&&i++<o?(e.consume(c),s):(e.exit(n),t(c))}}const uI={tokenize:fI};function fI(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),We(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const dI={tokenize:pI},_b={tokenize:hI};function pI(e){const t=this,n=[];let r=0,o,i,a;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,l)(b)}return l(b)}function c(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&g();const k=t.events.length;let S=k,$;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){$=t.events[S][1].end;break}y(r);let C=k;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},$),C++;return Sn(t.events,S+1,0,t.events.slice(k)),t.events.length=C,l(b)}return s(b)}function l(b){if(r===n.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_b,u,f)(b)}function u(b){return o&&g(),y(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(_b,d,h)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&g(),y(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),m(b)}function m(b){if(b===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(b);return}return $e(b)?(e.consume(b),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function v(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(S),t.parser.lazy[b.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<a&&(!o.events[$][1].end||o.events[$][1].end.offset>a))return;const C=t.events.length;let P=C,F,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(F){T=t.events[P][1].end;break}F=!0}for(y(r),$=C;$<t.events.length;)t.events[$][1].end=Object.assign({},T),$++;Sn(t.events,P+1,0,t.events.slice(C)),t.events.length=$}}function y(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function hI(e,t,n){return We(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wc(e){if(e===null||st(e)||jo(e))return 1;if(bc(e))return 2}function xc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ed={name:"attention",tokenize:yI,resolveAll:mI};function mI(e,t){let n=-1,r,o,i,a,s,c,l,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);$b(f,-c),$b(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Mn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Mn(l,xc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Sn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function yI(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wc(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=wc(c),f=!u||u===2&&o||n.includes(c),p=!o||o===2&&u||n.includes(r);return l._open=!!(i===42?f:f&&(o||!p)),l._close=!!(i===42?p:p&&(u||!f)),t(c)}}function $b(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vI={name:"autolink",tokenize:gI};function gI(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return cn(d)?(e.consume(d),a):l(d)}function a(d){return d===43||d===45||d===46||Xt(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,c):(d===43||d===45||d===46||Xt(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function c(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||gc(d)?n(d):(e.consume(d),c)}function l(d){return d===64?(e.consume(d),u):sI(d)?(e.consume(d),l):n(d)}function u(d){return Xt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Xt(d))&&r++<63){const h=d===45?p:f;return e.consume(d),h}return n(d)}}const ja={tokenize:bI,partial:!0};function bI(e,t,n){return r;function r(i){return Le(i)?We(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||$e(i)?t(i):n(i)}}const kb={name:"blockQuote",tokenize:wI,continuation:{tokenize:xI},exit:SI};function wI(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return Le(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function xI(e,t,n){const r=this;return o;function o(a){return Le(a)?We(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(kb,t,n)(a)}}function SI(e){e.exit("blockQuote")}const Cb={name:"characterEscape",tokenize:EI};function EI(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return lI(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Tb={name:"characterReference",tokenize:_I};function _I(e,t,n){const r=this;let o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Xt,u(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=cI,u):(e.enter("characterReferenceValue"),i=7,a=Qf,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===Xt&&!Xf(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Ob={tokenize:kI,partial:!0},Ab={name:"codeFenced",tokenize:$I,concrete:!0};function $I(e,t,n){const r=this,o={tokenize:S,partial:!0};let i=0,a=0,s;return c;function c($){return l($)}function l($){const C=r.events[r.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u($)}function u($){return $===s?(a++,e.consume($),u):a<3?n($):(e.exit("codeFencedFenceSequence"),Le($)?We(e,f,"whitespace")($):f($))}function f($){return $===null||$e($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(Ob,m,k)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p($))}function p($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f($)):Le($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,d,"whitespace")($)):$===96&&$===s?n($):(e.consume($),p)}function d($){return $===null||$e($)?f($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h($))}function h($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f($)):$===96&&$===s?n($):(e.consume($),h)}function m($){return e.attempt(o,k,v)($)}function v($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y}function y($){return i>0&&Le($)?We(e,g,"linePrefix",i+1)($):g($)}function g($){return $===null||$e($)?e.check(Ob,m,k)($):(e.enter("codeFlowValue"),b($))}function b($){return $===null||$e($)?(e.exit("codeFlowValue"),g($)):(e.consume($),b)}function k($){return e.exit("codeFenced"),t($)}function S($,C,P){let F=0;return T;function T(N){return $.enter("lineEnding"),$.consume(N),$.exit("lineEnding"),R}function R(N){return $.enter("codeFencedFence"),Le(N)?We($,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):H(N)}function H(N){return N===s?($.enter("codeFencedFenceSequence"),L(N)):P(N)}function L(N){return N===s?(F++,$.consume(N),L):F>=a?($.exit("codeFencedFenceSequence"),Le(N)?We($,z,"whitespace")(N):z(N)):P(N)}function z(N){return N===null||$e(N)?($.exit("codeFencedFence"),C(N)):P(N)}}}function kI(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const td={name:"codeIndented",tokenize:TI},CI={tokenize:OI,partial:!0};function TI(e,t,n){const r=this;return o;function o(l){return e.enter("codeIndented"),We(e,i,"linePrefix",4+1)(l)}function i(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?c(l):$e(l)?e.attempt(CI,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||$e(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function OI(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):We(e,i,"linePrefix",4+1)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):$e(a)?o(a):n(a)}}const AI={name:"codeText",tokenize:RI,resolve:PI,previous:II};function PI(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function II(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function RI(e,t,n){let r=0,o,i;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",l(f))}}function Pb(e){const t={};let n=-1,r,o,i,a,s,c,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,MI(e,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),s=e.slice(o,n),s.unshift(r),Sn(e,o,n-o+1,s))}}return!l}function MI(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,c=[],l={};let u,f,p=-1,d=n,h=0,m=0;const v=[m];for(;d;){for(;e[++o][1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),p=v.length;p--;){const y=s.slice(v[p],v[p+1]),g=i.pop();c.unshift([g,g+y.length-1]),Sn(e,g,2,y)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const NI={tokenize:FI,resolve:jI},DI={tokenize:LI,partial:!0};function jI(e){return Pb(e),e}function FI(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):$e(s)?e.check(DI,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function LI(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),We(e,i,"linePrefix")}function i(a){if(a===null||$e(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ib(e,t,n,r,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),p):y===null||y===32||y===41||gc(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function p(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||$e(y)?n(y):(e.consume(y),y===92?h:d)}function h(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function m(y){return!u&&(y===null||y===41||st(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<l&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||gc(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Rb(e,t,n,r,o,i){const a=this;let s=0,c;return l;function l(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(d){return s>999||d===null||d===91||d===93&&!c||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||$e(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),c||(c=!Le(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Mb(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):n(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?n(p):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),We(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||$e(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function Fa(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Le(o)?We(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const BI={name:"definition",tokenize:zI},UI={tokenize:qI,partial:!0};function zI(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Rb.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),c):n(d)}function c(d){return st(d)?Fa(e,l)(d):l(d)}function l(d){return Ib(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(UI,f,f)(d)}function f(d){return Le(d)?We(e,p,"whitespace")(d):p(d)}function p(d){return d===null||$e(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function qI(e,t,n){return r;function r(s){return st(s)?Fa(e,o)(s):n(s)}function o(s){return Mb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Le(s)?We(e,a,"whitespace")(s):a(s)}function a(s){return s===null||$e(s)?t(s):n(s)}}const HI={name:"hardBreakEscape",tokenize:WI};function WI(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return $e(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const VI={name:"headingAtx",tokenize:GI,resolve:KI};function KI(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Sn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function GI(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||st(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||$e(u)?(e.exit("atxHeading"),t(u)):Le(u)?We(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||st(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const ZI=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nb=["pre","script","style","textarea"],YI={name:"htmlFlow",tokenize:eR,resolveTo:QI,concrete:!0},JI={tokenize:nR,partial:!0},XI={tokenize:tR,partial:!0};function QI(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eR(e,t,n){const r=this;let o,i,a,s,c;return l;function l(_){return u(_)}function u(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),i=!0,m):_===63?(e.consume(_),o=3,r.interrupt?t:w):cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function p(_){return _===45?(e.consume(_),o=2,d):_===91?(e.consume(_),o=5,s=0,h):cn(_)?(e.consume(_),o=4,r.interrupt?t:w):n(_)}function d(_){return _===45?(e.consume(_),r.interrupt?t:w):n(_)}function h(_){const J="CDATA[";return _===J.charCodeAt(s++)?(e.consume(_),s===J.length?r.interrupt?t:H:h):n(_)}function m(_){return cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function v(_){if(_===null||_===47||_===62||st(_)){const J=_===47,ae=a.toLowerCase();return!J&&!i&&Nb.includes(ae)?(o=1,r.interrupt?t(_):H(_)):ZI.includes(a.toLowerCase())?(o=6,J?(e.consume(_),y):r.interrupt?t(_):H(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?g(_):b(_))}return _===45||Xt(_)?(e.consume(_),a+=String.fromCharCode(_),v):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:H):n(_)}function g(_){return Le(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||cn(_)?(e.consume(_),k):Le(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||Xt(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),$):Le(_)?(e.consume(_),S):b(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),c=_,C):Le(_)?(e.consume(_),$):P(_)}function C(_){return _===c?(e.consume(_),c=null,F):_===null||$e(_)?n(_):(e.consume(_),C)}function P(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||st(_)?S(_):(e.consume(_),P)}function F(_){return _===47||_===62||Le(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),R):n(_)}function R(_){return _===null||$e(_)?H(_):Le(_)?(e.consume(_),R):n(_)}function H(_){return _===45&&o===2?(e.consume(_),D):_===60&&o===1?(e.consume(_),K):_===62&&o===4?(e.consume(_),U):_===63&&o===3?(e.consume(_),w):_===93&&o===5?(e.consume(_),M):$e(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(JI,V,L)(_)):_===null||$e(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),H)}function L(_){return e.check(XI,z,V)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||$e(_)?L(_):(e.enter("htmlFlowData"),H(_))}function D(_){return _===45?(e.consume(_),w):H(_)}function K(_){return _===47?(e.consume(_),a="",W):H(_)}function W(_){if(_===62){const J=a.toLowerCase();return Nb.includes(J)?(e.consume(_),U):H(_)}return cn(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),W):H(_)}function M(_){return _===93?(e.consume(_),w):H(_)}function w(_){return _===62?(e.consume(_),U):_===45&&o===2?(e.consume(_),w):H(_)}function U(_){return _===null||$e(_)?(e.exit("htmlFlowData"),V(_)):(e.consume(_),U)}function V(_){return e.exit("htmlFlow"),t(_)}}function tR(e,t,n){const r=this;return o;function o(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function nR(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ja,t,n)}}const rR={name:"htmlText",tokenize:oR};function oR(e,t,n){const r=this;let o,i,a;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),S):w===63?(e.consume(w),b):cn(w)?(e.consume(w),P):n(w)}function l(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),i=0,h):cn(w)?(e.consume(w),g):n(w)}function u(w){return w===45?(e.consume(w),d):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),p):$e(w)?(a=f,K(w)):(e.consume(w),f)}function p(w){return w===45?(e.consume(w),d):f(w)}function d(w){return w===62?D(w):w===45?p(w):f(w)}function h(w){const U="CDATA[";return w===U.charCodeAt(i++)?(e.consume(w),i===U.length?m:h):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),v):$e(w)?(a=m,K(w)):(e.consume(w),m)}function v(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?D(w):w===93?(e.consume(w),y):m(w)}function g(w){return w===null||w===62?D(w):$e(w)?(a=g,K(w)):(e.consume(w),g)}function b(w){return w===null?n(w):w===63?(e.consume(w),k):$e(w)?(a=b,K(w)):(e.consume(w),b)}function k(w){return w===62?D(w):b(w)}function S(w){return cn(w)?(e.consume(w),$):n(w)}function $(w){return w===45||Xt(w)?(e.consume(w),$):C(w)}function C(w){return $e(w)?(a=C,K(w)):Le(w)?(e.consume(w),C):D(w)}function P(w){return w===45||Xt(w)?(e.consume(w),P):w===47||w===62||st(w)?F(w):n(w)}function F(w){return w===47?(e.consume(w),D):w===58||w===95||cn(w)?(e.consume(w),T):$e(w)?(a=F,K(w)):Le(w)?(e.consume(w),F):D(w)}function T(w){return w===45||w===46||w===58||w===95||Xt(w)?(e.consume(w),T):R(w)}function R(w){return w===61?(e.consume(w),H):$e(w)?(a=R,K(w)):Le(w)?(e.consume(w),R):F(w)}function H(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,L):$e(w)?(a=H,K(w)):Le(w)?(e.consume(w),H):(e.consume(w),z)}function L(w){return w===o?(e.consume(w),o=void 0,N):w===null?n(w):$e(w)?(a=L,K(w)):(e.consume(w),L)}function z(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?F(w):(e.consume(w),z)}function N(w){return w===47||w===62||st(w)?F(w):n(w)}function D(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function K(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),W}function W(w){return Le(w)?We(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):M(w)}function M(w){return e.enter("htmlTextData"),a(w)}}const nd={name:"labelEnd",tokenize:uR,resolveTo:lR,resolveAll:cR},iR={tokenize:fR},aR={tokenize:dR},sR={tokenize:pR};function cR(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function lR(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Mn(s,e.slice(i+1,i+r+3)),s=Mn(s,[["enter",u,t]]),s=Mn(s,xc(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Mn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Mn(s,e.slice(a+1)),s=Mn(s,[["exit",c,t]]),Sn(e,i,e.length,s),e}function uR(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Wn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(iR,u,a?u:f)(p):p===91?e.attempt(aR,u,a?l:f)(p):a?u(p):f(p)}function l(p){return e.attempt(sR,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function fR(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return st(f)?Fa(e,i)(f):i(f)}function i(f){return f===41?u(f):Ib(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return st(f)?Fa(e,c)(f):u(f)}function s(f){return n(f)}function c(f){return f===34||f===39||f===40?Mb(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function l(f){return st(f)?Fa(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dR(e,t,n){const r=this;return o;function o(s){return Rb.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function pR(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const hR={name:"labelStartImage",tokenize:mR,resolveAll:nd.resolveAll};function mR(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const yR={name:"labelStartLink",tokenize:vR,resolveAll:nd.resolveAll};function vR(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const rd={name:"lineEnding",tokenize:gR};function gR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),We(e,t,"linePrefix")}}const Sc={name:"thematicBreak",tokenize:bR};function bR(e,t,n){let r=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||$e(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===o?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),Le(l)?We(e,s,"whitespace")(l):s(l))}}const dn={name:"list",tokenize:SR,continuation:{tokenize:ER},exit:$R},wR={tokenize:kR,partial:!0},xR={tokenize:_R,partial:!0};function SR(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const h=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Qf(d)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Sc,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(d)}return n(d)}function c(d){return Qf(d)&&++a<10?(e.consume(d),c):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(ja,r.interrupt?n:u,e.attempt(wR,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return Le(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ER(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ja,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,We(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!Le(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xR,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,We(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function _R(e,t,n){const r=this;return We(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function $R(e){e.exit(this.containerState.type)}function kR(e,t,n){const r=this;return We(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=r.events[r.events.length-1];return!Le(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Db={name:"setextUnderline",tokenize:TR,resolveTo:CR};function CR(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function TR(e,t,n){const r=this;let o;return i;function i(l){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Le(l)?We(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||$e(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const OR={tokenize:AR};function AR(e){const t=this,n=e.attempt(ja,r,e.attempt(this.parser.constructs.flowInitial,o,We(e,e.attempt(this.parser.constructs.flow,o,e.attempt(NI,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const PR={resolveAll:Fb()},IR=jb("string"),RR=jb("text");function jb(e){return{tokenize:t,resolveAll:Fb(e==="text"?MR:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return l(u)?(n.exit("data"),i(u)):(n.consume(u),c)}function l(u){if(u===null)return!0;const f=o[u];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Fb(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function MR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function NR(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:g,enter:b,exit:k,attempt:C(S),check:C($),interrupt:C($,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:h,defineSkip:m,write:f};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function f(R){return a=Mn(a,R),v(),a[a.length-1]!==null?[]:(P(t,0),l.events=xc(i,l.events,l),l.events)}function p(R,H){return jR(d(R),H)}function d(R){return DR(a,R)}function h(){const{line:R,column:H,offset:L,_index:z,_bufferIndex:N}=r;return{line:R,column:H,offset:L,_index:z,_bufferIndex:N}}function m(R){o[R.line]=R.column,T()}function v(){let R;for(;r._index<a.length;){const H=a[r._index];if(typeof H=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<H.length;)y(H.charCodeAt(r._bufferIndex));else y(H)}}function y(R){u=u(R)}function g(R){$e(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,T()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=R}function b(R,H){const L=H||{};return L.type=R,L.start=h(),l.events.push(["enter",L,l]),s.push(L),L}function k(R){const H=s.pop();return H.end=h(),l.events.push(["exit",H,l]),H}function S(R,H){P(R,H.from)}function $(R,H){H.restore()}function C(R,H){return L;function L(z,N,D){let K,W,M,w;return Array.isArray(z)?V(z):"tokenize"in z?V([z]):U(z);function U(re){return le;function le(pe){const me=pe!==null&&re[pe],ce=pe!==null&&re.null,Q=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return V(Q)(pe)}}function V(re){return K=re,W=0,re.length===0?D:_(re[W])}function _(re){return le;function le(pe){return w=F(),M=re,re.partial||(l.currentConstruct=re),re.name&&l.parser.constructs.disable.null.includes(re.name)?ae():re.tokenize.call(H?Object.assign(Object.create(l),H):l,c,J,ae)(pe)}}function J(re){return R(M,w),N}function ae(re){return w.restore(),++W<K.length?_(K[W]):D}}}function P(R,H){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&Sn(l.events,H,l.events.length-H,R.resolve(l.events.slice(H),l)),R.resolveTo&&(l.events=R.resolveTo(l.events,l))}function F(){const R=h(),H=l.previous,L=l.currentConstruct,z=l.events.length,N=Array.from(s);return{restore:D,from:z};function D(){r=R,l.previous=H,l.currentConstruct=L,l.events.length=z,s=N,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function DR(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function jR(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
27
|
+
Check the top-level render call using <`+ye+">.")}return ne}}function Dt(A,ne){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var ye=mt(ne);if(it[ye])return;it[ye]=!0;var Ie="";A&&A._owner&&A._owner!==wn.current&&(Ie=" It was passed a child from "+j(A._owner.type)+"."),er(A),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,Ie),er(null)}}function jt(A,ne){{if(typeof A!="object")return;if(ke(A))for(var ye=0;ye<A.length;ye++){var Ie=A[ye];Tr(Ie)&&Dt(Ie,ne)}else if(Tr(A))A._store&&(A._store.validated=!0);else if(A){var Qe=v(A);if(typeof Qe=="function"&&Qe!==A.entries)for(var ft=Qe.call(A),Ke;!(Ke=ft.next()).done;)Tr(Ke.value)&&Dt(Ke.value,ne)}}}function Zt(A){{var ne=A.type;if(ne==null||typeof ne=="string")return;var ye;if(typeof ne=="function")ye=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===c||ne.$$typeof===f))ye=ne.propTypes;else return;if(ye){var Ie=j(ne);xe(ye,A.props,"prop",Ie,A)}else if(ne.PropTypes!==void 0&&!Gr){Gr=!0;var Qe=j(ne);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(A){{for(var ne=Object.keys(A.props),ye=0;ye<ne.length;ye++){var Ie=ne[ye];if(Ie!=="children"&&Ie!=="key"){er(A),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ie),er(null);break}}A.ref!==null&&(er(A),g("Invalid attribute `ref` supplied to `React.Fragment`."),er(null))}}function Fn(A,ne,ye,Ie,Qe,ft){{var Ke=T(A);if(!Ke){var He="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(He+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fn=Zr(Qe);fn?He+=fn:He+=tr();var St;A===null?St="null":ke(A)?St="array":A!==void 0&&A.$$typeof===t?(St="<"+(j(A.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):St=typeof A,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",St,He)}var Ct=ht(A,ne,ye,Qe,ft);if(Ct==null)return Ct;if(Ke){var Ln=ne.children;if(Ln!==void 0)if(Ie)if(ke(Ln)){for(var ha=0;ha<Ln.length;ha++)jt(Ln[ha],A);Object.freeze&&Object.freeze(Ln)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else jt(Ln,A)}return A===r?Ft(Ct):Zt(Ct),Ct}}function nr(A,ne,ye){return Fn(A,ne,ye,!0)}function Oo(A,ne,ye){return Fn(A,ne,ye,!1)}var mce=Oo,yce=nr;Aa.Fragment=r,Aa.jsx=mce,Aa.jsxs=yce}()),Aa}process.env.NODE_ENV==="production"?If.exports=fA():If.exports=dA();var L=If.exports;function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}function Rf(e,t=[]){let n=[];function r(i,a){const s=E.createContext(a),c=n.length;n=[...n,a];function l(f){const{scope:p,children:d,...h}=f,m=(p==null?void 0:p[e][c])||s,v=E.useMemo(()=>h,Object.values(h));return E.createElement(m.Provider,{value:v},d)}function u(f,p){const d=(p==null?void 0:p[e][c])||s,h=E.useContext(d);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=n.map(a=>E.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,pA(o,...t)]}function pA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function to(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Pa=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function hA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yg(...e){return t=>e.forEach(n=>hA(n,t))}function Mo(...e){return E.useCallback(yg(...e),e)}const Mf=E.forwardRef((e,t)=>{const{children:n,...r}=e,o=E.Children.toArray(n),i=o.find(yA);if(i){const a=i.props.children,s=o.map(c=>c===i?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:c);return E.createElement(Nf,no({},r,{ref:t}),E.isValidElement(a)?E.cloneElement(a,void 0,s):null)}return E.createElement(Nf,no({},r,{ref:t}),n)});Mf.displayName="Slot";const Nf=E.forwardRef((e,t)=>{const{children:n,...r}=e;return E.isValidElement(n)?E.cloneElement(n,{...vA(r,n.props),ref:t?yg(t,n.ref):n.ref}):E.Children.count(n)>1?E.Children.only(null):null});Nf.displayName="SlotClone";const mA=({children:e})=>E.createElement(E.Fragment,null,e);function yA(e){return E.isValidElement(e)&&e.type===mA}function vA(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=E.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Mf:t;return E.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),E.createElement(s,no({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gA(e,t){e&&rr.flushSync(()=>e.dispatchEvent(t))}const vg="Avatar",[bA,Ace]=Rf(vg),[wA,gg]=bA(vg),bg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=E.useState("idle");return E.createElement(wA,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i},E.createElement(In.span,Tt({},r,{ref:t})))}),xA="AvatarImage",wg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=gg(xA,n),s=EA(r),c=to(l=>{o(l),a.onImageLoadingStatusChange(l)});return Pa(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?E.createElement(In.img,Tt({},i,{ref:t,src:r})):null}),SA="AvatarFallback",xg=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=gg(SA,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&i.imageLoadingStatus!=="loaded"?E.createElement(In.span,Tt({},o,{ref:t})):null});function EA(e){const[t,n]=E.useState("idle");return E.useEffect(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function Df(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(c=>c+c).join(""));const o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function _A(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const $A=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Sg(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const kA=2.4,CA=.2126729,TA=.7151522,OA=.072175,AA=.56,PA=.57,IA=.62,RA=.65,mc=.022,Eg=1.414,MA=1.14,NA=1.14,DA=.035991,jA=.035991,FA=27.7847239587675,LA=27.7847239587675,_g=.027,$g=.027,kg=.001,BA=5e-4;function Cg(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**kA;return CA*o(t)+TA*o(n)+OA*o(r)}function Tg(e,t){if(!e||!t)return 0;let n=Cg(Df(e)),r=Cg(Df(t)),o=0,i=0;return n=n>mc?n:n+(mc-n)**Eg,r=r>mc?r:r+(mc-r)**Eg,Math.abs(r-n)<BA?0:(r>n?(o=(r**AA-n**PA)*MA,i=o<kg?0:o<DA?o-o*FA*_g:o-_g):(o=(r**RA-n**IA)*NA,i=o>-kg?0:o>-jA?o-o*LA*$g:o+$g),Math.abs(i*100))}let jf=class{constructor(){he(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var o;(o=this.eventMap[t])==null||o.delete(n)}}emit(t,n){var r,o;(r=this.eventMap[t])==null||r.forEach(i=>{i(n)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:n})})}};const UA=new jf;function Og(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function Ag(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",f="month",p="quarter",d="year",h="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var D=["th","st","nd","rd"],F=U%100;return"["+U+(D[(F-20)%10]||D[F]||D[0])+"]"}},b=function(U,D,F){var K=String(U);return!K||K.length>=D?U:""+Array(D+1-K.length).join(F)+U},k={s:b,z:function(U){var D=-U.utcOffset(),F=Math.abs(D),K=Math.floor(F/60),V=F%60;return(D<=0?"+":"-")+b(K,2,"0")+":"+b(V,2,"0")},m:function U(D,F){if(D.date()<F.date())return-U(F,D);var K=12*(F.year()-D.year())+(F.month()-D.month()),V=D.clone().add(K,f),N=F-V<0,w=D.clone().add(K+(N?-1:1),f);return+(-(K+(F-V)/(N?V-w:w-V))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:f,y:d,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},S="en",$={};$[S]=g;var O="$isDayjsObject",I=function(U){return U instanceof R||!(!U||!U[O])},B=function U(D,F,K){var V;if(!D)return S;if(typeof D=="string"){var N=D.toLowerCase();$[N]&&(V=N),F&&($[N]=F,V=N);var w=D.split("-");if(!V&&w.length>1)return U(w[0])}else{var q=D.name;$[q]=D,V=q}return!K&&V&&(S=V),V||!K&&S},T=function(U,D){if(I(U))return U.clone();var F=typeof D=="object"?D:{};return F.date=U,F.args=arguments,new R(F)},M=k;M.l=B,M.i=I,M.w=function(U,D){return T(U,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var R=function(){function U(F){this.$L=B(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var D=U.prototype;return D.parse=function(F){this.$d=function(K){var V=K.date,N=K.utc;if(V===null)return new Date(NaN);if(M.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var w=V.match(v);if(w){var q=w[2]-1||0,W=(w[7]||"0").substring(0,3);return N?new Date(Date.UTC(w[1],q,w[3]||1,w[4]||0,w[5]||0,w[6]||0,W)):new Date(w[1],q,w[3]||1,w[4]||0,w[5]||0,w[6]||0,W)}}return new Date(V)}(F),this.init()},D.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},D.$utils=function(){return M},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(F,K){var V=T(F);return this.startOf(K)<=V&&V<=this.endOf(K)},D.isAfter=function(F,K){return T(F)<this.startOf(K)},D.isBefore=function(F,K){return this.endOf(K)<T(F)},D.$g=function(F,K,V){return M.u(F)?this[K]:this.set(V,F)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(F,K){var V=this,N=!!M.u(K)||K,w=M.p(F),q=function(me,ce){var Q=M.w(V.$u?Date.UTC(V.$y,ce,me):new Date(V.$y,ce,me),V);return N?Q:Q.endOf(l)},W=function(me,ce){return M.w(V.toDate()[me].apply(V.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ce)),V)},_=this.$W,J=this.$M,ae=this.$D,re="set"+(this.$u?"UTC":"");switch(w){case d:return N?q(1,0):q(31,11);case f:return N?q(1,J):q(0,J+1);case u:var le=this.$locale().weekStart||0,pe=(_<le?_+7:_)-le;return q(N?ae-pe:ae+(6-pe),J);case l:case h:return W(re+"Hours",0);case c:return W(re+"Minutes",1);case s:return W(re+"Seconds",2);case a:return W(re+"Milliseconds",3);default:return this.clone()}},D.endOf=function(F){return this.startOf(F,!1)},D.$set=function(F,K){var V,N=M.p(F),w="set"+(this.$u?"UTC":""),q=(V={},V[l]=w+"Date",V[h]=w+"Date",V[f]=w+"Month",V[d]=w+"FullYear",V[c]=w+"Hours",V[s]=w+"Minutes",V[a]=w+"Seconds",V[i]=w+"Milliseconds",V)[N],W=N===l?this.$D+(K-this.$W):K;if(N===f||N===d){var _=this.clone().set(h,1);_.$d[q](W),_.init(),this.$d=_.set(h,Math.min(this.$D,_.daysInMonth())).$d}else q&&this.$d[q](W);return this.init(),this},D.set=function(F,K){return this.clone().$set(F,K)},D.get=function(F){return this[M.p(F)]()},D.add=function(F,K){var V,N=this;F=Number(F);var w=M.p(K),q=function(J){var ae=T(N);return M.w(ae.date(ae.date()+Math.round(J*F)),N)};if(w===f)return this.set(f,this.$M+F);if(w===d)return this.set(d,this.$y+F);if(w===l)return q(1);if(w===u)return q(7);var W=(V={},V[s]=r,V[c]=o,V[a]=n,V)[w]||1,_=this.$d.getTime()+F*W;return M.w(_,this)},D.subtract=function(F,K){return this.add(-1*F,K)},D.format=function(F){var K=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var N=F||"YYYY-MM-DDTHH:mm:ssZ",w=M.z(this),q=this.$H,W=this.$m,_=this.$M,J=V.weekdays,ae=V.months,re=V.meridiem,le=function(ce,Q,G,fe){return ce&&(ce[Q]||ce(K,N))||G[Q].slice(0,fe)},pe=function(ce){return M.s(q%12||12,ce,"0")},me=re||function(ce,Q,G){var fe=ce<12?"AM":"PM";return G?fe.toLowerCase():fe};return N.replace(y,function(ce,Q){return Q||function(G){switch(G){case"YY":return String(K.$y).slice(-2);case"YYYY":return M.s(K.$y,4,"0");case"M":return _+1;case"MM":return M.s(_+1,2,"0");case"MMM":return le(V.monthsShort,_,ae,3);case"MMMM":return le(ae,_);case"D":return K.$D;case"DD":return M.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return le(V.weekdaysMin,K.$W,J,2);case"ddd":return le(V.weekdaysShort,K.$W,J,3);case"dddd":return J[K.$W];case"H":return String(q);case"HH":return M.s(q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return me(q,W,!0);case"A":return me(q,W,!1);case"m":return String(W);case"mm":return M.s(W,2,"0");case"s":return String(K.$s);case"ss":return M.s(K.$s,2,"0");case"SSS":return M.s(K.$ms,3,"0");case"Z":return w}return null}(ce)||w.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(F,K,V){var N,w=this,q=M.p(K),W=T(F),_=(W.utcOffset()-this.utcOffset())*r,J=this-W,ae=function(){return M.m(w,W)};switch(q){case d:N=ae()/12;break;case f:N=ae();break;case p:N=ae()/3;break;case u:N=(J-_)/6048e5;break;case l:N=(J-_)/864e5;break;case c:N=J/o;break;case s:N=J/r;break;case a:N=J/n;break;default:N=J}return V?N:M.a(N)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return $[this.$L]},D.locale=function(F,K){if(!F)return this.$L;var V=this.clone(),N=B(F,K,!0);return N&&(V.$L=N),V},D.clone=function(){return M.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},U}(),j=R.prototype;return T.prototype=j,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",f],["$y",d],["$D",h]].forEach(function(U){j[U[1]]=function(D){return this.$g(D,U[0],U[1])}}),T.extend=function(U,D){return U.$i||(U(D,R,T),U.$i=!0),T},T.locale=B,T.isDayjs=I,T.unix=function(U){return T(1e3*U)},T.en=$[S],T.Ls=$,T.p={},T})})(Pg);var zA=Pg.exports;const yc=Ue(zA);var Ig={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(Ig);var qA=Ig.exports;const HA=Ue(qA);var Rg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Se,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(Rg);var VA=Rg.exports;const WA=Ue(VA);yc.extend(HA),yc.extend(WA);function KA(e,t="day"){if(!e||e.length===0)return[];const n=[];n.push(Mg(e[0].timestamp));for(let r=0;r<e.length;r++)if(n.push(e[r]),r+1<e.length){const o=e[r].timestamp,i=e[r+1].timestamp;yc(o).isSame(i,t)||n.push(Mg(i))}return n}function Mg(e){return{id:dc(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:GA(e)}}}function GA(e,t=!1){const n=yc(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function ZA(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function YA(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function JA(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function XA(e,t){return e.map(n=>Math.round(n*t))}const Ia=e=>t=>JA(t,e),Ra=e=>t=>XA(t,e),QA={50:Ia(.95),100:Ia(.9),200:Ia(.75),300:Ia(.6),400:Ia(.3),500:e=>e,600:Ra(.9),700:Ra(.6),800:Ra(.45),900:Ra(.3),950:Ra(.2)};function Ng(e,t=QA){const n={},r=ZA(e);for(const[o,i]of Object.entries(t))n[o]=YA(i(r));return n}const fi=x.object({title:x.string().optional(),link:x.string().optional()}),Ff=x.object({color:x.string().optional(),variant:x.enum(["soft","solid"]).optional(),themeMode:x.enum(["light","dark"]).optional(),fontFamily:x.enum(["rubik","inter","ibm","fira"]).optional(),radius:x.number().min(.5).max(4).optional()}),Dg=x.object({composerPlaceholder:x.string().optional(),botName:x.string().optional(),botAvatar:x.string().optional(),botDescription:x.string().optional(),website:fi.optional(),email:fi.optional(),phone:fi.optional(),privacyPolicy:fi.optional(),termsOfService:fi.optional(),showPoweredBy:x.boolean().optional()}).merge(Ff),jg=x.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Fg=x.object({}).passthrough().transform(e=>e),ue=x.object({className:x.string().optional(),style:Fg.optional()}),vc=x.object({container:ue.optional(),image:ue.optional(),fallback:ue.optional()}),Lg=x.object({button:ue.optional(),text:x.record(jg,ue.optional()),image:x.object({image:ue.optional(),placeholder:ue.optional()}).optional(),audio:ue.optional(),video:ue.optional(),file:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),location:x.object({container:ue.optional(),title:ue.optional(),icon:ue.optional()}).optional(),column:ue.optional(),row:ue.optional(),bubble:ue.optional(),carousel:x.object({container:ue.optional(),slidesContainer:ue.optional(),backButton:ue.optional(),nextButton:ue.optional()}).optional(),dropdown:x.object({button:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional()}).optional(),content:x.object({container:ue.optional(),item:ue.optional()}).optional()}).optional()}),Bg=x.object({container:ue.optional(),modal:x.object({overlay:ue.optional(),container:ue.optional(),dialog:x.object({container:ue.optional(),title:x.object({container:ue.optional(),text:ue.optional(),closeIcon:ue.optional()}).optional(),content:ue.optional(),newConversation:x.object({text:ue.optional(),button:ue.optional()}).optional()}).optional()}).optional(),notification:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),icon:ue.optional(),closeIcon:ue.optional()}).optional(),header:x.object({container:ue.optional(),content:x.object({container:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),actions:x.object({container:ue.optional(),icons:ue.optional()}).optional()}),expandedContent:x.object({container:ue.optional(),group:ue.optional(),descriptionItems:x.object({container:ue.optional(),icon:ue.optional(),text:ue.optional(),link:ue.optional(),poweredBy:ue.optional()}).optional()}).optional(),description:x.object({container:ue.optional(),title:ue.optional(),subtitle:ue.optional()}).optional(),newConversationIcon:ue.optional()}).optional(),composer:x.object({container:ue.optional(),input:ue.optional(),uploadButton:x.object({container:ue.optional(),icon:ue.optional()}).optional(),button:x.object({container:ue.optional(),icon:ue.optional()}).optional()}).optional(),fab:x.object({icon:ue.optional(),container:ue.optional()}).optional(),messageList:x.object({scrollbar:x.object({container:ue.optional(),viewport:ue.optional(),thumb:ue.optional(),corner:ue.optional(),background:ue.optional()}).optional(),container:ue.optional(),marquee:x.object({content:ue.optional(),title:ue.optional(),description:ue.optional(),avatar:vc.optional(),container:ue.optional()}).optional(),scrollDownButton:x.object({container:ue.optional(),button:ue.optional(),icon:ue.optional()}).optional()}).optional(),message:x.object({container:ue.optional(),avatar:vc.optional(),blocks:Lg.optional()}).optional(),loadingIndicator:x.object({container:ue.optional(),loader:ue.optional()}).optional()}),Ug=x.enum(["opened","closed","initial"]),zg=x.object({name:x.string().optional(),pictureUrl:x.string().optional(),data:x.record(x.unknown()).optional()}),qg=x.enum(["messaging","pushpin"]),Hg=x.object({configuration:Dg.optional().catch(void 0),theme:Bg.optional().catch(void 0),style:x.string().optional().catch(void 0),user:zg.optional().catch(void 0)}),eP=Hg.extend({clientId:x.string(),botId:x.string(),selector:x.string().optional().catch(void 0),webchatScriptUrl:x.string().optional().catch(void 0),fabScriptUrl:x.string().optional().catch(void 0),messagingUrl:x.string().optional().catch(void 0),pushpinUrl:x.string().optional().catch(void 0),clientMode:qg.optional().catch(void 0),defaultState:Ug.optional().catch(void 0)});function Vg(e){const{fontFamily:t,radius:n,themeMode:r,variant:o,color:i}=Ff.parse(e);let a={},s={};if(i){const u=Ng(i),f=r==="dark"?Sg(u):u,p=Ng(_A($A(Df(i)))),d=r==="dark"?Sg(p):p,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((v,[y,g])=>({...v,[`--bpPrimary-${y}`]:g}),{});const m=Object.entries({...d,1:h}).reduce((v,[y,g])=>({...v,[`--bpGray-${y}`]:g}),{});a={...s,...m}}n&&(a={...a,"--bpRadius-scale":n.toString()});const c=s?Tg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Tg(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return a={...a,...l},Og(":root",a)+(t?Og(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const Lf=E.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=Ag(e??"",15);return L.jsxs(bg,{ref:a,"data-color":s,...n,...i,children:[L.jsx(wg,{src:t,...r}),L.jsx(xg,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function Pce(){}function Ice(){}function tP(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oP={};function Wg(e,t){return((t||oP).jsx?rP:nP).test(e)}const iP=/[ \t\n\f\r]/g;function aP(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(iP,"")===""}class Ma{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ma.prototype.property={},Ma.prototype.normal={},Ma.prototype.space=null;function Gg(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ma(n,r,t)}function Bf(e){return e.toLowerCase()}class Rn{constructor(t,n){this.property=t,this.attribute=n}}Rn.prototype.space=null,Rn.prototype.boolean=!1,Rn.prototype.booleanish=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.number=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.spaceSeparated=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.defined=!1;let sP=0;const je=No(),Et=No(),Zg=No(),ie=No(),dt=No(),di=No(),xn=No();function No(){return 2**++sP}const Uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Et,commaOrSpaceSeparated:xn,commaSeparated:di,number:ie,overloadedBoolean:Zg,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Uf);class qf extends Rn{constructor(t,n,r,o){let i=-1;if(super(t,n),Yg(this,"space",o),typeof r=="number")for(;++i<zf.length;){const a=zf[i];Yg(this,zf[i],(r&Uf[a])===Uf[a])}}}qf.prototype.defined=!0;function Yg(e,t,n){n&&(e[t]=n)}const cP={}.hasOwnProperty;function pi(e){const t={},n={};let r;for(r in e.properties)if(cP.call(e.properties,r)){const o=e.properties[r],i=new qf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Bf(r)]=r,n[Bf(i.attribute)]=r}return new Ma(t,n,e.space)}const Jg=pi({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Xg=pi({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Qg(e,t){return t in e?e[t]:t}function eb(e,t){return Qg(e,t.toLowerCase())}const tb=pi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:eb,properties:{xmlns:null,xmlnsXLink:null}}),nb=pi({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:dt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:ie,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:dt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Et,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),lP=pi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:eb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:di,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:dt,autoFocus:je,autoPlay:je,capture:je,charSet:null,checked:je,cite:null,className:dt,cols:ie,colSpan:null,content:null,contentEditable:Et,controls:je,controlsList:dt,coords:ie|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Zg,draggable:Et,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:dt,height:ie,hidden:je,high:ie,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:dt,itemRef:dt,itemScope:je,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:ie,pattern:null,ping:dt,placeholder:null,playsInline:je,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:dt,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:dt,scope:null,scoped:je,seamless:je,selected:je,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Et,width:ie,wrap:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ie,security:null,unselectable:null}}),uP=pi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Qg,properties:{about:xn,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:di,g2:di,glyphName:di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xn,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xn,to:null,transform:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),fP=/^data[-\w.:]+$/i,rb=/-[a-z]/g,dP=/[A-Z]/g;function pP(e,t){const n=Bf(t);let r=t,o=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fP.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(rb,mP);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!rb.test(i)){let a=i.replace(dP,hP);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=qf}return new o(r,t)}function hP(e){return"-"+e.toLowerCase()}function mP(e){return e.charAt(1).toUpperCase()}const yP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vP=Gg([Xg,Jg,tb,nb,lP],"html"),Hf=Gg([Xg,Jg,tb,nb,uP],"svg");function gP(e){return e.join(" ").trim()}var ob={},ib=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,bP=/\n/g,wP=/^\s*/,xP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,SP=/^:\s*/,EP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_P=/^[;\s]*/,$P=/^\s+|\s+$/g,kP=`
|
|
28
|
+
`,ab="/",sb="*",Do="",CP="comment",TP="declaration",OP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(bP);m&&(n+=m.length);var v=h.lastIndexOf(kP);r=~v?h.length-v:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),l(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(h){var m=h.exec(e);if(m){var v=m[0];return o(v),e=e.slice(v.length),m}}function l(){c(wP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=i();if(!(ab!=e.charAt(0)||sb!=e.charAt(1))){for(var m=2;Do!=e.charAt(m)&&(sb!=e.charAt(m)||ab!=e.charAt(m+1));)++m;if(m+=2,Do===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return r+=2,o(v),e=e.slice(m),r+=2,h({type:CP,comment:v})}}function p(){var h=i(),m=c(xP);if(m){if(f(),!c(SP))return s("property missing ':'");var v=c(EP),y=h({type:TP,property:cb(m[0].replace(ib,Do)),value:v?cb(v[0].replace(ib,Do)):Do});return c(_P),y}}function d(){var h=[];u(h);for(var m;m=p();)m!==!1&&(h.push(m),u(h));return h}return l(),d()};function cb(e){return e?e.replace($P,Do):Do}var AP=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ob,"__esModule",{value:!0});var PP=AP(OP);function IP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,PP.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}var lb=ob.default=IP;const RP=lb.default||lb,ub=fb("end"),Vf=fb("start");function fb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function MP(e){const t=Vf(e),n=ub(e);if(t&&n)return{start:t,end:n}}function Na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?db(e.position):"start"in e||"end"in e?db(e):"line"in e||"column"in e?Wf(e):""}function Wf(e){return pb(e&&e.line)+":"+pb(e&&e.column)}function db(e){return Wf(e&&e.start)+"-"+Wf(e&&e.end)}function pb(e){return e&&typeof e=="number"?e:1}class Jt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Na(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const Kf={}.hasOwnProperty,NP=new Map,DP=/[A-Z]/g,jP=/-([a-z])/g,FP=new Set(["table","tbody","thead","tfoot","tr"]),LP=new Set(["td","th"]),hb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=GP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=KP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Hf:vP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=mb(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function mb(e,t,n){if(t.type==="element")return UP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return HP(e,t,n);if(t.type==="mdxjsEsm")return qP(e,t);if(t.type==="root")return VP(e,t,n);if(t.type==="text")return WP(e,t)}function UP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Hf,e.schema=o),e.ancestors.push(t);const i=vb(e,t.tagName,!1),a=ZP(e,t);let s=Zf(e,t);return FP.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!aP(c):!0})),yb(e,a,i,t),Gf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function zP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Da(e,t.position)}function qP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Da(e,t.position)}function HP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Hf,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:vb(e,t.name,!0),a=YP(e,t),s=Zf(e,t);return yb(e,a,i,t),Gf(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function VP(e,t,n){const r={};return Gf(r,Zf(e,t)),e.create(t,e.Fragment,r,n)}function WP(e,t){return t.value}function yb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function KP(e,t,n){return r;function r(o,i,a,s){const l=Array.isArray(a.children)?n:t;return s?l(i,a,s):l(i,a)}}function GP(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),c=Vf(r);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ZP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Kf.call(t.properties,o)){const i=JP(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&LP.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function YP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Da(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Da(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Zf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:NP;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=mb(e,i,a);s!==void 0&&n.push(s)}return n}function JP(e,t,n){const r=pP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tP(n):gP(n)),r.property==="style"){let o=typeof n=="object"?n:XP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=QP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?yP[r.property]||r.property:r.attribute,n]}}function XP(e,t){const n={};try{RP(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Jt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=hb+"#cannot-parse-style-attribute",a}}return n;function r(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(jP,tI)),n[a]=i}}function vb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Wg(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Wg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Kf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Da(e)}function Da(e,t){const n=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QP(e){const t={};let n;for(n in e)Kf.call(e,n)&&(t[eI(n)]=e[n]);return t}function eI(e){let t=e.replace(DP,nI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tI(e,t){return t.toUpperCase()}function nI(e){return"-"+e.toLowerCase()}const Yf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rI={};function Jf(e,t){const n=t||rI,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gb(e,r,o)}function gb(e,t,n){if(oI(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bb(e.children,t,n)}return Array.isArray(e)?bb(e,t,n):""}function bb(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=gb(e[o],t,n);return r.join("")}function oI(e){return!!(e&&typeof e=="object")}const wb=document.createElement("i");function Xf(e){const t="&"+e+";";wb.innerHTML=t;const n=wb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Sn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Mn(e,t){return e.length>0?(Sn(e,e.length,0,t),e):t}const xb={}.hasOwnProperty;function Sb(e){const t={};let n=-1;for(;++n<e.length;)iI(t,e[n]);return t}function iI(e,t){let n;for(n in t){const o=(xb.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){xb.call(o,a)||(o[a]=[]);const s=i[a];aI(o[a],Array.isArray(s)?s:s?[s]:[])}}}function aI(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Sn(e,0,0,r)}function Eb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=ro(/[A-Za-z]/),Xt=ro(/[\dA-Za-z]/),sI=ro(/[#-'*+\--9=?A-Z^-~]/);function gc(e){return e!==null&&(e<32||e===127)}const Qf=ro(/\d/),cI=ro(/[\dA-Fa-f]/),lI=ro(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const bc=ro(/\p{P}|\p{S}/u),jo=ro(/\s/);function ro(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Xt(e.charCodeAt(n+1))&&Xt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ve(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return Le(c)?(e.enter(n),s(c)):t(c)}function s(c){return Le(c)&&i++<o?(e.consume(c),s):(e.exit(n),t(c))}}const uI={tokenize:fI};function fI(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ve(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const dI={tokenize:pI},_b={tokenize:hI};function pI(e){const t=this,n=[];let r=0,o,i,a;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,l)(b)}return l(b)}function c(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&g();const k=t.events.length;let S=k,$;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){$=t.events[S][1].end;break}y(r);let O=k;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},$),O++;return Sn(t.events,S+1,0,t.events.slice(k)),t.events.length=O,l(b)}return s(b)}function l(b){if(r===n.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_b,u,f)(b)}function u(b){return o&&g(),y(r),p(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(_b,d,h)(b)}function d(b){return r++,n.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&g(),y(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),m(b)}function m(b){if(b===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(b);return}return $e(b)?(e.consume(b),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function v(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(S),t.parser.lazy[b.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<a&&(!o.events[$][1].end||o.events[$][1].end.offset>a))return;const O=t.events.length;let I=O,B,T;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(B){T=t.events[I][1].end;break}B=!0}for(y(r),$=O;$<t.events.length;)t.events[$][1].end=Object.assign({},T),$++;Sn(t.events,I+1,0,t.events.slice(O)),t.events.length=$}}function y(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function hI(e,t,n){return Ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wc(e){if(e===null||st(e)||jo(e))return 1;if(bc(e))return 2}function xc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ed={name:"attention",tokenize:yI,resolveAll:mI};function mI(e,t){let n=-1,r,o,i,a,s,c,l,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);$b(f,-c),$b(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Mn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Mn(l,xc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Sn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function yI(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wc(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=wc(c),f=!u||u===2&&o||n.includes(c),p=!o||o===2&&u||n.includes(r);return l._open=!!(i===42?f:f&&(o||!p)),l._close=!!(i===42?p:p&&(u||!f)),t(c)}}function $b(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vI={name:"autolink",tokenize:gI};function gI(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return cn(d)?(e.consume(d),a):l(d)}function a(d){return d===43||d===45||d===46||Xt(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,c):(d===43||d===45||d===46||Xt(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function c(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||gc(d)?n(d):(e.consume(d),c)}function l(d){return d===64?(e.consume(d),u):sI(d)?(e.consume(d),l):n(d)}function u(d){return Xt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Xt(d))&&r++<63){const h=d===45?p:f;return e.consume(d),h}return n(d)}}const ja={tokenize:bI,partial:!0};function bI(e,t,n){return r;function r(i){return Le(i)?Ve(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||$e(i)?t(i):n(i)}}const kb={name:"blockQuote",tokenize:wI,continuation:{tokenize:xI},exit:SI};function wI(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return Le(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function xI(e,t,n){const r=this;return o;function o(a){return Le(a)?Ve(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(kb,t,n)(a)}}function SI(e){e.exit("blockQuote")}const Cb={name:"characterEscape",tokenize:EI};function EI(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return lI(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Tb={name:"characterReference",tokenize:_I};function _I(e,t,n){const r=this;let o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Xt,u(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=cI,u):(e.enter("characterReferenceValue"),i=7,a=Qf,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===Xt&&!Xf(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Ob={tokenize:kI,partial:!0},Ab={name:"codeFenced",tokenize:$I,concrete:!0};function $I(e,t,n){const r=this,o={tokenize:S,partial:!0};let i=0,a=0,s;return c;function c($){return l($)}function l($){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u($)}function u($){return $===s?(a++,e.consume($),u):a<3?n($):(e.exit("codeFencedFenceSequence"),Le($)?Ve(e,f,"whitespace")($):f($))}function f($){return $===null||$e($)?(e.exit("codeFencedFence"),r.interrupt?t($):e.check(Ob,m,k)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p($))}function p($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f($)):Le($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,d,"whitespace")($)):$===96&&$===s?n($):(e.consume($),p)}function d($){return $===null||$e($)?f($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h($))}function h($){return $===null||$e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f($)):$===96&&$===s?n($):(e.consume($),h)}function m($){return e.attempt(o,k,v)($)}function v($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y}function y($){return i>0&&Le($)?Ve(e,g,"linePrefix",i+1)($):g($)}function g($){return $===null||$e($)?e.check(Ob,m,k)($):(e.enter("codeFlowValue"),b($))}function b($){return $===null||$e($)?(e.exit("codeFlowValue"),g($)):(e.consume($),b)}function k($){return e.exit("codeFenced"),t($)}function S($,O,I){let B=0;return T;function T(D){return $.enter("lineEnding"),$.consume(D),$.exit("lineEnding"),M}function M(D){return $.enter("codeFencedFence"),Le(D)?Ve($,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):R(D)}function R(D){return D===s?($.enter("codeFencedFenceSequence"),j(D)):I(D)}function j(D){return D===s?(B++,$.consume(D),j):B>=a?($.exit("codeFencedFenceSequence"),Le(D)?Ve($,U,"whitespace")(D):U(D)):I(D)}function U(D){return D===null||$e(D)?($.exit("codeFencedFence"),O(D)):I(D)}}}function kI(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const td={name:"codeIndented",tokenize:TI},CI={tokenize:OI,partial:!0};function TI(e,t,n){const r=this;return o;function o(l){return e.enter("codeIndented"),Ve(e,i,"linePrefix",4+1)(l)}function i(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?c(l):$e(l)?e.attempt(CI,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||$e(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function OI(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ve(e,i,"linePrefix",4+1)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):$e(a)?o(a):n(a)}}const AI={name:"codeText",tokenize:RI,resolve:PI,previous:II};function PI(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function II(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function RI(e,t,n){let r=0,o,i;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),l)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",l(f))}}function Pb(e){const t={};let n=-1,r,o,i,a,s,c,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,MI(e,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),s=e.slice(o,n),s.unshift(r),Sn(e,o,n-o+1,s))}}return!l}function MI(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,c=[],l={};let u,f,p=-1,d=n,h=0,m=0;const v=[m];for(;d;){for(;e[++o][1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),p=v.length;p--;){const y=s.slice(v[p],v[p+1]),g=i.pop();c.unshift([g,g+y.length-1]),Sn(e,g,2,y)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const NI={tokenize:FI,resolve:jI},DI={tokenize:LI,partial:!0};function jI(e){return Pb(e),e}function FI(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):$e(s)?e.check(DI,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function LI(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ve(e,i,"linePrefix")}function i(a){if(a===null||$e(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ib(e,t,n,r,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),p):y===null||y===32||y===41||gc(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function p(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||$e(y)?n(y):(e.consume(y),y===92?h:d)}function h(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function m(y){return!u&&(y===null||y===41||st(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<l&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||gc(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Rb(e,t,n,r,o,i){const a=this;let s=0,c;return l;function l(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(d){return s>999||d===null||d===91||d===93&&!c||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):$e(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||$e(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),c||(c=!Le(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Mb(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):n(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?n(p):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ve(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||$e(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function Fa(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Le(o)?Ve(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const BI={name:"definition",tokenize:zI},UI={tokenize:qI,partial:!0};function zI(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Rb.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),c):n(d)}function c(d){return st(d)?Fa(e,l)(d):l(d)}function l(d){return Ib(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(UI,f,f)(d)}function f(d){return Le(d)?Ve(e,p,"whitespace")(d):p(d)}function p(d){return d===null||$e(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function qI(e,t,n){return r;function r(s){return st(s)?Fa(e,o)(s):n(s)}function o(s){return Mb(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Le(s)?Ve(e,a,"whitespace")(s):a(s)}function a(s){return s===null||$e(s)?t(s):n(s)}}const HI={name:"hardBreakEscape",tokenize:VI};function VI(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return $e(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const WI={name:"headingAtx",tokenize:GI,resolve:KI};function KI(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Sn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function GI(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||st(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||$e(u)?(e.exit("atxHeading"),t(u)):Le(u)?Ve(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||st(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const ZI=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nb=["pre","script","style","textarea"],YI={name:"htmlFlow",tokenize:eR,resolveTo:QI,concrete:!0},JI={tokenize:nR,partial:!0},XI={tokenize:tR,partial:!0};function QI(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eR(e,t,n){const r=this;let o,i,a,s,c;return l;function l(_){return u(_)}function u(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),i=!0,m):_===63?(e.consume(_),o=3,r.interrupt?t:w):cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function p(_){return _===45?(e.consume(_),o=2,d):_===91?(e.consume(_),o=5,s=0,h):cn(_)?(e.consume(_),o=4,r.interrupt?t:w):n(_)}function d(_){return _===45?(e.consume(_),r.interrupt?t:w):n(_)}function h(_){const J="CDATA[";return _===J.charCodeAt(s++)?(e.consume(_),s===J.length?r.interrupt?t:R:h):n(_)}function m(_){return cn(_)?(e.consume(_),a=String.fromCharCode(_),v):n(_)}function v(_){if(_===null||_===47||_===62||st(_)){const J=_===47,ae=a.toLowerCase();return!J&&!i&&Nb.includes(ae)?(o=1,r.interrupt?t(_):R(_)):ZI.includes(a.toLowerCase())?(o=6,J?(e.consume(_),y):r.interrupt?t(_):R(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?g(_):b(_))}return _===45||Xt(_)?(e.consume(_),a+=String.fromCharCode(_),v):n(_)}function y(_){return _===62?(e.consume(_),r.interrupt?t:R):n(_)}function g(_){return Le(_)?(e.consume(_),g):T(_)}function b(_){return _===47?(e.consume(_),T):_===58||_===95||cn(_)?(e.consume(_),k):Le(_)?(e.consume(_),b):T(_)}function k(_){return _===45||_===46||_===58||_===95||Xt(_)?(e.consume(_),k):S(_)}function S(_){return _===61?(e.consume(_),$):Le(_)?(e.consume(_),S):b(_)}function $(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),c=_,O):Le(_)?(e.consume(_),$):I(_)}function O(_){return _===c?(e.consume(_),c=null,B):_===null||$e(_)?n(_):(e.consume(_),O)}function I(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||st(_)?S(_):(e.consume(_),I)}function B(_){return _===47||_===62||Le(_)?b(_):n(_)}function T(_){return _===62?(e.consume(_),M):n(_)}function M(_){return _===null||$e(_)?R(_):Le(_)?(e.consume(_),M):n(_)}function R(_){return _===45&&o===2?(e.consume(_),F):_===60&&o===1?(e.consume(_),K):_===62&&o===4?(e.consume(_),q):_===63&&o===3?(e.consume(_),w):_===93&&o===5?(e.consume(_),N):$e(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(JI,W,j)(_)):_===null||$e(_)?(e.exit("htmlFlowData"),j(_)):(e.consume(_),R)}function j(_){return e.check(XI,U,W)(_)}function U(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),D}function D(_){return _===null||$e(_)?j(_):(e.enter("htmlFlowData"),R(_))}function F(_){return _===45?(e.consume(_),w):R(_)}function K(_){return _===47?(e.consume(_),a="",V):R(_)}function V(_){if(_===62){const J=a.toLowerCase();return Nb.includes(J)?(e.consume(_),q):R(_)}return cn(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),V):R(_)}function N(_){return _===93?(e.consume(_),w):R(_)}function w(_){return _===62?(e.consume(_),q):_===45&&o===2?(e.consume(_),w):R(_)}function q(_){return _===null||$e(_)?(e.exit("htmlFlowData"),W(_)):(e.consume(_),q)}function W(_){return e.exit("htmlFlow"),t(_)}}function tR(e,t,n){const r=this;return o;function o(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function nR(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ja,t,n)}}const rR={name:"htmlText",tokenize:oR};function oR(e,t,n){const r=this;let o,i,a;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),S):w===63?(e.consume(w),b):cn(w)?(e.consume(w),I):n(w)}function l(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),i=0,h):cn(w)?(e.consume(w),g):n(w)}function u(w){return w===45?(e.consume(w),d):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),p):$e(w)?(a=f,K(w)):(e.consume(w),f)}function p(w){return w===45?(e.consume(w),d):f(w)}function d(w){return w===62?F(w):w===45?p(w):f(w)}function h(w){const q="CDATA[";return w===q.charCodeAt(i++)?(e.consume(w),i===q.length?m:h):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),v):$e(w)?(a=m,K(w)):(e.consume(w),m)}function v(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?F(w):w===93?(e.consume(w),y):m(w)}function g(w){return w===null||w===62?F(w):$e(w)?(a=g,K(w)):(e.consume(w),g)}function b(w){return w===null?n(w):w===63?(e.consume(w),k):$e(w)?(a=b,K(w)):(e.consume(w),b)}function k(w){return w===62?F(w):b(w)}function S(w){return cn(w)?(e.consume(w),$):n(w)}function $(w){return w===45||Xt(w)?(e.consume(w),$):O(w)}function O(w){return $e(w)?(a=O,K(w)):Le(w)?(e.consume(w),O):F(w)}function I(w){return w===45||Xt(w)?(e.consume(w),I):w===47||w===62||st(w)?B(w):n(w)}function B(w){return w===47?(e.consume(w),F):w===58||w===95||cn(w)?(e.consume(w),T):$e(w)?(a=B,K(w)):Le(w)?(e.consume(w),B):F(w)}function T(w){return w===45||w===46||w===58||w===95||Xt(w)?(e.consume(w),T):M(w)}function M(w){return w===61?(e.consume(w),R):$e(w)?(a=M,K(w)):Le(w)?(e.consume(w),M):B(w)}function R(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,j):$e(w)?(a=R,K(w)):Le(w)?(e.consume(w),R):(e.consume(w),U)}function j(w){return w===o?(e.consume(w),o=void 0,D):w===null?n(w):$e(w)?(a=j,K(w)):(e.consume(w),j)}function U(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?B(w):(e.consume(w),U)}function D(w){return w===47||w===62||st(w)?B(w):n(w)}function F(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function K(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return Le(w)?Ve(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):N(w)}function N(w){return e.enter("htmlTextData"),a(w)}}const nd={name:"labelEnd",tokenize:uR,resolveTo:lR,resolveAll:cR},iR={tokenize:fR},aR={tokenize:dR},sR={tokenize:pR};function cR(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function lR(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Mn(s,e.slice(i+1,i+r+3)),s=Mn(s,[["enter",u,t]]),s=Mn(s,xc(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Mn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Mn(s,e.slice(a+1)),s=Mn(s,[["exit",c,t]]),Sn(e,i,e.length,s),e}function uR(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Vn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(iR,u,a?u:f)(p):p===91?e.attempt(aR,u,a?l:f)(p):a?u(p):f(p)}function l(p){return e.attempt(sR,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function fR(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return st(f)?Fa(e,i)(f):i(f)}function i(f){return f===41?u(f):Ib(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return st(f)?Fa(e,c)(f):u(f)}function s(f){return n(f)}function c(f){return f===34||f===39||f===40?Mb(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function l(f){return st(f)?Fa(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function dR(e,t,n){const r=this;return o;function o(s){return Rb.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function pR(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const hR={name:"labelStartImage",tokenize:mR,resolveAll:nd.resolveAll};function mR(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const yR={name:"labelStartLink",tokenize:vR,resolveAll:nd.resolveAll};function vR(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const rd={name:"lineEnding",tokenize:gR};function gR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ve(e,t,"linePrefix")}}const Sc={name:"thematicBreak",tokenize:bR};function bR(e,t,n){let r=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||$e(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===o?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),Le(l)?Ve(e,s,"whitespace")(l):s(l))}}const dn={name:"list",tokenize:SR,continuation:{tokenize:ER},exit:$R},wR={tokenize:kR,partial:!0},xR={tokenize:_R,partial:!0};function SR(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const h=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Qf(d)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Sc,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(d)}return n(d)}function c(d){return Qf(d)&&++a<10?(e.consume(d),c):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(ja,r.interrupt?n:u,e.attempt(wR,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return Le(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ER(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ja,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!Le(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xR,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ve(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function _R(e,t,n){const r=this;return Ve(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function $R(e){e.exit(this.containerState.type)}function kR(e,t,n){const r=this;return Ve(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=r.events[r.events.length-1];return!Le(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Db={name:"setextUnderline",tokenize:TR,resolveTo:CR};function CR(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function TR(e,t,n){const r=this;let o;return i;function i(l){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Le(l)?Ve(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||$e(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const OR={tokenize:AR};function AR(e){const t=this,n=e.attempt(ja,r,e.attempt(this.parser.constructs.flowInitial,o,Ve(e,e.attempt(this.parser.constructs.flow,o,e.attempt(NI,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const PR={resolveAll:Fb()},IR=jb("string"),RR=jb("text");function jb(e){return{tokenize:t,resolveAll:Fb(e==="text"?MR:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return l(u)?(n.exit("data"),i(u)):(n.consume(u),c)}function l(u){if(u===null)return!0;const f=o[u];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Fb(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function MR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function NR(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:g,enter:b,exit:k,attempt:O(S),check:O($),interrupt:O($,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:h,defineSkip:m,write:f};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function f(M){return a=Mn(a,M),v(),a[a.length-1]!==null?[]:(I(t,0),l.events=xc(i,l.events,l),l.events)}function p(M,R){return jR(d(M),R)}function d(M){return DR(a,M)}function h(){const{line:M,column:R,offset:j,_index:U,_bufferIndex:D}=r;return{line:M,column:R,offset:j,_index:U,_bufferIndex:D}}function m(M){o[M.line]=M.column,T()}function v(){let M;for(;r._index<a.length;){const R=a[r._index];if(typeof R=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<R.length;)y(R.charCodeAt(r._bufferIndex));else y(R)}}function y(M){u=u(M)}function g(M){$e(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,T()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=M}function b(M,R){const j=R||{};return j.type=M,j.start=h(),l.events.push(["enter",j,l]),s.push(j),j}function k(M){const R=s.pop();return R.end=h(),l.events.push(["exit",R,l]),R}function S(M,R){I(M,R.from)}function $(M,R){R.restore()}function O(M,R){return j;function j(U,D,F){let K,V,N,w;return Array.isArray(U)?W(U):"tokenize"in U?W([U]):q(U);function q(re){return le;function le(pe){const me=pe!==null&&re[pe],ce=pe!==null&&re.null,Q=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return W(Q)(pe)}}function W(re){return K=re,V=0,re.length===0?F:_(re[V])}function _(re){return le;function le(pe){return w=B(),N=re,re.partial||(l.currentConstruct=re),re.name&&l.parser.constructs.disable.null.includes(re.name)?ae():re.tokenize.call(R?Object.assign(Object.create(l),R):l,c,J,ae)(pe)}}function J(re){return M(N,w),D}function ae(re){return w.restore(),++V<K.length?_(K[V]):F}}}function I(M,R){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&Sn(l.events,R,l.events.length-R,M.resolve(l.events.slice(R),l)),M.resolveTo&&(l.events=M.resolveTo(l.events,l))}function B(){const M=h(),R=l.previous,j=l.currentConstruct,U=l.events.length,D=Array.from(s);return{restore:F,from:U};function F(){r=M,l.previous=R,l.currentConstruct=j,l.events.length=U,s=D,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function DR(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function jR(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
29
29
|
`;break}case-3:{a=`\r
|
|
30
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const FR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:BI},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:kb},flow:{35:VI,42:Sc,45:[Db,Sc],60:YI,61:Db,95:Sc,96:Ab,126:Ab},flowInitial:{[-2]:td,[-1]:td,32:td},insideSpan:{null:[ed,PR]},string:{38:Tb,92:Cb},text:{[-5]:rd,[-4]:rd,[-3]:rd,33:hR,38:Tb,42:ed,60:[vI,rR],91:yR,92:[HI,Cb],93:nd,95:ed,96:AI}},Symbol.toStringTag,{value:"Module"}));function LR(e){const n=Sb([FR,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(uI),document:o(dI),flow:o(OR),string:o(IR),text:o(RR)};return r;function o(i){return a;function a(s){return NR(r,i,s)}}}function BR(e){for(;!Pb(e););return e}const Lb=/[\0\t\n\r]/g;function UR(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const c=[];let l,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Lb.lastIndex=f,l=Lb.exec(i),p=l&&l.index!==void 0?l.index:i.length,d=i.charCodeAt(p),!l){t=i.slice(f);break}if(d===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(i.slice(f,p)),e+=p-f),d){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const zR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qR(e){return e.replace(zR,HR)}function HR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Eb(n.slice(i?2:1),i?16:10)}return Xf(n)||e}const Bb={}.hasOwnProperty;function WR(e,t,n){return typeof t!="string"&&(n=t,t=void 0),VR(n)(BR(LR(n).document().write(UR()(e,t,!0))))}function VR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(oe),autolinkProtocol:F,autolinkEmail:F,atxHeading:i(ve),blockQuote:i(me),characterEscape:F,characterReference:F,codeFenced:i(ce),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(ce,a),codeText:i(Q,a),codeTextData:F,data:F,codeFlowValue:F,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(fe),hardBreakEscape:i(_e),hardBreakTrailing:i(_e),htmlFlow:i(I,a),htmlFlowData:F,htmlText:i(I,a),htmlTextData:F,image:i(X),label:a,link:i(oe),listItem:i(xe),listItemValue:p,listOrdered:i(ee,f),listUnordered:i(ee),paragraph:i(we),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ve),strong:i(ke),thematicBreak:i(Oe)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:pe,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:re,codeFenced:c(v),codeFencedFence:m,codeFencedFenceInfo:d,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:c(y),codeText:c(N),codeTextData:T,data:T,definition:c(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(H),hardBreakTrailing:c(H),htmlFlow:c(L),htmlFlowData:T,htmlText:c(z),htmlTextData:T,image:c(K),label:M,labelText:W,lineEnding:R,link:c(D),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:J,resourceDestinationString:w,resourceTitleString:U,resource:V,setextHeading:c(P),setextHeadingLineSequence:C,setextHeadingText:$,strong:c(),thematicBreak:c()}};Ub(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let Z={type:"root",children:[]};const q={stack:[Z],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:n},te=[];let de=-1;for(;++de<B.length;)if(B[de][1].type==="listOrdered"||B[de][1].type==="listUnordered")if(B[de][0]==="enter")te.push(de);else{const Pe=te.pop();de=o(B,Pe,de)}for(de=-1;++de<B.length;){const Pe=t[B[de][0]];Bb.call(Pe,B[de][1].type)&&Pe[B[de][1].type].call(Object.assign({sliceSerialize:B[de][2].sliceSerialize},q),B[de][1])}if(q.tokenStack.length>0){const Pe=q.tokenStack[q.tokenStack.length-1];(Pe[1]||zb).call(q,void 0,Pe[0])}for(Z.position={start:oo(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:oo(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)Z=t.transforms[de](Z)||Z;return Z}function o(B,Z,q){let te=Z-1,de=-1,Pe=!1,Ce,Be,ut,Nt;for(;++te<=q;){const ot=B[te];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?de++:de--,Nt=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(Ce&&!Nt&&!de&&!ut&&(ut=te),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!de&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||de===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(Ce){let nt=te;for(Be=void 0;nt--;){const pt=B[nt];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;Be&&(B[Be][1].type="lineEndingBlank",Pe=!0),pt[1].type="lineEnding",Be=nt}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}ut&&(!Be||ut<Be)&&(Ce._spread=!0),Ce.end=Object.assign({},Be?B[Be][1].start:ot[1].end),B.splice(Be||te,0,["exit",Ce,ot[2]]),te++,q++}if(ot[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};Ce=nt,B.splice(te,0,["enter",nt,ot[2]]),te++,q++,ut=void 0,Nt=!0}}}return B[Z][1]._spread=Pe,q}function i(B,Z){return q;function q(te){s.call(this,B(te),te),Z&&Z.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(B,Z,q){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([Z,q]),B.position={start:oo(Z.start),end:void 0}}function c(B){return Z;function Z(q){B&&B.call(this,q),l.call(this,q)}}function l(B,Z){const q=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==B.type&&(Z?Z.call(this,B,te[0]):(te[1]||zb).call(this,B,te[0]));else throw new Error("Cannot close `"+B.type+"` ("+Na({start:B.start,end:B.end})+"): it’s not open");q.position.end=oo(B.end)}function u(){return Jf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(B){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function d(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=B}function h(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=B}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B.replace(/(\r?\n|\r)$/g,"")}function g(B){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=Wn(this.sliceSerialize(B)).toLowerCase()}function b(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.title=B}function k(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.url=B}function S(B){const Z=this.stack[this.stack.length-1];if(!Z.depth){const q=this.sliceSerialize(B).length;Z.depth=q}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function C(B){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function F(B){const q=this.stack[this.stack.length-1].children;let te=q[q.length-1];(!te||te.type!=="text")&&(te=Fe(),te.position={start:oo(B.start),end:void 0},q.push(te)),this.stack.push(te)}function T(B){const Z=this.stack.pop();Z.value+=this.sliceSerialize(B),Z.position.end=oo(B.end)}function R(B){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=Z.children[Z.children.length-1];q.position.end=oo(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(F.call(this,B),T.call(this,B))}function H(){this.data.atHardBreak=!0}function L(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function z(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function N(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.value=B}function D(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Z,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function K(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Z,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function W(B){const Z=this.sliceSerialize(B),q=this.stack[this.stack.length-2];q.label=qR(Z),q.identifier=Wn(Z).toLowerCase()}function M(){const B=this.stack[this.stack.length-1],Z=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const te=B.children;q.children=te}else q.alt=Z}function w(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.url=B}function U(){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.title=B}function V(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function J(B){const Z=this.resume(),q=this.stack[this.stack.length-1];q.label=Z,q.identifier=Wn(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ae(B){this.data.characterReferenceType=B.type}function re(B){const Z=this.sliceSerialize(B),q=this.data.characterReferenceType;let te;q?(te=Eb(Z,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Xf(Z);const de=this.stack.pop();de.value+=te,de.position.end=oo(B.end)}function le(B){T.call(this,B);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(B)}function pe(B){T.call(this,B);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(B)}function me(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function I(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function ee(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function xe(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function Oe(){return{type:"thematicBreak"}}}function oo(e){return{line:e.line,column:e.column,offset:e.offset}}function Ub(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ub(e,r):KR(e,r)}}function KR(e,t){let n;for(n in t)if(Bb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function GR(e){const t=this;t.parser=n;function n(r){return WR(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZR(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YR(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const FR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:BI},disable:{null:[]},document:{42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:kb},flow:{35:WI,42:Sc,45:[Db,Sc],60:YI,61:Db,95:Sc,96:Ab,126:Ab},flowInitial:{[-2]:td,[-1]:td,32:td},insideSpan:{null:[ed,PR]},string:{38:Tb,92:Cb},text:{[-5]:rd,[-4]:rd,[-3]:rd,33:hR,38:Tb,42:ed,60:[vI,rR],91:yR,92:[HI,Cb],93:nd,95:ed,96:AI}},Symbol.toStringTag,{value:"Module"}));function LR(e){const n=Sb([FR,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(uI),document:o(dI),flow:o(OR),string:o(IR),text:o(RR)};return r;function o(i){return a;function a(s){return NR(r,i,s)}}}function BR(e){for(;!Pb(e););return e}const Lb=/[\0\t\n\r]/g;function UR(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const c=[];let l,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Lb.lastIndex=f,l=Lb.exec(i),p=l&&l.index!==void 0?l.index:i.length,d=i.charCodeAt(p),!l){t=i.slice(f);break}if(d===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(i.slice(f,p)),e+=p-f),d){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const zR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qR(e){return e.replace(zR,HR)}function HR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Eb(n.slice(i?2:1),i?16:10)}return Xf(n)||e}const Bb={}.hasOwnProperty;function VR(e,t,n){return typeof t!="string"&&(n=t,t=void 0),WR(n)(BR(LR(n).document().write(UR()(e,t,!0))))}function WR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(oe),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(ve),blockQuote:i(me),characterEscape:B,characterReference:B,codeFenced:i(ce),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(ce,a),codeText:i(Q,a),codeTextData:B,data:B,codeFlowValue:B,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(fe),hardBreakEscape:i(_e),hardBreakTrailing:i(_e),htmlFlow:i(P,a),htmlFlowData:B,htmlText:i(P,a),htmlTextData:B,image:i(X),label:a,link:i(oe),listItem:i(xe),listItemValue:p,listOrdered:i(ee,f),listUnordered:i(ee),paragraph:i(we),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ve),strong:i(ke),thematicBreak:i(Oe)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:pe,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:re,codeFenced:c(v),codeFencedFence:m,codeFencedFenceInfo:d,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:c(y),codeText:c(D),codeTextData:T,data:T,definition:c(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(j),htmlFlowData:T,htmlText:c(U),htmlTextData:T,image:c(K),label:N,labelText:V,lineEnding:M,link:c(F),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:J,resourceDestinationString:w,resourceTitleString:q,resource:W,setextHeading:c(I),setextHeadingLineSequence:O,setextHeadingText:$,strong:c(),thematicBreak:c()}};Ub(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let Z={type:"root",children:[]};const H={stack:[Z],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:n},te=[];let de=-1;for(;++de<z.length;)if(z[de][1].type==="listOrdered"||z[de][1].type==="listUnordered")if(z[de][0]==="enter")te.push(de);else{const Pe=te.pop();de=o(z,Pe,de)}for(de=-1;++de<z.length;){const Pe=t[z[de][0]];Bb.call(Pe,z[de][1].type)&&Pe[z[de][1].type].call(Object.assign({sliceSerialize:z[de][2].sliceSerialize},H),z[de][1])}if(H.tokenStack.length>0){const Pe=H.tokenStack[H.tokenStack.length-1];(Pe[1]||zb).call(H,void 0,Pe[0])}for(Z.position={start:oo(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:oo(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)Z=t.transforms[de](Z)||Z;return Z}function o(z,Z,H){let te=Z-1,de=-1,Pe=!1,Ce,Be,ut,Nt;for(;++te<=H;){const ot=z[te];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?de++:de--,Nt=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(Ce&&!Nt&&!de&&!ut&&(ut=te),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!de&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||de===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(Ce){let nt=te;for(Be=void 0;nt--;){const pt=z[nt];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;Be&&(z[Be][1].type="lineEndingBlank",Pe=!0),pt[1].type="lineEnding",Be=nt}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}ut&&(!Be||ut<Be)&&(Ce._spread=!0),Ce.end=Object.assign({},Be?z[Be][1].start:ot[1].end),z.splice(Be||te,0,["exit",Ce,ot[2]]),te++,H++}if(ot[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};Ce=nt,z.splice(te,0,["enter",nt,ot[2]]),te++,H++,ut=void 0,Nt=!0}}}return z[Z][1]._spread=Pe,H}function i(z,Z){return H;function H(te){s.call(this,z(te),te),Z&&Z.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(z,Z,H){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([Z,H]),z.position={start:oo(Z.start),end:void 0}}function c(z){return Z;function Z(H){z&&z.call(this,H),l.call(this,H)}}function l(z,Z){const H=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==z.type&&(Z?Z.call(this,z,te[0]):(te[1]||zb).call(this,z,te[0]));else throw new Error("Cannot close `"+z.type+"` ("+Na({start:z.start,end:z.end})+"): it’s not open");H.position.end=oo(z.end)}function u(){return Jf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function d(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=z}function h(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=z}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.value=z.replace(/(\r?\n|\r)$/g,"")}function g(z){const Z=this.resume(),H=this.stack[this.stack.length-1];H.label=Z,H.identifier=Vn(this.sliceSerialize(z)).toLowerCase()}function b(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.title=z}function k(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.url=z}function S(z){const Z=this.stack[this.stack.length-1];if(!Z.depth){const H=this.sliceSerialize(z).length;Z.depth=H}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function B(z){const H=this.stack[this.stack.length-1].children;let te=H[H.length-1];(!te||te.type!=="text")&&(te=Fe(),te.position={start:oo(z.start),end:void 0},H.push(te)),this.stack.push(te)}function T(z){const Z=this.stack.pop();Z.value+=this.sliceSerialize(z),Z.position.end=oo(z.end)}function M(z){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=Z.children[Z.children.length-1];H.position.end=oo(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(B.call(this,z),T.call(this,z))}function R(){this.data.atHardBreak=!0}function j(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.value=z}function U(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.value=z}function D(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.value=z}function F(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Z,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function K(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Z,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function V(z){const Z=this.sliceSerialize(z),H=this.stack[this.stack.length-2];H.label=qR(Z),H.identifier=Vn(Z).toLowerCase()}function N(){const z=this.stack[this.stack.length-1],Z=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const te=z.children;H.children=te}else H.alt=Z}function w(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.url=z}function q(){const z=this.resume(),Z=this.stack[this.stack.length-1];Z.title=z}function W(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function J(z){const Z=this.resume(),H=this.stack[this.stack.length-1];H.label=Z,H.identifier=Vn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function ae(z){this.data.characterReferenceType=z.type}function re(z){const Z=this.sliceSerialize(z),H=this.data.characterReferenceType;let te;H?(te=Eb(Z,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Xf(Z);const de=this.stack.pop();de.value+=te,de.position.end=oo(z.end)}function le(z){T.call(this,z);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(z)}function pe(z){T.call(this,z);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(z)}function me(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function P(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function ee(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function xe(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function Oe(){return{type:"thematicBreak"}}}function oo(e){return{line:e.line,column:e.column,offset:e.offset}}function Ub(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ub(e,r):KR(e,r)}}function KR(e,t){let n;for(n in t)if(Bb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function GR(e){const t=this;t.parser=n;function n(r){return VR(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZR(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YR(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
31
31
|
`}]}function JR(e,t){const n=t.value?t.value+`
|
|
32
32
|
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function XR(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QR(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eM(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=hi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function tM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function rM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qb(e,t);const o={src:hi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function oM(e,t){const n={src:hi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function aM(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qb(e,t);const o={href:hi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function sM(e,t){const n={href:hi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cM(e,t,n){const r=e.all(t),o=n?lM(n):Hb(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|
|
33
33
|
`}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const c=r[r.length-1];c&&(o||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
34
|
-
`});const l={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,l),e.applyData(t,l)}function lM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Hb(n[r])}return t}function Hb(e){const t=e.spread;return t??e.children.length>1}function uM(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function fM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hM(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=
|
|
34
|
+
`});const l={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,l),e.applyData(t,l)}function lM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Hb(n[r])}return t}function Hb(e){const t=e.spread;return t??e.children.length>1}function uM(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function fM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pM(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hM(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Vf(t.children[1]),c=ub(t.children[t.children.length-1]);s&&c&&(a.position={start:s,end:c}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function mM(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let c=-1;const l=[];for(;++c<s;){const f=t.children[c],p={},d=a?a[c]:void 0;d&&(p.align=d);let h={type:"element",tagName:i,properties:p,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),l.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)}function yM(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vb=9,Wb=32;function vM(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Kb(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Kb(t.slice(o),o>0,!1)),i.join("")}function Kb(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Vb||i===Wb;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Vb||i===Wb;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function gM(e,t){const n={type:"text",value:vM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function bM(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wM={blockquote:ZR,break:YR,code:JR,delete:XR,emphasis:QR,footnoteReference:eM,heading:tM,html:nM,imageReference:rM,image:oM,inlineCode:iM,linkReference:aM,link:sM,listItem:cM,list:uM,paragraph:fM,root:dM,strong:pM,table:hM,tableCell:yM,tableRow:mM,text:gM,thematicBreak:bM,toml:Ec,yaml:Ec,definition:Ec,footnoteDefinition:Ec};function Ec(){}const Gb=-1,_c=0,$c=1,kc=2,od=3,id=4,ad=5,sd=6,Zb=7,Yb=8,Jb=typeof self=="object"?self:globalThis,xM=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case _c:case Gb:return n(a,o);case $c:{const s=n([],o);for(const c of a)s.push(r(c));return s}case kc:{const s=n({},o);for(const[c,l]of a)s[r(c)]=r(l);return s}case od:return n(new Date(a),o);case id:{const{source:s,flags:c}=a;return n(new RegExp(s,c),o)}case ad:{const s=n(new Map,o);for(const[c,l]of a)s.set(r(c),r(l));return s}case sd:{const s=n(new Set,o);for(const c of a)s.add(r(c));return s}case Zb:{const{name:s,message:c}=a;return n(new Jb[s](c),o)}case Yb:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new Jb[i](a),o)};return r},Xb=e=>xM(new Map,e)(0),mi="",{toString:SM}={},{keys:EM}=Object,La=e=>{const t=typeof e;if(t!=="object"||!e)return[_c,t];const n=SM.call(e).slice(8,-1);switch(n){case"Array":return[$c,mi];case"Object":return[kc,mi];case"Date":return[od,mi];case"RegExp":return[id,mi];case"Map":return[ad,mi];case"Set":return[sd,mi]}return n.includes("Array")?[$c,n]:n.includes("Error")?[Zb,n]:[kc,n]},Cc=([e,t])=>e===_c&&(t==="function"||t==="symbol"),_M=(e,t,n,r)=>{const o=(a,s)=>{const c=r.push(a)-1;return n.set(s,c),c},i=a=>{if(n.has(a))return n.get(a);let[s,c]=La(a);switch(s){case _c:{let u=a;switch(c){case"bigint":s=Yb,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return o([Gb],a)}return o([s,u],a)}case $c:{if(c)return o([c,[...a]],a);const u=[],f=o([s,u],a);for(const p of a)u.push(i(p));return f}case kc:{if(c)switch(c){case"BigInt":return o([c,a.toString()],a);case"Boolean":case"Number":case"String":return o([c,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],f=o([s,u],a);for(const p of EM(a))(e||!Cc(La(a[p])))&&u.push([i(p),i(a[p])]);return f}case od:return o([s,a.toISOString()],a);case id:{const{source:u,flags:f}=a;return o([s,{source:u,flags:f}],a)}case ad:{const u=[],f=o([s,u],a);for(const[p,d]of a)(e||!(Cc(La(p))||Cc(La(d))))&&u.push([i(p),i(d)]);return f}case sd:{const u=[],f=o([s,u],a);for(const p of a)(e||!Cc(La(p)))&&u.push(i(p));return f}}const{message:l}=a;return o([s,{name:c,message:l}],a)};return i},Qb=(e,{json:t,lossy:n}={})=>{const r=[];return _M(!(t||n),!!t,new Map,r)(e),r},Tc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xb(Qb(e,t)):structuredClone(e):(e,t)=>Xb(Qb(e,t));function $M(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function kM(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CM(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$M,r=e.options.footnoteBackLabel||kM,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const u=e.all(l),f=String(l.identifier).toUpperCase(),p=hi(f.toLowerCase());let d=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++d<=m;){h.length>0&&h.push({type:"text",value:" "});let g=typeof n=="string"?n:n(c,d);typeof g=="string"&&(g={type:"text",value:g}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,d),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...h)}else u.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(l,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Tc(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
35
35
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
36
|
-
`}]}}const Oc=function(e){if(e==null)return PM;if(typeof e=="function")return Ac(e);if(typeof e=="object")return Array.isArray(e)?TM(e):OM(e);if(typeof e=="string")return AM(e);throw new Error("Expected function, string, or object as test")};function TM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Oc(e[n]);return Ac(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function OM(e){const t=e;return Ac(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function AM(e){return Ac(t);function t(n){return n&&n.type===e}}function Ac(e){return t;function t(n,r,o){return!!(IM(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function PM(){return!0}function IM(e){return e!==null&&typeof e=="object"&&"type"in e}function
|
|
36
|
+
`}]}}const Oc=function(e){if(e==null)return PM;if(typeof e=="function")return Ac(e);if(typeof e=="object")return Array.isArray(e)?TM(e):OM(e);if(typeof e=="string")return AM(e);throw new Error("Expected function, string, or object as test")};function TM(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Oc(e[n]);return Ac(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function OM(e){const t=e;return Ac(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function AM(e){return Ac(t);function t(n){return n&&n.type===e}}function Ac(e){return t;function t(n,r,o){return!!(IM(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function PM(){return!0}function IM(e){return e!==null&&typeof e=="object"&&"type"in e}function zce(e){return e}const e0=[],RM=!0,cd=!1,MM="skip";function t0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Oc(o),a=r?-1:1;s(e,void 0,[])();function s(c,l,u){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=e0,h,m,v;if((!t||i(c,l,u[u.length-1]||void 0))&&(d=NM(n(c,u)),d[0]===cd))return d;if("children"in c&&c.children){const y=c;if(y.children&&d[0]!==MM)for(m=(r?y.children.length:-1)+a,v=u.concat(y);m>-1&&m<y.children.length;){const g=y.children[m];if(h=s(g,m,v)(),h[0]===cd)return h;m=typeof h[1]=="number"?h[1]:m+a}}return d}}}function NM(e){return Array.isArray(e)?e:typeof e=="number"?[RM,e]:e==null?e0:[e]}function ld(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),t0(e,i,s,o);function s(c,l){const u=l[l.length-1],f=u?u.children.indexOf(c):void 0;return a(c,f,u)}}const ud={}.hasOwnProperty,DM={};function jM(e,t){const n=t||DM,r=new Map,o=new Map,i=new Map,a={...wM,...n.handlers},s={all:l,applyData:LM,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:c,options:n,patch:FM,wrap:UM};return ld(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function c(u,f){const p=u.type,d=s.handlers[p];if(ud.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:m,...v}=u,y=Tc(v);return y.children=s.all(u),y}return Tc(u)}return(s.options.unknownHandler||BM)(s,u,f)}function l(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const h=s.one(p[d],u);if(h){if(d&&p[d-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=n0(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=n0(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function FM(e,t){e.position&&(t.position=MP(e))}function LM(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Tc(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function BM(e,t){const n=t.data||{},r="value"in t&&!(ud.call(n,"hProperties")||ud.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UM(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
37
37
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
38
38
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
39
39
|
`}),n}function n0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function r0(e,t){const n=jM(e,t),r=n.one(e,void 0),o=CM(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
40
|
-
`},o),i}function zM(e,t){return e&&"run"in e?async function(n,r){const o=r0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return r0(n,{file:r,...t||e})}}function o0(e){if(e)throw e}var Pc=Object.prototype.hasOwnProperty,i0=Object.prototype.toString,a0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,c0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):i0.call(t)==="[object Array]"},l0=function(t){if(!t||i0.call(t)!=="[object Object]")return!1;var n=Pc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Pc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Pc.call(t,o)},u0=function(t,n){a0&&n.name==="__proto__"?a0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},f0=function(t,n){if(n==="__proto__")if(Pc.call(t,n)){if(s0)return s0(t,n).value}else return;return t[n]},qM=function e(){var t,n,r,o,i,a,s=arguments[0],c=1,l=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},c=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=f0(s,n),o=f0(t,n),s!==o&&(u&&o&&(l0(o)||(i=c0(o)))?(i?(i=!1,a=r&&c0(r)?r:[]):a=r&&l0(r)?r:{},u0(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&u0(s,{name:n,newValue:o}));return s};const fd=Ue(qM);function dd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function HM(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(c,...l){const u=e[++i];let f=-1;if(c){a(c);return}for(;++f<o.length;)(l[f]===null||l[f]===void 0)&&(l[f]=o[f]);o=l,u?WM(u,s)(...l):a(null,...l)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function WM(e,t){let n;return r;function r(...a){const s=e.length>a.length;let c;s&&a.push(o);try{c=e.apply(this,a)}catch(l){const u=l;if(s&&n)throw u;return o(u)}s||(c instanceof Promise?c.then(i,o):c instanceof Error?o(c):i(c))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const cr={basename:VM,dirname:KM,extname:GM,join:ZM,sep:"/"};function VM(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function KM(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function GM(e){Ba(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function ZM(...e){let t=-1,n;for(;++t<e.length;)Ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":YM(n)}function YM(e){Ba(e);const t=e.codePointAt(0)===47;let n=JM(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function JM(e,t){let n="",r=0,o=-1,i=0,a=-1,s,c;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XM={cwd:QM};function QM(){return"/"}function pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eN(e){if(typeof e=="string")e=new URL(e);else if(!pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tN(e)}function tN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const hd=["history","path","basename","stem","extname","dirname"];class d0{constructor(t){let n;t?pd(t)?n={path:t}:typeof t=="string"||nN(t)?n={value:t}:n=t:n={},this.cwd=XM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<hd.length;){const i=hd[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)hd.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?cr.basename(this.path):void 0}set basename(t){yd(t,"basename"),md(t,"basename"),this.path=cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cr.dirname(this.path):void 0}set dirname(t){p0(this.basename,"dirname"),this.path=cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cr.extname(this.path):void 0}set extname(t){if(md(t,"extname"),p0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pd(t)&&(t=eN(t)),yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cr.basename(this.path,this.extname):void 0}set stem(t){yd(t,"stem"),md(t,"stem"),this.path=cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Jt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function md(e,t){if(e&&e.includes(cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cr.sep+"`")}function yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function p0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rN=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,r);const a=Object.getOwnPropertyNames(o);for(const s of a){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(i,s,c)}return i},oN={}.hasOwnProperty;class vd extends rN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=HM()}copy(){const t=new vd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wd("data",this.frozen),this.namespace[t]=n,this):oN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ic(t),r=this.parser||this.Parser;return gd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gd("process",this.parser||this.Parser),bd("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ic(t),c=r.parse(s);r.run(c,s,function(u,f,p){if(u||!f||!p)return l(u);const d=f,h=r.stringify(d,p);sN(h)?p.value=h:p.result=h,l(u,p)});function l(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),gd("processSync",this.parser||this.Parser),bd("processSync",this.compiler||this.Compiler),this.process(t,o),m0("processSync","process",n),r;function o(i,a){n=!0,o0(i),r=a}}run(t,n,r){h0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const c=Ic(n);o.run(t,c,l);function l(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),m0("runSync","run",r),o;function i(a,s){o0(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ic(n),o=this.compiler||this.Compiler;return bd("stringify",o),h0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(wd("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[u,...f]=l;c(u,f)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(o.settings=fd(!0,o.settings,l.settings))}function s(l){let u=-1;if(l!=null)if(Array.isArray(l))for(;++u<l.length;){const f=l[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...u]);else if(u.length>0){let[d,...h]=u;const m=r[p][1];dd(m)&&dd(d)&&(d=fd(!0,m,d)),r[p]=[l,d,...h]}}}}const iN=new vd().freeze();function gd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function h0(e){if(!dd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function m0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ic(e){return aN(e)?e:new d0(e)}function aN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sN(e){return typeof e=="string"||cN(e)}function cN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",y0=[],v0={allowDangerousHtml:!0},uN=/^(https?|ircs?|mailto|xmpp)$/i,fN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||y0,c=e.remarkPlugins||y0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v0}:v0,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||pN,d=iN().use(GR).use(c).use(zM,l).use(s),h=new d0;typeof r=="string"&&(h.value=r);for(const g of fN)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+lN+g.id,void 0);const m=d.parse(h);let v=d.runSync(m,h);return o&&(v={type:"element",tagName:"div",properties:{className:o},children:v.type==="root"?v.children:[v]}),ld(v,y),BP(v,{Fragment:j.Fragment,components:i,ignoreInvalidStyle:!0,jsx:j.jsx,jsxs:j.jsxs,passKeys:!0,passNode:!0});function y(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in Yf)if(Object.hasOwn(Yf,S)&&Object.hasOwn(g.properties,S)){const $=g.properties[S],C=Yf[S];(C===null||C.includes(g.tagName))&&(g.properties[S]=p(String($||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):a?a.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function pN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||uN.test(e.slice(0,t))?e:""}function hN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function g0(e,t,n){const o=Oc((n||{}).ignore||[]),i=mN(t);let a=-1;for(;++a<i.length;)t0(e,"text",s);function s(l,u){let f=-1,p;for(;++f<u.length;){const d=u[f],h=p?p.children:void 0;if(o(d,h?h.indexOf(d):void 0,p))return;p=d}if(p)return c(l,u)}function c(l,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let h=0;const v=f.children.indexOf(l);let y=!1,g=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,l]};let $=d(...b,S);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?p.lastIndex=k+1:(h!==k&&g.push({type:"text",value:l.value.slice(h,k)}),Array.isArray($)?g.push(...$):$&&g.push($),h=k+b[0].length,y=!0),!p.global)break;b=p.exec(l.value)}return y?(h<l.value.length&&g.push({type:"text",value:l.value.slice(h)}),f.children.splice(v,1,...g)):g=[l],v+g.length}}function mN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([yN(o[0]),vN(o[1])])}return t}function yN(e){return typeof e=="string"?new RegExp(hN(e),"g"):e}function vN(e){return typeof e=="function"?e:function(){return e}}function gN(e){g0(e,[/\r?\n|\r/g,bN])}function bN(){return{type:"break"}}function wN(){return function(e){gN(e)}}function b0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const xd="phrasing",Sd=["autolink","link","image","label"];function xN(){return{transforms:[TN],enter:{literalAutolink:EN,literalAutolinkEmail:Ed,literalAutolinkHttp:Ed,literalAutolinkWww:Ed},exit:{literalAutolink:CN,literalAutolinkEmail:kN,literalAutolinkHttp:_N,literalAutolinkWww:$N}}}function SN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xd,notInConstruct:Sd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xd,notInConstruct:Sd},{character:":",before:"[ps]",after:"\\/",inConstruct:xd,notInConstruct:Sd}]}}function EN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ed(e){this.config.enter.autolinkProtocol.call(this,e)}function _N(e){this.config.exit.autolinkProtocol.call(this,e)}function $N(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function kN(e){this.config.exit.autolinkEmail.call(this,e)}function CN(e){this.exit(e)}function TN(e){g0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ON],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,AN]],{ignore:["link","linkReference"]})}function ON(e,t,n,r,o){let i="";if(!w0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!PN(n)))return!1;const a=IN(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function AN(e,t,n,r){return!w0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function IN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=b0(e,"(");let i=b0(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function w0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jo(n)||bc(n))&&(!t||n!==47)}x0.peek=qN;function RN(){return{enter:{gfmFootnoteDefinition:NN,gfmFootnoteDefinitionLabelString:DN,gfmFootnoteCall:LN,gfmFootnoteCallString:BN},exit:{gfmFootnoteDefinition:FN,gfmFootnoteDefinitionLabelString:jN,gfmFootnoteCall:zN,gfmFootnoteCallString:UN}}}function MN(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:HN,footnoteReference:x0}}}function NN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DN(){this.buffer()}function jN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase()}function FN(e){this.exit(e)}function LN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function BN(){this.buffer()}function UN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase()}function zN(e){this.exit(e)}function x0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function qN(){return"["}function HN(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),WN)),a(),i}function WN(e,t,n){return t===0?e:(n?"":" ")+e}const VN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];S0.peek=JN;function KN(){return{canContainEols:["delete"],enter:{strikethrough:ZN},exit:{strikethrough:YN}}}function GN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:VN}],handlers:{delete:S0}}}function ZN(e){this.enter({type:"delete",children:[]},e)}function YN(e){this.exit(e)}function S0(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function JN(){return"~"}function XN(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||e2,o=[],i=[],a=[],s=[];let c=0,l=-1;for(;++l<e.length;){const h=[],m=[];let v=-1;for(e[l].length>c&&(c=e[l].length);++v<e[l].length;){const y=QN(e[l][v]);if(t.alignDelimiters!==!1){const g=r(y);m[v]=g,(s[v]===void 0||g>s[v])&&(s[v]=g)}h.push(y)}i[l]=h,a[l]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)o[u]=E0(n[u]);else{const h=E0(n);for(;++u<c;)o[u]=h}u=-1;const f=[],p=[];for(;++u<c;){const h=o[u];let m="",v="";h===99?(m=":",v=":"):h===108?m=":":h===114&&(v=":");let y=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-v.length);const g=m+"-".repeat(y)+v;t.alignDelimiters!==!1&&(y=m.length+y+v.length,y>s[u]&&(s[u]=y),p[u]=y),f[u]=g}i.splice(1,0,f),a.splice(1,0,p),l=-1;const d=[];for(;++l<i.length;){const h=i[l],m=a[l];u=-1;const v=[];for(;++u<c;){const y=h[u]||"";let g="",b="";if(t.alignDelimiters!==!1){const k=s[u]-(m[u]||0),S=o[u];S===114?g=" ".repeat(k):S===99?k%2?(g=" ".repeat(k/2+.5),b=" ".repeat(k/2-.5)):(g=" ".repeat(k/2),b=g):b=" ".repeat(k)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&y==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(g),v.push(y),t.alignDelimiters!==!1&&v.push(b),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==c-1)&&v.push("|")}d.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return d.join(`
|
|
41
|
-
`)}function
|
|
42
|
-
`&&
|
|
43
|
-
`}function
|
|
40
|
+
`},o),i}function zM(e,t){return e&&"run"in e?async function(n,r){const o=r0(n,{file:r,...t});await e.run(o,r)}:function(n,r){return r0(n,{file:r,...t||e})}}function o0(e){if(e)throw e}var Pc=Object.prototype.hasOwnProperty,i0=Object.prototype.toString,a0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,c0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):i0.call(t)==="[object Array]"},l0=function(t){if(!t||i0.call(t)!=="[object Object]")return!1;var n=Pc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Pc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Pc.call(t,o)},u0=function(t,n){a0&&n.name==="__proto__"?a0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},f0=function(t,n){if(n==="__proto__")if(Pc.call(t,n)){if(s0)return s0(t,n).value}else return;return t[n]},qM=function e(){var t,n,r,o,i,a,s=arguments[0],c=1,l=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},c=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});c<l;++c)if(t=arguments[c],t!=null)for(n in t)r=f0(s,n),o=f0(t,n),s!==o&&(u&&o&&(l0(o)||(i=c0(o)))?(i?(i=!1,a=r&&c0(r)?r:[]):a=r&&l0(r)?r:{},u0(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&u0(s,{name:n,newValue:o}));return s};const fd=Ue(qM);function dd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function HM(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(c,...l){const u=e[++i];let f=-1;if(c){a(c);return}for(;++f<o.length;)(l[f]===null||l[f]===void 0)&&(l[f]=o[f]);o=l,u?VM(u,s)(...l):a(null,...l)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function VM(e,t){let n;return r;function r(...a){const s=e.length>a.length;let c;s&&a.push(o);try{c=e.apply(this,a)}catch(l){const u=l;if(s&&n)throw u;return o(u)}s||(c instanceof Promise?c.then(i,o):c instanceof Error?o(c):i(c))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const cr={basename:WM,dirname:KM,extname:GM,join:ZM,sep:"/"};function WM(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function KM(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function GM(e){Ba(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function ZM(...e){let t=-1,n;for(;++t<e.length;)Ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":YM(n)}function YM(e){Ba(e);const t=e.codePointAt(0)===47;let n=JM(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function JM(e,t){let n="",r=0,o=-1,i=0,a=-1,s,c;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XM={cwd:QM};function QM(){return"/"}function pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function e2(e){if(typeof e=="string")e=new URL(e);else if(!pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return t2(e)}function t2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const hd=["history","path","basename","stem","extname","dirname"];class d0{constructor(t){let n;t?pd(t)?n={path:t}:typeof t=="string"||n2(t)?n={value:t}:n=t:n={},this.cwd=XM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<hd.length;){const i=hd[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)hd.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?cr.basename(this.path):void 0}set basename(t){yd(t,"basename"),md(t,"basename"),this.path=cr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cr.dirname(this.path):void 0}set dirname(t){p0(this.basename,"dirname"),this.path=cr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cr.extname(this.path):void 0}set extname(t){if(md(t,"extname"),p0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=cr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pd(t)&&(t=e2(t)),yd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cr.basename(this.path,this.extname):void 0}set stem(t){yd(t,"stem"),md(t,"stem"),this.path=cr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Jt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function md(e,t){if(e&&e.includes(cr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cr.sep+"`")}function yd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function p0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function n2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const r2=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};Object.setPrototypeOf(i,r);const a=Object.getOwnPropertyNames(o);for(const s of a){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(i,s,c)}return i},o2={}.hasOwnProperty;class vd extends r2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=HM()}copy(){const t=new vd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wd("data",this.frozen),this.namespace[t]=n,this):o2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ic(t),r=this.parser||this.Parser;return gd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gd("process",this.parser||this.Parser),bd("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ic(t),c=r.parse(s);r.run(c,s,function(u,f,p){if(u||!f||!p)return l(u);const d=f,h=r.stringify(d,p);s2(h)?p.value=h:p.result=h,l(u,p)});function l(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),gd("processSync",this.parser||this.Parser),bd("processSync",this.compiler||this.Compiler),this.process(t,o),m0("processSync","process",n),r;function o(i,a){n=!0,o0(i),r=a}}run(t,n,r){h0(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const c=Ic(n);o.run(t,c,l);function l(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),m0("runSync","run",r),o;function i(a,s){o0(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ic(n),o=this.compiler||this.Compiler;return bd("stringify",o),h0(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(wd("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[u,...f]=l;c(u,f)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(o.settings=fd(!0,o.settings,l.settings))}function s(l){let u=-1;if(l!=null)if(Array.isArray(l))for(;++u<l.length;){const f=l[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...u]);else if(u.length>0){let[d,...h]=u;const m=r[p][1];dd(m)&&dd(d)&&(d=fd(!0,m,d)),r[p]=[l,d,...h]}}}}const i2=new vd().freeze();function gd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function h0(e){if(!dd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function m0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ic(e){return a2(e)?e:new d0(e)}function a2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function s2(e){return typeof e=="string"||c2(e)}function c2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",y0=[],v0={allowDangerousHtml:!0},u2=/^(https?|ircs?|mailto|xmpp)$/i,f2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function d2(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||y0,c=e.remarkPlugins||y0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v0}:v0,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||p2,d=i2().use(GR).use(c).use(zM,l).use(s),h=new d0;typeof r=="string"&&(h.value=r);for(const g of f2)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+l2+g.id,void 0);const m=d.parse(h);let v=d.runSync(m,h);return o&&(v={type:"element",tagName:"div",properties:{className:o},children:v.type==="root"?v.children:[v]}),ld(v,y),BP(v,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function y(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in Yf)if(Object.hasOwn(Yf,S)&&Object.hasOwn(g.properties,S)){const $=g.properties[S],O=Yf[S];(O===null||O.includes(g.tagName))&&(g.properties[S]=p(String($||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):a?a.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function p2(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||u2.test(e.slice(0,t))?e:""}function h2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function g0(e,t,n){const o=Oc((n||{}).ignore||[]),i=m2(t);let a=-1;for(;++a<i.length;)t0(e,"text",s);function s(l,u){let f=-1,p;for(;++f<u.length;){const d=u[f],h=p?p.children:void 0;if(o(d,h?h.indexOf(d):void 0,p))return;p=d}if(p)return c(l,u)}function c(l,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let h=0;const v=f.children.indexOf(l);let y=!1,g=[];p.lastIndex=0;let b=p.exec(l.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,l]};let $=d(...b,S);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?p.lastIndex=k+1:(h!==k&&g.push({type:"text",value:l.value.slice(h,k)}),Array.isArray($)?g.push(...$):$&&g.push($),h=k+b[0].length,y=!0),!p.global)break;b=p.exec(l.value)}return y?(h<l.value.length&&g.push({type:"text",value:l.value.slice(h)}),f.children.splice(v,1,...g)):g=[l],v+g.length}}function m2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([y2(o[0]),v2(o[1])])}return t}function y2(e){return typeof e=="string"?new RegExp(h2(e),"g"):e}function v2(e){return typeof e=="function"?e:function(){return e}}function g2(e){g0(e,[/\r?\n|\r/g,b2])}function b2(){return{type:"break"}}function w2(){return function(e){g2(e)}}function b0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const xd="phrasing",Sd=["autolink","link","image","label"];function x2(){return{transforms:[T2],enter:{literalAutolink:E2,literalAutolinkEmail:Ed,literalAutolinkHttp:Ed,literalAutolinkWww:Ed},exit:{literalAutolink:C2,literalAutolinkEmail:k2,literalAutolinkHttp:_2,literalAutolinkWww:$2}}}function S2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xd,notInConstruct:Sd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xd,notInConstruct:Sd},{character:":",before:"[ps]",after:"\\/",inConstruct:xd,notInConstruct:Sd}]}}function E2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ed(e){this.config.enter.autolinkProtocol.call(this,e)}function _2(e){this.config.exit.autolinkProtocol.call(this,e)}function $2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function k2(e){this.config.exit.autolinkEmail.call(this,e)}function C2(e){this.exit(e)}function T2(e){g0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O2],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,A2]],{ignore:["link","linkReference"]})}function O2(e,t,n,r,o){let i="";if(!w0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!P2(n)))return!1;const a=I2(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function A2(e,t,n,r){return!w0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function P2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function I2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=b0(e,"(");let i=b0(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function w0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jo(n)||bc(n))&&(!t||n!==47)}x0.peek=q2;function R2(){return{enter:{gfmFootnoteDefinition:N2,gfmFootnoteDefinitionLabelString:D2,gfmFootnoteCall:L2,gfmFootnoteCallString:B2},exit:{gfmFootnoteDefinition:F2,gfmFootnoteDefinitionLabelString:j2,gfmFootnoteCall:z2,gfmFootnoteCallString:U2}}}function M2(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:H2,footnoteReference:x0}}}function N2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function D2(){this.buffer()}function j2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function F2(e){this.exit(e)}function L2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function B2(){this.buffer()}function U2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Vn(this.sliceSerialize(e)).toLowerCase()}function z2(e){this.exit(e)}function x0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function q2(){return"["}function H2(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),V2)),a(),i}function V2(e,t,n){return t===0?e:(n?"":" ")+e}const W2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];S0.peek=J2;function K2(){return{canContainEols:["delete"],enter:{strikethrough:Z2},exit:{strikethrough:Y2}}}function G2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W2}],handlers:{delete:S0}}}function Z2(e){this.enter({type:"delete",children:[]},e)}function Y2(e){this.exit(e)}function S0(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function J2(){return"~"}function X2(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||eN,o=[],i=[],a=[],s=[];let c=0,l=-1;for(;++l<e.length;){const h=[],m=[];let v=-1;for(e[l].length>c&&(c=e[l].length);++v<e[l].length;){const y=Q2(e[l][v]);if(t.alignDelimiters!==!1){const g=r(y);m[v]=g,(s[v]===void 0||g>s[v])&&(s[v]=g)}h.push(y)}i[l]=h,a[l]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<c;)o[u]=E0(n[u]);else{const h=E0(n);for(;++u<c;)o[u]=h}u=-1;const f=[],p=[];for(;++u<c;){const h=o[u];let m="",v="";h===99?(m=":",v=":"):h===108?m=":":h===114&&(v=":");let y=t.alignDelimiters===!1?1:Math.max(1,s[u]-m.length-v.length);const g=m+"-".repeat(y)+v;t.alignDelimiters!==!1&&(y=m.length+y+v.length,y>s[u]&&(s[u]=y),p[u]=y),f[u]=g}i.splice(1,0,f),a.splice(1,0,p),l=-1;const d=[];for(;++l<i.length;){const h=i[l],m=a[l];u=-1;const v=[];for(;++u<c;){const y=h[u]||"";let g="",b="";if(t.alignDelimiters!==!1){const k=s[u]-(m[u]||0),S=o[u];S===114?g=" ".repeat(k):S===99?k%2?(g=" ".repeat(k/2+.5),b=" ".repeat(k/2-.5)):(g=" ".repeat(k/2),b=g):b=" ".repeat(k)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&y==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(g),v.push(y),t.alignDelimiters!==!1&&v.push(b),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==c-1)&&v.push("|")}d.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return d.join(`
|
|
41
|
+
`)}function Q2(e){return e==null?"":String(e)}function eN(e){return e.length}function E0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function tN(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),nN);return o(),a}function nN(e,t,n){return">"+(n?"":" ")+e}function rN(e,t){return _0(e,t.inConstruct,!0)&&!_0(e,t.notInConstruct,!1)}function _0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $0(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
42
|
+
`&&rN(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
43
|
+
`}function oN(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function iN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function aN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function sN(e,t,n,r){const o=aN(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(iN(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(i,cN);return f(),p}const s=n.createTracker(r),c=o.repeat(Math.max(oN(i,o)+1,3)),l=n.enter("codeFenced");let u=s.move(c);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
44
44
|
`,encode:["`"],...s.current()})),f()}return u+=s.move(`
|
|
45
45
|
`),i&&(u+=s.move(i+`
|
|
46
|
-
`)),u+=s.move(c),l(),u}function
|
|
47
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),a(),l}function
|
|
46
|
+
`)),u+=s.move(c),l(),u}function cN(e,t,n){return(n?"":" ")+e}function _d(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function lN(e,t,n,r){const o=_d(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
47
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),a(),l}function uN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}k0.peek=fN;function k0(e,t,n,r){const o=uN(n),i=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o),i(),s}function fN(e,t,n){return n.options.emphasis||"*"}function dN(e,t){let n=!1;return ld(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cd}),!!((!e.depth||e.depth<3)&&Jf(e)&&(t.options.setext||n))}function pN(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(dN(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
|
|
48
48
|
`,after:`
|
|
49
49
|
`});return f(),u(),p+`
|
|
50
50
|
`+(o===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
51
51
|
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
52
|
-
`,...i.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),c(),s(),l}C0.peek=
|
|
52
|
+
`,...i.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),c(),s(),l}C0.peek=hN;function C0(e){return e.value||""}function hN(){return"<"}T0.peek=mN;function T0(e,t,n,r){const o=_d(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),l+=c.move(")"),a(),l}function mN(){return"!"}O0.peek=yN;function O0(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let c=s.move("![");const l=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!l||l!==f?c+=s.move(f+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function yN(){return"!"}A0.peek=vN;function A0(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let c;if(a.atBreak)for(;c=s.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return o+r+o}function vN(){return"`"}function P0(e,t){const n=Jf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}I0.peek=gN;function I0(e,t,n,r){const o=_d(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,c;if(P0(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=u,f}s=n.enter("link"),c=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(c=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),l+=a.move(" "+o),l+=a.move(n.safe(e.title,{before:l,after:o,...a.current()})),l+=a.move(o),c()),l+=a.move(")"),s(),l}function gN(e,t,n){return P0(e,n)?"<":"["}R0.peek=bN;function R0(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let c=s.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!l||l!==f?c+=s.move(f+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function bN(){return"["}function $d(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wN(e){const t=$d(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function xN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function M0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function SN(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?xN(n):$d(n);const s=e.ordered?a==="."?")":".":wN(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),M0(n)===a&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=s),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),l}function EN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _N(e,t,n,r){const o=EN(n);let i=n.bulletCurrent||$d(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function $N(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const kN=Oc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function CN(e,t,n,r){return(e.children.some(function(a){return kN(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function TN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}N0.peek=ON;function N0(e,t,n,r){const o=TN(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function ON(e,t,n){return n.options.strong||"*"}function AN(e,t,n,r){return n.safe(e.value,r)}function PN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function IN(e,t,n){const r=(M0(n)+(n.options.ruleSpaces?" ":"")).repeat(PN(n));return n.options.ruleSpaces?r.slice(0,-1):r}const D0={blockquote:tN,break:$0,code:sN,definition:lN,emphasis:k0,hardBreak:$0,heading:pN,html:C0,image:T0,imageReference:O0,inlineCode:A0,link:I0,linkReference:R0,list:SN,listItem:_N,paragraph:$N,root:CN,strong:N0,text:AN,thematicBreak:IN};function RN(){return{enter:{table:MN,tableData:j0,tableHeader:j0,tableRow:DN},exit:{codeText:jN,table:NN,tableData:kd,tableHeader:kd,tableRow:kd}}}function MN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function NN(e){this.exit(e),this.data.inTable=void 0}function DN(e){this.enter({type:"tableRow",children:[]},e)}function kd(e){this.exit(e)}function j0(e){this.enter({type:"tableCell",children:[]},e)}function jN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,FN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function FN(e,t){return t==="|"?t:e}function LN(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
53
53
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:s}};function a(d,h,m,v){return l(u(d,m,v),d.align)}function s(d,h,m,v){const y=f(d,m,v),g=l([y]);return g.slice(0,g.indexOf(`
|
|
54
|
-
`))}function c(d,h,m,v){const y=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...v,before:i,after:i});return g(),y(),b}function l(d,h){return XN(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("table");for(;++y<v.length;)g[y]=f(v[y],h,m);return b(),g}function f(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("tableRow");for(;++y<v.length;)g[y]=c(v[y],d,h,m);return b(),g}function p(d,h,m){let v=D0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function B2(){return{exit:{taskListCheckValueChecked:F0,taskListCheckValueUnchecked:F0,paragraph:z2}}}function U2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:q2}}}function F0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function z2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function q2(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let c=D0.listItem(e,t,n,{...r,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function H2(){return[xN(),RN(),KN(),R2(),B2()]}function W2(e){return{extensions:[SN(),MN(),GN(),L2(e),U2()]}}const V2={tokenize:X2,partial:!0},L0={tokenize:Q2,partial:!0},B0={tokenize:eD,partial:!0},U0={tokenize:tD,partial:!0},K2={tokenize:nD,partial:!0},z0={tokenize:Y2,previous:H0},q0={tokenize:J2,previous:W0},Pr={tokenize:Z2,previous:V0},lr={};function G2(){return{text:lr}}let Fo=48;for(;Fo<123;)lr[Fo]=Pr,Fo++,Fo===58?Fo=65:Fo===91&&(Fo=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,q0],lr[104]=[Pr,q0],lr[87]=[Pr,z0],lr[119]=[Pr,z0];function Z2(e,t,n){const r=this;let o,i;return a;function a(f){return!Cd(f)||!V0.call(r,r.previous)||Td(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Cd(f)?(e.consume(f),s):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(K2,u,l)(f):f===45||f===95||Xt(f)?(i=!0,e.consume(f),c):u(f)}function l(f){return e.consume(f),o=!0,c}function u(f){return i&&o&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Y2(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!H0.call(r,r.previous)||Td(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(V2,e.attempt(L0,e.attempt(B0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function J2(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&W0.call(r,r.previous)&&!Td(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(cn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),i?l:(i=!0,c)):n(f)}function l(f){return f===null||gc(f)||st(f)||jo(f)||bc(f)?n(f):e.attempt(L0,e.attempt(B0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function X2(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function Q2(e,t,n){let r,o,i;return a;function a(l){return l===46||l===95?e.check(U0,c,s)(l):l===null||st(l)||jo(l)||l!==45&&bc(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(o=r,r=void 0),e.consume(l),a}function c(l){return o||r||!i?n(l):t(l)}}function eD(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(U0,t,i)(a):a===null||st(a)||jo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function tD(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||st(s)||jo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||st(s)||jo(s)?t(s):r(s)}function i(s){return cn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):cn(s)?(e.consume(s),a):n(s)}}function nD(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Xt(i)?n(i):t(i)}}function H0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function W0(e){return!cn(e)}function V0(e){return!(e===47||Cd(e))}function Cd(e){return e===43||e===45||e===46||e===95||Xt(e)}function Td(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const rD={tokenize:fD,partial:!0};function oD(){return{document:{91:{tokenize:cD,continuation:{tokenize:lD},exit:uD}},text:{91:{tokenize:sD},93:{add:"after",tokenize:iD,resolveTo:aD}}}}function iD(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const c=r.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return n(c);const l=Wn(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function aD(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(i>999||f===93&&!a||f===null||f===91||st(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Wn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return st(f)||(a=!0),i++,e.consume(f),f===92?u:l}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,l):l(f)}}function cD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||st(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Wn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return st(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),We(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function lD(e,t,n){return e.check(ja,t,e.attempt(rD,t,n))}function uD(e){e.exit("gfmFootnoteDefinition")}function fD(e,t,n){const r=this;return We(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function dD(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Sn(p,p.length,0,xc(d,a.slice(l+1,c),s)),Sn(p,p.length,0,[["exit",f,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),Sn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let f=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=wc(l);if(h===126)return f>1?c(h):(a.consume(h),f++,d);if(f<2&&!n)return c(h);const v=a.exit("strikethroughSequenceTemporary"),y=wc(h);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,s(h)}}}class pD{constructor(){this.map=[]}add(t,n,r){hD(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function hD(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function mD(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function yD(){return{flow:{null:{tokenize:vD,resolveAll:gD}}}}function vD(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let R=r.events.length-1;for(;R>-1;){const z=r.events[R][1].type;if(z==="lineEnding"||z==="linePrefix")R--;else break}const H=R>-1?r.events[R][1].type:null,L=H==="tableHead"||H==="tableRow"?$:c;return L===$&&r.parser.lazy[r.now().line]?n(T):L(T)}function c(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):$e(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Le(T)?We(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||st(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,Le(T)?We(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?v(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return Le(T)?We(e,v,"whitespace")(T):v(T)}function v(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),y):T===45?(i+=1,y(T)):T===null||$e(T)?k(T):S(T)}function y(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return Le(T)?We(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||$e(T)?!a||o!==i?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function $(T){return e.enter("tableRow"),C(T)}function C(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):T===null||$e(T)?(e.exit("tableRow"),t(T)):Le(T)?We(e,C,"whitespace")(T):(e.enter("data"),P(T))}function P(T){return T===null||T===124||st(T)?(e.exit("data"),C(T)):(e.consume(T),T===92?F:P)}function F(T){return T===92||T===124?(e.consume(T),P):P(T)}}function gD(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,f;const p=new pD;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(K0(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,c=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],f=Rc(p,t,i,o,n,f)):a[1]!==0&&(f=Rc(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&K0(p,t,c,l,u),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=mD(t.events,n))}return e}function Rc(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},yi(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=yi(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=yi(t.events,n[2]),u=yi(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},yi(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function K0(e,t,n,r,o){const i=[],a=yi(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function yi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bD={tokenize:xD};function wD(){return{text:{91:bD}}}function xD(e,t,n){const r=this;return o;function o(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return st(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Le(c)?e.check({tokenize:SD},t,n)(c):n(c)}}function SD(e,t,n){return We(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function ED(e){return Sb([G2(),oD(),dD(e),yD(),wD()])}const _D={};function $D(e){const t=this,n=e||_D,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(ED(n)),i.push(H2()),a.push(W2(n))}const ct={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},kD=({text:e})=>{const{message:{blocks:{text:t}}}=ct,n={h1:({node:r,...o})=>j.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>j.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>j.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>j.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>j.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>j.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>j.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>j.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>j.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>j.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>j.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>j.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>j.jsx("pre",{...o,...t==null?void 0:t.pre})};return j.jsx(dN,{components:n,remarkPlugins:[$D,wN],children:e})};var G0={},Od={},Z0={};Object.defineProperty(Z0,"__esModule",{value:!0});var Mc={},CD=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.Emitter=void 0;let TD=class{constructor(){this.listeners={}}on(t,n,r=!1){const o=this.listeners[t];o?r?o.unshift(n):o.push(n):this.listeners[t]=[n]}emit(t,n){return CD(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}};Mc.Emitter=TD;var Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});var J0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(J0);var X0={};Object.defineProperty(X0,"__esModule",{value:!0});var Q0={};Object.defineProperty(Q0,"__esModule",{value:!0});var ew={};Object.defineProperty(ew,"__esModule",{value:!0});var tw={};Object.defineProperty(tw,"__esModule",{value:!0}),function(e){var t=Se&&Se.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=Se&&Se.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Z0,e),n(Mc,e),n(Y0,e),n(J0,e),n(X0,e),n(Q0,e),n(ew,e),n(tw,e)}(Od);var Nc={},nw={},Ad={exports:{}},Dc={},Pd={},jc={},Ua={},vi={},Lo={},gi={},bi={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.ERROR_PACKET=ur.PACKET_TYPES_REVERSE=ur.PACKET_TYPES=void 0;const fr=Object.create(null);ur.PACKET_TYPES=fr,fr.open="0",fr.close="1",fr.ping="2",fr.pong="3",fr.message="4",fr.upgrade="5",fr.noop="6";const rw=Object.create(null);ur.PACKET_TYPES_REVERSE=rw,Object.keys(fr).forEach(e=>{rw[fr[e]]=e});const OD={type:"error",data:"parser error"};ur.ERROR_PACKET=OD,Object.defineProperty(bi,"__esModule",{value:!0}),bi.encodePacket=bi.encodePacketToBinary=void 0;const AD=ur,ow=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",iw=typeof ArrayBuffer=="function",aw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sw=({type:e,data:t},n,r)=>ow&&t instanceof Blob?n?r(t):cw(t,r):iw&&(t instanceof ArrayBuffer||aw(t))?n?r(t):cw(new Blob([t]),r):r(AD.PACKET_TYPES[e]+(t||""));bi.encodePacket=sw;const cw=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function lw(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Id;function PD(e,t){if(ow&&e.data instanceof Blob)return e.data.arrayBuffer().then(lw).then(t);if(iw&&(e.data instanceof ArrayBuffer||aw(e.data)))return t(lw(e.data));sw(e,!1,n=>{Id||(Id=new TextEncoder),t(Id.encode(n))})}bi.encodePacketToBinary=PD;var Fc={},wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.decode=wi.encode=void 0;const xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<xi.length;e++)za[xi.charCodeAt(e)]=e;const ID=e=>{let t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=xi[t[n]>>2],o+=xi[(t[n]&3)<<4|t[n+1]>>4],o+=xi[(t[n+1]&15)<<2|t[n+2]>>6],o+=xi[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};wi.encode=ID;const RD=e=>{let t=e.length*.75,n=e.length,r,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)i=za[e.charCodeAt(r)],a=za[e.charCodeAt(r+1)],s=za[e.charCodeAt(r+2)],c=za[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};wi.decode=RD,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.decodePacket=void 0;const Lc=ur,MD=wi,ND=typeof ArrayBuffer=="function",DD=(e,t)=>{if(typeof e!="string")return{type:"message",data:uw(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jD(e.substring(1),t)}:Lc.PACKET_TYPES_REVERSE[n]?e.length>1?{type:Lc.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:Lc.PACKET_TYPES_REVERSE[n]}:Lc.ERROR_PACKET};Fc.decodePacket=DD;const jD=(e,t)=>{if(ND){const n=(0,MD.decode)(e);return uw(n,t)}else return{base64:!0,data:e}},uw=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=bi;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=Fc;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=ur,o=String.fromCharCode(30),i=(p,d)=>{const h=p.length,m=new Array(h);let v=0;p.forEach((y,g)=>{(0,t.encodePacket)(y,!1,b=>{m[g]=b,++v===h&&d(m.join(o))})})};e.encodePayload=i;const a=(p,d)=>{const h=p.split(o),m=[];for(let v=0;v<h.length;v++){const y=(0,n.decodePacket)(h[v],d);if(m.push(y),y.type==="error")break}return m};e.decodePayload=a;function s(){return new TransformStream({transform(p,d){(0,t.encodePacketToBinary)(p,h=>{const m=h.length;let v;if(m<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,m);else if(m<65536){v=new Uint8Array(3);const y=new DataView(v.buffer);y.setUint8(0,126),y.setUint16(1,m)}else{v=new Uint8Array(9);const y=new DataView(v.buffer);y.setUint8(0,127),y.setBigUint64(1,BigInt(m))}p.data&&typeof p.data!="string"&&(v[0]|=128),d.enqueue(v),d.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((d,h)=>d+h.length,0)}function u(p,d){if(p[0].length===d)return p.shift();const h=new Uint8Array(d);let m=0;for(let v=0;v<d;v++)h[v]=p[0][m++],m===p[0].length&&(p.shift(),m=0);return p.length&&m<p[0].length&&(p[0]=p[0].slice(m)),h}function f(p,d){c||(c=new TextDecoder);const h=[];let m=0,v=-1,y=!1;return new TransformStream({transform(g,b){for(h.push(g);;){if(m===0){if(l(h)<1)break;const k=u(h,1);y=(k[0]&128)===128,v=k[0]&127,v<126?m=3:v===126?m=1:m=2}else if(m===1){if(l(h)<2)break;const k=u(h,2);v=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),m=3}else if(m===2){if(l(h)<8)break;const k=u(h,8),S=new DataView(k.buffer,k.byteOffset,k.length),$=S.getUint32(0);if($>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}v=$*Math.pow(2,32)+S.getUint32(4),m=3}else{if(l(h)<v)break;const k=u(h,v);b.enqueue((0,n.decodePacket)(y?k:c.decode(k),d)),m=0}if(v===0||v>p){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=f,e.protocol=4})(gi);function ln(e){if(e)return FD(e)}function FD(e){for(var t in ln.prototype)e[t]=ln.prototype[t];return e}ln.prototype.on=ln.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ln.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},ln.prototype.off=ln.prototype.removeListener=ln.prototype.removeAllListeners=ln.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},ln.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},ln.prototype.emitReserved=ln.prototype.emit,ln.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ln.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Si=pg(Object.freeze(Object.defineProperty({__proto__:null,Emitter:ln},Symbol.toStringTag,{value:"Module"})));var Nn={},Bo={};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.globalThisShim=void 0,Bo.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const io=Bo;function LD(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}Nn.pick=LD;const BD=io.globalThisShim.setTimeout,UD=io.globalThisShim.clearTimeout;function zD(e,t){t.useNativeTimers?(e.setTimeoutFn=BD.bind(io.globalThisShim),e.clearTimeoutFn=UD.bind(io.globalThisShim)):(e.setTimeoutFn=io.globalThisShim.setTimeout.bind(io.globalThisShim),e.clearTimeoutFn=io.globalThisShim.clearTimeout.bind(io.globalThisShim))}Nn.installTimerFunctions=zD;const qD=1.33;function HD(e){return typeof e=="string"?WD(e):Math.ceil((e.byteLength||e.size)*qD)}Nn.byteLength=HD;function WD(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}var Rd={exports:{}},Md,fw;function VD(){if(fw)return Md;fw=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;Md=function(u,f){f=f||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return f.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(f){var p=parseFloat(f[1]),d=(f[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*r;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var f=Math.abs(u);return f>=r?Math.round(u/r)+"d":f>=n?Math.round(u/n)+"h":f>=t?Math.round(u/t)+"m":f>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var f=Math.abs(u);return f>=r?l(u,f,r,"day"):f>=n?l(u,f,n,"hour"):f>=t?l(u,f,t,"minute"):f>=e?l(u,f,e,"second"):u+" ms"}function l(u,f,p,d){var h=f>=p*1.5;return Math.round(u/p)+" "+d+(h?"s":"")}return Md}function KD(e){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=VD(),n.destroy=l,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(u){let f,p=null,d,h;function m(...v){if(!m.enabled)return;const y=m,g=Number(new Date),b=g-(f||g);y.diff=b,y.prev=f,y.curr=g,f=g,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,($,C)=>{if($==="%%")return"%";k++;const P=n.formatters[C];if(typeof P=="function"){const F=v[k];$=P.call(y,F),v.splice(k,1),k--}return $}),n.formatArgs.call(y,v),(y.log||n.log).apply(y,v)}return m.namespace=u,m.useColors=n.useColors(),m.color=n.selectColor(u),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==n.namespaces&&(d=n.namespaces,h=n.enabled(u)),h),set:v=>{p=v}}),typeof n.init=="function"&&n.init(m),m}function r(u,f){const p=n(this.namespace+(typeof f>"u"?":":f)+u);return p.log=this.log,p}function o(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f;const p=(typeof u=="string"?u:"").split(/[\s,]+/),d=p.length;for(f=0;f<d;f++)p[f]&&(u=p[f].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...n.names.map(s),...n.skips.map(s).map(f=>"-"+f)].join(",");return n.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let f,p;for(f=0,p=n.skips.length;f<p;f++)if(n.skips[f].test(u))return!1;for(f=0,p=n.names.length;f<p;f++)if(n.names[f].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var GD=KD;(function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,f=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(f=u))}),c.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=GD(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Rd,Rd.exports);var dr=Rd.exports,Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.decode=Uo.encode=void 0;function ZD(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}Uo.encode=ZD;function YD(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}Uo.decode=YD;var JD=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.Transport=void 0;const XD=gi,QD=Si,ej=Nn,tj=JD(dr),nj=Uo,rj=(0,tj.default)("engine.io-client:transport");class oj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ij extends QD.Emitter{constructor(t){super(),this.writable=!1,(0,ej.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new oj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):rj("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,XD.decodePacket)(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=(0,nj.encode)(t);return n.length?"?"+n:""}}Lo.Transport=ij;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.yeast=Ir.decode=Ir.encode=void 0;const dw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Bc=64,pw={};let hw=0,ao=0,mw;function Nd(e){let t="";do t=dw[e%Bc]+t,e=Math.floor(e/Bc);while(e>0);return t}Ir.encode=Nd;function aj(e){let t=0;for(ao=0;ao<e.length;ao++)t=t*Bc+pw[e.charAt(ao)];return t}Ir.decode=aj;function sj(){const e=Nd(+new Date);return e!==mw?(hw=0,mw=e):e+"."+Nd(hw++)}for(Ir.yeast=sj;ao<Bc;ao++)pw[dw[ao]]=ao;var Ei={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.hasCORS=void 0;let yw=!1;try{yw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Uc.hasCORS=yw,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.createCookieJar=Ei.XHR=void 0;const cj=Uc,lj=Bo;function uj(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||cj.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new lj.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Ei.XHR=uj;function fj(){}Ei.createCookieJar=fj;var dj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vi,"__esModule",{value:!0}),vi.Request=vi.Polling=void 0;const pj=Lo,hj=dj(dr),mj=Ir,vw=gi,Dd=Ei,yj=Si,gw=Nn,vj=Bo,pn=(0,hj.default)("engine.io-client:polling");function gj(){}const bj=function(){return new Dd.XHR({xdomain:!1}).responseType!=null}();class wj extends pj.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const n=t&&t.forceBase64;this.supportsBinary=bj&&!n,this.opts.withCredentials&&(this.cookieJar=(0,Dd.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{pn("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(pn("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){pn("pre-pause polling complete"),--r||n()})),this.writable||(pn("we are currently writing - waiting to pause"),r++,this.once("drain",function(){pn("pre-pause writing complete"),--r||n()}))}else n()}poll(){pn("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){pn("polling got data %s",t);const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};(0,vw.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():pn('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{pn("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(pn("transport open - closing"),t()):(pn("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,vw.encodePayload)(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=(0,mj.yeast)()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Vn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){pn("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}vi.Polling=wj;class Vn extends yj.Emitter{constructor(t,n){super(),(0,gw.installTimerFunctions)(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=(0,gw.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Dd.XHR(n);try{pn("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},pn("xhr data %s",this.data),r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Vn.requestsCount++,Vn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=gj,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Vn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(vi.Request=Vn,Vn.requestsCount=0,Vn.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bw);else if(typeof addEventListener=="function"){const e="onpagehide"in vj.globalThisShim?"pagehide":"unload";addEventListener(e,bw,!1)}}function bw(){for(let e in Vn.requests)Vn.requests.hasOwnProperty(e)&&Vn.requests[e].abort()}var zc={},En={};Object.defineProperty(En,"__esModule",{value:!0}),En.defaultBinaryType=En.usingBrowserWebSocket=En.WebSocket=En.nextTick=void 0;const ww=Bo;En.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),En.WebSocket=ww.globalThisShim.WebSocket||ww.globalThisShim.MozWebSocket,En.usingBrowserWebSocket=!0,En.defaultBinaryType="arraybuffer";var xj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.WS=void 0;const Sj=Lo,Ej=Ir,_j=Nn,so=En,$j=xj(dr),kj=gi,Cj=(0,$j.default)("engine.io-client:websocket"),xw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Tj extends Sj.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=xw?{}:(0,_j.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=so.usingBrowserWebSocket&&!xw?n?new so.WebSocket(t,n):new so.WebSocket(t):new so.WebSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;(0,kj.encodePacket)(r,this.supportsBinary,i=>{const a={};so.usingBrowserWebSocket||(r.options&&(a.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{so.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{Cj("websocket closed before onclose event")}o&&(0,so.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=(0,Ej.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!so.WebSocket}}zc.WS=Tj;var qc={},Oj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qc,"__esModule",{value:!0}),qc.WT=void 0;const Aj=Lo,Pj=En,Sw=gi,qa=(0,Oj(dr).default)("engine.io-client:webtransport");class Ij extends Aj.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{qa("transport closed gracefully"),this.onClose()}).catch(t=>{qa("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,Sw.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=(0,Sw.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:s,value:c})=>{if(s){qa("session is closed");return}qa("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{qa("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this.writer.write(r).then(()=>{o&&(0,Pj.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}qc.WT=Ij,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.transports=void 0;const Rj=vi,Mj=zc,Nj=qc;Ua.transports={websocket:Mj.WS,webtransport:Nj.WT,polling:Rj.Polling};var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.parse=void 0;const Dj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Fj(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Dj.exec(e||""),i={},a=14;for(;a--;)i[jj[a]]=o[a]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Lj(i,i.path),i.queryKey=Bj(i,i.query),i}Ha.parse=Fj;function Lj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Bj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}var Uj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jc,"__esModule",{value:!0}),jc.Socket=void 0;const zj=Ua,Ew=Nn,qj=Uo,_w=Ha,Hj=Uj(dr),Wj=Si,$w=gi,Vj=En,vt=(0,Hj.default)("engine.io-client:socket");let kw=class ma extends Wj.Emitter{constructor(t,n={}){super(),this.binaryType=Vj.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,_w.parse)(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=(0,_w.parse)(n.host).host),(0,Ew.installTimerFunctions)(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,qj.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){vt('creating transport "%s"',t);const n=Object.assign({},this.opts.query);n.EIO=$w.protocol,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return vt("options: %j",r),new zj.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ma.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){vt("error while creating transport: %s",n),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){vt("setting transport %s",t.name),this.transport&&(vt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){vt('probing transport "%s"',t);let n=this.createTransport(t),r=!1;ma.priorWebsocketSuccess=!1;const o=()=>{r||(vt('probe transport "%s" opened',t),n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(vt('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ma.priorWebsocketSuccess=n.name==="websocket",vt('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(vt("changing transport and sending upgrade packet"),u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{vt('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){r||(r=!0,u(),n.close(),n=null)}const a=f=>{const p=new Error("probe error: "+f);p.transport=n.name,i(),vt('probe transport "%s" failed because of error: %s',t,f),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(f){n&&f.name!==n.name&&(vt('"%s" works - aborting "%s"',f.name,n.name),i())}const u=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",a),n.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(vt("socket open"),this.readyState="open",ma.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){vt("starting upgrade probes");let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(vt('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else vt('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();vt("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=(0,Ew.byteLength)(o)),r>0&&n>this.maxPayload)return vt("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);n+=2}return vt("payload size is %d (max: %d)",n,this.maxPayload),this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),vt("socket closing - telling transport to close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){vt("socket error %j",t),ma.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(vt('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;r<o;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};jc.Socket=kw,kw.protocol=$w.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=jc;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Lo;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Ua;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Ha;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=En;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Pd);var Kj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.url=void 0;const Gj=Pd,Cw=Kj(dr).default("socket.io-client:url");function Zj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(Cw("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),Cw("parse %s",e),r=Gj.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}Dc.url=Zj;var Hc={},Wa={},Wc={},_i={},zo={};Object.defineProperty(zo,"__esModule",{value:!0}),zo.hasBinary=zo.isBinary=void 0;const Yj=typeof ArrayBuffer=="function",Jj=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Tw=Object.prototype.toString,Xj=typeof Blob=="function"||typeof Blob<"u"&&Tw.call(Blob)==="[object BlobConstructor]",Qj=typeof File=="function"||typeof File<"u"&&Tw.call(File)==="[object FileConstructor]";function Ow(e){return Yj&&(e instanceof ArrayBuffer||Jj(e))||Xj&&e instanceof Blob||Qj&&e instanceof File}zo.isBinary=Ow;function Vc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Vc(e[n]))return!0;return!1}if(Ow(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Vc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Vc(e[n]))return!0;return!1}zo.hasBinary=Vc,Object.defineProperty(_i,"__esModule",{value:!0}),_i.reconstructPacket=_i.deconstructPacket=void 0;const eF=zo;function tF(e){const t=[],n=e.data,r=e;return r.data=jd(n,t),r.attachments=t.length,{packet:r,buffers:t}}_i.deconstructPacket=tF;function jd(e,t){if(!e)return e;if((0,eF.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=jd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=jd(e[r],t));return n}return e}function nF(e,t){return e.data=Fd(e.data,t),delete e.attachments,e}_i.reconstructPacket=nF;function Fd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Fd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Fd(e[n],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Si,n=_i,r=zo,i=(0,dr.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(d){this.replacer=d}encode(d){return i("encoding packet %j",d),(d.type===s.EVENT||d.type===s.ACK)&&(0,r.hasBinary)(d)?this.encodeAsBinary({type:d.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===s.BINARY_EVENT||d.type===s.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),i("encoded %j as %s",d,h),h}encodeAsBinary(d){const h=(0,n.deconstructPacket)(d),m=this.encodeAsString(h.packet),v=h.buffers;return v.unshift(m),v}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const m=h.type===s.BINARY_EVENT;m||h.type===s.BINARY_ACK?(h.type=m?s.EVENT:s.ACK,this.reconstructor=new f(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,r.isBinary)(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const m={type:Number(d.charAt(0))};if(s[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===s.BINARY_EVENT||m.type===s.BINARY_ACK){const y=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const g=d.substring(y,h);if(g!=Number(g)||d.charAt(h)!=="-")throw new Error("Illegal attachments");m.attachments=Number(g)}if(d.charAt(h+1)==="/"){const y=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););m.nsp=d.substring(y,h)}else m.nsp="/";const v=d.charAt(h+1);if(v!==""&&Number(v)==v){const y=h+1;for(;++h;){const g=d.charAt(h);if(g==null||Number(g)!=g){--h;break}if(h===d.length)break}m.id=Number(d.substring(y,h+1))}if(d.charAt(++h)){const y=this.tryParse(d.substr(h));if(u.isPayloadValid(m.type,y))m.data=y;else throw new Error("invalid payload")}return i("decoded %s as %j",d,m),m}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class f{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(Wc);var Va={};Object.defineProperty(Va,"__esModule",{value:!0}),Va.on=void 0;function rF(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Va.on=rF;var oF=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.Socket=void 0;const Kn=Wc,Kc=Va,iF=Si,Ot=oF(dr).default("socket.io-client:socket"),aF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class sF extends iF.Emitter{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Kc.on(t,"open",this.onopen.bind(this)),Kc.on(t,"packet",this.onpacket.bind(this)),Kc.on(t,"error",this.onerror.bind(this)),Kc.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(aF.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Kn.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Ot("emitting packet with ack id %d",a);const s=n.pop();this._registerAckCallback(a,s),r.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?Ot("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(Ot("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Ot("event with ack id %d has timed out after %d ms",t,o),n.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((a,s)=>r?a?i(a):o(s):o(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(Ot("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(o)):(Ot("packet [%d] was successfully sent",r.id),this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(Ot("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Ot("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Ot("sending packet [%d] (try n°%d)",n.id,n.tryCount),this.flags=n.flags,this.emit.apply(this,n.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){Ot("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Kn.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){Ot("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Kn.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Kn.PacketType.EVENT:case Kn.PacketType.BINARY_EVENT:this.onevent(t);break;case Kn.PacketType.ACK:case Kn.PacketType.BINARY_ACK:this.onack(t);break;case Kn.PacketType.DISCONNECT:this.ondisconnect();break;case Kn.PacketType.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];Ot("emitting event %j",n),t.id!=null&&(Ot("attaching ack callback to event"),n.push(this.ack(t.id))),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,Ot("sending ack %j",o),n.packet({type:Kn.PacketType.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Ot("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Ot("bad ack %s",t.id)}onconnect(t,n){Ot("socket connected with id %s",t),this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){Ot("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Ot("performing disconnect (%s)",this.nsp),this.packet({type:Kn.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}Wa.Socket=sF;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.Backoff=void 0;function $i(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gc.Backoff=$i,$i.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},$i.prototype.reset=function(){this.attempts=0},$i.prototype.setMin=function(e){this.ms=e},$i.prototype.setMax=function(e){this.max=e},$i.prototype.setJitter=function(e){this.jitter=e};var cF=Se&&Se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lF=Se&&Se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uF=Se&&Se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&cF(t,e,n);return lF(t,e),t},fF=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.Manager=void 0;const Ld=Pd,dF=Wa,pF=uF(Wc),qo=Va,hF=Gc,mF=Si,Wt=fF(dr).default("socket.io-client:manager");class yF extends mF.Emitter{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ld.installTimerFunctions(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new hF.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||pF;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(Wt("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Wt("opening %s",this.uri),this.engine=new Ld.Socket(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=qo.on(n,"open",function(){r.onopen(),t&&t()}),i=s=>{Wt("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=qo.on(n,"error",i);if(this._timeout!==!1){const s=this._timeout;Wt("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Wt("connect attempt timed out after %d",s),o(),i(new Error("timeout")),n.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Wt("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qo.on(t,"ping",this.onping.bind(this)),qo.on(t,"data",this.ondata.bind(this)),qo.on(t,"error",this.onerror.bind(this)),qo.on(t,"close",this.onclose.bind(this)),qo.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ld.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Wt("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new dF.Socket(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active){Wt("socket %s is still active, skipping close",r);return}this._close()}_packet(t){Wt("writing packet %j",t);const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){Wt("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Wt("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){Wt("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Wt("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();Wt("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(Wt("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Wt("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Wt("reconnect success"),t.onreconnect())}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}Hc.Manager=yF,function(e,t){var n=Se&&Se.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=Dc,o=Hc;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Wa;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=n(dr).default("socket.io-client"),c={};function l(f,p){typeof f=="object"&&(p=f,f=void 0),p=p||{};const d=r.url(f,p.path||"/socket.io"),h=d.source,m=d.id,v=d.path,y=c[m]&&v in c[m].nsps,g=p.forceNew||p["force new connection"]||p.multiplex===!1||y;let b;return g?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[m]||(s("new io instance for %s",h),c[m]=new o.Manager(h,p)),b=c[m]),d.query&&!p.query&&(p.query=d.queryKey),b.socket(d.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=Wc;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Ad,Ad.exports);var vF=Ad.exports;(function(e){var t=Se&&Se.__awaiter||function(c,l,u,f){function p(d){return d instanceof u?d:new u(function(h){h(d)})}return new(u||(u=Promise))(function(d,h){function m(g){try{y(f.next(g))}catch(b){h(b)}}function v(g){try{y(f.throw(g))}catch(b){h(b)}}function y(g){g.done?d(g.value):p(g.value).then(m,v)}y((f=f.apply(c,l||[])).next())})},n=Se&&Se.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const r=Od,o=n(vF);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((f,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const d=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(d),f(h)})),this.socket.on("connect_error",h=>{var m;(m=this.socket)===null||m===void 0||m.close(),clearTimeout(d),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var m;this.pending[h.request]&&(!((m=h.data)===null||m===void 0)&&m.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var f;return t(this,void 0,void 0,function*(){if(!(!((f=this.socket)===null||f===void 0)&&f.connected))throw new Error("Client is disconnected");const p=this.random(32),d=new Promise((h,m)=>{this.pending[p]={resolve:h,reject:m}});return this.socket.send({request:p,type:l,data:u}),d})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let f="";for(let p=0;p<l;p++)f+=u.charAt(Math.floor(Math.random()*u.length));return f}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends r.Emitter{}e.SocketComEmitter=s})(nw);var Zc={},gF=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.SocketEmitter=void 0;class bF{constructor(){this.listeners={}}on(t,n){const r=this.listeners[t];r?r.push(n):this.listeners[t]=[n]}removeListeners(t){this.listeners[t]=[]}emit(t,n){return gF(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}}Zc.SocketEmitter=bF;var hn=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.MessagingSocket=void 0;const Aw=nw,wF=Zc;class xF extends wF.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new Aw.SocketCom(t.url),this.com.events.on(Aw.SocketComEvents.Message,n=>hn(this,void 0,void 0,function*(){n.type==="message.new"&&(yield this.emit("message",n.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,n){return hn(this,void 0,void 0,function*(){const r=n?{userData:JSON.stringify(n)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},r);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return hn(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return hn(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return hn(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(n.id)),n})}startConversation(t){return hn(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.delete",{id:t||this._conversationId});return n&&(yield this.switchConversation(void 0)),n})}listConversations(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return hn(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return hn(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}Nc.MessagingSocket=xF,function(e){var t=Se&&Se.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=Se&&Se.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Od,e),n(Nc,e)}(G0);class SF{constructor(t){he(this,"socket");he(this,"clientId");he(this,"apiUrl");he(this,"userId");he(this,"conversationId");he(this,"userToken");he(this,"connected",!1);he(this,"emitter");he(this,"on");he(this,"mode","messaging");this.socket=new G0.MessagingSocket(t),this.emitter=new jf,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",n=>{const r=n.payload;if(r.type==="trigger")switch(r.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",r.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",r.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",r.trigger.event);break}else{const o=uc.parse(r),{payload:i,disableInput:a}=wf(o);this.emitter.emit("message",{...n,payload:i,disableInput:a})}}),this.socket.on("conversation",n=>{this.emitter.emit("conversation",n)})}async connect(t,n){if(this.connected)return;this.connected=!0;const r=await this.socket.connect(t,n).catch(o=>{throw this.connected=!1,o});return this.userId=r.userId,this.userToken=r.userToken,r}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(r=>r.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(r=>{const o=uc.parse(r.payload),{payload:i,disableInput:a}=wf(o);return{...r,payload:i,disableInput:a}})}}function Pw(e,t){return function(){return e.apply(t,arguments)}}const{toString:Iw}=Object.prototype,{getPrototypeOf:Bd}=Object,Ud=(e=>t=>{const n=Iw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rr=e=>(e=e.toLowerCase(),t=>Ud(t)===e),Yc=e=>t=>typeof t===e,{isArray:ki}=Array,Ka=Yc("undefined");function EF(e){return e!==null&&!Ka(e)&&e.constructor!==null&&!Ka(e.constructor)&&Ho(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rw=Rr("ArrayBuffer");function _F(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rw(e.buffer),t}const $F=Yc("string"),Ho=Yc("function"),Mw=Yc("number"),zd=e=>e!==null&&typeof e=="object",kF=e=>e===!0||e===!1,Jc=e=>{if(Ud(e)!=="object")return!1;const t=Bd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},CF=Rr("Date"),TF=Rr("File"),OF=Rr("Blob"),AF=Rr("FileList"),PF=e=>zd(e)&&Ho(e.pipe),IF=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Iw.call(e)===t||Ho(e.toString)&&e.toString()===t)},RF=Rr("URLSearchParams"),MF=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ki(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Nw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Dw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),jw=e=>!Ka(e)&&e!==Dw;function qd(){const{caseless:e}=jw(this)&&this||{},t={},n=(r,o)=>{const i=e&&Nw(t,o)||o;Jc(t[i])&&Jc(r)?t[i]=qd(t[i],r):Jc(r)?t[i]=qd({},r):ki(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ga(arguments[r],n);return t}const NF=(e,t,n,{allOwnKeys:r}={})=>(Ga(t,(o,i)=>{n&&Ho(o)?e[i]=Pw(o,n):e[i]=o},{allOwnKeys:r}),e),DF=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jF=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},FF=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Bd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LF=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},BF=e=>{if(!e)return null;if(ki(e))return e;let t=e.length;if(!Mw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},UF=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bd(Uint8Array)),zF=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qF=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},HF=Rr("HTMLFormElement"),WF=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Fw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),VF=Rr("RegExp"),Lw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ga(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ki,isArrayBuffer:Rw,isBuffer:EF,isFormData:IF,isArrayBufferView:_F,isString:$F,isNumber:Mw,isBoolean:kF,isObject:zd,isPlainObject:Jc,isUndefined:Ka,isDate:CF,isFile:TF,isBlob:OF,isRegExp:VF,isFunction:Ho,isStream:PF,isURLSearchParams:RF,isTypedArray:UF,isFileList:AF,forEach:Ga,merge:qd,extend:NF,trim:MF,stripBOM:DF,inherits:jF,toFlatObject:FF,kindOf:Ud,kindOfTest:Rr,endsWith:LF,toArray:BF,forEachEntry:zF,matchAll:qF,isHTMLForm:HF,hasOwnProperty:Fw,hasOwnProp:Fw,reduceDescriptors:Lw,freezeMethods:e=>{Lw(e,(t,n)=>{if(Ho(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ho(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ki(e)?r(e):r(String(e).split(t)),n},toCamelCase:WF,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Nw,global:Dw,isContextDefined:jw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(zd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ki(r)?[]:{};return Ga(r,(a,s)=>{const c=n(a,o+1);!Ka(c)&&(i[s]=c)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ge(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Bw=Ge.prototype,Uw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uw[e]={value:e}}),Object.defineProperties(Ge,Uw),Object.defineProperty(Bw,"isAxiosError",{value:!0}),Ge.from=(e,t,n,r,o,i)=>{const a=Object.create(Bw);return Y.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var KF=typeof self=="object"?self.FormData:window.FormData;const GF=Ue(KF);function Hd(e){return Y.isPlainObject(e)||Y.isArray(e)}function zw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function qw(e,t,n){return e?e.concat(t).map(function(o,i){return o=zw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ZF(e){return Y.isArray(e)&&!e.some(Hd)}const YF=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function JF(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Xc(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(GF||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!Y.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&JF(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!c&&Y.isBlob(h))throw new Ge("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let y=h;if(h&&!v&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&ZF(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(y=Y.toArray(h)))return m=zw(m),y.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?qw([m],k,i):a===null?m:m+"[]",l(b))}),!1}return Hd(h)?!0:(t.append(qw(v,m,i),l(h)),!1)}const f=[],p=Object.assign(YF,{defaultVisitor:u,convertValue:l,isVisitable:Hd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(y,g){(!(Y.isUndefined(y)||y===null)&&o.call(t,y,Y.isString(g)?g.trim():g,m,p))===!0&&d(y,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function Hw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wd(e,t){this._pairs=[],e&&Xc(e,this,t)}const Ww=Wd.prototype;Ww.append=function(t,n){this._pairs.push([t,n])},Ww.toString=function(t){const n=t?function(r){return t.call(this,r,Hw)}:Hw;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function XF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vw(e,t,n){if(!t)return e;const r=n&&n.encode||XF,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new Wd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class QF{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Kw=QF,Gw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eL=typeof URLSearchParams<"u"?URLSearchParams:Wd,tL=FormData,nL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),rL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pr={isBrowser:!0,classes:{URLSearchParams:eL,FormData:tL,Blob},isStandardBrowserEnv:nL,isStandardBrowserWebWorkerEnv:rL,protocols:["http","https","file","blob","url","data"]};function oL(e,t){return Xc(e,new pr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return pr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function iL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function aL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Zw(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),c=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,c?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=aL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(iL(r),o,n,0)}),n}return null}const sL={"Content-Type":void 0};function cL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qc={transitional:Gw,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(Zw(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Xc(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),cL(t)):t}],transformResponse:[function(t){const n=this.transitional||Qc.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ge.from(s,Ge.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){Qc.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){Qc.headers[t]=Y.merge(sL)});const Vd=Qc,lL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uL=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
54
|
+
`))}function c(d,h,m,v){const y=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(d,{...v,before:i,after:i});return g(),y(),b}function l(d,h){return X2(d,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("table");for(;++y<v.length;)g[y]=f(v[y],h,m);return b(),g}function f(d,h,m){const v=d.children;let y=-1;const g=[],b=h.enter("tableRow");for(;++y<v.length;)g[y]=c(v[y],d,h,m);return b(),g}function p(d,h,m){let v=D0.inlineCode(d,h,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function BN(){return{exit:{taskListCheckValueChecked:F0,taskListCheckValueUnchecked:F0,paragraph:zN}}}function UN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:qN}}}function F0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function zN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function qN(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let c=D0.listItem(e,t,n,{...r,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function HN(){return[x2(),R2(),K2(),RN(),BN()]}function VN(e){return{extensions:[S2(),M2(),G2(),LN(e),UN()]}}const WN={tokenize:XN,partial:!0},L0={tokenize:QN,partial:!0},B0={tokenize:eD,partial:!0},U0={tokenize:tD,partial:!0},KN={tokenize:nD,partial:!0},z0={tokenize:YN,previous:H0},q0={tokenize:JN,previous:V0},Pr={tokenize:ZN,previous:W0},lr={};function GN(){return{text:lr}}let Fo=48;for(;Fo<123;)lr[Fo]=Pr,Fo++,Fo===58?Fo=65:Fo===91&&(Fo=97);lr[43]=Pr,lr[45]=Pr,lr[46]=Pr,lr[95]=Pr,lr[72]=[Pr,q0],lr[104]=[Pr,q0],lr[87]=[Pr,z0],lr[119]=[Pr,z0];function ZN(e,t,n){const r=this;let o,i;return a;function a(f){return!Cd(f)||!W0.call(r,r.previous)||Td(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Cd(f)?(e.consume(f),s):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(KN,u,l)(f):f===45||f===95||Xt(f)?(i=!0,e.consume(f),c):u(f)}function l(f){return e.consume(f),o=!0,c}function u(f){return i&&o&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function YN(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!H0.call(r,r.previous)||Td(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(WN,e.attempt(L0,e.attempt(B0,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function JN(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&V0.call(r,r.previous)&&!Td(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(cn(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),i?l:(i=!0,c)):n(f)}function l(f){return f===null||gc(f)||st(f)||jo(f)||bc(f)?n(f):e.attempt(L0,e.attempt(B0,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function XN(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function QN(e,t,n){let r,o,i;return a;function a(l){return l===46||l===95?e.check(U0,c,s)(l):l===null||st(l)||jo(l)||l!==45&&bc(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?r=!0:(o=r,r=void 0),e.consume(l),a}function c(l){return o||r||!i?n(l):t(l)}}function eD(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(U0,t,i)(a):a===null||st(a)||jo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function tD(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||st(s)||jo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||st(s)||jo(s)?t(s):r(s)}function i(s){return cn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):cn(s)?(e.consume(s),a):n(s)}}function nD(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Xt(i)?n(i):t(i)}}function H0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function V0(e){return!cn(e)}function W0(e){return!(e===47||Cd(e))}function Cd(e){return e===43||e===45||e===46||e===95||Xt(e)}function Td(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const rD={tokenize:fD,partial:!0};function oD(){return{document:{91:{tokenize:cD,continuation:{tokenize:lD},exit:uD}},text:{91:{tokenize:sD},93:{add:"after",tokenize:iD,resolveTo:aD}}}}function iD(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const c=r.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return n(c);const l=Vn(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function aD(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(i>999||f===93&&!a||f===null||f===91||st(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Vn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return st(f)||(a=!0),i++,e.consume(f),f===92?u:l}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,l):l(f)}}function cD(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||st(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Vn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return st(h)||(s=!0),a++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ve(e,d,"gfmFootnoteDefinitionWhitespace")):n(h)}function d(h){return t(h)}}function lD(e,t,n){return e.check(ja,t,e.attempt(rD,t,n))}function uD(e){e.exit("gfmFootnoteDefinition")}function fD(e,t,n){const r=this;return Ve(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function dD(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},f={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Sn(p,p.length,0,xc(d,a.slice(l+1,c),s)),Sn(p,p.length,0,[["exit",f,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),Sn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let f=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),d(h))}function d(h){const m=wc(l);if(h===126)return f>1?c(h):(a.consume(h),f++,d);if(f<2&&!n)return c(h);const v=a.exit("strikethroughSequenceTemporary"),y=wc(h);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,s(h)}}}class pD{constructor(){this.map=[]}add(t,n,r){hD(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function hD(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function mD(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function yD(){return{flow:{null:{tokenize:vD,resolveAll:gD}}}}function vD(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const U=r.events[M][1].type;if(U==="lineEnding"||U==="linePrefix")M--;else break}const R=M>-1?r.events[M][1].type:null,j=R==="tableHead"||R==="tableRow"?$:c;return j===$&&r.parser.lazy[r.now().line]?n(T):j(T)}function c(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):$e(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Le(T)?Ve(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||st(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,Le(T)?Ve(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?v(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),m):S(T)}function m(T){return Le(T)?Ve(e,v,"whitespace")(T):v(T)}function v(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),y):T===45?(i+=1,y(T)):T===null||$e(T)?k(T):S(T)}function y(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):S(T)}function g(T){return T===45?(e.consume(T),g):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(T))}function b(T){return Le(T)?Ve(e,k,"whitespace")(T):k(T)}function k(T){return T===124?h(T):T===null||$e(T)?!a||o!==i?S(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):S(T)}function S(T){return n(T)}function $(T){return e.enter("tableRow"),O(T)}function O(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),O):T===null||$e(T)?(e.exit("tableRow"),t(T)):Le(T)?Ve(e,O,"whitespace")(T):(e.enter("data"),I(T))}function I(T){return T===null||T===124||st(T)?(e.exit("data"),O(T)):(e.consume(T),T===92?B:I)}function B(T){return T===92||T===124?(e.consume(T),I):I(T)}}function gD(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,f;const p=new pD;for(;++n<e.length;){const d=e[n],h=d[1];d[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(K0(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Rc(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,c=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],f=Rc(p,t,i,o,n,f)):a[1]!==0&&(f=Rc(p,t,a,o,n,f)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&K0(p,t,c,l,u),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=mD(t.events,n))}return e}function Rc(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},yi(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=yi(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const l=yi(t.events,n[2]),u=yi(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},yi(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function K0(e,t,n,r,o){const i=[],a=yi(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function yi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bD={tokenize:xD};function wD(){return{text:{91:bD}}}function xD(e,t,n){const r=this;return o;function o(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return st(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Le(c)?e.check({tokenize:SD},t,n)(c):n(c)}}function SD(e,t,n){return Ve(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function ED(e){return Sb([GN(),oD(),dD(e),yD(),wD()])}const _D={};function $D(e){const t=this,n=e||_D,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(ED(n)),i.push(HN()),a.push(VN(n))}const ct={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpComposerVoiceButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},kD=({text:e})=>{const{message:{blocks:{text:t}}}=ct,n={h1:({node:r,...o})=>L.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:r,...o})=>L.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:r,...o})=>L.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...o})=>L.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:r,...o})=>L.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:r,...o})=>L.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:r,...o})=>L.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:r,...o})=>L.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...o})=>L.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:r,...o})=>L.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:r,...o})=>L.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:r,...o})=>L.jsx("br",{...o,...t==null?void 0:t.lineBreak}),pre:({node:r,...o})=>L.jsx("pre",{...o,...t==null?void 0:t.pre})};return L.jsx(d2,{components:n,remarkPlugins:[$D,w2],children:e})};var G0={},Od={},Z0={};Object.defineProperty(Z0,"__esModule",{value:!0});var Mc={},CD=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.Emitter=void 0;let TD=class{constructor(){this.listeners={}}on(t,n,r=!1){const o=this.listeners[t];o?r?o.unshift(n):o.push(n):this.listeners[t]=[n]}emit(t,n){return CD(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}};Mc.Emitter=TD;var Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});var J0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(J0);var X0={};Object.defineProperty(X0,"__esModule",{value:!0});var Q0={};Object.defineProperty(Q0,"__esModule",{value:!0});var ew={};Object.defineProperty(ew,"__esModule",{value:!0});var tw={};Object.defineProperty(tw,"__esModule",{value:!0}),function(e){var t=Se&&Se.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=Se&&Se.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Z0,e),n(Mc,e),n(Y0,e),n(J0,e),n(X0,e),n(Q0,e),n(ew,e),n(tw,e)}(Od);var Nc={},nw={},Ad={exports:{}},Dc={},Pd={},jc={},Ua={},vi={},Lo={},gi={},bi={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.ERROR_PACKET=ur.PACKET_TYPES_REVERSE=ur.PACKET_TYPES=void 0;const fr=Object.create(null);ur.PACKET_TYPES=fr,fr.open="0",fr.close="1",fr.ping="2",fr.pong="3",fr.message="4",fr.upgrade="5",fr.noop="6";const rw=Object.create(null);ur.PACKET_TYPES_REVERSE=rw,Object.keys(fr).forEach(e=>{rw[fr[e]]=e});const OD={type:"error",data:"parser error"};ur.ERROR_PACKET=OD,Object.defineProperty(bi,"__esModule",{value:!0}),bi.encodePacket=bi.encodePacketToBinary=void 0;const AD=ur,ow=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",iw=typeof ArrayBuffer=="function",aw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sw=({type:e,data:t},n,r)=>ow&&t instanceof Blob?n?r(t):cw(t,r):iw&&(t instanceof ArrayBuffer||aw(t))?n?r(t):cw(new Blob([t]),r):r(AD.PACKET_TYPES[e]+(t||""));bi.encodePacket=sw;const cw=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function lw(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Id;function PD(e,t){if(ow&&e.data instanceof Blob)return e.data.arrayBuffer().then(lw).then(t);if(iw&&(e.data instanceof ArrayBuffer||aw(e.data)))return t(lw(e.data));sw(e,!1,n=>{Id||(Id=new TextEncoder),t(Id.encode(n))})}bi.encodePacketToBinary=PD;var Fc={},wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.decode=wi.encode=void 0;const xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<xi.length;e++)za[xi.charCodeAt(e)]=e;const ID=e=>{let t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=xi[t[n]>>2],o+=xi[(t[n]&3)<<4|t[n+1]>>4],o+=xi[(t[n+1]&15)<<2|t[n+2]>>6],o+=xi[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};wi.encode=ID;const RD=e=>{let t=e.length*.75,n=e.length,r,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)i=za[e.charCodeAt(r)],a=za[e.charCodeAt(r+1)],s=za[e.charCodeAt(r+2)],c=za[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};wi.decode=RD,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.decodePacket=void 0;const Lc=ur,MD=wi,ND=typeof ArrayBuffer=="function",DD=(e,t)=>{if(typeof e!="string")return{type:"message",data:uw(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jD(e.substring(1),t)}:Lc.PACKET_TYPES_REVERSE[n]?e.length>1?{type:Lc.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:Lc.PACKET_TYPES_REVERSE[n]}:Lc.ERROR_PACKET};Fc.decodePacket=DD;const jD=(e,t)=>{if(ND){const n=(0,MD.decode)(e);return uw(n,t)}else return{base64:!0,data:e}},uw=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=bi;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=Fc;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=ur,o=String.fromCharCode(30),i=(p,d)=>{const h=p.length,m=new Array(h);let v=0;p.forEach((y,g)=>{(0,t.encodePacket)(y,!1,b=>{m[g]=b,++v===h&&d(m.join(o))})})};e.encodePayload=i;const a=(p,d)=>{const h=p.split(o),m=[];for(let v=0;v<h.length;v++){const y=(0,n.decodePacket)(h[v],d);if(m.push(y),y.type==="error")break}return m};e.decodePayload=a;function s(){return new TransformStream({transform(p,d){(0,t.encodePacketToBinary)(p,h=>{const m=h.length;let v;if(m<126)v=new Uint8Array(1),new DataView(v.buffer).setUint8(0,m);else if(m<65536){v=new Uint8Array(3);const y=new DataView(v.buffer);y.setUint8(0,126),y.setUint16(1,m)}else{v=new Uint8Array(9);const y=new DataView(v.buffer);y.setUint8(0,127),y.setBigUint64(1,BigInt(m))}p.data&&typeof p.data!="string"&&(v[0]|=128),d.enqueue(v),d.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((d,h)=>d+h.length,0)}function u(p,d){if(p[0].length===d)return p.shift();const h=new Uint8Array(d);let m=0;for(let v=0;v<d;v++)h[v]=p[0][m++],m===p[0].length&&(p.shift(),m=0);return p.length&&m<p[0].length&&(p[0]=p[0].slice(m)),h}function f(p,d){c||(c=new TextDecoder);const h=[];let m=0,v=-1,y=!1;return new TransformStream({transform(g,b){for(h.push(g);;){if(m===0){if(l(h)<1)break;const k=u(h,1);y=(k[0]&128)===128,v=k[0]&127,v<126?m=3:v===126?m=1:m=2}else if(m===1){if(l(h)<2)break;const k=u(h,2);v=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),m=3}else if(m===2){if(l(h)<8)break;const k=u(h,8),S=new DataView(k.buffer,k.byteOffset,k.length),$=S.getUint32(0);if($>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}v=$*Math.pow(2,32)+S.getUint32(4),m=3}else{if(l(h)<v)break;const k=u(h,v);b.enqueue((0,n.decodePacket)(y?k:c.decode(k),d)),m=0}if(v===0||v>p){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=f,e.protocol=4})(gi);function ln(e){if(e)return FD(e)}function FD(e){for(var t in ln.prototype)e[t]=ln.prototype[t];return e}ln.prototype.on=ln.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ln.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},ln.prototype.off=ln.prototype.removeListener=ln.prototype.removeAllListeners=ln.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},ln.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},ln.prototype.emitReserved=ln.prototype.emit,ln.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ln.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Si=pg(Object.freeze(Object.defineProperty({__proto__:null,Emitter:ln},Symbol.toStringTag,{value:"Module"})));var Nn={},Bo={};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.globalThisShim=void 0,Bo.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const io=Bo;function LD(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}Nn.pick=LD;const BD=io.globalThisShim.setTimeout,UD=io.globalThisShim.clearTimeout;function zD(e,t){t.useNativeTimers?(e.setTimeoutFn=BD.bind(io.globalThisShim),e.clearTimeoutFn=UD.bind(io.globalThisShim)):(e.setTimeoutFn=io.globalThisShim.setTimeout.bind(io.globalThisShim),e.clearTimeoutFn=io.globalThisShim.clearTimeout.bind(io.globalThisShim))}Nn.installTimerFunctions=zD;const qD=1.33;function HD(e){return typeof e=="string"?VD(e):Math.ceil((e.byteLength||e.size)*qD)}Nn.byteLength=HD;function VD(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}var Rd={exports:{}},Md,fw;function WD(){if(fw)return Md;fw=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;Md=function(u,f){f=f||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return f.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(f){var p=parseFloat(f[1]),d=(f[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*r;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var f=Math.abs(u);return f>=r?Math.round(u/r)+"d":f>=n?Math.round(u/n)+"h":f>=t?Math.round(u/t)+"m":f>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var f=Math.abs(u);return f>=r?l(u,f,r,"day"):f>=n?l(u,f,n,"hour"):f>=t?l(u,f,t,"minute"):f>=e?l(u,f,e,"second"):u+" ms"}function l(u,f,p,d){var h=f>=p*1.5;return Math.round(u/p)+" "+d+(h?"s":"")}return Md}function KD(e){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=WD(),n.destroy=l,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(u){let f,p=null,d,h;function m(...v){if(!m.enabled)return;const y=m,g=Number(new Date),b=g-(f||g);y.diff=b,y.prev=f,y.curr=g,f=g,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,($,O)=>{if($==="%%")return"%";k++;const I=n.formatters[O];if(typeof I=="function"){const B=v[k];$=I.call(y,B),v.splice(k,1),k--}return $}),n.formatArgs.call(y,v),(y.log||n.log).apply(y,v)}return m.namespace=u,m.useColors=n.useColors(),m.color=n.selectColor(u),m.extend=r,m.destroy=n.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(d!==n.namespaces&&(d=n.namespaces,h=n.enabled(u)),h),set:v=>{p=v}}),typeof n.init=="function"&&n.init(m),m}function r(u,f){const p=n(this.namespace+(typeof f>"u"?":":f)+u);return p.log=this.log,p}function o(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let f;const p=(typeof u=="string"?u:"").split(/[\s,]+/),d=p.length;for(f=0;f<d;f++)p[f]&&(u=p[f].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...n.names.map(s),...n.skips.map(s).map(f=>"-"+f)].join(",");return n.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let f,p;for(f=0,p=n.skips.length;f<p;f++)if(n.skips[f].test(u))return!1;for(f=0,p=n.names.length;f<p;f++)if(n.names[f].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var GD=KD;(function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,f=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(f=u))}),c.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=GD(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Rd,Rd.exports);var dr=Rd.exports,Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.decode=Uo.encode=void 0;function ZD(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}Uo.encode=ZD;function YD(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}Uo.decode=YD;var JD=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.Transport=void 0;const XD=gi,QD=Si,ej=Nn,tj=JD(dr),nj=Uo,rj=(0,tj.default)("engine.io-client:transport");class oj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ij extends QD.Emitter{constructor(t){super(),this.writable=!1,(0,ej.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new oj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):rj("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=(0,XD.decodePacket)(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=(0,nj.encode)(t);return n.length?"?"+n:""}}Lo.Transport=ij;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.yeast=Ir.decode=Ir.encode=void 0;const dw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Bc=64,pw={};let hw=0,ao=0,mw;function Nd(e){let t="";do t=dw[e%Bc]+t,e=Math.floor(e/Bc);while(e>0);return t}Ir.encode=Nd;function aj(e){let t=0;for(ao=0;ao<e.length;ao++)t=t*Bc+pw[e.charAt(ao)];return t}Ir.decode=aj;function sj(){const e=Nd(+new Date);return e!==mw?(hw=0,mw=e):e+"."+Nd(hw++)}for(Ir.yeast=sj;ao<Bc;ao++)pw[dw[ao]]=ao;var Ei={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.hasCORS=void 0;let yw=!1;try{yw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Uc.hasCORS=yw,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.createCookieJar=Ei.XHR=void 0;const cj=Uc,lj=Bo;function uj(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||cj.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new lj.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Ei.XHR=uj;function fj(){}Ei.createCookieJar=fj;var dj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vi,"__esModule",{value:!0}),vi.Request=vi.Polling=void 0;const pj=Lo,hj=dj(dr),mj=Ir,vw=gi,Dd=Ei,yj=Si,gw=Nn,vj=Bo,pn=(0,hj.default)("engine.io-client:polling");function gj(){}const bj=function(){return new Dd.XHR({xdomain:!1}).responseType!=null}();class wj extends pj.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const n=t&&t.forceBase64;this.supportsBinary=bj&&!n,this.opts.withCredentials&&(this.cookieJar=(0,Dd.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{pn("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(pn("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){pn("pre-pause polling complete"),--r||n()})),this.writable||(pn("we are currently writing - waiting to pause"),r++,this.once("drain",function(){pn("pre-pause writing complete"),--r||n()}))}else n()}poll(){pn("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){pn("polling got data %s",t);const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};(0,vw.decodePayload)(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():pn('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{pn("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(pn("transport open - closing"),t()):(pn("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,vw.encodePayload)(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=(0,mj.yeast)()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Wn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){pn("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}vi.Polling=wj;class Wn extends yj.Emitter{constructor(t,n){super(),(0,gw.installTimerFunctions)(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=(0,gw.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Dd.XHR(n);try{pn("xhr open %s: %s",this.method,this.uri),r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},pn("xhr data %s",this.data),r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Wn.requestsCount++,Wn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=gj,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Wn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(vi.Request=Wn,Wn.requestsCount=0,Wn.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",bw);else if(typeof addEventListener=="function"){const e="onpagehide"in vj.globalThisShim?"pagehide":"unload";addEventListener(e,bw,!1)}}function bw(){for(let e in Wn.requests)Wn.requests.hasOwnProperty(e)&&Wn.requests[e].abort()}var zc={},En={};Object.defineProperty(En,"__esModule",{value:!0}),En.defaultBinaryType=En.usingBrowserWebSocket=En.WebSocket=En.nextTick=void 0;const ww=Bo;En.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),En.WebSocket=ww.globalThisShim.WebSocket||ww.globalThisShim.MozWebSocket,En.usingBrowserWebSocket=!0,En.defaultBinaryType="arraybuffer";var xj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.WS=void 0;const Sj=Lo,Ej=Ir,_j=Nn,so=En,$j=xj(dr),kj=gi,Cj=(0,$j.default)("engine.io-client:websocket"),xw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Tj extends Sj.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=xw?{}:(0,_j.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=so.usingBrowserWebSocket&&!xw?n?new so.WebSocket(t,n):new so.WebSocket(t):new so.WebSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;(0,kj.encodePacket)(r,this.supportsBinary,i=>{const a={};so.usingBrowserWebSocket||(r.options&&(a.compress=r.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{so.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{Cj("websocket closed before onclose event")}o&&(0,so.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=(0,Ej.yeast)()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!so.WebSocket}}zc.WS=Tj;var qc={},Oj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qc,"__esModule",{value:!0}),qc.WT=void 0;const Aj=Lo,Pj=En,Sw=gi,qa=(0,Oj(dr).default)("engine.io-client:webtransport");class Ij extends Aj.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{qa("transport closed gracefully"),this.onClose()}).catch(t=>{qa("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=(0,Sw.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=(0,Sw.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:s,value:c})=>{if(s){qa("session is closed");return}qa("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{qa("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this.writer.write(r).then(()=>{o&&(0,Pj.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}qc.WT=Ij,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.transports=void 0;const Rj=vi,Mj=zc,Nj=qc;Ua.transports={websocket:Mj.WS,webtransport:Nj.WT,polling:Rj.Polling};var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.parse=void 0;const Dj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Fj(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Dj.exec(e||""),i={},a=14;for(;a--;)i[jj[a]]=o[a]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Lj(i,i.path),i.queryKey=Bj(i,i.query),i}Ha.parse=Fj;function Lj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Bj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}var Uj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jc,"__esModule",{value:!0}),jc.Socket=void 0;const zj=Ua,Ew=Nn,qj=Uo,_w=Ha,Hj=Uj(dr),Vj=Si,$w=gi,Wj=En,vt=(0,Hj.default)("engine.io-client:socket");let kw=class ma extends Vj.Emitter{constructor(t,n={}){super(),this.binaryType=Wj.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=(0,_w.parse)(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=(0,_w.parse)(n.host).host),(0,Ew.installTimerFunctions)(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,qj.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){vt('creating transport "%s"',t);const n=Object.assign({},this.opts.query);n.EIO=$w.protocol,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return vt("options: %j",r),new zj.transports[t](r)}open(){let t;if(this.opts.rememberUpgrade&&ma.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){vt("error while creating transport: %s",n),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){vt("setting transport %s",t.name),this.transport&&(vt("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){vt('probing transport "%s"',t);let n=this.createTransport(t),r=!1;ma.priorWebsocketSuccess=!1;const o=()=>{r||(vt('probe transport "%s" opened',t),n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(vt('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ma.priorWebsocketSuccess=n.name==="websocket",vt('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{r||this.readyState!=="closed"&&(vt("changing transport and sending upgrade packet"),u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{vt('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){r||(r=!0,u(),n.close(),n=null)}const a=f=>{const p=new Error("probe error: "+f);p.transport=n.name,i(),vt('probe transport "%s" failed because of error: %s',t,f),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(f){n&&f.name!==n.name&&(vt('"%s" works - aborting "%s"',f.name,n.name),i())}const u=()=>{n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",a),n.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(vt("socket open"),this.readyState="open",ma.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){vt("starting upgrade probes");let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(vt('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else vt('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();vt("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=(0,Ew.byteLength)(o)),r>0&&n>this.maxPayload)return vt("only send %d out of %d packets",r,this.writeBuffer.length),this.writeBuffer.slice(0,r);n+=2}return vt("payload size is %d (max: %d)",n,this.maxPayload),this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),vt("socket closing - telling transport to close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){vt("socket error %j",t),ma.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(vt('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;r<o;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};jc.Socket=kw,kw.protocol=$w.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=jc;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Lo;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=Ua;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Ha;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=En;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Pd);var Kj=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.url=void 0;const Gj=Pd,Cw=Kj(dr).default("socket.io-client:url");function Zj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(Cw("protocol-less url %s",e),typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),Cw("parse %s",e),r=Gj.parse(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}Dc.url=Zj;var Hc={},Va={},Vc={},_i={},zo={};Object.defineProperty(zo,"__esModule",{value:!0}),zo.hasBinary=zo.isBinary=void 0;const Yj=typeof ArrayBuffer=="function",Jj=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Tw=Object.prototype.toString,Xj=typeof Blob=="function"||typeof Blob<"u"&&Tw.call(Blob)==="[object BlobConstructor]",Qj=typeof File=="function"||typeof File<"u"&&Tw.call(File)==="[object FileConstructor]";function Ow(e){return Yj&&(e instanceof ArrayBuffer||Jj(e))||Xj&&e instanceof Blob||Qj&&e instanceof File}zo.isBinary=Ow;function Wc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wc(e[n]))return!0;return!1}if(Ow(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wc(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wc(e[n]))return!0;return!1}zo.hasBinary=Wc,Object.defineProperty(_i,"__esModule",{value:!0}),_i.reconstructPacket=_i.deconstructPacket=void 0;const eF=zo;function tF(e){const t=[],n=e.data,r=e;return r.data=jd(n,t),r.attachments=t.length,{packet:r,buffers:t}}_i.deconstructPacket=tF;function jd(e,t){if(!e)return e;if((0,eF.isBinary)(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=jd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=jd(e[r],t));return n}return e}function nF(e,t){return e.data=Fd(e.data,t),delete e.attachments,e}_i.reconstructPacket=nF;function Fd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Fd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Fd(e[n],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Si,n=_i,r=zo,i=(0,dr.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(d){this.replacer=d}encode(d){return i("encoding packet %j",d),(d.type===s.EVENT||d.type===s.ACK)&&(0,r.hasBinary)(d)?this.encodeAsBinary({type:d.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===s.BINARY_EVENT||d.type===s.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),i("encoded %j as %s",d,h),h}encodeAsBinary(d){const h=(0,n.deconstructPacket)(d),m=this.encodeAsString(h.packet),v=h.buffers;return v.unshift(m),v}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const m=h.type===s.BINARY_EVENT;m||h.type===s.BINARY_ACK?(h.type=m?s.EVENT:s.ACK,this.reconstructor=new f(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,r.isBinary)(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const m={type:Number(d.charAt(0))};if(s[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===s.BINARY_EVENT||m.type===s.BINARY_ACK){const y=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const g=d.substring(y,h);if(g!=Number(g)||d.charAt(h)!=="-")throw new Error("Illegal attachments");m.attachments=Number(g)}if(d.charAt(h+1)==="/"){const y=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););m.nsp=d.substring(y,h)}else m.nsp="/";const v=d.charAt(h+1);if(v!==""&&Number(v)==v){const y=h+1;for(;++h;){const g=d.charAt(h);if(g==null||Number(g)!=g){--h;break}if(h===d.length)break}m.id=Number(d.substring(y,h+1))}if(d.charAt(++h)){const y=this.tryParse(d.substr(h));if(u.isPayloadValid(m.type,y))m.data=y;else throw new Error("invalid payload")}return i("decoded %s as %j",d,m),m}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class f{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(Vc);var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.on=void 0;function rF(e,t,n){return e.on(t,n),function(){e.off(t,n)}}Wa.on=rF;var oF=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Va,"__esModule",{value:!0}),Va.Socket=void 0;const Kn=Vc,Kc=Wa,iF=Si,Ot=oF(dr).default("socket.io-client:socket"),aF=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class sF extends iF.Emitter{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Kc.on(t,"open",this.onopen.bind(this)),Kc.on(t,"packet",this.onpacket.bind(this)),Kc.on(t,"error",this.onerror.bind(this)),Kc.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(aF.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Kn.PacketType.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++;Ot("emitting packet with ack id %d",a);const s=n.pop();this._registerAckCallback(a,s),r.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?Ot("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(Ot("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));Ot("event with ack id %d has timed out after %d ms",t,o),n.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...a])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((a,s)=>r?a?i(a):o(s):o(a)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(Ot("packet [%d] is discarded after %d tries",r.id,r.tryCount),this._queue.shift(),n&&n(o)):(Ot("packet [%d] was successfully sent",r.id),this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(Ot("draining queue"),!this.connected||this._queue.length===0)return;const n=this._queue[0];if(n.pending&&!t){Ot("packet [%d] has already been sent and is waiting for an ack",n.id);return}n.pending=!0,n.tryCount++,Ot("sending packet [%d] (try n°%d)",n.id,n.tryCount),this.flags=n.flags,this.emit.apply(this,n.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){Ot("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Kn.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){Ot("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Kn.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Kn.PacketType.EVENT:case Kn.PacketType.BINARY_EVENT:this.onevent(t);break;case Kn.PacketType.ACK:case Kn.PacketType.BINARY_ACK:this.onack(t);break;case Kn.PacketType.DISCONNECT:this.ondisconnect();break;case Kn.PacketType.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];Ot("emitting event %j",n),t.id!=null&&(Ot("attaching ack callback to event"),n.push(this.ack(t.id))),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,Ot("sending ack %j",o),n.packet({type:Kn.PacketType.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"?(Ot("calling ack %s with %j",t.id,t.data),n.apply(this,t.data),delete this.acks[t.id]):Ot("bad ack %s",t.id)}onconnect(t,n){Ot("socket connected with id %s",t),this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){Ot("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Ot("performing disconnect (%s)",this.nsp),this.packet({type:Kn.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}Va.Socket=sF;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.Backoff=void 0;function $i(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gc.Backoff=$i,$i.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},$i.prototype.reset=function(){this.attempts=0},$i.prototype.setMin=function(e){this.ms=e},$i.prototype.setMax=function(e){this.max=e},$i.prototype.setJitter=function(e){this.jitter=e};var cF=Se&&Se.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lF=Se&&Se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uF=Se&&Se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&cF(t,e,n);return lF(t,e),t},fF=Se&&Se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.Manager=void 0;const Ld=Pd,dF=Va,pF=uF(Vc),qo=Wa,hF=Gc,mF=Si,Vt=fF(dr).default("socket.io-client:manager");class yF extends mF.Emitter{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ld.installTimerFunctions(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new hF.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||pF;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(Vt("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Vt("opening %s",this.uri),this.engine=new Ld.Socket(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=qo.on(n,"open",function(){r.onopen(),t&&t()}),i=s=>{Vt("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=qo.on(n,"error",i);if(this._timeout!==!1){const s=this._timeout;Vt("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Vt("connect attempt timed out after %d",s),o(),i(new Error("timeout")),n.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Vt("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(qo.on(t,"ping",this.onping.bind(this)),qo.on(t,"data",this.ondata.bind(this)),qo.on(t,"error",this.onerror.bind(this)),qo.on(t,"close",this.onclose.bind(this)),qo.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ld.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Vt("error",t),this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new dF.Socket(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active){Vt("socket %s is still active, skipping close",r);return}this._close()}_packet(t){Vt("writing packet %j",t);const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){Vt("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Vt("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){Vt("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Vt("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();Vt("will wait %dms before reconnect attempt",n),this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(Vt("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Vt("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Vt("reconnect success"),t.onreconnect())}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}Hc.Manager=yF,function(e,t){var n=Se&&Se.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=Dc,o=Hc;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Va;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=n(dr).default("socket.io-client"),c={};function l(f,p){typeof f=="object"&&(p=f,f=void 0),p=p||{};const d=r.url(f,p.path||"/socket.io"),h=d.source,m=d.id,v=d.path,y=c[m]&&v in c[m].nsps,g=p.forceNew||p["force new connection"]||p.multiplex===!1||y;let b;return g?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[m]||(s("new io instance for %s",h),c[m]=new o.Manager(h,p)),b=c[m]),d.query&&!p.query&&(p.query=d.queryKey),b.socket(d.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=Vc;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Ad,Ad.exports);var vF=Ad.exports;(function(e){var t=Se&&Se.__awaiter||function(c,l,u,f){function p(d){return d instanceof u?d:new u(function(h){h(d)})}return new(u||(u=Promise))(function(d,h){function m(g){try{y(f.next(g))}catch(b){h(b)}}function v(g){try{y(f.throw(g))}catch(b){h(b)}}function y(g){g.done?d(g.value):p(g.value).then(m,v)}y((f=f.apply(c,l||[])).next())})},n=Se&&Se.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const r=Od,o=n(vF);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((f,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const d=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(d),f(h)})),this.socket.on("connect_error",h=>{var m;(m=this.socket)===null||m===void 0||m.close(),clearTimeout(d),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var m;this.pending[h.request]&&(!((m=h.data)===null||m===void 0)&&m.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var f;return t(this,void 0,void 0,function*(){if(!(!((f=this.socket)===null||f===void 0)&&f.connected))throw new Error("Client is disconnected");const p=this.random(32),d=new Promise((h,m)=>{this.pending[p]={resolve:h,reject:m}});return this.socket.send({request:p,type:l,data:u}),d})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let f="";for(let p=0;p<l;p++)f+=u.charAt(Math.floor(Math.random()*u.length));return f}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends r.Emitter{}e.SocketComEmitter=s})(nw);var Zc={},gF=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.SocketEmitter=void 0;class bF{constructor(){this.listeners={}}on(t,n){const r=this.listeners[t];r?r.push(n):this.listeners[t]=[n]}removeListeners(t){this.listeners[t]=[]}emit(t,n){return gF(this,void 0,void 0,function*(){const r=this.listeners[t];if(r!=null&&r.length){for(const o of r)yield o(n);return!0}else return!1})}}Zc.SocketEmitter=bF;var hn=Se&&Se.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.MessagingSocket=void 0;const Aw=nw,wF=Zc;class xF extends wF.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new Aw.SocketCom(t.url),this.com.events.on(Aw.SocketComEvents.Message,n=>hn(this,void 0,void 0,function*(){n.type==="message.new"&&(yield this.emit("message",n.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,n){return hn(this,void 0,void 0,function*(){const r=n?{userData:JSON.stringify(n)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},r);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return hn(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return hn(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return hn(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(n.id)),n})}startConversation(t){return hn(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return hn(this,void 0,void 0,function*(){const n=yield this.request("conversations.delete",{id:t||this._conversationId});return n&&(yield this.switchConversation(void 0)),n})}listConversations(t){return hn(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return hn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return hn(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,n){return hn(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:n})})}request(t,n){return this.com.request(t,n)}}Nc.MessagingSocket=xF,function(e){var t=Se&&Se.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=Se&&Se.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Od,e),n(Nc,e)}(G0);class SF{constructor(t){he(this,"socket");he(this,"clientId");he(this,"apiUrl");he(this,"userId");he(this,"conversationId");he(this,"userToken");he(this,"connected",!1);he(this,"emitter");he(this,"on");he(this,"mode","messaging");this.socket=new G0.MessagingSocket(t),this.emitter=new jf,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",n=>{const r=n.payload;if(r.type==="trigger")switch(r.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",r.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",r.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",r.trigger.event);break}else{const o=uc.parse(r),{payload:i,disableInput:a}=wf(o);this.emitter.emit("message",{...n,payload:i,disableInput:a})}}),this.socket.on("conversation",n=>{this.emitter.emit("conversation",n)})}async connect(t,n){if(this.connected)return;this.connected=!0;const r=await this.socket.connect(t,n).catch(o=>{throw this.connected=!1,o});return this.userId=r.userId,this.userToken=r.userToken,r}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(r=>r.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(r=>{const o=uc.parse(r.payload),{payload:i,disableInput:a}=wf(o);return{...r,payload:i,disableInput:a}})}}function Pw(e,t){return function(){return e.apply(t,arguments)}}const{toString:Iw}=Object.prototype,{getPrototypeOf:Bd}=Object,Ud=(e=>t=>{const n=Iw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rr=e=>(e=e.toLowerCase(),t=>Ud(t)===e),Yc=e=>t=>typeof t===e,{isArray:ki}=Array,Ka=Yc("undefined");function EF(e){return e!==null&&!Ka(e)&&e.constructor!==null&&!Ka(e.constructor)&&Ho(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Rw=Rr("ArrayBuffer");function _F(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Rw(e.buffer),t}const $F=Yc("string"),Ho=Yc("function"),Mw=Yc("number"),zd=e=>e!==null&&typeof e=="object",kF=e=>e===!0||e===!1,Jc=e=>{if(Ud(e)!=="object")return!1;const t=Bd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},CF=Rr("Date"),TF=Rr("File"),OF=Rr("Blob"),AF=Rr("FileList"),PF=e=>zd(e)&&Ho(e.pipe),IF=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Iw.call(e)===t||Ho(e.toString)&&e.toString()===t)},RF=Rr("URLSearchParams"),MF=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ki(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Nw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Dw=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),jw=e=>!Ka(e)&&e!==Dw;function qd(){const{caseless:e}=jw(this)&&this||{},t={},n=(r,o)=>{const i=e&&Nw(t,o)||o;Jc(t[i])&&Jc(r)?t[i]=qd(t[i],r):Jc(r)?t[i]=qd({},r):ki(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Ga(arguments[r],n);return t}const NF=(e,t,n,{allOwnKeys:r}={})=>(Ga(t,(o,i)=>{n&&Ho(o)?e[i]=Pw(o,n):e[i]=o},{allOwnKeys:r}),e),DF=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jF=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},FF=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Bd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LF=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},BF=e=>{if(!e)return null;if(ki(e))return e;let t=e.length;if(!Mw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},UF=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bd(Uint8Array)),zF=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qF=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},HF=Rr("HTMLFormElement"),VF=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Fw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),WF=Rr("RegExp"),Lw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ga(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},Y={isArray:ki,isArrayBuffer:Rw,isBuffer:EF,isFormData:IF,isArrayBufferView:_F,isString:$F,isNumber:Mw,isBoolean:kF,isObject:zd,isPlainObject:Jc,isUndefined:Ka,isDate:CF,isFile:TF,isBlob:OF,isRegExp:WF,isFunction:Ho,isStream:PF,isURLSearchParams:RF,isTypedArray:UF,isFileList:AF,forEach:Ga,merge:qd,extend:NF,trim:MF,stripBOM:DF,inherits:jF,toFlatObject:FF,kindOf:Ud,kindOfTest:Rr,endsWith:LF,toArray:BF,forEachEntry:zF,matchAll:qF,isHTMLForm:HF,hasOwnProperty:Fw,hasOwnProp:Fw,reduceDescriptors:Lw,freezeMethods:e=>{Lw(e,(t,n)=>{if(Ho(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ho(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ki(e)?r(e):r(String(e).split(t)),n},toCamelCase:VF,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Nw,global:Dw,isContextDefined:jw,toJSONObject:e=>{const t=new Array(10),n=(r,o)=>{if(zd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ki(r)?[]:{};return Ga(r,(a,s)=>{const c=n(a,o+1);!Ka(c)&&(i[s]=c)}),t[o]=void 0,i}}return r};return n(e,0)}};function Ge(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Y.inherits(Ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Bw=Ge.prototype,Uw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Uw[e]={value:e}}),Object.defineProperties(Ge,Uw),Object.defineProperty(Bw,"isAxiosError",{value:!0}),Ge.from=(e,t,n,r,o,i)=>{const a=Object.create(Bw);return Y.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var KF=typeof self=="object"?self.FormData:window.FormData;const GF=Ue(KF);function Hd(e){return Y.isPlainObject(e)||Y.isArray(e)}function zw(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function qw(e,t,n){return e?e.concat(t).map(function(o,i){return o=zw(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ZF(e){return Y.isArray(e)&&!e.some(Hd)}const YF=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function JF(e){return e&&Y.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Xc(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new(GF||FormData),n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!Y.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&JF(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(Y.isDate(h))return h.toISOString();if(!c&&Y.isBlob(h))throw new Ge("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(h)||Y.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let y=h;if(h&&!v&&typeof h=="object"){if(Y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(Y.isArray(h)&&ZF(h)||Y.isFileList(h)||Y.endsWith(m,"[]")&&(y=Y.toArray(h)))return m=zw(m),y.forEach(function(b,k){!(Y.isUndefined(b)||b===null)&&t.append(a===!0?qw([m],k,i):a===null?m:m+"[]",l(b))}),!1}return Hd(h)?!0:(t.append(qw(v,m,i),l(h)),!1)}const f=[],p=Object.assign(YF,{defaultVisitor:u,convertValue:l,isVisitable:Hd});function d(h,m){if(!Y.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),Y.forEach(h,function(y,g){(!(Y.isUndefined(y)||y===null)&&o.call(t,y,Y.isString(g)?g.trim():g,m,p))===!0&&d(y,m?m.concat(g):[g])}),f.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return d(e),t}function Hw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Vd(e,t){this._pairs=[],e&&Xc(e,this,t)}const Vw=Vd.prototype;Vw.append=function(t,n){this._pairs.push([t,n])},Vw.toString=function(t){const n=t?function(r){return t.call(this,r,Hw)}:Hw;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function XF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ww(e,t,n){if(!t)return e;const r=n&&n.encode||XF,o=n&&n.serialize;let i;if(o?i=o(t,n):i=Y.isURLSearchParams(t)?t.toString():new Vd(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class QF{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Kw=QF,Gw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eL=typeof URLSearchParams<"u"?URLSearchParams:Vd,tL=FormData,nL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),rL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pr={isBrowser:!0,classes:{URLSearchParams:eL,FormData:tL,Blob},isStandardBrowserEnv:nL,isStandardBrowserWebWorkerEnv:rL,protocols:["http","https","file","blob","url","data"]};function oL(e,t){return Xc(e,new pr.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return pr.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function iL(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function aL(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Zw(e){function t(n,r,o,i){let a=n[i++];const s=Number.isFinite(+a),c=i>=n.length;return a=!a&&Y.isArray(o)?o.length:a,c?(Y.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!Y.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&Y.isArray(o[a])&&(o[a]=aL(o[a])),!s)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,o)=>{t(iL(r),o,n,0)}),n}return null}const sL={"Content-Type":void 0};function cL(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qc={transitional:Gw,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return o&&o?JSON.stringify(Zw(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oL(t,this.formSerializer).toString();if((s=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Xc(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),cL(t)):t}],transformResponse:[function(t){const n=this.transitional||Qc.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&Y.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Ge.from(s,Ge.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){Qc.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){Qc.headers[t]=Y.merge(sL)});const Wd=Qc,lL=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uL=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
55
55
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&lL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Yw=Symbol("internals");function Za(e){return e&&String(e).trim().toLowerCase()}function el(e){return e===!1||e==null?e:Y.isArray(e)?e.map(el):String(e)}function fL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function dL(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Jw(e,t,n,r){if(Y.isFunction(r))return r.call(this,t,n);if(Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function pL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function hL(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class tl{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,c,l){const u=Za(c);if(!u)throw new Error("header name must be a non-empty string");const f=Y.findKey(o,u);(!f||o[f]===void 0||l===!0||l===void 0&&o[f]!==!1)&&(o[f||c]=el(s))}const a=(s,c)=>Y.forEach(s,(l,u)=>i(l,u,c));return Y.isPlainObject(t)||t instanceof this.constructor?a(t,n):Y.isString(t)&&(t=t.trim())&&!dL(t)?a(uL(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Za(t),t){const r=Y.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return fL(o);if(Y.isFunction(n))return n.call(this,o,r);if(Y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Za(t),t){const r=Y.findKey(this,t);return!!(r&&(!n||Jw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=Za(a),a){const s=Y.findKey(r,a);s&&(!n||Jw(r,r[s],s,n))&&(delete r[s],o=!0)}}return Y.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return Y.forEach(this,(o,i)=>{const a=Y.findKey(r,i);if(a){n[a]=el(o),delete n[i];return}const s=t?pL(i):String(i).trim();s!==i&&delete n[i],n[s]=el(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
56
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Yw]=this[Yw]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Za(a);r[s]||(hL(o,a),r[s]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}tl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Y.freezeMethods(tl.prototype),Y.freezeMethods(tl);const Mr=tl;function Kd(e,t){const n=this||Vd,r=t||n,o=Mr.from(r.headers);let i=r.data;return Y.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Xw(e){return!!(e&&e.__CANCEL__)}function Ya(e,t,n){Ge.call(this,e??"canceled",Ge.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Ya,Ge,{__CANCEL__:!0});const mL=null;function yL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ge("Request failed with status code "+n.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vL=pr.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const c=[];c.push(n+"="+encodeURIComponent(r)),Y.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),Y.isString(i)&&c.push("path="+i),Y.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function gL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Qw(e,t){return e&&!gL(t)?bL(e,t):t}const wL=pr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Y.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function xL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function SL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];a||(a=l),n[o]=c,r[o]=l;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const d=u&&l-u;return d?Math.round(p*1e3/d):void 0}}function ex(e,t){let n=0;const r=SL(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s),l=i<=a;n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const nl={http:mL,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Mr.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}Y.isFormData(o)&&(pr.isStandardBrowserEnv||pr.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(d+":"+h))}const u=Qw(e.baseURL,e.url);l.open(e.method.toUpperCase(),Vw(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Mr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};yL(function(y){n(y),c()},function(y){r(y),c()},m),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new Ge("Request aborted",Ge.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new Ge("Network Error",Ge.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Gw;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new Ge(h,m.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,e,l)),l=null},pr.isStandardBrowserEnv){const d=(e.withCredentials||wL(u))&&e.xsrfCookieName&&vL.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&Y.forEach(i.toJSON(),function(h,m){l.setRequestHeader(m,h)}),Y.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",ex(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",ex(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ya(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=xL(u);if(p&&pr.protocols.indexOf(p)===-1){r(new Ge("Unsupported protocol "+p+":",Ge.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};Y.forEach(nl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const EL={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=Y.isString(n)?nl[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new Ge(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(nl,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:nl};function Gd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ya(null,e)}function tx(e){return Gd(e),e.headers=Mr.from(e.headers),e.data=Kd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),EL.getAdapter(e.adapter||Vd.adapter)(e).then(function(r){return Gd(e),r.data=Kd.call(e,e.transformResponse,r),r.headers=Mr.from(r.headers),r},function(r){return Xw(r)||(Gd(e),r&&r.response&&(r.response.data=Kd.call(e,e.transformResponse,r.response),r.response.headers=Mr.from(r.response.headers))),Promise.reject(r)})}const nx=e=>e instanceof Mr?e.toJSON():e;function Ci(e,t){t=t||{};const n={};function r(l,u,f){return Y.isPlainObject(l)&&Y.isPlainObject(u)?Y.merge.call({caseless:f},l,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function o(l,u,f){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l,f)}else return r(l,u,f)}function i(l,u){if(!Y.isUndefined(u))return r(void 0,u)}function a(l,u){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,f){if(f in t)return r(l,u);if(f in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(nx(l),nx(u),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=c[u]||o,p=f(e[u],t[u],u);Y.isUndefined(p)&&f!==s||(n[u]=p)}),n}const rx="1.2.5",Zd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ox={};Zd.transitional=function(t,n,r){function o(i,a){return"[Axios v"+rx+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Ge(o(a," has been removed"+(n?" in "+n:"")),Ge.ERR_DEPRECATED);return n&&!ox[a]&&(ox[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function _L(e,t,n){if(typeof e!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new Ge("option "+i+" must be "+c,Ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ge("Unknown option "+i,Ge.ERR_BAD_OPTION)}}const Yd={assertOptions:_L,validators:Zd},co=Yd.validators;class rl{constructor(t){this.defaults=t,this.interceptors={request:new Kw,response:new Kw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ci(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Yd.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),o!==void 0&&Yd.assertOptions(o,{encode:co.function,serialize:co.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&Y.merge(i.common,i[n.method]),a&&Y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Mr.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,f=0,p;if(!c){const h=[tx.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let d=n;for(f=0;f<p;){const h=s[f++],m=s[f++];try{d=h(d)}catch(v){m.call(this,v);break}}try{u=tx.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,p=l.length;f<p;)u=u.then(l[f++],l[f++]);return u}getUri(t){t=Ci(this.defaults,t);const n=Qw(t.baseURL,t.url);return Vw(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){rl.prototype[t]=function(n,r){return this.request(Ci(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(Ci(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}rl.prototype[t]=n(),rl.prototype[t+"Form"]=n(!0)});const ol=rl;class Jd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Ya(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Jd(function(o){t=o}),cancel:t}}}const $L=Jd;function kL(e){return function(n){return e.apply(null,n)}}function CL(e){return Y.isObject(e)&&e.isAxiosError===!0}const Xd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xd).forEach(([e,t])=>{Xd[t]=e});const TL=Xd;function ix(e){const t=new ol(e),n=Pw(ol.prototype.request,t);return Y.extend(n,ol.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ix(Ci(e,o))},n}const At=ix(Vd);At.Axios=ol,At.CanceledError=Ya,At.CancelToken=$L,At.isCancel=Xw,At.VERSION=rx,At.toFormData=Xc,At.AxiosError=Ge,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=kL,At.isAxiosError=CL,At.mergeConfig=Ci,At.AxiosHeaders=Mr,At.formToJSON=e=>Zw(Y.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=TL,At.default=At;const ax=At,sx={},OL=Object.freeze(Object.defineProperty({__proto__:null,default:sx},Symbol.toStringTag,{value:"Module"})),AL={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Qd=typeof window<"u"&&typeof window.document<"u"?window.crypto:sx;Qd.getRandomValues||(Qd=AL);class lt extends Error{constructor(n,r,o,i,a,s){super(i);he(this,"isApiError",!0);this.code=n,this.description=r,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=lt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(Qd.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const PL=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,ep=e=>e instanceof lt||PL(e)&&e.isApiError===!0;class Ja extends lt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class IL extends lt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class RL extends lt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class ML extends lt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class NL extends lt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class DL extends lt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class jL extends lt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class FL extends lt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class LL extends lt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class BL extends lt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class UL extends lt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class zL extends lt{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class qL extends lt{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class HL extends lt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class WL extends lt{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class VL extends lt{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class KL extends lt{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class GL extends lt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class ZL extends lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class YL extends lt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class JL extends lt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class XL extends lt{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class QL extends lt{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class e3 extends lt{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const t3={Unknown:Ja,Internal:IL,Unauthorized:RL,Forbidden:ML,PayloadTooLarge:NL,InvalidPayload:DL,UnsupportedMediaType:jL,MethodNotFound:FL,ResourceNotFound:LL,InvalidJsonSchema:BL,InvalidDataFormat:UL,InvalidIdentifier:zL,RelationConflict:qL,ReferenceConstraint:HL,ResourceLockedConflict:WL,ReferenceNotFound:VL,InvalidQuery:KL,Runtime:GL,AlreadyExists:ZL,RateLimited:YL,PaymentRequired:JL,QuotaExceeded:XL,LimitExceeded:QL,BreakingChanges:e3},cx=e=>ep(e)?e:e instanceof Error?new Ja(e.message,e):typeof e=="string"?new Ja(e):n3(e);function n3(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=t3[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Ja(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ja("An invalid error occurred: "+JSON.stringify(e))}var r3=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},lx=typeof Symbol<"u"&&Symbol,o3=r3,ux=function(){return typeof lx!="function"||typeof Symbol!="function"||typeof lx("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:o3()},tp={__proto__:null,foo:{}},i3=Object,fx=function(){return{__proto__:tp}.foo===tp.foo&&!(tp instanceof i3)},a3="Function.prototype.bind called on incompatible ",s3=Object.prototype.toString,c3=Math.max,l3="[object Function]",dx=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},u3=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},f3=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},d3=function(t){var n=this;if(typeof n!="function"||s3.apply(n)!==l3)throw new TypeError(a3+n);for(var r=u3(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,dx(r,arguments));return Object(u)===u?u:this}return n.apply(t,dx(r,arguments))},a=c3(0,n.length-r.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+f3(s,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o},p3=d3,Xa=Function.prototype.bind||p3,h3=Xa,m3=h3.call(Function.call,Object.prototype.hasOwnProperty),ze,Ti=SyntaxError,px=Function,Oi=TypeError,np=function(e){try{return px('"use strict"; return ('+e+").constructor;")()}catch{}},Wo=Object.getOwnPropertyDescriptor;if(Wo)try{Wo({},"")}catch{Wo=null}var rp=function(){throw new Oi},y3=Wo?function(){try{return arguments.callee,rp}catch{try{return Wo(arguments,"callee").get}catch{return rp}}}():rp,Ai=ux(),v3=fx(),Lt=Object.getPrototypeOf||(v3?function(e){return e.__proto__}:null),Pi={},g3=typeof Uint8Array>"u"||!Lt?ze:Lt(Uint8Array),Vo={"%AggregateError%":typeof AggregateError>"u"?ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ze:ArrayBuffer,"%ArrayIteratorPrototype%":Ai&&Lt?Lt([][Symbol.iterator]()):ze,"%AsyncFromSyncIteratorPrototype%":ze,"%AsyncFunction%":Pi,"%AsyncGenerator%":Pi,"%AsyncGeneratorFunction%":Pi,"%AsyncIteratorPrototype%":Pi,"%Atomics%":typeof Atomics>"u"?ze:Atomics,"%BigInt%":typeof BigInt>"u"?ze:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ze:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ze:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ze:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ze:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ze:FinalizationRegistry,"%Function%":px,"%GeneratorFunction%":Pi,"%Int8Array%":typeof Int8Array>"u"?ze:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ze:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ai&&Lt?Lt(Lt([][Symbol.iterator]())):ze,"%JSON%":typeof JSON=="object"?JSON:ze,"%Map%":typeof Map>"u"?ze:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ai||!Lt?ze:Lt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ze:Promise,"%Proxy%":typeof Proxy>"u"?ze:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ze:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ze:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ai||!Lt?ze:Lt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ai&&Lt?Lt(""[Symbol.iterator]()):ze,"%Symbol%":Ai?Symbol:ze,"%SyntaxError%":Ti,"%ThrowTypeError%":y3,"%TypedArray%":g3,"%TypeError%":Oi,"%Uint8Array%":typeof Uint8Array>"u"?ze:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ze:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ze:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ze:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ze:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ze:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ze:WeakSet};if(Lt)try{null.error}catch(e){var b3=Lt(Lt(e));Vo["%Error.prototype%"]=b3}var w3=function e(t){var n;if(t==="%AsyncFunction%")n=np("async function () {}");else if(t==="%GeneratorFunction%")n=np("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=np("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Lt&&(n=Lt(o.prototype))}return Vo[t]=n,n},hx={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qa=Xa,il=m3,x3=Qa.call(Function.call,Array.prototype.concat),S3=Qa.call(Function.apply,Array.prototype.splice),mx=Qa.call(Function.call,String.prototype.replace),al=Qa.call(Function.call,String.prototype.slice),E3=Qa.call(Function.call,RegExp.prototype.exec),_3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$3=/\\(\\)?/g,k3=function(t){var n=al(t,0,1),r=al(t,-1);if(n==="%"&&r!=="%")throw new Ti("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ti("invalid intrinsic syntax, expected opening `%`");var o=[];return mx(t,_3,function(i,a,s,c){o[o.length]=s?mx(c,$3,"$1"):a||i}),o},C3=function(t,n){var r=t,o;if(il(hx,r)&&(o=hx[r],r="%"+o[0]+"%"),il(Vo,r)){var i=Vo[r];if(i===Pi&&(i=w3(r)),typeof i>"u"&&!n)throw new Oi("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ti("intrinsic "+t+" does not exist!")},T3=function(t,n){if(typeof t!="string"||t.length===0)throw new Oi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Oi('"allowMissing" argument must be a boolean');if(E3(/^%?[^%]*%?$/,t)===null)throw new Ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=k3(t),o=r.length>0?r[0]:"",i=C3("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],S3(r,x3([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=al(p,0,1),h=al(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Ti("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",il(Vo,a))s=Vo[a];else if(s!=null){if(!(p in s)){if(!n)throw new Oi("base intrinsic for "+t+" exists, but the property is not available.");return}if(Wo&&u+1>=r.length){var m=Wo(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=il(s,p),s=s[p];f&&!c&&(Vo[a]=s)}}return s},O3=Error,A3=EvalError,P3=RangeError,I3=ReferenceError,R3=SyntaxError,M3=TypeError,N3=URIError,D3=Function.prototype.call,j3=Object.prototype.hasOwnProperty,F3=Xa,L3=F3.call(D3,j3),qe,B3=O3,U3=A3,z3=P3,q3=I3,Ii=R3,Ri=M3,H3=N3,yx=Function,op=function(e){try{return yx('"use strict"; return ('+e+").constructor;")()}catch{}},Ko=Object.getOwnPropertyDescriptor;if(Ko)try{Ko({},"")}catch{Ko=null}var ip=function(){throw new Ri},W3=Ko?function(){try{return arguments.callee,ip}catch{try{return Ko(arguments,"callee").get}catch{return ip}}}():ip,Mi=ux(),V3=fx(),Bt=Object.getPrototypeOf||(V3?function(e){return e.__proto__}:null),Ni={},K3=typeof Uint8Array>"u"||!Bt?qe:Bt(Uint8Array),Go={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Mi&&Bt?Bt([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":Ni,"%AsyncGenerator%":Ni,"%AsyncGeneratorFunction%":Ni,"%AsyncIteratorPrototype%":Ni,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":B3,"%eval%":eval,"%EvalError%":U3,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":yx,"%GeneratorFunction%":Ni,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mi&&Bt?Bt(Bt([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mi||!Bt?qe:Bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":z3,"%ReferenceError%":q3,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mi||!Bt?qe:Bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mi&&Bt?Bt(""[Symbol.iterator]()):qe,"%Symbol%":Mi?Symbol:qe,"%SyntaxError%":Ii,"%ThrowTypeError%":W3,"%TypedArray%":K3,"%TypeError%":Ri,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":H3,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet};if(Bt)try{null.error}catch(e){var G3=Bt(Bt(e));Go["%Error.prototype%"]=G3}var Z3=function e(t){var n;if(t==="%AsyncFunction%")n=op("async function () {}");else if(t==="%GeneratorFunction%")n=op("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=op("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Bt&&(n=Bt(o.prototype))}return Go[t]=n,n},vx={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},es=Xa,sl=L3,Y3=es.call(Function.call,Array.prototype.concat),J3=es.call(Function.apply,Array.prototype.splice),gx=es.call(Function.call,String.prototype.replace),cl=es.call(Function.call,String.prototype.slice),X3=es.call(Function.call,RegExp.prototype.exec),Q3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,e5=/\\(\\)?/g,t5=function(t){var n=cl(t,0,1),r=cl(t,-1);if(n==="%"&&r!=="%")throw new Ii("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ii("invalid intrinsic syntax, expected opening `%`");var o=[];return gx(t,Q3,function(i,a,s,c){o[o.length]=s?gx(c,e5,"$1"):a||i}),o},n5=function(t,n){var r=t,o;if(sl(vx,r)&&(o=vx[r],r="%"+o[0]+"%"),sl(Go,r)){var i=Go[r];if(i===Ni&&(i=Z3(r)),typeof i>"u"&&!n)throw new Ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ii("intrinsic "+t+" does not exist!")},bx=function(t,n){if(typeof t!="string"||t.length===0)throw new Ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ri('"allowMissing" argument must be a boolean');if(X3(/^%?[^%]*%?$/,t)===null)throw new Ii("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=t5(t),o=r.length>0?r[0]:"",i=n5("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],J3(r,Y3([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=cl(p,0,1),h=cl(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Ii("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",sl(Go,a))s=Go[a];else if(s!=null){if(!(p in s)){if(!n)throw new Ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ko&&u+1>=r.length){var m=Ko(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=sl(s,p),s=s[p];f&&!c&&(Go[a]=s)}}return s},wx={exports:{}};(function(e){var t=Xa,n=bx,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var p=i(t,o,arguments);if(a&&s){var d=a(p,"length");d.configurable&&s(p,"length",{value:1+c(0,f.length-(arguments.length-1))})}return p};var l=function(){return i(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(wx);var r5=wx.exports,xx=bx,Sx=r5,o5=Sx(xx("String.prototype.indexOf")),i5=function(t,n){var r=xx(t,!!n);return typeof r=="function"&&o5(t,".prototype.")>-1?Sx(r):r};const a5=pg(OL);var ap=typeof Map=="function"&&Map.prototype,sp=Object.getOwnPropertyDescriptor&&ap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ll=ap&&sp&&typeof sp.get=="function"?sp.get:null,Ex=ap&&Map.prototype.forEach,cp=typeof Set=="function"&&Set.prototype,lp=Object.getOwnPropertyDescriptor&&cp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ul=cp&&lp&&typeof lp.get=="function"?lp.get:null,_x=cp&&Set.prototype.forEach,s5=typeof WeakMap=="function"&&WeakMap.prototype,ts=s5?WeakMap.prototype.has:null,c5=typeof WeakSet=="function"&&WeakSet.prototype,ns=c5?WeakSet.prototype.has:null,l5=typeof WeakRef=="function"&&WeakRef.prototype,$x=l5?WeakRef.prototype.deref:null,u5=Boolean.prototype.valueOf,f5=Object.prototype.toString,d5=Function.prototype.toString,p5=String.prototype.match,up=String.prototype.slice,lo=String.prototype.replace,h5=String.prototype.toUpperCase,kx=String.prototype.toLowerCase,Cx=RegExp.prototype.test,Tx=Array.prototype.concat,hr=Array.prototype.join,m5=Array.prototype.slice,Ox=Math.floor,fp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dp=Object.getOwnPropertySymbols,pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Di=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Qt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Di||"symbol")?Symbol.toStringTag:null,Ax=Object.prototype.propertyIsEnumerable,Px=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ix(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Cx.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ox(-e):Ox(e);if(r!==e){var o=String(r),i=up.call(t,o.length+1);return lo.call(o,n,"$&_")+"."+lo.call(lo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lo.call(t,n,"$&_")}var hp=a5,Rx=hp.custom,Mx=jx(Rx)?Rx:null,y5=function e(t,n,r,o){var i=n||{};if(uo(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(uo(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=uo(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(uo(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(uo(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Lx(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?Ix(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?Ix(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return mp(t)?"[Array]":"[Object]";var f=M5(i,r);if(typeof o>"u")o=[];else if(Fx(o,t)>=0)return"[Circular]";function p(L,z,N){if(z&&(o=m5.call(o),o.push(z)),N){var D={depth:i.depth};return uo(i,"quoteStyle")&&(D.quoteStyle=i.quoteStyle),e(L,D,r+1,o)}return e(L,i,r+1,o)}if(typeof t=="function"&&!Dx(t)){var d=$5(t),h=fl(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(h.length>0?" { "+hr.call(h,", ")+" }":"")}if(jx(t)){var m=Di?lo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):pp.call(t);return typeof t=="object"&&!Di?rs(m):m}if(P5(t)){for(var v="<"+kx.call(String(t.nodeName)),y=t.attributes||[],g=0;g<y.length;g++)v+=" "+y[g].name+"="+Nx(v5(y[g].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+kx.call(String(t.nodeName))+">",v}if(mp(t)){if(t.length===0)return"[]";var b=fl(t,p);return f&&!R5(b)?"["+vp(b,f)+"]":"[ "+hr.call(b,", ")+" ]"}if(b5(t)){var k=fl(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!Ax.call(t,"cause")?"{ ["+String(t)+"] "+hr.call(Tx.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+hr.call(k,", ")+" }"}if(typeof t=="object"&&a){if(Mx&&typeof t[Mx]=="function"&&hp)return hp(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(k5(t)){var S=[];return Ex&&Ex.call(t,function(L,z){S.push(p(z,t,!0)+" => "+p(L,t))}),Bx("Map",ll.call(t),S,f)}if(O5(t)){var $=[];return _x&&_x.call(t,function(L){$.push(p(L,t))}),Bx("Set",ul.call(t),$,f)}if(C5(t))return yp("WeakMap");if(A5(t))return yp("WeakSet");if(T5(t))return yp("WeakRef");if(x5(t))return rs(p(Number(t)));if(E5(t))return rs(p(fp.call(t)));if(S5(t))return rs(u5.call(t));if(w5(t))return rs(p(String(t)));if(!g5(t)&&!Dx(t)){var C=fl(t,p),P=Px?Px(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",T=!P&&Qt&&Object(t)===t&&Qt in t?up.call(fo(t),8,-1):F?"Object":"",R=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=R+(T||F?"["+hr.call(Tx.call([],T||[],F||[]),": ")+"] ":"");return C.length===0?H+"{}":f?H+"{"+vp(C,f)+"}":H+"{ "+hr.call(C,", ")+" }"}return String(t)};function Nx(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function v5(e){return lo.call(String(e),/"/g,""")}function mp(e){return fo(e)==="[object Array]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function g5(e){return fo(e)==="[object Date]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function Dx(e){return fo(e)==="[object RegExp]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function b5(e){return fo(e)==="[object Error]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function w5(e){return fo(e)==="[object String]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function x5(e){return fo(e)==="[object Number]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function S5(e){return fo(e)==="[object Boolean]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function jx(e){if(Di)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!pp)return!1;try{return pp.call(e),!0}catch{}return!1}function E5(e){if(!e||typeof e!="object"||!fp)return!1;try{return fp.call(e),!0}catch{}return!1}var _5=Object.prototype.hasOwnProperty||function(e){return e in this};function uo(e,t){return _5.call(e,t)}function fo(e){return f5.call(e)}function $5(e){if(e.name)return e.name;var t=p5.call(d5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fx(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function k5(e){if(!ll||!e||typeof e!="object")return!1;try{ll.call(e);try{ul.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C5(e){if(!ts||!e||typeof e!="object")return!1;try{ts.call(e,ts);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function T5(e){if(!$x||!e||typeof e!="object")return!1;try{return $x.call(e),!0}catch{}return!1}function O5(e){if(!ul||!e||typeof e!="object")return!1;try{ul.call(e);try{ll.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function A5(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{ts.call(e,ts)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Lx(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Lx(up.call(e,0,t.maxStringLength),t)+r}var o=lo.call(lo.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,I5);return Nx(o,"single",t)}function I5(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+h5.call(t.toString(16))}function rs(e){return"Object("+e+")"}function yp(e){return e+" { ? }"}function Bx(e,t,n,r){var o=r?vp(n,r):hr.call(n,", ");return e+" ("+t+") {"+o+"}"}function R5(e){for(var t=0;t<e.length;t++)if(Fx(e[t],`
|
|
56
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Yw]=this[Yw]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Za(a);r[s]||(hL(o,a),r[s]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}tl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Y.freezeMethods(tl.prototype),Y.freezeMethods(tl);const Mr=tl;function Kd(e,t){const n=this||Wd,r=t||n,o=Mr.from(r.headers);let i=r.data;return Y.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Xw(e){return!!(e&&e.__CANCEL__)}function Ya(e,t,n){Ge.call(this,e??"canceled",Ge.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Ya,Ge,{__CANCEL__:!0});const mL=null;function yL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ge("Request failed with status code "+n.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const vL=pr.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,s){const c=[];c.push(n+"="+encodeURIComponent(r)),Y.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),Y.isString(i)&&c.push("path="+i),Y.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function gL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bL(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Qw(e,t){return e&&!gL(t)?bL(e,t):t}const wL=pr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=Y.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function xL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function SL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];a||(a=l),n[o]=c,r[o]=l;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const d=u&&l-u;return d?Math.round(p*1e3/d):void 0}}function ex(e,t){let n=0;const r=SL(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s),l=i<=a;n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const nl={http:mL,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Mr.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}Y.isFormData(o)&&(pr.isStandardBrowserEnv||pr.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(d+":"+h))}const u=Qw(e.baseURL,e.url);l.open(e.method.toUpperCase(),Ww(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Mr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};yL(function(y){n(y),c()},function(y){r(y),c()},m),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new Ge("Request aborted",Ge.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new Ge("Network Error",Ge.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Gw;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new Ge(h,m.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,e,l)),l=null},pr.isStandardBrowserEnv){const d=(e.withCredentials||wL(u))&&e.xsrfCookieName&&vL.read(e.xsrfCookieName);d&&i.set(e.xsrfHeaderName,d)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&Y.forEach(i.toJSON(),function(h,m){l.setRequestHeader(m,h)}),Y.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",ex(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",ex(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ya(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=xL(u);if(p&&pr.protocols.indexOf(p)===-1){r(new Ge("Unsupported protocol "+p+":",Ge.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};Y.forEach(nl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const EL={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=Y.isString(n)?nl[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new Ge(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(nl,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:nl};function Gd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ya(null,e)}function tx(e){return Gd(e),e.headers=Mr.from(e.headers),e.data=Kd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),EL.getAdapter(e.adapter||Wd.adapter)(e).then(function(r){return Gd(e),r.data=Kd.call(e,e.transformResponse,r),r.headers=Mr.from(r.headers),r},function(r){return Xw(r)||(Gd(e),r&&r.response&&(r.response.data=Kd.call(e,e.transformResponse,r.response),r.response.headers=Mr.from(r.response.headers))),Promise.reject(r)})}const nx=e=>e instanceof Mr?e.toJSON():e;function Ci(e,t){t=t||{};const n={};function r(l,u,f){return Y.isPlainObject(l)&&Y.isPlainObject(u)?Y.merge.call({caseless:f},l,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function o(l,u,f){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l,f)}else return r(l,u,f)}function i(l,u){if(!Y.isUndefined(u))return r(void 0,u)}function a(l,u){if(Y.isUndefined(u)){if(!Y.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,f){if(f in t)return r(l,u);if(f in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(nx(l),nx(u),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=c[u]||o,p=f(e[u],t[u],u);Y.isUndefined(p)&&f!==s||(n[u]=p)}),n}const rx="1.2.5",Zd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ox={};Zd.transitional=function(t,n,r){function o(i,a){return"[Axios v"+rx+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new Ge(o(a," has been removed"+(n?" in "+n:"")),Ge.ERR_DEPRECATED);return n&&!ox[a]&&(ox[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function _L(e,t,n){if(typeof e!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new Ge("option "+i+" must be "+c,Ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ge("Unknown option "+i,Ge.ERR_BAD_OPTION)}}const Yd={assertOptions:_L,validators:Zd},co=Yd.validators;class rl{constructor(t){this.defaults=t,this.interceptors={request:new Kw,response:new Kw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ci(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Yd.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),o!==void 0&&Yd.assertOptions(o,{encode:co.function,serialize:co.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a;a=i&&Y.merge(i.common,i[n.method]),a&&Y.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Mr.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,f=0,p;if(!c){const h=[tx.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let d=n;for(f=0;f<p;){const h=s[f++],m=s[f++];try{d=h(d)}catch(v){m.call(this,v);break}}try{u=tx.call(this,d)}catch(h){return Promise.reject(h)}for(f=0,p=l.length;f<p;)u=u.then(l[f++],l[f++]);return u}getUri(t){t=Ci(this.defaults,t);const n=Qw(t.baseURL,t.url);return Ww(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){rl.prototype[t]=function(n,r){return this.request(Ci(r||{},{method:t,url:n,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(Ci(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}rl.prototype[t]=n(),rl.prototype[t+"Form"]=n(!0)});const ol=rl;class Jd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Ya(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Jd(function(o){t=o}),cancel:t}}}const $L=Jd;function kL(e){return function(n){return e.apply(null,n)}}function CL(e){return Y.isObject(e)&&e.isAxiosError===!0}const Xd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xd).forEach(([e,t])=>{Xd[t]=e});const TL=Xd;function ix(e){const t=new ol(e),n=Pw(ol.prototype.request,t);return Y.extend(n,ol.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ix(Ci(e,o))},n}const At=ix(Wd);At.Axios=ol,At.CanceledError=Ya,At.CancelToken=$L,At.isCancel=Xw,At.VERSION=rx,At.toFormData=Xc,At.AxiosError=Ge,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=kL,At.isAxiosError=CL,At.mergeConfig=Ci,At.AxiosHeaders=Mr,At.formToJSON=e=>Zw(Y.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=TL,At.default=At;const ax=At,sx={},OL=Object.freeze(Object.defineProperty({__proto__:null,default:sx},Symbol.toStringTag,{value:"Module"})),AL={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Qd=typeof window<"u"&&typeof window.document<"u"?window.crypto:sx;Qd.getRandomValues||(Qd=AL);class lt extends Error{constructor(n,r,o,i,a,s){super(i);he(this,"isApiError",!0);this.code=n,this.description=r,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=lt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const n=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(Qd.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${n}_${r}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const PL=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,ep=e=>e instanceof lt||PL(e)&&e.isApiError===!0;class Ja extends lt{constructor(t,n,r){super(500,"An unknown error occurred","Unknown",t,n,r)}}class IL extends lt{constructor(t,n,r){super(500,"An internal error occurred","Internal",t,n,r)}}class RL extends lt{constructor(t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",t,n,r)}}class ML extends lt{constructor(t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,n,r)}}class NL extends lt{constructor(t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",t,n,r)}}class DL extends lt{constructor(t,n,r){super(400,"The request payload is invalid.","InvalidPayload",t,n,r)}}class jL extends lt{constructor(t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,n,r)}}class FL extends lt{constructor(t,n,r){super(405,"The requested method does not exist.","MethodNotFound",t,n,r)}}class LL extends lt{constructor(t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,n,r)}}class BL extends lt{constructor(t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,n,r)}}class UL extends lt{constructor(t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,n,r)}}class zL extends lt{constructor(t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,n,r)}}class qL extends lt{constructor(t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,n,r)}}class HL extends lt{constructor(t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,n,r)}}class VL extends lt{constructor(t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,n,r)}}class WL extends lt{constructor(t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,n,r)}}class KL extends lt{constructor(t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,n,r)}}class GL extends lt{constructor(t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,n,r)}}class ZL extends lt{constructor(t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,n,r)}}class YL extends lt{constructor(t,n,r){super(429,"The request has been rate limited.","RateLimited",t,n,r)}}class JL extends lt{constructor(t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,n,r)}}class XL extends lt{constructor(t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,n,r)}}class QL extends lt{constructor(t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,n,r)}}class e3 extends lt{constructor(t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,n,r)}}const t3={Unknown:Ja,Internal:IL,Unauthorized:RL,Forbidden:ML,PayloadTooLarge:NL,InvalidPayload:DL,UnsupportedMediaType:jL,MethodNotFound:FL,ResourceNotFound:LL,InvalidJsonSchema:BL,InvalidDataFormat:UL,InvalidIdentifier:zL,RelationConflict:qL,ReferenceConstraint:HL,ResourceLockedConflict:VL,ReferenceNotFound:WL,InvalidQuery:KL,Runtime:GL,AlreadyExists:ZL,RateLimited:YL,PaymentRequired:JL,QuotaExceeded:XL,LimitExceeded:QL,BreakingChanges:e3},cx=e=>ep(e)?e:e instanceof Error?new Ja(e.message,e):typeof e=="string"?new Ja(e):n3(e);function n3(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=t3[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Ja(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ja("An invalid error occurred: "+JSON.stringify(e))}var r3=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},lx=typeof Symbol<"u"&&Symbol,o3=r3,ux=function(){return typeof lx!="function"||typeof Symbol!="function"||typeof lx("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:o3()},tp={__proto__:null,foo:{}},i3=Object,fx=function(){return{__proto__:tp}.foo===tp.foo&&!(tp instanceof i3)},a3="Function.prototype.bind called on incompatible ",s3=Object.prototype.toString,c3=Math.max,l3="[object Function]",dx=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},u3=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},f3=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},d3=function(t){var n=this;if(typeof n!="function"||s3.apply(n)!==l3)throw new TypeError(a3+n);for(var r=u3(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,dx(r,arguments));return Object(u)===u?u:this}return n.apply(t,dx(r,arguments))},a=c3(0,n.length-r.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+f3(s,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o},p3=d3,Xa=Function.prototype.bind||p3,h3=Xa,m3=h3.call(Function.call,Object.prototype.hasOwnProperty),ze,Ti=SyntaxError,px=Function,Oi=TypeError,np=function(e){try{return px('"use strict"; return ('+e+").constructor;")()}catch{}},Vo=Object.getOwnPropertyDescriptor;if(Vo)try{Vo({},"")}catch{Vo=null}var rp=function(){throw new Oi},y3=Vo?function(){try{return arguments.callee,rp}catch{try{return Vo(arguments,"callee").get}catch{return rp}}}():rp,Ai=ux(),v3=fx(),Lt=Object.getPrototypeOf||(v3?function(e){return e.__proto__}:null),Pi={},g3=typeof Uint8Array>"u"||!Lt?ze:Lt(Uint8Array),Wo={"%AggregateError%":typeof AggregateError>"u"?ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ze:ArrayBuffer,"%ArrayIteratorPrototype%":Ai&&Lt?Lt([][Symbol.iterator]()):ze,"%AsyncFromSyncIteratorPrototype%":ze,"%AsyncFunction%":Pi,"%AsyncGenerator%":Pi,"%AsyncGeneratorFunction%":Pi,"%AsyncIteratorPrototype%":Pi,"%Atomics%":typeof Atomics>"u"?ze:Atomics,"%BigInt%":typeof BigInt>"u"?ze:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ze:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ze:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ze:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ze:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ze:FinalizationRegistry,"%Function%":px,"%GeneratorFunction%":Pi,"%Int8Array%":typeof Int8Array>"u"?ze:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ze:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ai&&Lt?Lt(Lt([][Symbol.iterator]())):ze,"%JSON%":typeof JSON=="object"?JSON:ze,"%Map%":typeof Map>"u"?ze:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ai||!Lt?ze:Lt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ze:Promise,"%Proxy%":typeof Proxy>"u"?ze:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ze:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ze:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ai||!Lt?ze:Lt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ai&&Lt?Lt(""[Symbol.iterator]()):ze,"%Symbol%":Ai?Symbol:ze,"%SyntaxError%":Ti,"%ThrowTypeError%":y3,"%TypedArray%":g3,"%TypeError%":Oi,"%Uint8Array%":typeof Uint8Array>"u"?ze:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ze:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ze:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ze:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ze:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ze:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ze:WeakSet};if(Lt)try{null.error}catch(e){var b3=Lt(Lt(e));Wo["%Error.prototype%"]=b3}var w3=function e(t){var n;if(t==="%AsyncFunction%")n=np("async function () {}");else if(t==="%GeneratorFunction%")n=np("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=np("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Lt&&(n=Lt(o.prototype))}return Wo[t]=n,n},hx={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qa=Xa,il=m3,x3=Qa.call(Function.call,Array.prototype.concat),S3=Qa.call(Function.apply,Array.prototype.splice),mx=Qa.call(Function.call,String.prototype.replace),al=Qa.call(Function.call,String.prototype.slice),E3=Qa.call(Function.call,RegExp.prototype.exec),_3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$3=/\\(\\)?/g,k3=function(t){var n=al(t,0,1),r=al(t,-1);if(n==="%"&&r!=="%")throw new Ti("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ti("invalid intrinsic syntax, expected opening `%`");var o=[];return mx(t,_3,function(i,a,s,c){o[o.length]=s?mx(c,$3,"$1"):a||i}),o},C3=function(t,n){var r=t,o;if(il(hx,r)&&(o=hx[r],r="%"+o[0]+"%"),il(Wo,r)){var i=Wo[r];if(i===Pi&&(i=w3(r)),typeof i>"u"&&!n)throw new Oi("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ti("intrinsic "+t+" does not exist!")},T3=function(t,n){if(typeof t!="string"||t.length===0)throw new Oi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Oi('"allowMissing" argument must be a boolean');if(E3(/^%?[^%]*%?$/,t)===null)throw new Ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=k3(t),o=r.length>0?r[0]:"",i=C3("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],S3(r,x3([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=al(p,0,1),h=al(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Ti("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",il(Wo,a))s=Wo[a];else if(s!=null){if(!(p in s)){if(!n)throw new Oi("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vo&&u+1>=r.length){var m=Vo(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=il(s,p),s=s[p];f&&!c&&(Wo[a]=s)}}return s},O3=Error,A3=EvalError,P3=RangeError,I3=ReferenceError,R3=SyntaxError,M3=TypeError,N3=URIError,D3=Function.prototype.call,j3=Object.prototype.hasOwnProperty,F3=Xa,L3=F3.call(D3,j3),qe,B3=O3,U3=A3,z3=P3,q3=I3,Ii=R3,Ri=M3,H3=N3,yx=Function,op=function(e){try{return yx('"use strict"; return ('+e+").constructor;")()}catch{}},Ko=Object.getOwnPropertyDescriptor;if(Ko)try{Ko({},"")}catch{Ko=null}var ip=function(){throw new Ri},V3=Ko?function(){try{return arguments.callee,ip}catch{try{return Ko(arguments,"callee").get}catch{return ip}}}():ip,Mi=ux(),W3=fx(),Bt=Object.getPrototypeOf||(W3?function(e){return e.__proto__}:null),Ni={},K3=typeof Uint8Array>"u"||!Bt?qe:Bt(Uint8Array),Go={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Mi&&Bt?Bt([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":Ni,"%AsyncGenerator%":Ni,"%AsyncGeneratorFunction%":Ni,"%AsyncIteratorPrototype%":Ni,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":B3,"%eval%":eval,"%EvalError%":U3,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":yx,"%GeneratorFunction%":Ni,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mi&&Bt?Bt(Bt([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mi||!Bt?qe:Bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":z3,"%ReferenceError%":q3,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mi||!Bt?qe:Bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mi&&Bt?Bt(""[Symbol.iterator]()):qe,"%Symbol%":Mi?Symbol:qe,"%SyntaxError%":Ii,"%ThrowTypeError%":V3,"%TypedArray%":K3,"%TypeError%":Ri,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":H3,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet};if(Bt)try{null.error}catch(e){var G3=Bt(Bt(e));Go["%Error.prototype%"]=G3}var Z3=function e(t){var n;if(t==="%AsyncFunction%")n=op("async function () {}");else if(t==="%GeneratorFunction%")n=op("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=op("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Bt&&(n=Bt(o.prototype))}return Go[t]=n,n},vx={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},es=Xa,sl=L3,Y3=es.call(Function.call,Array.prototype.concat),J3=es.call(Function.apply,Array.prototype.splice),gx=es.call(Function.call,String.prototype.replace),cl=es.call(Function.call,String.prototype.slice),X3=es.call(Function.call,RegExp.prototype.exec),Q3=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,e5=/\\(\\)?/g,t5=function(t){var n=cl(t,0,1),r=cl(t,-1);if(n==="%"&&r!=="%")throw new Ii("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ii("invalid intrinsic syntax, expected opening `%`");var o=[];return gx(t,Q3,function(i,a,s,c){o[o.length]=s?gx(c,e5,"$1"):a||i}),o},n5=function(t,n){var r=t,o;if(sl(vx,r)&&(o=vx[r],r="%"+o[0]+"%"),sl(Go,r)){var i=Go[r];if(i===Ni&&(i=Z3(r)),typeof i>"u"&&!n)throw new Ri("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ii("intrinsic "+t+" does not exist!")},bx=function(t,n){if(typeof t!="string"||t.length===0)throw new Ri("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ri('"allowMissing" argument must be a boolean');if(X3(/^%?[^%]*%?$/,t)===null)throw new Ii("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=t5(t),o=r.length>0?r[0]:"",i=n5("%"+o+"%",n),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],J3(r,Y3([0,1],l)));for(var u=1,f=!0;u<r.length;u+=1){var p=r[u],d=cl(p,0,1),h=cl(p,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Ii("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(c=!0),o+="."+p,a="%"+o+"%",sl(Go,a))s=Go[a];else if(s!=null){if(!(p in s)){if(!n)throw new Ri("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ko&&u+1>=r.length){var m=Ko(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=sl(s,p),s=s[p];f&&!c&&(Go[a]=s)}}return s},wx={exports:{}};(function(e){var t=Xa,n=bx,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var p=i(t,o,arguments);if(a&&s){var d=a(p,"length");d.configurable&&s(p,"length",{value:1+c(0,f.length-(arguments.length-1))})}return p};var l=function(){return i(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(wx);var r5=wx.exports,xx=bx,Sx=r5,o5=Sx(xx("String.prototype.indexOf")),i5=function(t,n){var r=xx(t,!!n);return typeof r=="function"&&o5(t,".prototype.")>-1?Sx(r):r};const a5=pg(OL);var ap=typeof Map=="function"&&Map.prototype,sp=Object.getOwnPropertyDescriptor&&ap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ll=ap&&sp&&typeof sp.get=="function"?sp.get:null,Ex=ap&&Map.prototype.forEach,cp=typeof Set=="function"&&Set.prototype,lp=Object.getOwnPropertyDescriptor&&cp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ul=cp&&lp&&typeof lp.get=="function"?lp.get:null,_x=cp&&Set.prototype.forEach,s5=typeof WeakMap=="function"&&WeakMap.prototype,ts=s5?WeakMap.prototype.has:null,c5=typeof WeakSet=="function"&&WeakSet.prototype,ns=c5?WeakSet.prototype.has:null,l5=typeof WeakRef=="function"&&WeakRef.prototype,$x=l5?WeakRef.prototype.deref:null,u5=Boolean.prototype.valueOf,f5=Object.prototype.toString,d5=Function.prototype.toString,p5=String.prototype.match,up=String.prototype.slice,lo=String.prototype.replace,h5=String.prototype.toUpperCase,kx=String.prototype.toLowerCase,Cx=RegExp.prototype.test,Tx=Array.prototype.concat,hr=Array.prototype.join,m5=Array.prototype.slice,Ox=Math.floor,fp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dp=Object.getOwnPropertySymbols,pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Di=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Qt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Di||"symbol")?Symbol.toStringTag:null,Ax=Object.prototype.propertyIsEnumerable,Px=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ix(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Cx.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ox(-e):Ox(e);if(r!==e){var o=String(r),i=up.call(t,o.length+1);return lo.call(o,n,"$&_")+"."+lo.call(lo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lo.call(t,n,"$&_")}var hp=a5,Rx=hp.custom,Mx=jx(Rx)?Rx:null,y5=function e(t,n,r,o){var i=n||{};if(uo(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(uo(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=uo(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(uo(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(uo(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Lx(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?Ix(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?Ix(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return mp(t)?"[Array]":"[Object]";var f=M5(i,r);if(typeof o>"u")o=[];else if(Fx(o,t)>=0)return"[Circular]";function p(j,U,D){if(U&&(o=m5.call(o),o.push(U)),D){var F={depth:i.depth};return uo(i,"quoteStyle")&&(F.quoteStyle=i.quoteStyle),e(j,F,r+1,o)}return e(j,i,r+1,o)}if(typeof t=="function"&&!Dx(t)){var d=$5(t),h=fl(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(h.length>0?" { "+hr.call(h,", ")+" }":"")}if(jx(t)){var m=Di?lo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):pp.call(t);return typeof t=="object"&&!Di?rs(m):m}if(P5(t)){for(var v="<"+kx.call(String(t.nodeName)),y=t.attributes||[],g=0;g<y.length;g++)v+=" "+y[g].name+"="+Nx(v5(y[g].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+kx.call(String(t.nodeName))+">",v}if(mp(t)){if(t.length===0)return"[]";var b=fl(t,p);return f&&!R5(b)?"["+vp(b,f)+"]":"[ "+hr.call(b,", ")+" ]"}if(b5(t)){var k=fl(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!Ax.call(t,"cause")?"{ ["+String(t)+"] "+hr.call(Tx.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+hr.call(k,", ")+" }"}if(typeof t=="object"&&a){if(Mx&&typeof t[Mx]=="function"&&hp)return hp(t,{depth:u-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(k5(t)){var S=[];return Ex&&Ex.call(t,function(j,U){S.push(p(U,t,!0)+" => "+p(j,t))}),Bx("Map",ll.call(t),S,f)}if(O5(t)){var $=[];return _x&&_x.call(t,function(j){$.push(p(j,t))}),Bx("Set",ul.call(t),$,f)}if(C5(t))return yp("WeakMap");if(A5(t))return yp("WeakSet");if(T5(t))return yp("WeakRef");if(x5(t))return rs(p(Number(t)));if(E5(t))return rs(p(fp.call(t)));if(S5(t))return rs(u5.call(t));if(w5(t))return rs(p(String(t)));if(!g5(t)&&!Dx(t)){var O=fl(t,p),I=Px?Px(t)===Object.prototype:t instanceof Object||t.constructor===Object,B=t instanceof Object?"":"null prototype",T=!I&&Qt&&Object(t)===t&&Qt in t?up.call(fo(t),8,-1):B?"Object":"",M=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",R=M+(T||B?"["+hr.call(Tx.call([],T||[],B||[]),": ")+"] ":"");return O.length===0?R+"{}":f?R+"{"+vp(O,f)+"}":R+"{ "+hr.call(O,", ")+" }"}return String(t)};function Nx(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function v5(e){return lo.call(String(e),/"/g,""")}function mp(e){return fo(e)==="[object Array]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function g5(e){return fo(e)==="[object Date]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function Dx(e){return fo(e)==="[object RegExp]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function b5(e){return fo(e)==="[object Error]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function w5(e){return fo(e)==="[object String]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function x5(e){return fo(e)==="[object Number]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function S5(e){return fo(e)==="[object Boolean]"&&(!Qt||!(typeof e=="object"&&Qt in e))}function jx(e){if(Di)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!pp)return!1;try{return pp.call(e),!0}catch{}return!1}function E5(e){if(!e||typeof e!="object"||!fp)return!1;try{return fp.call(e),!0}catch{}return!1}var _5=Object.prototype.hasOwnProperty||function(e){return e in this};function uo(e,t){return _5.call(e,t)}function fo(e){return f5.call(e)}function $5(e){if(e.name)return e.name;var t=p5.call(d5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fx(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function k5(e){if(!ll||!e||typeof e!="object")return!1;try{ll.call(e);try{ul.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C5(e){if(!ts||!e||typeof e!="object")return!1;try{ts.call(e,ts);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function T5(e){if(!$x||!e||typeof e!="object")return!1;try{return $x.call(e),!0}catch{}return!1}function O5(e){if(!ul||!e||typeof e!="object")return!1;try{ul.call(e);try{ll.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function A5(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{ts.call(e,ts)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Lx(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Lx(up.call(e,0,t.maxStringLength),t)+r}var o=lo.call(lo.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,I5);return Nx(o,"single",t)}function I5(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+h5.call(t.toString(16))}function rs(e){return"Object("+e+")"}function yp(e){return e+" { ? }"}function Bx(e,t,n,r){var o=r?vp(n,r):hr.call(n,", ");return e+" ("+t+") {"+o+"}"}function R5(e){for(var t=0;t<e.length;t++)if(Fx(e[t],`
|
|
57
57
|
`)>=0)return!1;return!0}function M5(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=hr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:hr.call(Array(t+1),n)}}function vp(e,t){if(e.length===0)return"";var n=`
|
|
58
58
|
`+t.prev+t.base;return n+hr.call(e,","+n)+`
|
|
59
|
-
`+t.prev}function fl(e,t){var n=mp(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=uo(e,o)?t(e[o],e):""}var i=typeof dp=="function"?dp(e):[],a;if(Di){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)uo(e,c)&&(n&&String(Number(c))===c&&c<e.length||Di&&a["$"+c]instanceof Symbol||(Cx.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof dp=="function")for(var l=0;l<i.length;l++)Ax.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}var gp=T3,ji=i5,N5=y5,D5=gp("%TypeError%"),dl=gp("%WeakMap%",!0),pl=gp("%Map%",!0),j5=ji("WeakMap.prototype.get",!0),F5=ji("WeakMap.prototype.set",!0),L5=ji("WeakMap.prototype.has",!0),B5=ji("Map.prototype.get",!0),U5=ji("Map.prototype.set",!0),z5=ji("Map.prototype.has",!0),bp=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},q5=function(e,t){var n=bp(e,t);return n&&n.value},H5=function(e,t,n){var r=bp(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},W5=function(e,t){return!!bp(e,t)},V5=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new D5("Side channel does not contain "+N5(i))},get:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return j5(t,i)}else if(pl){if(n)return B5(n,i)}else if(r)return q5(r,i)},has:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return L5(t,i)}else if(pl){if(n)return z5(n,i)}else if(r)return W5(r,i);return!1},set:function(i,a){dl&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new dl),F5(t,i,a)):pl?(n||(n=new pl),U5(n,i,a)):(r||(r={key:{},next:null}),H5(r,i,a))}};return o},K5=String.prototype.replace,G5=/%20/g,wp={RFC1738:"RFC1738",RFC3986:"RFC3986"},xp={default:wp.RFC3986,formatters:{RFC1738:function(e){return K5.call(e,G5,"+")},RFC3986:function(e){return String(e)}},RFC1738:wp.RFC1738,RFC3986:wp.RFC3986},Z5=xp,Sp=Object.prototype.hasOwnProperty,Zo=Array.isArray,mr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Y5=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Zo(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Ux=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},J5=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Zo(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Sp.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Zo(t)&&!Zo(n)&&(o=Ux(t,r)),Zo(t)&&Zo(n)?(n.forEach(function(i,a){if(Sp.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var s=n[a];return Sp.call(i,a)?i[a]=e(i[a],s,r):i[a]=s,i},o)},X5=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Q5=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},e4=function(t,n,r,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;++c){var l=a.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===Z5.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+mr[l];continue}if(l<2048){s=s+(mr[192|l>>6]+mr[128|l&63]);continue}if(l<55296||l>=57344){s=s+(mr[224|l>>12]+mr[128|l>>6&63]+mr[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=mr[240|l>>18]+mr[128|l>>12&63]+mr[128|l>>6&63]+mr[128|l&63]}return s},t4=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:l}),r.push(u))}return Y5(n),t},n4=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},r4=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},o4=function(t,n){return[].concat(t,n)},i4=function(t,n){if(Zo(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},zx={arrayToObject:Ux,assign:X5,combine:o4,compact:t4,decode:Q5,encode:e4,isBuffer:r4,isRegExp:n4,maybeMap:i4,merge:J5},qx=V5,hl=zx,os=xp,a4=Object.prototype.hasOwnProperty,Hx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nr=Array.isArray,s4=Array.prototype.push,Wx=function(e,t){s4.apply(e,Nr(t)?t:[t])},c4=Date.prototype.toISOString,Vx=os.default,en={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:hl.encode,encodeValuesOnly:!1,format:Vx,formatter:os.formatters[Vx],indices:!1,serializeDate:function(t){return c4.call(t)},skipNulls:!1,strictNullHandling:!1},l4=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ep={},u4=function e(t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v){for(var y=t,g=v,b=0,k=!1;(g=g.get(Ep))!==void 0&&!k;){var S=g.get(t);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");k=!0}typeof g.get(Ep)>"u"&&(b=0)}if(typeof c=="function"?y=c(n,y):y instanceof Date?y=f(y):r==="comma"&&Nr(y)&&(y=hl.maybeMap(y,function(D){return D instanceof Date?f(D):D})),y===null){if(i)return s&&!h?s(n,en.encoder,m,"key",p):n;y=""}if(l4(y)||hl.isBuffer(y)){if(s){var $=h?n:s(n,en.encoder,m,"key",p);return[d($)+"="+d(s(y,en.encoder,m,"value",p))]}return[d(n)+"="+d(String(y))]}var C=[];if(typeof y>"u")return C;var P;if(r==="comma"&&Nr(y))h&&s&&(y=hl.maybeMap(y,s)),P=[{value:y.length>0?y.join(",")||null:void 0}];else if(Nr(c))P=c;else{var F=Object.keys(y);P=l?F.sort(l):F}for(var T=o&&Nr(y)&&y.length===1?n+"[]":n,R=0;R<P.length;++R){var H=P[R],L=typeof H=="object"&&typeof H.value<"u"?H.value:y[H];if(!(a&&L===null)){var z=Nr(y)?typeof r=="function"?r(T,H):T:T+(u?"."+H:"["+H+"]");v.set(t,b);var N=qx();N.set(Ep,v),Wx(C,e(L,z,r,o,i,a,r==="comma"&&h&&Nr(y)?null:s,c,l,u,f,p,d,h,m,N))}}return C},f4=function(t){if(!t)return en;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||en.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=os.default;if(typeof t.format<"u"){if(!a4.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=os.formatters[r],i=en.filter;return(typeof t.filter=="function"||Nr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:en.addQueryPrefix,allowDots:typeof t.allowDots>"u"?en.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:en.charsetSentinel,delimiter:typeof t.delimiter>"u"?en.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:en.encode,encoder:typeof t.encoder=="function"?t.encoder:en.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:en.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:en.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:en.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:en.strictNullHandling}},d4=function(e,t){var n=e,r=f4(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Nr(r.filter)&&(i=r.filter,o=i);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in Hx?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var c=Hx[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=qx(),f=0;f<o.length;++f){var p=o[f];r.skipNulls&&n[p]===null||Wx(a,u4(n[p],p,c,l,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var d=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Fi=zx,_p=Object.prototype.hasOwnProperty,p4=Array.isArray,Ut={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},h4=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Kx=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},m4="utf8=%26%2310003%3B",y4="utf8=%E2%9C%93",v4=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,i),s=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===y4?l="utf-8":a[c]===m4&&(l="iso-8859-1"),s=c,c=a.length);for(c=0;c<a.length;++c)if(c!==s){var u=a[c],f=u.indexOf("]="),p=f===-1?u.indexOf("="):f+1,d,h;p===-1?(d=n.decoder(u,Ut.decoder,l,"key"),h=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,p),Ut.decoder,l,"key"),h=Fi.maybeMap(Kx(u.slice(p+1),n),function(m){return n.decoder(m,Ut.decoder,l,"value")})),h&&n.interpretNumericEntities&&l==="iso-8859-1"&&(h=h4(h)),u.indexOf("[]=")>-1&&(h=p4(h)?[h]:h),_p.call(r,d)?r[d]=Fi.combine(r[d],h):r[d]=h}return r},g4=function(e,t,n,r){for(var o=r?t:Kx(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=parseInt(c,10);!n.parseArrays&&c===""?a={0:o}:!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[],a[l]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},b4=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=r.depth>0&&a.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&_p.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=s.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&_p.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),g4(u,n,r,o)}},w4=function(t){if(!t)return Ut;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ut.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ut.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ut.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ut.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ut.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ut.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ut.comma,decoder:typeof t.decoder=="function"?t.decoder:Ut.decoder,delimiter:typeof t.delimiter=="string"||Fi.isRegExp(t.delimiter)?t.delimiter:Ut.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ut.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ut.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ut.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ut.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ut.strictNullHandling}},x4=function(e,t){var n=w4(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?v4(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],c=b4(s,r[s],n,typeof e=="string");o=Fi.merge(o,c,n)}return n.allowSparse===!0?o:Fi.compact(o)},S4=d4,E4=x4,_4=xp,$4={formats:_4,parse:E4,stringify:S4};const k4=Ue($4),C4=e=>e[1]!==void 0,_t=e=>{const{method:t,path:n,query:r,headers:o,body:i}=e,a=Object.entries(o).filter(C4),s=Object.fromEntries(a),c=k4.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[n,c].join("?"):n;return{method:t,url:l,headers:s,data:i}},T4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),O4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),A4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),P4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),I4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),R4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),M4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),N4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),D4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),j4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),F4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),L4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),B4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),U4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),z4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),q4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),H4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),W4=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),V4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),K4=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let G4=class{constructor(t,n={}){he(this,"addParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=T4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createConversation",async t=>{const{path:n,headers:r,query:o,body:i}=O4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteConversation",async t=>{const{path:n,headers:r,query:o,body:i}=A4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getConversation",async t=>{const{path:n,headers:r,query:o,body:i}=P4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=I4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:o,body:i}=R4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversations",async t=>{const{path:n,headers:r,query:o,body:i}=M4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listParticipants",async t=>{const{path:n,headers:r,query:o,body:i}=N4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listenConversation",async t=>{const{path:n,headers:r,query:o,body:i}=D4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"removeParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=j4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createMessage",async t=>{const{path:n,headers:r,query:o,body:i}=F4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteMessage",async t=>{const{path:n,headers:r,query:o,body:i}=L4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getMessage",async t=>{const{path:n,headers:r,query:o,body:i}=B4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createUser",async t=>{const{path:n,headers:r,query:o,body:i}=U4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteUser",async t=>{const{path:n,headers:r,query:o,body:i}=z4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getUser",async t=>{const{path:n,headers:r,query:o,body:i}=q4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"updateUser",async t=>{const{path:n,headers:r,query:o,body:i}=H4(t),s=(this.props.toAxiosRequest??_t)({method:"put",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createEvent",async t=>{const{path:n,headers:r,query:o,body:i}=W4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getEvent",async t=>{const{path:n,headers:r,query:o,body:i}=V4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createFile",async t=>{const{path:n,headers:r,query:o,body:i}=K4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});this.axiosInstance=t,this.props=n}};function $t(e){var t;return ax.isAxiosError(e)&&((t=e.response)!=null&&t.data)?cx(e.response.data):cx(e)}class Gx{constructor(){he(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const o of[...r])o(n)}onceOrMore(t,n){const r=o=>{n(o)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=o=>{this.off(t,r),n(o)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);o!==-1&&r.splice(o,1)}cleanup(){this.listeners={}}}var $p={exports:{}};/** @license
|
|
59
|
+
`+t.prev}function fl(e,t){var n=mp(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=uo(e,o)?t(e[o],e):""}var i=typeof dp=="function"?dp(e):[],a;if(Di){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)uo(e,c)&&(n&&String(Number(c))===c&&c<e.length||Di&&a["$"+c]instanceof Symbol||(Cx.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if(typeof dp=="function")for(var l=0;l<i.length;l++)Ax.call(e,i[l])&&r.push("["+t(i[l])+"]: "+t(e[i[l]],e));return r}var gp=T3,ji=i5,N5=y5,D5=gp("%TypeError%"),dl=gp("%WeakMap%",!0),pl=gp("%Map%",!0),j5=ji("WeakMap.prototype.get",!0),F5=ji("WeakMap.prototype.set",!0),L5=ji("WeakMap.prototype.has",!0),B5=ji("Map.prototype.get",!0),U5=ji("Map.prototype.set",!0),z5=ji("Map.prototype.has",!0),bp=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},q5=function(e,t){var n=bp(e,t);return n&&n.value},H5=function(e,t,n){var r=bp(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},V5=function(e,t){return!!bp(e,t)},W5=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new D5("Side channel does not contain "+N5(i))},get:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return j5(t,i)}else if(pl){if(n)return B5(n,i)}else if(r)return q5(r,i)},has:function(i){if(dl&&i&&(typeof i=="object"||typeof i=="function")){if(t)return L5(t,i)}else if(pl){if(n)return z5(n,i)}else if(r)return V5(r,i);return!1},set:function(i,a){dl&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new dl),F5(t,i,a)):pl?(n||(n=new pl),U5(n,i,a)):(r||(r={key:{},next:null}),H5(r,i,a))}};return o},K5=String.prototype.replace,G5=/%20/g,wp={RFC1738:"RFC1738",RFC3986:"RFC3986"},xp={default:wp.RFC3986,formatters:{RFC1738:function(e){return K5.call(e,G5,"+")},RFC3986:function(e){return String(e)}},RFC1738:wp.RFC1738,RFC3986:wp.RFC3986},Z5=xp,Sp=Object.prototype.hasOwnProperty,Zo=Array.isArray,mr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Y5=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Zo(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Ux=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},J5=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Zo(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Sp.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Zo(t)&&!Zo(n)&&(o=Ux(t,r)),Zo(t)&&Zo(n)?(n.forEach(function(i,a){if(Sp.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var s=n[a];return Sp.call(i,a)?i[a]=e(i[a],s,r):i[a]=s,i},o)},X5=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Q5=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},e4=function(t,n,r,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;++c){var l=a.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===Z5.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+mr[l];continue}if(l<2048){s=s+(mr[192|l>>6]+mr[128|l&63]);continue}if(l<55296||l>=57344){s=s+(mr[224|l>>12]+mr[128|l>>6&63]+mr[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=mr[240|l>>18]+mr[128|l>>12&63]+mr[128|l>>6&63]+mr[128|l&63]}return s},t4=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:a,prop:l}),r.push(u))}return Y5(n),t},n4=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},r4=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},o4=function(t,n){return[].concat(t,n)},i4=function(t,n){if(Zo(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},zx={arrayToObject:Ux,assign:X5,combine:o4,compact:t4,decode:Q5,encode:e4,isBuffer:r4,isRegExp:n4,maybeMap:i4,merge:J5},qx=W5,hl=zx,os=xp,a4=Object.prototype.hasOwnProperty,Hx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nr=Array.isArray,s4=Array.prototype.push,Vx=function(e,t){s4.apply(e,Nr(t)?t:[t])},c4=Date.prototype.toISOString,Wx=os.default,en={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:hl.encode,encodeValuesOnly:!1,format:Wx,formatter:os.formatters[Wx],indices:!1,serializeDate:function(t){return c4.call(t)},skipNulls:!1,strictNullHandling:!1},l4=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ep={},u4=function e(t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v){for(var y=t,g=v,b=0,k=!1;(g=g.get(Ep))!==void 0&&!k;){var S=g.get(t);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");k=!0}typeof g.get(Ep)>"u"&&(b=0)}if(typeof c=="function"?y=c(n,y):y instanceof Date?y=f(y):r==="comma"&&Nr(y)&&(y=hl.maybeMap(y,function(F){return F instanceof Date?f(F):F})),y===null){if(i)return s&&!h?s(n,en.encoder,m,"key",p):n;y=""}if(l4(y)||hl.isBuffer(y)){if(s){var $=h?n:s(n,en.encoder,m,"key",p);return[d($)+"="+d(s(y,en.encoder,m,"value",p))]}return[d(n)+"="+d(String(y))]}var O=[];if(typeof y>"u")return O;var I;if(r==="comma"&&Nr(y))h&&s&&(y=hl.maybeMap(y,s)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(Nr(c))I=c;else{var B=Object.keys(y);I=l?B.sort(l):B}for(var T=o&&Nr(y)&&y.length===1?n+"[]":n,M=0;M<I.length;++M){var R=I[M],j=typeof R=="object"&&typeof R.value<"u"?R.value:y[R];if(!(a&&j===null)){var U=Nr(y)?typeof r=="function"?r(T,R):T:T+(u?"."+R:"["+R+"]");v.set(t,b);var D=qx();D.set(Ep,v),Vx(O,e(j,U,r,o,i,a,r==="comma"&&h&&Nr(y)?null:s,c,l,u,f,p,d,h,m,D))}}return O},f4=function(t){if(!t)return en;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||en.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=os.default;if(typeof t.format<"u"){if(!a4.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=os.formatters[r],i=en.filter;return(typeof t.filter=="function"||Nr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:en.addQueryPrefix,allowDots:typeof t.allowDots>"u"?en.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:en.charsetSentinel,delimiter:typeof t.delimiter>"u"?en.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:en.encode,encoder:typeof t.encoder=="function"?t.encoder:en.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:en.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:en.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:en.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:en.strictNullHandling}},d4=function(e,t){var n=e,r=f4(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Nr(r.filter)&&(i=r.filter,o=i);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in Hx?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var c=Hx[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=qx(),f=0;f<o.length;++f){var p=o[f];r.skipNulls&&n[p]===null||Vx(a,u4(n[p],p,c,l,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var d=a.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Fi=zx,_p=Object.prototype.hasOwnProperty,p4=Array.isArray,Ut={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},h4=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Kx=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},m4="utf8=%26%2310003%3B",y4="utf8=%E2%9C%93",v4=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,a=o.split(n.delimiter,i),s=-1,c,l=n.charset;if(n.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===y4?l="utf-8":a[c]===m4&&(l="iso-8859-1"),s=c,c=a.length);for(c=0;c<a.length;++c)if(c!==s){var u=a[c],f=u.indexOf("]="),p=f===-1?u.indexOf("="):f+1,d,h;p===-1?(d=n.decoder(u,Ut.decoder,l,"key"),h=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,p),Ut.decoder,l,"key"),h=Fi.maybeMap(Kx(u.slice(p+1),n),function(m){return n.decoder(m,Ut.decoder,l,"value")})),h&&n.interpretNumericEntities&&l==="iso-8859-1"&&(h=h4(h)),u.indexOf("[]=")>-1&&(h=p4(h)?[h]:h),_p.call(r,d)?r[d]=Fi.combine(r[d],h):r[d]=h}return r},g4=function(e,t,n,r){for(var o=r?t:Kx(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=parseInt(c,10);!n.parseArrays&&c===""?a={0:o}:!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[],a[l]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},b4=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=r.depth>0&&a.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&_p.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var f=0;r.depth>0&&(c=s.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&_p.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),g4(u,n,r,o)}},w4=function(t){if(!t)return Ut;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ut.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ut.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ut.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ut.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ut.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ut.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ut.comma,decoder:typeof t.decoder=="function"?t.decoder:Ut.decoder,delimiter:typeof t.delimiter=="string"||Fi.isRegExp(t.delimiter)?t.delimiter:Ut.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ut.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ut.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ut.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ut.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ut.strictNullHandling}},x4=function(e,t){var n=w4(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?v4(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],c=b4(s,r[s],n,typeof e=="string");o=Fi.merge(o,c,n)}return n.allowSparse===!0?o:Fi.compact(o)},S4=d4,E4=x4,_4=xp,$4={formats:_4,parse:E4,stringify:S4};const k4=Ue($4),C4=e=>e[1]!==void 0,_t=e=>{const{method:t,path:n,query:r,headers:o,body:i}=e,a=Object.entries(o).filter(C4),s=Object.fromEntries(a),c=k4.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[n,c].join("?"):n;return{method:t,url:l,headers:s,data:i}},T4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),O4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),A4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),P4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),I4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),R4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),M4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),N4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),D4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),j4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),F4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),L4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),B4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),U4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),z4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),q4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),H4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),V4=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),W4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),K4=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}});let G4=class{constructor(t,n={}){he(this,"addParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=T4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createConversation",async t=>{const{path:n,headers:r,query:o,body:i}=O4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteConversation",async t=>{const{path:n,headers:r,query:o,body:i}=A4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getConversation",async t=>{const{path:n,headers:r,query:o,body:i}=P4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=I4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversationMessages",async t=>{const{path:n,headers:r,query:o,body:i}=R4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listConversations",async t=>{const{path:n,headers:r,query:o,body:i}=M4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listParticipants",async t=>{const{path:n,headers:r,query:o,body:i}=N4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"listenConversation",async t=>{const{path:n,headers:r,query:o,body:i}=D4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"removeParticipant",async t=>{const{path:n,headers:r,query:o,body:i}=j4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createMessage",async t=>{const{path:n,headers:r,query:o,body:i}=F4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteMessage",async t=>{const{path:n,headers:r,query:o,body:i}=L4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getMessage",async t=>{const{path:n,headers:r,query:o,body:i}=B4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createUser",async t=>{const{path:n,headers:r,query:o,body:i}=U4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"deleteUser",async t=>{const{path:n,headers:r,query:o,body:i}=z4(t),s=(this.props.toAxiosRequest??_t)({method:"delete",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getUser",async t=>{const{path:n,headers:r,query:o,body:i}=q4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"updateUser",async t=>{const{path:n,headers:r,query:o,body:i}=H4(t),s=(this.props.toAxiosRequest??_t)({method:"put",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createEvent",async t=>{const{path:n,headers:r,query:o,body:i}=V4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"getEvent",async t=>{const{path:n,headers:r,query:o,body:i}=W4(t),s=(this.props.toAxiosRequest??_t)({method:"get",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});he(this,"createFile",async t=>{const{path:n,headers:r,query:o,body:i}=K4(t),s=(this.props.toAxiosRequest??_t)({method:"post",path:n,headers:{...r},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw $t(c)})});this.axiosInstance=t,this.props=n}};function $t(e){var t;return ax.isAxiosError(e)&&((t=e.response)!=null&&t.data)?cx(e.response.data):cx(e)}class Gx{constructor(){he(this,"listeners",{})}emit(t,n){const r=this.listeners[t];if(r)for(const o of[...r])o(n)}onceOrMore(t,n){const r=o=>{n(o)==="stop-listening"&&this.off(t,r)};this.on(t,r)}once(t,n){const r=o=>{this.off(t,r),n(o)};this.on(t,r)}on(t,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n)}off(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);o!==-1&&r.splice(o,1)}cleanup(){this.listeners={}}}var $p={exports:{}};/** @license
|
|
60
60
|
* eventsource.js
|
|
61
61
|
* Available under MIT License (MIT)
|
|
62
62
|
* https://github.com/Yaffle/EventSource/
|
|
63
|
-
*/(function(e,t){(function(n){var r=n.setTimeout,o=n.clearTimeout,i=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(
|
|
64
|
-
`),ee=0;ee<oe.length;ee+=1){var xe=oe[ee],we=xe.split(": "),ke=we.shift(),Fe=we.join(": ");X[S(ke)]=Fe}this._map=X}$.prototype.get=function(
|
|
65
|
-
`.charCodeAt(0)||jt==="\r".charCodeAt(0))&&(mt=Dt)}var Zt=(mt!==-1?pt:"")+it.slice(0,mt+1);pt=(mt===-1?pt:"")+it.slice(mt+1),it!==""&&(
|
|
66
|
-
`.charCodeAt(0))ht=
|
|
67
|
-
`.charCodeAt(0)){if(ht!==
|
|
68
|
-
`,Nt+=nr):Fn==="id"?ot=nr:Fn==="event"?nt=nr:Fn==="retry"?(we=pe(nr,we),Oe=we):Fn==="heartbeatTimeout"&&(ke=pe(nr,ke),Be!==0&&(o(Be),Be=r(function(){Zr()},ke)))}if(ht===U){if(Nt!==""){Fe=ot,nt===""&&(nt="message");var Oo=new L(nt,{data:Nt.slice(1),lastEventId:ot});if(I.dispatchEvent(Oo),nt==="open"?ce(I,I.onopen,Oo):nt==="message"?ce(I,I.onmessage,Oo):nt==="error"&&ce(I,I.onerror,Oo),ut===M)return}Nt="",nt=""}ht=jt==="\r".charCodeAt(0)?w:U}else ht===U&&(wn=Ft,ht=V),ht===V?jt===":".charCodeAt(0)&&(Pn=Ft+1,ht=_):ht===_&&(ht=J)}}},Tr=function(it){if(ut===W||ut===K){ut=D,Be!==0&&(o(Be),Be=0),Be=r(function(){Zr()},Oe),Oe=me(Math.min(we*16,Oe*2)),I.readyState=K;var mt=new N("error",{error:it});I.dispatchEvent(mt),ce(I,I.onerror,mt),it!=null&&console.error(it)}},tr=function(){ut=M,Ce!=null&&(Ce.abort(),Ce=void 0),Be!==0&&(o(Be),Be=0),I.readyState=M},Zr=function(){if(Be=0,ut!==D){if(!B&&Ce!=null)Tr(new Error("No activity within "+ke+" milliseconds. "+(ut===K?"No response received.":Z+" chars received.")+" Reconnecting.")),Ce!=null&&(Ce.abort(),Ce=void 0);else{var it=Math.max((B||Date.now())+ke-Date.now(),1);B=!1,Be=r(function(){Zr()},it)}return}B=!1,Z=0,Be=r(function(){Zr()},ke),ut=K,Nt="",nt="",ot=Fe,pt="",wn=0,Pn=0,ht=U;var mt=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Fe!==""){var Dt=X.indexOf("?");mt=Dt===-1?X:X.slice(0,Dt+1)+X.slice(Dt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(nr,Oo){return Oo===xe?"":nr}),mt+=(X.indexOf("?")===-1?"?":"&")+xe+"="+encodeURIComponent(Fe)}var jt=I.withCredentials,Zt={};Zt.Accept="text/event-stream";var Ft=I.headers;if(Ft!=null)for(var Fn in Ft)Object.prototype.hasOwnProperty.call(Ft,Fn)&&(Zt[Fn]=Ft[Fn]);try{Ce=Pe.open(de,er,Gr,Tr,mt,jt,Zt)}catch(nr){throw tr(),nr}};I.url=X,I.readyState=K,I.withCredentials=ee,I.headers=q,I._close=tr,Zr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=K,Q.prototype.OPEN=W,Q.prototype.CLOSED=M,Q.prototype.close=function(){this._close()},Q.CONNECTING=K,Q.OPEN=W,Q.CLOSED=M,Q.prototype.withCredentials=void 0;var _e=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(_e=Q),function(I){{var X=I(t);X!==void 0&&(e.exports=X)}}(function(I){I.EventSourcePolyfill=Q,I.NativeEventSource=c,I.EventSource=_e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Se:globalThis)})($p,$p.exports);var Z4=$p.exports;const Y4=Ue(Z4),J4=(e,t={})=>{const n=new Y4.EventSourcePolyfill(e,{headers:t.headers}),r=new Gx;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},X4=async(e,t={})=>{const{emitter:n,source:r}=J4(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},Q4=x.object({type:x.literal("message_created"),data:x.object({id:x.string().describe("Id of the [Message](#schema_message)"),createdAt:x.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:x.union([x.object({audioUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("audio")}),x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),type:x.literal("card"),className:x.string().describe("CSS className to apply to the message").optional()}),x.object({items:x.array(x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional()})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("carousel")}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("choice"),disableFreeText:x.boolean().optional()}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("dropdown")}),x.object({fileUrl:x.string().min(1),title:x.string().min(1).optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("file")}),x.object({imageUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("image")}),x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("location")}),x.object({markdown:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("markdown")}),x.object({text:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("text")}),x.object({videoUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("video")})]).describe("Payload is the content type of the message."),userId:x.string().describe("ID of the [User](#schema_user)"),conversationId:x.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),eB=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),tB=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.union([x.any(),x.null()]))})}),nB=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.union([x.any(),x.null()]))})}),rB=x.object({type:x.literal("typing_started"),data:x.object({timeout:x.number().optional()})}),oB=x.object({type:x.literal("typing_stopped"),data:x.record(x.never())}),iB={messageCreated:Q4,webchatVisibility:eB,webchatConfig:tB,custom:nB,typingStarted:rB,typingStopped:oB},Zx="unknown error",nf=class nf extends Gx{constructor(n){super();he(this,"_state",{status:"disconnected"});he(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});he(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});he(this,"_connect",async()=>{const n=await X4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});he(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});he(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});he(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});he(this,"_parseSignal",n=>{for(const r of Object.values(iB)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});he(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});he(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(Zx);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(Zx)}});this._props=n}get status(){return this._state.status}};he(nf,"listen",async n=>{const r=new nf(n);return await r.connect(),r});let kp=nf;const Yx=100*1024*1024,aB=Yx,sB=Yx,cB=6e4;class lB{constructor(t){he(this,"_auto");he(this,"createConversation",t=>this._auto.createConversation(t));he(this,"getConversation",t=>this._auto.getConversation(t));he(this,"deleteConversation",t=>this._auto.deleteConversation(t));he(this,"listConversations",t=>this._auto.listConversations(t));he(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));he(this,"addParticipant",t=>this._auto.addParticipant(t));he(this,"removeParticipant",t=>this._auto.removeParticipant(t));he(this,"getParticipant",t=>this._auto.getParticipant(t));he(this,"listParticipants",t=>this._auto.listParticipants(t));he(this,"createMessage",t=>this._auto.createMessage(t));he(this,"getMessage",t=>this._auto.getMessage(t));he(this,"deleteMessage",t=>this._auto.deleteMessage(t));he(this,"createFile",t=>this._auto.createFile(t));he(this,"createUser",t=>this._auto.createUser(t));he(this,"getUser",t=>this._auto.getUser(t));he(this,"updateUser",t=>this._auto.updateUser(t));he(this,"deleteUser",t=>this._auto.deleteUser(t));he(this,"createEvent",t=>this._auto.createEvent(t));he(this,"getEvent",t=>this._auto.getEvent(t));he(this,"listenConversation",async({id:t,"x-user-key":n})=>await kp.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??cB,i=ax.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:aB,maxContentLength:sB});this._auto=new G4(i)}}const ml={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},mn=(e,t)=>e.status===t,yr=(e,t)=>ml[e.status]<ml[t],Jx=(e,t)=>ml[e.status]>=ml[t];class vr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const Xx=["audio","file","image","video"],Qx=e=>Xx.includes(e);class uB extends jf{constructor(n){super();he(this,"_client");he(this,"_webhookId");he(this,"_apiUrl");he(this,"_state",{status:"disconnected"});he(this,"mode","pushpin");he(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(Jx(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(mn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});he(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(Jx(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return mn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});he(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=dg(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new lB({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!yr(this._state,"user_created"))return this._state.userId}async getUser(){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!yr(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){mn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():mn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,v)=>{const y=new FileReader;y.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},y.onerror=g=>{var b;return v((b=g.target)==null?void 0:b.error)},y.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=Qx(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",u),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"text",text:n}}),this.emit("messageSent",n)}async sendEvent(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_created")&&this._state.conversationId===n||mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(yr(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(ep(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(ep(r)&&o(r))return!1;throw r}}async newConversation(){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!mn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const e1=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new SF({url:t,clientId:e}):new uB({apiUrl:t,clientId:e}),fB=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=E.useState(e1({clientId:e,apiUrl:t,mode:n}));return r},dB=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let pB={data:""},hB=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||pB,mB=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,yB=/\/\*[^]*?\*\/| +/g,t1=/\n+/g,po=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?po(a,i):i+"{"+po(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=po(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=po.p?po.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Dr={},n1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+n1(e[n]);return t}return e},vB=(e,t,n,r,o)=>{let i=n1(e),a=Dr[i]||(Dr[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Dr[a]){let c=i!==e?e:(l=>{let u,f,p=[{}];for(;u=mB.exec(l.replace(yB,""));)u[4]?p.shift():u[3]?(f=u[3].replace(t1," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(t1," ").trim();return p[0]})(e);Dr[a]=po(o?{["@keyframes "+a]:c}:c,n?"":"."+a)}let s=n&&Dr.g?Dr.g:null;return n&&(Dr.g=Dr[a]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Dr[a],t,r,s),a},gB=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":po(s,""):s===!1?"":s}return r+o+(a??"")},"");function yl(e){let t=this||{},n=e.call?e(t.p):e;return vB(n.unshift?n.raw?gB(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,hB(t.target),t.g,t.o,t.k)}let r1,Cp,Tp;yl.bind({g:1});let jr=yl.bind({k:1});function bB(e,t,n,r){po.p=t,r1=e,Cp=n,Tp=r}function ho(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),c=s.className||o.className;n.p=Object.assign({theme:Cp&&Cp()},s),n.o=/ *go\d+/.test(c),s.className=yl.apply(n,r)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Tp&&l[0]&&Tp(s),r1(l,s)}return t?t(o):o}}var wB=e=>typeof e=="function",vl=(e,t)=>wB(e)?e(t):e,xB=(()=>{let e=0;return()=>(++e).toString()})(),o1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),SB=20,gl=new Map,EB=1e3,i1=e=>{if(gl.has(e))return;let t=setTimeout(()=>{gl.delete(e),Yo({type:4,toastId:e})},EB);gl.set(e,t)},_B=e=>{let t=gl.get(e);t&&clearTimeout(t)},Op=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,SB)};case 1:return t.toast.id&&_B(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?Op(e,{type:1,toast:n}):Op(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?i1(r):e.toasts.forEach(i=>{i1(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},bl=[],wl={toasts:[],pausedAt:void 0},Yo=e=>{wl=Op(wl,e),bl.forEach(t=>{t(wl)})},$B={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},kB=(e={})=>{let[t,n]=E.useState(wl);E.useEffect(()=>(bl.push(n),()=>{let o=bl.indexOf(n);o>-1&&bl.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||$B[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},CB=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||xB()}),is=e=>(t,n)=>{let r=CB(t,e,n);return Yo({type:2,toast:r}),r.id},Dn=(e,t)=>is("blank")(e,t);Dn.error=is("error"),Dn.success=is("success"),Dn.loading=is("loading"),Dn.custom=is("custom"),Dn.dismiss=e=>{Yo({type:3,toastId:e})},Dn.remove=e=>Yo({type:4,toastId:e}),Dn.promise=(e,t,n)=>{let r=Dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Dn.success(vl(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Dn.error(vl(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var TB=(e,t)=>{Yo({type:1,toast:{id:e,height:t}})},OB=()=>{Yo({type:5,time:Date.now()})},AB=e=>{let{toasts:t,pausedAt:n}=kB(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Dn.dismiss(s.id);return}return setTimeout(()=>Dn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Yo({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=a||{},u=t.filter(d=>(d.position||l)===(i.position||l)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:TB,startPause:OB,endPause:r,calculateOffset:o}}},PB=jr`
|
|
63
|
+
*/(function(e,t){(function(n){var r=n.setTimeout,o=n.clearTimeout,i=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(P){l.readyState="complete"},!1)),i==null&&s!=null&&(i=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(P){function X(){}return X.prototype=P,new X}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var v=f;f=function(P,X){var oe=X.signal;return v(P,{headers:X.headers,credentials:X.credentials,cache:X.cache}).then(function(ee){var xe=ee.body.getReader();return oe._reader=xe,oe._aborted&&oe._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return xe}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function y(){this.bitsNeeded=0,this.codePoint=0}y.prototype.decode=function(P){function X(z,Z,H){if(H===1)return z>=128>>Z&&z<<Z<=2047;if(H===2)return z>=2048>>Z&&z<<Z<=55295||z>=57344>>Z&&z<<Z<=65535;if(H===3)return z>=65536>>Z&&z<<Z<=1114111;throw new Error}function oe(z,Z){if(z===6*1)return Z>>6>15?3:Z>31?2:1;if(z===6*2)return Z>15?3:2;if(z===6*3)return 3;throw new Error}for(var ee=65533,xe="",we=this.bitsNeeded,ke=this.codePoint,Fe=0;Fe<P.length;Fe+=1){var Oe=P[Fe];we!==0&&(Oe<128||Oe>191||!X(ke<<6|Oe&63,we-6,oe(we,ke)))&&(we=0,ke=ee,xe+=String.fromCharCode(ke)),we===0?(Oe>=0&&Oe<=127?(we=0,ke=Oe):Oe>=192&&Oe<=223?(we=6*1,ke=Oe&31):Oe>=224&&Oe<=239?(we=6*2,ke=Oe&15):Oe>=240&&Oe<=247?(we=6*3,ke=Oe&7):(we=0,ke=ee),we!==0&&!X(ke,we,oe(we,ke))&&(we=0,ke=ee)):(we-=6,ke=ke<<6|Oe&63),we===0&&(ke<=65535?xe+=String.fromCharCode(ke):(xe+=String.fromCharCode(55296+(ke-65535-1>>10)),xe+=String.fromCharCode(56320+(ke-65535-1&1023))))}return this.bitsNeeded=we,this.codePoint=ke,xe};var g=function(){try{return new d().decode(new h().encode("test"),{stream:!0})==="test"}catch(P){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+P)}return!1};(d==null||h==null||!g())&&(d=y);var b=function(){};function k(P){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=P,this._sendTimeout=0,this._abort=b}k.prototype.open=function(P,X){this._abort(!0);var oe=this,ee=this._xhr,xe=1,we=0;this._abort=function(H){oe._sendTimeout!==0&&(o(oe._sendTimeout),oe._sendTimeout=0),(xe===1||xe===2||xe===3)&&(xe=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),we!==0&&(o(we),we=0),H||(oe.readyState=4,oe.onabort(null),oe.onreadystatechange())),xe=0};var ke=function(){if(xe===1){var H=0,te="",de=void 0;if("contentType"in ee)H=200,te="OK",de=ee.contentType;else try{H=ee.status,te=ee.statusText,de=ee.getResponseHeader("Content-Type")}catch{H=0,te="",de=void 0}H!==0&&(xe=2,oe.readyState=2,oe.status=H,oe.statusText=te,oe._contentType=de,oe.onreadystatechange())}},Fe=function(){if(ke(),xe===2||xe===3){xe=3;var H="";try{H=ee.responseText}catch{}oe.readyState=3,oe.responseText=H,oe.onprogress()}},Oe=function(H,te){if((te==null||te.preventDefault==null)&&(te={preventDefault:b}),Fe(),xe===1||xe===2||xe===3){if(xe=4,we!==0&&(o(we),we=0),oe.readyState=4,H==="load")oe.onload(te);else if(H==="error")oe.onerror(te);else if(H==="abort")oe.onabort(te);else throw new TypeError;oe.onreadystatechange()}},z=function(H){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Oe(ee.responseText===""?"error":"load",H):ee.readyState===3?"onprogress"in ee||Fe():ee.readyState===2&&ke())},Z=function(){we=r(function(){Z()},500),ee.readyState===3&&Fe()};"onload"in ee&&(ee.onload=function(H){Oe("load",H)}),"onerror"in ee&&(ee.onerror=function(H){Oe("error",H)}),"onabort"in ee&&(ee.onabort=function(H){Oe("abort",H)}),"onprogress"in ee&&(ee.onprogress=Fe),"onreadystatechange"in ee&&(ee.onreadystatechange=function(H){z(H)}),("contentType"in ee||!("ontimeout"in i.prototype))&&(X+=(X.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(P,X,!0),"readyState"in ee&&(we=r(function(){Z()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(P){return this._contentType},k.prototype.setRequestHeader=function(P,X){var oe=this._xhr;"setRequestHeader"in oe&&oe.setRequestHeader(P,X)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var P=this;P._sendTimeout=r(function(){P._sendTimeout=0,P.send()},4);return}var X=this._xhr;"withCredentials"in X&&(X.withCredentials=this.withCredentials);try{X.send(void 0)}catch(oe){throw oe}};function S(P){return P.replace(/[A-Z]/g,function(X){return String.fromCharCode(X.charCodeAt(0)+32)})}function $(P){for(var X=Object.create(null),oe=P.split(`\r
|
|
64
|
+
`),ee=0;ee<oe.length;ee+=1){var xe=oe[ee],we=xe.split(": "),ke=we.shift(),Fe=we.join(": ");X[S(ke)]=Fe}this._map=X}$.prototype.get=function(P){return this._map[S(P)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function O(){}O.prototype.open=function(P,X,oe,ee,xe,we,ke){P.open("GET",xe);var Fe=0;P.onprogress=function(){var z=P.responseText,Z=z.slice(Fe);Fe+=Z.length,oe(Z)},P.onerror=function(z){z.preventDefault(),ee(new Error("NetworkError"))},P.onload=function(){ee(null)},P.onabort=function(){ee(null)},P.onreadystatechange=function(){if(P.readyState===i.HEADERS_RECEIVED){var z=P.status,Z=P.statusText,H=P.getResponseHeader("Content-Type"),te=P.getAllResponseHeaders();X(z,Z,H,new $(te))}},P.withCredentials=we;for(var Oe in ke)Object.prototype.hasOwnProperty.call(ke,Oe)&&P.setRequestHeader(Oe,ke[Oe]);return P.send(),P};function I(P){this._headers=P}I.prototype.get=function(P){return this._headers.get(P)};function B(){}B.prototype.open=function(P,X,oe,ee,xe,we,ke){var Fe=null,Oe=new m,z=Oe.signal,Z=new d;return f(xe,{headers:ke,credentials:we?"include":"same-origin",signal:z,cache:"no-store"}).then(function(H){return Fe=H.body.getReader(),X(H.status,H.statusText,H.headers.get("Content-Type"),new I(H.headers)),new u(function(te,de){var Pe=function(){Fe.read().then(function(Ce){if(Ce.done)te(void 0);else{var Be=Z.decode(Ce.value,{stream:!0});oe(Be),Pe()}}).catch(function(Ce){de(Ce)})};Pe()})}).catch(function(H){if(H.name!=="AbortError")return H}).then(function(H){ee(H)}),{abort:function(){Fe!=null&&Fe.cancel(),Oe.abort()}}};function T(){this._listeners=Object.create(null)}function M(P){r(function(){throw P},0)}T.prototype.dispatchEvent=function(P){P.target=this;var X=this._listeners[P.type];if(X!=null)for(var oe=X.length,ee=0;ee<oe;ee+=1){var xe=X[ee];try{typeof xe.handleEvent=="function"?xe.handleEvent(P):xe.call(this,P)}catch(we){M(we)}}},T.prototype.addEventListener=function(P,X){P=String(P);var oe=this._listeners,ee=oe[P];ee==null&&(ee=[],oe[P]=ee);for(var xe=!1,we=0;we<ee.length;we+=1)ee[we]===X&&(xe=!0);xe||ee.push(X)},T.prototype.removeEventListener=function(P,X){P=String(P);var oe=this._listeners,ee=oe[P];if(ee!=null){for(var xe=[],we=0;we<ee.length;we+=1)ee[we]!==X&&xe.push(ee[we]);xe.length===0?delete oe[P]:oe[P]=xe}};function R(P){this.type=P,this.target=void 0}function j(P,X){R.call(this,P),this.data=X.data,this.lastEventId=X.lastEventId}j.prototype=Object.create(R.prototype);function U(P,X){R.call(this,P),this.status=X.status,this.statusText=X.statusText,this.headers=X.headers}U.prototype=Object.create(R.prototype);function D(P,X){R.call(this,P),this.error=X.error}D.prototype=Object.create(R.prototype);var F=-1,K=0,V=1,N=2,w=-1,q=0,W=1,_=2,J=3,ae=/^text\/event\-stream(;.*)?$/i,re=1e3,le=18e6,pe=function(P,X){var oe=P==null?X:parseInt(P,10);return oe!==oe&&(oe=X),me(oe)},me=function(P){return Math.min(Math.max(P,re),le)},ce=function(P,X,oe){try{typeof X=="function"&&X.call(P,oe)}catch(ee){M(ee)}};function Q(P,X){T.call(this),X=X||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ve(this,P,X)}function G(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var fe=f!=null&&p!=null&&"body"in p.prototype;function ve(P,X,oe){X=String(X);var ee=!!oe.withCredentials,xe=oe.lastEventIdQueryParameterName||"lastEventId",we=me(1e3),ke=pe(oe.heartbeatTimeout,45e3),Fe="",Oe=we,z=!1,Z=0,H=oe.headers||{},te=oe.Transport,de=fe&&te==null?void 0:new k(te!=null?new te:G()),Pe=te!=null&&typeof te!="string"?new te:de==null?new B:new O,Ce=void 0,Be=0,ut=F,Nt="",ot="",nt="",pt="",ht=q,wn=0,Pn=0,er=function(it,mt,Dt,jt){if(ut===K)if(it===200&&Dt!=null&&ae.test(Dt)){ut=V,z=Date.now(),Oe=we,P.readyState=V;var Zt=new U("open",{status:it,statusText:mt,headers:jt});P.dispatchEvent(Zt),ce(P,P.onopen,Zt)}else{var Ft="";it!==200?(mt&&(mt=mt.replace(/\s+/g," ")),Ft="EventSource's response has a status "+it+" "+mt+" that is not 200. Aborting the connection."):Ft="EventSource's response has a Content-Type specifying an unsupported type: "+(Dt==null?"-":Dt.replace(/\s+/g," "))+". Aborting the connection.",tr();var Zt=new U("error",{status:it,statusText:mt,headers:jt});P.dispatchEvent(Zt),ce(P,P.onerror,Zt),console.error(Ft)}},Gr=function(it){if(ut===V){for(var mt=-1,Dt=0;Dt<it.length;Dt+=1){var jt=it.charCodeAt(Dt);(jt===`
|
|
65
|
+
`.charCodeAt(0)||jt==="\r".charCodeAt(0))&&(mt=Dt)}var Zt=(mt!==-1?pt:"")+it.slice(0,mt+1);pt=(mt===-1?pt:"")+it.slice(mt+1),it!==""&&(z=Date.now(),Z+=it.length);for(var Ft=0;Ft<Zt.length;Ft+=1){var jt=Zt.charCodeAt(Ft);if(ht===w&&jt===`
|
|
66
|
+
`.charCodeAt(0))ht=q;else if(ht===w&&(ht=q),jt==="\r".charCodeAt(0)||jt===`
|
|
67
|
+
`.charCodeAt(0)){if(ht!==q){ht===W&&(Pn=Ft+1);var Fn=Zt.slice(wn,Pn-1),nr=Zt.slice(Pn+(Pn<Ft&&Zt.charCodeAt(Pn)===" ".charCodeAt(0)?1:0),Ft);Fn==="data"?(Nt+=`
|
|
68
|
+
`,Nt+=nr):Fn==="id"?ot=nr:Fn==="event"?nt=nr:Fn==="retry"?(we=pe(nr,we),Oe=we):Fn==="heartbeatTimeout"&&(ke=pe(nr,ke),Be!==0&&(o(Be),Be=r(function(){Zr()},ke)))}if(ht===q){if(Nt!==""){Fe=ot,nt===""&&(nt="message");var Oo=new j(nt,{data:Nt.slice(1),lastEventId:ot});if(P.dispatchEvent(Oo),nt==="open"?ce(P,P.onopen,Oo):nt==="message"?ce(P,P.onmessage,Oo):nt==="error"&&ce(P,P.onerror,Oo),ut===N)return}Nt="",nt=""}ht=jt==="\r".charCodeAt(0)?w:q}else ht===q&&(wn=Ft,ht=W),ht===W?jt===":".charCodeAt(0)&&(Pn=Ft+1,ht=_):ht===_&&(ht=J)}}},Tr=function(it){if(ut===V||ut===K){ut=F,Be!==0&&(o(Be),Be=0),Be=r(function(){Zr()},Oe),Oe=me(Math.min(we*16,Oe*2)),P.readyState=K;var mt=new D("error",{error:it});P.dispatchEvent(mt),ce(P,P.onerror,mt),it!=null&&console.error(it)}},tr=function(){ut=N,Ce!=null&&(Ce.abort(),Ce=void 0),Be!==0&&(o(Be),Be=0),P.readyState=N},Zr=function(){if(Be=0,ut!==F){if(!z&&Ce!=null)Tr(new Error("No activity within "+ke+" milliseconds. "+(ut===K?"No response received.":Z+" chars received.")+" Reconnecting.")),Ce!=null&&(Ce.abort(),Ce=void 0);else{var it=Math.max((z||Date.now())+ke-Date.now(),1);z=!1,Be=r(function(){Zr()},it)}return}z=!1,Z=0,Be=r(function(){Zr()},ke),ut=K,Nt="",nt="",ot=Fe,pt="",wn=0,Pn=0,ht=q;var mt=X;if(X.slice(0,5)!=="data:"&&X.slice(0,5)!=="blob:"&&Fe!==""){var Dt=X.indexOf("?");mt=Dt===-1?X:X.slice(0,Dt+1)+X.slice(Dt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(nr,Oo){return Oo===xe?"":nr}),mt+=(X.indexOf("?")===-1?"?":"&")+xe+"="+encodeURIComponent(Fe)}var jt=P.withCredentials,Zt={};Zt.Accept="text/event-stream";var Ft=P.headers;if(Ft!=null)for(var Fn in Ft)Object.prototype.hasOwnProperty.call(Ft,Fn)&&(Zt[Fn]=Ft[Fn]);try{Ce=Pe.open(de,er,Gr,Tr,mt,jt,Zt)}catch(nr){throw tr(),nr}};P.url=X,P.readyState=K,P.withCredentials=ee,P.headers=H,P._close=tr,Zr()}Q.prototype=Object.create(T.prototype),Q.prototype.CONNECTING=K,Q.prototype.OPEN=V,Q.prototype.CLOSED=N,Q.prototype.close=function(){this._close()},Q.CONNECTING=K,Q.OPEN=V,Q.CLOSED=N,Q.prototype.withCredentials=void 0;var _e=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(_e=Q),function(P){{var X=P(t);X!==void 0&&(e.exports=X)}}(function(P){P.EventSourcePolyfill=Q,P.NativeEventSource=c,P.EventSource=_e})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Se:globalThis)})($p,$p.exports);var Z4=$p.exports;const Y4=Ue(Z4),J4=(e,t={})=>{const n=new Y4.EventSourcePolyfill(e,{headers:t.headers}),r=new Gx;return n.onopen=o=>r.emit("open",o),n.onmessage=o=>r.emit("message",o),n.onerror=o=>r.emit("error",o),{emitter:r,source:n}},X4=async(e,t={})=>{const{emitter:n,source:r}=J4(e,t);return await new Promise((o,i)=>{n.on("open",()=>{o()}),n.on("error",a=>{i(a)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},Q4=x.object({type:x.literal("message_created"),data:x.object({id:x.string().describe("Id of the [Message](#schema_message)"),createdAt:x.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:x.union([x.object({audioUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("audio")}),x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),type:x.literal("card"),className:x.string().describe("CSS className to apply to the message").optional()}),x.object({items:x.array(x.object({title:x.string().min(1),subtitle:x.string().optional(),imageUrl:x.string().optional(),actions:x.array(x.object({action:x.enum(["postback","url","say"]),label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional()})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("carousel")}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("choice"),disableFreeText:x.boolean().optional()}),x.object({text:x.string(),options:x.array(x.object({label:x.string().min(1),value:x.string().min(1)})),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("dropdown")}),x.object({fileUrl:x.string().min(1),title:x.string().min(1).optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("file")}),x.object({imageUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("image")}),x.object({latitude:x.number(),longitude:x.number(),address:x.string().optional(),title:x.string().optional(),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("location")}),x.object({markdown:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("markdown")}),x.object({text:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("text")}),x.object({videoUrl:x.string().min(1),className:x.string().describe("CSS className to apply to the message").optional(),type:x.literal("video")})]).describe("Payload is the content type of the message."),userId:x.string().describe("ID of the [User](#schema_user)"),conversationId:x.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),eB=x.object({type:x.literal("webchat_visibility"),data:x.object({visibility:x.union([x.literal("show"),x.literal("hide"),x.literal("toggle")])})}),tB=x.object({type:x.literal("webchat_config"),data:x.object({config:x.record(x.union([x.any(),x.null()]))})}),nB=x.object({type:x.literal("custom"),data:x.object({event:x.record(x.union([x.any(),x.null()]))})}),rB=x.object({type:x.literal("typing_started"),data:x.object({timeout:x.number().optional()})}),oB=x.object({type:x.literal("typing_stopped"),data:x.record(x.never())}),iB={messageCreated:Q4,webchatVisibility:eB,webchatConfig:tB,custom:nB,typingStarted:rB,typingStopped:oB},Zx="unknown error",nf=class nf extends Gx{constructor(n){super();he(this,"_state",{status:"disconnected"});he(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const n=this._connect();this._state={status:"connecting",connectionPromise:n},await n});he(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let n;this._state.status==="connecting"?n=await this._state.connectionPromise:n=this._state.source,this._disconnectSync(n)});he(this,"_connect",async()=>{const n=await X4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return n.on("message",this._handleMessage),n.on("error",this._handleError(n)),this._state={status:"connected",source:n},n});he(this,"_disconnectSync",n=>{n.close(),this._state={status:"disconnected"}});he(this,"_handleMessage",n=>{const r=this._parseSignal(n.data);this.emit(r.type,r.data)});he(this,"_handleError",n=>r=>{this._disconnectSync(n);const o=this._toError(r);this.emit("error",o)});he(this,"_parseSignal",n=>{for(const r of Object.values(iB)){const o=this._safeJsonParse(n),i=r.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:n}});he(this,"_safeJsonParse",n=>{try{return JSON.parse(n)}catch{return n}});he(this,"_toError",n=>{if(n instanceof Error)return n;if(typeof n=="string")return new Error(n);if(n===null)return new Error(Zx);if(typeof n=="object"&&"message"in n)return this._toError(n.message);try{const r=JSON.stringify(n);return new Error(r)}catch{return new Error(Zx)}});this._props=n}get status(){return this._state.status}};he(nf,"listen",async n=>{const r=new nf(n);return await r.connect(),r});let kp=nf;const Yx=100*1024*1024,aB=Yx,sB=Yx,cB=6e4;class lB{constructor(t){he(this,"_auto");he(this,"createConversation",t=>this._auto.createConversation(t));he(this,"getConversation",t=>this._auto.getConversation(t));he(this,"deleteConversation",t=>this._auto.deleteConversation(t));he(this,"listConversations",t=>this._auto.listConversations(t));he(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));he(this,"addParticipant",t=>this._auto.addParticipant(t));he(this,"removeParticipant",t=>this._auto.removeParticipant(t));he(this,"getParticipant",t=>this._auto.getParticipant(t));he(this,"listParticipants",t=>this._auto.listParticipants(t));he(this,"createMessage",t=>this._auto.createMessage(t));he(this,"getMessage",t=>this._auto.getMessage(t));he(this,"deleteMessage",t=>this._auto.deleteMessage(t));he(this,"createFile",t=>this._auto.createFile(t));he(this,"createUser",t=>this._auto.createUser(t));he(this,"getUser",t=>this._auto.getUser(t));he(this,"updateUser",t=>this._auto.updateUser(t));he(this,"deleteUser",t=>this._auto.deleteUser(t));he(this,"createEvent",t=>this._auto.createEvent(t));he(this,"getEvent",t=>this._auto.getEvent(t));he(this,"listenConversation",async({id:t,"x-user-key":n})=>await kp.listen({url:this.props.apiUrl,conversationId:t,userKey:n}));this.props=t;const{apiUrl:n}=t,r={...t.headers},o=t.timeout??cB,i=ax.create({baseURL:n,headers:r,withCredentials:!0,timeout:o,maxBodyLength:aB,maxContentLength:sB});this._auto=new G4(i)}}const ml={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},mn=(e,t)=>e.status===t,yr=(e,t)=>ml[e.status]<ml[t],Jx=(e,t)=>ml[e.status]>=ml[t];class vr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const Xx=["audio","file","image","video"],Qx=e=>Xx.includes(e);class uB extends jf{constructor(n){super();he(this,"_client");he(this,"_webhookId");he(this,"_apiUrl");he(this,"_state",{status:"disconnected"});he(this,"mode","pushpin");he(this,"_initialConnect",async({data:n,name:r,pictureUrl:o})=>{if(Jx(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(mn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:r,pictureUrl:o,userData:n});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});he(this,"_reConnect",async(n,{data:r,name:o,pictureUrl:i})=>{if(Jx(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return mn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:o,pictureUrl:i,userData:r})),n});he(this,"_mapMessage",n=>{const{payload:r,disableInput:o}=dg(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:r,disableInput:o}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new lB({apiUrl:r})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!yr(this._state,"user_created"))return this._state.userId}async getUser(){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(yr(this._state,"user_created"))throw new vr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!yr(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,o={}){const i={data:r,...o};return n?await this.userExists(n)?this._reConnect(n,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){mn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():mn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:o,name:i}=n,s=await(h=>new Promise((m,v)=>{const y=new FileReader;y.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},y.onerror=g=>{var b;return v((b=g.target)==null?void 0:b.error)},y.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=Qx(f)?f:"file",d=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",u),{fileUrl:u,name:i,type:p}}async sendMessage(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"text",text:n}}),this.emit("messageSent",n)}async sendEvent(n){if(yr(this._state,"user_created"))throw new vr(this._state);if(mn(this._state,"conversation_creating"))throw new vr(this._state);let r;mn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_created")&&this._state.conversationId===n||mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(yr(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(ep(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const o=i=>i.code===404||i.code===401;if(ep(r)&&o(r))return!1;throw r}}async newConversation(){if(yr(this._state,"user_created"))throw new vr(this._state);mn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),o=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!mn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(n,r){const o=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==n.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:o},this._state}}const e1=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>n==="messaging"?new SF({url:t,clientId:e}):new uB({apiUrl:t,clientId:e}),fB=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:n="pushpin"})=>{const[r]=E.useState(e1({clientId:e,apiUrl:t,mode:n}));return r},dB=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))});let pB={data:""},hB=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||pB,mB=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,yB=/\/\*[^]*?\*\/| +/g,t1=/\n+/g,po=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+a+";":r+=i[1]=="f"?po(a,i):i+"{"+po(a,i[1]=="k"?"":t)+"}":typeof a=="object"?r+=po(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=po.p?po.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Dr={},n1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+n1(e[n]);return t}return e},vB=(e,t,n,r,o)=>{let i=n1(e),a=Dr[i]||(Dr[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Dr[a]){let c=i!==e?e:(l=>{let u,f,p=[{}];for(;u=mB.exec(l.replace(yB,""));)u[4]?p.shift():u[3]?(f=u[3].replace(t1," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][u[1]]=u[2].replace(t1," ").trim();return p[0]})(e);Dr[a]=po(o?{["@keyframes "+a]:c}:c,n?"":"."+a)}let s=n&&Dr.g?Dr.g:null;return n&&(Dr.g=Dr[a]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Dr[a],t,r,s),a},gB=(e,t,n)=>e.reduce((r,o,i)=>{let a=t[i];if(a&&a.call){let s=a(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":po(s,""):s===!1?"":s}return r+o+(a??"")},"");function yl(e){let t=this||{},n=e.call?e(t.p):e;return vB(n.unshift?n.raw?gB(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,hB(t.target),t.g,t.o,t.k)}let r1,Cp,Tp;yl.bind({g:1});let jr=yl.bind({k:1});function bB(e,t,n,r){po.p=t,r1=e,Cp=n,Tp=r}function ho(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),c=s.className||o.className;n.p=Object.assign({theme:Cp&&Cp()},s),n.o=/ *go\d+/.test(c),s.className=yl.apply(n,r)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Tp&&l[0]&&Tp(s),r1(l,s)}return t?t(o):o}}var wB=e=>typeof e=="function",vl=(e,t)=>wB(e)?e(t):e,xB=(()=>{let e=0;return()=>(++e).toString()})(),o1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),SB=20,gl=new Map,EB=1e3,i1=e=>{if(gl.has(e))return;let t=setTimeout(()=>{gl.delete(e),Yo({type:4,toastId:e})},EB);gl.set(e,t)},_B=e=>{let t=gl.get(e);t&&clearTimeout(t)},Op=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,SB)};case 1:return t.toast.id&&_B(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?Op(e,{type:1,toast:n}):Op(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?i1(r):e.toasts.forEach(i=>{i1(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},bl=[],wl={toasts:[],pausedAt:void 0},Yo=e=>{wl=Op(wl,e),bl.forEach(t=>{t(wl)})},$B={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},kB=(e={})=>{let[t,n]=E.useState(wl);E.useEffect(()=>(bl.push(n),()=>{let o=bl.indexOf(n);o>-1&&bl.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||$B[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:r}},CB=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||xB()}),is=e=>(t,n)=>{let r=CB(t,e,n);return Yo({type:2,toast:r}),r.id},Dn=(e,t)=>is("blank")(e,t);Dn.error=is("error"),Dn.success=is("success"),Dn.loading=is("loading"),Dn.custom=is("custom"),Dn.dismiss=e=>{Yo({type:3,toastId:e})},Dn.remove=e=>Yo({type:4,toastId:e}),Dn.promise=(e,t,n)=>{let r=Dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(Dn.success(vl(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{Dn.error(vl(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var TB=(e,t)=>{Yo({type:1,toast:{id:e,height:t}})},OB=()=>{Yo({type:5,time:Date.now()})},AB=e=>{let{toasts:t,pausedAt:n}=kB(e);E.useEffect(()=>{if(n)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Dn.dismiss(s.id);return}return setTimeout(()=>Dn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=E.useCallback(()=>{n&&Yo({type:6,time:Date.now()})},[n]),o=E.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=a||{},u=t.filter(d=>(d.position||l)===(i.position||l)&&d.height),f=u.findIndex(d=>d.id===i.id),p=u.filter((d,h)=>h<f&&d.visible).length;return u.filter(d=>d.visible).slice(...s?[p+1]:[0,p]).reduce((d,h)=>d+(h.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:TB,startPause:OB,endPause:r,calculateOffset:o}}},PB=jr`
|
|
69
69
|
from {
|
|
70
70
|
transform: scale(0) rotate(45deg);
|
|
71
71
|
opacity: 0;
|
|
@@ -211,10 +211,10 @@ to {
|
|
|
211
211
|
min-width: 20px;
|
|
212
212
|
animation: ${zB} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
213
213
|
forwards;
|
|
214
|
-
`,HB=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?
|
|
214
|
+
`,HB=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?C.createElement(qB,null,t):t:n==="blank"?null:C.createElement(UB,null,C.createElement(DB,{...r}),n!=="loading"&&C.createElement(BB,null,n==="error"?C.createElement(MB,{...r}):C.createElement(LB,{...r})))},VB=e=>`
|
|
215
215
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
216
216
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
217
|
-
`,
|
|
217
|
+
`,WB=e=>`
|
|
218
218
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
219
219
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
220
220
|
`,KB="0%{opacity:0;} 100%{opacity:1;}",GB="0%{opacity:1;} 100%{opacity:0;}",ZB=ho("div")`
|
|
@@ -236,12 +236,12 @@ to {
|
|
|
236
236
|
color: inherit;
|
|
237
237
|
flex: 1 1 auto;
|
|
238
238
|
white-space: pre-line;
|
|
239
|
-
`,JB=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=o1()?[KB,GB]:[
|
|
239
|
+
`,JB=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=o1()?[KB,GB]:[VB(n),WB(n)];return{animation:t?`${jr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${jr(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},XB=C.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?JB(e.position||t||"top-center",e.visible):{opacity:0},i=C.createElement(HB,{toast:e}),a=C.createElement(YB,{...e.ariaProps},vl(e.message,e));return C.createElement(ZB,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:a}):C.createElement(C.Fragment,null,i,a))});bB(C.createElement);var QB=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=C.useCallback(a=>{if(a){let s=()=>{let c=a.getBoundingClientRect().height;r(e,c)};s(),new MutationObserver(s).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return C.createElement("div",{ref:i,className:t,style:n},o)},e6=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:o1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},t6=yl`
|
|
240
240
|
z-index: 9999;
|
|
241
241
|
> * {
|
|
242
242
|
pointer-events: auto;
|
|
243
243
|
}
|
|
244
|
-
`,xl=16,n6=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:s,handlers:c}=AB(n);return
|
|
244
|
+
`,xl=16,n6=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:s,handlers:c}=AB(n);return C.createElement("div",{style:{position:"fixed",zIndex:9999,top:xl,left:xl,right:xl,bottom:xl,pointerEvents:"none",...i},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},s.map(l=>{let u=l.position||t,f=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),p=e6(u,f);return C.createElement(QB,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?t6:"",style:p},l.type==="custom"?vl(l.message,l):o?o(l):C.createElement(XB,{toast:l,position:u}))}))},Sl=function(){return Sl=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Sl.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;function r6(){var e=E.useRef(!1),t=E.useCallback(function(){return e.current},[]);return E.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function o6(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=E.useRef(0),o=r6(),i=E.useState(n),a=i[0],s=i[1],c=E.useCallback(function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return Sl(Sl({},p),{loading:!0})}),e.apply(void 0,l).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,c]}function a1(e,t){t===void 0&&(t=[]);var n=o6(e,t,{loading:!0}),r=n[0],o=n[1];return E.useEffect(function(){o()},[o]),r}function i6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function a6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var s6=function(e){E.useEffect(e,[])};const c6=s6;var l6=function(e){var t=E.useRef(e);t.current=e,c6(function(){return function(){return t.current()}})};const u6=l6;var f6=function(e){var t=E.useRef(0),n=E.useState(e),r=n[0],o=n[1],i=E.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(a)})},[]);return u6(function(){cancelAnimationFrame(t.current)}),[r,i]};const d6=f6;var p6=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=d6({x:0,y:0}),n=t[0],r=t[1];return E.useEffect(function(){var o=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&i6(e.current,"scroll",o,{capture:!1,passive:!0}),function(){e.current&&a6(e.current,"scroll",o)}},[e]),n};const h6=p6,s1=e=>{let t;const n=new Set,r=(c,l)=>{const u=typeof c=="function"?c(t):c;if(!Object.is(u,t)){const f=t;t=l??typeof u!="object"?u:Object.assign({},t,u),n.forEach(p=>p(t,f))}},o=()=>t,s={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{n.clear()}};return t=e(r,o,s),s},c1=e=>e?s1(e):s1;var Ap={exports:{}},Pp={},El={exports:{}},Ip={};/**
|
|
245
245
|
* @license React
|
|
246
246
|
* use-sync-external-store-shim.production.min.js
|
|
247
247
|
*
|
|
@@ -257,7 +257,7 @@ to {
|
|
|
257
257
|
*
|
|
258
258
|
* This source code is licensed under the MIT license found in the
|
|
259
259
|
* LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/var u1;function y6(){return u1||(u1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),$=1;$<k;$++)S[$-1]=arguments[$];r("error",b,S)}}function r(b,k,S){{var $=t.ReactDebugCurrentFrame,
|
|
260
|
+
*/var u1;function y6(){return u1||(u1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),$=1;$<k;$++)S[$-1]=arguments[$];r("error",b,S)}}function r(b,k,S){{var $=t.ReactDebugCurrentFrame,O=$.getStackAddendum();O!==""&&(k+="%s",S=S.concat([O]));var I=S.map(function(B){return String(B)});I.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,I)}}function o(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue,u=!1,f=!1;function p(b,k,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var $=k();if(!f){var O=k();i($,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var I=a({inst:{value:$,getSnapshot:k}}),B=I[0].inst,T=I[1];return c(function(){B.value=$,B.getSnapshot=k,d(B)&&T({inst:B})},[b,$,k]),s(function(){d(B)&&T({inst:B});var M=function(){d(B)&&T({inst:B})};return b(M)},[b]),l($),$}function d(b){var k=b.getSnapshot,S=b.value;try{var $=k();return!i(S,$)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,y=v?h:p,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Rp.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Rp}var f1;function d1(){return f1||(f1=1,process.env.NODE_ENV==="production"?El.exports=m6():El.exports=y6()),El.exports}/**
|
|
261
261
|
* @license React
|
|
262
262
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
263
263
|
*
|
|
@@ -265,7 +265,7 @@ to {
|
|
|
265
265
|
*
|
|
266
266
|
* This source code is licensed under the MIT license found in the
|
|
267
267
|
* LICENSE file in the root directory of this source tree.
|
|
268
|
-
*/var p1;function v6(){if(p1)return Pp;p1=1;var e=E,t=d1();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Pp.useSyncExternalStoreWithSelector=function(l,u,f,p,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function y($){if(!g){if(g=!0,b=$,$=p($),d!==void 0&&m.hasValue){var
|
|
268
|
+
*/var p1;function v6(){if(p1)return Pp;p1=1;var e=E,t=d1();function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Pp.useSyncExternalStoreWithSelector=function(l,u,f,p,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function y($){if(!g){if(g=!0,b=$,$=p($),d!==void 0&&m.hasValue){var O=m.value;if(d(O,$))return k=O}return k=$}if(O=k,r(b,$))return O;var I=p($);return d!==void 0&&d(O,I)?O:(b=$,k=I)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,f,p,d]);var v=o(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},Pp}var Mp={};/**
|
|
269
269
|
* @license React
|
|
270
270
|
* use-sync-external-store-shim/with-selector.development.js
|
|
271
271
|
*
|
|
@@ -273,16 +273,16 @@ to {
|
|
|
273
273
|
*
|
|
274
274
|
* This source code is licensed under the MIT license found in the
|
|
275
275
|
* LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/var h1;function g6(){return h1||(h1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=d1();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;function l(u,f,p,d,h){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=s(function(){var S=!1,$,
|
|
276
|
+
*/var h1;function g6(){return h1||(h1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E,t=d1();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;function l(u,f,p,d,h){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=s(function(){var S=!1,$,O,I=function(R){if(!S){S=!0,$=R;var j=d(R);if(h!==void 0&&v.hasValue){var U=v.value;if(h(U,j))return O=U,U}return O=j,j}var D=$,F=O;if(r(D,R))return F;var K=d(R);return h!==void 0&&h(F,K)?F:($=R,O=K,K)},B=p===void 0?null:p,T=function(){return I(f())},M=B===null?void 0:function(){return I(B())};return[T,M]},[f,p,d,h]),g=y[0],b=y[1],k=o(u,g,b);return a(function(){v.hasValue=!0,v.value=k},[k]),c(k),k}Mp.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Mp}process.env.NODE_ENV==="production"?Ap.exports=v6():Ap.exports=g6();var b6=Ap.exports;const w6=Ue(b6),{useSyncExternalStoreWithSelector:x6}=w6;let tle=!1;function m1(e,t=e.getState,n){const r=x6(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.useDebugValue(r),r}const y1=e=>{const t=typeof e=="function"?c1(e):e,n=(r,o)=>m1(t,r,o);return Object.assign(n,t),n},S6=e=>e?y1(e):y1,Np=new Map,_l=e=>{const t=Np.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},E6=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Np.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Np.set(n.name,o),{type:"tracked",store:e,...o}},v1=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...c}=t;let l;try{l=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(n,r,o);const{connection:u,...f}=E6(s,l,c);let p=!0;o.setState=(m,v,y)=>{const g=n(m,v);if(!p)return g;const b=y===void 0?{type:a||"anonymous"}:typeof y=="string"?{type:y}:y;return s===void 0?(u==null||u.send(b,r()),g):(u==null||u.send({...b,type:`${s}/${b.type}`},{..._l(c.name),[s]:o.getState()}),g)};const d=(...m)=>{const v=p;p=!1,n(...m),p=v},h=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(h):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([m,v])=>[m,m===f.store?h:v.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const v=o.dispatch;o.dispatch=(...y)=>{v(...y)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Dp(m.payload,y=>{if(y.type==="__setState"){if(s===void 0){d(y.state);return}Object.keys(y.state).length!==1&&console.error(`
|
|
277
277
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
278
278
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
279
279
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
280
|
-
`);const g=y.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_l(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_l(c.name));case"ROLLBACK":return Dp(m.state,y=>{if(s===void 0){d(y),u==null||u.init(o.getState());return}d(y[s]),u==null||u.init(_l(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Dp(m.state,y=>{if(s===void 0){d(y);return}JSON.stringify(o.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,g=(v=y.computedStates.slice(-1)[0])==null?void 0:v.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Dp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function _6(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const as=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return as(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return as(r)(n)}}}},$6=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const u=as(i.serialize),f=()=>{const v=i.partialize({...r()});let y;const g=u({state:v,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{y=b});if(y)throw y;return g},p=o.setState;o.setState=(v,y)=>{p(v,y),f()};const d=e((...v)=>{n(...v),f()},r,o);let h;const m=()=>{var v;if(!l)return;a=!1,s.forEach(g=>g(r()));const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{y==null||y(h,void 0),a=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:v=>{i={...i,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),h||d},k6=(e,t)=>(n,r,o)=>{let i={storage:_6(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return l.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,v;if(!l)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(m=r())!=null?m:p))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,c.forEach(g=>g(d))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},i.skipHydration||h(),d||p},C6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?$6(e,t):k6(e,t),_n=S6()(v1(C6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),g1=E.createContext(null),T6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=_n.getState().setClientMode,i=_n.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),c1()(v1((a,s)=>{const c=f=>{const p=_n.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:dc(),...f}]}}})},l=f=>{const p=_n.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=_n.getState().addMessageToHistory;return{...t,...e,eventEmitter:UA,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;c({id:dc(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage(f),p!=null&&p.userId&&u({message:f,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setState:f=>a(p=>({...p,...f})),setMessages:l,getMessages:()=>s().messages[_n.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:c,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Ne(e){const t=E.useContext(g1);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return m1(t,e)}const O6=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Ne(g=>g.eventEmitter),c=Ne(g=>g.sendTextMessage),l=Ne(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:v}}}=ct;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function y(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&c(t)}return j.jsx(A6,{...a,variant:r,onClick:y,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...v,children:e})},A6=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return j.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return j.jsx("button",{type:"button",...n})},P6=E.forwardRef(({block:e,type:t,...n},r)=>{const{message:{blocks:{bubble:o}}}=ct;return j.jsx("div",{...n,...o,ref:r,children:j.jsx(Vi,{block:e})})}),b1=E.createContext(null);function I6(){const e=E.useContext(b1);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const w1=E.createContext(null);function x1(){const e=E.useContext(w1);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const S1=E.createContext(null);function E1(){const e=E.useContext(S1);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const R6=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=I6(),[s,c]=E.useState(n),[l,u]=E.useState(!1),{message:{blocks:{image:f}}}=ct;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&dB(e).then(({width:p,height:d})=>{c(M6(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),j.jsxs(j.Fragment,{children:[l?null:j.jsx("div",{"data-orientation":s,...f.placeholder}),j.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function M6(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const N6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=ct;return j.jsx("div",{children:j.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),D6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ct;return j.jsx("div",{children:j.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function j6({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const F6=O.forwardRef(j6);function L6({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const B6=O.forwardRef(L6);function U6({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const z6=O.forwardRef(U6);function q6({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const H6=O.forwardRef(q6);function W6({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const V6=O.forwardRef(W6),K6=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ct;return j.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[j.jsx("p",{...s.title,children:r}),j.jsx(V6,{...s.icon})]})}),G6=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{column:a}}}=ct;return j.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>j.jsx(Vi,{block:s},c))})}),Z6=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{row:a}}}=ct;return j.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>j.jsx(Vi,{block:s},c))})});function Y6(e){return Object.prototype.toString.call(e)==="[object Object]"}function _1(e){return Y6(e)||Array.isArray(e)}function J6(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function jp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!_1(s)||!_1(c)?s===c:jp(s,c)})}function $1(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function X6(e,t){if(e.length!==t.length)return!1;const n=$1(e),r=$1(t);return n.every((o,i)=>{const a=r[i];return jp(o,a)})}function Fp(e){return typeof e=="number"}function k1(e){return typeof e=="string"}function Lp(e){return typeof e=="boolean"}function C1(e){return Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return Math.abs(e)}function Bp(e){return Math.sign(e)}function $l(e,t){return wt(e-t)}function Q6(e,t){if(e===0||t===0||wt(e)<=wt(t))return 0;const n=$l(wt(e),wt(t));return wt(n/e)}function ss(e){return Cl(e).map(Number)}function Fr(e){return e[kl(e)]}function kl(e){return Math.max(0,e.length-1)}function Cl(e){return Object.keys(e)}function T1(e,t){return[e,t].reduce((n,r)=>(Cl(r).forEach(o=>{const i=n[o],a=r[o],s=C1(i)&&C1(a);n[o]=s?T1(i,a):a}),n),{})}function O1(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function e7(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return Fp(e)?a():n[e](l)}return{measure:s}}function t7(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function mo(e,t){const n=wt(e-t);function r(l){return l<e}function o(l){return l>t}function i(l){return r(l)||o(l)}function a(l){return i(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function A1(e,t,n){const{constrain:r}=mo(0,e),o=e+1;let i=a(t);function a(p){return n?wt((o+p)%o):r(p)}function s(){return i}function c(p){return i=a(p),f}function l(p){return u().set(s()+p)}function u(){return A1(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function n7(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function cs(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function r7(e,t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v,y,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=cs(),C=cs(),P=mo(50,225).constrain(h.measure(20)),F={mouse:300,touch:400},T={mouse:500,touch:600},R=m?43:25;let H=!1,L=0,z=0,N=!1,D=!1,K=!1,W=!1;function M(Q,G){if(!G)return;function fe(_e){(Lp(G)||G(Q,_e))&&ae(_e)}const ve=n;$.add(ve,"dragstart",_e=>_e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){$.clear(),C.clear()}function U(){const Q=W?r:n;C.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function V(Q){const G=Q.nodeName||"";return k.includes(G)}function _(){return(m?T:F)[W?"mouse":"touch"]}function J(Q,G){const fe=p.add(Bp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||wt(Q)<P?ve:y&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=O1(Q,o);W=G,!(G&&Q.button!==0)&&(V(Q.target)||(K=m&&G&&!Q.buttons&&H,H=$l(i.get(),s.get())>=2,N=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),U(),L=a.readPoint(Q),z=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=$l(G,L),_e=$l(fe,z);if(!D&&!W&&(!Q.cancelable||(D=ve>_e,!D)))return le(Q);const I=a.pointerMove(Q);ve>v&&(K=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(I)),Q.preventDefault()}function le(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*_(),_e=J(t.apply(ve),fe),I=Q6(ve,_e),X=R-10*I,oe=g+I/50;D=!1,N=!1,C.clear(),u.useDuration(X).useFriction(oe),l.distance(_e,!m),W=!1,d.emit("pointerUp")}function pe(Q){K&&(Q.stopPropagation(),Q.preventDefault())}function me(){return N}return{init:M,pointerDown:me,destroy:w}}function o7(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(O1(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function c(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function l(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&wt(m)>.1?m:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function i7(e){function t(r){return e*(r/100)}return{measure:t}}function a7(e,t,n,r,o){let i,a,s=[],c=!1;function l(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=l(e),s=r.map(l);function m(y){for(const g of y){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=l(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(y=>{c||(Lp(h)||h(d,y))&&m(y)}),[e].concat(r).forEach(y=>i.observe(y))}function f(){i&&i.disconnect(),c=!0}return{init:u,destroy:f}}function s7(e,t,n,r){let o=!0,i=0,a=0,s=n,c=r,l=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let C=0;return $?(i=0,e.set(t),C=S):(i+=S/s,i*=c,l+=i,e.add(i),C=l-u),a=Bp(C),u=l,o=wt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function v(){return g(n)}function y(){return b(r)}function g(S){return s=S,k}function b(S){return c=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:y,useBaseDuration:v,useFriction:b,useDuration:g};return k}function c7(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=wt(e[h]-t.get()),v=n.get()-t.get(),y=s.constrain(m/a);n.subtract(v*y),!d&&wt(v)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){c=!d}return{constrain:u,toggleActive:f}}function l7(e,t,n,r){const o=mo(-t+e,n[0]),i=c(),a=l();function s(){const f=i[0],p=Fr(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return mo(d,h)}function c(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function u7(e,t,n){const r=t[0],o=n?r-e:Fr(t);return{limit:mo(o,r)}}function f7(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=mo(i,a);function l(p){return p===1?c(n.get()):p===-1?s(n.get()):!1}function u(p){if(!l(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function d7(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function p7(e,t,n,r,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=d().map(t.measure),f=h(),p=m();function d(){return l(r).map(y=>Fr(y)[c]-y[0][s]).map(wt)}function h(){return r.map(y=>n[s]-y[s]).map(y=>-wt(y))}function m(){const g=Fr(f)-Fr(o);return l(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,C=k===kl(S);return a&&$?0:a&&C?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function h7(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function c(h){return h.concat().sort((m,v)=>wt(m)-wt(v))[0]}function l(h){const m=e?a(h):s(h),v=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>wt(g.diff)-wt(b.diff)),{index:y}=v[0];return{index:y,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return c(v);const y=v.filter(g=>Bp(g)===m);return c(y)}function f(h,m){const v=t[h]-o.get(),y=u(v,m);return{index:h,distance:y}}function p(h,m){const v=o.get()+h,{index:y,distance:g}=l(v),b=!e&&i(v);if(!m||b)return{index:y,distance:h};const k=t[y]-g,S=h+u(k,0);return{index:y,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function m7(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function c(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:c,index:l}}function Tl(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return Fp(c)?c:c.get()}return{get:n,set:r,add:o,subtract:i}}function P1(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=r(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function y7(e,t,n,r,o,i,a,s,c){const l=ss(o),u=ss(o).reverse(),f=m().concat(v());function p(S,$){return S.reduce((C,P)=>C-o[P],$)}function d(S,$){return S.reduce((C,P)=>p(C,$)>0?C.concat([P]):C,[])}function h(S,$){const C=$==="start",P=C?-r:r,F=a.findSlideBounds([P]);return S.map(T=>{const R=C?0:-r,H=C?r:0,z=F.filter(N=>N.index===T)[0][C?"end":"start"];return{index:T,slideLocation:Tl(-1),translate:P1(e,t,c[T]),target:()=>s.get()>z?R:H}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function v(){const S=n-i[0]-1,$=d(l,S);return h($,"start")}function y(){return f.every(({index:S})=>{const $=l.filter(C=>C!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:C,slideLocation:P}=S,F=$();F!==P.get()&&(C.to(F),P.set(F))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:b,loop:g,loopPoints:f}}function v7(e,t){let n,r=!1;function o(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Lp(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function g7(e,t,n,r,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(v){const y=v||0;return n.map(g=>mo(l,g-l).constrain(g*y))}function d(v,y){const g=v||u,b=p(y);return g.reduce((k,S)=>{const $=r.map((C,P)=>({start:C-n[P]+b[P]+S,end:C+e-b[P]+S,index:P}));return k.concat($)},[])}function h(v,y){const g=i?s(v):c(v);return(y||f).reduce((k,S)=>{const{index:$,start:C,end:P}=S,F=k.includes($),T=C<g&&P>g;return!F&&T?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function b7(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=n[0]&&o,u=h(),f=m(),p=n.map(a),d=v();function h(){if(!l)return 0;const g=n[0];return wt(t[s]-g[s])}function m(){if(!l)return 0;const g=i.getComputedStyle(Fr(r));return parseFloat(g.getPropertyValue(`margin-${c}`))}function v(){return n.map((g,b,k)=>{const S=!b,$=b===kl(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(wt)}return{slideSizes:p,slideSizesWithGaps:d}}function w7(e,t,n){const r=Fp(n);function o(c,l){return ss(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ss(c).reduce((l,u)=>{const p=t.slice(Fr(l),u+1).reduce((d,h)=>d+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function a(c){return r?o(c,n):i(c)}return{groupSlides:a}}function x7(e,t,n,r,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:y,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=n7(u),C=t7(l,u),P=C.measureSize(k),F=i7(P),T=e7(c,P),R=!d&&!!b,H=d||!!b,{slideSizes:L,slideSizesWithGaps:z}=b7(C,k,S,n,H,o),N=w7(P,z,y),{snaps:D,snapsAligned:K}=p7(C,T,k,S,z,N,R),W=-Fr(D)+Fr(z),{snapsContained:M}=l7(P,W,K,b),w=R?M:K,{limit:U}=u7(W,w,d),V=A1(kl(w),f,d),_=V.clone(),J=ss(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:xe,eventHandler:we,animation:ke,options:{loop:Fe}})=>{const Oe=oe.pointerDown();Fe||xe.constrain(Oe);const B=ee.seek().settled();B&&!Oe&&(ke.stop(),we.emit("settle")),B||we.emit("scroll")},re=({scrollBody:oe,translate:ee,location:xe,offsetLocation:we,scrollLooper:ke,slideLooper:Fe,options:{loop:Oe}},B)=>{const Z=oe.velocity();we.set(xe.get()-Z+Z*B),Oe&&(ke.loop(oe.direction()),Fe.loop()),ee.to(we.get())},le={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,me=w[V.get()],ce=Tl(me),Q=Tl(me),G=Tl(me),fe=s7(ce,G,h,pe),ve=h7(d,w,W,U,G),_e=m7(le,V,_,ve,fe,G,a),I=g7(P,W,L,D,U,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:le,axis:C,direction:$,dragHandler:r7(C,$,e,r,o,G,o7(C,o),ce,le,_e,fe,ve,V,a,F,m,v,g,pe),eventStore:cs(),percentOfView:F,index:V,indexPrevious:_,limit:U,location:ce,offsetLocation:Q,options:i,resizeHandler:a7(t,a,o,n,C),scrollBody:fe,scrollBounds:c7(U,ce,G,fe,F),scrollLooper:f7(W,U,Q,[ce,Q,G]),scrollProgress:d7(U),scrollSnaps:w,scrollTarget:ve,scrollTo:_e,slideLooper:y7(C,$,P,W,z,w,I,Q,n),slidesHandler:v7(t,a),slidesInView:I,slideIndexes:J,slidesToScroll:N,target:G,translate:P1(C,$,t)};return X}function S7(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=wt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function c(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function l(){r=null,o=0}return{start:s,stop:c,reset:l,window:e}}function E7(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function o(c){return r(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=r(c).concat([l]),s}function a(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:o,off:a,on:i};return s}const _7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function $7(e){function t(i,a){return T1(i,a||{})}function n(i){const a=i.breakpoints||{},s=Cl(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function r(i){return i.map(a=>Cl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function k7(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Li(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=$7(o),a=k7(i),s=cs(),c=cs(),l=E7(),{animationRealms:u}=Li,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:v}=l,y=L;let g=!1,b,k=f(_7,Li.globalOptions),S=f(k),$=[],C,P,F;function T(){const{container:fe,slides:ve}=S;P=(k1(fe)?e.querySelector(fe):fe)||e.children[0];const I=k1(ve)?P.querySelectorAll(ve):ve;F=[].slice.call(I||P.children)}function R(fe,ve){const _e=x7(e,P,F,r,o,fe,l,ve);if(fe.loop&&!_e.slideLooper.canLoop()){const I=Object.assign({},fe,{loop:!1});return R(I,ve)}return _e}function H(fe,ve){if(g)return;const _e=u.find(X=>X.window===o),I=_e||S7(o);_e||u.push(I),k=f(k,fe),S=p(k),$=ve||$,T(),b=R(S,I),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&I.reset()}),b.options.loop&&b.slideLooper.loop(),P.offsetParent&&F.length&&b.dragHandler.init(G,S.watchDrag),C=a.init($,G))}function L(fe,ve){const _e=ae();z(),H(f({startIndex:_e},fe),ve),l.emit("reInit")}function z(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function N(){g||(g=!0,s.clear(),z(),l.emit("destroy"))}function D(fe){const ve=b[fe?"target":"location"].get(),_e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[_e](ve))}function K(fe){const ve=D(fe);return b.slideIndexes.filter(_e=>!ve.includes(_e))}function W(fe,ve,_e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,_e||0))}function M(fe){const ve=b.index.add(1).get();W(ve,fe===!0,-1)}function w(fe){const ve=b.index.add(-1).get();W(ve,fe===!0,1)}function U(){return b.index.add(1).get()!==ae()}function V(){return b.index.add(-1).get()!==ae()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return C}function pe(){return b}function me(){return e}function ce(){return P}function Q(){return F}const G={canScrollNext:U,canScrollPrev:V,containerNode:ce,internalEngine:pe,destroy:N,off:m,on:h,emit:v,plugins:le,previousScrollSnap:re,reInit:y,rootNode:me,scrollNext:M,scrollPrev:w,scrollProgress:J,scrollSnapList:_,scrollTo:W,selectedScrollSnap:ae,slideNodes:Q,slidesInView:D,slidesNotInView:K};return H(t,n),setTimeout(()=>l.emit("init"),0),G}Li.animationRealms=[],Li.globalOptions=void 0;function Up(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(J6()&&a){Li.globalOptions=Up.globalOptions;const l=Li(a,n.current,r.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{jp(n.current,e)||(n.current=e,c())},[e,c]),E.useEffect(()=>{X6(r.current,t)||(r.current=t,c())},[t,c]),[s,o]}Up.globalOptions=void 0;function C7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const T7=O.forwardRef(C7);function O7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const A7=O.forwardRef(O7);function P7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),O.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const I7=O.forwardRef(P7);function R7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),O.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const M7=O.forwardRef(R7);function N7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const D7=O.forwardRef(N7);function j7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const F7=O.forwardRef(j7);function L7({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const B7=O.forwardRef(L7),U7=E.forwardRef(({blocks:e},t)=>{const[n,r]=Up({skipSnaps:!0}),[o,i]=E.useState(!0),[a,s]=E.useState(!0),c=E.useCallback(()=>r==null?void 0:r.scrollPrev(),[r]),l=E.useCallback(()=>r==null?void 0:r.scrollNext(),[r]),{message:{blocks:{carousel:u}}}=ct,f=E.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return E.useEffect(()=>{r&&(f(r),r.on("reInit",f),r.on("select",f))},[r,f]),j.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:n,children:[j.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,d)=>j.jsx(Vi,{block:p},d))}),j.jsx(T7,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),j.jsx(A7,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Bi=Math.min,$n=Math.max,Ol=Math.round,Ui=Math.floor,yo=e=>({x:e,y:e});function I1(e,t,n){return $n(e,Bi(t,n))}function Al(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function zp(e){return e.split("-")[1]}function R1(e){return e==="x"?"y":"x"}function z7(e){return e==="y"?"height":"width"}function us(e){return["top","bottom"].includes(ls(e))?"y":"x"}function q7(e){return R1(us(e))}function H7(e){return{top:0,right:0,bottom:0,left:0,...e}}function W7(e){return typeof e!="number"?H7(e):{top:e,right:e,bottom:e,left:e}}function Pl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function vo(e){return M1(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(M1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M1(e){return e instanceof Node||e instanceof kn(e).Node}function xt(e){return e instanceof Element||e instanceof kn(e).Element}function tn(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function qp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function V7(e){return["table","td","th"].includes(vo(e))}function Hp(e){const t=Wp(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function K7(e){let t=Jo(e);for(;tn(t)&&!ds(t);){if(Hp(t))return t;t=Jo(t)}return null}function Wp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ds(e){return["html","body","#document"].includes(vo(e))}function Cn(e){return kn(e).getComputedStyle(e)}function Il(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jo(e){if(vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qp(e)&&e.host||Lr(e);return qp(t)?t.host:t}function N1(e){const t=Jo(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&fs(t)?t:N1(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=N1(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=kn(o);return i?t.concat(a,a.visualViewport||[],fs(o)?o:[],a.frameElement&&n?go(a.frameElement):[]):t.concat(o,go(o,[],n))}function bo(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&qp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function D1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function G7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function j1(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(D1())||t.test(G7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F1(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function L1(){return/apple/i.test(navigator.vendor)}function Z7(){return D1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function B1(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Y7(e){return"nativeEvent"in e}function J7(e){return e.matches("html,body")}function Gn(e){return(e==null?void 0:e.ownerDocument)||document}function Vp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function U1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const X7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z1(e){return tn(e)&&e.matches(X7)}function Vt(e){e.preventDefault(),e.stopPropagation()}function q1(e,t,n){let{reference:r,floating:o}=e;const i=us(t),a=q7(t),s=z7(a),c=ls(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(c){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(zp(t)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1);break}return d}const Q7=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=q1(l,r,c),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:g,y:b,data:k,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[v]:{...d[v],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=q1(l,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function H1(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Al(t,e),h=W7(d),v=s[p?f==="floating"?"reference":"floating":f],y=Pl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}async function eU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ls(n),s=zp(n),c=us(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),c?{x:d*u,y:p*l}:{x:p*l,y:d*u}}const tU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await eU(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},nU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:g}=v;return{x:y,y:g}}},...c}=Al(e,t),l={x:n,y:r},u=await H1(t,c),f=us(ls(o)),p=R1(f);let d=l[p],h=l[f];if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+u[v],b=d-u[y];d=I1(g,d,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=h+u[v],b=h-u[y];h=I1(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},rU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Al(e,t),c=await H1(t,s),l=ls(n),u=zp(n),f=us(n)==="y",{width:p,height:d}=r.floating;let h,m;l==="top"||l==="bottom"?(h=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,h=u==="end"?"top":"bottom");const v=d-c[h],y=p-c[m],g=!t.middlewareData.shift;let b=v,k=y;if(f){const $=p-c.left-c.right;k=u||g?Bi(y,$):$}else{const $=d-c.top-c.bottom;b=u||g?Bi(v,$):$}if(g&&!u){const $=$n(c.left,0),C=$n(c.right,0),P=$n(c.top,0),F=$n(c.bottom,0);f?k=p-2*($!==0||C!==0?$+C:$n(c.left,c.right)):b=d-2*(P!==0||F!==0?P+F:$n(c.top,c.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function W1(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ol(n)!==i||Ol(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Kp(e){return xt(e)?e:e.contextElement}function zi(e){const t=Kp(e);if(!tn(t))return yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=W1(t);let a=(i?Ol(n.width):n.width)/r,s=(i?Ol(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const oU=yo(0);function V1(e){const t=kn(e);return!Wp()||!t.visualViewport?oU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Kp(e);let a=yo(1);t&&(r?xt(r)&&(a=zi(r)):a=zi(e));const s=iU(i,n,r)?V1(i):yo(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=kn(i),d=r&&xt(r)?kn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=zi(h),v=h.getBoundingClientRect(),y=Cn(h),g=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=g,l+=b,h=kn(h).frameElement}}return Pl({width:u,height:f,x:c,y:l})}function aU(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=tn(n),i=Lr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yo(1);const c=yo(0);if((o||!o&&r!=="fixed")&&((vo(n)!=="body"||fs(i))&&(a=Il(n)),tn(n))){const l=Xo(n);s=zi(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function sU(e){return Array.from(e.getClientRects())}function K1(e){return Xo(Lr(e)).left+Il(e).scrollLeft}function cU(e){const t=Lr(e),n=Il(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K1(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function lU(e,t){const n=kn(e),r=Lr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Wp();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function uU(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tn(e)?zi(e):yo(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function G1(e,t,n){let r;if(t==="viewport")r=lU(e,n);else if(t==="document")r=cU(Lr(e));else if(xt(t))r=uU(t,n);else{const o=V1(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Pl(r)}function Z1(e,t){const n=Jo(e);return n===t||!xt(n)||ds(n)?!1:Cn(n).position==="fixed"||Z1(n,t)}function fU(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(s=>xt(s)&&vo(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?Jo(e):e;for(;xt(a)&&!ds(a);){const s=Cn(a),c=Hp(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(a)&&!c&&Z1(e,a))?r=r.filter(u=>u!==a):o=s,a=Jo(a)}return t.set(e,r),r}function dU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?fU(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=G1(t,u,o);return l.top=$n(f.top,l.top),l.right=Bi(f.right,l.right),l.bottom=Bi(f.bottom,l.bottom),l.left=$n(f.left,l.left),l},G1(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function pU(e){return W1(e)}function hU(e,t,n){const r=tn(t),o=Lr(t),i=n==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(r||!r&&!i)if((vo(t)!=="body"||fs(o))&&(s=Il(t)),r){const l=Xo(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=K1(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function Y1(e,t){return!tn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function J1(e,t){const n=kn(e);if(!tn(e))return n;let r=Y1(e,t);for(;r&&V7(r)&&Cn(r).position==="static";)r=Y1(r,t);return r&&(vo(r)==="html"||vo(r)==="body"&&Cn(r).position==="static"&&!Hp(r))?n:r||K7(e)||n}const mU=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||J1,i=this.getDimensions;return{reference:hU(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function yU(e){return Cn(e).direction==="rtl"}const vU={convertOffsetParentRelativeRectToViewportRelativeRect:aU,getDocumentElement:Lr,getClippingRect:dU,getOffsetParent:J1,getElementRects:mU,getClientRects:sU,getDimensions:pU,getScale:zi,isElement:xt,isRTL:yU};function gU(e,t){let n=null,r;const o=Lr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=Ui(u),h=Ui(o.clientWidth-(l+f)),m=Ui(o.clientHeight-(u+p)),v=Ui(l),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-v+"px",threshold:$n(0,Bi(1,c))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==c){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function bU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Kp(e),u=o||i?[...l?go(l):[],...go(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=l&&s?gU(l,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let h,m=c?Xo(e):null;c&&v();function v(){const y=Xo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,c&&cancelAnimationFrame(h)}}const wU=(e,t,n)=>{const r=new Map,o={platform:vU,...n},i={...o.platform,_c:r};return Q7(e,t,{...o,platform:i})};var Rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ml(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ml(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ml(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function X1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Q1(e,t){const n=X1(e);return Math.round(t*n)/n}function eS(e){const t=O.useRef(e);return Rl(()=>{t.current=e}),t}function xU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=O.useState(r);Ml(p,r)||d(r);const[h,m]=O.useState(null),[v,y]=O.useState(null),g=O.useCallback(D=>{D!=$.current&&($.current=D,m(D))},[m]),b=O.useCallback(D=>{D!==C.current&&(C.current=D,y(D))},[y]),k=i||h,S=a||v,$=O.useRef(null),C=O.useRef(null),P=O.useRef(u),F=eS(c),T=eS(o),R=O.useCallback(()=>{if(!$.current||!C.current)return;const D={placement:t,strategy:n,middleware:p};T.current&&(D.platform=T.current),wU($.current,C.current,D).then(K=>{const W={...K,isPositioned:!0};H.current&&!Ml(P.current,W)&&(P.current=W,DT.flushSync(()=>{f(W)}))})},[p,t,n,T]);Rl(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(D=>({...D,isPositioned:!1})))},[l]);const H=O.useRef(!1);Rl(()=>(H.current=!0,()=>{H.current=!1}),[]),Rl(()=>{if(k&&($.current=k),S&&(C.current=S),k&&S){if(F.current)return F.current(k,S,R);R()}},[k,S,R,F]);const L=O.useMemo(()=>({reference:$,floating:C,setReference:g,setFloating:b}),[g,b]),z=O.useMemo(()=>({reference:k,floating:S}),[k,S]),N=O.useMemo(()=>{const D={position:n,left:0,top:0};if(!z.floating)return D;const K=Q1(z.floating,u.x),W=Q1(z.floating,u.y);return s?{...D,transform:"translate("+K+"px, "+W+"px)",...X1(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:W}},[n,s,z.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:R,refs:L,elements:z,floatingStyles:N}),[u,R,L,z,N])}/*!
|
|
280
|
+
`);const g=y.state[s];if(g==null)return;JSON.stringify(o.getState())!==JSON.stringify(g)&&d(g);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return d(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_l(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_l(c.name));case"ROLLBACK":return Dp(m.state,y=>{if(s===void 0){d(y),u==null||u.init(o.getState());return}d(y[s]),u==null||u.init(_l(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Dp(m.state,y=>{if(s===void 0){d(y);return}JSON.stringify(o.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,g=(v=y.computedStates.slice(-1)[0])==null?void 0:v.state;if(!g)return;d(s===void 0?g:g[s]),u==null||u.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Dp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function _6(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const as=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return as(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return as(r)(n)}}}},$6=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const u=as(i.serialize),f=()=>{const v=i.partialize({...r()});let y;const g=u({state:v,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{y=b});if(y)throw y;return g},p=o.setState;o.setState=(v,y)=>{p(v,y),f()};const d=e((...v)=>{n(...v),f()},r,o);let h;const m=()=>{var v;if(!l)return;a=!1,s.forEach(g=>g(r()));const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=i.merge(g,(b=r())!=null?b:d),n(h,!0),f()}).then(()=>{y==null||y(h,void 0),a=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:v=>{i={...i,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:v=>(s.add(v),()=>{s.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),h||d},k6=(e,t)=>(n,r,o)=>{let i={storage:_6(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=i.partialize({...r()});return l.setItem(i.name,{state:m,version:i.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const p=e((...m)=>{n(...m),u()},r,o);let d;const h=()=>{var m,v;if(!l)return;a=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:p)});const y=((v=i.onRehydrateStorage)==null?void 0:v.call(i,(m=r())!=null?m:p))||void 0;return as(l.getItem.bind(l))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return d=i.merge(g,(b=r())!=null?b:p),n(d,!0),u()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,c.forEach(g=>g(d))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{i={...i,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},i.skipHydration||h(),d||p},C6=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?$6(e,t):k6(e,t),_n=S6()(v1(C6((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(o=>({...o,messageHistory:{...o.messageHistory,[n]:[r,...(o.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:o}=t();o!==n&&r(),e(i=>({...i,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),g1=E.createContext(null),T6=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,o=_n.getState().setClientMode,i=_n.getState().setConversationId;return n&&o(n.mode),E.useEffect(()=>{r&&i(r)},[r]),c1()(v1((a,s)=>{const c=f=>{const p=_n.getState().conversationId;if(p)return a(d=>{const h=d.messages[p]??[];return{...d,messages:{...d.messages,[p]:[...h.filter(m=>m.id!==f.id),{id:dc(),...f}]}}})},l=f=>{const p=_n.getState().conversationId;if(p)return a(d=>({...d,messages:{...d.messages,[p]:f}}))},u=_n.getState().addMessageToHistory;return{...t,...e,eventEmitter:UA,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const p=s().client;c({id:dc(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),p&&await p.sendMessage(f),p!=null&&p.userId&&u({message:f,userId:p.userId})},on:(f,p)=>{const d=s().client;return d?d.on(f,p):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setState:f=>a(p=>({...p,...f})),setMessages:l,getMessages:()=>s().messages[_n.getState().conversationId??""]??[],setIsTyping:(f,p)=>{a(d=>({...d,isTyping:f})),f&&(a(d=>({...d,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const d=s().lastTypingHeartbeat;d&&new Date().getTime()-d.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:f=>a(p=>({...p,lastTypingHeartbeat:f})),addMessage:c,setConnected:f=>a(p=>({...p,connected:f})),restartConversation:async()=>{const f=s().client,p=s().setMessages;f&&(await f.newConversation(),p([]))}}},{name:"webchatStore"}))};function Ne(e){const t=E.useContext(g1);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return m1(t,e)}const O6=({text:e,buttonValue:t,type:n,variant:r,groupId:o,reusable:i,...a})=>{const s=Ne(g=>g.eventEmitter),c=Ne(g=>g.sendTextMessage),l=Ne(g=>g.isReadOnly),[u,f]=E.useState(!1),[p,d]=E.useState(!1),[h,m]=E.useState(!1),{message:{blocks:{button:v}}}=ct;E.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{d(!0),i||m(!0)})},[s,o,i]);function y(){o&&s.emit(`button-group-${o}-click`),f(!0),i||m(!0),r!=="link"&&c(t)}return L.jsx(A6,{...a,variant:r,onClick:y,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":r,value:t,...v,children:e})},A6=e=>{if(e.variant==="link"){const{value:r,variant:o,...i}=e;return L.jsx("a",{...i,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return L.jsx("button",{type:"button",...n})},P6=E.forwardRef(({block:e,type:t,...n},r)=>{const{message:{blocks:{bubble:o}}}=ct;return L.jsx("div",{...n,...o,ref:r,children:L.jsx(Wi,{block:e})})}),b1=E.createContext(null);function I6(){const e=E.useContext(b1);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const w1=E.createContext(null);function x1(){const e=E.useContext(w1);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const S1=E.createContext(null);function E1(){const e=E.useContext(S1);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const R6=E.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=E.useId(),{setIsLoading:a}=I6(),[s,c]=E.useState(n),[l,u]=E.useState(!1),{message:{blocks:{image:f}}}=ct;return E.useLayoutEffect(()=>{a(p=>[...p,i])},[]),E.useEffect(()=>{e&&s==="auto"&&dB(e).then(({width:p,height:d})=>{c(M6(p,d)),a(h=>h.filter(m=>m!==i))})},[e]),L.jsxs(L.Fragment,{children:[l?null:L.jsx("div",{"data-orientation":s,...f.placeholder}),L.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function M6(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const N6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:o}}}=ct;return L.jsx("div",{children:L.jsx("video",{...n,controls:!0,src:e,...o,ref:r})})}),D6=E.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ct;return L.jsx("div",{children:L.jsx("audio",{...n,controls:!0,src:e,...o,ref:r})})});function j6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const F6=C.forwardRef(j6);function L6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const B6=C.forwardRef(L6);function U6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const z6=C.forwardRef(U6);function q6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const H6=C.forwardRef(q6);function V6({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const W6=C.forwardRef(V6),K6=E.forwardRef(({type:e,latitude:t,longitude:n,title:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=ct;return L.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[L.jsx("p",{...s.title,children:r}),L.jsx(W6,{...s.icon})]})}),G6=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{column:a}}}=ct;return L.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>L.jsx(Wi,{block:s},c))})}),Z6=E.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,...o},i)=>{const{message:{blocks:{row:a}}}=ct;return L.jsx("div",{"data-horizontal":n,"data-vertical":r,...o,...a,ref:i,children:e.map((s,c)=>L.jsx(Wi,{block:s},c))})});function Y6(e){return Object.prototype.toString.call(e)==="[object Object]"}function _1(e){return Y6(e)||Array.isArray(e)}function J6(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function jp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!_1(s)||!_1(c)?s===c:jp(s,c)})}function $1(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function X6(e,t){if(e.length!==t.length)return!1;const n=$1(e),r=$1(t);return n.every((o,i)=>{const a=r[i];return jp(o,a)})}function Fp(e){return typeof e=="number"}function k1(e){return typeof e=="string"}function Lp(e){return typeof e=="boolean"}function C1(e){return Object.prototype.toString.call(e)==="[object Object]"}function wt(e){return Math.abs(e)}function Bp(e){return Math.sign(e)}function $l(e,t){return wt(e-t)}function Q6(e,t){if(e===0||t===0||wt(e)<=wt(t))return 0;const n=$l(wt(e),wt(t));return wt(n/e)}function ss(e){return Cl(e).map(Number)}function Fr(e){return e[kl(e)]}function kl(e){return Math.max(0,e.length-1)}function Cl(e){return Object.keys(e)}function T1(e,t){return[e,t].reduce((n,r)=>(Cl(r).forEach(o=>{const i=n[o],a=r[o],s=C1(i)&&C1(a);n[o]=s?T1(i,a):a}),n),{})}function O1(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function e7(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return Fp(e)?a():n[e](l)}return{measure:s}}function t7(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function c(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function mo(e,t){const n=wt(e-t);function r(l){return l<e}function o(l){return l>t}function i(l){return r(l)||o(l)}function a(l){return i(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function A1(e,t,n){const{constrain:r}=mo(0,e),o=e+1;let i=a(t);function a(p){return n?wt((o+p)%o):r(p)}function s(){return i}function c(p){return i=a(p),f}function l(p){return u().set(s()+p)}function u(){return A1(e,s(),n)}const f={get:s,set:c,add:l,clone:u};return f}function n7(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function cs(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function r7(e,t,n,r,o,i,a,s,c,l,u,f,p,d,h,m,v,y,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},$=cs(),O=cs(),I=mo(50,225).constrain(h.measure(20)),B={mouse:300,touch:400},T={mouse:500,touch:600},M=m?43:25;let R=!1,j=0,U=0,D=!1,F=!1,K=!1,V=!1;function N(Q,G){if(!G)return;function fe(_e){(Lp(G)||G(Q,_e))&&ae(_e)}const ve=n;$.add(ve,"dragstart",_e=>_e.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",fe).add(ve,"mousedown",fe).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function w(){$.clear(),O.clear()}function q(){const Q=V?r:n;O.add(Q,"touchmove",re,S).add(Q,"touchend",le).add(Q,"mousemove",re,S).add(Q,"mouseup",le)}function W(Q){const G=Q.nodeName||"";return k.includes(G)}function _(){return(m?T:B)[V?"mouse":"touch"]}function J(Q,G){const fe=p.add(Bp(Q)*-1),ve=f.byDistance(Q,!m).distance;return m||wt(Q)<I?ve:y&&G?ve*.5:f.byIndex(fe.get(),0).distance}function ae(Q){const G=O1(Q,o);V=G,!(G&&Q.button!==0)&&(W(Q.target)||(K=m&&G&&!Q.buttons&&R,R=$l(i.get(),s.get())>=2,D=!0,a.pointerDown(Q),u.useFriction(0).useDuration(0),i.set(s),q(),j=a.readPoint(Q),U=a.readPoint(Q,b),d.emit("pointerDown")))}function re(Q){const G=a.readPoint(Q),fe=a.readPoint(Q,b),ve=$l(G,j),_e=$l(fe,U);if(!F&&!V&&(!Q.cancelable||(F=ve>_e,!F)))return le(Q);const P=a.pointerMove(Q);ve>v&&(K=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(P)),Q.preventDefault()}function le(Q){const fe=f.byDistance(0,!1).index!==p.get(),ve=a.pointerUp(Q)*_(),_e=J(t.apply(ve),fe),P=Q6(ve,_e),X=M-10*P,oe=g+P/50;F=!1,D=!1,O.clear(),u.useDuration(X).useFriction(oe),l.distance(_e,!m),V=!1,d.emit("pointerUp")}function pe(Q){K&&(Q.stopPropagation(),Q.preventDefault())}function me(){return D}return{init:N,pointerDown:me,destroy:w}}function o7(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(O1(f,t)?f:f.touches[0])[h]}function s(f){return r=f,o=f,a(f)}function c(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function l(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),h=i(f)-i(o)>170,m=p/d;return d&&!h&&wt(m)>.1?m:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function i7(e){function t(r){return e*(r/100)}return{measure:t}}function a7(e,t,n,r,o){let i,a,s=[],c=!1;function l(d){return o.measureSize(d.getBoundingClientRect())}function u(d,h){if(!h)return;a=l(e),s=r.map(l);function m(y){for(const g of y){const b=g.target===e,k=r.indexOf(g.target),S=b?a:s[k],$=l(b?e:r[k]);if(S!==$){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(y=>{c||(Lp(h)||h(d,y))&&m(y)}),[e].concat(r).forEach(y=>i.observe(y))}function f(){i&&i.disconnect(),c=!0}return{init:u,destroy:f}}function s7(e,t,n,r){let o=!0,i=0,a=0,s=n,c=r,l=e.get(),u=0;function f(){const S=t.get()-e.get(),$=!s;let O=0;return $?(i=0,e.set(t),O=S):(i+=S/s,i*=c,l+=i,e.add(i),O=l-u),a=Bp(O),u=l,o=wt(S)<.001,k}function p(){return o}function d(){return s}function h(){return a}function m(){return i}function v(){return g(n)}function y(){return b(r)}function g(S){return s=S,k}function b(S){return c=S,k}const k={direction:h,duration:d,velocity:m,seek:f,settled:p,useBaseFriction:y,useBaseDuration:v,useFriction:b,useDuration:g};return k}function c7(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",m=wt(e[h]-t.get()),v=n.get()-t.get(),y=s.constrain(m/a);n.subtract(v*y),!d&&wt(v)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){c=!d}return{constrain:u,toggleActive:f}}function l7(e,t,n,r){const o=mo(-t+e,n[0]),i=c(),a=l();function s(){const f=i[0],p=Fr(i),d=i.lastIndexOf(f),h=i.indexOf(p)+1;return mo(d,h)}function c(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function u7(e,t,n){const r=t[0],o=n?r-e:Fr(t);return{limit:mo(o,r)}}function f7(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=mo(i,a);function l(p){return p===1?c(n.get()):p===-1?s(n.get()):!1}function u(p){if(!l(p))return;const d=e*(p*-1);r.forEach(h=>h.add(d))}return{loop:u}}function d7(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function p7(e,t,n,r,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=d().map(t.measure),f=h(),p=m();function d(){return l(r).map(y=>Fr(y)[c]-y[0][s]).map(wt)}function h(){return r.map(y=>n[s]-y[s]).map(y=>-wt(y))}function m(){const g=Fr(f)-Fr(o);return l(f).map(b=>b[0]).map((b,k,S)=>{const $=!k,O=k===kl(S);return a&&$?0:a&&O?g:b+u[k]})}return{snaps:f,snapsAligned:p}}function h7(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function c(h){return h.concat().sort((m,v)=>wt(m)-wt(v))[0]}function l(h){const m=e?a(h):s(h),v=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>wt(g.diff)-wt(b.diff)),{index:y}=v[0];return{index:y,distance:m}}function u(h,m){const v=[h,h+n,h-n];if(!e)return v[0];if(!m)return c(v);const y=v.filter(g=>Bp(g)===m);return c(y)}function f(h,m){const v=t[h]-o.get(),y=u(v,m);return{index:h,distance:y}}function p(h,m){const v=o.get()+h,{index:y,distance:g}=l(v),b=!e&&i(v);if(!m||b)return{index:y,distance:h};const k=t[y]-g,S=h+u(k,0);return{index:y,distance:S}}return{byDistance:p,byIndex:f,shortcut:u}}function m7(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function c(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),h=r.byIndex(d.get(),p);s(h)}return{distance:c,index:l}}function Tl(e){let t=e;function n(){return t}function r(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return Fp(c)?c:c.get()}return{get:n,set:r,add:o,subtract:i}}function P1(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=r(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function y7(e,t,n,r,o,i,a,s,c){const l=ss(o),u=ss(o).reverse(),f=m().concat(v());function p(S,$){return S.reduce((O,I)=>O-o[I],$)}function d(S,$){return S.reduce((O,I)=>p(O,$)>0?O.concat([I]):O,[])}function h(S,$){const O=$==="start",I=O?-r:r,B=a.findSlideBounds([I]);return S.map(T=>{const M=O?0:-r,R=O?r:0,U=B.filter(D=>D.index===T)[0][O?"end":"start"];return{index:T,slideLocation:Tl(-1),translate:P1(e,t,c[T]),target:()=>s.get()>U?M:R}})}function m(){const S=i[0]-1,$=d(u,S);return h($,"end")}function v(){const S=n-i[0]-1,$=d(l,S);return h($,"start")}function y(){return f.every(({index:S})=>{const $=l.filter(O=>O!==S);return p($,n)<=.1})}function g(){f.forEach(S=>{const{target:$,translate:O,slideLocation:I}=S,B=$();B!==I.get()&&(O.to(B),I.set(B))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:b,loop:g,loopPoints:f}}function v7(e,t){let n,r=!1;function o(s,c){if(!c)return;function l(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Lp(c)||c(s,u))&&l(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function g7(e,t,n,r,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(v){const y=v||0;return n.map(g=>mo(l,g-l).constrain(g*y))}function d(v,y){const g=v||u,b=p(y);return g.reduce((k,S)=>{const $=r.map((O,I)=>({start:O-n[I]+b[I]+S,end:O+e-b[I]+S,index:I}));return k.concat($)},[])}function h(v,y){const g=i?s(v):c(v);return(y||f).reduce((k,S)=>{const{index:$,start:O,end:I}=S,B=k.includes($),T=O<g&&I>g;return!B&&T?k.concat([$]):k},[])}return{check:h,findSlideBounds:d}}function b7(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=n[0]&&o,u=h(),f=m(),p=n.map(a),d=v();function h(){if(!l)return 0;const g=n[0];return wt(t[s]-g[s])}function m(){if(!l)return 0;const g=i.getComputedStyle(Fr(r));return parseFloat(g.getPropertyValue(`margin-${c}`))}function v(){return n.map((g,b,k)=>{const S=!b,$=b===kl(k);return S?p[b]+u:$?p[b]+f:k[b+1][s]-g[s]}).map(wt)}return{slideSizes:p,slideSizesWithGaps:d}}function w7(e,t,n){const r=Fp(n);function o(c,l){return ss(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ss(c).reduce((l,u)=>{const p=t.slice(Fr(l),u+1).reduce((d,h)=>d+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,f)=>c.slice(l,f[u+1]))}function a(c){return r?o(c,n):i(c)}return{groupSlides:a}}function x7(e,t,n,r,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:h,dragFree:m,dragThreshold:v,slidesToScroll:y,skipSnaps:g,containScroll:b}=i,k=t.getBoundingClientRect(),S=n.map(oe=>oe.getBoundingClientRect()),$=n7(u),O=t7(l,u),I=O.measureSize(k),B=i7(I),T=e7(c,I),M=!d&&!!b,R=d||!!b,{slideSizes:j,slideSizesWithGaps:U}=b7(O,k,S,n,R,o),D=w7(I,U,y),{snaps:F,snapsAligned:K}=p7(O,T,k,S,U,D,M),V=-Fr(F)+Fr(U),{snapsContained:N}=l7(I,V,K,b),w=M?N:K,{limit:q}=u7(V,w,d),W=A1(kl(w),f,d),_=W.clone(),J=ss(n),ae=({dragHandler:oe,scrollBody:ee,scrollBounds:xe,eventHandler:we,animation:ke,options:{loop:Fe}})=>{const Oe=oe.pointerDown();Fe||xe.constrain(Oe);const z=ee.seek().settled();z&&!Oe&&(ke.stop(),we.emit("settle")),z||we.emit("scroll")},re=({scrollBody:oe,translate:ee,location:xe,offsetLocation:we,scrollLooper:ke,slideLooper:Fe,options:{loop:Oe}},z)=>{const Z=oe.velocity();we.set(xe.get()-Z+Z*z),Oe&&(ke.loop(oe.direction()),Fe.loop()),ee.to(we.get())},le={start:()=>s.start(X),stop:()=>s.stop(X),update:()=>ae(X),render:oe=>re(X,oe)},pe=.68,me=w[W.get()],ce=Tl(me),Q=Tl(me),G=Tl(me),fe=s7(ce,G,h,pe),ve=h7(d,w,V,q,G),_e=m7(le,W,_,ve,fe,G,a),P=g7(I,V,j,F,q,d,p),X={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:k,slideRects:S,animation:le,axis:O,direction:$,dragHandler:r7(O,$,e,r,o,G,o7(O,o),ce,le,_e,fe,ve,W,a,B,m,v,g,pe),eventStore:cs(),percentOfView:B,index:W,indexPrevious:_,limit:q,location:ce,offsetLocation:Q,options:i,resizeHandler:a7(t,a,o,n,O),scrollBody:fe,scrollBounds:c7(q,ce,G,fe,B),scrollLooper:f7(V,q,Q,[ce,Q,G]),scrollProgress:d7(q),scrollSnaps:w,scrollTarget:ve,scrollTo:_e,slideLooper:y7(O,$,I,V,U,w,P,Q,n),slidesHandler:v7(t,a),slidesInView:P,slideIndexes:J,slidesToScroll:D,target:G,translate:P1(O,$,t)};return X}function S7(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:h})=>h.update()),o-=t;const d=wt(o/t);n.forEach(({animation:h})=>h.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function c(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function l(){r=null,o=0}return{start:s,stop:c,reset:l,window:e}}function E7(){const e={};let t;function n(c){t=c}function r(c){return e[c]||[]}function o(c){return r(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=r(c).concat([l]),s}function a(c,l){return e[c]=r(c).filter(u=>u!==l),s}const s={init:n,emit:o,off:a,on:i};return s}const _7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function $7(e){function t(i,a){return T1(i,a||{})}function n(i){const a=i.breakpoints||{},s=Cl(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function r(i){return i.map(a=>Cl(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function k7(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Li(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=$7(o),a=k7(i),s=cs(),c=cs(),l=E7(),{animationRealms:u}=Li,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:h,off:m,emit:v}=l,y=j;let g=!1,b,k=f(_7,Li.globalOptions),S=f(k),$=[],O,I,B;function T(){const{container:fe,slides:ve}=S;I=(k1(fe)?e.querySelector(fe):fe)||e.children[0];const P=k1(ve)?I.querySelectorAll(ve):ve;B=[].slice.call(P||I.children)}function M(fe,ve){const _e=x7(e,I,B,r,o,fe,l,ve);if(fe.loop&&!_e.slideLooper.canLoop()){const P=Object.assign({},fe,{loop:!1});return M(P,ve)}return _e}function R(fe,ve){if(g)return;const _e=u.find(X=>X.window===o),P=_e||S7(o);_e||u.push(P),k=f(k,fe),S=p(k),$=ve||$,T(),b=M(S,P),d([k,...$.map(({options:X})=>X)]).forEach(X=>s.add(X,"change",j)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(G),b.resizeHandler.init(G,S.watchResize),b.slidesHandler.init(G,S.watchSlides),c.add(r,"visibilitychange",()=>{r.hidden&&P.reset()}),b.options.loop&&b.slideLooper.loop(),I.offsetParent&&B.length&&b.dragHandler.init(G,S.watchDrag),O=a.init($,G))}function j(fe,ve){const _e=ae();U(),R(f({startIndex:_e},fe),ve),l.emit("reInit")}function U(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function D(){g||(g=!0,s.clear(),U(),l.emit("destroy"))}function F(fe){const ve=b[fe?"target":"location"].get(),_e=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[_e](ve))}function K(fe){const ve=F(fe);return b.slideIndexes.filter(_e=>!ve.includes(_e))}function V(fe,ve,_e){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(fe,_e||0))}function N(fe){const ve=b.index.add(1).get();V(ve,fe===!0,-1)}function w(fe){const ve=b.index.add(-1).get();V(ve,fe===!0,1)}function q(){return b.index.add(1).get()!==ae()}function W(){return b.index.add(-1).get()!==ae()}function _(){return b.scrollSnaps.map(b.scrollProgress.get)}function J(){return b.scrollProgress.get(b.location.get())}function ae(){return b.index.get()}function re(){return b.indexPrevious.get()}function le(){return O}function pe(){return b}function me(){return e}function ce(){return I}function Q(){return B}const G={canScrollNext:q,canScrollPrev:W,containerNode:ce,internalEngine:pe,destroy:D,off:m,on:h,emit:v,plugins:le,previousScrollSnap:re,reInit:y,rootNode:me,scrollNext:N,scrollPrev:w,scrollProgress:J,scrollSnapList:_,scrollTo:V,selectedScrollSnap:ae,slideNodes:Q,slidesInView:F,slidesNotInView:K};return R(t,n),setTimeout(()=>l.emit("init"),0),G}Li.animationRealms=[],Li.globalOptions=void 0;function Up(e={},t=[]){const n=E.useRef(e),r=E.useRef(t),[o,i]=E.useState(),[a,s]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return E.useEffect(()=>{if(J6()&&a){Li.globalOptions=Up.globalOptions;const l=Li(a,n.current,r.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),E.useEffect(()=>{jp(n.current,e)||(n.current=e,c())},[e,c]),E.useEffect(()=>{X6(r.current,t)||(r.current=t,c())},[t,c]),[s,o]}Up.globalOptions=void 0;function C7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const T7=C.forwardRef(C7);function O7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const A7=C.forwardRef(O7);function P7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),C.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const I7=C.forwardRef(P7);function R7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),C.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const M7=C.forwardRef(R7);function N7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const D7=C.forwardRef(N7);function j7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const F7=C.forwardRef(j7);function L7({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const B7=C.forwardRef(L7),U7=E.forwardRef(({blocks:e},t)=>{const[n,r]=Up({skipSnaps:!0}),[o,i]=E.useState(!0),[a,s]=E.useState(!0),c=E.useCallback(()=>r==null?void 0:r.scrollPrev(),[r]),l=E.useCallback(()=>r==null?void 0:r.scrollNext(),[r]),{message:{blocks:{carousel:u}}}=ct,f=E.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return E.useEffect(()=>{r&&(f(r),r.on("reInit",f),r.on("select",f))},[r,f]),L.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:n,children:[L.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,d)=>L.jsx(Wi,{block:p},d))}),L.jsx(T7,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),L.jsx(A7,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Bi=Math.min,$n=Math.max,Ol=Math.round,Ui=Math.floor,yo=e=>({x:e,y:e});function I1(e,t,n){return $n(e,Bi(t,n))}function Al(e,t){return typeof e=="function"?e(t):e}function ls(e){return e.split("-")[0]}function zp(e){return e.split("-")[1]}function R1(e){return e==="x"?"y":"x"}function z7(e){return e==="y"?"height":"width"}function us(e){return["top","bottom"].includes(ls(e))?"y":"x"}function q7(e){return R1(us(e))}function H7(e){return{top:0,right:0,bottom:0,left:0,...e}}function V7(e){return typeof e!="number"?H7(e):{top:e,right:e,bottom:e,left:e}}function Pl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function vo(e){return M1(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(M1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M1(e){return e instanceof Node||e instanceof kn(e).Node}function xt(e){return e instanceof Element||e instanceof kn(e).Element}function tn(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function qp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function fs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function W7(e){return["table","td","th"].includes(vo(e))}function Hp(e){const t=Vp(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function K7(e){let t=Jo(e);for(;tn(t)&&!ds(t);){if(Hp(t))return t;t=Jo(t)}return null}function Vp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ds(e){return["html","body","#document"].includes(vo(e))}function Cn(e){return kn(e).getComputedStyle(e)}function Il(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jo(e){if(vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qp(e)&&e.host||Lr(e);return qp(t)?t.host:t}function N1(e){const t=Jo(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&fs(t)?t:N1(t)}function go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=N1(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=kn(o);return i?t.concat(a,a.visualViewport||[],fs(o)?o:[],a.frameElement&&n?go(a.frameElement):[]):t.concat(o,go(o,[],n))}function bo(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&qp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function D1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function G7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function j1(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(D1())||t.test(G7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function F1(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function L1(){return/apple/i.test(navigator.vendor)}function Z7(){return D1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function B1(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Y7(e){return"nativeEvent"in e}function J7(e){return e.matches("html,body")}function Gn(e){return(e==null?void 0:e.ownerDocument)||document}function Wp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function U1(e){return"composedPath"in e?e.composedPath()[0]:e.target}const X7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z1(e){return tn(e)&&e.matches(X7)}function Wt(e){e.preventDefault(),e.stopPropagation()}function q1(e,t,n){let{reference:r,floating:o}=e;const i=us(t),a=q7(t),s=z7(a),c=ls(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(c){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(zp(t)){case"start":d[a]-=p*(n&&l?-1:1);break;case"end":d[a]+=p*(n&&l?-1:1);break}return d}const Q7=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=q1(l,r,c),p=r,d={},h=0;for(let m=0;m<s.length;m++){const{name:v,fn:y}=s[m],{x:g,y:b,data:k,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=g??u,f=b??f,d={...d,[v]:{...d[v],...k}},S&&h<=50){h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=q1(l,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function H1(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Al(t,e),h=V7(d),v=s[p?f==="floating"?"reference":"floating":f],y=Pl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=f==="floating"?{...a.floating,x:r,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:c}):g);return{top:(y.top-S.top+h.top)/k.y,bottom:(S.bottom-y.bottom+h.bottom)/k.y,left:(y.left-S.left+h.left)/k.x,right:(S.right-y.right+h.right)/k.x}}async function eU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ls(n),s=zp(n),c=us(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),c?{x:d*u,y:p*l}:{x:p*l,y:d*u}}const tU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await eU(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},nU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:g}=v;return{x:y,y:g}}},...c}=Al(e,t),l={x:n,y:r},u=await H1(t,c),f=us(ls(o)),p=R1(f);let d=l[p],h=l[f];if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",g=d+u[v],b=d-u[y];d=I1(g,d,b)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",g=h+u[v],b=h-u[y];h=I1(g,h,b)}const m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},rU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Al(e,t),c=await H1(t,s),l=ls(n),u=zp(n),f=us(n)==="y",{width:p,height:d}=r.floating;let h,m;l==="top"||l==="bottom"?(h=l,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=l,h=u==="end"?"top":"bottom");const v=d-c[h],y=p-c[m],g=!t.middlewareData.shift;let b=v,k=y;if(f){const $=p-c.left-c.right;k=u||g?Bi(y,$):$}else{const $=d-c.top-c.bottom;b=u||g?Bi(v,$):$}if(g&&!u){const $=$n(c.left,0),O=$n(c.right,0),I=$n(c.top,0),B=$n(c.bottom,0);f?k=p-2*($!==0||O!==0?$+O:$n(c.left,c.right)):b=d-2*(I!==0||B!==0?I+B:$n(c.top,c.bottom))}await a({...t,availableWidth:k,availableHeight:b});const S=await o.getDimensions(i.floating);return p!==S.width||d!==S.height?{reset:{rects:!0}}:{}}}};function V1(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ol(n)!==i||Ol(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Kp(e){return xt(e)?e:e.contextElement}function zi(e){const t=Kp(e);if(!tn(t))return yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=V1(t);let a=(i?Ol(n.width):n.width)/r,s=(i?Ol(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const oU=yo(0);function W1(e){const t=kn(e);return!Vp()||!t.visualViewport?oU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Kp(e);let a=yo(1);t&&(r?xt(r)&&(a=zi(r)):a=zi(e));const s=iU(i,n,r)?W1(i):yo(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=kn(i),d=r&&xt(r)?kn(r):r;let h=p.frameElement;for(;h&&r&&d!==p;){const m=zi(h),v=h.getBoundingClientRect(),y=Cn(h),g=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*m.x,b=v.top+(h.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=g,l+=b,h=kn(h).frameElement}}return Pl({width:u,height:f,x:c,y:l})}function aU(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=tn(n),i=Lr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=yo(1);const c=yo(0);if((o||!o&&r!=="fixed")&&((vo(n)!=="body"||fs(i))&&(a=Il(n)),tn(n))){const l=Xo(n);s=zi(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function sU(e){return Array.from(e.getClientRects())}function K1(e){return Xo(Lr(e)).left+Il(e).scrollLeft}function cU(e){const t=Lr(e),n=Il(e),r=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+K1(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=$n(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function lU(e,t){const n=kn(e),r=Lr(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=Vp();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function uU(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=tn(e)?zi(e):yo(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function G1(e,t,n){let r;if(t==="viewport")r=lU(e,n);else if(t==="document")r=cU(Lr(e));else if(xt(t))r=uU(t,n);else{const o=W1(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Pl(r)}function Z1(e,t){const n=Jo(e);return n===t||!xt(n)||ds(n)?!1:Cn(n).position==="fixed"||Z1(n,t)}function fU(e,t){const n=t.get(e);if(n)return n;let r=go(e,[],!1).filter(s=>xt(s)&&vo(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?Jo(e):e;for(;xt(a)&&!ds(a);){const s=Cn(a),c=Hp(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fs(a)&&!c&&Z1(e,a))?r=r.filter(u=>u!==a):o=s,a=Jo(a)}return t.set(e,r),r}function dU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?fU(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=G1(t,u,o);return l.top=$n(f.top,l.top),l.right=Bi(f.right,l.right),l.bottom=Bi(f.bottom,l.bottom),l.left=$n(f.left,l.left),l},G1(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function pU(e){return V1(e)}function hU(e,t,n){const r=tn(t),o=Lr(t),i=n==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=yo(0);if(r||!r&&!i)if((vo(t)!=="body"||fs(o))&&(s=Il(t)),r){const l=Xo(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=K1(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function Y1(e,t){return!tn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function J1(e,t){const n=kn(e);if(!tn(e))return n;let r=Y1(e,t);for(;r&&W7(r)&&Cn(r).position==="static";)r=Y1(r,t);return r&&(vo(r)==="html"||vo(r)==="body"&&Cn(r).position==="static"&&!Hp(r))?n:r||K7(e)||n}const mU=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||J1,i=this.getDimensions;return{reference:hU(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function yU(e){return Cn(e).direction==="rtl"}const vU={convertOffsetParentRelativeRectToViewportRelativeRect:aU,getDocumentElement:Lr,getClippingRect:dU,getOffsetParent:J1,getElementRects:mU,getClientRects:sU,getDimensions:pU,getScale:zi,isElement:xt,isRTL:yU};function gU(e,t){let n=null,r;const o=Lr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=Ui(u),h=Ui(o.clientWidth-(l+f)),m=Ui(o.clientHeight-(u+p)),v=Ui(l),g={rootMargin:-d+"px "+-h+"px "+-m+"px "+-v+"px",threshold:$n(0,Bi(1,c))||1};let b=!0;function k(S){const $=S[0].intersectionRatio;if($!==c){if(!b)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(k,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return a(!0),i}function bU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Kp(e),u=o||i?[...l?go(l):[],...go(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=l&&s?gU(l,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[g]=y;g&&g.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{d&&d.observe(t)})),n()}),l&&!c&&d.observe(l),d.observe(t));let h,m=c?Xo(e):null;c&&v();function v(){const y=Xo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,h=requestAnimationFrame(v)}return n(),()=>{u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),d&&d.disconnect(),d=null,c&&cancelAnimationFrame(h)}}const wU=(e,t,n)=>{const r=new Map,o={platform:vU,...n},i={...o.platform,_c:r};return Q7(e,t,{...o,platform:i})};var Rl=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ml(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ml(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ml(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function X1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Q1(e,t){const n=X1(e);return Math.round(t*n)/n}function eS(e){const t=C.useRef(e);return Rl(()=>{t.current=e}),t}function xU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Ml(p,r)||d(r);const[h,m]=C.useState(null),[v,y]=C.useState(null),g=C.useCallback(F=>{F!=$.current&&($.current=F,m(F))},[m]),b=C.useCallback(F=>{F!==O.current&&(O.current=F,y(F))},[y]),k=i||h,S=a||v,$=C.useRef(null),O=C.useRef(null),I=C.useRef(u),B=eS(c),T=eS(o),M=C.useCallback(()=>{if(!$.current||!O.current)return;const F={placement:t,strategy:n,middleware:p};T.current&&(F.platform=T.current),wU($.current,O.current,F).then(K=>{const V={...K,isPositioned:!0};R.current&&!Ml(I.current,V)&&(I.current=V,DT.flushSync(()=>{f(V)}))})},[p,t,n,T]);Rl(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[l]);const R=C.useRef(!1);Rl(()=>(R.current=!0,()=>{R.current=!1}),[]),Rl(()=>{if(k&&($.current=k),S&&(O.current=S),k&&S){if(B.current)return B.current(k,S,M);M()}},[k,S,M,B]);const j=C.useMemo(()=>({reference:$,floating:O,setReference:g,setFloating:b}),[g,b]),U=C.useMemo(()=>({reference:k,floating:S}),[k,S]),D=C.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const K=Q1(U.floating,u.x),V=Q1(U.floating,u.y);return s?{...F,transform:"translate("+K+"px, "+V+"px)",...X1(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:V}},[n,s,U.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:M,refs:j,elements:U,floatingStyles:D}),[u,M,j,U,D])}/*!
|
|
281
281
|
* tabbable 6.2.0
|
|
282
282
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
283
|
-
*/var SU=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Gp=SU.join(","),tS=typeof Element>"u",ps=tS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Nl=!tS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Dl=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},EU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_U=function(t,n,r){if(Dl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Gp));return n&&ps.call(t,Gp)&&o.unshift(t),o=o.filter(r),o},$U=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Dl(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ps.call(a,Gp);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Dl(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},nS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},rS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EU(t))&&!nS(t)?0:t.tabIndex},kU=function(t,n){var r=rS(t);return r<0&&n&&!nS(t)?0:r},CU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oS=function(t){return t.tagName==="INPUT"},TU=function(t){return oS(t)&&t.type==="hidden"},OU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},AU=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PU=function(t){if(!t.name)return!0;var n=t.form||Nl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=AU(o,t.form);return!i||i===t},IU=function(t){return oS(t)&&t.type==="radio"},RU=function(t){return IU(t)&&!PU(t)},MU=function(t){var n,r=t&&Nl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Nl(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},iS=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},NU=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ps.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ps.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Nl(t);if(c&&!c.shadowRoot&&o(c)===!0)return iS(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(MU(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return iS(t);return!1},DU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ps.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},jU=function(t,n){return!(n.disabled||Dl(n)||TU(n)||NU(n,t)||OU(n)||DU(n))},aS=function(t,n){return!(RU(n)||rS(n)<0||!jU(t,n))},FU=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},LU=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=kU(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(CU).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Zp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$U([t],n.includeContainer,{filter:aS.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FU}):r=_U(t,n.includeContainer,aS.bind(null,n)),LU(r)};const Yp="ArrowUp",jl="ArrowDown",qi="ArrowLeft",hs="ArrowRight";function Fl(e,t,n){return Math.floor(e/t)!==n}function ms(e,t){return t<0||t>=e.current.length}function Jp(e,t){return nn(e,{disabledIndices:t})}function sS(e,t){return nn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var c,l;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function BU(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Yp){if(u&&Vt(n),l===-1)f=c;else if(f=nn(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||f<0)){const p=l%i,d=c%i,h=c-(d-p);d===p?f=c:f=d>p?h:h-i}ms(e,f)&&(f=l)}if(n.key===jl&&(u&&Vt(n),l===-1?f=s:(f=nn(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(f=nn(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),ms(e,f)&&(f=l)),r==="both"){const p=Ui(l/i);n.key===hs&&(u&&Vt(n),l%i!==i-1?(f=nn(e,{startingIndex:l,disabledIndices:a}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a})),Fl(f,i,p)&&(f=l)),n.key===qi&&(u&&Vt(n),l%i!==0?(f=nn(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Fl(f,i,p)&&(f=l));const d=Ui(c/i)===p;ms(e,f)&&(o&&d?f=n.key===qi?c:nn(e,{startingIndex:l-l%i-1,disabledIndices:a}):f=l)}return f}let cS=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(cS);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():cS=requestAnimationFrame(i)}var Pt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}let Xp=!1,UU=0;const lS=()=>"floating-ui-"+UU++;function zU(){const[e,t]=O.useState(()=>Xp?lS():void 0);return Pt(()=>{e==null&&t(lS())},[]),O.useEffect(()=>{Xp||(Xp=!0)},[]),e}const Qp=O["useId".toString()]||zU;function qU(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const HU=O.createContext(null),WU=O.createContext(null),uS=()=>{var e;return((e=O.useContext(HU))==null?void 0:e.id)||null},Bl=()=>O.useContext(WU);function ys(e){return"data-floating-ui-"+e}function wo(e){const t=E.useRef(e);return Pt(()=>{t.current=e}),t}function VU(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function KU(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hi(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Wi=new WeakMap,Ul=new WeakSet,zl={},eh=0;const GU=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,fS=e=>e&&(e.host||fS(e.parentNode)),ZU=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fS(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YU(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=ZU(t,e),s=new Set,c=new Set(a),l=[];zl[o]||(zl[o]=new WeakMap);const u=zl[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,h=>{if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Wi.get(h)||0)+1,g=(u.get(h)||0)+1;Wi.set(h,y),u.set(h,g),l.push(h),y===1&&v&&Ul.add(h),g===1&&h.setAttribute(o,""),!v&&i&&h.setAttribute(i,"true")}})}return eh++,()=>{l.forEach(d=>{const h=(Wi.get(d)||0)-1,m=(u.get(d)||0)-1;Wi.set(d,h),u.set(d,m),h||(!Ul.has(d)&&i&&d.removeAttribute(i),Ul.delete(d)),m||d.removeAttribute(o)}),eh--,eh||(Wi=new WeakMap,Wi=new WeakMap,Ul=new WeakSet,zl={})}}function dS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Gn(e[0]).body;return YU(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const th=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pS(e,t){const n=Zp(e,th());t==="prev"&&n.reverse();const r=n.indexOf(bo(Gn(e)));return n.slice(r+1)[0]}function hS(){return pS(document.body,"next")}function mS(){return pS(document.body,"prev")}function vs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yn(n,r)}function JU(e){Zp(e,th()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function XU(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const nh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let QU;function yS(e){e.key==="Tab"&&(e.target,clearTimeout(QU))}const ql=O.forwardRef(function(t,n){const[r,o]=O.useState();Pt(()=>(L1()&&o("button"),document.addEventListener("keydown",yS),()=>{document.removeEventListener("keydown",yS)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ys("focus-guard")]:"",style:nh};return O.createElement("span",Ll({},t,i))}),vS=O.createContext(null);function e9(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=O.useState(null),i=Qp(),a=gS(),s=O.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),c=O.useRef();return Pt(()=>()=>{r==null||r.remove()},[r,s]),Pt(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,h=ys("portal");if(d){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),d.appendChild(m),o(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!xt(m)&&(m=m.current),m=m||document.body;let v=null;l&&(v=document.createElement("div"),v.id=l,m.appendChild(v));const y=document.createElement("div");y.id=p,y.setAttribute(h,""),m=v||m,m.appendChild(y),o(y)}},[s]),r}function t9(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=e9({id:n,root:r}),[a,s]=O.useState(null),c=O.useRef(null),l=O.useRef(null),u=O.useRef(null),f=O.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return O.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(h){i&&vs(h)&&(h.type==="focusin"?XU:JU)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),O.createElement(vS.Provider,{value:O.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&O.createElement(ql,{"data-type":"outside",ref:c,onFocus:d=>{if(vs(d,i)){var h;(h=u.current)==null||h.focus()}else{const m=mS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&i&&O.createElement("span",{"aria-owns":i.id,style:nh}),i&&rr.createPortal(t,i),p&&i&&O.createElement(ql,{"data-type":"outside",ref:l,onFocus:d=>{if(vs(d,i)){var h;(h=f.current)==null||h.focus()}else{const m=hS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const gS=()=>O.useContext(vS),n9=O.forwardRef(function(t,n){return O.createElement("button",Ll({},t,{type:"button",ref:n,tabIndex:-1,style:nh}))});function r9(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:h,events:m,dataRef:v,elements:{domReference:y,floating:g}}=t,b=GU()?i:!0,k=wo(o),S=wo(a),$=wo(s),C=Bl(),P=gS(),F=typeof a=="number"&&a<0,T=O.useRef(null),R=O.useRef(null),H=O.useRef(!1),L=O.useRef(null),z=O.useRef(!1),N=P!=null,D=y&&y.getAttribute("role")==="combobox"&&z1(y)&&F,K=O.useCallback(function(U){return U===void 0&&(U=g),U?Zp(U,th()):[]},[g]),W=O.useCallback(U=>{const V=K(U);return k.current.map(_=>y&&_==="reference"?y:g&&_==="floating"?g:V).filter(Boolean).flat()},[y,g,k,K]);O.useEffect(()=>{if(r||!c)return;function U(_){if(_.key==="Tab"){yn(g,bo(Gn(g)))&&K().length===0&&!D&&Vt(_);const J=W(),ae=U1(_);k.current[0]==="reference"&&ae===y&&(Vt(_),_.shiftKey?Br(J[J.length-1]):Br(J[1])),k.current[1]==="floating"&&ae===g&&_.shiftKey&&(Vt(_),Br(J[0]))}}const V=Gn(g);return V.addEventListener("keydown",U),()=>{V.removeEventListener("keydown",U)}},[r,y,g,c,k,p,D,K,W]),O.useEffect(()=>{if(r||!u)return;function U(){z.current=!0,setTimeout(()=>{z.current=!1})}function V(_){const J=_.relatedTarget;queueMicrotask(()=>{const ae=!(yn(y,J)||yn(g,J)||yn(J,g)||yn(P==null?void 0:P.portalNode,J)||J!=null&&J.hasAttribute(ys("focus-guard"))||C&&(Hi(C.nodesRef.current,d).find(re=>{var le,pe;return yn((le=re.context)==null?void 0:le.elements.floating,J)||yn((pe=re.context)==null?void 0:pe.elements.domReference,J)})||VU(C.nodesRef.current,d).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ae&&!z.current&&J!==L.current&&(H.current=!0,h(!1,_))})}if(g&&tn(y))return y.addEventListener("focusout",V),y.addEventListener("pointerdown",U),!c&&g.addEventListener("focusout",V),()=>{y.removeEventListener("focusout",V),y.removeEventListener("pointerdown",U),!c&&g.removeEventListener("focusout",V)}},[r,y,g,c,d,C,P,h,u]),O.useEffect(()=>{var U;if(r)return;const V=Array.from((P==null||(U=P.portalNode)==null?void 0:U.querySelectorAll("["+ys("portal")+"]"))||[]);if(g){const _=[g,...V,T.current,R.current,k.current.includes("reference")||D?y:null].filter(ae=>ae!=null),J=c?dS(_,b,!b):dS(_);return()=>{J()}}},[r,y,g,c,k,P,D,b]),Pt(()=>{if(r||!g)return;const U=Gn(g),V=bo(U);queueMicrotask(()=>{const _=W(g),J=S.current,ae=(typeof J=="number"?_[J]:J.current)||g,re=yn(g,V);!F&&!re&&f&&Br(ae,{preventScroll:ae===g})})},[r,f,g,F,W,S]),Pt(()=>{if(r||!g)return;let U=!1;const V=Gn(g),_=bo(V),J=v.current;L.current=_;function ae(re){if(re.type==="escapeKey"&&p.domReference.current&&(L.current=p.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(H.current=!1,U=le.preventScroll):H.current=!le}return m.on("dismiss",ae),()=>{m.off("dismiss",ae);const re=bo(V);(yn(g,re)||C&&Hi(C.nodesRef.current,d).some(pe=>{var me;return yn((me=pe.context)==null?void 0:me.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&p.domReference.current&&(L.current=p.domReference.current),$.current&&tn(L.current)&&!H.current&&Br(L.current,{cancelPrevious:!1,preventScroll:U})}},[r,g,$,v,p,m,C,d]),Pt(()=>{if(!(r||!P))return P.setFocusManagerState({modal:c,closeOnFocusOut:u,open:f,onOpenChange:h,refs:p}),()=>{P.setFocusManagerState(null)}},[r,P,c,f,h,p,u]),Pt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!F){const U=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||bo(Gn(g))!==p.domReference.current&&K().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};U();const V=new MutationObserver(U);return V.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}}},[r,g,p,k,K,F]);function M(U){return r||!l||!c?null:O.createElement(n9,{ref:U==="start"?T:R,onClick:V=>h(!1,V.nativeEvent)},typeof l=="string"?l:"Dismiss")}const w=!r&&b&&!D&&(N||c);return O.createElement(O.Fragment,null,w&&O.createElement(ql,{"data-type":"inside",ref:P==null?void 0:P.beforeInsideRef,onFocus:U=>{if(c){const _=W();Br(o[0]==="reference"?_[0]:_[_.length-1])}else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(H.current=!1,vs(U,P.portalNode)){const _=hS()||y;_==null||_.focus()}else{var V;(V=P.beforeOutsideRef.current)==null||V.focus()}}}),!D&&M("start"),n,M("end"),w&&O.createElement(ql,{"data-type":"inside",ref:P==null?void 0:P.afterInsideRef,onFocus:U=>{if(c)Br(W()[0]);else if(P!=null&&P.preserveTabOrder&&P.portalNode)if(u&&(H.current=!0),vs(U,P.portalNode)){const _=mS()||y;_==null||_.focus()}else{var V;(V=P.afterOutsideRef.current)==null||V.focus()}}}))}function bS(e){return tn(e.target)&&e.target.tagName==="BUTTON"}function wS(e){return z1(e)}function o9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,f=O.useRef(),p=O.useRef(!1);return O.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(B1(f.current,!0)&&l||s!=="click"&&(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}B1(f.current,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||bS(d))&&(d.key===" "&&!wS(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&c),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||bS(d)||wS(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&c),d.nativeEvent))}}}:{},[a,o,s,l,u,i,c,n,r])}const i9=O["useInsertionEffect".toString()]||(e=>e());function xo(e){const t=O.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return i9(()=>{t.current=e}),O.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const a9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},s9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},c9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function l9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:y}=t,g=Bl(),b=uS()!=null,k=xo(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,$=O.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:P}=c9(y),F=xo(R=>{if(!n||!u||!f||R.key!=="Escape")return;const H=g?Hi(g.nodesRef.current,i):[];if(!C&&(R.stopPropagation(),H.length>0)){let L=!0;if(H.forEach(z=>{var N;if((N=z.context)!=null&&N.open&&!z.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Y7(R)?R.nativeEvent:R)}),T=xo(R=>{const H=$.current;if($.current=!1,H||typeof S=="function"&&!S(R))return;const L=U1(R),z="["+ys("inert")+"]",N=Gn(c).querySelectorAll(z);let D=xt(L)?L:null;for(;D&&!ds(D);){const M=Jo(D);if(M===Gn(c).body||!xt(M))break;D=M}if(N.length&&xt(L)&&!J7(L)&&!yn(L,c)&&Array.from(N).every(M=>!yn(D,M)))return;if(tn(L)&&c){const M=L.clientWidth>0&&L.scrollWidth>L.clientWidth,w=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let U=w&&R.offsetX>L.clientWidth;if(w&&Cn(L).direction==="rtl"&&(U=R.offsetX<=L.offsetWidth-L.clientWidth),U||M&&R.offsetY>L.clientHeight)return}const K=g&&Hi(g.nodesRef.current,i).some(M=>{var w;return Vp(R,(w=M.context)==null?void 0:w.elements.floating)});if(Vp(R,c)||Vp(R,s)||K)return;const W=g?Hi(g.nodesRef.current,i):[];if(W.length>0){let M=!0;if(W.forEach(w=>{var U;if((U=w.context)!=null&&U.open&&!w.context.dataRef.current.__outsidePressBubbles){M=!1;return}}),!M)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:j1(R)||F1(R)}}),r(!1,R)});return O.useEffect(()=>{if(!n||!u)return;l.current.__escapeKeyBubbles=C,l.current.__outsidePressBubbles=P;function R(z){r(!1,z)}const H=Gn(c);f&&H.addEventListener("keydown",F),S&&H.addEventListener(d,T);let L=[];return v&&(xt(s)&&(L=go(s)),xt(c)&&(L=L.concat(go(c))),!xt(a)&&a&&a.contextElement&&(L=L.concat(go(a.contextElement)))),L=L.filter(z=>{var N;return z!==((N=H.defaultView)==null?void 0:N.visualViewport)}),L.forEach(z=>{z.addEventListener("scroll",R,{passive:!0})}),()=>{f&&H.removeEventListener("keydown",F),S&&H.removeEventListener(d,T),L.forEach(z=>{z.removeEventListener("scroll",R)})}},[l,c,s,a,f,S,d,n,r,v,u,C,P,F,T]),O.useEffect(()=>{$.current=!1},[S,d]),O.useMemo(()=>u?{reference:{onKeyDown:F,[a9[m]]:R=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,R.nativeEvent))}},floating:{onKeyDown:F,[s9[d]]:()=>{$.current=!0}}}:{},[u,o,h,d,m,r,F])}let rh;process.env.NODE_ENV!=="production"&&(rh=new Set);function u9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const C="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!xt(e.elements.reference)){var a;if(!((a=rh)!=null&&a.has(C))){var s;(s=rh)==null||s.add(C),console.error(C)}}}const[c,l]=O.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,f=xU(e),p=Bl(),d=xo((C,P)=>{C&&(m.current.openEvent=P),r==null||r(C,P)}),h=O.useRef(null),m=O.useRef({}),v=O.useState(()=>qU())[0],y=Qp(),g=O.useCallback(C=>{const P=xt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;f.refs.setReference(P)},[f.refs]),b=O.useCallback(C=>{(xt(C)||C===null)&&(h.current=C,l(C)),(xt(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!xt(C))&&f.refs.setReference(C)},[f.refs]),k=O.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=O.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),$=O.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:o,floatingId:y,events:v,open:n,onOpenChange:d}),[f,o,y,v,n,d,k,S]);return Pt(()=>{const C=p==null?void 0:p.nodesRef.current.find(P=>P.id===o);C&&(C.context=$)}),O.useMemo(()=>({...f,context:$,refs:k,elements:S}),[f,k,S,$])}function oh(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof c=="function"){var l;(l=r.get(s))==null||l.push(c),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function f9(e){e===void 0&&(e=[]);const t=e,n=O.useCallback(i=>oh(i,e,"reference"),t),r=O.useCallback(i=>oh(i,e,"floating"),t),o=O.useCallback(i=>oh(i,e,"item"),e.map(i=>i==null?void 0:i.item));return O.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let xS=!1;function Hl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SS(e,t){return Hl(t,e===Yp||e===jl,e===qi||e===hs)}function ih(e,t,n){return Hl(t,e===jl,n?e===qi:e===hs)||e==="Enter"||e==" "||e===""}function d9(e,t,n){return Hl(t,n?e===qi:e===hs,e===jl)}function ES(e,t,n){return Hl(t,n?e===hs:e===qi,e===Yp)}function p9(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:$=1,scrollItemIntoView:C=!0,virtualItemRef:P}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&$>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const F=uS(),T=Bl(),R=xo(l),H=O.useRef(y),L=O.useRef(f??-1),z=O.useRef(null),N=O.useRef(!0),D=O.useRef(R),K=O.useRef(!!a),W=O.useRef(!1),M=O.useRef(!1),w=wo(k),U=wo(n),V=wo(C),[_,J]=O.useState(),[ae,re]=O.useState(),le=xo(function(ce,Q,G){G===void 0&&(G=!1);const fe=ce.current[Q.current];fe&&(v?(J(fe.id),T==null||T.events.emit("virtualfocus",fe),P&&(P.current=fe)):Br(fe,{preventScroll:!0,sync:Z7()&&L1()?xS||W.current:!1}),requestAnimationFrame(()=>{const ve=V.current;ve&&fe&&(G||!N.current)&&(fe.scrollIntoView==null||fe.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Pt(()=>{document.createElement("div").focus({get preventScroll(){return xS=!0,!1}})},[]),Pt(()=>{u&&(n&&a?H.current&&f!=null&&(M.current=!0,R(f)):K.current&&(L.current=-1,D.current(null)))},[u,n,a,f,R]),Pt(()=>{if(u&&n&&a)if(c==null){if(W.current=!1,f!=null)return;if(K.current&&(L.current=-1,le(s,L)),!K.current&&H.current&&(z.current!=null||H.current===!0&&z.current==null)){let ce=0;const Q=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(Q),ce++):(L.current=z.current==null||ih(z.current,S,m)||h?Jp(s,w.current):sS(s,w.current),z.current=null,R(L.current))};Q()}}else ms(s,c)||(L.current=c,le(s,L,M.current),M.current=!1)},[u,n,a,c,f,h,s,S,m,R,le,w]),Pt(()=>{var ce,Q;if(!u||a||!T||v||!K.current)return;const G=T.nodesRef.current,fe=(ce=G.find(I=>I.id===F))==null||(Q=ce.context)==null?void 0:Q.elements.floating,ve=bo(Gn(a)),_e=G.some(I=>I.context&&yn(I.context.elements.floating,ve));fe&&!_e&&N.current&&fe.focus({preventScroll:!0})},[u,a,T,F,v]),Pt(()=>{if(!u||!T||!v||F)return;function ce(Q){re(Q.id),P&&(P.current=Q)}return T.events.on("virtualfocus",ce),()=>{T.events.off("virtualfocus",ce)}},[u,T,v,F,P]),Pt(()=>{D.current=R,K.current=!!a}),Pt(()=>{n||(z.current=null)},[n]);const pe=c!=null,me=O.useMemo(()=>{function ce(G){if(!n)return;const fe=s.current.indexOf(G);fe!==-1&&R(fe)}return{onFocus(G){let{currentTarget:fe}=G;ce(fe)},onClick:G=>{let{currentTarget:fe}=G;return fe.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:fe}=G;ce(fe)},onPointerLeave(G){let{pointerType:fe}=G;!N.current||fe==="touch"||(L.current=-1,le(s,L),R(null),v||Br(o.floating.current,{preventScroll:!0}))}}}},[n,o,le,g,s,R,v]);return O.useMemo(()=>{if(!u)return{};const ce=w.current;function Q(I){if(N.current=!1,W.current=!0,!U.current&&I.currentTarget===o.floating.current)return;if(h&&ES(I.key,S,m)){Vt(I),r(!1,I.nativeEvent),tn(i)&&!v&&i.focus();return}const X=L.current,oe=Jp(s,ce),ee=sS(s,ce);if(I.key==="Home"&&(Vt(I),L.current=oe,R(L.current)),I.key==="End"&&(Vt(I),L.current=ee,R(L.current)),!($>1&&(L.current=BU(s,{event:I,orientation:S,loop:d,cols:$,disabledIndices:ce,minIndex:oe,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),R(L.current),S==="both"))&&SS(I.key,S)){if(Vt(I),n&&!v&&bo(I.currentTarget.ownerDocument)===I.currentTarget){L.current=ih(I.key,S,m)?oe:ee,R(L.current);return}ih(I.key,S,m)?d?L.current=X>=ee?p&&X!==s.current.length?-1:oe:nn(s,{startingIndex:X,disabledIndices:ce}):L.current=Math.min(ee,nn(s,{startingIndex:X,disabledIndices:ce})):d?L.current=X<=oe?p&&X!==-1?s.current.length:ee:nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce}):L.current=Math.max(oe,nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce})),ms(s,L.current)?R(null):R(L.current)}}function G(I){y==="auto"&&j1(I.nativeEvent)&&(H.current=!0)}function fe(I){H.current=y,y==="auto"&&F1(I.nativeEvent)&&(H.current=!0)}const ve=v&&n&&pe&&{"aria-activedescendant":ae||_},_e=s.current.find(I=>(I==null?void 0:I.id)===_);return{reference:{...ve,onKeyDown(I){N.current=!1;const X=I.key.indexOf("Arrow")===0,oe=d9(I.key,S,m),ee=ES(I.key,S,m),xe=SS(I.key,S),we=(h?oe:xe)||I.key==="Enter"||I.key.trim()==="";if(v&&n){const B=T==null?void 0:T.nodesRef.current.find(q=>q.parentId==null),Z=T&&B?KU(T.nodesRef.current,B.id):null;if(X&&Z&&P){const q=new KeyboardEvent("keydown",{key:I.key,bubbles:!0});if(oe||ee){var ke,Fe;const te=((ke=Z.context)==null?void 0:ke.elements.domReference)===I.currentTarget,de=ee&&!te?(Fe=Z.context)==null?void 0:Fe.elements.domReference:oe?_e:null;de&&(Vt(I),de.dispatchEvent(q),re(void 0))}if(xe&&Z.context&&Z.context.open&&Z.parentId&&I.currentTarget!==Z.context.elements.domReference){var Oe;Vt(I),(Oe=Z.context.elements.domReference)==null||Oe.dispatchEvent(q);return}}return Q(I)}if(!(!n&&!b&&X)){if(we&&(z.current=h&&xe?null:I.key),h){oe&&(Vt(I),n?(L.current=Jp(s,ce),R(L.current)):r(!0,I.nativeEvent));return}xe&&(f!=null&&(L.current=f),Vt(I),!n&&b?r(!0,I.nativeEvent):Q(I),n&&R(L.current))}},onFocus(){n&&R(null)},onPointerDown:fe,onMouseDown:G,onClick:G},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){N.current=!0}},item:me}},[i,o,_,ae,w,U,s,u,S,m,v,n,pe,h,f,b,p,$,d,y,R,r,me,T,P])}function h9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=Qp();return O.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function m9(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=O.useRef(),m=O.useRef(""),v=O.useRef((n=d??a)!=null?n:-1),y=O.useRef(null),g=xo(s),b=xo(c),k=wo(u),S=wo(p);return Pt(()=>{r&&(clearTimeout(h.current),y.current=null,m.current="")},[r]),Pt(()=>{if(r&&m.current===""){var $;v.current=($=d??a)!=null?$:-1}},[r,d,a]),O.useMemo(()=>{if(!l)return{};function $(F){F?o.current.typing||(o.current.typing=F,b(F)):o.current.typing&&(o.current.typing=F,b(F))}function C(F,T,R){const H=k.current?k.current(T,R):T.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(R.toLocaleLowerCase()))===0);return H?F.indexOf(H):-1}function P(F){const T=i.current;if(m.current.length>0&&m.current[0]!==" "&&(C(T,T,m.current)===-1?$(!1):F.key===" "&&Vt(F)),T==null||S.current.includes(F.key)||F.key.length!==1||F.ctrlKey||F.metaKey||F.altKey)return;r&&F.key!==" "&&(Vt(F),$(!0)),T.every(z=>{var N,D;return z?((N=z[0])==null?void 0:N.toLocaleLowerCase())!==((D=z[1])==null?void 0:D.toLocaleLowerCase()):!0})&&m.current===F.key&&(m.current="",v.current=y.current),m.current+=F.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=y.current,$(!1)},f);const H=v.current,L=C(T,[...T.slice((H||0)+1),...T.slice(0,(H||0)+1)],m.current);L!==-1?(g(L),y.current=L):F.key!==" "&&(m.current="",$(!1))}return{reference:{onKeyDown:P},floating:{onKeyDown:P,onKeyUp(F){F.key===" "&&$(!1)}}}},[l,r,o,i,f,S,k,g,b])}const y9=({options:e,label:t,reusable:n})=>{var D,K,W,M,w;const r=Ne(U=>U.sendTextMessage),o=Ne(U=>U.messageContainerRef),i=Ne(U=>U.isReadOnly),[a,s]=O.useState(!1),[c,l]=O.useState(null),[u,f]=O.useState(null),{message:{blocks:{dropdown:p}}}=ct,d=e.reduce((U,V)=>(U[V.label]=V.value,U),{}),h=d?Object.keys(d):[],m=U=>{s(u!==null&&!n?!1:U)},{refs:v,floatingStyles:y,context:g}=u9({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:bU,middleware:[tU(5),nU({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),rU({apply({rects:U,elements:V,availableHeight:_}){Object.assign(V.floating.style,{maxHeight:`${_}px`,minWidth:`${U.reference.width}px`})},padding:10})]}),b=O.useRef([]),k=O.useRef(h),S=O.useRef(!1),$=o9(g,{event:"mousedown"}),C=l9(g),P=h9(g,{role:"listbox"}),F=p9(g,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),T=m9(g,{listRef:k,activeIndex:c,selectedIndex:u,onMatch:a?l:f,onTypingChange(U){S.current=U}}),{getReferenceProps:R,getFloatingProps:H,getItemProps:L}=f9([C,P,F,T,$]),z=U=>{f(U),r(d[h[U]]),s(!1)},N=u!==null?h[u]:void 0;return j.jsxs(j.Fragment,{children:[j.jsxs("div",{tabIndex:0,ref:v.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(D=p.button)==null?void 0:D.container,...R(),children:[j.jsx("span",{...(K=p.button)==null?void 0:K.text,children:N||t||"Select..."}),j.jsx(z6,{...(W=p.button)==null?void 0:W.icon})]}),a&&j.jsx(t9,{children:j.jsx(r9,{context:g,modal:!1,children:j.jsx("div",{ref:v.setFloating,className:(w=(M=p.content)==null?void 0:M.container)==null?void 0:w.className,style:{...y},...H(),children:h.map((U,V)=>{var _;return j.jsx("div",{ref:J=>{b.current[V]=J},role:"option",tabIndex:V===c?0:-1,"aria-selected":V===u&&V===c,"data-active":V===c?"":void 0,...(_=p.content)==null?void 0:_.item,...L({onClick(){i||z(V)},onKeyDown(J){i||(J.key==="Enter"&&(J.preventDefault(),z(V)),J.key===" "&&!S.current&&(J.preventDefault(),z(V)))}}),children:U},U)})})})})]})},v9=E.forwardRef(({type:e,title:t,url:n,...r},o)=>{const{message:{blocks:{file:i}}}=ct;return j.jsxs("a",{...r,...i.container,href:n,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[j.jsx("p",{...i.title,children:t||n}),j.jsx(H6,{...i.icon})]})}),_S={audio:D6,bubble:P6,button:O6,carousel:U7,column:G6,dropdown:y9,file:v9,image:R6,location:K6,row:Z6,text:kD,video:N6},Vi=({block:e,...t})=>{const r=Ne(i=>i.renderers)[e.type]??_S[e.type],o={...t,...e};return j.jsx(r,{...o})};function g9({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const b9=O.forwardRef(g9);function w9({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const x9=O.forwardRef(w9);function S9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var E9=E.useLayoutEffect,_9=function(t){var n=O.useRef(t);return E9(function(){n.current=t}),n},$S=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},$9=function(t,n){var r=E.useRef();return E.useCallback(function(o){t.current=o,r.current&&$S(r.current,null),r.current=n,n&&$S(n,o)},[n])},kS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},k9=function(t){Object.keys(kS).forEach(function(n){t.style.setProperty(n,kS[n],"important")})},CS=k9,un=null,TS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function C9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),CS(un)),un.parentNode===null&&document.body.appendChild(un);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;un.style[d]=a[d]}),CS(un),un.value=t;var c=TS(un,e);un.value=t,c=TS(un,e),un.value="x";var l=un.scrollHeight-o,u=l*n;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var f=l*r;return s==="border-box"&&(f=f+o+i),c=Math.min(f,c),[c,l]}var OS=function(){},T9=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},O9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],A9=!!document.documentElement.currentStyle,P9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=T9(O9,n),o=r.boxSizing;if(o==="")return null;A9&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},I9=P9;function AS(e,t,n){var r=_9(n);O.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var R9=function(t){AS(window,"resize",t)},M9=function(t){AS(document.fonts,"loadingdone",t)},N9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],D9=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?OS:a,c=t.onHeightChange,l=c===void 0?OS:c,u=S9(t,N9),f=u.value!==void 0,p=O.useRef(null),d=$9(p,n),h=O.useRef(0),m=O.useRef(),v=function(){var b=p.current,k=r&&m.current?m.current:I9(b);if(k){m.current=k;var S=C9(k,b.value||b.placeholder||"x",i,o),$=S[0],C=S[1];h.current!==$&&(h.current=$,b.style.setProperty("height",$+"px","important"),l($,{rowHeight:C}))}},y=function(b){f||v(),s(b)};return O.useLayoutEffect(v),R9(v),M9(v),O.createElement("textarea",no({},u,{onChange:y,ref:d}))},j9=O.forwardRef(D9);const PS=E.memo(E.forwardRef(({children:e,...t},n)=>{const{composer:r}=ct,o=Ne(C=>C.disableComposer),i=Ne(C=>C.setIsTyping),a=Ne(C=>C.isReadOnly),s=Ne(C=>C.sendFile),c=Ne(C=>C.addMessage),l=Ne(C=>C.sendTextMessage),u=Ne(C=>C.allowFileUpload),{composerPlaceholder:f,showPoweredBy:p}=E1(),[d,h]=E.useState(""),[m,v]=E.useState(-1),y=E.useRef(null),g=_n(C=>C.user),b=_n(C=>C.messageHistory);if(a)return null;const k=()=>{var C;y.current&&((C=y.current)==null||C.click())},S=async C=>{var F;const P=(F=C.target.files)==null?void 0:F[0];if(P)try{const{fileUrl:T,type:R}=await s(P)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:R,url:T}})}catch(T){console.error("Error sending file:",T)}},$=()=>{d&&(l(d),setTimeout(()=>i(!0,9e3),500),h(""),v(-1))};return j.jsxs(j.Fragment,{children:[j.jsxs("div",{"data-disabled":o,...t,...r.container,ref:n,children:[u&&j.jsxs(j.Fragment,{children:[j.jsx("button",{type:"button",disabled:o,...r.uploadButton.container,onClick:k,children:j.jsx(x9,{...r.uploadButton.icon})}),j.jsx("input",{type:"file",ref:y,style:{display:"none"},onChange:S})]}),j.jsx(j9,{...r==null?void 0:r.input,placeholder:f??"Type your message...",disabled:o,value:d,"data-has-value":!!d,onChange:C=>h(C.target.value),maxRows:5,onKeyDown:C=>{if(!o){if(C.key==="Enter"&&C.shiftKey?(C.preventDefault(),h(`${d}
|
|
284
|
-
`)):C.key==="Enter"&&(C.preventDefault(),$()),C.key==="ArrowUp"){C.preventDefault();const P=b[(g==null?void 0:g.userId)??""]??[];m<P.length-1&&h(P[m+1]),v(()=>Math.min(m+1,P.length-1))}if(C.key==="ArrowDown"){C.preventDefault();const P=b[(g==null?void 0:g.userId)??""]??[];h(m===0?"":P[m-1]),v(()=>Math.max(m-1,-1))}}}}),j.jsx("button",{type:"button",...r.button.container,disabled:!d||o,onClick:$,children:j.jsx(b9,{...r.button.icon})})]}),j.jsx("a",{...r.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),IS=({children:e})=>{const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(null),s=({title:l,content:u})=>{o(l),a(u),n(!0)},c=()=>{n(!1)};return j.jsxs(w1.Provider,{value:{hideModal:c,showModal:s,title:r,content:i,open:t},children:[j.jsx(Eo,{open:t,onOpenChange:n,children:j.jsx(Eo.Content,{title:r,children:i})}),e]})},gle="",F9=({children:e,...t})=>{const n=E.useRef(),r=E.useRef(null),o=T6({...t,messageContainerRef:r});return n.current||(n.current=o),j.jsx(S1.Provider,{value:{...t.configuration},children:j.jsx(g1.Provider,{value:n.current,children:j.jsx(L9,{children:e})})})},L9=({children:e})=>{const t=Ne(y=>y.client),n=Ne(y=>y.addMessage),r=Ne(y=>y.setMessages),o=Ne(y=>y.configuration),i=Ne(y=>y.setConnected),a=Ne(y=>y.userData),s=Ne(y=>y.userName),c=Ne(y=>y.userPictureUrl),l=Ne(y=>y.setIsTyping),u=Ne(y=>y.getMessages),f=_n(y=>y.setConversationId),p=_n(y=>y.user),d=_n(y=>y.conversationId),h=_n(y=>y.setUser),[m,v]=E.useState(0);return E.useEffect(()=>{if(t)return t.on("messageSent",y=>{const g=u(),b=g[g.length-1];(g.length===0||b.block.type==="bubble"&&b.block.block.type==="text"&&b.block.block.text!==y)&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:{type:"bubble",block:{type:"text",text:y}},disableInput:!1})})},[d]),E.useEffect(()=>{if(t)return t.on("message",y=>{try{const{payload:g,disableInput:b,id:k,conversationId:S}=y;if(d!==S)return;l(!1,0),n({id:k,direction:"incoming",sender:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(y.sentOn),block:g,disableInput:b})}catch{console.error("Invalid message payload")}})},[d]),E.useEffect(()=>{if(t)return t.on("conversation",y=>{f(y)})},[]),a1(async()=>{if(t)return t.on("error",()=>{v(y=>y+1)})}),a1(async()=>{if(!t||d&&t.conversationId===d)return;let y;try{y=await t.connect(p,a,{name:s,pictureUrl:c}),i(!0)}catch(b){console.error(b),i(!1);return}h(y),d&&await t.conversationExists(d)?await t.switchConversation(d):await t.newConversation();const g=[];for(const b of await t.listMessages())try{const{payload:k,authorId:S,sentOn:$,disableInput:C,id:P}=b,F=S===t.userId?"outgoing":"incoming";g.push({id:P,direction:F,sender:F==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date($),block:k,disableInput:C})}catch{console.error("Invalid message payload")}return r(g.reverse()),()=>{t.disconnect()}},[m,d]),j.jsx(j.Fragment,{children:e})};function Ur(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}const B9=O["useId".toString()]||(()=>{});let U9=0;function Wl(e){const[t,n]=O.useState(B9());return Pa(()=>{e||n(r=>r??String(U9++))},[e]),e||(t?`radix-${t}`:"")}function RS({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=z9({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=to(n),c=E.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else o(l)},[i,e,o,s]);return[a,c]}function z9({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,o=E.useRef(r),i=to(t);return E.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function q9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e);E.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ah="dismissableLayer.update",H9="dismissableLayer.pointerDownOutside",W9="dismissableLayer.focusOutside";let MS;const V9=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K9=E.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=E.useContext(V9),[f,p]=E.useState(null),d=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=E.useState({}),m=Mo(t,P=>p(P)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(y),b=f?v.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=g,$=G9(P=>{const F=P.target,T=[...u.branches].some(R=>R.contains(F));!S||T||(i==null||i(P),s==null||s(P),P.defaultPrevented||c==null||c())},d),C=Z9(P=>{const F=P.target;[...u.branches].some(R=>R.contains(F))||(a==null||a(P),s==null||s(P),P.defaultPrevented||c==null||c())},d);return q9(P=>{b===u.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},d),E.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(MS=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),NS(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=MS)}},[f,d,r,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),NS())},[f,u]),E.useEffect(()=>{const P=()=>h({});return document.addEventListener(ah,P),()=>document.removeEventListener(ah,P)},[]),E.createElement(In.div,no({},l,{ref:m,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:Ur(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ur(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ur(e.onPointerDownCapture,$.onPointerDownCapture)}))});function G9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){DS(H9,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Z9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!r.current&&DS(W9,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NS(){const e=new CustomEvent(ah);document.dispatchEvent(e)}function DS(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gA(o,i):o.dispatchEvent(i)}const sh="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",jS={bubbles:!1,cancelable:!0},Y9=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=E.useState(null),l=to(o),u=to(i),f=E.useRef(null),p=Mo(t,m=>c(m)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:So(f.current,{select:!0})},v=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||So(f.current,{select:!0}))},y=function(b){const k=document.activeElement;for(const S of b)S.removedNodes.length>0&&(s!=null&&s.contains(k)||So(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const g=new MutationObserver(y);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),g.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){BS.add(d);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(sh,jS);s.addEventListener(sh,l),s.dispatchEvent(y),y.defaultPrevented||(J9(n8(FS(s)),{select:!0}),document.activeElement===m&&So(s))}return()=>{s.removeEventListener(sh,l),setTimeout(()=>{const y=new CustomEvent(ch,jS);s.addEventListener(ch,u),s.dispatchEvent(y),y.defaultPrevented||So(m??document.body,{select:!0}),s.removeEventListener(ch,u),BS.remove(d)},0)}}},[s,l,u,d]);const h=E.useCallback(m=>{if(!n&&!r||d.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const g=m.currentTarget,[b,k]=X9(g);b&&k?!m.shiftKey&&y===k?(m.preventDefault(),n&&So(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&So(k,{select:!0})):y===g&&m.preventDefault()}},[n,r,d.paused]);return E.createElement(In.div,no({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function J9(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(So(r,{select:t}),document.activeElement!==n)return}function X9(e){const t=FS(e),n=LS(t,e),r=LS(t.reverse(),e);return[n,r]}function FS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function LS(e,t){for(const n of e)if(!Q9(n,{upTo:t}))return n}function Q9(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function e8(e){return e instanceof HTMLInputElement&&"select"in e}function So(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&e8(e)&&t&&e.select()}}const BS=t8();function t8(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=US(e,t),e.unshift(t)},remove(t){var n;e=US(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function US(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function n8(e){return e.filter(t=>t.tagName!=="A")}function r8(e,t){return E.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Vl=e=>{const{present:t,children:n}=e,r=o8(t),o=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),i=Mo(r.ref,o.ref);return typeof n=="function"||r.isPresent?E.cloneElement(o,{ref:i}):null};Vl.displayName="Presence";function o8(e){const[t,n]=E.useState(),r=E.useRef({}),o=E.useRef(e),i=E.useRef("none"),a=e?"mounted":"unmounted",[s,c]=r8(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const l=Kl(r.current);i.current=s==="mounted"?l:"none"},[s]),Pa(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,d=Kl(l);e?c("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pa(()=>{if(t){const l=f=>{const d=Kl(r.current).includes(f.animationName);f.target===t&&d&&rr.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Kl(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Kl(e){return(e==null?void 0:e.animationName)||"none"}let lh=0;function i8(){E.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:zS()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:zS()),lh++,()=>{lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lh--}},[])}function zS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var gr=function(){return gr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},gr.apply(this,arguments)};function qS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function a8(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Gl="right-scroll-bar-position",Zl="width-before-scroll-bar",s8="with-scroll-bars-hidden",c8="--removed-body-scroll-bar-size";function l8(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function u8(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function f8(e,t){return u8(t||null,function(n){return e.forEach(function(r){return l8(r,n)})})}function d8(e){return e}function p8(e,t){t===void 0&&(t=d8);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function h8(e){e===void 0&&(e={});var t=p8(null);return t.options=gr({async:!0,ssr:!1},e),t}var HS=function(e){var t=e.sideCar,n=qS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return O.createElement(r,gr({},n))};HS.isSideCarExport=!0;function m8(e,t){return e.useMedium(t),HS}var WS=h8(),uh=function(){},Yl=O.forwardRef(function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:uh,onWheelCapture:uh,onTouchMoveCapture:uh}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,g=qS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,k=f8([n,t]),S=gr(gr({},g),o);return O.createElement(O.Fragment,null,u&&O.createElement(b,{sideCar:WS,removeScrollBar:l,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?O.cloneElement(O.Children.only(s),gr(gr({},S),{ref:k})):O.createElement(y,gr({},S,{className:c,ref:k}),s))});Yl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yl.classNames={fullWidth:Zl,zeroRight:Gl};var VS,y8=function(){if(VS)return VS;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function v8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=y8();return t&&e.setAttribute("nonce",t),e}function g8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function b8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var w8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=v8())&&(g8(t,n),b8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x8=function(){var e=w8();return function(t,n){O.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},KS=function(){var e=x8(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},S8={left:0,top:0,right:0,gap:0},fh=function(e){return parseInt(e||"",10)||0},E8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fh(n),fh(r),fh(o)]},_8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return S8;var t=E8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$8=KS(),k8=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
285
|
-
.`.concat(
|
|
283
|
+
*/var SU=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Gp=SU.join(","),tS=typeof Element>"u",ps=tS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Nl=!tS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Dl=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},EU=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_U=function(t,n,r){if(Dl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Gp));return n&&ps.call(t,Gp)&&o.unshift(t),o=o.filter(r),o},$U=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Dl(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ps.call(a,Gp);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Dl(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},nS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},rS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EU(t))&&!nS(t)?0:t.tabIndex},kU=function(t,n){var r=rS(t);return r<0&&n&&!nS(t)?0:r},CU=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},oS=function(t){return t.tagName==="INPUT"},TU=function(t){return oS(t)&&t.type==="hidden"},OU=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},AU=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PU=function(t){if(!t.name)return!0;var n=t.form||Nl(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=AU(o,t.form);return!i||i===t},IU=function(t){return oS(t)&&t.type==="radio"},RU=function(t){return IU(t)&&!PU(t)},MU=function(t){var n,r=t&&Nl(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=Nl(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},iS=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},NU=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ps.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ps.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Nl(t);if(c&&!c.shadowRoot&&o(c)===!0)return iS(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(MU(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return iS(t);return!1},DU=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ps.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},jU=function(t,n){return!(n.disabled||Dl(n)||TU(n)||NU(n,t)||OU(n)||DU(n))},aS=function(t,n){return!(RU(n)||rS(n)<0||!jU(t,n))},FU=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},LU=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=kU(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(CU).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Zp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$U([t],n.includeContainer,{filter:aS.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FU}):r=_U(t,n.includeContainer,aS.bind(null,n)),LU(r)};const Yp="ArrowUp",jl="ArrowDown",qi="ArrowLeft",hs="ArrowRight";function Fl(e,t,n){return Math.floor(e/t)!==n}function ms(e,t){return t<0||t>=e.current.length}function Jp(e,t){return nn(e,{disabledIndices:t})}function sS(e,t){return nn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var c,l;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function BU(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,f=l;if(n.key===Yp){if(u&&Wt(n),l===-1)f=c;else if(f=nn(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||f<0)){const p=l%i,d=c%i,h=c-(d-p);d===p?f=c:f=d>p?h:h-i}ms(e,f)&&(f=l)}if(n.key===jl&&(u&&Wt(n),l===-1?f=s:(f=nn(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(f=nn(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),ms(e,f)&&(f=l)),r==="both"){const p=Ui(l/i);n.key===hs&&(u&&Wt(n),l%i!==i-1?(f=nn(e,{startingIndex:l,disabledIndices:a}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l-l%i-1,disabledIndices:a})),Fl(f,i,p)&&(f=l)),n.key===qi&&(u&&Wt(n),l%i!==0?(f=nn(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&Fl(f,i,p)&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(f=nn(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),Fl(f,i,p)&&(f=l));const d=Ui(c/i)===p;ms(e,f)&&(o&&d?f=n.key===qi?c:nn(e,{startingIndex:l-l%i-1,disabledIndices:a}):f=l)}return f}let cS=0;function Br(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(cS);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():cS=requestAnimationFrame(i)}var Pt=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ll.apply(this,arguments)}let Xp=!1,UU=0;const lS=()=>"floating-ui-"+UU++;function zU(){const[e,t]=C.useState(()=>Xp?lS():void 0);return Pt(()=>{e==null&&t(lS())},[]),C.useEffect(()=>{Xp||(Xp=!0)},[]),e}const Qp=C["useId".toString()]||zU;function qU(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const HU=C.createContext(null),VU=C.createContext(null),uS=()=>{var e;return((e=C.useContext(HU))==null?void 0:e.id)||null},Bl=()=>C.useContext(VU);function ys(e){return"data-floating-ui-"+e}function wo(e){const t=E.useRef(e);return Pt(()=>{t.current=e}),t}function WU(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Hi(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function KU(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Hi(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Vi=new WeakMap,Ul=new WeakSet,zl={},eh=0;const GU=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,fS=e=>e&&(e.host||fS(e.parentNode)),ZU=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fS(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YU(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=ZU(t,e),s=new Set,c=new Set(a),l=[];zl[o]||(zl[o]=new WeakMap);const u=zl[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,h=>{if(s.has(h))p(h);else{const m=i?h.getAttribute(i):null,v=m!==null&&m!=="false",y=(Vi.get(h)||0)+1,g=(u.get(h)||0)+1;Vi.set(h,y),u.set(h,g),l.push(h),y===1&&v&&Ul.add(h),g===1&&h.setAttribute(o,""),!v&&i&&h.setAttribute(i,"true")}})}return eh++,()=>{l.forEach(d=>{const h=(Vi.get(d)||0)-1,m=(u.get(d)||0)-1;Vi.set(d,h),u.set(d,m),h||(!Ul.has(d)&&i&&d.removeAttribute(i),Ul.delete(d)),m||d.removeAttribute(o)}),eh--,eh||(Vi=new WeakMap,Vi=new WeakMap,Ul=new WeakSet,zl={})}}function dS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Gn(e[0]).body;return YU(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const th=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pS(e,t){const n=Zp(e,th());t==="prev"&&n.reverse();const r=n.indexOf(bo(Gn(e)));return n.slice(r+1)[0]}function hS(){return pS(document.body,"next")}function mS(){return pS(document.body,"prev")}function vs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yn(n,r)}function JU(e){Zp(e,th()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function XU(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const nh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let QU;function yS(e){e.key==="Tab"&&(e.target,clearTimeout(QU))}const ql=C.forwardRef(function(t,n){const[r,o]=C.useState();Pt(()=>(L1()&&o("button"),document.addEventListener("keydown",yS),()=>{document.removeEventListener("keydown",yS)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ys("focus-guard")]:"",style:nh};return C.createElement("span",Ll({},t,i))}),vS=C.createContext(null);function e9(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=Qp(),a=gS(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),c=C.useRef();return Pt(()=>()=>{r==null||r.remove()},[r,s]),Pt(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,h=ys("portal");if(d){const m=document.createElement("div");m.id=p,m.setAttribute(h,""),d.appendChild(m),o(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!xt(m)&&(m=m.current),m=m||document.body;let v=null;l&&(v=document.createElement("div"),v.id=l,m.appendChild(v));const y=document.createElement("div");y.id=p,y.setAttribute(h,""),m=v||m,m.appendChild(y),o(y)}},[s]),r}function t9(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=e9({id:n,root:r}),[a,s]=C.useState(null),c=C.useRef(null),l=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(h){i&&vs(h)&&(h.type==="focusin"?XU:JU)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(vS.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ql,{"data-type":"outside",ref:c,onFocus:d=>{if(vs(d,i)){var h;(h=u.current)==null||h.focus()}else{const m=mS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:nh}),i&&rr.createPortal(t,i),p&&i&&C.createElement(ql,{"data-type":"outside",ref:l,onFocus:d=>{if(vs(d,i)){var h;(h=f.current)==null||h.focus()}else{const m=hS()||(a==null?void 0:a.refs.domReference.current);m==null||m.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const gS=()=>C.useContext(vS),n9=C.forwardRef(function(t,n){return C.createElement("button",Ll({},t,{type:"button",ref:n,tabIndex:-1,style:nh}))});function r9(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:h,events:m,dataRef:v,elements:{domReference:y,floating:g}}=t,b=GU()?i:!0,k=wo(o),S=wo(a),$=wo(s),O=Bl(),I=gS(),B=typeof a=="number"&&a<0,T=C.useRef(null),M=C.useRef(null),R=C.useRef(!1),j=C.useRef(null),U=C.useRef(!1),D=I!=null,F=y&&y.getAttribute("role")==="combobox"&&z1(y)&&B,K=C.useCallback(function(q){return q===void 0&&(q=g),q?Zp(q,th()):[]},[g]),V=C.useCallback(q=>{const W=K(q);return k.current.map(_=>y&&_==="reference"?y:g&&_==="floating"?g:W).filter(Boolean).flat()},[y,g,k,K]);C.useEffect(()=>{if(r||!c)return;function q(_){if(_.key==="Tab"){yn(g,bo(Gn(g)))&&K().length===0&&!F&&Wt(_);const J=V(),ae=U1(_);k.current[0]==="reference"&&ae===y&&(Wt(_),_.shiftKey?Br(J[J.length-1]):Br(J[1])),k.current[1]==="floating"&&ae===g&&_.shiftKey&&(Wt(_),Br(J[0]))}}const W=Gn(g);return W.addEventListener("keydown",q),()=>{W.removeEventListener("keydown",q)}},[r,y,g,c,k,p,F,K,V]),C.useEffect(()=>{if(r||!u)return;function q(){U.current=!0,setTimeout(()=>{U.current=!1})}function W(_){const J=_.relatedTarget;queueMicrotask(()=>{const ae=!(yn(y,J)||yn(g,J)||yn(J,g)||yn(I==null?void 0:I.portalNode,J)||J!=null&&J.hasAttribute(ys("focus-guard"))||O&&(Hi(O.nodesRef.current,d).find(re=>{var le,pe;return yn((le=re.context)==null?void 0:le.elements.floating,J)||yn((pe=re.context)==null?void 0:pe.elements.domReference,J)})||WU(O.nodesRef.current,d).find(re=>{var le,pe;return((le=re.context)==null?void 0:le.elements.floating)===J||((pe=re.context)==null?void 0:pe.elements.domReference)===J})));J&&ae&&!U.current&&J!==j.current&&(R.current=!0,h(!1,_))})}if(g&&tn(y))return y.addEventListener("focusout",W),y.addEventListener("pointerdown",q),!c&&g.addEventListener("focusout",W),()=>{y.removeEventListener("focusout",W),y.removeEventListener("pointerdown",q),!c&&g.removeEventListener("focusout",W)}},[r,y,g,c,d,O,I,h,u]),C.useEffect(()=>{var q;if(r)return;const W=Array.from((I==null||(q=I.portalNode)==null?void 0:q.querySelectorAll("["+ys("portal")+"]"))||[]);if(g){const _=[g,...W,T.current,M.current,k.current.includes("reference")||F?y:null].filter(ae=>ae!=null),J=c?dS(_,b,!b):dS(_);return()=>{J()}}},[r,y,g,c,k,I,F,b]),Pt(()=>{if(r||!g)return;const q=Gn(g),W=bo(q);queueMicrotask(()=>{const _=V(g),J=S.current,ae=(typeof J=="number"?_[J]:J.current)||g,re=yn(g,W);!B&&!re&&f&&Br(ae,{preventScroll:ae===g})})},[r,f,g,B,V,S]),Pt(()=>{if(r||!g)return;let q=!1;const W=Gn(g),_=bo(W),J=v.current;j.current=_;function ae(re){if(re.type==="escapeKey"&&p.domReference.current&&(j.current=p.domReference.current),["referencePress","escapeKey"].includes(re.type))return;const le=re.data.returnFocus;typeof le=="object"?(R.current=!1,q=le.preventScroll):R.current=!le}return m.on("dismiss",ae),()=>{m.off("dismiss",ae);const re=bo(W);(yn(g,re)||O&&Hi(O.nodesRef.current,d).some(pe=>{var me;return yn((me=pe.context)==null?void 0:me.elements.floating,re)})||J.openEvent&&["click","mousedown"].includes(J.openEvent.type))&&p.domReference.current&&(j.current=p.domReference.current),$.current&&tn(j.current)&&!R.current&&Br(j.current,{cancelPrevious:!1,preventScroll:q})}},[r,g,$,v,p,m,O,d]),Pt(()=>{if(!(r||!I))return I.setFocusManagerState({modal:c,closeOnFocusOut:u,open:f,onOpenChange:h,refs:p}),()=>{I.setFocusManagerState(null)}},[r,I,c,f,h,p,u]),Pt(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!B){const q=()=>{const _=g.getAttribute("tabindex");k.current.includes("floating")||bo(Gn(g))!==p.domReference.current&&K().length===0?_!=="0"&&g.setAttribute("tabindex","0"):_!=="-1"&&g.setAttribute("tabindex","-1")};q();const W=new MutationObserver(q);return W.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{W.disconnect()}}},[r,g,p,k,K,B]);function N(q){return r||!l||!c?null:C.createElement(n9,{ref:q==="start"?T:M,onClick:W=>h(!1,W.nativeEvent)},typeof l=="string"?l:"Dismiss")}const w=!r&&b&&!F&&(D||c);return C.createElement(C.Fragment,null,w&&C.createElement(ql,{"data-type":"inside",ref:I==null?void 0:I.beforeInsideRef,onFocus:q=>{if(c){const _=V();Br(o[0]==="reference"?_[0]:_[_.length-1])}else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(R.current=!1,vs(q,I.portalNode)){const _=hS()||y;_==null||_.focus()}else{var W;(W=I.beforeOutsideRef.current)==null||W.focus()}}}),!F&&N("start"),n,N("end"),w&&C.createElement(ql,{"data-type":"inside",ref:I==null?void 0:I.afterInsideRef,onFocus:q=>{if(c)Br(V()[0]);else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(u&&(R.current=!0),vs(q,I.portalNode)){const _=mS()||y;_==null||_.focus()}else{var W;(W=I.afterOutsideRef.current)==null||W.focus()}}}))}function bS(e){return tn(e.target)&&e.target.tagName==="BUTTON"}function wS(e){return z1(e)}function o9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(B1(f.current,!0)&&l||s!=="click"&&(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}B1(f.current,!0)&&l||(n&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||bS(d))&&(d.key===" "&&!wS(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&c),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||bS(d)||wS(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&c),d.nativeEvent))}}}:{},[a,o,s,l,u,i,c,n,r])}const i9=C["useInsertionEffect".toString()]||(e=>e());function xo(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return i9(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const a9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},s9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},c9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function l9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:y}=t,g=Bl(),b=uS()!=null,k=xo(typeof p=="function"?p:()=>!1),S=typeof p=="function"?k:p,$=C.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:I}=c9(y),B=xo(M=>{if(!n||!u||!f||M.key!=="Escape")return;const R=g?Hi(g.nodesRef.current,i):[];if(!O&&(M.stopPropagation(),R.length>0)){let j=!0;if(R.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Y7(M)?M.nativeEvent:M)}),T=xo(M=>{const R=$.current;if($.current=!1,R||typeof S=="function"&&!S(M))return;const j=U1(M),U="["+ys("inert")+"]",D=Gn(c).querySelectorAll(U);let F=xt(j)?j:null;for(;F&&!ds(F);){const N=Jo(F);if(N===Gn(c).body||!xt(N))break;F=N}if(D.length&&xt(j)&&!J7(j)&&!yn(j,c)&&Array.from(D).every(N=>!yn(F,N)))return;if(tn(j)&&c){const N=j.clientWidth>0&&j.scrollWidth>j.clientWidth,w=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let q=w&&M.offsetX>j.clientWidth;if(w&&Cn(j).direction==="rtl"&&(q=M.offsetX<=j.offsetWidth-j.clientWidth),q||N&&M.offsetY>j.clientHeight)return}const K=g&&Hi(g.nodesRef.current,i).some(N=>{var w;return Wp(M,(w=N.context)==null?void 0:w.elements.floating)});if(Wp(M,c)||Wp(M,s)||K)return;const V=g?Hi(g.nodesRef.current,i):[];if(V.length>0){let N=!0;if(V.forEach(w=>{var q;if((q=w.context)!=null&&q.open&&!w.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:j1(M)||F1(M)}}),r(!1,M)});return C.useEffect(()=>{if(!n||!u)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=I;function M(U){r(!1,U)}const R=Gn(c);f&&R.addEventListener("keydown",B),S&&R.addEventListener(d,T);let j=[];return v&&(xt(s)&&(j=go(s)),xt(c)&&(j=j.concat(go(c))),!xt(a)&&a&&a.contextElement&&(j=j.concat(go(a.contextElement)))),j=j.filter(U=>{var D;return U!==((D=R.defaultView)==null?void 0:D.visualViewport)}),j.forEach(U=>{U.addEventListener("scroll",M,{passive:!0})}),()=>{f&&R.removeEventListener("keydown",B),S&&R.removeEventListener(d,T),j.forEach(U=>{U.removeEventListener("scroll",M)})}},[l,c,s,a,f,S,d,n,r,v,u,O,I,B,T]),C.useEffect(()=>{$.current=!1},[S,d]),C.useMemo(()=>u?{reference:{onKeyDown:B,[a9[m]]:M=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:B,[s9[d]]:()=>{$.current=!0}}}:{},[u,o,h,d,m,r,B])}let rh;process.env.NODE_ENV!=="production"&&(rh=new Set);function u9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const O="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!xt(e.elements.reference)){var a;if(!((a=rh)!=null&&a.has(O))){var s;(s=rh)==null||s.add(O),console.error(O)}}}const[c,l]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,f=xU(e),p=Bl(),d=xo((O,I)=>{O&&(m.current.openEvent=I),r==null||r(O,I)}),h=C.useRef(null),m=C.useRef({}),v=C.useState(()=>qU())[0],y=Qp(),g=C.useCallback(O=>{const I=xt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(I)},[f.refs]),b=C.useCallback(O=>{(xt(O)||O===null)&&(h.current=O,l(O)),(xt(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!xt(O))&&f.refs.setReference(O)},[f.refs]),k=C.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),$=C.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:o,floatingId:y,events:v,open:n,onOpenChange:d}),[f,o,y,v,n,d,k,S]);return Pt(()=>{const O=p==null?void 0:p.nodesRef.current.find(I=>I.id===o);O&&(O.context=$)}),C.useMemo(()=>({...f,context:$,refs:k,elements:S}),[f,k,S,$])}function oh(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof c=="function"){var l;(l=r.get(s))==null||l.push(c),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function f9(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>oh(i,e,"reference"),t),r=C.useCallback(i=>oh(i,e,"floating"),t),o=C.useCallback(i=>oh(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let xS=!1;function Hl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function SS(e,t){return Hl(t,e===Yp||e===jl,e===qi||e===hs)}function ih(e,t,n){return Hl(t,e===jl,n?e===qi:e===hs)||e==="Enter"||e==" "||e===""}function d9(e,t,n){return Hl(t,n?e===qi:e===hs,e===jl)}function ES(e,t,n){return Hl(t,n?e===hs:e===qi,e===Yp)}function p9(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:h=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:$=1,scrollItemIntoView:O=!0,virtualItemRef:I}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),v||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&$>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const B=uS(),T=Bl(),M=xo(l),R=C.useRef(y),j=C.useRef(f??-1),U=C.useRef(null),D=C.useRef(!0),F=C.useRef(M),K=C.useRef(!!a),V=C.useRef(!1),N=C.useRef(!1),w=wo(k),q=wo(n),W=wo(O),[_,J]=C.useState(),[ae,re]=C.useState(),le=xo(function(ce,Q,G){G===void 0&&(G=!1);const fe=ce.current[Q.current];fe&&(v?(J(fe.id),T==null||T.events.emit("virtualfocus",fe),I&&(I.current=fe)):Br(fe,{preventScroll:!0,sync:Z7()&&L1()?xS||V.current:!1}),requestAnimationFrame(()=>{const ve=W.current;ve&&fe&&(G||!D.current)&&(fe.scrollIntoView==null||fe.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Pt(()=>{document.createElement("div").focus({get preventScroll(){return xS=!0,!1}})},[]),Pt(()=>{u&&(n&&a?R.current&&f!=null&&(N.current=!0,M(f)):K.current&&(j.current=-1,F.current(null)))},[u,n,a,f,M]),Pt(()=>{if(u&&n&&a)if(c==null){if(V.current=!1,f!=null)return;if(K.current&&(j.current=-1,le(s,j)),!K.current&&R.current&&(U.current!=null||R.current===!0&&U.current==null)){let ce=0;const Q=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(Q),ce++):(j.current=U.current==null||ih(U.current,S,m)||h?Jp(s,w.current):sS(s,w.current),U.current=null,M(j.current))};Q()}}else ms(s,c)||(j.current=c,le(s,j,N.current),N.current=!1)},[u,n,a,c,f,h,s,S,m,M,le,w]),Pt(()=>{var ce,Q;if(!u||a||!T||v||!K.current)return;const G=T.nodesRef.current,fe=(ce=G.find(P=>P.id===B))==null||(Q=ce.context)==null?void 0:Q.elements.floating,ve=bo(Gn(a)),_e=G.some(P=>P.context&&yn(P.context.elements.floating,ve));fe&&!_e&&D.current&&fe.focus({preventScroll:!0})},[u,a,T,B,v]),Pt(()=>{if(!u||!T||!v||B)return;function ce(Q){re(Q.id),I&&(I.current=Q)}return T.events.on("virtualfocus",ce),()=>{T.events.off("virtualfocus",ce)}},[u,T,v,B,I]),Pt(()=>{F.current=M,K.current=!!a}),Pt(()=>{n||(U.current=null)},[n]);const pe=c!=null,me=C.useMemo(()=>{function ce(G){if(!n)return;const fe=s.current.indexOf(G);fe!==-1&&M(fe)}return{onFocus(G){let{currentTarget:fe}=G;ce(fe)},onClick:G=>{let{currentTarget:fe}=G;return fe.focus({preventScroll:!0})},...g&&{onMouseMove(G){let{currentTarget:fe}=G;ce(fe)},onPointerLeave(G){let{pointerType:fe}=G;!D.current||fe==="touch"||(j.current=-1,le(s,j),M(null),v||Br(o.floating.current,{preventScroll:!0}))}}}},[n,o,le,g,s,M,v]);return C.useMemo(()=>{if(!u)return{};const ce=w.current;function Q(P){if(D.current=!1,V.current=!0,!q.current&&P.currentTarget===o.floating.current)return;if(h&&ES(P.key,S,m)){Wt(P),r(!1,P.nativeEvent),tn(i)&&!v&&i.focus();return}const X=j.current,oe=Jp(s,ce),ee=sS(s,ce);if(P.key==="Home"&&(Wt(P),j.current=oe,M(j.current)),P.key==="End"&&(Wt(P),j.current=ee,M(j.current)),!($>1&&(j.current=BU(s,{event:P,orientation:S,loop:d,cols:$,disabledIndices:ce,minIndex:oe,maxIndex:ee,prevIndex:j.current,stopEvent:!0}),M(j.current),S==="both"))&&SS(P.key,S)){if(Wt(P),n&&!v&&bo(P.currentTarget.ownerDocument)===P.currentTarget){j.current=ih(P.key,S,m)?oe:ee,M(j.current);return}ih(P.key,S,m)?d?j.current=X>=ee?p&&X!==s.current.length?-1:oe:nn(s,{startingIndex:X,disabledIndices:ce}):j.current=Math.min(ee,nn(s,{startingIndex:X,disabledIndices:ce})):d?j.current=X<=oe?p&&X!==-1?s.current.length:ee:nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce}):j.current=Math.max(oe,nn(s,{startingIndex:X,decrement:!0,disabledIndices:ce})),ms(s,j.current)?M(null):M(j.current)}}function G(P){y==="auto"&&j1(P.nativeEvent)&&(R.current=!0)}function fe(P){R.current=y,y==="auto"&&F1(P.nativeEvent)&&(R.current=!0)}const ve=v&&n&&pe&&{"aria-activedescendant":ae||_},_e=s.current.find(P=>(P==null?void 0:P.id)===_);return{reference:{...ve,onKeyDown(P){D.current=!1;const X=P.key.indexOf("Arrow")===0,oe=d9(P.key,S,m),ee=ES(P.key,S,m),xe=SS(P.key,S),we=(h?oe:xe)||P.key==="Enter"||P.key.trim()==="";if(v&&n){const z=T==null?void 0:T.nodesRef.current.find(H=>H.parentId==null),Z=T&&z?KU(T.nodesRef.current,z.id):null;if(X&&Z&&I){const H=new KeyboardEvent("keydown",{key:P.key,bubbles:!0});if(oe||ee){var ke,Fe;const te=((ke=Z.context)==null?void 0:ke.elements.domReference)===P.currentTarget,de=ee&&!te?(Fe=Z.context)==null?void 0:Fe.elements.domReference:oe?_e:null;de&&(Wt(P),de.dispatchEvent(H),re(void 0))}if(xe&&Z.context&&Z.context.open&&Z.parentId&&P.currentTarget!==Z.context.elements.domReference){var Oe;Wt(P),(Oe=Z.context.elements.domReference)==null||Oe.dispatchEvent(H);return}}return Q(P)}if(!(!n&&!b&&X)){if(we&&(U.current=h&&xe?null:P.key),h){oe&&(Wt(P),n?(j.current=Jp(s,ce),M(j.current)):r(!0,P.nativeEvent));return}xe&&(f!=null&&(j.current=f),Wt(P),!n&&b?r(!0,P.nativeEvent):Q(P),n&&M(j.current))}},onFocus(){n&&M(null)},onPointerDown:fe,onMouseDown:G,onClick:G},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:Q,onPointerMove(){D.current=!0}},item:me}},[i,o,_,ae,w,q,s,u,S,m,v,n,pe,h,f,b,p,$,d,y,M,r,me,T,I])}function h9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=Qp();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function m9(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=C.useRef(),m=C.useRef(""),v=C.useRef((n=d??a)!=null?n:-1),y=C.useRef(null),g=xo(s),b=xo(c),k=wo(u),S=wo(p);return Pt(()=>{r&&(clearTimeout(h.current),y.current=null,m.current="")},[r]),Pt(()=>{if(r&&m.current===""){var $;v.current=($=d??a)!=null?$:-1}},[r,d,a]),C.useMemo(()=>{if(!l)return{};function $(B){B?o.current.typing||(o.current.typing=B,b(B)):o.current.typing&&(o.current.typing=B,b(B))}function O(B,T,M){const R=k.current?k.current(T,M):T.find(j=>(j==null?void 0:j.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return R?B.indexOf(R):-1}function I(B){const T=i.current;if(m.current.length>0&&m.current[0]!==" "&&(O(T,T,m.current)===-1?$(!1):B.key===" "&&Wt(B)),T==null||S.current.includes(B.key)||B.key.length!==1||B.ctrlKey||B.metaKey||B.altKey)return;r&&B.key!==" "&&(Wt(B),$(!0)),T.every(U=>{var D,F;return U?((D=U[0])==null?void 0:D.toLocaleLowerCase())!==((F=U[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===B.key&&(m.current="",v.current=y.current),m.current+=B.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",v.current=y.current,$(!1)},f);const R=v.current,j=O(T,[...T.slice((R||0)+1),...T.slice(0,(R||0)+1)],m.current);j!==-1?(g(j),y.current=j):B.key!==" "&&(m.current="",$(!1))}return{reference:{onKeyDown:I},floating:{onKeyDown:I,onKeyUp(B){B.key===" "&&$(!1)}}}},[l,r,o,i,f,S,k,g,b])}const y9=({options:e,label:t,reusable:n})=>{var F,K,V,N,w;const r=Ne(q=>q.sendTextMessage),o=Ne(q=>q.messageContainerRef),i=Ne(q=>q.isReadOnly),[a,s]=C.useState(!1),[c,l]=C.useState(null),[u,f]=C.useState(null),{message:{blocks:{dropdown:p}}}=ct,d=e.reduce((q,W)=>(q[W.label]=W.value,q),{}),h=d?Object.keys(d):[],m=q=>{s(u!==null&&!n?!1:q)},{refs:v,floatingStyles:y,context:g}=u9({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:bU,middleware:[tU(5),nU({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),rU({apply({rects:q,elements:W,availableHeight:_}){Object.assign(W.floating.style,{maxHeight:`${_}px`,minWidth:`${q.reference.width}px`})},padding:10})]}),b=C.useRef([]),k=C.useRef(h),S=C.useRef(!1),$=o9(g,{event:"mousedown"}),O=l9(g),I=h9(g,{role:"listbox"}),B=p9(g,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),T=m9(g,{listRef:k,activeIndex:c,selectedIndex:u,onMatch:a?l:f,onTypingChange(q){S.current=q}}),{getReferenceProps:M,getFloatingProps:R,getItemProps:j}=f9([O,I,B,T,$]),U=q=>{f(q),r(d[h[q]]),s(!1)},D=u!==null?h[u]:void 0;return L.jsxs(L.Fragment,{children:[L.jsxs("div",{tabIndex:0,ref:v.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(F=p.button)==null?void 0:F.container,...M(),children:[L.jsx("span",{...(K=p.button)==null?void 0:K.text,children:D||t||"Select..."}),L.jsx(z6,{...(V=p.button)==null?void 0:V.icon})]}),a&&L.jsx(t9,{children:L.jsx(r9,{context:g,modal:!1,children:L.jsx("div",{ref:v.setFloating,className:(w=(N=p.content)==null?void 0:N.container)==null?void 0:w.className,style:{...y},...R(),children:h.map((q,W)=>{var _;return L.jsx("div",{ref:J=>{b.current[W]=J},role:"option",tabIndex:W===c?0:-1,"aria-selected":W===u&&W===c,"data-active":W===c?"":void 0,...(_=p.content)==null?void 0:_.item,...j({onClick(){i||U(W)},onKeyDown(J){i||(J.key==="Enter"&&(J.preventDefault(),U(W)),J.key===" "&&!S.current&&(J.preventDefault(),U(W)))}}),children:q},q)})})})})]})},v9=E.forwardRef(({type:e,title:t,url:n,...r},o)=>{const{message:{blocks:{file:i}}}=ct;return L.jsxs("a",{...r,...i.container,href:n,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[L.jsx("p",{...i.title,children:t||n}),L.jsx(H6,{...i.icon})]})}),_S={audio:D6,bubble:P6,button:O6,carousel:U7,column:G6,dropdown:y9,file:v9,image:R6,location:K6,row:Z6,text:kD,video:N6},Wi=({block:e,...t})=>{const r=Ne(i=>i.renderers)[e.type]??_S[e.type],o={...t,...e};return L.jsx(r,{...o})};function g9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const b9=C.forwardRef(g9);function w9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),C.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const x9=C.forwardRef(w9);function S9({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const E9=C.forwardRef(S9);function _9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $9=E.useLayoutEffect,k9=function(t){var n=C.useRef(t);return $9(function(){n.current=t}),n},$S=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},C9=function(t,n){var r=E.useRef();return E.useCallback(function(o){t.current=o,r.current&&$S(r.current,null),r.current=n,n&&$S(n,o)},[n])},kS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},T9=function(t){Object.keys(kS).forEach(function(n){t.style.setProperty(n,kS[n],"important")})},CS=T9,un=null,TS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function O9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),un||(un=document.createElement("textarea"),un.setAttribute("tabindex","-1"),un.setAttribute("aria-hidden","true"),CS(un)),un.parentNode===null&&document.body.appendChild(un);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;un.style[d]=a[d]}),CS(un),un.value=t;var c=TS(un,e);un.value=t,c=TS(un,e),un.value="x";var l=un.scrollHeight-o,u=l*n;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var f=l*r;return s==="border-box"&&(f=f+o+i),c=Math.min(f,c),[c,l]}var OS=function(){},A9=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},P9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],I9=!!document.documentElement.currentStyle,R9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=A9(P9,n),o=r.boxSizing;if(o==="")return null;I9&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},M9=R9;function AS(e,t,n){var r=k9(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var N9=function(t){AS(window,"resize",t)},D9=function(t){AS(document.fonts,"loadingdone",t)},j9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],F9=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?OS:a,c=t.onHeightChange,l=c===void 0?OS:c,u=_9(t,j9),f=u.value!==void 0,p=C.useRef(null),d=C9(p,n),h=C.useRef(0),m=C.useRef(),v=function(){var b=p.current,k=r&&m.current?m.current:M9(b);if(k){m.current=k;var S=O9(k,b.value||b.placeholder||"x",i,o),$=S[0],O=S[1];h.current!==$&&(h.current=$,b.style.setProperty("height",$+"px","important"),l($,{rowHeight:O}))}},y=function(b){f||v(),s(b)};return C.useLayoutEffect(v),N9(v),D9(v),C.createElement("textarea",no({},u,{onChange:y,ref:d}))},L9=C.forwardRef(F9);const PS=E.memo(E.forwardRef(({children:e,...t},n)=>{const{composer:r}=ct,o=Ne(R=>R.disableComposer),i=Ne(R=>R.setIsTyping),a=Ne(R=>R.isReadOnly),s=Ne(R=>R.sendFile),c=Ne(R=>R.addMessage),l=Ne(R=>R.sendTextMessage),u=Ne(R=>R.allowFileUpload),{composerPlaceholder:f,showPoweredBy:p}=E1(),[d,h]=E.useState(""),[m,v]=E.useState(-1),[y,g]=E.useState(!1),b=E.useRef(null),k=E.useRef(null),S=_n(R=>R.user),$=_n(R=>R.messageHistory);if(a)return null;const O=()=>{var R;b.current&&((R=b.current)==null||R.click())},I=async R=>{var U;const j=(U=R.target.files)==null?void 0:U[0];if(j)try{const{fileUrl:D,type:F}=await s(j)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:F,url:D}})}catch(D){console.error("Error sending file:",D)}},B=window.SpeechRecognition||window.webkitSpeechRecognition,T=()=>{k.current||(k.current=new B);const R=k.current;R&&(R.continuous=!0,R.onresult=j=>{const U=j.results[0][0].transcript;h(U),R.stop(),g(!1)},y?(R.stop(),g(!1)):(R.start(),g(!0)))},M=()=>{d&&(l(d),setTimeout(()=>i(!0,9e3),500),h(""),v(-1))};return L.jsxs(L.Fragment,{children:[L.jsxs("div",{"data-disabled":o,...t,...r.container,ref:n,children:[u&&L.jsxs(L.Fragment,{children:[L.jsx("button",{type:"button",disabled:o,...r.uploadButton.container,onClick:O,children:L.jsx(E9,{...r.uploadButton.icon})}),L.jsx("input",{type:"file",ref:b,style:{display:"none"},onChange:I})]}),L.jsx(L9,{...r==null?void 0:r.input,placeholder:f??"Type your message...",disabled:o,value:d,"data-has-value":!!d,onChange:R=>h(R.target.value),maxRows:5,onKeyDown:R=>{if(!o){if(R.key==="Enter"&&R.shiftKey?(R.preventDefault(),h(`${d}
|
|
284
|
+
`)):R.key==="Enter"&&(R.preventDefault(),M()),R.key==="ArrowUp"){R.preventDefault();const j=$[(S==null?void 0:S.userId)??""]??[];m<j.length-1&&h(j[m+1]),v(()=>Math.min(m+1,j.length-1))}if(R.key==="ArrowDown"){R.preventDefault();const j=$[(S==null?void 0:S.userId)??""]??[];h(m===0?"":j[m-1]),v(()=>Math.max(m-1,-1))}}}}),d&&L.jsx("button",{type:"button","aria-label":"Send message",...r.button.container,disabled:!d||o,onClick:M,children:L.jsx(b9,{...r.button.icon})}),!d&&B&&L.jsx("button",{type:"button","aria-label":"Activate voice input",...r.voiceButton.container,disabled:!!d,onClick:T,"data-listens":!!y,children:L.jsx(x9,{...r.voiceButton.icon})})]}),L.jsx("a",{...r.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),IS=({children:e})=>{const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(null),s=({title:l,content:u})=>{o(l),a(u),n(!0)},c=()=>{n(!1)};return L.jsxs(w1.Provider,{value:{hideModal:c,showModal:s,title:r,content:i,open:t},children:[L.jsx(Eo,{open:t,onOpenChange:n,children:L.jsx(Eo.Content,{title:r,children:i})}),e]})},xle="",B9=({children:e,...t})=>{const n=E.useRef(),r=E.useRef(null),o=T6({...t,messageContainerRef:r});return n.current||(n.current=o),L.jsx(S1.Provider,{value:{...t.configuration},children:L.jsx(g1.Provider,{value:n.current,children:L.jsx(U9,{children:e})})})},U9=({children:e})=>{const t=Ne(y=>y.client),n=Ne(y=>y.addMessage),r=Ne(y=>y.setMessages),o=Ne(y=>y.configuration),i=Ne(y=>y.setConnected),a=Ne(y=>y.userData),s=Ne(y=>y.userName),c=Ne(y=>y.userPictureUrl),l=Ne(y=>y.setIsTyping),u=Ne(y=>y.getMessages),f=_n(y=>y.setConversationId),p=_n(y=>y.user),d=_n(y=>y.conversationId),h=_n(y=>y.setUser),[m,v]=E.useState(0);return E.useEffect(()=>{if(t)return t.on("messageSent",y=>{const g=u(),b=g[g.length-1];(g.length===0||b.block.type==="bubble"&&b.block.block.type==="text"&&b.block.block.text!==y)&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:{type:"bubble",block:{type:"text",text:y}},disableInput:!1})})},[d]),E.useEffect(()=>{if(t)return t.on("message",y=>{try{const{payload:g,disableInput:b,id:k,conversationId:S}=y;if(d!==S)return;l(!1,0),n({id:k,direction:"incoming",sender:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(y.sentOn),block:g,disableInput:b})}catch{console.error("Invalid message payload")}})},[d]),E.useEffect(()=>{if(t)return t.on("conversation",y=>{f(y)})},[]),a1(async()=>{if(t)return t.on("error",()=>{v(y=>y+1)})}),a1(async()=>{if(!t||d&&t.conversationId===d)return;let y;try{y=await t.connect(p,a,{name:s,pictureUrl:c}),i(!0)}catch(b){console.error(b),i(!1);return}h(y),d&&await t.conversationExists(d)?await t.switchConversation(d):await t.newConversation();const g=[];for(const b of await t.listMessages())try{const{payload:k,authorId:S,sentOn:$,disableInput:O,id:I}=b,B=S===t.userId?"outgoing":"incoming";g.push({id:I,direction:B,sender:B==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date($),block:k,disableInput:O})}catch{console.error("Invalid message payload")}return r(g.reverse()),()=>{t.disconnect()}},[m,d]),L.jsx(L.Fragment,{children:e})};function Ur(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}const z9=C["useId".toString()]||(()=>{});let q9=0;function Vl(e){const[t,n]=C.useState(z9());return Pa(()=>{e||n(r=>r??String(q9++))},[e]),e||(t?`radix-${t}`:"")}function RS({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=H9({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=to(n),c=E.useCallback(l=>{if(i){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else o(l)},[i,e,o,s]);return[a,c]}function H9({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,o=E.useRef(r),i=to(t);return E.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function V9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e);E.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ah="dismissableLayer.update",W9="dismissableLayer.pointerDownOutside",K9="dismissableLayer.focusOutside";let MS;const G9=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z9=E.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=E.useContext(G9),[f,p]=E.useState(null),d=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=E.useState({}),m=Mo(t,I=>p(I)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(y),b=f?v.indexOf(f):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=g,$=Y9(I=>{const B=I.target,T=[...u.branches].some(M=>M.contains(B));!S||T||(i==null||i(I),s==null||s(I),I.defaultPrevented||c==null||c())},d),O=J9(I=>{const B=I.target;[...u.branches].some(M=>M.contains(B))||(a==null||a(I),s==null||s(I),I.defaultPrevented||c==null||c())},d);return V9(I=>{b===u.layers.size-1&&(o==null||o(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},d),E.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(MS=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),NS(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=MS)}},[f,d,r,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),NS())},[f,u]),E.useEffect(()=>{const I=()=>h({});return document.addEventListener(ah,I),()=>document.removeEventListener(ah,I)},[]),E.createElement(In.div,no({},l,{ref:m,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:Ur(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ur(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ur(e.onPointerDownCapture,$.onPointerDownCapture)}))});function Y9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){DS(W9,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function J9(e,t=globalThis==null?void 0:globalThis.document){const n=to(e),r=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!r.current&&DS(K9,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NS(){const e=new CustomEvent(ah);document.dispatchEvent(e)}function DS(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?gA(o,i):o.dispatchEvent(i)}const sh="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",jS={bubbles:!1,cancelable:!0},X9=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=E.useState(null),l=to(o),u=to(i),f=E.useRef(null),p=Mo(t,m=>c(m)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(b){if(d.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:So(f.current,{select:!0})},v=function(b){if(d.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||So(f.current,{select:!0}))},y=function(b){const k=document.activeElement;for(const S of b)S.removedNodes.length>0&&(s!=null&&s.contains(k)||So(s))};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const g=new MutationObserver(y);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),g.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){BS.add(d);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(sh,jS);s.addEventListener(sh,l),s.dispatchEvent(y),y.defaultPrevented||(Q9(o8(FS(s)),{select:!0}),document.activeElement===m&&So(s))}return()=>{s.removeEventListener(sh,l),setTimeout(()=>{const y=new CustomEvent(ch,jS);s.addEventListener(ch,u),s.dispatchEvent(y),y.defaultPrevented||So(m??document.body,{select:!0}),s.removeEventListener(ch,u),BS.remove(d)},0)}}},[s,l,u,d]);const h=E.useCallback(m=>{if(!n&&!r||d.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const g=m.currentTarget,[b,k]=e8(g);b&&k?!m.shiftKey&&y===k?(m.preventDefault(),n&&So(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&So(k,{select:!0})):y===g&&m.preventDefault()}},[n,r,d.paused]);return E.createElement(In.div,no({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function Q9(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(So(r,{select:t}),document.activeElement!==n)return}function e8(e){const t=FS(e),n=LS(t,e),r=LS(t.reverse(),e);return[n,r]}function FS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function LS(e,t){for(const n of e)if(!t8(n,{upTo:t}))return n}function t8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function n8(e){return e instanceof HTMLInputElement&&"select"in e}function So(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&n8(e)&&t&&e.select()}}const BS=r8();function r8(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=US(e,t),e.unshift(t)},remove(t){var n;e=US(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function US(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function o8(e){return e.filter(t=>t.tagName!=="A")}function i8(e,t){return E.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Wl=e=>{const{present:t,children:n}=e,r=a8(t),o=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),i=Mo(r.ref,o.ref);return typeof n=="function"||r.isPresent?E.cloneElement(o,{ref:i}):null};Wl.displayName="Presence";function a8(e){const[t,n]=E.useState(),r=E.useRef({}),o=E.useRef(e),i=E.useRef("none"),a=e?"mounted":"unmounted",[s,c]=i8(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const l=Kl(r.current);i.current=s==="mounted"?l:"none"},[s]),Pa(()=>{const l=r.current,u=o.current;if(u!==e){const p=i.current,d=Kl(l);e?c("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pa(()=>{if(t){const l=f=>{const d=Kl(r.current).includes(f.animationName);f.target===t&&d&&rr.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Kl(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Kl(e){return(e==null?void 0:e.animationName)||"none"}let lh=0;function s8(){E.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:zS()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:zS()),lh++,()=>{lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),lh--}},[])}function zS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var gr=function(){return gr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},gr.apply(this,arguments)};function qS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function c8(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Gl="right-scroll-bar-position",Zl="width-before-scroll-bar",l8="with-scroll-bars-hidden",u8="--removed-body-scroll-bar-size";function f8(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d8(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function p8(e,t){return d8(t||null,function(n){return e.forEach(function(r){return f8(r,n)})})}function h8(e){return e}function m8(e,t){t===void 0&&(t=h8);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return o}function y8(e){e===void 0&&(e={});var t=m8(null);return t.options=gr({async:!0,ssr:!1},e),t}var HS=function(e){var t=e.sideCar,n=qS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,gr({},n))};HS.isSideCarExport=!0;function v8(e,t){return e.useMedium(t),HS}var VS=y8(),uh=function(){},Yl=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:uh,onWheelCapture:uh,onTouchMoveCapture:uh}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,g=qS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,k=p8([n,t]),S=gr(gr({},g),o);return C.createElement(C.Fragment,null,u&&C.createElement(b,{sideCar:VS,removeScrollBar:l,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?C.cloneElement(C.Children.only(s),gr(gr({},S),{ref:k})):C.createElement(y,gr({},S,{className:c,ref:k}),s))});Yl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yl.classNames={fullWidth:Zl,zeroRight:Gl};var WS,g8=function(){if(WS)return WS;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g8();return t&&e.setAttribute("nonce",t),e}function w8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function x8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var S8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=b8())&&(w8(t,n),x8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E8=function(){var e=S8();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},KS=function(){var e=E8(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_8={left:0,top:0,right:0,gap:0},fh=function(e){return parseInt(e||"",10)||0},$8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fh(n),fh(r),fh(o)]},k8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _8;var t=$8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},C8=KS(),T8=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
285
|
+
.`.concat(l8,` {
|
|
286
286
|
overflow: hidden `).concat(r,`;
|
|
287
287
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
288
288
|
}
|
|
@@ -316,36 +316,36 @@ to {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
body {
|
|
319
|
-
`).concat(
|
|
319
|
+
`).concat(u8,": ").concat(s,`px;
|
|
320
320
|
}
|
|
321
|
-
`)},
|
|
321
|
+
`)},O8=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=C.useMemo(function(){return k8(o)},[o]);return C.createElement(C8,{styles:T8(i,!t,o,n?"":"!important")})},dh=!1;if(typeof window<"u")try{var Jl=Object.defineProperty({},"passive",{get:function(){return dh=!0,!0}});window.addEventListener("test",Jl,Jl),window.removeEventListener("test",Jl,Jl)}catch{dh=!1}var Ki=dh?{passive:!1}:!1,A8=function(e){return e.tagName==="TEXTAREA"},GS=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!A8(e)&&n[t]==="visible")},P8=function(e){return GS(e,"overflowY")},I8=function(e){return GS(e,"overflowX")},ZS=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=YS(e,n);if(r){var o=JS(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},R8=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},M8=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},YS=function(e,t){return e==="v"?P8(t):I8(t)},JS=function(e,t){return e==="v"?R8(t):M8(t)},N8=function(e,t){return e==="h"&&t==="rtl"?-1:1},D8=function(e,t,n,r,o){var i=N8(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,u=a>0,f=0,p=0;do{var d=JS(e,s),h=d[0],m=d[1],v=d[2],y=m-v-i*h;(h||y)&&YS(e,s)&&(f+=y,p+=h),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(o&&f===0||!o&&a>f)||!u&&(o&&p===0||!o&&-a>p))&&(l=!0),l},Xl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},XS=function(e){return[e.deltaX,e.deltaY]},QS=function(e){return e&&"current"in e?e.current:e},j8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F8=function(e){return`
|
|
322
322
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
323
323
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
324
|
-
`)},j8=0,Gi=[];function F8(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),o=O.useState(j8++)[0],i=O.useState(function(){return KS()})[0],a=O.useRef(e);O.useEffect(function(){a.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=a8([e.lockRef.current],(e.shards||[]).map(QS),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=O.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var y=Xl(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-y[0],k="deltaY"in m?m.deltaY:g[1]-y[1],S,$=m.target,C=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&C==="h"&&$.type==="range")return!1;var P=ZS(C,$);if(!P)return!0;if(P?S=C:(S=C==="v"?"h":"v",P=ZS(C,$)),!P)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var F=r.current||S;return M8(F,v,m,F==="h"?b:k,!0)},[]),c=O.useCallback(function(m){var v=m;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var y="deltaY"in v?XS(v):Xl(v),g=t.current.filter(function(S){return S.name===v.type&&S.target===v.target&&N8(S.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(QS).filter(Boolean).filter(function(S){return S.contains(v.target)}),k=b.length>0?s(v,b[0]):!a.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),l=O.useCallback(function(m,v,y,g){var b={name:m,delta:v,target:y,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=O.useCallback(function(m){n.current=Xl(m),r.current=void 0},[]),f=O.useCallback(function(m){l(m.type,XS(m),m.target,s(m,e.lockRef.current))},[]),p=O.useCallback(function(m){l(m.type,Xl(m),m.target,s(m,e.lockRef.current))},[]);O.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",u,Ki),function(){Gi=Gi.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",u,Ki)}},[]);var d=e.removeScrollBar,h=e.inert;return O.createElement(O.Fragment,null,h?O.createElement(i,{styles:D8(o)}):null,d?O.createElement(C8,{gapMode:"margin"}):null)}const L8=m8(WS,F8);var eE=O.forwardRef(function(e,t){return O.createElement(Yl,gr({},e,{ref:t,sideCar:L8}))});eE.classNames=Yl.classNames;const B8=eE;var U8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,Ql=new WeakMap,eu={},ph=0,tE=function(e){return e&&(e.host||tE(e.parentNode))},z8=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},q8=function(e,t,n,r){var o=z8(t,Array.isArray(e)?e:[e]);eu[n]||(eu[n]=new WeakMap);var i=eu[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Zi.get(p)||0)+1,v=(i.get(p)||0)+1;Zi.set(p,m),i.set(p,v),a.push(p),m===1&&h&&Ql.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),ph++,function(){a.forEach(function(f){var p=Zi.get(f)-1,d=i.get(f)-1;Zi.set(f,p),i.set(f,d),p||(Ql.has(f)||f.removeAttribute(r),Ql.delete(f)),d||f.removeAttribute(n)}),ph--,ph||(Zi=new WeakMap,Zi=new WeakMap,Ql=new WeakMap,eu={})}},H8=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||U8(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),q8(r,o,n,"aria-hidden")):function(){return null}};const nE="Dialog",[rE,ble]=Rf(nE),[W8,zr]=rE(nE),V8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l=!1,u]=RS({prop:r,defaultProp:o,onChange:i});return E.createElement(W8,{scope:t,triggerRef:s,contentRef:c,contentId:Wl(),titleId:Wl(),descriptionId:Wl(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},K8="DialogTrigger",G8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(K8,n),i=Mo(t,o.triggerRef);return E.createElement(In.button,Tt({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mh(o.open)},r,{ref:i,onClick:Ur(e.onClick,o.onOpenToggle)}))}),Z8="DialogPortal",[wle,oE]=rE(Z8,{forceMount:void 0}),hh="DialogOverlay",Y8=E.forwardRef((e,t)=>{const n=oE(hh,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(hh,e.__scopeDialog);return i.modal?E.createElement(Vl,{present:r||i.open},E.createElement(J8,Tt({},o,{ref:t}))):null}),J8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(hh,n);return E.createElement(B8,{as:Mf,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement(In.div,Tt({"data-state":mh(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),gs="DialogContent",X8=E.forwardRef((e,t)=>{const n=oE(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(gs,e.__scopeDialog);return E.createElement(Vl,{present:r||i.open},i.modal?E.createElement(Q8,Tt({},o,{ref:t})):E.createElement(ez,Tt({},o,{ref:t})))}),Q8=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(null),o=Mo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return H8(i)},[]),E.createElement(iE,Tt({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ur(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ur(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ur(e.onFocusOutside,i=>i.preventDefault())}))}),ez=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(iE,Tt({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),iE=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=zr(gs,n),c=E.useRef(null),l=Mo(t,c);return i8(),E.createElement(E.Fragment,null,E.createElement(Y9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(K9,Tt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mh(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),tz="DialogTitle",nz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(tz,n);return E.createElement(In.h2,Tt({id:o.titleId},r,{ref:t}))}),rz="DialogClose",oz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(rz,n);return E.createElement(In.button,Tt({type:"button"},r,{ref:t,onClick:Ur(e.onClick,()=>o.onOpenChange(!1))}))});function mh(e){return e?"open":"closed"}const iz=V8,az=G8,sz=Y8,cz=X8,lz=nz,aE=oz;function uz({title:e,titleId:t,...n},r){return O.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?O.createElement("title",{id:t},e):null,O.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const sE=O.forwardRef(uz);function Eo({open:e,onOpenChange:t,children:n}){return j.jsx(iz,{open:e,onOpenChange:t,children:n})}function fz({title:e,children:t}){var r,o,i,a,s,c,l,u;const{modal:n}=ct;return j.jsxs(j.Fragment,{children:[j.jsx(sz,{...n==null?void 0:n.overlay}),j.jsx("div",{...n==null?void 0:n.container,children:j.jsxs(cz,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[j.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[j.jsx(lz,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),j.jsx(aE,{children:j.jsx(sE,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),j.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Eo.Button=az,Eo.Close=aE,Eo.Content=fz;const cE=E.forwardRef(({children:e,...t},n)=>{const{container:r}=ct;return j.jsxs("div",{...t,...r,ref:n,children:[j.jsx(n6,{}),j.jsxs(IS,{children:[j.jsx(dz,{}),e]})]})}),dz=()=>{const{modal:e}=ct,t=Ne(r=>r.connected),{showModal:n}=x1();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:j.jsxs(j.Fragment,{children:[j.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),j.jsx(Eo.Close,{asChild:!0,children:j.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),j.jsx(j.Fragment,{})},pz=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=ct,{container:i,icon:a}=o??{};return j.jsx("div",{...n,...i,ref:r,onClick:t,children:j.jsx("div",{...a})})}),lE="Collapsible",[hz,Sle]=Rf(lE),[mz,yh]=hz(lE),yz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=RS({prop:r,defaultProp:o,onChange:a});return E.createElement(mz,{scope:n,disabled:i,contentId:Wl(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l])},E.createElement(In.div,Tt({"data-state":vh(c),"data-disabled":i?"":void 0},s,{ref:t})))}),vz="CollapsibleTrigger",gz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=yh(vz,n);return E.createElement(In.button,Tt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ur(e.onClick,o.onOpenToggle)}))}),uE="CollapsibleContent",bz=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yh(uE,e.__scopeCollapsible);return E.createElement(Vl,{present:n||o.open},({present:i})=>E.createElement(wz,Tt({},r,{ref:t,present:i})))}),wz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=yh(uE,n),[s,c]=E.useState(r),l=E.useRef(null),u=Mo(t,l),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,v=E.useRef(m),y=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),Pa(()=>{const g=l.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,v.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[a.open,r]),E.createElement(In.div,Tt({"data-state":vh(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function vh(e){return e?"open":"closed"}const xz=yz,Sz=bz,Ez=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},O.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),fE=({...e})=>{var a,s;const{header:t,modal:n}=ct,r=Ne(c=>c.restartConversation),{showModal:o}=x1(),i=c=>{var l,u,f,p;c.stopPropagation(),o({title:"Restart Conversation",content:j.jsxs(j.Fragment,{children:[j.jsx("p",{...(u=(l=n==null?void 0:n.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),j.jsx(Eo.Close,{asChild:!0,children:j.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return j.jsx(B6,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},_z=({...e})=>{const{header:t}=ct,n=Ne(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return j.jsx(sE,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},bs=({icon:e,title:t,link:n,...r})=>{var a,s,c,l,u,f,p,d,h,m,v,y;const{header:o}=ct,i=e??Ez;return t?n?j.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[j.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),j.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):j.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[j.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),j.jsx("p",{...(y=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:y.text,children:t})]}):null},dE=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,v,y,g,b,k,S,$,C,P,F,T,R,H,L,z,N,D,K;const{header:o}=ct,i=Ne(W=>W.configuration),a=Ne(W=>W.closeWindow),s=Ne(W=>W.getClientId)(),c=Ne(W=>!W.disableRestartConversation),[l,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((v=i.privacyPolicy)!=null&&v.link);return j.jsxs(xz,{open:f?l:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[j.jsxs(gz,{...o.content.container,children:[j.jsx(Lf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),j.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&j.jsx("p",{...o.content.description,children:i.botDescription}),j.jsxs("div",{...o.content.actions.container,children:[c&&j.jsx(fE,{}),a&&j.jsx(_z,{})]})]}),j.jsxs(Sz,{...o.expandedContent.container,children:[j.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[j.jsx(bs,{"data-email":"",icon:M7,title:(y=i.email)==null?void 0:y.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),j.jsx(bs,{"data-phone":"",icon:B7,title:($=i.phone)==null?void 0:$.title,link:(P=(C=i.phone)==null?void 0:C.link)!=null&&P.startsWith("tel:")?(F=i.phone)==null?void 0:F.link:`tel:${(T=i.phone)==null?void 0:T.link}`}),j.jsx(bs,{"data-website":"",link:(R=i.website)==null?void 0:R.link,icon:D7,title:(H=i.website)==null?void 0:H.title})]}),j.jsxs("div",{"data-legal":"",...(L=o.expandedContent)==null?void 0:L.group,children:[j.jsx(bs,{"data-terms":"",link:(z=i.termsOfService)==null?void 0:z.link,icon:I7,title:(N=i.termsOfService)==null?void 0:N.title}),j.jsx(bs,{"data-privacy":"",link:(D=i.privacyPolicy)==null?void 0:D.link,icon:F7,title:(K=i.privacyPolicy)==null?void 0:K.title})]})]})]})},pE=E.memo(({...e})=>{const{typingIndicator:t}=ct;return j.jsx("div",{...e,...t==null?void 0:t.container,children:j.jsx("div",{...t==null?void 0:t.loader})})}),gh=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,...a},s)=>{var m,v,y,g;const[c,l]=E.useState([]),{message:u}=ct,{botAvatar:f,botName:p}=Ne(b=>b.configuration),d=Ne(b=>b.getClientId)(),h=Ag(d??"",15);return j.jsx(b1.Provider,{value:{isLoading:c,setIsLoading:l},children:j.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[j.jsxs(bg,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[j.jsx(wg,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??f}),j.jsx(xg,{...(y=u==null?void 0:u.avatar)==null?void 0:y.fallback,children:(i==null?void 0:i.name[0])??((g=p??"Bot")==null?void 0:g[0])})]}),t&&j.jsx(Vi,{block:t}),o]})})}));function $z(){const e=Ne(r=>r.getClientId)(),t=Ne(r=>r.configuration),{messageList:{marquee:n}}=ct;return j.jsxs("li",{...n.container,children:[j.jsx(Lf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),j.jsxs("div",{...n.content,children:[j.jsx("h1",{...n.title,children:t.botName||"Bot"}),j.jsx("p",{...n.description,children:t.botDescription})]})]})}function kz(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function Cz(){kz("react-scroll-to-bottom:version","4.2.0")}var ws=function(e){return e&&e.Math===Math&&e},It=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof Se=="object"&&Se)||ws(typeof Se=="object"&&Se)||function(){return this}()||Function("return this")(),Rt=function(e){try{return!!e()}catch{return!0}},Tz=Rt,tu=!Tz(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Oz=tu,hE=Function.prototype,mE=hE.apply,yE=hE.call,bh=typeof Reflect=="object"&&Reflect.apply||(Oz?yE.bind(mE):function(){return yE.apply(mE,arguments)}),vE=tu,gE=Function.prototype,wh=gE.call,Az=vE&&gE.bind.bind(wh,wh),Mt=vE?Az:function(e){return function(){return wh.apply(e,arguments)}},bE=Mt,Pz=bE({}.toString),Iz=bE("".slice),Qo=function(e){return Iz(Pz(e),8,-1)},Rz=Qo,Mz=Mt,xh=function(e){if(Rz(e)==="Function")return Mz(e)},Sh=typeof document=="object"&&document.all,rn=typeof Sh>"u"&&Sh!==void 0?function(e){return typeof e=="function"||e===Sh}:function(e){return typeof e=="function"},xs={},Nz=Rt,vn=!Nz(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Dz=tu,nu=Function.prototype.call,br=Dz?nu.bind(nu):function(){return nu.apply(nu,arguments)},Eh={},wE={}.propertyIsEnumerable,xE=Object.getOwnPropertyDescriptor,jz=xE&&!wE.call({1:2},1);Eh.f=jz?function(t){var n=xE(this,t);return!!n&&n.enumerable}:wE;var Ss=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Fz=Mt,Lz=Rt,Bz=Qo,_h=Object,Uz=Fz("".split),SE=Lz(function(){return!_h("z").propertyIsEnumerable(0)})?function(e){return Bz(e)==="String"?Uz(e,""):_h(e)}:_h,$h=function(e){return e==null},zz=$h,qz=TypeError,kh=function(e){if(zz(e))throw new qz("Can't call method on "+e);return e},Hz=SE,Wz=kh,wr=function(e){return Hz(Wz(e))},Vz=rn,qr=function(e){return typeof e=="object"?e!==null:Vz(e)},Kt={},Ch=Kt,Th=It,Kz=rn,EE=function(e){return Kz(e)?e:void 0},xr=function(e,t){return arguments.length<2?EE(Ch[e])||EE(Th[e]):Ch[e]&&Ch[e][t]||Th[e]&&Th[e][t]},Gz=Mt,Hr=Gz({}.isPrototypeOf),Zz=It,_E=Zz.navigator,$E=_E&&_E.userAgent,Oh=$E?String($E):"",kE=It,Ah=Oh,CE=kE.process,TE=kE.Deno,OE=CE&&CE.versions||TE&&TE.version,AE=OE&&OE.v8,Zn,ru;AE&&(Zn=AE.split("."),ru=Zn[0]>0&&Zn[0]<4?1:+(Zn[0]+Zn[1])),!ru&&Ah&&(Zn=Ah.match(/Edge\/(\d+)/),(!Zn||Zn[1]>=74)&&(Zn=Ah.match(/Chrome\/(\d+)/),Zn&&(ru=+Zn[1])));var Ph=ru,PE=Ph,Yz=Rt,Jz=It,Xz=Jz.String,Yi=!!Object.getOwnPropertySymbols&&!Yz(function(){var e=Symbol("symbol detection");return!Xz(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&PE&&PE<41}),Qz=Yi,IE=Qz&&!Symbol.sham&&typeof Symbol.iterator=="symbol",eq=xr,tq=rn,nq=Hr,rq=IE,oq=Object,Es=rq?function(e){return typeof e=="symbol"}:function(e){var t=eq("Symbol");return tq(t)&&nq(t.prototype,oq(e))},iq=String,ou=function(e){try{return iq(e)}catch{return"Object"}},aq=rn,sq=ou,cq=TypeError,Ih=function(e){if(aq(e))return e;throw new cq(sq(e)+" is not a function")},lq=Ih,uq=$h,Rh=function(e,t){var n=e[t];return uq(n)?void 0:lq(n)},Mh=br,Nh=rn,Dh=qr,fq=TypeError,dq=function(e,t){var n,r;if(t==="string"&&Nh(n=e.toString)&&!Dh(r=Mh(n,e))||Nh(n=e.valueOf)&&!Dh(r=Mh(n,e))||t!=="string"&&Nh(n=e.toString)&&!Dh(r=Mh(n,e)))return r;throw new fq("Can't convert object to primitive value")},RE={exports:{}},ME=It,pq=Object.defineProperty,hq=function(e,t){try{pq(ME,e,{value:t,configurable:!0,writable:!0})}catch{ME[e]=t}return t},mq=It,yq=hq,NE="__core-js_shared__",DE=RE.exports=mq[NE]||yq(NE,{});(DE.versions||(DE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var jh=RE.exports,jE=jh,Ji=function(e,t){return jE[e]||(jE[e]=t||{})},vq=kh,gq=Object,Wr=function(e){return gq(vq(e))},bq=Mt,wq=Wr,xq=bq({}.hasOwnProperty),Tn=Object.hasOwn||function(t,n){return xq(wq(t),n)},Sq=Mt,Eq=0,_q=Math.random(),$q=Sq(1 .toString),Fh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+$q(++Eq+_q,36)},kq=It,Cq=Ji,FE=Tn,Tq=Fh,Oq=Yi,Aq=IE,Xi=kq.Symbol,Lh=Cq("wks"),Pq=Aq?Xi.for||Xi:Xi&&Xi.withoutSetter||Tq,zt=function(e){return FE(Lh,e)||(Lh[e]=Oq&&FE(Xi,e)?Xi[e]:Pq("Symbol."+e)),Lh[e]},Iq=br,LE=qr,BE=Es,Rq=Rh,Mq=dq,Nq=zt,Dq=TypeError,jq=Nq("toPrimitive"),Fq=function(e,t){if(!LE(e)||BE(e))return e;var n=Rq(e,jq),r;if(n){if(t===void 0&&(t="default"),r=Iq(n,e,t),!LE(r)||BE(r))return r;throw new Dq("Can't convert object to primitive value")}return t===void 0&&(t="number"),Mq(e,t)},Lq=Fq,Bq=Es,Bh=function(e){var t=Lq(e,"string");return Bq(t)?t:t+""},Uq=It,UE=qr,Uh=Uq.document,zq=UE(Uh)&&UE(Uh.createElement),zE=function(e){return zq?Uh.createElement(e):{}},qq=vn,Hq=Rt,Wq=zE,qE=!qq&&!Hq(function(){return Object.defineProperty(Wq("div"),"a",{get:function(){return 7}}).a!==7}),Vq=vn,Kq=br,Gq=Eh,Zq=Ss,Yq=wr,Jq=Bh,Xq=Tn,Qq=qE,HE=Object.getOwnPropertyDescriptor;xs.f=Vq?HE:function(t,n){if(t=Yq(t),n=Jq(n),Qq)try{return HE(t,n)}catch{}if(Xq(t,n))return Zq(!Kq(Gq.f,t,n),t[n])};var eH=Rt,tH=rn,nH=/#|\.prototype\./,_s=function(e,t){var n=oH[rH(e)];return n===aH?!0:n===iH?!1:tH(t)?eH(t):!!t},rH=_s.normalize=function(e){return String(e).replace(nH,".").toLowerCase()},oH=_s.data={},iH=_s.NATIVE="N",aH=_s.POLYFILL="P",sH=_s,WE=xh,cH=Ih,lH=tu,uH=WE(WE.bind),zh=function(e,t){return cH(e),t===void 0?e:lH?uH(e,t):function(){return e.apply(t,arguments)}},Yn={},fH=vn,dH=Rt,VE=fH&&dH(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),pH=qr,hH=String,mH=TypeError,_o=function(e){if(pH(e))return e;throw new mH(hH(e)+" is not an object")},yH=vn,vH=qE,gH=VE,iu=_o,KE=Bh,bH=TypeError,qh=Object.defineProperty,wH=Object.getOwnPropertyDescriptor,Hh="enumerable",Wh="configurable",Vh="writable";Yn.f=yH?gH?function(t,n,r){if(iu(t),n=KE(n),iu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Vh in r&&!r[Vh]){var o=wH(t,n);o&&o[Vh]&&(t[n]=r.value,r={configurable:Wh in r?r[Wh]:o[Wh],enumerable:Hh in r?r[Hh]:o[Hh],writable:!1})}return qh(t,n,r)}:qh:function(t,n,r){if(iu(t),n=KE(n),iu(r),vH)try{return qh(t,n,r)}catch{}if("get"in r||"set"in r)throw new bH("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var xH=vn,SH=Yn,EH=Ss,au=xH?function(e,t,n){return SH.f(e,t,EH(1,n))}:function(e,t,n){return e[t]=n,e},$s=It,_H=bh,$H=xh,kH=rn,CH=xs.f,TH=sH,Qi=Kt,OH=zh,ea=au,GE=Tn,AH=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return _H(e,this,arguments)};return t.prototype=e.prototype,t},at=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?$s:o?$s[n]:$s[n]&&$s[n].prototype,s=r?Qi:Qi[n]||ea(Qi,n,{})[n],c=s.prototype,l,u,f,p,d,h,m,v,y;for(p in t)l=TH(r?p:n+(o?".":"#")+p,e.forced),u=!l&&a&&GE(a,p),h=s[p],u&&(e.dontCallGetSet?(y=CH(a,p),m=y&&y.value):m=a[p]),d=u&&m?m:t[p],!(!l&&!i&&typeof h==typeof d)&&(e.bind&&u?v=OH(d,$s):e.wrap&&u?v=AH(d):i&&kH(d)?v=$H(d):v=d,(e.sham||d&&d.sham||h&&h.sham)&&ea(v,"sham",!0),ea(s,p,v),i&&(f=n+"Prototype",GE(Qi,f)||ea(Qi,f,{}),ea(Qi[f],p,d),e.real&&c&&(l||!c[p])&&ea(c,p,d)))},PH=Qo,ta=Array.isArray||function(t){return PH(t)==="Array"},IH=at,RH=ta;IH({target:"Array",stat:!0},{isArray:RH});var MH=Kt,NH=MH.Array.isArray,DH=NH,ZE=DH,jH=ZE,FH=jH,LH=FH,BH=LH,UH=BH;const YE=Ue(UH);function zH(e){if(YE(e))return e}var qH=Math.ceil,HH=Math.floor,WH=Math.trunc||function(t){var n=+t;return(n>0?HH:qH)(n)},VH=WH,su=function(e){var t=+e;return t!==t||t===0?0:VH(t)},KH=su,GH=Math.min,ZH=function(e){var t=KH(e);return t>0?GH(t,9007199254740991):0},YH=ZH,ei=function(e){return YH(e.length)},JH=TypeError,XH=9007199254740991,Kh=function(e){if(e>XH)throw JH("Maximum allowed index exceeded");return e},QH=vn,eW=Yn,tW=Ss,ks=function(e,t,n){QH?eW.f(e,t,tW(0,n)):e[t]=n},nW=zt,rW=nW("toStringTag"),JE={};JE[rW]="z";var Gh=String(JE)==="[object z]",oW=Gh,iW=rn,cu=Qo,aW=zt,sW=aW("toStringTag"),cW=Object,lW=cu(function(){return arguments}())==="Arguments",uW=function(e,t){try{return e[t]}catch{}},Cs=oW?cu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=uW(t=cW(e),sW))=="string"?n:lW?cu(t):(r=cu(t))==="Object"&&iW(t.callee)?"Arguments":r},fW=Mt,dW=rn,Zh=jh,pW=fW(Function.toString);dW(Zh.inspectSource)||(Zh.inspectSource=function(e){return pW(e)});var hW=Zh.inspectSource,mW=Mt,yW=Rt,XE=rn,vW=Cs,gW=xr,bW=hW,QE=function(){},e_=gW("Reflect","construct"),Yh=/^\s*(?:class|function)\b/,wW=mW(Yh.exec),xW=!Yh.test(QE),Ts=function(t){if(!XE(t))return!1;try{return e_(QE,[],t),!0}catch{return!1}},t_=function(t){if(!XE(t))return!1;switch(vW(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xW||!!wW(Yh,bW(t))}catch{return!0}};t_.sham=!0;var Jh=!e_||yW(function(){var e;return Ts(Ts.call)||!Ts(Object)||!Ts(function(){e=!0})||e})?t_:Ts,n_=ta,SW=Jh,EW=qr,_W=zt,$W=_W("species"),r_=Array,kW=function(e){var t;return n_(e)&&(t=e.constructor,SW(t)&&(t===r_||n_(t.prototype))?t=void 0:EW(t)&&(t=t[$W],t===null&&(t=void 0))),t===void 0?r_:t},CW=kW,Xh=function(e,t){return new(CW(e))(t===0?0:t)},TW=Rt,OW=zt,AW=Ph,PW=OW("species"),lu=function(e){return AW>=51||!TW(function(){var t=[],n=t.constructor={};return n[PW]=function(){return{foo:1}},t[e](Boolean).foo!==1})},IW=at,RW=Rt,MW=ta,NW=qr,DW=Wr,jW=ei,o_=Kh,i_=ks,FW=Xh,LW=lu,BW=zt,UW=Ph,a_=BW("isConcatSpreadable"),zW=UW>=51||!RW(function(){var e=[];return e[a_]=!1,e.concat()[0]!==e}),qW=function(e){if(!NW(e))return!1;var t=e[a_];return t!==void 0?!!t:MW(e)},HW=!zW||!LW("concat");IW({target:"Array",proto:!0,arity:1,forced:HW},{concat:function(t){var n=DW(this),r=FW(n,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?n:arguments[i],qW(l))for(c=jW(l),o_(o+c),a=0;a<c;a++,o++)a in l&&i_(r,o,l[a]);else o_(o+1),i_(r,o++,l);return r.length=o,r}});var WW=Cs,VW=String,Os=function(e){if(WW(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return VW(e)},uu={},KW=su,GW=Math.max,ZW=Math.min,Qh=function(e,t){var n=KW(e);return n<0?GW(n+t,0):ZW(n,t)},YW=wr,JW=Qh,XW=ei,s_=function(e){return function(t,n,r){var o=YW(t),i=XW(o);if(i===0)return!e&&-1;var a=JW(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},c_={includes:s_(!0),indexOf:s_(!1)},fu={},QW=Mt,em=Tn,eV=wr,tV=c_.indexOf,nV=fu,l_=QW([].push),u_=function(e,t){var n=eV(e),r=0,o=[],i;for(i in n)!em(nV,i)&&em(n,i)&&l_(o,i);for(;t.length>r;)em(n,i=t[r++])&&(~tV(o,i)||l_(o,i));return o},tm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rV=u_,oV=tm,nm=Object.keys||function(t){return rV(t,oV)},iV=vn,aV=VE,sV=Yn,cV=_o,lV=wr,uV=nm;uu.f=iV&&!aV?Object.defineProperties:function(t,n){cV(t);for(var r=lV(n),o=uV(n),i=o.length,a=0,s;i>a;)sV.f(t,s=o[a++],r[s]);return t};var fV=xr,dV=fV("document","documentElement"),pV=Ji,hV=Fh,f_=pV("keys"),du=function(e){return f_[e]||(f_[e]=hV(e))},mV=_o,yV=uu,d_=tm,vV=fu,gV=dV,bV=zE,wV=du,p_=">",h_="<",rm="prototype",om="script",m_=wV("IE_PROTO"),im=function(){},y_=function(e){return h_+om+p_+e+h_+"/"+om+p_},v_=function(e){e.write(y_("")),e.close();var t=e.parentWindow.Object;return e=null,t},xV=function(){var e=bV("iframe"),t="java"+om+":",n;return e.style.display="none",gV.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(y_("document.F=Object")),n.close(),n.F},pu,hu=function(){try{pu=new ActiveXObject("htmlfile")}catch{}hu=typeof document<"u"?document.domain&&pu?v_(pu):xV():v_(pu);for(var e=d_.length;e--;)delete hu[rm][d_[e]];return hu()};vV[m_]=!0;var am=Object.create||function(t,n){var r;return t!==null?(im[rm]=mV(t),r=new im,im[rm]=null,r[m_]=t):r=hu(),n===void 0?r:yV.f(r,n)},mu={},SV=u_,EV=tm,_V=EV.concat("length","prototype");mu.f=Object.getOwnPropertyNames||function(t){return SV(t,_V)};var g_={},$V=Mt,yu=$V([].slice),kV=Qo,CV=wr,b_=mu.f,TV=yu,w_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],OV=function(e){try{return b_(e)}catch{return TV(w_)}};g_.f=function(t){return w_&&kV(t)==="Window"?OV(t):b_(CV(t))};var vu={};vu.f=Object.getOwnPropertySymbols;var AV=au,gu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:AV(e,t,n),e},PV=Yn,IV=function(e,t,n){return PV.f(e,t,n)},As={},RV=zt;As.f=RV;var x_=Kt,MV=Tn,NV=As,DV=Yn.f,gt=function(e){var t=x_.Symbol||(x_.Symbol={});MV(t,e)||DV(t,e,{value:NV.f(e)})},jV=br,FV=xr,LV=zt,BV=gu,S_=function(){var e=FV("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=LV("toPrimitive");t&&!t[r]&&BV(t,r,function(o){return jV(n,this)},{arity:1})},UV=Gh,zV=Cs,qV=UV?{}.toString:function(){return"[object "+zV(this)+"]"},HV=Gh,WV=Yn.f,VV=au,KV=Tn,GV=qV,ZV=zt,E_=ZV("toStringTag"),na=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(KV(o,E_)||WV(o,E_,{configurable:!0,value:t}),r&&!HV&&VV(o,"toString",GV))},YV=It,JV=rn,__=YV.WeakMap,XV=JV(__)&&/native code/.test(String(__)),QV=XV,$_=It,eK=qr,tK=au,sm=Tn,cm=jh,nK=du,rK=fu,k_="Object already initialized",lm=$_.TypeError,oK=$_.WeakMap,bu,Ps,wu,iK=function(e){return wu(e)?Ps(e):bu(e,{})},aK=function(e){return function(t){var n;if(!eK(t)||(n=Ps(t)).type!==e)throw new lm("Incompatible receiver, "+e+" required");return n}};if(QV||cm.state){var Sr=cm.state||(cm.state=new oK);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,bu=function(e,t){if(Sr.has(e))throw new lm(k_);return t.facade=e,Sr.set(e,t),t},Ps=function(e){return Sr.get(e)||{}},wu=function(e){return Sr.has(e)}}else{var ra=nK("state");rK[ra]=!0,bu=function(e,t){if(sm(e,ra))throw new lm(k_);return t.facade=e,tK(e,ra,t),t},Ps=function(e){return sm(e,ra)?e[ra]:{}},wu=function(e){return sm(e,ra)}}var um={set:bu,get:Ps,has:wu,enforce:iK,getterFor:aK},sK=zh,cK=Mt,lK=SE,uK=Wr,fK=ei,dK=Xh,C_=cK([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,f){for(var p=uK(c),d=lK(p),h=fK(d),m=sK(l,u),v=0,y=f||dK,g=t?y(c,h):n||a?y(c,0):void 0,b,k;h>v;v++)if((s||v in d)&&(b=d[v],k=m(b,v,p),e))if(t)g[v]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return v;case 2:C_(g,b)}else switch(e){case 4:return!1;case 7:C_(g,b)}return i?-1:r||o?o:g}},fm={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},xu=at,Is=It,dm=br,pK=Mt,oa=vn,ia=Yi,hK=Rt,qt=Tn,mK=Hr,pm=_o,Su=wr,hm=Bh,yK=Os,mm=Ss,aa=am,T_=nm,vK=mu,O_=g_,gK=vu,A_=xs,P_=Yn,bK=uu,I_=Eh,R_=gu,wK=IV,ym=Ji,xK=du,M_=fu,N_=Fh,SK=zt,EK=As,_K=gt,$K=S_,kK=na,D_=um,Eu=fm.forEach,gn=xK("hidden"),_u="Symbol",Rs="prototype",CK=D_.set,j_=D_.getterFor(_u),Jn=Object[Rs],ti=Is.Symbol,Ms=ti&&ti[Rs],TK=Is.RangeError,OK=Is.TypeError,vm=Is.QObject,F_=A_.f,ni=P_.f,L_=O_.f,AK=I_.f,B_=pK([].push),Vr=ym("symbols"),Ns=ym("op-symbols"),PK=ym("wks"),gm=!vm||!vm[Rs]||!vm[Rs].findChild,U_=function(e,t,n){var r=F_(Jn,t);r&&delete Jn[t],ni(e,t,n),r&&e!==Jn&&ni(Jn,t,r)},bm=oa&&hK(function(){return aa(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a!==7})?U_:ni,wm=function(e,t){var n=Vr[e]=aa(Ms);return CK(n,{type:_u,tag:e,description:t}),oa||(n.description=t),n},$u=function(t,n,r){t===Jn&&$u(Ns,n,r),pm(t);var o=hm(n);return pm(r),qt(Vr,o)?(r.enumerable?(qt(t,gn)&&t[gn][o]&&(t[gn][o]=!1),r=aa(r,{enumerable:mm(0,!1)})):(qt(t,gn)||ni(t,gn,mm(1,aa(null))),t[gn][o]=!0),bm(t,o,r)):ni(t,o,r)},xm=function(t,n){pm(t);var r=Su(n),o=T_(r).concat(W_(r));return Eu(o,function(i){(!oa||dm(z_,r,i))&&$u(t,i,r[i])}),t},IK=function(t,n){return n===void 0?aa(t):xm(aa(t),n)},z_=function(t){var n=hm(t),r=dm(AK,this,n);return this===Jn&&qt(Vr,n)&&!qt(Ns,n)?!1:r||!qt(this,n)||!qt(Vr,n)||qt(this,gn)&&this[gn][n]?r:!0},q_=function(t,n){var r=Su(t),o=hm(n);if(!(r===Jn&&qt(Vr,o)&&!qt(Ns,o))){var i=F_(r,o);return i&&qt(Vr,o)&&!(qt(r,gn)&&r[gn][o])&&(i.enumerable=!0),i}},H_=function(t){var n=L_(Su(t)),r=[];return Eu(n,function(o){!qt(Vr,o)&&!qt(M_,o)&&B_(r,o)}),r},W_=function(e){var t=e===Jn,n=L_(t?Ns:Su(e)),r=[];return Eu(n,function(o){qt(Vr,o)&&(!t||qt(Jn,o))&&B_(r,Vr[o])}),r};ia||(ti=function(){if(mK(Ms,this))throw new OK("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:yK(arguments[0]),n=N_(t),r=function(o){var i=this===void 0?Is:this;i===Jn&&dm(r,Ns,o),qt(i,gn)&&qt(i[gn],n)&&(i[gn][n]=!1);var a=mm(1,o);try{bm(i,n,a)}catch(s){if(!(s instanceof TK))throw s;U_(i,n,a)}};return oa&&gm&&bm(Jn,n,{configurable:!0,set:r}),wm(n,t)},Ms=ti[Rs],R_(Ms,"toString",function(){return j_(this).tag}),R_(ti,"withoutSetter",function(e){return wm(N_(e),e)}),I_.f=z_,P_.f=$u,bK.f=xm,A_.f=q_,vK.f=O_.f=H_,gK.f=W_,EK.f=function(e){return wm(SK(e),e)},oa&&wK(Ms,"description",{configurable:!0,get:function(){return j_(this).description}})),xu({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:ti}),Eu(T_(PK),function(e){_K(e)}),xu({target:_u,stat:!0,forced:!ia},{useSetter:function(){gm=!0},useSimple:function(){gm=!1}}),xu({target:"Object",stat:!0,forced:!ia,sham:!oa},{create:IK,defineProperty:$u,defineProperties:xm,getOwnPropertyDescriptor:q_}),xu({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:H_}),$K(),kK(ti,_u),M_[gn]=!0;var RK=Yi,V_=RK&&!!Symbol.for&&!!Symbol.keyFor,MK=at,NK=xr,DK=Tn,jK=Os,K_=Ji,FK=V_,Sm=K_("string-to-symbol-registry"),LK=K_("symbol-to-string-registry");MK({target:"Symbol",stat:!0,forced:!FK},{for:function(e){var t=jK(e);if(DK(Sm,t))return Sm[t];var n=NK("Symbol")(t);return Sm[t]=n,LK[n]=t,n}});var BK=at,UK=Tn,zK=Es,qK=ou,HK=Ji,WK=V_,G_=HK("symbol-to-string-registry");BK({target:"Symbol",stat:!0,forced:!WK},{keyFor:function(t){if(!zK(t))throw new TypeError(qK(t)+" is not a symbol");if(UK(G_,t))return G_[t]}});var VK=Mt,Z_=ta,KK=rn,Y_=Qo,GK=Os,J_=VK([].push),ZK=function(e){if(KK(e))return e;if(Z_(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?J_(n,o):(typeof o=="number"||Y_(o)==="Number"||Y_(o)==="String")&&J_(n,GK(o))}var i=n.length,a=!0;return function(s,c){if(a)return a=!1,c;if(Z_(this))return c;for(var l=0;l<i;l++)if(n[l]===s)return c}}},YK=at,X_=xr,Q_=bh,JK=br,Ds=Mt,e$=Rt,t$=rn,n$=Es,r$=yu,XK=ZK,QK=Yi,eG=String,ko=X_("JSON","stringify"),ku=Ds(/./.exec),o$=Ds("".charAt),tG=Ds("".charCodeAt),nG=Ds("".replace),rG=Ds(1 .toString),oG=/[\uD800-\uDFFF]/g,i$=/^[\uD800-\uDBFF]$/,a$=/^[\uDC00-\uDFFF]$/,s$=!QK||e$(function(){var e=X_("Symbol")("stringify detection");return ko([e])!=="[null]"||ko({a:e})!=="{}"||ko(Object(e))!=="{}"}),c$=e$(function(){return ko("\uDF06\uD834")!=='"\\udf06\\ud834"'||ko("\uDEAD")!=='"\\udead"'}),iG=function(e,t){var n=r$(arguments),r=XK(t);if(!(!t$(r)&&(e===void 0||n$(e))))return n[1]=function(o,i){if(t$(r)&&(i=JK(r,this,eG(o),i)),!n$(i))return i},Q_(ko,null,n)},aG=function(e,t,n){var r=o$(n,t-1),o=o$(n,t+1);return ku(i$,e)&&!ku(a$,o)||ku(a$,e)&&!ku(i$,r)?"\\u"+rG(tG(e,0),16):e};ko&&YK({target:"JSON",stat:!0,arity:3,forced:s$||c$},{stringify:function(t,n,r){var o=r$(arguments),i=Q_(s$?iG:ko,null,o);return c$&&typeof i=="string"?nG(i,oG,aG):i}});var sG=at,cG=Yi,lG=Rt,l$=vu,uG=Wr,fG=!cG||lG(function(){l$.f(1)});sG({target:"Object",stat:!0,forced:fG},{getOwnPropertySymbols:function(t){var n=l$.f;return n?n(uG(t)):[]}});var dG=gt;dG("asyncIterator");var pG=gt;pG("hasInstance");var hG=gt;hG("isConcatSpreadable");var mG=gt;mG("iterator");var yG=gt;yG("match");var vG=gt;vG("matchAll");var gG=gt;gG("replace");var bG=gt;bG("search");var wG=gt;wG("species");var xG=gt;xG("split");var SG=gt,EG=S_;SG("toPrimitive"),EG();var _G=xr,$G=gt,kG=na;$G("toStringTag"),kG(_G("Symbol"),"Symbol");var CG=gt;CG("unscopables");var TG=It,OG=na;OG(TG.JSON,"JSON",!0);var AG=Kt,PG=AG.Symbol,sa={},Em=vn,IG=Tn,u$=Function.prototype,RG=Em&&Object.getOwnPropertyDescriptor,_m=IG(u$,"name"),MG=_m&&(function(){}).name==="something",NG=_m&&(!Em||Em&&RG(u$,"name").configurable),DG={EXISTS:_m,PROPER:MG,CONFIGURABLE:NG},jG=Rt,FG=!jG(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),LG=Tn,BG=rn,UG=Wr,zG=du,qG=FG,f$=zG("IE_PROTO"),$m=Object,HG=$m.prototype,d$=qG?$m.getPrototypeOf:function(e){var t=UG(e);if(LG(t,f$))return t[f$];var n=t.constructor;return BG(n)&&t instanceof n?n.prototype:t instanceof $m?HG:null},WG=Rt,VG=rn,KG=qr,GG=am,p$=d$,ZG=gu,YG=zt,km=YG("iterator"),h$=!1,Kr,Cm,Tm;[].keys&&(Tm=[].keys(),"next"in Tm?(Cm=p$(p$(Tm)),Cm!==Object.prototype&&(Kr=Cm)):h$=!0);var JG=!KG(Kr)||WG(function(){var e={};return Kr[km].call(e)!==e});JG?Kr={}:Kr=GG(Kr),VG(Kr[km])||ZG(Kr,km,function(){return this});var m$={IteratorPrototype:Kr,BUGGY_SAFARI_ITERATORS:h$},XG=m$.IteratorPrototype,QG=am,eZ=Ss,tZ=na,nZ=sa,rZ=function(){return this},oZ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=QG(XG,{next:eZ(+!r,n)}),tZ(e,o,!1,!0),nZ[o]=rZ,e},iZ=at,aZ=br,y$=DG,sZ=oZ,cZ=d$,lZ=na,v$=gu,uZ=zt,g$=sa,b$=m$,fZ=y$.PROPER;y$.CONFIGURABLE,b$.IteratorPrototype;var Cu=b$.BUGGY_SAFARI_ITERATORS,Om=uZ("iterator"),w$="keys",Tu="values",x$="entries",dZ=function(){return this},S$=function(e,t,n,r,o,i,a){sZ(n,t,r);var s=function(y){if(y===o&&p)return p;if(!Cu&&y&&y in u)return u[y];switch(y){case w$:return function(){return new n(this,y)};case Tu:return function(){return new n(this,y)};case x$:return function(){return new n(this,y)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[Om]||u["@@iterator"]||o&&u[o],p=!Cu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,v;if(d&&(h=cZ(d.call(new e)),h!==Object.prototype&&h.next&&(lZ(h,c,!0,!0),g$[c]=dZ)),fZ&&o===Tu&&f&&f.name!==Tu&&(l=!0,p=function(){return aZ(f,this)}),o)if(m={values:s(Tu),keys:i?p:s(w$),entries:s(x$)},a)for(v in m)(Cu||l||!(v in u))&&v$(u,v,m[v]);else iZ({target:t,proto:!0,forced:Cu||l},m);return a&&u[Om]!==p&&v$(u,Om,p,{name:o}),g$[t]=p,m},E$=function(e,t){return{value:e,done:t}},pZ=wr,_$=sa,$$=um;Yn.f;var hZ=S$,Ou=E$,k$="Array Iterator",mZ=$$.set,yZ=$$.getterFor(k$);hZ(Array,"Array",function(e,t){mZ(this,{type:k$,target:pZ(e),index:0,kind:t})},function(){var e=yZ(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ou(void 0,!0);switch(e.kind){case"keys":return Ou(n,!1);case"values":return Ou(t[n],!1)}return Ou([n,t[n]],!1)},"values"),_$.Arguments=_$.Array;var vZ={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},gZ=vZ,bZ=It,wZ=na,C$=sa;for(var Am in gZ)wZ(bZ[Am],Am),C$[Am]=C$.Array;var xZ=PG,SZ=xZ,EZ=zt,_Z=Yn.f,T$=EZ("metadata"),O$=Function.prototype;O$[T$]===void 0&&_Z(O$,T$,{value:null});var $Z=gt;$Z("asyncDispose");var kZ=gt;kZ("dispose");var CZ=gt;CZ("metadata");var TZ=SZ,OZ=TZ,AZ=xr,PZ=Mt,Pm=AZ("Symbol"),IZ=Pm.keyFor,RZ=PZ(Pm.prototype.valueOf),A$=Pm.isRegisteredSymbol||function(t){try{return IZ(RZ(t))!==void 0}catch{return!1}},MZ=at,NZ=A$;MZ({target:"Symbol",stat:!0},{isRegisteredSymbol:NZ});for(var DZ=Ji,P$=xr,jZ=Mt,FZ=Es,LZ=zt,Au=P$("Symbol"),I$=Au.isWellKnownSymbol,R$=P$("Object","getOwnPropertyNames"),BZ=jZ(Au.prototype.valueOf),M$=DZ("wks"),Im=0,N$=R$(Au),UZ=N$.length;Im<UZ;Im++)try{var D$=N$[Im];FZ(Au[D$])&&LZ(D$)}catch{}var j$=function(t){if(I$&&I$(t))return!0;try{for(var n=BZ(t),r=0,o=R$(M$),i=o.length;r<i;r++)if(M$[o[r]]==n)return!0}catch{}return!1},zZ=at,qZ=j$;zZ({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:qZ});var HZ=gt;HZ("customMatcher");var WZ=gt;WZ("observable");var VZ=at,KZ=A$;VZ({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:KZ});var GZ=at,ZZ=j$;GZ({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:ZZ});var YZ=gt;YZ("matcher");var JZ=gt;JZ("metadataKey");var XZ=gt;XZ("patternMatch");var QZ=gt;QZ("replaceAll");var eY=OZ,tY=eY,nY=tY;const ca=Ue(nY);var Rm=Mt,rY=su,oY=Os,iY=kh,aY=Rm("".charAt),F$=Rm("".charCodeAt),sY=Rm("".slice),L$=function(e){return function(t,n){var r=oY(iY(t)),o=rY(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=F$(r,o),a<55296||a>56319||o+1===i||(s=F$(r,o+1))<56320||s>57343?e?aY(r,o):a:e?sY(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},cY={codeAt:L$(!1),charAt:L$(!0)},lY=cY.charAt,uY=Os,B$=um,fY=S$,U$=E$,z$="String Iterator",dY=B$.set,pY=B$.getterFor(z$);fY(String,"String",function(e){dY(this,{type:z$,string:uY(e),index:0})},function(){var t=pY(this),n=t.string,r=t.index,o;return r>=n.length?U$(void 0,!0):(o=lY(n,r),t.index+=o.length,U$(o,!1))});var hY=Cs,q$=Rh,mY=$h,yY=sa,vY=zt,gY=vY("iterator"),Mm=function(e){if(!mY(e))return q$(e,gY)||q$(e,"@@iterator")||yY[hY(e)]},bY=Mm,wY=bY,xY=wY,SY=xY,EY=SY,_Y=EY,$Y=_Y,kY=$Y,CY=kY;const H$=Ue(CY);var TY=vn,OY=ta,AY=TypeError,PY=Object.getOwnPropertyDescriptor,IY=TY&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),W$=IY?function(e,t){if(OY(e)&&!PY(e,"length").writable)throw new AY("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},RY=at,MY=Wr,NY=ei,DY=W$,jY=Kh,FY=Rt,LY=FY(function(){return[].push.call({length:4294967296},1)!==4294967297}),BY=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},UY=LY||!BY();RY({target:"Array",proto:!0,arity:1,forced:UY},{push:function(t){var n=MY(this),r=NY(n),o=arguments.length;jY(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return DY(n,r),r}});var zY=It,qY=Kt,ri=function(e,t){var n=qY[e+"Prototype"],r=n&&n[t];if(r)return r;var o=zY[e],i=o&&o.prototype;return i&&i[t]},HY=ri,WY=HY("Array","push"),VY=Hr,KY=WY,Nm=Array.prototype,GY=function(e){var t=e.push;return e===Nm||VY(Nm,e)&&t===Nm.push?KY:t},ZY=GY,YY=ZY,JY=YY,XY=JY,QY=XY,eJ=QY,tJ=eJ;const nJ=Ue(tJ);function rJ(e,t){var n=e==null?null:typeof ca<"u"&&H$(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(nJ(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var oJ=at,V$=ta,iJ=Jh,aJ=qr,K$=Qh,sJ=ei,cJ=wr,lJ=ks,uJ=zt,fJ=lu,dJ=yu,pJ=fJ("slice"),hJ=uJ("species"),Dm=Array,mJ=Math.max;oJ({target:"Array",proto:!0,forced:!pJ},{slice:function(t,n){var r=cJ(this),o=sJ(r),i=K$(t,o),a=K$(n===void 0?o:n,o),s,c,l;if(V$(r)&&(s=r.constructor,iJ(s)&&(s===Dm||V$(s.prototype))?s=void 0:aJ(s)&&(s=s[hJ],s===null&&(s=void 0)),s===Dm||s===void 0))return dJ(r,i,a);for(c=new(s===void 0?Dm:s)(mJ(a-i,0)),l=0;i<a;i++,l++)i in r&&lJ(c,l,r[i]);return c.length=l,c}});var yJ=ri,vJ=yJ("Array","slice"),gJ=Hr,bJ=vJ,jm=Array.prototype,wJ=function(e){var t=e.slice;return e===jm||gJ(jm,e)&&t===jm.slice?bJ:t},xJ=wJ,SJ=xJ,EJ=SJ,_J=EJ,$J=_J,kJ=$J,CJ=kJ;const TJ=Ue(CJ);var OJ=br,G$=_o,AJ=Rh,PJ=function(e,t,n){var r,o;G$(e);try{if(r=AJ(e,"return"),!r){if(t==="throw")throw n;return n}r=OJ(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return G$(r),n},IJ=_o,RJ=PJ,MJ=function(e,t,n,r){try{return r?t(IJ(n)[0],n[1]):t(n)}catch(o){RJ(e,"throw",o)}},NJ=zt,DJ=sa,jJ=NJ("iterator"),FJ=Array.prototype,LJ=function(e){return e!==void 0&&(DJ.Array===e||FJ[jJ]===e)},BJ=br,UJ=Ih,zJ=_o,qJ=ou,HJ=Mm,WJ=TypeError,VJ=function(e,t){var n=arguments.length<2?HJ(e):t;if(UJ(n))return zJ(BJ(n,e));throw new WJ(qJ(e)+" is not iterable")},KJ=zh,GJ=br,ZJ=Wr,YJ=MJ,JJ=LJ,XJ=Jh,QJ=ei,Z$=ks,eX=VJ,tX=Mm,Y$=Array,nX=function(t){var n=ZJ(t),r=XJ(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=KJ(i,o>2?arguments[2]:void 0));var s=tX(n),c=0,l,u,f,p,d,h;if(s&&!(this===Y$&&JJ(s)))for(u=r?new this:[],p=eX(n,s),d=p.next;!(f=GJ(d,p)).done;c++)h=a?YJ(p,i,[f.value,c],!0):f.value,Z$(u,c,h);else for(l=QJ(n),u=r?new this(l):Y$(l);l>c;c++)h=a?i(n[c],c):n[c],Z$(u,c,h);return u.length=c,u},rX=zt,J$=rX("iterator"),X$=!1;try{var oX=0,Q$={next:function(){return{done:!!oX++}},return:function(){X$=!0}};Q$[J$]=function(){return this},Array.from(Q$,function(){throw 2})}catch{}var iX=function(e,t){try{if(!t&&!X$)return!1}catch{return!1}var n=!1;try{var r={};r[J$]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},aX=at,sX=nX,cX=iX,lX=!cX(function(e){Array.from(e)});aX({target:"Array",stat:!0,forced:lX},{from:sX});var uX=Kt,fX=uX.Array.from,dX=fX,pX=dX,hX=pX,mX=hX,yX=mX,vX=yX,gX=vX;const ek=Ue(gX);function Fm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e,t){if(e){var n;if(typeof e=="string")return Fm(e,t);var r=TJ(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?ek(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fm(e,t):void 0}}function bX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
325
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Er(e,t){return
|
|
324
|
+
`)},L8=0,Gi=[];function B8(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(L8++)[0],i=C.useState(function(){return KS()})[0],a=C.useRef(e);C.useEffect(function(){a.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=c8([e.lockRef.current],(e.shards||[]).map(QS),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var y=Xl(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-y[0],k="deltaY"in m?m.deltaY:g[1]-y[1],S,$=m.target,O=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&O==="h"&&$.type==="range")return!1;var I=ZS(O,$);if(!I)return!0;if(I?S=O:(S=O==="v"?"h":"v",I=ZS(O,$)),!I)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var B=r.current||S;return D8(B,v,m,B==="h"?b:k,!0)},[]),c=C.useCallback(function(m){var v=m;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var y="deltaY"in v?XS(v):Xl(v),g=t.current.filter(function(S){return S.name===v.type&&S.target===v.target&&j8(S.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var b=(a.current.shards||[]).map(QS).filter(Boolean).filter(function(S){return S.contains(v.target)}),k=b.length>0?s(v,b[0]):!a.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),l=C.useCallback(function(m,v,y,g){var b={name:m,delta:v,target:y,should:g};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=C.useCallback(function(m){n.current=Xl(m),r.current=void 0},[]),f=C.useCallback(function(m){l(m.type,XS(m),m.target,s(m,e.lockRef.current))},[]),p=C.useCallback(function(m){l(m.type,Xl(m),m.target,s(m,e.lockRef.current))},[]);C.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",u,Ki),function(){Gi=Gi.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",u,Ki)}},[]);var d=e.removeScrollBar,h=e.inert;return C.createElement(C.Fragment,null,h?C.createElement(i,{styles:F8(o)}):null,d?C.createElement(O8,{gapMode:"margin"}):null)}const U8=v8(VS,B8);var eE=C.forwardRef(function(e,t){return C.createElement(Yl,gr({},e,{ref:t,sideCar:U8}))});eE.classNames=Yl.classNames;const z8=eE;var q8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,Ql=new WeakMap,eu={},ph=0,tE=function(e){return e&&(e.host||tE(e.parentNode))},H8=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},V8=function(e,t,n,r){var o=H8(t,Array.isArray(e)?e:[e]);eu[n]||(eu[n]=new WeakMap);var i=eu[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else{var d=p.getAttribute(r),h=d!==null&&d!=="false",m=(Zi.get(p)||0)+1,v=(i.get(p)||0)+1;Zi.set(p,m),i.set(p,v),a.push(p),m===1&&h&&Ql.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return u(t),s.clear(),ph++,function(){a.forEach(function(f){var p=Zi.get(f)-1,d=i.get(f)-1;Zi.set(f,p),i.set(f,d),p||(Ql.has(f)||f.removeAttribute(r),Ql.delete(f)),d||f.removeAttribute(n)}),ph--,ph||(Zi=new WeakMap,Zi=new WeakMap,Ql=new WeakMap,eu={})}},W8=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||q8(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),V8(r,o,n,"aria-hidden")):function(){return null}};const nE="Dialog",[rE,Sle]=Rf(nE),[K8,zr]=rE(nE),G8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l=!1,u]=RS({prop:r,defaultProp:o,onChange:i});return E.createElement(K8,{scope:t,triggerRef:s,contentRef:c,contentId:Vl(),titleId:Vl(),descriptionId:Vl(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a},n)},Z8="DialogTrigger",Y8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(Z8,n),i=Mo(t,o.triggerRef);return E.createElement(In.button,Tt({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mh(o.open)},r,{ref:i,onClick:Ur(e.onClick,o.onOpenToggle)}))}),J8="DialogPortal",[Ele,oE]=rE(J8,{forceMount:void 0}),hh="DialogOverlay",X8=E.forwardRef((e,t)=>{const n=oE(hh,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(hh,e.__scopeDialog);return i.modal?E.createElement(Wl,{present:r||i.open},E.createElement(Q8,Tt({},o,{ref:t}))):null}),Q8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(hh,n);return E.createElement(z8,{as:Mf,allowPinchZoom:!0,shards:[o.contentRef]},E.createElement(In.div,Tt({"data-state":mh(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),gs="DialogContent",ez=E.forwardRef((e,t)=>{const n=oE(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=zr(gs,e.__scopeDialog);return E.createElement(Wl,{present:r||i.open},i.modal?E.createElement(tz,Tt({},o,{ref:t})):E.createElement(nz,Tt({},o,{ref:t})))}),tz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(null),o=Mo(t,n.contentRef,r);return E.useEffect(()=>{const i=r.current;if(i)return W8(i)},[]),E.createElement(iE,Tt({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ur(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ur(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ur(e.onFocusOutside,i=>i.preventDefault())}))}),nz=E.forwardRef((e,t)=>{const n=zr(gs,e.__scopeDialog),r=E.useRef(!1),o=E.useRef(!1);return E.createElement(iE,Tt({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),iE=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=zr(gs,n),c=E.useRef(null),l=Mo(t,c);return s8(),E.createElement(E.Fragment,null,E.createElement(X9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},E.createElement(Z9,Tt({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mh(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),rz="DialogTitle",oz=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(rz,n);return E.createElement(In.h2,Tt({id:o.titleId},r,{ref:t}))}),iz="DialogClose",az=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=zr(iz,n);return E.createElement(In.button,Tt({type:"button"},r,{ref:t,onClick:Ur(e.onClick,()=>o.onOpenChange(!1))}))});function mh(e){return e?"open":"closed"}const sz=G8,cz=Y8,lz=X8,uz=ez,fz=oz,aE=az;function dz({title:e,titleId:t,...n},r){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?C.createElement("title",{id:t},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const sE=C.forwardRef(dz);function Eo({open:e,onOpenChange:t,children:n}){return L.jsx(sz,{open:e,onOpenChange:t,children:n})}function pz({title:e,children:t}){var r,o,i,a,s,c,l,u;const{modal:n}=ct;return L.jsxs(L.Fragment,{children:[L.jsx(lz,{...n==null?void 0:n.overlay}),L.jsx("div",{...n==null?void 0:n.container,children:L.jsxs(uz,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[L.jsxs("div",{...(i=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[L.jsx(fz,{...(s=(a=n==null?void 0:n.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),L.jsx(aE,{children:L.jsx(sE,{role:"button",tabIndex:0,...(l=(c=n==null?void 0:n.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),L.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Eo.Button=cz,Eo.Close=aE,Eo.Content=pz;const cE=E.forwardRef(({children:e,...t},n)=>{const{container:r}=ct;return L.jsxs("div",{...t,...r,ref:n,children:[L.jsx(n6,{}),L.jsxs(IS,{children:[L.jsx(hz,{}),e]})]})}),hz=()=>{const{modal:e}=ct,t=Ne(r=>r.connected),{showModal:n}=x1();return E.useEffect(()=>{var r,o,i,a;t||n({title:"Connection Error",content:L.jsxs(L.Fragment,{children:[L.jsx("p",{...(o=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),L.jsx(Eo.Close,{asChild:!0,children:L.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),L.jsx(L.Fragment,{})},mz=E.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:o}=ct,{container:i,icon:a}=o??{};return L.jsx("div",{...n,...i,ref:r,onClick:t,children:L.jsx("div",{...a})})}),lE="Collapsible",[yz,$le]=Rf(lE),[vz,yh]=yz(lE),gz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=RS({prop:r,defaultProp:o,onChange:a});return E.createElement(vz,{scope:n,disabled:i,contentId:Vl(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l])},E.createElement(In.div,Tt({"data-state":vh(c),"data-disabled":i?"":void 0},s,{ref:t})))}),bz="CollapsibleTrigger",wz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=yh(bz,n);return E.createElement(In.button,Tt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vh(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ur(e.onClick,o.onOpenToggle)}))}),uE="CollapsibleContent",xz=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yh(uE,e.__scopeCollapsible);return E.createElement(Wl,{present:n||o.open},({present:i})=>E.createElement(Sz,Tt({},r,{ref:t,present:i})))}),Sz=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=yh(uE,n),[s,c]=E.useState(r),l=E.useRef(null),u=Mo(t,l),f=E.useRef(0),p=f.current,d=E.useRef(0),h=d.current,m=a.open||s,v=E.useRef(m),y=E.useRef();return E.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),Pa(()=>{const g=l.current;if(g){y.current=y.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,d.current=b.width,v.current||(g.style.transitionDuration=y.current.transitionDuration,g.style.animationName=y.current.animationName),c(r)}},[a.open,r]),E.createElement(In.div,Tt({"data-state":vh(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),m&&o)});function vh(e){return e?"open":"closed"}const Ez=gz,_z=xz,$z=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),fE=({...e})=>{var a,s;const{header:t,modal:n}=ct,r=Ne(c=>c.restartConversation),{showModal:o}=x1(),i=c=>{var l,u,f,p;c.stopPropagation(),o({title:"Restart Conversation",content:L.jsxs(L.Fragment,{children:[L.jsx("p",{...(u=(l=n==null?void 0:n.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),L.jsx(Eo.Close,{asChild:!0,children:L.jsx("button",{type:"button",...(p=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:r,children:"Restart"})})]})})};return L.jsx(B6,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},kz=({...e})=>{const{header:t}=ct,n=Ne(o=>o.closeWindow),r=o=>{o.stopPropagation(),n==null||n()};return L.jsx(sE,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},bs=({icon:e,title:t,link:n,...r})=>{var a,s,c,l,u,f,p,d,h,m,v,y;const{header:o}=ct,i=e??$z;return t?n?L.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[L.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),L.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):L.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[L.jsx(i,{...(m=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),L.jsx("p",{...(y=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:y.text,children:t})]}):null},dE=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var p,d,h,m,v,y,g,b,k,S,$,O,I,B,T,M,R,j,U,D,F,K;const{header:o}=ct,i=Ne(V=>V.configuration),a=Ne(V=>V.closeWindow),s=Ne(V=>V.getClientId)(),c=Ne(V=>!V.disableRestartConversation),[l,u]=E.useState(!!e),f=!!((p=i.email)!=null&&p.title)||!!((d=i.phone)!=null&&d.title)||!!((h=i.website)!=null&&h.title)||!!((m=i.termsOfService)!=null&&m.link)||!!((v=i.privacyPolicy)!=null&&v.link);return L.jsxs(Ez,{open:f?l:!1,onOpenChange:u,"data-disabled":f?void 0:"",...o.container,...r,children:[L.jsxs(wz,{...o.content.container,children:[L.jsx(Lf,{...r,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),L.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&L.jsx("p",{...o.content.description,children:i.botDescription}),L.jsxs("div",{...o.content.actions.container,children:[c&&L.jsx(fE,{}),a&&L.jsx(kz,{})]})]}),L.jsxs(_z,{...o.expandedContent.container,children:[L.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[L.jsx(bs,{"data-email":"",icon:M7,title:(y=i.email)==null?void 0:y.title,link:(b=(g=i.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=i.email)==null?void 0:k.link:`mailto:${(S=i.email)==null?void 0:S.link}`}),L.jsx(bs,{"data-phone":"",icon:B7,title:($=i.phone)==null?void 0:$.title,link:(I=(O=i.phone)==null?void 0:O.link)!=null&&I.startsWith("tel:")?(B=i.phone)==null?void 0:B.link:`tel:${(T=i.phone)==null?void 0:T.link}`}),L.jsx(bs,{"data-website":"",link:(M=i.website)==null?void 0:M.link,icon:D7,title:(R=i.website)==null?void 0:R.title})]}),L.jsxs("div",{"data-legal":"",...(j=o.expandedContent)==null?void 0:j.group,children:[L.jsx(bs,{"data-terms":"",link:(U=i.termsOfService)==null?void 0:U.link,icon:I7,title:(D=i.termsOfService)==null?void 0:D.title}),L.jsx(bs,{"data-privacy":"",link:(F=i.privacyPolicy)==null?void 0:F.link,icon:F7,title:(K=i.privacyPolicy)==null?void 0:K.title})]})]})]})},pE=E.memo(({...e})=>{const{typingIndicator:t}=ct;return L.jsx("div",{...e,...t==null?void 0:t.container,children:L.jsx("div",{...t==null?void 0:t.loader})})}),gh=E.memo(E.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:o,sender:i,...a},s)=>{var m,v,y,g;const[c,l]=E.useState([]),{message:u}=ct,{botAvatar:f,botName:p}=Ne(b=>b.configuration),d=Ne(b=>b.getClientId)(),h=Ag(d??"",15);return L.jsx(b1.Provider,{value:{isLoading:c,setIsLoading:l},children:L.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!r,"data-direction":e,ref:s,children:[L.jsxs(bg,{"data-color":h,...(m=u==null?void 0:u.avatar)==null?void 0:m.container,children:[L.jsx(wg,{...(v=u==null?void 0:u.avatar)==null?void 0:v.image,src:(i==null?void 0:i.avatar)??f}),L.jsx(xg,{...(y=u==null?void 0:u.avatar)==null?void 0:y.fallback,children:(i==null?void 0:i.name[0])??((g=p??"Bot")==null?void 0:g[0])})]}),t&&L.jsx(Wi,{block:t}),o]})})}));function Cz(){const e=Ne(r=>r.getClientId)(),t=Ne(r=>r.configuration),{messageList:{marquee:n}}=ct;return L.jsxs("li",{...n.container,children:[L.jsx(Lf,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),L.jsxs("div",{...n.content,children:[L.jsx("h1",{...n.title,children:t.botName||"Bot"}),L.jsx("p",{...n.description,children:t.botDescription})]})]})}function Tz(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function Oz(){Tz("react-scroll-to-bottom:version","4.2.0")}var ws=function(e){return e&&e.Math===Math&&e},It=ws(typeof globalThis=="object"&&globalThis)||ws(typeof window=="object"&&window)||ws(typeof self=="object"&&self)||ws(typeof Se=="object"&&Se)||ws(typeof Se=="object"&&Se)||function(){return this}()||Function("return this")(),Rt=function(e){try{return!!e()}catch{return!0}},Az=Rt,tu=!Az(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Pz=tu,hE=Function.prototype,mE=hE.apply,yE=hE.call,bh=typeof Reflect=="object"&&Reflect.apply||(Pz?yE.bind(mE):function(){return yE.apply(mE,arguments)}),vE=tu,gE=Function.prototype,wh=gE.call,Iz=vE&&gE.bind.bind(wh,wh),Mt=vE?Iz:function(e){return function(){return wh.apply(e,arguments)}},bE=Mt,Rz=bE({}.toString),Mz=bE("".slice),Qo=function(e){return Mz(Rz(e),8,-1)},Nz=Qo,Dz=Mt,xh=function(e){if(Nz(e)==="Function")return Dz(e)},Sh=typeof document=="object"&&document.all,rn=typeof Sh>"u"&&Sh!==void 0?function(e){return typeof e=="function"||e===Sh}:function(e){return typeof e=="function"},xs={},jz=Rt,vn=!jz(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Fz=tu,nu=Function.prototype.call,br=Fz?nu.bind(nu):function(){return nu.apply(nu,arguments)},Eh={},wE={}.propertyIsEnumerable,xE=Object.getOwnPropertyDescriptor,Lz=xE&&!wE.call({1:2},1);Eh.f=Lz?function(t){var n=xE(this,t);return!!n&&n.enumerable}:wE;var Ss=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Bz=Mt,Uz=Rt,zz=Qo,_h=Object,qz=Bz("".split),SE=Uz(function(){return!_h("z").propertyIsEnumerable(0)})?function(e){return zz(e)==="String"?qz(e,""):_h(e)}:_h,$h=function(e){return e==null},Hz=$h,Vz=TypeError,kh=function(e){if(Hz(e))throw new Vz("Can't call method on "+e);return e},Wz=SE,Kz=kh,wr=function(e){return Wz(Kz(e))},Gz=rn,qr=function(e){return typeof e=="object"?e!==null:Gz(e)},Kt={},Ch=Kt,Th=It,Zz=rn,EE=function(e){return Zz(e)?e:void 0},xr=function(e,t){return arguments.length<2?EE(Ch[e])||EE(Th[e]):Ch[e]&&Ch[e][t]||Th[e]&&Th[e][t]},Yz=Mt,Hr=Yz({}.isPrototypeOf),Jz=It,_E=Jz.navigator,$E=_E&&_E.userAgent,Oh=$E?String($E):"",kE=It,Ah=Oh,CE=kE.process,TE=kE.Deno,OE=CE&&CE.versions||TE&&TE.version,AE=OE&&OE.v8,Zn,ru;AE&&(Zn=AE.split("."),ru=Zn[0]>0&&Zn[0]<4?1:+(Zn[0]+Zn[1])),!ru&&Ah&&(Zn=Ah.match(/Edge\/(\d+)/),(!Zn||Zn[1]>=74)&&(Zn=Ah.match(/Chrome\/(\d+)/),Zn&&(ru=+Zn[1])));var Ph=ru,PE=Ph,Xz=Rt,Qz=It,eq=Qz.String,Yi=!!Object.getOwnPropertySymbols&&!Xz(function(){var e=Symbol("symbol detection");return!eq(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&PE&&PE<41}),tq=Yi,IE=tq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",nq=xr,rq=rn,oq=Hr,iq=IE,aq=Object,Es=iq?function(e){return typeof e=="symbol"}:function(e){var t=nq("Symbol");return rq(t)&&oq(t.prototype,aq(e))},sq=String,ou=function(e){try{return sq(e)}catch{return"Object"}},cq=rn,lq=ou,uq=TypeError,Ih=function(e){if(cq(e))return e;throw new uq(lq(e)+" is not a function")},fq=Ih,dq=$h,Rh=function(e,t){var n=e[t];return dq(n)?void 0:fq(n)},Mh=br,Nh=rn,Dh=qr,pq=TypeError,hq=function(e,t){var n,r;if(t==="string"&&Nh(n=e.toString)&&!Dh(r=Mh(n,e))||Nh(n=e.valueOf)&&!Dh(r=Mh(n,e))||t!=="string"&&Nh(n=e.toString)&&!Dh(r=Mh(n,e)))return r;throw new pq("Can't convert object to primitive value")},RE={exports:{}},ME=It,mq=Object.defineProperty,yq=function(e,t){try{mq(ME,e,{value:t,configurable:!0,writable:!0})}catch{ME[e]=t}return t},vq=It,gq=yq,NE="__core-js_shared__",DE=RE.exports=vq[NE]||gq(NE,{});(DE.versions||(DE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var jh=RE.exports,jE=jh,Ji=function(e,t){return jE[e]||(jE[e]=t||{})},bq=kh,wq=Object,Vr=function(e){return wq(bq(e))},xq=Mt,Sq=Vr,Eq=xq({}.hasOwnProperty),Tn=Object.hasOwn||function(t,n){return Eq(Sq(t),n)},_q=Mt,$q=0,kq=Math.random(),Cq=_q(1 .toString),Fh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Cq(++$q+kq,36)},Tq=It,Oq=Ji,FE=Tn,Aq=Fh,Pq=Yi,Iq=IE,Xi=Tq.Symbol,Lh=Oq("wks"),Rq=Iq?Xi.for||Xi:Xi&&Xi.withoutSetter||Aq,zt=function(e){return FE(Lh,e)||(Lh[e]=Pq&&FE(Xi,e)?Xi[e]:Rq("Symbol."+e)),Lh[e]},Mq=br,LE=qr,BE=Es,Nq=Rh,Dq=hq,jq=zt,Fq=TypeError,Lq=jq("toPrimitive"),Bq=function(e,t){if(!LE(e)||BE(e))return e;var n=Nq(e,Lq),r;if(n){if(t===void 0&&(t="default"),r=Mq(n,e,t),!LE(r)||BE(r))return r;throw new Fq("Can't convert object to primitive value")}return t===void 0&&(t="number"),Dq(e,t)},Uq=Bq,zq=Es,Bh=function(e){var t=Uq(e,"string");return zq(t)?t:t+""},qq=It,UE=qr,Uh=qq.document,Hq=UE(Uh)&&UE(Uh.createElement),zE=function(e){return Hq?Uh.createElement(e):{}},Vq=vn,Wq=Rt,Kq=zE,qE=!Vq&&!Wq(function(){return Object.defineProperty(Kq("div"),"a",{get:function(){return 7}}).a!==7}),Gq=vn,Zq=br,Yq=Eh,Jq=Ss,Xq=wr,Qq=Bh,eH=Tn,tH=qE,HE=Object.getOwnPropertyDescriptor;xs.f=Gq?HE:function(t,n){if(t=Xq(t),n=Qq(n),tH)try{return HE(t,n)}catch{}if(eH(t,n))return Jq(!Zq(Yq.f,t,n),t[n])};var nH=Rt,rH=rn,oH=/#|\.prototype\./,_s=function(e,t){var n=aH[iH(e)];return n===cH?!0:n===sH?!1:rH(t)?nH(t):!!t},iH=_s.normalize=function(e){return String(e).replace(oH,".").toLowerCase()},aH=_s.data={},sH=_s.NATIVE="N",cH=_s.POLYFILL="P",lH=_s,VE=xh,uH=Ih,fH=tu,dH=VE(VE.bind),zh=function(e,t){return uH(e),t===void 0?e:fH?dH(e,t):function(){return e.apply(t,arguments)}},Yn={},pH=vn,hH=Rt,WE=pH&&hH(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),mH=qr,yH=String,vH=TypeError,_o=function(e){if(mH(e))return e;throw new vH(yH(e)+" is not an object")},gH=vn,bH=qE,wH=WE,iu=_o,KE=Bh,xH=TypeError,qh=Object.defineProperty,SH=Object.getOwnPropertyDescriptor,Hh="enumerable",Vh="configurable",Wh="writable";Yn.f=gH?wH?function(t,n,r){if(iu(t),n=KE(n),iu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Wh in r&&!r[Wh]){var o=SH(t,n);o&&o[Wh]&&(t[n]=r.value,r={configurable:Vh in r?r[Vh]:o[Vh],enumerable:Hh in r?r[Hh]:o[Hh],writable:!1})}return qh(t,n,r)}:qh:function(t,n,r){if(iu(t),n=KE(n),iu(r),bH)try{return qh(t,n,r)}catch{}if("get"in r||"set"in r)throw new xH("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var EH=vn,_H=Yn,$H=Ss,au=EH?function(e,t,n){return _H.f(e,t,$H(1,n))}:function(e,t,n){return e[t]=n,e},$s=It,kH=bh,CH=xh,TH=rn,OH=xs.f,AH=lH,Qi=Kt,PH=zh,ea=au,GE=Tn,IH=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return kH(e,this,arguments)};return t.prototype=e.prototype,t},at=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?$s:o?$s[n]:$s[n]&&$s[n].prototype,s=r?Qi:Qi[n]||ea(Qi,n,{})[n],c=s.prototype,l,u,f,p,d,h,m,v,y;for(p in t)l=AH(r?p:n+(o?".":"#")+p,e.forced),u=!l&&a&&GE(a,p),h=s[p],u&&(e.dontCallGetSet?(y=OH(a,p),m=y&&y.value):m=a[p]),d=u&&m?m:t[p],!(!l&&!i&&typeof h==typeof d)&&(e.bind&&u?v=PH(d,$s):e.wrap&&u?v=IH(d):i&&TH(d)?v=CH(d):v=d,(e.sham||d&&d.sham||h&&h.sham)&&ea(v,"sham",!0),ea(s,p,v),i&&(f=n+"Prototype",GE(Qi,f)||ea(Qi,f,{}),ea(Qi[f],p,d),e.real&&c&&(l||!c[p])&&ea(c,p,d)))},RH=Qo,ta=Array.isArray||function(t){return RH(t)==="Array"},MH=at,NH=ta;MH({target:"Array",stat:!0},{isArray:NH});var DH=Kt,jH=DH.Array.isArray,FH=jH,ZE=FH,LH=ZE,BH=LH,UH=BH,zH=UH,qH=zH;const YE=Ue(qH);function HH(e){if(YE(e))return e}var VH=Math.ceil,WH=Math.floor,KH=Math.trunc||function(t){var n=+t;return(n>0?WH:VH)(n)},GH=KH,su=function(e){var t=+e;return t!==t||t===0?0:GH(t)},ZH=su,YH=Math.min,JH=function(e){var t=ZH(e);return t>0?YH(t,9007199254740991):0},XH=JH,ei=function(e){return XH(e.length)},QH=TypeError,eV=9007199254740991,Kh=function(e){if(e>eV)throw QH("Maximum allowed index exceeded");return e},tV=vn,nV=Yn,rV=Ss,ks=function(e,t,n){tV?nV.f(e,t,rV(0,n)):e[t]=n},oV=zt,iV=oV("toStringTag"),JE={};JE[iV]="z";var Gh=String(JE)==="[object z]",aV=Gh,sV=rn,cu=Qo,cV=zt,lV=cV("toStringTag"),uV=Object,fV=cu(function(){return arguments}())==="Arguments",dV=function(e,t){try{return e[t]}catch{}},Cs=aV?cu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=dV(t=uV(e),lV))=="string"?n:fV?cu(t):(r=cu(t))==="Object"&&sV(t.callee)?"Arguments":r},pV=Mt,hV=rn,Zh=jh,mV=pV(Function.toString);hV(Zh.inspectSource)||(Zh.inspectSource=function(e){return mV(e)});var yV=Zh.inspectSource,vV=Mt,gV=Rt,XE=rn,bV=Cs,wV=xr,xV=yV,QE=function(){},e_=wV("Reflect","construct"),Yh=/^\s*(?:class|function)\b/,SV=vV(Yh.exec),EV=!Yh.test(QE),Ts=function(t){if(!XE(t))return!1;try{return e_(QE,[],t),!0}catch{return!1}},t_=function(t){if(!XE(t))return!1;switch(bV(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return EV||!!SV(Yh,xV(t))}catch{return!0}};t_.sham=!0;var Jh=!e_||gV(function(){var e;return Ts(Ts.call)||!Ts(Object)||!Ts(function(){e=!0})||e})?t_:Ts,n_=ta,_V=Jh,$V=qr,kV=zt,CV=kV("species"),r_=Array,TV=function(e){var t;return n_(e)&&(t=e.constructor,_V(t)&&(t===r_||n_(t.prototype))?t=void 0:$V(t)&&(t=t[CV],t===null&&(t=void 0))),t===void 0?r_:t},OV=TV,Xh=function(e,t){return new(OV(e))(t===0?0:t)},AV=Rt,PV=zt,IV=Ph,RV=PV("species"),lu=function(e){return IV>=51||!AV(function(){var t=[],n=t.constructor={};return n[RV]=function(){return{foo:1}},t[e](Boolean).foo!==1})},MV=at,NV=Rt,DV=ta,jV=qr,FV=Vr,LV=ei,o_=Kh,i_=ks,BV=Xh,UV=lu,zV=zt,qV=Ph,a_=zV("isConcatSpreadable"),HV=qV>=51||!NV(function(){var e=[];return e[a_]=!1,e.concat()[0]!==e}),VV=function(e){if(!jV(e))return!1;var t=e[a_];return t!==void 0?!!t:DV(e)},WV=!HV||!UV("concat");MV({target:"Array",proto:!0,arity:1,forced:WV},{concat:function(t){var n=FV(this),r=BV(n,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?n:arguments[i],VV(l))for(c=LV(l),o_(o+c),a=0;a<c;a++,o++)a in l&&i_(r,o,l[a]);else o_(o+1),i_(r,o++,l);return r.length=o,r}});var KV=Cs,GV=String,Os=function(e){if(KV(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return GV(e)},uu={},ZV=su,YV=Math.max,JV=Math.min,Qh=function(e,t){var n=ZV(e);return n<0?YV(n+t,0):JV(n,t)},XV=wr,QV=Qh,eW=ei,s_=function(e){return function(t,n,r){var o=XV(t),i=eW(o);if(i===0)return!e&&-1;var a=QV(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},c_={includes:s_(!0),indexOf:s_(!1)},fu={},tW=Mt,em=Tn,nW=wr,rW=c_.indexOf,oW=fu,l_=tW([].push),u_=function(e,t){var n=nW(e),r=0,o=[],i;for(i in n)!em(oW,i)&&em(n,i)&&l_(o,i);for(;t.length>r;)em(n,i=t[r++])&&(~rW(o,i)||l_(o,i));return o},tm=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iW=u_,aW=tm,nm=Object.keys||function(t){return iW(t,aW)},sW=vn,cW=WE,lW=Yn,uW=_o,fW=wr,dW=nm;uu.f=sW&&!cW?Object.defineProperties:function(t,n){uW(t);for(var r=fW(n),o=dW(n),i=o.length,a=0,s;i>a;)lW.f(t,s=o[a++],r[s]);return t};var pW=xr,hW=pW("document","documentElement"),mW=Ji,yW=Fh,f_=mW("keys"),du=function(e){return f_[e]||(f_[e]=yW(e))},vW=_o,gW=uu,d_=tm,bW=fu,wW=hW,xW=zE,SW=du,p_=">",h_="<",rm="prototype",om="script",m_=SW("IE_PROTO"),im=function(){},y_=function(e){return h_+om+p_+e+h_+"/"+om+p_},v_=function(e){e.write(y_("")),e.close();var t=e.parentWindow.Object;return e=null,t},EW=function(){var e=xW("iframe"),t="java"+om+":",n;return e.style.display="none",wW.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(y_("document.F=Object")),n.close(),n.F},pu,hu=function(){try{pu=new ActiveXObject("htmlfile")}catch{}hu=typeof document<"u"?document.domain&&pu?v_(pu):EW():v_(pu);for(var e=d_.length;e--;)delete hu[rm][d_[e]];return hu()};bW[m_]=!0;var am=Object.create||function(t,n){var r;return t!==null?(im[rm]=vW(t),r=new im,im[rm]=null,r[m_]=t):r=hu(),n===void 0?r:gW.f(r,n)},mu={},_W=u_,$W=tm,kW=$W.concat("length","prototype");mu.f=Object.getOwnPropertyNames||function(t){return _W(t,kW)};var g_={},CW=Mt,yu=CW([].slice),TW=Qo,OW=wr,b_=mu.f,AW=yu,w_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],PW=function(e){try{return b_(e)}catch{return AW(w_)}};g_.f=function(t){return w_&&TW(t)==="Window"?PW(t):b_(OW(t))};var vu={};vu.f=Object.getOwnPropertySymbols;var IW=au,gu=function(e,t,n,r){return r&&r.enumerable?e[t]=n:IW(e,t,n),e},RW=Yn,MW=function(e,t,n){return RW.f(e,t,n)},As={},NW=zt;As.f=NW;var x_=Kt,DW=Tn,jW=As,FW=Yn.f,gt=function(e){var t=x_.Symbol||(x_.Symbol={});DW(t,e)||FW(t,e,{value:jW.f(e)})},LW=br,BW=xr,UW=zt,zW=gu,S_=function(){var e=BW("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=UW("toPrimitive");t&&!t[r]&&zW(t,r,function(o){return LW(n,this)},{arity:1})},qW=Gh,HW=Cs,VW=qW?{}.toString:function(){return"[object "+HW(this)+"]"},WW=Gh,KW=Yn.f,GW=au,ZW=Tn,YW=VW,JW=zt,E_=JW("toStringTag"),na=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(ZW(o,E_)||KW(o,E_,{configurable:!0,value:t}),r&&!WW&&GW(o,"toString",YW))},XW=It,QW=rn,__=XW.WeakMap,eK=QW(__)&&/native code/.test(String(__)),tK=eK,$_=It,nK=qr,rK=au,sm=Tn,cm=jh,oK=du,iK=fu,k_="Object already initialized",lm=$_.TypeError,aK=$_.WeakMap,bu,Ps,wu,sK=function(e){return wu(e)?Ps(e):bu(e,{})},cK=function(e){return function(t){var n;if(!nK(t)||(n=Ps(t)).type!==e)throw new lm("Incompatible receiver, "+e+" required");return n}};if(tK||cm.state){var Sr=cm.state||(cm.state=new aK);Sr.get=Sr.get,Sr.has=Sr.has,Sr.set=Sr.set,bu=function(e,t){if(Sr.has(e))throw new lm(k_);return t.facade=e,Sr.set(e,t),t},Ps=function(e){return Sr.get(e)||{}},wu=function(e){return Sr.has(e)}}else{var ra=oK("state");iK[ra]=!0,bu=function(e,t){if(sm(e,ra))throw new lm(k_);return t.facade=e,rK(e,ra,t),t},Ps=function(e){return sm(e,ra)?e[ra]:{}},wu=function(e){return sm(e,ra)}}var um={set:bu,get:Ps,has:wu,enforce:sK,getterFor:cK},lK=zh,uK=Mt,fK=SE,dK=Vr,pK=ei,hK=Xh,C_=uK([].push),$o=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,f){for(var p=dK(c),d=fK(p),h=pK(d),m=lK(l,u),v=0,y=f||hK,g=t?y(c,h):n||a?y(c,0):void 0,b,k;h>v;v++)if((s||v in d)&&(b=d[v],k=m(b,v,p),e))if(t)g[v]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return v;case 2:C_(g,b)}else switch(e){case 4:return!1;case 7:C_(g,b)}return i?-1:r||o?o:g}},fm={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},xu=at,Is=It,dm=br,mK=Mt,oa=vn,ia=Yi,yK=Rt,qt=Tn,vK=Hr,pm=_o,Su=wr,hm=Bh,gK=Os,mm=Ss,aa=am,T_=nm,bK=mu,O_=g_,wK=vu,A_=xs,P_=Yn,xK=uu,I_=Eh,R_=gu,SK=MW,ym=Ji,EK=du,M_=fu,N_=Fh,_K=zt,$K=As,kK=gt,CK=S_,TK=na,D_=um,Eu=fm.forEach,gn=EK("hidden"),_u="Symbol",Rs="prototype",OK=D_.set,j_=D_.getterFor(_u),Jn=Object[Rs],ti=Is.Symbol,Ms=ti&&ti[Rs],AK=Is.RangeError,PK=Is.TypeError,vm=Is.QObject,F_=A_.f,ni=P_.f,L_=O_.f,IK=I_.f,B_=mK([].push),Wr=ym("symbols"),Ns=ym("op-symbols"),RK=ym("wks"),gm=!vm||!vm[Rs]||!vm[Rs].findChild,U_=function(e,t,n){var r=F_(Jn,t);r&&delete Jn[t],ni(e,t,n),r&&e!==Jn&&ni(Jn,t,r)},bm=oa&&yK(function(){return aa(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a!==7})?U_:ni,wm=function(e,t){var n=Wr[e]=aa(Ms);return OK(n,{type:_u,tag:e,description:t}),oa||(n.description=t),n},$u=function(t,n,r){t===Jn&&$u(Ns,n,r),pm(t);var o=hm(n);return pm(r),qt(Wr,o)?(r.enumerable?(qt(t,gn)&&t[gn][o]&&(t[gn][o]=!1),r=aa(r,{enumerable:mm(0,!1)})):(qt(t,gn)||ni(t,gn,mm(1,aa(null))),t[gn][o]=!0),bm(t,o,r)):ni(t,o,r)},xm=function(t,n){pm(t);var r=Su(n),o=T_(r).concat(V_(r));return Eu(o,function(i){(!oa||dm(z_,r,i))&&$u(t,i,r[i])}),t},MK=function(t,n){return n===void 0?aa(t):xm(aa(t),n)},z_=function(t){var n=hm(t),r=dm(IK,this,n);return this===Jn&&qt(Wr,n)&&!qt(Ns,n)?!1:r||!qt(this,n)||!qt(Wr,n)||qt(this,gn)&&this[gn][n]?r:!0},q_=function(t,n){var r=Su(t),o=hm(n);if(!(r===Jn&&qt(Wr,o)&&!qt(Ns,o))){var i=F_(r,o);return i&&qt(Wr,o)&&!(qt(r,gn)&&r[gn][o])&&(i.enumerable=!0),i}},H_=function(t){var n=L_(Su(t)),r=[];return Eu(n,function(o){!qt(Wr,o)&&!qt(M_,o)&&B_(r,o)}),r},V_=function(e){var t=e===Jn,n=L_(t?Ns:Su(e)),r=[];return Eu(n,function(o){qt(Wr,o)&&(!t||qt(Jn,o))&&B_(r,Wr[o])}),r};ia||(ti=function(){if(vK(Ms,this))throw new PK("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:gK(arguments[0]),n=N_(t),r=function(o){var i=this===void 0?Is:this;i===Jn&&dm(r,Ns,o),qt(i,gn)&&qt(i[gn],n)&&(i[gn][n]=!1);var a=mm(1,o);try{bm(i,n,a)}catch(s){if(!(s instanceof AK))throw s;U_(i,n,a)}};return oa&&gm&&bm(Jn,n,{configurable:!0,set:r}),wm(n,t)},Ms=ti[Rs],R_(Ms,"toString",function(){return j_(this).tag}),R_(ti,"withoutSetter",function(e){return wm(N_(e),e)}),I_.f=z_,P_.f=$u,xK.f=xm,A_.f=q_,bK.f=O_.f=H_,wK.f=V_,$K.f=function(e){return wm(_K(e),e)},oa&&SK(Ms,"description",{configurable:!0,get:function(){return j_(this).description}})),xu({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:ti}),Eu(T_(RK),function(e){kK(e)}),xu({target:_u,stat:!0,forced:!ia},{useSetter:function(){gm=!0},useSimple:function(){gm=!1}}),xu({target:"Object",stat:!0,forced:!ia,sham:!oa},{create:MK,defineProperty:$u,defineProperties:xm,getOwnPropertyDescriptor:q_}),xu({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:H_}),CK(),TK(ti,_u),M_[gn]=!0;var NK=Yi,W_=NK&&!!Symbol.for&&!!Symbol.keyFor,DK=at,jK=xr,FK=Tn,LK=Os,K_=Ji,BK=W_,Sm=K_("string-to-symbol-registry"),UK=K_("symbol-to-string-registry");DK({target:"Symbol",stat:!0,forced:!BK},{for:function(e){var t=LK(e);if(FK(Sm,t))return Sm[t];var n=jK("Symbol")(t);return Sm[t]=n,UK[n]=t,n}});var zK=at,qK=Tn,HK=Es,VK=ou,WK=Ji,KK=W_,G_=WK("symbol-to-string-registry");zK({target:"Symbol",stat:!0,forced:!KK},{keyFor:function(t){if(!HK(t))throw new TypeError(VK(t)+" is not a symbol");if(qK(G_,t))return G_[t]}});var GK=Mt,Z_=ta,ZK=rn,Y_=Qo,YK=Os,J_=GK([].push),JK=function(e){if(ZK(e))return e;if(Z_(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?J_(n,o):(typeof o=="number"||Y_(o)==="Number"||Y_(o)==="String")&&J_(n,YK(o))}var i=n.length,a=!0;return function(s,c){if(a)return a=!1,c;if(Z_(this))return c;for(var l=0;l<i;l++)if(n[l]===s)return c}}},XK=at,X_=xr,Q_=bh,QK=br,Ds=Mt,e$=Rt,t$=rn,n$=Es,r$=yu,eG=JK,tG=Yi,nG=String,ko=X_("JSON","stringify"),ku=Ds(/./.exec),o$=Ds("".charAt),rG=Ds("".charCodeAt),oG=Ds("".replace),iG=Ds(1 .toString),aG=/[\uD800-\uDFFF]/g,i$=/^[\uD800-\uDBFF]$/,a$=/^[\uDC00-\uDFFF]$/,s$=!tG||e$(function(){var e=X_("Symbol")("stringify detection");return ko([e])!=="[null]"||ko({a:e})!=="{}"||ko(Object(e))!=="{}"}),c$=e$(function(){return ko("\uDF06\uD834")!=='"\\udf06\\ud834"'||ko("\uDEAD")!=='"\\udead"'}),sG=function(e,t){var n=r$(arguments),r=eG(t);if(!(!t$(r)&&(e===void 0||n$(e))))return n[1]=function(o,i){if(t$(r)&&(i=QK(r,this,nG(o),i)),!n$(i))return i},Q_(ko,null,n)},cG=function(e,t,n){var r=o$(n,t-1),o=o$(n,t+1);return ku(i$,e)&&!ku(a$,o)||ku(a$,e)&&!ku(i$,r)?"\\u"+iG(rG(e,0),16):e};ko&&XK({target:"JSON",stat:!0,arity:3,forced:s$||c$},{stringify:function(t,n,r){var o=r$(arguments),i=Q_(s$?sG:ko,null,o);return c$&&typeof i=="string"?oG(i,aG,cG):i}});var lG=at,uG=Yi,fG=Rt,l$=vu,dG=Vr,pG=!uG||fG(function(){l$.f(1)});lG({target:"Object",stat:!0,forced:pG},{getOwnPropertySymbols:function(t){var n=l$.f;return n?n(dG(t)):[]}});var hG=gt;hG("asyncIterator");var mG=gt;mG("hasInstance");var yG=gt;yG("isConcatSpreadable");var vG=gt;vG("iterator");var gG=gt;gG("match");var bG=gt;bG("matchAll");var wG=gt;wG("replace");var xG=gt;xG("search");var SG=gt;SG("species");var EG=gt;EG("split");var _G=gt,$G=S_;_G("toPrimitive"),$G();var kG=xr,CG=gt,TG=na;CG("toStringTag"),TG(kG("Symbol"),"Symbol");var OG=gt;OG("unscopables");var AG=It,PG=na;PG(AG.JSON,"JSON",!0);var IG=Kt,RG=IG.Symbol,sa={},Em=vn,MG=Tn,u$=Function.prototype,NG=Em&&Object.getOwnPropertyDescriptor,_m=MG(u$,"name"),DG=_m&&(function(){}).name==="something",jG=_m&&(!Em||Em&&NG(u$,"name").configurable),FG={EXISTS:_m,PROPER:DG,CONFIGURABLE:jG},LG=Rt,BG=!LG(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),UG=Tn,zG=rn,qG=Vr,HG=du,VG=BG,f$=HG("IE_PROTO"),$m=Object,WG=$m.prototype,d$=VG?$m.getPrototypeOf:function(e){var t=qG(e);if(UG(t,f$))return t[f$];var n=t.constructor;return zG(n)&&t instanceof n?n.prototype:t instanceof $m?WG:null},KG=Rt,GG=rn,ZG=qr,YG=am,p$=d$,JG=gu,XG=zt,km=XG("iterator"),h$=!1,Kr,Cm,Tm;[].keys&&(Tm=[].keys(),"next"in Tm?(Cm=p$(p$(Tm)),Cm!==Object.prototype&&(Kr=Cm)):h$=!0);var QG=!ZG(Kr)||KG(function(){var e={};return Kr[km].call(e)!==e});QG?Kr={}:Kr=YG(Kr),GG(Kr[km])||JG(Kr,km,function(){return this});var m$={IteratorPrototype:Kr,BUGGY_SAFARI_ITERATORS:h$},eZ=m$.IteratorPrototype,tZ=am,nZ=Ss,rZ=na,oZ=sa,iZ=function(){return this},aZ=function(e,t,n,r){var o=t+" Iterator";return e.prototype=tZ(eZ,{next:nZ(+!r,n)}),rZ(e,o,!1,!0),oZ[o]=iZ,e},sZ=at,cZ=br,y$=FG,lZ=aZ,uZ=d$,fZ=na,v$=gu,dZ=zt,g$=sa,b$=m$,pZ=y$.PROPER;y$.CONFIGURABLE,b$.IteratorPrototype;var Cu=b$.BUGGY_SAFARI_ITERATORS,Om=dZ("iterator"),w$="keys",Tu="values",x$="entries",hZ=function(){return this},S$=function(e,t,n,r,o,i,a){lZ(n,t,r);var s=function(y){if(y===o&&p)return p;if(!Cu&&y&&y in u)return u[y];switch(y){case w$:return function(){return new n(this,y)};case Tu:return function(){return new n(this,y)};case x$:return function(){return new n(this,y)}}return function(){return new n(this)}},c=t+" Iterator",l=!1,u=e.prototype,f=u[Om]||u["@@iterator"]||o&&u[o],p=!Cu&&f||s(o),d=t==="Array"&&u.entries||f,h,m,v;if(d&&(h=uZ(d.call(new e)),h!==Object.prototype&&h.next&&(fZ(h,c,!0,!0),g$[c]=hZ)),pZ&&o===Tu&&f&&f.name!==Tu&&(l=!0,p=function(){return cZ(f,this)}),o)if(m={values:s(Tu),keys:i?p:s(w$),entries:s(x$)},a)for(v in m)(Cu||l||!(v in u))&&v$(u,v,m[v]);else sZ({target:t,proto:!0,forced:Cu||l},m);return a&&u[Om]!==p&&v$(u,Om,p,{name:o}),g$[t]=p,m},E$=function(e,t){return{value:e,done:t}},mZ=wr,_$=sa,$$=um;Yn.f;var yZ=S$,Ou=E$,k$="Array Iterator",vZ=$$.set,gZ=$$.getterFor(k$);yZ(Array,"Array",function(e,t){vZ(this,{type:k$,target:mZ(e),index:0,kind:t})},function(){var e=gZ(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ou(void 0,!0);switch(e.kind){case"keys":return Ou(n,!1);case"values":return Ou(t[n],!1)}return Ou([n,t[n]],!1)},"values"),_$.Arguments=_$.Array;var bZ={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},wZ=bZ,xZ=It,SZ=na,C$=sa;for(var Am in wZ)SZ(xZ[Am],Am),C$[Am]=C$.Array;var EZ=RG,_Z=EZ,$Z=zt,kZ=Yn.f,T$=$Z("metadata"),O$=Function.prototype;O$[T$]===void 0&&kZ(O$,T$,{value:null});var CZ=gt;CZ("asyncDispose");var TZ=gt;TZ("dispose");var OZ=gt;OZ("metadata");var AZ=_Z,PZ=AZ,IZ=xr,RZ=Mt,Pm=IZ("Symbol"),MZ=Pm.keyFor,NZ=RZ(Pm.prototype.valueOf),A$=Pm.isRegisteredSymbol||function(t){try{return MZ(NZ(t))!==void 0}catch{return!1}},DZ=at,jZ=A$;DZ({target:"Symbol",stat:!0},{isRegisteredSymbol:jZ});for(var FZ=Ji,P$=xr,LZ=Mt,BZ=Es,UZ=zt,Au=P$("Symbol"),I$=Au.isWellKnownSymbol,R$=P$("Object","getOwnPropertyNames"),zZ=LZ(Au.prototype.valueOf),M$=FZ("wks"),Im=0,N$=R$(Au),qZ=N$.length;Im<qZ;Im++)try{var D$=N$[Im];BZ(Au[D$])&&UZ(D$)}catch{}var j$=function(t){if(I$&&I$(t))return!0;try{for(var n=zZ(t),r=0,o=R$(M$),i=o.length;r<i;r++)if(M$[o[r]]==n)return!0}catch{}return!1},HZ=at,VZ=j$;HZ({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:VZ});var WZ=gt;WZ("customMatcher");var KZ=gt;KZ("observable");var GZ=at,ZZ=A$;GZ({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:ZZ});var YZ=at,JZ=j$;YZ({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:JZ});var XZ=gt;XZ("matcher");var QZ=gt;QZ("metadataKey");var eY=gt;eY("patternMatch");var tY=gt;tY("replaceAll");var nY=PZ,rY=nY,oY=rY;const ca=Ue(oY);var Rm=Mt,iY=su,aY=Os,sY=kh,cY=Rm("".charAt),F$=Rm("".charCodeAt),lY=Rm("".slice),L$=function(e){return function(t,n){var r=aY(sY(t)),o=iY(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=F$(r,o),a<55296||a>56319||o+1===i||(s=F$(r,o+1))<56320||s>57343?e?cY(r,o):a:e?lY(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},uY={codeAt:L$(!1),charAt:L$(!0)},fY=uY.charAt,dY=Os,B$=um,pY=S$,U$=E$,z$="String Iterator",hY=B$.set,mY=B$.getterFor(z$);pY(String,"String",function(e){hY(this,{type:z$,string:dY(e),index:0})},function(){var t=mY(this),n=t.string,r=t.index,o;return r>=n.length?U$(void 0,!0):(o=fY(n,r),t.index+=o.length,U$(o,!1))});var yY=Cs,q$=Rh,vY=$h,gY=sa,bY=zt,wY=bY("iterator"),Mm=function(e){if(!vY(e))return q$(e,wY)||q$(e,"@@iterator")||gY[yY(e)]},xY=Mm,SY=xY,EY=SY,_Y=EY,$Y=_Y,kY=$Y,CY=kY,TY=CY,OY=TY;const H$=Ue(OY);var AY=vn,PY=ta,IY=TypeError,RY=Object.getOwnPropertyDescriptor,MY=AY&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),V$=MY?function(e,t){if(PY(e)&&!RY(e,"length").writable)throw new IY("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},NY=at,DY=Vr,jY=ei,FY=V$,LY=Kh,BY=Rt,UY=BY(function(){return[].push.call({length:4294967296},1)!==4294967297}),zY=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},qY=UY||!zY();NY({target:"Array",proto:!0,arity:1,forced:qY},{push:function(t){var n=DY(this),r=jY(n),o=arguments.length;LY(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return FY(n,r),r}});var HY=It,VY=Kt,ri=function(e,t){var n=VY[e+"Prototype"],r=n&&n[t];if(r)return r;var o=HY[e],i=o&&o.prototype;return i&&i[t]},WY=ri,KY=WY("Array","push"),GY=Hr,ZY=KY,Nm=Array.prototype,YY=function(e){var t=e.push;return e===Nm||GY(Nm,e)&&t===Nm.push?ZY:t},JY=YY,XY=JY,QY=XY,eJ=QY,tJ=eJ,nJ=tJ,rJ=nJ;const oJ=Ue(rJ);function iJ(e,t){var n=e==null?null:typeof ca<"u"&&H$(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(oJ(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var aJ=at,W$=ta,sJ=Jh,cJ=qr,K$=Qh,lJ=ei,uJ=wr,fJ=ks,dJ=zt,pJ=lu,hJ=yu,mJ=pJ("slice"),yJ=dJ("species"),Dm=Array,vJ=Math.max;aJ({target:"Array",proto:!0,forced:!mJ},{slice:function(t,n){var r=uJ(this),o=lJ(r),i=K$(t,o),a=K$(n===void 0?o:n,o),s,c,l;if(W$(r)&&(s=r.constructor,sJ(s)&&(s===Dm||W$(s.prototype))?s=void 0:cJ(s)&&(s=s[yJ],s===null&&(s=void 0)),s===Dm||s===void 0))return hJ(r,i,a);for(c=new(s===void 0?Dm:s)(vJ(a-i,0)),l=0;i<a;i++,l++)i in r&&fJ(c,l,r[i]);return c.length=l,c}});var gJ=ri,bJ=gJ("Array","slice"),wJ=Hr,xJ=bJ,jm=Array.prototype,SJ=function(e){var t=e.slice;return e===jm||wJ(jm,e)&&t===jm.slice?xJ:t},EJ=SJ,_J=EJ,$J=_J,kJ=$J,CJ=kJ,TJ=CJ,OJ=TJ;const AJ=Ue(OJ);var PJ=br,G$=_o,IJ=Rh,RJ=function(e,t,n){var r,o;G$(e);try{if(r=IJ(e,"return"),!r){if(t==="throw")throw n;return n}r=PJ(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return G$(r),n},MJ=_o,NJ=RJ,DJ=function(e,t,n,r){try{return r?t(MJ(n)[0],n[1]):t(n)}catch(o){NJ(e,"throw",o)}},jJ=zt,FJ=sa,LJ=jJ("iterator"),BJ=Array.prototype,UJ=function(e){return e!==void 0&&(FJ.Array===e||BJ[LJ]===e)},zJ=br,qJ=Ih,HJ=_o,VJ=ou,WJ=Mm,KJ=TypeError,GJ=function(e,t){var n=arguments.length<2?WJ(e):t;if(qJ(n))return HJ(zJ(n,e));throw new KJ(VJ(e)+" is not iterable")},ZJ=zh,YJ=br,JJ=Vr,XJ=DJ,QJ=UJ,eX=Jh,tX=ei,Z$=ks,nX=GJ,rX=Mm,Y$=Array,oX=function(t){var n=JJ(t),r=eX(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=ZJ(i,o>2?arguments[2]:void 0));var s=rX(n),c=0,l,u,f,p,d,h;if(s&&!(this===Y$&&QJ(s)))for(u=r?new this:[],p=nX(n,s),d=p.next;!(f=YJ(d,p)).done;c++)h=a?XJ(p,i,[f.value,c],!0):f.value,Z$(u,c,h);else for(l=tX(n),u=r?new this(l):Y$(l);l>c;c++)h=a?i(n[c],c):n[c],Z$(u,c,h);return u.length=c,u},iX=zt,J$=iX("iterator"),X$=!1;try{var aX=0,Q$={next:function(){return{done:!!aX++}},return:function(){X$=!0}};Q$[J$]=function(){return this},Array.from(Q$,function(){throw 2})}catch{}var sX=function(e,t){try{if(!t&&!X$)return!1}catch{return!1}var n=!1;try{var r={};r[J$]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},cX=at,lX=oX,uX=sX,fX=!uX(function(e){Array.from(e)});cX({target:"Array",stat:!0,forced:fX},{from:lX});var dX=Kt,pX=dX.Array.from,hX=pX,mX=hX,yX=mX,vX=yX,gX=vX,bX=gX,wX=bX;const ek=Ue(wX);function Fm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e,t){if(e){var n;if(typeof e=="string")return Fm(e,t);var r=AJ(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?ek(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fm(e,t):void 0}}function xX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
325
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Er(e,t){return HH(e)||iJ(e,t)||tk(e,t)||xX()}var nk={exports:{}};/*!
|
|
326
326
|
Copyright (c) 2018 Jed Watson.
|
|
327
327
|
Licensed under the MIT License (MIT), see
|
|
328
328
|
http://jedwatson.github.io/classnames
|
|
329
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var c in i)t.call(i,c)&&i[c]&&r.push(c);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(nk);var
|
|
329
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var c in i)t.call(i,c)&&i[c]&&r.push(c);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(nk);var SX=nk.exports;const Lm=Ue(SX);var Bm={exports:{}},Pu={exports:{}},et={};/** @license React v16.13.1
|
|
330
330
|
* react-is.production.min.js
|
|
331
331
|
*
|
|
332
332
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
333
333
|
*
|
|
334
334
|
* This source code is licensed under the MIT license found in the
|
|
335
335
|
* LICENSE file in the root directory of this source tree.
|
|
336
|
-
*/var rk;function
|
|
336
|
+
*/var rk;function EX(){if(rk)return et;rk=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var $=S.$$typeof;switch($){case t:switch(S=S.type,S){case c:case l:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case u:case h:case d:case a:return S;default:return $}}case n:return $}}}function k(S){return b(S)===l}return et.AsyncMode=c,et.ConcurrentMode=l,et.ContextConsumer=s,et.ContextProvider=a,et.Element=t,et.ForwardRef=u,et.Fragment=r,et.Lazy=h,et.Memo=d,et.Portal=n,et.Profiler=i,et.StrictMode=o,et.Suspense=f,et.isAsyncMode=function(S){return k(S)||b(S)===c},et.isConcurrentMode=k,et.isContextConsumer=function(S){return b(S)===s},et.isContextProvider=function(S){return b(S)===a},et.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},et.isForwardRef=function(S){return b(S)===u},et.isFragment=function(S){return b(S)===r},et.isLazy=function(S){return b(S)===h},et.isMemo=function(S){return b(S)===d},et.isPortal=function(S){return b(S)===n},et.isProfiler=function(S){return b(S)===i},et.isStrictMode=function(S){return b(S)===o},et.isSuspense=function(S){return b(S)===f},et.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===l||S===i||S===o||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===d||S.$$typeof===a||S.$$typeof===s||S.$$typeof===u||S.$$typeof===v||S.$$typeof===y||S.$$typeof===g||S.$$typeof===m)},et.typeOf=b,et}var tt={};/** @license React v16.13.1
|
|
337
337
|
* react-is.development.js
|
|
338
338
|
*
|
|
339
339
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
340
340
|
*
|
|
341
341
|
* This source code is licensed under the MIT license found in the
|
|
342
342
|
* LICENSE file in the root directory of this source tree.
|
|
343
|
-
*/var ok;function
|
|
343
|
+
*/var ok;function _X(){return ok||(ok=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(G){return typeof G=="string"||typeof G=="function"||G===r||G===l||G===i||G===o||G===f||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===h||G.$$typeof===d||G.$$typeof===a||G.$$typeof===s||G.$$typeof===u||G.$$typeof===v||G.$$typeof===y||G.$$typeof===g||G.$$typeof===m)}function k(G){if(typeof G=="object"&&G!==null){var fe=G.$$typeof;switch(fe){case t:var ve=G.type;switch(ve){case c:case l:case r:case i:case o:case f:return ve;default:var _e=ve&&ve.$$typeof;switch(_e){case s:case u:case h:case d:case a:return _e;default:return fe}}case n:return fe}}}var S=c,$=l,O=s,I=a,B=t,T=u,M=r,R=h,j=d,U=n,D=i,F=o,K=f,V=!1;function N(G){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),w(G)||k(G)===c}function w(G){return k(G)===l}function q(G){return k(G)===s}function W(G){return k(G)===a}function _(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function J(G){return k(G)===u}function ae(G){return k(G)===r}function re(G){return k(G)===h}function le(G){return k(G)===d}function pe(G){return k(G)===n}function me(G){return k(G)===i}function ce(G){return k(G)===o}function Q(G){return k(G)===f}tt.AsyncMode=S,tt.ConcurrentMode=$,tt.ContextConsumer=O,tt.ContextProvider=I,tt.Element=B,tt.ForwardRef=T,tt.Fragment=M,tt.Lazy=R,tt.Memo=j,tt.Portal=U,tt.Profiler=D,tt.StrictMode=F,tt.Suspense=K,tt.isAsyncMode=N,tt.isConcurrentMode=w,tt.isContextConsumer=q,tt.isContextProvider=W,tt.isElement=_,tt.isForwardRef=J,tt.isFragment=ae,tt.isLazy=re,tt.isMemo=le,tt.isPortal=pe,tt.isProfiler=me,tt.isStrictMode=ce,tt.isSuspense=Q,tt.isValidElementType=b,tt.typeOf=k}()),tt}var ik;function ak(){return ik||(ik=1,process.env.NODE_ENV==="production"?Pu.exports=EX():Pu.exports=_X()),Pu.exports}/*
|
|
344
344
|
object-assign
|
|
345
345
|
(c) Sindre Sorhus
|
|
346
346
|
@license MIT
|
|
347
|
-
*/var Um,sk;function
|
|
348
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
349
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(e){return mQ(e)||yQ(e)||tk(e)||vQ()}var Ru=function(e){return e&&e.Math==Math&&e},On=Ru(typeof globalThis=="object"&&globalThis)||Ru(typeof window=="object"&&window)||Ru(typeof self=="object"&&self)||Ru(typeof Se=="object"&&Se)||function(){return this}()||Function("return this")(),Qm={},Xn=function(e){try{return!!e()}catch{return!0}},gQ=Xn,oi=!gQ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),bk={},wk={}.propertyIsEnumerable,xk=Object.getOwnPropertyDescriptor,bQ=xk&&!wk.call({1:2},1);bk.f=bQ?function(t){var n=xk(this,t);return!!n&&n.enumerable}:wk;var Sk=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},wQ={}.toString,ey=function(e){return wQ.call(e).slice(8,-1)},xQ=Xn,SQ=ey,EQ="".split,_Q=xQ(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return SQ(e)=="String"?EQ.call(e,""):Object(e)}:Object,Mu=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},$Q=_Q,kQ=Mu,ty=function(e){return $Q(kQ(e))},jn=function(e){return typeof e=="function"},CQ=jn,Fs=function(e){return typeof e=="object"?e!==null:CQ(e)},ny=On,TQ=jn,OQ=function(e){return TQ(e)?e:void 0},Nu=function(e,t){return arguments.length<2?OQ(ny[e]):ny[e]&&ny[e][t]},AQ=Nu,PQ=AQ("navigator","userAgent")||"",Ek=On,ry=PQ,_k=Ek.process,$k=Ek.Deno,kk=_k&&_k.versions||$k&&$k.version,Ck=kk&&kk.v8,_r,Du;Ck?(_r=Ck.split("."),Du=_r[0]<4?1:_r[0]+_r[1]):ry&&(_r=ry.match(/Edge\/(\d+)/),(!_r||_r[1]>=74)&&(_r=ry.match(/Chrome\/(\d+)/),_r&&(Du=_r[1])));var IQ=Du&&+Du,Tk=IQ,RQ=Xn,Ok=!!Object.getOwnPropertySymbols&&!RQ(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Tk&&Tk<41}),MQ=Ok,Ak=MQ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",NQ=jn,DQ=Nu,jQ=Ak,Pk=jQ?function(e){return typeof e=="symbol"}:function(e){var t=DQ("Symbol");return NQ(t)&&Object(e)instanceof t},FQ=function(e){try{return String(e)}catch{return"Object"}},LQ=jn,BQ=FQ,UQ=function(e){if(LQ(e))return e;throw TypeError(BQ(e)+" is not a function")},zQ=UQ,Ik=function(e,t){var n=e[t];return n==null?void 0:zQ(n)},oy=jn,iy=Fs,qQ=function(e,t){var n,r;if(t==="string"&&oy(n=e.toString)&&!iy(r=n.call(e))||oy(n=e.valueOf)&&!iy(r=n.call(e))||t!=="string"&&oy(n=e.toString)&&!iy(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Rk={exports:{}},Mk=On,ay=function(e,t){try{Object.defineProperty(Mk,e,{value:t,configurable:!0,writable:!0})}catch{Mk[e]=t}return t},HQ=On,WQ=ay,Nk="__core-js_shared__",VQ=HQ[Nk]||WQ(Nk,{}),sy=VQ,Dk=sy;(Rk.exports=function(e,t){return Dk[e]||(Dk[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var cy=Rk.exports,KQ=Mu,jk=function(e){return Object(KQ(e))},GQ=jk,ZQ={}.hasOwnProperty,ii=Object.hasOwn||function(t,n){return ZQ.call(GQ(t),n)},YQ=0,JQ=Math.random(),Fk=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++YQ+JQ).toString(36)},XQ=On,QQ=cy,Lk=ii,eee=Fk,Bk=Ok,tee=Ak,Ls=QQ("wks"),Bs=XQ.Symbol,nee=tee?Bs:Bs&&Bs.withoutSetter||eee,Us=function(e){return(!Lk(Ls,e)||!(Bk||typeof Ls[e]=="string"))&&(Bk&&Lk(Bs,e)?Ls[e]=Bs[e]:Ls[e]=nee("Symbol."+e)),Ls[e]},Uk=Fs,zk=Pk,ree=Ik,oee=qQ,iee=Us,aee=iee("toPrimitive"),see=function(e,t){if(!Uk(e)||zk(e))return e;var n=ree(e,aee),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Uk(r)||zk(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),oee(e,t)},cee=see,lee=Pk,qk=function(e){var t=cee(e,"string");return lee(t)?t:String(t)},uee=On,Hk=Fs,ly=uee.document,fee=Hk(ly)&&Hk(ly.createElement),Wk=function(e){return fee?ly.createElement(e):{}},dee=oi,pee=Xn,hee=Wk,Vk=!dee&&!pee(function(){return Object.defineProperty(hee("div"),"a",{get:function(){return 7}}).a!=7}),mee=oi,yee=bk,vee=Sk,gee=ty,bee=qk,wee=ii,xee=Vk,Kk=Object.getOwnPropertyDescriptor;Qm.f=mee?Kk:function(t,n){if(t=gee(t),n=bee(n),xee)try{return Kk(t,n)}catch{}if(wee(t,n))return vee(!yee.f.call(t,n),t[n])};var zs={},See=Fs,Co=function(e){if(See(e))return e;throw TypeError(String(e)+" is not an object")},Eee=oi,_ee=Vk,Gk=Co,$ee=qk,Zk=Object.defineProperty;zs.f=Eee?Zk:function(t,n,r){if(Gk(t),n=$ee(n),Gk(r),_ee)try{return Zk(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var kee=oi,Cee=zs,Tee=Sk,ju=kee?function(e,t,n){return Cee.f(e,t,Tee(1,n))}:function(e,t,n){return e[t]=n,e},Yk={exports:{}},Oee=jn,uy=sy,Aee=Function.toString;Oee(uy.inspectSource)||(uy.inspectSource=function(e){return Aee.call(e)});var Jk=uy.inspectSource,Pee=On,Iee=jn,Ree=Jk,Xk=Pee.WeakMap,Mee=Iee(Xk)&&/native code/.test(Ree(Xk)),Nee=cy,Dee=Fk,Qk=Nee("keys"),eC=function(e){return Qk[e]||(Qk[e]=Dee(e))},fy={},jee=Mee,Fee=On,Lee=Fs,Bee=ju,dy=ii,py=sy,Uee=eC,zee=fy,tC="Object already initialized",qee=Fee.WeakMap,Fu,qs,Lu,Hee=function(e){return Lu(e)?qs(e):Fu(e,{})},Wee=function(e){return function(t){var n;if(!Lee(t)||(n=qs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(jee||py.state){var ai=py.state||(py.state=new qee),Vee=ai.get,nC=ai.has,Kee=ai.set;Fu=function(e,t){if(nC.call(ai,e))throw new TypeError(tC);return t.facade=e,Kee.call(ai,e,t),t},qs=function(e){return Vee.call(ai,e)||{}},Lu=function(e){return nC.call(ai,e)}}else{var la=Uee("state");zee[la]=!0,Fu=function(e,t){if(dy(e,la))throw new TypeError(tC);return t.facade=e,Bee(e,la,t),t},qs=function(e){return dy(e,la)?e[la]:{}},Lu=function(e){return dy(e,la)}}var rC={set:Fu,get:qs,has:Lu,enforce:Hee,getterFor:Wee},hy=oi,Gee=ii,oC=Function.prototype,Zee=hy&&Object.getOwnPropertyDescriptor,my=Gee(oC,"name"),Yee=my&&(function(){}).name==="something",Jee=my&&(!hy||hy&&Zee(oC,"name").configurable),yy={EXISTS:my,PROPER:Yee,CONFIGURABLE:Jee},Xee=On,iC=jn,Qee=ii,aC=ju,ete=ay,tte=Jk,sC=rC,nte=yy.CONFIGURABLE,rte=sC.get,ote=sC.enforce,ite=String(String).split("String");(Yk.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,c;if(iC(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Qee(n,"name")||nte&&n.name!==s)&&aC(n,"name",s),c=ote(n),c.source||(c.source=ite.join(typeof s=="string"?s:""))),e===Xee){i?e[t]=n:ete(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:aC(e,t,n)})(Function.prototype,"toString",function(){return iC(this)&&rte(this).source||tte(this)});var Hs=Yk.exports,cC={},ate=Math.ceil,ste=Math.floor,Bu=function(e){var t=+e;return t!==t||t===0?0:(t>0?ste:ate)(t)},cte=Bu,lte=Math.max,ute=Math.min,fte=function(e,t){var n=cte(e);return n<0?lte(n+t,0):ute(n,t)},dte=Bu,pte=Math.min,lC=function(e){return e>0?pte(dte(e),9007199254740991):0},hte=lC,mte=function(e){return hte(e.length)},yte=ty,vte=fte,gte=mte,uC=function(e){return function(t,n,r){var o=yte(t),i=gte(o),a=vte(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},bte={includes:uC(!0),indexOf:uC(!1)},vy=ii,wte=ty,xte=bte.indexOf,Ste=fy,fC=function(e,t){var n=wte(e),r=0,o=[],i;for(i in n)!vy(Ste,i)&&vy(n,i)&&o.push(i);for(;t.length>r;)vy(n,i=t[r++])&&(~xte(o,i)||o.push(i));return o},gy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ete=fC,_te=gy,$te=_te.concat("length","prototype");cC.f=Object.getOwnPropertyNames||function(t){return Ete(t,$te)};var dC={};dC.f=Object.getOwnPropertySymbols;var kte=Nu,Cte=cC,Tte=dC,Ote=Co,Ate=kte("Reflect","ownKeys")||function(t){var n=Cte.f(Ote(t)),r=Tte.f;return r?n.concat(r(t)):n},Pte=ii,Ite=Ate,Rte=Qm,Mte=zs,Nte=function(e,t){for(var n=Ite(t),r=Mte.f,o=Rte.f,i=0;i<n.length;i++){var a=n[i];Pte(e,a)||r(e,a,o(t,a))}},Dte=Xn,jte=jn,Fte=/#|\.prototype\./,Ws=function(e,t){var n=Bte[Lte(e)];return n==zte?!0:n==Ute?!1:jte(t)?Dte(t):!!t},Lte=Ws.normalize=function(e){return String(e).replace(Fte,".").toLowerCase()},Bte=Ws.data={},Ute=Ws.NATIVE="N",zte=Ws.POLYFILL="P",qte=Ws,by=On,Hte=Qm.f,Wte=ju,Vte=Hs,Kte=ay,Gte=Nte,Zte=qte,Yte=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,c,l,u;if(r?a=by:o?a=by[n]||Kte(n,{}):a=(by[n]||{}).prototype,a)for(s in t){if(l=t[s],e.noTargetGet?(u=Hte(a,s),c=u&&u.value):c=a[s],i=Zte(r?s:n+(o?".":"#")+s,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;Gte(l,c)}(e.sham||c&&c.sham)&&Wte(l,"sham",!0),Vte(a,s,l,e)}},Jte=Us,Xte=Jte("toStringTag"),pC={};pC[Xte]="z";var wy=String(pC)==="[object z]",Qte=wy,ene=jn,Uu=ey,tne=Us,nne=tne("toStringTag"),rne=Uu(function(){return arguments}())=="Arguments",one=function(e,t){try{return e[t]}catch{}},hC=Qte?Uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=one(t=Object(e),nne))=="string"?n:rne?Uu(t):(r=Uu(t))=="Object"&&ene(t.callee)?"Arguments":r},ine=hC,zu=function(e){if(ine(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},ane=Co,mC=function(){var e=ane(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},xy={},yC=Xn,sne=On,vC=sne.RegExp;xy.UNSUPPORTED_Y=yC(function(){var e=vC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),xy.BROKEN_CARET=yC(function(){var e=vC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var cne=fC,lne=gy,une=Object.keys||function(t){return cne(t,lne)},fne=oi,dne=zs,pne=Co,hne=une,mne=fne?Object.defineProperties:function(t,n){pne(t);for(var r=hne(n),o=r.length,i=0,a;o>i;)dne.f(t,a=r[i++],n[a]);return t},yne=Nu,vne=yne("document","documentElement"),gne=Co,bne=mne,gC=gy,wne=fy,xne=vne,Sne=Wk,Ene=eC,bC=">",wC="<",Sy="prototype",Ey="script",xC=Ene("IE_PROTO"),_y=function(){},SC=function(e){return wC+Ey+bC+e+wC+"/"+Ey+bC},EC=function(e){e.write(SC("")),e.close();var t=e.parentWindow.Object;return e=null,t},_ne=function(){var e=Sne("iframe"),t="java"+Ey+":",n;return e.style.display="none",xne.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(SC("document.F=Object")),n.close(),n.F},qu,Hu=function(){try{qu=new ActiveXObject("htmlfile")}catch{}Hu=typeof document<"u"?document.domain&&qu?EC(qu):_ne():EC(qu);for(var e=gC.length;e--;)delete Hu[Sy][gC[e]];return Hu()};wne[xC]=!0;var $ne=Object.create||function(t,n){var r;return t!==null?(_y[Sy]=gne(t),r=new _y,_y[Sy]=null,r[xC]=t):r=Hu(),n===void 0?r:bne(r,n)},kne=Xn,Cne=On,Tne=Cne.RegExp,One=kne(function(){var e=Tne(".","s");return!(e.dotAll&&e.exec(`
|
|
350
|
-
`)&&e.flags==="s")}),
|
|
351
|
-
`)&&(v="(?: "+v+")",g=" "+g,y++),s=new RegExp("^(?:"+v+")",m)),Cy&&(s=new RegExp("^"+v+"$(?!\\s)",m)),ky&&(c=n.lastIndex),l=Wu.call(h?s:n,g),h?l?(l.input=l.input.slice(y),l[0]=l[0].slice(y),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:ky&&l&&(n.lastIndex=n.global?l.index+l[0].length:c),Cy&&l&&l.length>1&&Une.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&d)for(l.groups=f=jne(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=l[p[1]];return l});var Ty=$y,qne=Yte,kC=Ty;qne({target:"RegExp",proto:!0,forced:/./.exec!==kC},{exec:kC});var CC=Hs,Hne=Ty,TC=Xn,OC=Us,Wne=ju,Vne=OC("species"),Oy=RegExp.prototype,Kne=function(e,t,n,r){var o=OC(e),i=!TC(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!TC(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Vne]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return l=!0,null},u[o](""),!l});if(!i||!a||n){var s=/./[o],c=t(o,""[e],function(l,u,f,p,d){var h=u.exec;return h===Hne||h===Oy.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:l.call(f,u,p)}:{done:!1}});CC(String.prototype,e,c[0]),CC(Oy,o,c[1])}r&&Wne(Oy[o],"sham",!0)},Gne=Bu,Zne=zu,Yne=Mu,AC=function(e){return function(t,n){var r=Zne(Yne(t)),o=Gne(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},Jne={codeAt:AC(!1),charAt:AC(!0)},Xne=Jne.charAt,Qne=function(e,t,n){return t+(n?Xne(e,t).length:1)},ere=jk,tre=Math.floor,nre="".replace,rre=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ore=/\$([$&'`]|\d{1,2})/g,ire=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,c=ore;return o!==void 0&&(o=ere(o),c=rre),nre.call(i,c,function(l,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return l;if(p>s){var d=tre(p/10);return d===0?l:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},are=Co,sre=jn,cre=ey,lre=Ty,ure=function(e,t){var n=e.exec;if(sre(n)){var r=n.call(e,t);return r!==null&&are(r),r}if(cre(e)==="RegExp")return lre.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},fre=Kne,dre=Xn,pre=Co,hre=jn,mre=Bu,yre=lC,ua=zu,vre=Mu,gre=Qne,bre=Ik,wre=ire,xre=ure,Sre=Us,Ay=Sre("replace"),Ere=Math.max,_re=Math.min,$re=function(e){return e===void 0?e:String(e)},kre=function(){return"a".replace(/./,"$0")==="$0"}(),PC=function(){return/./[Ay]?/./[Ay]("a","$0")==="":!1}(),Cre=!dre(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});fre("replace",function(e,t,n){var r=PC?"$":"$0";return[function(i,a){var s=vre(this),c=i==null?void 0:bre(i,Ay);return c?c.call(i,s,a):t.call(ua(s),i,a)},function(o,i){var a=pre(this),s=ua(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var c=n(t,a,s,i);if(c.done)return c.value}var l=hre(i);l||(i=ua(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=xre(a,s);if(d===null||(p.push(d),!u))break;var h=ua(d[0]);h===""&&(a.lastIndex=gre(s,yre(a.lastIndex),f))}for(var m="",v=0,y=0;y<p.length;y++){d=p[y];for(var g=ua(d[0]),b=Ere(_re(mre(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push($re(d[S]));var $=d.groups;if(l){var C=[g].concat(k,b,s);$!==void 0&&C.push($);var P=ua(i.apply(void 0,C))}else P=wre(g,s,b,k,$,i);b>=v&&(m+=s.slice(v,b)+P,v=b+g.length)}return m+s.slice(v)}]},!Cre||!kre||PC);var Vs=It,Tre=Oh,Ore=Qo,Vu=function(e){return Tre.slice(0,e.length)===e},Are=function(){return Vu("Bun/")?"BUN":Vu("Cloudflare-Workers")?"CLOUDFLARE":Vu("Deno/")?"DENO":Vu("Node.js/")?"NODE":Vs.Bun&&typeof Bun.version=="string"?"BUN":Vs.Deno&&typeof Deno.version=="object"?"DENO":Ore(Vs.process)==="process"?"NODE":Vs.window&&Vs.document?"BROWSER":"REST"}(),Pre=TypeError,Ire=function(e,t){if(e<t)throw new Pre("Not enough arguments");return e},IC=It,Rre=bh,Mre=rn,Nre=Are,Dre=Oh,jre=yu,Fre=Ire,Lre=IC.Function,Bre=/MSIE .\./.test(Dre)||Nre==="BUN"&&function(){var e=IC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),RC=function(e,t){var n=t?2:1;return Bre?function(r,o){var i=Fre(arguments.length,1)>n,a=Mre(r)?r:Lre(r),s=i?jre(arguments,n):[],c=i?function(){Rre(a,this,s)}:a;return t?e(c,o):e(c)}:e},Ure=at,MC=It,zre=RC,NC=zre(MC.setInterval,!0);Ure({global:!0,bind:!0,forced:MC.setInterval!==NC},{setInterval:NC});var qre=at,DC=It,Hre=RC,jC=Hre(DC.setTimeout,!0);qre({global:!0,bind:!0,forced:DC.setTimeout!==jC},{setTimeout:jC});var Wre=Kt,Vre=Wre.setInterval,Kre=Vre;const Gre=Ue(Kre);var Zre=Rt,FC=function(e,t){var n=[][e];return!!n&&Zre(function(){n.call(null,t||function(){return 1},1)})},Yre=at,Jre=xh,Xre=c_.indexOf,Qre=FC,Py=Jre([].indexOf),LC=!!Py&&1/Py([1],1,-0)<0,eoe=LC||!Qre("indexOf");Yre({target:"Array",proto:!0,forced:eoe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return LC?Py(this,t,n)||0:Xre(this,t,n)}});var toe=ri,noe=toe("Array","indexOf"),roe=Hr,ooe=noe,Iy=Array.prototype,ioe=function(e){var t=e.indexOf;return e===Iy||roe(Iy,e)&&t===Iy.indexOf?ooe:t},aoe=ioe,soe=aoe,coe=soe;const loe=Ue(coe);var BC=ou,uoe=TypeError,foe=function(e,t){if(!delete e[t])throw new uoe("Cannot delete property "+BC(t)+" of "+BC(e))},doe=at,poe=Wr,hoe=Qh,moe=su,yoe=ei,voe=W$,goe=Kh,boe=Xh,woe=ks,Ry=foe,xoe=lu,Soe=xoe("splice"),Eoe=Math.max,_oe=Math.min;doe({target:"Array",proto:!0,forced:!Soe},{splice:function(t,n){var r=poe(this),o=yoe(r),i=hoe(t,o),a=arguments.length,s,c,l,u,f,p;for(a===0?s=c=0:a===1?(s=0,c=o-i):(s=a-2,c=_oe(Eoe(moe(n),0),o-i)),goe(o+s-c),l=boe(r,c),u=0;u<c;u++)f=i+u,f in r&&woe(l,u,r[f]);if(l.length=c,s<c){for(u=i;u<o-c;u++)f=u+c,p=u+s,f in r?r[p]=r[f]:Ry(r,p);for(u=o;u>o-c+s;u--)Ry(r,u-1)}else if(s>c)for(u=o-c;u>i;u--)f=u+c-1,p=u+s-1,f in r?r[p]=r[f]:Ry(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return voe(r,o-c+s),l}});var $oe=ri,koe=$oe("Array","splice"),Coe=Hr,Toe=koe,My=Array.prototype,Ooe=function(e){var t=e.splice;return e===My||Coe(My,e)&&t===My.splice?Toe:t},Aoe=Ooe,Poe=Aoe,Ioe=Poe;const Roe=Ue(Ioe);var Moe=ri,Noe=Moe("Array","concat"),Doe=Hr,joe=Noe,Ny=Array.prototype,Foe=function(e){var t=e.concat;return e===Ny||Doe(Ny,e)&&t===Ny.concat?joe:t},Loe=Foe,Boe=Loe,Uoe=Boe;const bt=Ue(Uoe);var zoe=at,qoe=Mt,UC=Date,Hoe=qoe(UC.prototype.getTime);zoe({target:"Date",stat:!0},{now:function(){return Hoe(new UC)}});var Woe=Kt,Voe=Woe.Date.now,Koe=Voe,Goe=Koe,Zoe=Goe;const To=Ue(Zoe);var Yoe=fm.forEach,Joe=FC,Xoe=Joe("forEach"),Qoe=Xoe?[].forEach:function(t){return Yoe(this,t,arguments.length>1?arguments[1]:void 0)},eie=at,zC=Qoe;eie({target:"Array",proto:!0,forced:[].forEach!==zC},{forEach:zC});var tie=ri,nie=tie("Array","forEach"),rie=nie,oie=rie,iie=Cs,aie=Tn,sie=Hr,cie=oie,Dy=Array.prototype,lie={DOMTokenList:!0,NodeList:!0},uie=function(e){var t=e.forEach;return e===Dy||sie(Dy,e)&&t===Dy.forEach||aie(lie,iie(e))?cie:t},fie=uie;const Ku=Ue(fie);var die=at,pie=Wr,qC=nm,hie=Rt,mie=hie(function(){qC(1)});die({target:"Object",stat:!0,forced:mie},{keys:function(t){return qC(pie(t))}});var yie=Kt,vie=yie.Object.keys,gie=vie,bie=gie,wie=bie;const xie=Ue(wie);var Sie=Kt,Eie=Sie.Object.getOwnPropertySymbols,_ie=Eie,$ie=_ie,kie=$ie;const HC=Ue(kie);var Cie=at,Tie=fm.filter,Oie=lu,Aie=Oie("filter");Cie({target:"Array",proto:!0,forced:!Aie},{filter:function(t){return Tie(this,t,arguments.length>1?arguments[1]:void 0)}});var Pie=ri,Iie=Pie("Array","filter"),Rie=Hr,Mie=Iie,jy=Array.prototype,Nie=function(e){var t=e.filter;return e===jy||Rie(jy,e)&&t===jy.filter?Mie:t},Die=Nie,jie=Die,Fie=jie;const Lie=Ue(Fie);var WC={exports:{}},Bie=at,Uie=Rt,zie=wr,VC=xs.f,KC=vn,qie=!KC||Uie(function(){VC(1)});Bie({target:"Object",stat:!0,forced:qie,sham:!KC},{getOwnPropertyDescriptor:function(t,n){return VC(zie(t),n)}});var Hie=Kt,GC=Hie.Object,Wie=WC.exports=function(t,n){return GC.getOwnPropertyDescriptor(t,n)};GC.getOwnPropertyDescriptor.sham&&(Wie.sham=!0);var Vie=WC.exports,Kie=Vie,Gie=Kie,Zie=Gie;const ZC=Ue(Zie);var Yie=xr,Jie=Mt,Xie=mu,Qie=vu,eae=_o,tae=Jie([].concat),nae=Yie("Reflect","ownKeys")||function(t){var n=Xie.f(eae(t)),r=Qie.f;return r?tae(n,r(t)):n},rae=at,oae=vn,iae=nae,aae=wr,sae=xs,cae=ks;rae({target:"Object",stat:!0,sham:!oae},{getOwnPropertyDescriptors:function(t){for(var n=aae(t),r=sae.f,o=iae(n),i={},a=0,s,c;o.length>a;)c=r(n,s=o[a++]),c!==void 0&&cae(i,s,c);return i}});var lae=Kt,uae=lae.Object.getOwnPropertyDescriptors,fae=uae,dae=fae,pae=dae;const YC=Ue(pae);var JC={exports:{}},hae=at,mae=vn,XC=uu.f;hae({target:"Object",stat:!0,forced:Object.defineProperties!==XC,sham:!mae},{defineProperties:XC});var yae=Kt,QC=yae.Object,vae=JC.exports=function(t,n){return QC.defineProperties(t,n)};QC.defineProperties.sham&&(vae.sham=!0);var gae=JC.exports,bae=gae,wae=bae,xae=wae;const Sae=Ue(xae);var Eae=gk;const _ae=Ue(Eae);var $ae=!1;function kae(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Cae(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Tae=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!$ae:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Cae(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=kae(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),on="-ms-",Gu="-moz-",Je="-webkit-",eT="comm",Fy="rule",Ly="decl",Oae="@import",tT="@keyframes",Aae="@layer",Pae=Math.abs,Zu=String.fromCharCode,Iae=Object.assign;function Rae(e,t){return Gt(e,0)^45?(((t<<2^Gt(e,0))<<2^Gt(e,1))<<2^Gt(e,2))<<2^Gt(e,3):0}function nT(e){return e.trim()}function Mae(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function By(e,t){return e.indexOf(t)}function Gt(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function $r(e){return e.length}function Uy(e){return e.length}function Yu(e,t){return t.push(e),e}function Nae(e,t){return e.map(t).join("")}var Ju=1,fa=1,rT=0,bn=0,kt=0,da="";function Xu(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ju,column:fa,length:a,return:""}}function Gs(e,t){return Iae(Xu("",null,null,"",null,null,0),e,{length:-e.length},t)}function Dae(){return kt}function jae(){return kt=bn>0?Gt(da,--bn):0,fa--,kt===10&&(fa=1,Ju--),kt}function An(){return kt=bn<rT?Gt(da,bn++):0,fa++,kt===10&&(fa=1,Ju++),kt}function kr(){return Gt(da,bn)}function Qu(){return bn}function Zs(e,t){return Ks(da,e,t)}function Ys(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oT(e){return Ju=fa=1,rT=$r(da=e),bn=0,[]}function iT(e){return da="",e}function ef(e){return nT(Zs(bn-1,zy(e===91?e+2:e===40?e+1:e)))}function Fae(e){for(;(kt=kr())&&kt<33;)An();return Ys(e)>2||Ys(kt)>3?"":" "}function Lae(e,t){for(;--t&&An()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Zs(e,Qu()+(t<6&&kr()==32&&An()==32))}function zy(e){for(;An();)switch(kt){case e:return bn;case 34:case 39:e!==34&&e!==39&&zy(kt);break;case 40:e===41&&zy(e);break;case 92:An();break}return bn}function Bae(e,t){for(;An()&&e+kt!==47+10;)if(e+kt===42+42&&kr()===47)break;return"/*"+Zs(t,bn-1)+"*"+Zu(e===47?e:An())}function Uae(e){for(;!Ys(kr());)An();return Zs(e,bn)}function zae(e){return iT(tf("",null,null,null,[""],e=oT(e),0,[0],e))}function tf(e,t,n,r,o,i,a,s,c){for(var l=0,u=0,f=a,p=0,d=0,h=0,m=1,v=1,y=1,g=0,b="",k=o,S=i,$=r,C=b;v;)switch(h=g,g=An()){case 40:if(h!=108&&Gt(C,f-1)==58){By(C+=Xe(ef(g),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=ef(g);break;case 9:case 10:case 13:case 32:C+=Fae(h);break;case 92:C+=Lae(Qu()-1,7);continue;case 47:switch(kr()){case 42:case 47:Yu(qae(Bae(An(),Qu()),t,n),c);break;default:C+="/"}break;case 123*m:s[l++]=$r(C)*y;case 125*m:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+u:y==-1&&(C=Xe(C,/\f/g,"")),d>0&&$r(C)-f&&Yu(d>32?sT(C+";",r,n,f-1):sT(Xe(C," ","")+";",r,n,f-2),c);break;case 59:C+=";";default:if(Yu($=aT(C,t,n,l,u,o,s,b,k=[],S=[],f),i),g===123)if(u===0)tf(C,t,$,$,k,i,f,s,S);else switch(p===99&&Gt(C,3)===110?100:p){case 100:case 108:case 109:case 115:tf(e,$,$,r&&Yu(aT(e,$,$,0,0,o,s,b,o,k=[],f),S),o,S,f,s,r?k:S);break;default:tf(C,$,$,$,[""],S,0,s,S)}}l=u=d=0,m=y=1,b=C="",f=a;break;case 58:f=1+$r(C),d=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&jae()==125)continue}switch(C+=Zu(g),g*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[l++]=($r(C)-1)*y,y=1;break;case 64:kr()===45&&(C+=ef(An())),p=kr(),u=f=$r(b=C+=Uae(Qu())),g++;break;case 45:h===45&&$r(C)==2&&(m=0)}}return i}function aT(e,t,n,r,o,i,a,s,c,l,u){for(var f=o-1,p=o===0?i:[""],d=Uy(p),h=0,m=0,v=0;h<r;++h)for(var y=0,g=Ks(e,f+1,f=Pae(m=a[h])),b=e;y<d;++y)(b=nT(m>0?p[y]+" "+g:Xe(g,/&\f/g,p[y])))&&(c[v++]=b);return Xu(e,t,n,o===0?Fy:s,c,l,u)}function qae(e,t,n){return Xu(e,t,n,eT,Zu(Dae()),Ks(e,2,-2),0)}function sT(e,t,n,r){return Xu(e,t,n,Ly,Ks(e,0,r),Ks(e,r+1,-1),r)}function pa(e,t){for(var n="",r=Uy(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Hae(e,t,n,r){switch(e.type){case Aae:if(e.children.length)break;case Oae:case Ly:return e.return=e.return||e.value;case eT:return"";case tT:return e.return=e.value+"{"+pa(e.children,r)+"}";case Fy:e.value=e.props.join(",")}return $r(n=pa(e.children,r))?e.return=e.value+"{"+n+"}":""}function Wae(e){var t=Uy(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Vae(e){return function(t){t.root||(t=t.return)&&e(t)}}function Kae(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Gae=function(t,n,r){for(var o=0,i=0;o=i,i=kr(),o===38&&i===12&&(n[r]=1),!Ys(i);)An();return Zs(t,bn)},Zae=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&kr()===12&&(n[r]=1),t[r]+=Gae(bn-1,n,r);break;case 2:t[r]+=ef(o);break;case 4:if(o===44){t[++r]=kr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Zu(o)}while(o=An());return t},Yae=function(t,n){return iT(Zae(oT(t),n))},cT=new WeakMap,Jae=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!cT.get(r))&&!o){cT.set(t,!0);for(var i=[],a=Yae(n,i),s=r.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Xae=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function lT(e,t){switch(Rae(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+Gu+e+on+e+e;case 6828:case 4268:return Je+e+on+e+e;case 6165:return Je+e+on+"flex-"+e+e;case 5187:return Je+e+Xe(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+on+"flex-$1$2")+e;case 5443:return Je+e+on+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Je+e+on+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Je+e+on+Xe(e,"shrink","negative")+e;case 5292:return Je+e+on+Xe(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+Xe(e,"-grow","")+Je+e+on+Xe(e,"grow","positive")+e;case 4554:return Je+Xe(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Je+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($r(e)-1-t>6)switch(Gt(e,t+1)){case 109:if(Gt(e,t+4)!==45)break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+Gu+(Gt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~By(e,"stretch")?lT(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Gt(e,t+1)!==115)break;case 6444:switch(Gt(e,$r(e)-3-(~By(e,"!important")&&10))){case 107:return Xe(e,":",":"+Je)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(Gt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+on+"$2box$3")+e}break;case 5936:switch(Gt(e,t+11)){case 114:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Je+e+on+e+e}return e}var Qae=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ly:t.return=lT(t.value,t.length);break;case tT:return pa([Gs(t,{value:Xe(t.value,"@","@"+Je)})],o);case Fy:if(t.length)return Nae(t.props,function(i){switch(Mae(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pa([Gs(t,{props:[Xe(i,/:(read-\w+)/,":"+Gu+"$1")]})],o);case"::placeholder":return pa([Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Je+"input-$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Gu+"$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,on+"input-$1")]})],o)}return""})}},ese=[Qae],tse=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||ese,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)i[v[y]]=!0;s.push(m)});var c,l=[Jae,Xae];{var u,f=[Hae,Vae(function(m){u.insert(m)})],p=Wae(l.concat(o,f)),d=function(v){return pa(zae(v),p)};c=function(v,y,g,b){u=g,d(v?v+"{"+y.styles+"}":y.styles),b&&(h.inserted[y.name]=!0)}}var h={key:n,sheet:new Tae({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return h.sheet.hydrate(s),h};function nse(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var rse={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ose=!1,ise=/[A-Z]|^ms/g,ase=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uT=function(t){return t.charCodeAt(1)===45},fT=function(t){return t!=null&&typeof t!="boolean"},qy=Kae(function(e){return uT(e)?e:e.replace(ise,"-$&").toLowerCase()}),dT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ase,function(r,o,i){return Cr={name:o,styles:i,next:Cr},o})}return rse[t]!==1&&!uT(t)&&typeof n=="number"&&n!==0?n+"px":n},sse="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Js(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Cr={name:o.name,styles:o.styles,next:Cr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Cr={name:a.name,styles:a.styles,next:Cr},a=a.next;var s=i.styles+";";return s}return cse(e,t,n)}case"function":{if(e!==void 0){var c=Cr,l=n(e);return Cr=c,Js(e,t,l)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function cse(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Js(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":fT(s)&&(r+=qy(i)+":"+dT(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&ose)throw new Error(sse);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)fT(a[c])&&(r+=qy(i)+":"+dT(i,a[c])+";");else{var l=Js(e,t,a);switch(i){case"animation":case"animationName":{r+=qy(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}}return r}var pT=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Cr;function Hy(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Cr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Js(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Js(n,t,e[s]),r){var c=i;o+=c[s]}pT.lastIndex=0;for(var l="",u;(u=pT.exec(o))!==null;)l+="-"+u[1];var f=nse(o)+l;return{name:f,styles:o,next:Cr}}var lse=!0;function hT(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var use=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||lse===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},fse=function(t,n,r){use(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function mT(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function yT(e,t,n){var r=[],o=hT(e,r,n);return r.length<2?n:o+t(r)}var dse=function(t){var n=tse(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered,void 0);return fse(n,f,!1),n.key+"-"+f.name},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered),p="animation-"+f.name;return mT(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered);mT(n,f)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return yT(n.registered,r,pse(l))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hT.bind(null,n.registered),merge:yT.bind(null,n.registered,r)}},pse=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},hse=Hs,Wy=Date.prototype,vT="Invalid Date",gT="toString",mse=Wy[gT],yse=Wy.getTime;String(new Date(NaN))!=vT&&hse(Wy,gT,function(){var t=yse.call(this);return t===t?mse.call(this):vT});var vse=wy,gse=hC,bse=vse?{}.toString:function(){return"[object "+gse(this)+"]"},wse=wy,xse=Hs,Sse=bse;wse||xse(Object.prototype,"toString",Sse,{unsafe:!0});var Ese=yy.PROPER,_se=Hs,$se=Co,bT=zu,kse=Xn,Cse=mC,Vy="toString",wT=RegExp.prototype,xT=wT[Vy],Tse=kse(function(){return xT.call({source:"a",flags:"b"})!="/a/b"}),Ose=Ese&&xT.name!=Vy;(Tse||Ose)&&_se(RegExp.prototype,Vy,function(){var t=$se(this),n=bT(t.source),r=t.flags,o=bT(r===void 0&&t instanceof RegExp&&!("flags"in wT)?Cse.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var ST=typeof window<"u"?window:self,Ase=ST.crypto||ST.msCrypto,Pse=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Ase);const Ise=Ue(Pse);function Rse(){return Ise().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Mse=ZE;const ET=Ue(Mse);function rt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function _T(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return bt(n=[bt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Ve(rt("green","white")),i)}function Nse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,c=Er(s,1),l=c[0];typeof l=="function"&&(i=l());var u=ET(i[0])?i:[i],f=u.length===1;Ku(u).call(u,function(p,d){if(f){var h,m;(h=console).log.apply(h,Ve(_T.apply(void 0,bt(m=[e]).call(m,Ve(p)))))}else if(d){var v;(v=console).log.apply(v,Ve(ET(p)?p:[p]))}else{var y,g;(y=console).groupCollapsed.apply(y,Ve(_T.apply(void 0,bt(g=[e]).call(g,Ve(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var Dse=oi,jse=yy.EXISTS,Fse=zs.f,$T=Function.prototype,Lse=$T.toString,Bse=/^\s*function ([^ (]*)/,Use="name";Dse&&!jse&&Fse($T,Use,{configurable:!0,get:function(){try{return Lse.call(this).match(Bse)[1]}catch{return""}}});var zse=Kt,qse=zse.setTimeout,Hse=qse;const Wse=Ue(Hse);function Vse(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=To();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Wse(function(){e.apply(void 0,i),n=To()},Math.max(0,t-s+n)))}}var kT=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=E.useRef();a.current=o;var s=E.useMemo(function(){return Vse(function(l){var u=a.current;u&&u(l)},n)},[n,a]),c=E.useCallback(function(l){l.timeStampLow=To(),s(l)},[s]);return E.useLayoutEffect(function(){return i.addEventListener(r,c,{passive:!0}),c({target:i,type:r}),function(){return i.removeEventListener(r,c)}},[r,c,i]),!1};kT.defaultProps={debounce:200};var Kse=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Gse=at,Zse=Kse;Gse({target:"Math",stat:!0},{sign:Zse});var Yse=Kt,Jse=Yse.Math.sign,Xse=Jse,Qse=Xse,ece=Qse;const tce=Ue(ece);function nce(e,t){var n=tce(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function rce(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var CT=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=E.useRef(),s=E.useCallback(function(l,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:To();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=f==="100%"?o.scrollHeight-o.offsetHeight:f,m=rce(u,h,nce,(To()-d)/5);Math.abs(h-m)<1.5&&(m=h),o[l]=m,h===m?r&&r(!0):s(l,u,f,p+1,d)}}))},[a,r,o]),c=E.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return E.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",c,{passive:!0}),o.addEventListener("wheel",c,{passive:!0}),function(){o.removeEventListener("pointerdown",c),o.removeEventListener("wheel",c),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,c,n,o,i]),!1};CT.propTypes={name:Ze.string.isRequired,onEnd:Ze.func,target:Ze.any.isRequired,value:Ze.oneOfType([Ze.number,Ze.oneOf(["100%"])]).isRequired};function Ky(e){var t=E.useState(e),n=Er(t,2),r=n[0],o=n[1],i=E.useRef(),a=E.useCallback(function(s){typeof s=="function"?a(function(c){return s=s(c),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function TT(e,t){var n=xie(e);if(HC){var r=HC(e);t&&(r=Lie(r).call(r,function(o){return ZC(e,o).enumerable})),n.push.apply(n,r)}return n}function OT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ku(r=TT(Object(n),!0)).call(r,function(i){hQ(e,i,n[i])})}else if(YC)Sae(e,YC(n));else{var o;Ku(o=TT(Object(n))).call(o,function(i){_ae(e,i,ZC(n,i))})}}return e}var oce=function(){return 1/0},AT=17,ice="bottom",Qn="top",PT=1,ace=34,IT={};function sce(e,t){return e(),Gre(e,t)}function RT(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<PT,s=i<PT,c=t===Qn?s:a,l=t!==Qn?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function Xs(e,t){return e===(t===Qn?0:"100%")}var Gy=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=E.useMemo(function(){return Nse("<ScrollToBottom>",{force:i})},[i]);s=s===Qn?Qn:ice;var f=E.useRef(0),p=E.useRef(a),d=Ky(s===Qn?0:"100%"),h=Er(d,3),m=h[0],v=h[1],y=h[2],g=Ky(null),b=Er(g,3),k=b[0],S=b[1],$=b[2],C=E.useRef(0),P=E.useRef(0),F=E.useRef(0),T=E.useState(!0),R=Er(T,2),H=R[0],L=R[1],z=E.useState(!0),N=Er(z,2),D=N[0],K=N[1],W=E.useState(!0),M=Er(W,2),w=M[0],U=M[1],V=E.useState(!1),_=Er(V,2),J=_[0],ae=_[1],re=Ky(!0),le=Er(re,3),pe=le[0],me=le[1],ce=le[2],Q=E.useRef([]),G=E.useCallback(function(q){var te=$.current;return Q.current.push(q),te&&q({scrollTop:te.scrollTop}),function(){var de=Q.current,Pe=loe(de).call(de,q);~Pe&&Roe(de).call(de,Pe,1)}},[Q,$]),fe=E.useCallback(function(){var q=y.current;u(function(){var te;return bt(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,Ve(rt("magenta")),Ve(rt("orange")),[{animateTo:q}])}),f.current=To(),Xs(q,s)||me(!1),v(null)},[y,u,f,s,v,me]),ve=E.useCallback(function(q){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=te.behavior,Pe=$.current;if(typeof q!="number"&&q!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Will scroll to %c".concat(typeof q=="number"?q+"px":q.replace(/%/g,"%%"),"%c")]).call(Ce,Ve(rt("lime","")),Ve(rt("purple"))),{behavior:de,nextAnimateTo:q,target:Pe}]}),de==="auto"?(fe(),Pe&&(Pe.scrollTop=q==="100%"?Pe.scrollHeight-Pe.offsetHeight:q)):(de!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),v(q)),Xs(q,s)&&(u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ce,Ve(rt("lime","")),Ve(rt("purple"))),[{mode:s,nextAnimateTo:q}]]}),me(!0))},[u,fe,s,v,me,$]),_e=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var de;return bt(de=["%cscrollToBottom%c: Called"]).call(de,Ve(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:te||"smooth"})},[u,ve]),I=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var de;return bt(de=["%cscrollToTop%c: Called"]).call(de,Ve(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:te||"smooth"})},[u,ve]),X=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var Pe;return bt(Pe=["%cscrollToEnd%c: Called"]).call(Pe,Ve(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?I(de):_e(de)},[u,s,_e,I]),oe=E.useCallback(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=q.behavior;u(function(){var Pe;return bt(Pe=["%cscrollToStart%c: Called"]).call(Pe,Ve(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?_e(de):I(de)},[u,s,_e,I]),ee=E.useCallback(function(){var q=$.current;if(q){if(p.current==="auto"){u(function(){var pt;return bt(pt=["%ctarget changed%c: Initial scroll"]).call(pt,Ve(rt("blue")))}),q.scrollTop=s===Qn?0:q.scrollHeight-q.offsetHeight,p.current=!1;return}var te=C.current,de=q.offsetHeight,Pe=q.scrollHeight,Ce=q.scrollTop,Be=s===Qn?0:Math.max(0,Pe-de-Ce),ut=Math.max(0,te-Ce),Nt=l({maxValue:Be,minValue:ut,offsetHeight:de,scrollHeight:Pe,scrollTop:Ce}),ot=Math.max(0,Math.min(Be,Nt)),nt;s===Qn||ot!==Be?nt=Ce+ot:nt="100%",u(function(){var pt,ht,wn;return[bt(pt=[bt(ht=bt(wn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(wn,typeof nt=="number"?nt+"px":nt.replace(/%/g,"%%"),"%c (%c")).call(ht,(nt==="100%"?Be:nt)+te,"px%c)")]).call(pt,Ve(rt("orange")),Ve(rt("purple")),Ve(rt("purple")),Ve(rt("purple"))),{animateFrom:te,maxValue:Be,minValue:ut,nextAnimateTo:nt,nextValue:ot,offsetHeight:de,rawNextValue:Nt,scrollHeight:Pe,scrollTop:Ce}]}),ve(nt,{behavior:"smooth"})}},[C,u,s,l,ve,$]),xe=E.useCallback(function(q){var te,de=q.timeStampLow,Pe=y.current,Ce=$.current,Be=Pe!==null;if(!(de<=f.current||!Ce)){var ut=RT({mode:s,target:Ce}),Nt=ut.atBottom,ot=ut.atEnd,nt=ut.atStart,pt=ut.atTop;L(Nt),K(ot),ae(nt),U(pt);var ht=Ce.offsetHeight,wn=Ce.scrollHeight,Pn=P.current,er=F.current,Gr=ht!==Pn,Tr=wn!==er;if(Gr&&(P.current=ht),Tr&&(F.current=wn),!Gr&&!Tr){var tr=Be&&Xs(Pe,s)||ot;ce.current!==tr&&(u(function(){var it,mt,Dt,jt;return[bt(it=["%conScroll%c: %csetSticky%c(%c".concat(tr,"%c)")]).call(it,Ve(rt("red")),Ve(rt("red")),Ve(rt("purple"))),bt(mt=[bt(Dt=bt(jt="(animating = %c".concat(Be,"%c && isEnd = %c")).call(jt,Xs(Pe,s),"%c) || atEnd = %c")).call(Dt,ot,"%c")]).call(mt,Ve(rt("purple")),Ve(rt("purple")),Ve(rt("purple")),[{animating:Be,animateTo:Pe,atEnd:ot,mode:s,offsetHeight:Ce.offsetHeight,scrollHeight:Ce.scrollHeight,sticky:ce.current,nextSticky:tr}])]}),me(tr))}else ce.current&&(u(function(){var it;return[bt(it=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(it,Ve(rt("red")),Ve(rt("orange")),[{offsetHeightChanged:Gr,scrollHeightChanged:Tr}]),{nextOffsetHeight:ht,prevOffsetHeight:Pn,nextScrollHeight:wn,prevScrollHeight:er}]}),ee());var Zr=Ce.scrollTop;Ku(te=Q.current).call(te,function(it){return it({scrollTop:Zr})})}},[y,u,f,s,P,F,Q,ee,L,K,ae,U,me,ce,$]);E.useEffect(function(){if(k){var q=!1,te=sce(function(){var de=$.current,Pe=y.current!==null;ce.current?RT({mode:s,target:de}).atEnd?q=!1:q?To()-q>ace&&(Pe||(C.current=de.scrollTop,u(function(){var Ce;return bt(Ce=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ce,Ve(rt("navy")),Ve(rt("orange")))}),ee()),q=!1):q=To():de.scrollHeight<=de.offsetHeight&&!ce.current&&(u(function(){var Ce;return[bt(Ce=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ce,Ve(rt("navy")),Ve(rt("purple"))),[{offsetHeight:de.offsetHeight,scrollHeight:de.scrollHeight,sticky:ce.current}]]}),me(!0))},Math.max(AT,n)||AT);return function(){return clearInterval(te)}}},[y,n,u,s,ee,me,ce,k,$]);var we=E.useMemo(function(){var q=IT[c]||(IT[c]=dse({key:"react-scroll-to-bottom--css-"+Rse(),nonce:c}));return function(te){return q.css(te)+""}},[c]),ke=E.useMemo(function(){return{observeScrollPosition:G,setTarget:S,styleToClassName:we}},[G,S,we]),Fe=E.useMemo(function(){return{atBottom:H,atEnd:D,atStart:J,atTop:w,mode:s}},[H,D,J,w,s]),Oe=E.useMemo(function(){var q=m!==null;return{animating:q,animatingToEnd:q&&Xs(m,s),sticky:pe}},[m,s,pe]),B=E.useMemo(function(){return OT(OT({},Fe),Oe)},[Fe,Oe]),Z=E.useMemo(function(){return{scrollTo:ve,scrollToBottom:_e,scrollToEnd:X,scrollToStart:oe,scrollToTop:I}},[ve,_e,X,oe,I]);return E.useEffect(function(){if(k){var q=function(){F.current=k.scrollHeight};return k.addEventListener("focus",q,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",q)}}},[k]),u(function(){var q;return[bt(q=["%cRender%c: Render"]).call(q,Ve(rt("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),E.createElement(Iu.Provider,{value:ke},E.createElement(Km.Provider,{value:Z},E.createElement(Ym.Provider,{value:B},E.createElement(Gm.Provider,{value:Fe},E.createElement(Zm.Provider,{value:Oe},r,k&&E.createElement(kT,{debounce:o,name:"scroll",onEvent:xe,target:k}),k&&m!==null&&E.createElement(CT,{name:"scrollTop",onEnd:fe,target:k,value:m}))))))};Gy.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:oce},Gy.propTypes={checkInterval:Ze.number,children:Ze.any,debounce:Ze.number,debug:Ze.bool,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func};var cce={height:"100%",overflowY:"auto",width:"100%"},Zy=function(t){var n=t.children,r=t.className,o=E.useContext(Iu),i=o.setTarget,a=Jm()(cce);return E.createElement("div",{className:Lm(a,(r||"")+""),ref:i},n)};Zy.defaultProps={children:void 0,className:void 0},Zy.propTypes={children:Ze.any,className:Ze.string};var lce={position:"relative"},Yy=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Jm()(lce);return E.createElement("div",{className:Lm(a,(r||"")+"")},E.createElement(Zy,{className:(i||"")+""},n),E.createElement(Xm,{className:(o||"")+""}))};Yy.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Yy.propTypes={children:Ze.any,className:Ze.string,followButtonClassName:Ze.string,scrollViewClassName:Ze.string};var Jy=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return E.createElement(Gy,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:f},E.createElement(Yy,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};Jy.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Jy.propTypes={checkInterval:Ze.number,children:Ze.any,className:Ze.string,debounce:Ze.number,debug:Ze.bool,followButtonClassName:Ze.string,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func,scrollViewClassName:Ze.string};function uce(){var e=dk(),t=e.scrollToBottom;return t}Cz();const MT=E.memo(({scrollDownButton:e,...t})=>{const{messageList:n}=ct,r=_n(v=>v.conversationId),o=Ne(v=>v.messages)[r??""]??[],i=Ne(v=>v.setState),a=Ne(v=>v.client),s=Ne(v=>v.messageContainerRef),c=Ne(v=>v.isTyping),l=Ne(v=>v.setIsTyping),u=E.useMemo(()=>KA(o),[o]),[f,p]=E.useState(!0),{y:d}=h6(s),h=E.useCallback(()=>{if(!s.current)return;const{scrollHeight:v}=s.current;f&&s.current.scrollTo({top:v})},[]);E.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:v,timeout:y})=>{l(v,y)}),[]),E.useEffect(()=>{const v=o[o.length-1];i({disableComposer:!!(v!=null&&v.disableInput)})},[o.length]),E.useEffect(()=>{if(!s.current)return;const{offsetHeight:v,scrollHeight:y,scrollTop:g}=s.current;p(y<=g+v+100)},[d]);const m=e!=null&&e.icon?e==null?void 0:e.icon:F6;return j.jsxs(Jy,{...t,...n.container,followButtonClassName:"bpHidden",scrollViewClassName:n.viewPort.className,children:[j.jsx($z,{}),u.map(v=>j.jsx(gh,{scroll:h,...v},v.id)),c&&j.jsx(gh,{scroll:h,direction:"incoming",children:j.jsx(pE,{})}),j.jsx("li",{"data-is-at-bottom":f,...n.scrollDownButton.container,children:j.jsxs(fce,{children:[(e==null?void 0:e.text)??"Back"," ",j.jsx(m,{...n.scrollDownButton.icon})]})})]})}),fce=e=>{const[t]=hk(),n=uce(),{messageList:{scrollDownButton:r}}=ct;return!t&&j.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},dce=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:o}=E1(),i=E.useMemo(()=>Wg({color:e,fontFamily:t,radius:n,themeMode:r,variant:o}),[e,t,n,r,o]);return j.jsxs(j.Fragment,{children:[j.jsxs(cE,{children:[j.jsx(dE,{}),j.jsx(MT,{}),j.jsx(PS,{})]}),j.jsx("style",{children:i})]})};Te.Avatar=Lf,Te.Block=Vi,Te.Composer=PS,Te.Container=cE,Te.Fab=pz,Te.Header=dE,Te.Message=gh,Te.MessageList=MT,Te.Modal=Eo,Te.ModalProvider=IS,Te.RestartConversation=fE,Te.TypingIndicator=pE,Te.Webchat=dce,Te.WebchatProvider=F9,Te.WebchatThemeSchema=Ff,Te.__adapters=uA,Te.avatarThemeSchema=vc,Te.blockThemeSchema=Lg,Te.clientModePropsSchema=qg,Te.configPropsSchema=Hg,Te.configurationSchema=Dg,Te.cssStyleSchema=Fg,Te.descriptionItemSchema=fi,Te.fileTypes=Xx,Te.generateThemeStylesheet=Wg,Te.getClient=e1,Te.initPropsSchema=eP,Te.isFileType=Qx,Te.markdownTypeSchema=jg,Te.renderers=_S,Te.statePropsSchema=Ug,Te.styleOptionSchema=ue,Te.themeSchema=Bg,Te.useClient=fB,Te.useWebchatStore=Ne,Te.userPropsSchema=zg,Te.webchatClasses=ct,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|
|
347
|
+
*/var Um,sk;function $X(){if(sk)return Um;sk=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Um=o()?Object.assign:function(i,a){for(var s,c=r(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(c[l[p]]=s[l[p]])}}return c},Um}var zm,ck;function qm(){if(ck)return zm;ck=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zm=e,zm}var Hm,lk;function kX(){if(lk)return Hm;lk=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=qm(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,c,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hm=o,Hm}var Vm,uk;function CX(){if(uk)return Vm;uk=1;var e=ak(),t=$X(),n=qm(),r=kX(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Vm=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(N){var w=N&&(l&&N[l]||N[u]);if(typeof w=="function")return w}var p="<<anonymous>>",d={array:y("array"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:$,node:T(),objectOf:I,oneOf:O,oneOfType:B,shape:M,exact:R};function h(N,w){return N===w?N!==0||1/N===1/w:N!==N&&w!==w}function m(N){this.message=N,this.stack=""}m.prototype=Error.prototype;function v(N){if(process.env.NODE_ENV!=="production")var w={},q=0;function W(J,ae,re,le,pe,me,ce){if(le=le||p,me=me||re,ce!==n){if(c){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=le+":"+re;!w[G]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),w[G]=!0,q++)}}return ae[re]==null?J?ae[re]===null?new m("The "+pe+" `"+me+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+pe+" `"+me+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:N(ae,re,le,pe,me)}var _=W.bind(null,!1);return _.isRequired=W.bind(null,!0),_}function y(N){function w(q,W,_,J,ae,re){var le=q[W],pe=D(le);if(pe!==N){var me=F(le);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+me+"` supplied to `"+_+"`, expected ")+("`"+N+"`."))}return null}return v(w)}function g(){return v(a)}function b(N){function w(q,W,_,J,ae){if(typeof N!="function")return new m("Property `"+ae+"` of component `"+_+"` has invalid PropType notation inside arrayOf.");var re=q[W];if(!Array.isArray(re)){var le=D(re);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an array."))}for(var pe=0;pe<re.length;pe++){var me=N(re,pe,_,J,ae+"["+pe+"]",n);if(me instanceof Error)return me}return null}return v(w)}function k(){function N(w,q,W,_,J){var ae=w[q];if(!s(ae)){var re=D(ae);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return v(N)}function S(){function N(w,q,W,_,J){var ae=w[q];if(!e.isValidElementType(ae)){var re=D(ae);return new m("Invalid "+_+" `"+J+"` of type "+("`"+re+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return v(N)}function $(N){function w(q,W,_,J,ae){if(!(q[W]instanceof N)){var re=N.name||p,le=V(q[W]);return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected ")+("instance of `"+re+"`."))}return null}return v(w)}function O(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function w(q,W,_,J,ae){for(var re=q[W],le=0;le<N.length;le++)if(h(re,N[le]))return null;var pe=JSON.stringify(N,function(ce,Q){var G=F(Q);return G==="symbol"?String(Q):Q});return new m("Invalid "+J+" `"+ae+"` of value `"+String(re)+"` "+("supplied to `"+_+"`, expected one of "+pe+"."))}return v(w)}function I(N){function w(q,W,_,J,ae){if(typeof N!="function")return new m("Property `"+ae+"` of component `"+_+"` has invalid PropType notation inside objectOf.");var re=q[W],le=D(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type "+("`"+le+"` supplied to `"+_+"`, expected an object."));for(var pe in re)if(o(re,pe)){var me=N(re,pe,_,J,ae+"."+pe,n);if(me instanceof Error)return me}return null}return v(w)}function B(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var w=0;w<N.length;w++){var q=N[w];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(q)+" at index "+w+"."),a}function W(_,J,ae,re,le){for(var pe=0;pe<N.length;pe++){var me=N[pe];if(me(_,J,ae,re,le,n)==null)return null}return new m("Invalid "+re+" `"+le+"` supplied to "+("`"+ae+"`."))}return v(W)}function T(){function N(w,q,W,_,J){return j(w[q])?null:new m("Invalid "+_+" `"+J+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return v(N)}function M(N){function w(q,W,_,J,ae){var re=q[W],le=D(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));for(var pe in N){var me=N[pe];if(me){var ce=me(re,pe,_,J,ae+"."+pe,n);if(ce)return ce}}return null}return v(w)}function R(N){function w(q,W,_,J,ae){var re=q[W],le=D(re);if(le!=="object")return new m("Invalid "+J+" `"+ae+"` of type `"+le+"` "+("supplied to `"+_+"`, expected `object`."));var pe=t({},q[W],N);for(var me in pe){var ce=N[me];if(!ce)return new m("Invalid "+J+" `"+ae+"` key `"+me+"` supplied to `"+_+"`.\nBad object: "+JSON.stringify(q[W],null," ")+`
|
|
348
|
+
Valid keys: `+JSON.stringify(Object.keys(N),null," "));var Q=ce(re,me,_,J,ae+"."+me,n);if(Q)return Q}return null}return v(w)}function j(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(j);if(N===null||s(N))return!0;var w=f(N);if(w){var q=w.call(N),W;if(w!==N.entries){for(;!(W=q.next()).done;)if(!j(W.value))return!1}else for(;!(W=q.next()).done;){var _=W.value;if(_&&!j(_[1]))return!1}}else return!1;return!0;default:return!1}}function U(N,w){return N==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function D(N){var w=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":U(w,N)?"symbol":w}function F(N){if(typeof N>"u"||N===null)return""+N;var w=D(N);if(w==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return w}function K(N){var w=F(N);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function V(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},Vm}var Wm,fk;function TX(){if(fk)return Wm;fk=1;var e=qm();function t(){}function n(){}return n.resetWarningCache=t,Wm=function(){function r(a,s,c,l,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Wm}if(process.env.NODE_ENV!=="production"){var OX=ak(),AX=!0;Bm.exports=CX()(OX.isElement,AX)}else Bm.exports=TX()();var PX=Bm.exports;const Ze=Ue(PX);var Km=E.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});Km.displayName="ScrollToBottomFunctionContext";function dk(){return E.useContext(Km)}function IX(){var e=dk(),t=e.scrollToEnd;return t}var Gm=E.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Gm.displayName="ScrollToBottomState1Context";var Zm=E.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Zm.displayName="ScrollToBottomState2Context";var Ym=E.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Ym.displayName="ScrollToBottomStateContext";var pk=[Ym,Gm,Zm];function RX(e){return E.useContext(pk[e]||pk[0])}function hk(){var e=RX(2),t=e.sticky;return[t]}var Iu=E.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Iu.displayName="ScrollToBottomInternalContext";function MX(){return E.useContext(Iu)}function Jm(){var e=MX(),t=e.styleToClassName;return t}var NX={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},Xm=function(t){var n=t.children,r=t.className,o=hk(),i=Er(o,1),a=i[0],s=Jm()(NX),c=IX();return!a&&E.createElement("button",{className:Lm(s,(r||"")+""),onClick:c,type:"button"},n)};Xm.defaultProps={children:void 0,className:""},Xm.propTypes={children:Ze.any,className:Ze.string};var mk={exports:{}},DX=at,jX=vn,yk=Yn.f;DX({target:"Object",stat:!0,forced:Object.defineProperty!==yk,sham:!jX},{defineProperty:yk});var FX=Kt,vk=FX.Object,LX=mk.exports=function(t,n,r){return vk.defineProperty(t,n,r)};vk.defineProperty.sham&&(LX.sham=!0);var BX=mk.exports,UX=BX,gk=UX,zX=gk,qX=zX,HX=qX,VX=HX,WX=VX;const KX=Ue(WX);var GX=As,ZX=GX.f("iterator"),YX=ZX,JX=YX,XX=JX,QX=XX,eQ=QX,tQ=eQ,nQ=tQ;const rQ=Ue(nQ);function js(e){"@babel/helpers - typeof";return js=typeof ca=="function"&&typeof rQ=="symbol"?function(t){return typeof t}:function(t){return t&&typeof ca=="function"&&t.constructor===ca&&t!==ca.prototype?"symbol":typeof t},js(e)}var oQ=As,iQ=oQ.f("toPrimitive"),aQ=iQ,sQ=aQ,cQ=sQ,lQ=cQ,uQ=lQ,fQ=uQ,dQ=fQ;const pQ=Ue(dQ);function hQ(e,t){if(js(e)!="object"||!e)return e;var n=e[pQ];if(n!==void 0){var r=n.call(e,t||"default");if(js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mQ(e){var t=hQ(e,"string");return js(t)=="symbol"?t:t+""}function yQ(e,t,n){return(t=mQ(t))in e?KX(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vQ(e){if(YE(e))return Fm(e)}function gQ(e){if(typeof ca<"u"&&H$(e)!=null||e["@@iterator"]!=null)return ek(e)}function bQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
349
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(e){return vQ(e)||gQ(e)||tk(e)||bQ()}var Ru=function(e){return e&&e.Math==Math&&e},On=Ru(typeof globalThis=="object"&&globalThis)||Ru(typeof window=="object"&&window)||Ru(typeof self=="object"&&self)||Ru(typeof Se=="object"&&Se)||function(){return this}()||Function("return this")(),Qm={},Xn=function(e){try{return!!e()}catch{return!0}},wQ=Xn,oi=!wQ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),bk={},wk={}.propertyIsEnumerable,xk=Object.getOwnPropertyDescriptor,xQ=xk&&!wk.call({1:2},1);bk.f=xQ?function(t){var n=xk(this,t);return!!n&&n.enumerable}:wk;var Sk=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},SQ={}.toString,ey=function(e){return SQ.call(e).slice(8,-1)},EQ=Xn,_Q=ey,$Q="".split,kQ=EQ(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return _Q(e)=="String"?$Q.call(e,""):Object(e)}:Object,Mu=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},CQ=kQ,TQ=Mu,ty=function(e){return CQ(TQ(e))},jn=function(e){return typeof e=="function"},OQ=jn,Fs=function(e){return typeof e=="object"?e!==null:OQ(e)},ny=On,AQ=jn,PQ=function(e){return AQ(e)?e:void 0},Nu=function(e,t){return arguments.length<2?PQ(ny[e]):ny[e]&&ny[e][t]},IQ=Nu,RQ=IQ("navigator","userAgent")||"",Ek=On,ry=RQ,_k=Ek.process,$k=Ek.Deno,kk=_k&&_k.versions||$k&&$k.version,Ck=kk&&kk.v8,_r,Du;Ck?(_r=Ck.split("."),Du=_r[0]<4?1:_r[0]+_r[1]):ry&&(_r=ry.match(/Edge\/(\d+)/),(!_r||_r[1]>=74)&&(_r=ry.match(/Chrome\/(\d+)/),_r&&(Du=_r[1])));var MQ=Du&&+Du,Tk=MQ,NQ=Xn,Ok=!!Object.getOwnPropertySymbols&&!NQ(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Tk&&Tk<41}),DQ=Ok,Ak=DQ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",jQ=jn,FQ=Nu,LQ=Ak,Pk=LQ?function(e){return typeof e=="symbol"}:function(e){var t=FQ("Symbol");return jQ(t)&&Object(e)instanceof t},BQ=function(e){try{return String(e)}catch{return"Object"}},UQ=jn,zQ=BQ,qQ=function(e){if(UQ(e))return e;throw TypeError(zQ(e)+" is not a function")},HQ=qQ,Ik=function(e,t){var n=e[t];return n==null?void 0:HQ(n)},oy=jn,iy=Fs,VQ=function(e,t){var n,r;if(t==="string"&&oy(n=e.toString)&&!iy(r=n.call(e))||oy(n=e.valueOf)&&!iy(r=n.call(e))||t!=="string"&&oy(n=e.toString)&&!iy(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Rk={exports:{}},Mk=On,ay=function(e,t){try{Object.defineProperty(Mk,e,{value:t,configurable:!0,writable:!0})}catch{Mk[e]=t}return t},WQ=On,KQ=ay,Nk="__core-js_shared__",GQ=WQ[Nk]||KQ(Nk,{}),sy=GQ,Dk=sy;(Rk.exports=function(e,t){return Dk[e]||(Dk[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var cy=Rk.exports,ZQ=Mu,jk=function(e){return Object(ZQ(e))},YQ=jk,JQ={}.hasOwnProperty,ii=Object.hasOwn||function(t,n){return JQ.call(YQ(t),n)},XQ=0,QQ=Math.random(),Fk=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++XQ+QQ).toString(36)},eee=On,tee=cy,Lk=ii,nee=Fk,Bk=Ok,ree=Ak,Ls=tee("wks"),Bs=eee.Symbol,oee=ree?Bs:Bs&&Bs.withoutSetter||nee,Us=function(e){return(!Lk(Ls,e)||!(Bk||typeof Ls[e]=="string"))&&(Bk&&Lk(Bs,e)?Ls[e]=Bs[e]:Ls[e]=oee("Symbol."+e)),Ls[e]},Uk=Fs,zk=Pk,iee=Ik,aee=VQ,see=Us,cee=see("toPrimitive"),lee=function(e,t){if(!Uk(e)||zk(e))return e;var n=iee(e,cee),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Uk(r)||zk(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),aee(e,t)},uee=lee,fee=Pk,qk=function(e){var t=uee(e,"string");return fee(t)?t:String(t)},dee=On,Hk=Fs,ly=dee.document,pee=Hk(ly)&&Hk(ly.createElement),Vk=function(e){return pee?ly.createElement(e):{}},hee=oi,mee=Xn,yee=Vk,Wk=!hee&&!mee(function(){return Object.defineProperty(yee("div"),"a",{get:function(){return 7}}).a!=7}),vee=oi,gee=bk,bee=Sk,wee=ty,xee=qk,See=ii,Eee=Wk,Kk=Object.getOwnPropertyDescriptor;Qm.f=vee?Kk:function(t,n){if(t=wee(t),n=xee(n),Eee)try{return Kk(t,n)}catch{}if(See(t,n))return bee(!gee.f.call(t,n),t[n])};var zs={},_ee=Fs,Co=function(e){if(_ee(e))return e;throw TypeError(String(e)+" is not an object")},$ee=oi,kee=Wk,Gk=Co,Cee=qk,Zk=Object.defineProperty;zs.f=$ee?Zk:function(t,n,r){if(Gk(t),n=Cee(n),Gk(r),kee)try{return Zk(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var Tee=oi,Oee=zs,Aee=Sk,ju=Tee?function(e,t,n){return Oee.f(e,t,Aee(1,n))}:function(e,t,n){return e[t]=n,e},Yk={exports:{}},Pee=jn,uy=sy,Iee=Function.toString;Pee(uy.inspectSource)||(uy.inspectSource=function(e){return Iee.call(e)});var Jk=uy.inspectSource,Ree=On,Mee=jn,Nee=Jk,Xk=Ree.WeakMap,Dee=Mee(Xk)&&/native code/.test(Nee(Xk)),jee=cy,Fee=Fk,Qk=jee("keys"),eC=function(e){return Qk[e]||(Qk[e]=Fee(e))},fy={},Lee=Dee,Bee=On,Uee=Fs,zee=ju,dy=ii,py=sy,qee=eC,Hee=fy,tC="Object already initialized",Vee=Bee.WeakMap,Fu,qs,Lu,Wee=function(e){return Lu(e)?qs(e):Fu(e,{})},Kee=function(e){return function(t){var n;if(!Uee(t)||(n=qs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(Lee||py.state){var ai=py.state||(py.state=new Vee),Gee=ai.get,nC=ai.has,Zee=ai.set;Fu=function(e,t){if(nC.call(ai,e))throw new TypeError(tC);return t.facade=e,Zee.call(ai,e,t),t},qs=function(e){return Gee.call(ai,e)||{}},Lu=function(e){return nC.call(ai,e)}}else{var la=qee("state");Hee[la]=!0,Fu=function(e,t){if(dy(e,la))throw new TypeError(tC);return t.facade=e,zee(e,la,t),t},qs=function(e){return dy(e,la)?e[la]:{}},Lu=function(e){return dy(e,la)}}var rC={set:Fu,get:qs,has:Lu,enforce:Wee,getterFor:Kee},hy=oi,Yee=ii,oC=Function.prototype,Jee=hy&&Object.getOwnPropertyDescriptor,my=Yee(oC,"name"),Xee=my&&(function(){}).name==="something",Qee=my&&(!hy||hy&&Jee(oC,"name").configurable),yy={EXISTS:my,PROPER:Xee,CONFIGURABLE:Qee},ete=On,iC=jn,tte=ii,aC=ju,nte=ay,rte=Jk,sC=rC,ote=yy.CONFIGURABLE,ite=sC.get,ate=sC.enforce,ste=String(String).split("String");(Yk.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,c;if(iC(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!tte(n,"name")||ote&&n.name!==s)&&aC(n,"name",s),c=ate(n),c.source||(c.source=ste.join(typeof s=="string"?s:""))),e===ete){i?e[t]=n:nte(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:aC(e,t,n)})(Function.prototype,"toString",function(){return iC(this)&&ite(this).source||rte(this)});var Hs=Yk.exports,cC={},cte=Math.ceil,lte=Math.floor,Bu=function(e){var t=+e;return t!==t||t===0?0:(t>0?lte:cte)(t)},ute=Bu,fte=Math.max,dte=Math.min,pte=function(e,t){var n=ute(e);return n<0?fte(n+t,0):dte(n,t)},hte=Bu,mte=Math.min,lC=function(e){return e>0?mte(hte(e),9007199254740991):0},yte=lC,vte=function(e){return yte(e.length)},gte=ty,bte=pte,wte=vte,uC=function(e){return function(t,n,r){var o=gte(t),i=wte(o),a=bte(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},xte={includes:uC(!0),indexOf:uC(!1)},vy=ii,Ste=ty,Ete=xte.indexOf,_te=fy,fC=function(e,t){var n=Ste(e),r=0,o=[],i;for(i in n)!vy(_te,i)&&vy(n,i)&&o.push(i);for(;t.length>r;)vy(n,i=t[r++])&&(~Ete(o,i)||o.push(i));return o},gy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$te=fC,kte=gy,Cte=kte.concat("length","prototype");cC.f=Object.getOwnPropertyNames||function(t){return $te(t,Cte)};var dC={};dC.f=Object.getOwnPropertySymbols;var Tte=Nu,Ote=cC,Ate=dC,Pte=Co,Ite=Tte("Reflect","ownKeys")||function(t){var n=Ote.f(Pte(t)),r=Ate.f;return r?n.concat(r(t)):n},Rte=ii,Mte=Ite,Nte=Qm,Dte=zs,jte=function(e,t){for(var n=Mte(t),r=Dte.f,o=Nte.f,i=0;i<n.length;i++){var a=n[i];Rte(e,a)||r(e,a,o(t,a))}},Fte=Xn,Lte=jn,Bte=/#|\.prototype\./,Vs=function(e,t){var n=zte[Ute(e)];return n==Hte?!0:n==qte?!1:Lte(t)?Fte(t):!!t},Ute=Vs.normalize=function(e){return String(e).replace(Bte,".").toLowerCase()},zte=Vs.data={},qte=Vs.NATIVE="N",Hte=Vs.POLYFILL="P",Vte=Vs,by=On,Wte=Qm.f,Kte=ju,Gte=Hs,Zte=ay,Yte=jte,Jte=Vte,Xte=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,c,l,u;if(r?a=by:o?a=by[n]||Zte(n,{}):a=(by[n]||{}).prototype,a)for(s in t){if(l=t[s],e.noTargetGet?(u=Wte(a,s),c=u&&u.value):c=a[s],i=Jte(r?s:n+(o?".":"#")+s,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;Yte(l,c)}(e.sham||c&&c.sham)&&Kte(l,"sham",!0),Gte(a,s,l,e)}},Qte=Us,ene=Qte("toStringTag"),pC={};pC[ene]="z";var wy=String(pC)==="[object z]",tne=wy,nne=jn,Uu=ey,rne=Us,one=rne("toStringTag"),ine=Uu(function(){return arguments}())=="Arguments",ane=function(e,t){try{return e[t]}catch{}},hC=tne?Uu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=ane(t=Object(e),one))=="string"?n:ine?Uu(t):(r=Uu(t))=="Object"&&nne(t.callee)?"Arguments":r},sne=hC,zu=function(e){if(sne(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},cne=Co,mC=function(){var e=cne(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},xy={},yC=Xn,lne=On,vC=lne.RegExp;xy.UNSUPPORTED_Y=yC(function(){var e=vC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),xy.BROKEN_CARET=yC(function(){var e=vC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var une=fC,fne=gy,dne=Object.keys||function(t){return une(t,fne)},pne=oi,hne=zs,mne=Co,yne=dne,vne=pne?Object.defineProperties:function(t,n){mne(t);for(var r=yne(n),o=r.length,i=0,a;o>i;)hne.f(t,a=r[i++],n[a]);return t},gne=Nu,bne=gne("document","documentElement"),wne=Co,xne=vne,gC=gy,Sne=fy,Ene=bne,_ne=Vk,$ne=eC,bC=">",wC="<",Sy="prototype",Ey="script",xC=$ne("IE_PROTO"),_y=function(){},SC=function(e){return wC+Ey+bC+e+wC+"/"+Ey+bC},EC=function(e){e.write(SC("")),e.close();var t=e.parentWindow.Object;return e=null,t},kne=function(){var e=_ne("iframe"),t="java"+Ey+":",n;return e.style.display="none",Ene.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(SC("document.F=Object")),n.close(),n.F},qu,Hu=function(){try{qu=new ActiveXObject("htmlfile")}catch{}Hu=typeof document<"u"?document.domain&&qu?EC(qu):kne():EC(qu);for(var e=gC.length;e--;)delete Hu[Sy][gC[e]];return Hu()};Sne[xC]=!0;var Cne=Object.create||function(t,n){var r;return t!==null?(_y[Sy]=wne(t),r=new _y,_y[Sy]=null,r[xC]=t):r=Hu(),n===void 0?r:xne(r,n)},Tne=Xn,One=On,Ane=One.RegExp,Pne=Tne(function(){var e=Ane(".","s");return!(e.dotAll&&e.exec(`
|
|
350
|
+
`)&&e.flags==="s")}),Ine=Xn,Rne=On,Mne=Rne.RegExp,Nne=Ine(function(){var e=Mne("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Dne=zu,jne=mC,_C=xy,Fne=cy,Lne=Cne,Bne=rC.get,Une=Pne,zne=Nne,Vu=RegExp.prototype.exec,qne=Fne("native-string-replace",String.prototype.replace),$y=Vu,ky=function(){var e=/a/,t=/b*/g;return Vu.call(e,"a"),Vu.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),$C=_C.UNSUPPORTED_Y||_C.BROKEN_CARET,Cy=/()??/.exec("")[1]!==void 0,Hne=ky||Cy||$C||Une||zne;Hne&&($y=function(t){var n=this,r=Bne(n),o=Dne(t),i=r.raw,a,s,c,l,u,f,p;if(i)return i.lastIndex=n.lastIndex,a=$y.call(i,o),n.lastIndex=i.lastIndex,a;var d=r.groups,h=$C&&n.sticky,m=jne.call(n),v=n.source,y=0,g=o;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),g=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
|
|
351
|
+
`)&&(v="(?: "+v+")",g=" "+g,y++),s=new RegExp("^(?:"+v+")",m)),Cy&&(s=new RegExp("^"+v+"$(?!\\s)",m)),ky&&(c=n.lastIndex),l=Vu.call(h?s:n,g),h?l?(l.input=l.input.slice(y),l[0]=l[0].slice(y),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:ky&&l&&(n.lastIndex=n.global?l.index+l[0].length:c),Cy&&l&&l.length>1&&qne.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&d)for(l.groups=f=Lne(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=l[p[1]];return l});var Ty=$y,Vne=Xte,kC=Ty;Vne({target:"RegExp",proto:!0,forced:/./.exec!==kC},{exec:kC});var CC=Hs,Wne=Ty,TC=Xn,OC=Us,Kne=ju,Gne=OC("species"),Oy=RegExp.prototype,Zne=function(e,t,n,r){var o=OC(e),i=!TC(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!TC(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Gne]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return l=!0,null},u[o](""),!l});if(!i||!a||n){var s=/./[o],c=t(o,""[e],function(l,u,f,p,d){var h=u.exec;return h===Wne||h===Oy.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:l.call(f,u,p)}:{done:!1}});CC(String.prototype,e,c[0]),CC(Oy,o,c[1])}r&&Kne(Oy[o],"sham",!0)},Yne=Bu,Jne=zu,Xne=Mu,AC=function(e){return function(t,n){var r=Jne(Xne(t)),o=Yne(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},Qne={codeAt:AC(!1),charAt:AC(!0)},ere=Qne.charAt,tre=function(e,t,n){return t+(n?ere(e,t).length:1)},nre=jk,rre=Math.floor,ore="".replace,ire=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,are=/\$([$&'`]|\d{1,2})/g,sre=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,c=are;return o!==void 0&&(o=nre(o),c=ire),ore.call(i,c,function(l,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return l;if(p>s){var d=rre(p/10);return d===0?l:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},cre=Co,lre=jn,ure=ey,fre=Ty,dre=function(e,t){var n=e.exec;if(lre(n)){var r=n.call(e,t);return r!==null&&cre(r),r}if(ure(e)==="RegExp")return fre.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},pre=Zne,hre=Xn,mre=Co,yre=jn,vre=Bu,gre=lC,ua=zu,bre=Mu,wre=tre,xre=Ik,Sre=sre,Ere=dre,_re=Us,Ay=_re("replace"),$re=Math.max,kre=Math.min,Cre=function(e){return e===void 0?e:String(e)},Tre=function(){return"a".replace(/./,"$0")==="$0"}(),PC=function(){return/./[Ay]?/./[Ay]("a","$0")==="":!1}(),Ore=!hre(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});pre("replace",function(e,t,n){var r=PC?"$":"$0";return[function(i,a){var s=bre(this),c=i==null?void 0:xre(i,Ay);return c?c.call(i,s,a):t.call(ua(s),i,a)},function(o,i){var a=mre(this),s=ua(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var c=n(t,a,s,i);if(c.done)return c.value}var l=yre(i);l||(i=ua(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=Ere(a,s);if(d===null||(p.push(d),!u))break;var h=ua(d[0]);h===""&&(a.lastIndex=wre(s,gre(a.lastIndex),f))}for(var m="",v=0,y=0;y<p.length;y++){d=p[y];for(var g=ua(d[0]),b=$re(kre(vre(d.index),s.length),0),k=[],S=1;S<d.length;S++)k.push(Cre(d[S]));var $=d.groups;if(l){var O=[g].concat(k,b,s);$!==void 0&&O.push($);var I=ua(i.apply(void 0,O))}else I=Sre(g,s,b,k,$,i);b>=v&&(m+=s.slice(v,b)+I,v=b+g.length)}return m+s.slice(v)}]},!Ore||!Tre||PC);var Ws=It,Are=Oh,Pre=Qo,Wu=function(e){return Are.slice(0,e.length)===e},Ire=function(){return Wu("Bun/")?"BUN":Wu("Cloudflare-Workers")?"CLOUDFLARE":Wu("Deno/")?"DENO":Wu("Node.js/")?"NODE":Ws.Bun&&typeof Bun.version=="string"?"BUN":Ws.Deno&&typeof Deno.version=="object"?"DENO":Pre(Ws.process)==="process"?"NODE":Ws.window&&Ws.document?"BROWSER":"REST"}(),Rre=TypeError,Mre=function(e,t){if(e<t)throw new Rre("Not enough arguments");return e},IC=It,Nre=bh,Dre=rn,jre=Ire,Fre=Oh,Lre=yu,Bre=Mre,Ure=IC.Function,zre=/MSIE .\./.test(Fre)||jre==="BUN"&&function(){var e=IC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),RC=function(e,t){var n=t?2:1;return zre?function(r,o){var i=Bre(arguments.length,1)>n,a=Dre(r)?r:Ure(r),s=i?Lre(arguments,n):[],c=i?function(){Nre(a,this,s)}:a;return t?e(c,o):e(c)}:e},qre=at,MC=It,Hre=RC,NC=Hre(MC.setInterval,!0);qre({global:!0,bind:!0,forced:MC.setInterval!==NC},{setInterval:NC});var Vre=at,DC=It,Wre=RC,jC=Wre(DC.setTimeout,!0);Vre({global:!0,bind:!0,forced:DC.setTimeout!==jC},{setTimeout:jC});var Kre=Kt,Gre=Kre.setInterval,Zre=Gre;const Yre=Ue(Zre);var Jre=Rt,FC=function(e,t){var n=[][e];return!!n&&Jre(function(){n.call(null,t||function(){return 1},1)})},Xre=at,Qre=xh,eoe=c_.indexOf,toe=FC,Py=Qre([].indexOf),LC=!!Py&&1/Py([1],1,-0)<0,noe=LC||!toe("indexOf");Xre({target:"Array",proto:!0,forced:noe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return LC?Py(this,t,n)||0:eoe(this,t,n)}});var roe=ri,ooe=roe("Array","indexOf"),ioe=Hr,aoe=ooe,Iy=Array.prototype,soe=function(e){var t=e.indexOf;return e===Iy||ioe(Iy,e)&&t===Iy.indexOf?aoe:t},coe=soe,loe=coe,uoe=loe;const foe=Ue(uoe);var BC=ou,doe=TypeError,poe=function(e,t){if(!delete e[t])throw new doe("Cannot delete property "+BC(t)+" of "+BC(e))},hoe=at,moe=Vr,yoe=Qh,voe=su,goe=ei,boe=V$,woe=Kh,xoe=Xh,Soe=ks,Ry=poe,Eoe=lu,_oe=Eoe("splice"),$oe=Math.max,koe=Math.min;hoe({target:"Array",proto:!0,forced:!_oe},{splice:function(t,n){var r=moe(this),o=goe(r),i=yoe(t,o),a=arguments.length,s,c,l,u,f,p;for(a===0?s=c=0:a===1?(s=0,c=o-i):(s=a-2,c=koe($oe(voe(n),0),o-i)),woe(o+s-c),l=xoe(r,c),u=0;u<c;u++)f=i+u,f in r&&Soe(l,u,r[f]);if(l.length=c,s<c){for(u=i;u<o-c;u++)f=u+c,p=u+s,f in r?r[p]=r[f]:Ry(r,p);for(u=o;u>o-c+s;u--)Ry(r,u-1)}else if(s>c)for(u=o-c;u>i;u--)f=u+c-1,p=u+s-1,f in r?r[p]=r[f]:Ry(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return boe(r,o-c+s),l}});var Coe=ri,Toe=Coe("Array","splice"),Ooe=Hr,Aoe=Toe,My=Array.prototype,Poe=function(e){var t=e.splice;return e===My||Ooe(My,e)&&t===My.splice?Aoe:t},Ioe=Poe,Roe=Ioe,Moe=Roe;const Noe=Ue(Moe);var Doe=ri,joe=Doe("Array","concat"),Foe=Hr,Loe=joe,Ny=Array.prototype,Boe=function(e){var t=e.concat;return e===Ny||Foe(Ny,e)&&t===Ny.concat?Loe:t},Uoe=Boe,zoe=Uoe,qoe=zoe;const bt=Ue(qoe);var Hoe=at,Voe=Mt,UC=Date,Woe=Voe(UC.prototype.getTime);Hoe({target:"Date",stat:!0},{now:function(){return Woe(new UC)}});var Koe=Kt,Goe=Koe.Date.now,Zoe=Goe,Yoe=Zoe,Joe=Yoe;const To=Ue(Joe);var Xoe=fm.forEach,Qoe=FC,eie=Qoe("forEach"),tie=eie?[].forEach:function(t){return Xoe(this,t,arguments.length>1?arguments[1]:void 0)},nie=at,zC=tie;nie({target:"Array",proto:!0,forced:[].forEach!==zC},{forEach:zC});var rie=ri,oie=rie("Array","forEach"),iie=oie,aie=iie,sie=Cs,cie=Tn,lie=Hr,uie=aie,Dy=Array.prototype,fie={DOMTokenList:!0,NodeList:!0},die=function(e){var t=e.forEach;return e===Dy||lie(Dy,e)&&t===Dy.forEach||cie(fie,sie(e))?uie:t},pie=die;const Ku=Ue(pie);var hie=at,mie=Vr,qC=nm,yie=Rt,vie=yie(function(){qC(1)});hie({target:"Object",stat:!0,forced:vie},{keys:function(t){return qC(mie(t))}});var gie=Kt,bie=gie.Object.keys,wie=bie,xie=wie,Sie=xie;const Eie=Ue(Sie);var _ie=Kt,$ie=_ie.Object.getOwnPropertySymbols,kie=$ie,Cie=kie,Tie=Cie;const HC=Ue(Tie);var Oie=at,Aie=fm.filter,Pie=lu,Iie=Pie("filter");Oie({target:"Array",proto:!0,forced:!Iie},{filter:function(t){return Aie(this,t,arguments.length>1?arguments[1]:void 0)}});var Rie=ri,Mie=Rie("Array","filter"),Nie=Hr,Die=Mie,jy=Array.prototype,jie=function(e){var t=e.filter;return e===jy||Nie(jy,e)&&t===jy.filter?Die:t},Fie=jie,Lie=Fie,Bie=Lie;const Uie=Ue(Bie);var VC={exports:{}},zie=at,qie=Rt,Hie=wr,WC=xs.f,KC=vn,Vie=!KC||qie(function(){WC(1)});zie({target:"Object",stat:!0,forced:Vie,sham:!KC},{getOwnPropertyDescriptor:function(t,n){return WC(Hie(t),n)}});var Wie=Kt,GC=Wie.Object,Kie=VC.exports=function(t,n){return GC.getOwnPropertyDescriptor(t,n)};GC.getOwnPropertyDescriptor.sham&&(Kie.sham=!0);var Gie=VC.exports,Zie=Gie,Yie=Zie,Jie=Yie;const ZC=Ue(Jie);var Xie=xr,Qie=Mt,eae=mu,tae=vu,nae=_o,rae=Qie([].concat),oae=Xie("Reflect","ownKeys")||function(t){var n=eae.f(nae(t)),r=tae.f;return r?rae(n,r(t)):n},iae=at,aae=vn,sae=oae,cae=wr,lae=xs,uae=ks;iae({target:"Object",stat:!0,sham:!aae},{getOwnPropertyDescriptors:function(t){for(var n=cae(t),r=lae.f,o=sae(n),i={},a=0,s,c;o.length>a;)c=r(n,s=o[a++]),c!==void 0&&uae(i,s,c);return i}});var fae=Kt,dae=fae.Object.getOwnPropertyDescriptors,pae=dae,hae=pae,mae=hae;const YC=Ue(mae);var JC={exports:{}},yae=at,vae=vn,XC=uu.f;yae({target:"Object",stat:!0,forced:Object.defineProperties!==XC,sham:!vae},{defineProperties:XC});var gae=Kt,QC=gae.Object,bae=JC.exports=function(t,n){return QC.defineProperties(t,n)};QC.defineProperties.sham&&(bae.sham=!0);var wae=JC.exports,xae=wae,Sae=xae,Eae=Sae;const _ae=Ue(Eae);var $ae=gk;const kae=Ue($ae);var Cae=!1;function Tae(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Oae(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Aae=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!Cae:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Oae(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Tae(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),on="-ms-",Gu="-moz-",Je="-webkit-",eT="comm",Fy="rule",Ly="decl",Pae="@import",tT="@keyframes",Iae="@layer",Rae=Math.abs,Zu=String.fromCharCode,Mae=Object.assign;function Nae(e,t){return Gt(e,0)^45?(((t<<2^Gt(e,0))<<2^Gt(e,1))<<2^Gt(e,2))<<2^Gt(e,3):0}function nT(e){return e.trim()}function Dae(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function By(e,t){return e.indexOf(t)}function Gt(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function $r(e){return e.length}function Uy(e){return e.length}function Yu(e,t){return t.push(e),e}function jae(e,t){return e.map(t).join("")}var Ju=1,fa=1,rT=0,bn=0,kt=0,da="";function Xu(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ju,column:fa,length:a,return:""}}function Gs(e,t){return Mae(Xu("",null,null,"",null,null,0),e,{length:-e.length},t)}function Fae(){return kt}function Lae(){return kt=bn>0?Gt(da,--bn):0,fa--,kt===10&&(fa=1,Ju--),kt}function An(){return kt=bn<rT?Gt(da,bn++):0,fa++,kt===10&&(fa=1,Ju++),kt}function kr(){return Gt(da,bn)}function Qu(){return bn}function Zs(e,t){return Ks(da,e,t)}function Ys(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oT(e){return Ju=fa=1,rT=$r(da=e),bn=0,[]}function iT(e){return da="",e}function ef(e){return nT(Zs(bn-1,zy(e===91?e+2:e===40?e+1:e)))}function Bae(e){for(;(kt=kr())&&kt<33;)An();return Ys(e)>2||Ys(kt)>3?"":" "}function Uae(e,t){for(;--t&&An()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Zs(e,Qu()+(t<6&&kr()==32&&An()==32))}function zy(e){for(;An();)switch(kt){case e:return bn;case 34:case 39:e!==34&&e!==39&&zy(kt);break;case 40:e===41&&zy(e);break;case 92:An();break}return bn}function zae(e,t){for(;An()&&e+kt!==47+10;)if(e+kt===42+42&&kr()===47)break;return"/*"+Zs(t,bn-1)+"*"+Zu(e===47?e:An())}function qae(e){for(;!Ys(kr());)An();return Zs(e,bn)}function Hae(e){return iT(tf("",null,null,null,[""],e=oT(e),0,[0],e))}function tf(e,t,n,r,o,i,a,s,c){for(var l=0,u=0,f=a,p=0,d=0,h=0,m=1,v=1,y=1,g=0,b="",k=o,S=i,$=r,O=b;v;)switch(h=g,g=An()){case 40:if(h!=108&&Gt(O,f-1)==58){By(O+=Xe(ef(g),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:O+=ef(g);break;case 9:case 10:case 13:case 32:O+=Bae(h);break;case 92:O+=Uae(Qu()-1,7);continue;case 47:switch(kr()){case 42:case 47:Yu(Vae(zae(An(),Qu()),t,n),c);break;default:O+="/"}break;case 123*m:s[l++]=$r(O)*y;case 125*m:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+u:y==-1&&(O=Xe(O,/\f/g,"")),d>0&&$r(O)-f&&Yu(d>32?sT(O+";",r,n,f-1):sT(Xe(O," ","")+";",r,n,f-2),c);break;case 59:O+=";";default:if(Yu($=aT(O,t,n,l,u,o,s,b,k=[],S=[],f),i),g===123)if(u===0)tf(O,t,$,$,k,i,f,s,S);else switch(p===99&&Gt(O,3)===110?100:p){case 100:case 108:case 109:case 115:tf(e,$,$,r&&Yu(aT(e,$,$,0,0,o,s,b,o,k=[],f),S),o,S,f,s,r?k:S);break;default:tf(O,$,$,$,[""],S,0,s,S)}}l=u=d=0,m=y=1,b=O="",f=a;break;case 58:f=1+$r(O),d=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&Lae()==125)continue}switch(O+=Zu(g),g*m){case 38:y=u>0?1:(O+="\f",-1);break;case 44:s[l++]=($r(O)-1)*y,y=1;break;case 64:kr()===45&&(O+=ef(An())),p=kr(),u=f=$r(b=O+=qae(Qu())),g++;break;case 45:h===45&&$r(O)==2&&(m=0)}}return i}function aT(e,t,n,r,o,i,a,s,c,l,u){for(var f=o-1,p=o===0?i:[""],d=Uy(p),h=0,m=0,v=0;h<r;++h)for(var y=0,g=Ks(e,f+1,f=Rae(m=a[h])),b=e;y<d;++y)(b=nT(m>0?p[y]+" "+g:Xe(g,/&\f/g,p[y])))&&(c[v++]=b);return Xu(e,t,n,o===0?Fy:s,c,l,u)}function Vae(e,t,n){return Xu(e,t,n,eT,Zu(Fae()),Ks(e,2,-2),0)}function sT(e,t,n,r){return Xu(e,t,n,Ly,Ks(e,0,r),Ks(e,r+1,-1),r)}function pa(e,t){for(var n="",r=Uy(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Wae(e,t,n,r){switch(e.type){case Iae:if(e.children.length)break;case Pae:case Ly:return e.return=e.return||e.value;case eT:return"";case tT:return e.return=e.value+"{"+pa(e.children,r)+"}";case Fy:e.value=e.props.join(",")}return $r(n=pa(e.children,r))?e.return=e.value+"{"+n+"}":""}function Kae(e){var t=Uy(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Gae(e){return function(t){t.root||(t=t.return)&&e(t)}}function Zae(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Yae=function(t,n,r){for(var o=0,i=0;o=i,i=kr(),o===38&&i===12&&(n[r]=1),!Ys(i);)An();return Zs(t,bn)},Jae=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&kr()===12&&(n[r]=1),t[r]+=Yae(bn-1,n,r);break;case 2:t[r]+=ef(o);break;case 4:if(o===44){t[++r]=kr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Zu(o)}while(o=An());return t},Xae=function(t,n){return iT(Jae(oT(t),n))},cT=new WeakMap,Qae=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!cT.get(r))&&!o){cT.set(t,!0);for(var i=[],a=Xae(n,i),s=r.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},ese=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function lT(e,t){switch(Nae(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+Gu+e+on+e+e;case 6828:case 4268:return Je+e+on+e+e;case 6165:return Je+e+on+"flex-"+e+e;case 5187:return Je+e+Xe(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+on+"flex-$1$2")+e;case 5443:return Je+e+on+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Je+e+on+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Je+e+on+Xe(e,"shrink","negative")+e;case 5292:return Je+e+on+Xe(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+Xe(e,"-grow","")+Je+e+on+Xe(e,"grow","positive")+e;case 4554:return Je+Xe(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Je+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if($r(e)-1-t>6)switch(Gt(e,t+1)){case 109:if(Gt(e,t+4)!==45)break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+Gu+(Gt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~By(e,"stretch")?lT(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Gt(e,t+1)!==115)break;case 6444:switch(Gt(e,$r(e)-3-(~By(e,"!important")&&10))){case 107:return Xe(e,":",":"+Je)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(Gt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+on+"$2box$3")+e}break;case 5936:switch(Gt(e,t+11)){case 114:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+on+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Je+e+on+e+e}return e}var tse=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Ly:t.return=lT(t.value,t.length);break;case tT:return pa([Gs(t,{value:Xe(t.value,"@","@"+Je)})],o);case Fy:if(t.length)return jae(t.props,function(i){switch(Dae(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pa([Gs(t,{props:[Xe(i,/:(read-\w+)/,":"+Gu+"$1")]})],o);case"::placeholder":return pa([Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Je+"input-$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,":"+Gu+"$1")]}),Gs(t,{props:[Xe(i,/:(plac\w+)/,on+"input-$1")]})],o)}return""})}},nse=[tse],rse=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||nse,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)i[v[y]]=!0;s.push(m)});var c,l=[Qae,ese];{var u,f=[Wae,Gae(function(m){u.insert(m)})],p=Kae(l.concat(o,f)),d=function(v){return pa(Hae(v),p)};c=function(v,y,g,b){u=g,d(v?v+"{"+y.styles+"}":y.styles),b&&(h.inserted[y.name]=!0)}}var h={key:n,sheet:new Aae({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return h.sheet.hydrate(s),h};function ose(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ise={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ase=!1,sse=/[A-Z]|^ms/g,cse=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uT=function(t){return t.charCodeAt(1)===45},fT=function(t){return t!=null&&typeof t!="boolean"},qy=Zae(function(e){return uT(e)?e:e.replace(sse,"-$&").toLowerCase()}),dT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(cse,function(r,o,i){return Cr={name:o,styles:i,next:Cr},o})}return ise[t]!==1&&!uT(t)&&typeof n=="number"&&n!==0?n+"px":n},lse="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Js(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Cr={name:o.name,styles:o.styles,next:Cr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Cr={name:a.name,styles:a.styles,next:Cr},a=a.next;var s=i.styles+";";return s}return use(e,t,n)}case"function":{if(e!==void 0){var c=Cr,l=n(e);return Cr=c,Js(e,t,l)}break}}var u=n;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function use(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Js(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":fT(s)&&(r+=qy(i)+":"+dT(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&ase)throw new Error(lse);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)fT(a[c])&&(r+=qy(i)+":"+dT(i,a[c])+";");else{var l=Js(e,t,a);switch(i){case"animation":case"animationName":{r+=qy(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}}return r}var pT=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Cr;function Hy(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Cr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Js(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Js(n,t,e[s]),r){var c=i;o+=c[s]}pT.lastIndex=0;for(var l="",u;(u=pT.exec(o))!==null;)l+="-"+u[1];var f=ose(o)+l;return{name:f,styles:o,next:Cr}}var fse=!0;function hT(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var dse=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||fse===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},pse=function(t,n,r){dse(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function mT(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function yT(e,t,n){var r=[],o=hT(e,r,n);return r.length<2?n:o+t(r)}var hse=function(t){var n=rse(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered,void 0);return pse(n,f,!1),n.key+"-"+f.name},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered),p="animation-"+f.name;return mT(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var f=Hy(l,n.registered);mT(n,f)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return yT(n.registered,r,mse(l))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hT.bind(null,n.registered),merge:yT.bind(null,n.registered,r)}},mse=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(n&&(n+=" "),n+=i)}}return n},yse=Hs,Vy=Date.prototype,vT="Invalid Date",gT="toString",vse=Vy[gT],gse=Vy.getTime;String(new Date(NaN))!=vT&&yse(Vy,gT,function(){var t=gse.call(this);return t===t?vse.call(this):vT});var bse=wy,wse=hC,xse=bse?{}.toString:function(){return"[object "+wse(this)+"]"},Sse=wy,Ese=Hs,_se=xse;Sse||Ese(Object.prototype,"toString",_se,{unsafe:!0});var $se=yy.PROPER,kse=Hs,Cse=Co,bT=zu,Tse=Xn,Ose=mC,Wy="toString",wT=RegExp.prototype,xT=wT[Wy],Ase=Tse(function(){return xT.call({source:"a",flags:"b"})!="/a/b"}),Pse=$se&&xT.name!=Wy;(Ase||Pse)&&kse(RegExp.prototype,Wy,function(){var t=Cse(this),n=bT(t.source),r=t.flags,o=bT(r===void 0&&t instanceof RegExp&&!("flags"in wT)?Ose.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var ST=typeof window<"u"?window:self,Ise=ST.crypto||ST.msCrypto,Rse=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Ise);const Mse=Ue(Rse);function Nse(){return Mse().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Dse=ZE;const ET=Ue(Dse);function rt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function _T(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return bt(n=[bt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,We(rt("green","white")),i)}function jse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,c=Er(s,1),l=c[0];typeof l=="function"&&(i=l());var u=ET(i[0])?i:[i],f=u.length===1;Ku(u).call(u,function(p,d){if(f){var h,m;(h=console).log.apply(h,We(_T.apply(void 0,bt(m=[e]).call(m,We(p)))))}else if(d){var v;(v=console).log.apply(v,We(ET(p)?p:[p]))}else{var y,g;(y=console).groupCollapsed.apply(y,We(_T.apply(void 0,bt(g=[e]).call(g,We(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var Fse=oi,Lse=yy.EXISTS,Bse=zs.f,$T=Function.prototype,Use=$T.toString,zse=/^\s*function ([^ (]*)/,qse="name";Fse&&!Lse&&Bse($T,qse,{configurable:!0,get:function(){try{return Use.call(this).match(zse)[1]}catch{return""}}});var Hse=Kt,Vse=Hse.setTimeout,Wse=Vse;const Kse=Ue(Wse);function Gse(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=To();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Kse(function(){e.apply(void 0,i),n=To()},Math.max(0,t-s+n)))}}var kT=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=E.useRef();a.current=o;var s=E.useMemo(function(){return Gse(function(l){var u=a.current;u&&u(l)},n)},[n,a]),c=E.useCallback(function(l){l.timeStampLow=To(),s(l)},[s]);return E.useLayoutEffect(function(){return i.addEventListener(r,c,{passive:!0}),c({target:i,type:r}),function(){return i.removeEventListener(r,c)}},[r,c,i]),!1};kT.defaultProps={debounce:200};var Zse=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Yse=at,Jse=Zse;Yse({target:"Math",stat:!0},{sign:Jse});var Xse=Kt,Qse=Xse.Math.sign,ece=Qse,tce=ece,nce=tce;const rce=Ue(nce);function oce(e,t){var n=rce(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function ice(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var CT=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=E.useRef(),s=E.useCallback(function(l,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:To();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=f==="100%"?o.scrollHeight-o.offsetHeight:f,m=ice(u,h,oce,(To()-d)/5);Math.abs(h-m)<1.5&&(m=h),o[l]=m,h===m?r&&r(!0):s(l,u,f,p+1,d)}}))},[a,r,o]),c=E.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return E.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",c,{passive:!0}),o.addEventListener("wheel",c,{passive:!0}),function(){o.removeEventListener("pointerdown",c),o.removeEventListener("wheel",c),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,c,n,o,i]),!1};CT.propTypes={name:Ze.string.isRequired,onEnd:Ze.func,target:Ze.any.isRequired,value:Ze.oneOfType([Ze.number,Ze.oneOf(["100%"])]).isRequired};function Ky(e){var t=E.useState(e),n=Er(t,2),r=n[0],o=n[1],i=E.useRef(),a=E.useCallback(function(s){typeof s=="function"?a(function(c){return s=s(c),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function TT(e,t){var n=Eie(e);if(HC){var r=HC(e);t&&(r=Uie(r).call(r,function(o){return ZC(e,o).enumerable})),n.push.apply(n,r)}return n}function OT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Ku(r=TT(Object(n),!0)).call(r,function(i){yQ(e,i,n[i])})}else if(YC)_ae(e,YC(n));else{var o;Ku(o=TT(Object(n))).call(o,function(i){kae(e,i,ZC(n,i))})}}return e}var ace=function(){return 1/0},AT=17,sce="bottom",Qn="top",PT=1,cce=34,IT={};function lce(e,t){return e(),Yre(e,t)}function RT(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<PT,s=i<PT,c=t===Qn?s:a,l=t!==Qn?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function Xs(e,t){return e===(t===Qn?0:"100%")}var Gy=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=E.useMemo(function(){return jse("<ScrollToBottom>",{force:i})},[i]);s=s===Qn?Qn:sce;var f=E.useRef(0),p=E.useRef(a),d=Ky(s===Qn?0:"100%"),h=Er(d,3),m=h[0],v=h[1],y=h[2],g=Ky(null),b=Er(g,3),k=b[0],S=b[1],$=b[2],O=E.useRef(0),I=E.useRef(0),B=E.useRef(0),T=E.useState(!0),M=Er(T,2),R=M[0],j=M[1],U=E.useState(!0),D=Er(U,2),F=D[0],K=D[1],V=E.useState(!0),N=Er(V,2),w=N[0],q=N[1],W=E.useState(!1),_=Er(W,2),J=_[0],ae=_[1],re=Ky(!0),le=Er(re,3),pe=le[0],me=le[1],ce=le[2],Q=E.useRef([]),G=E.useCallback(function(H){var te=$.current;return Q.current.push(H),te&&H({scrollTop:te.scrollTop}),function(){var de=Q.current,Pe=foe(de).call(de,H);~Pe&&Noe(de).call(de,Pe,1)}},[Q,$]),fe=E.useCallback(function(){var H=y.current;u(function(){var te;return bt(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,We(rt("magenta")),We(rt("orange")),[{animateTo:H}])}),f.current=To(),Xs(H,s)||me(!1),v(null)},[y,u,f,s,v,me]),ve=E.useCallback(function(H){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=te.behavior,Pe=$.current;if(typeof H!="number"&&H!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Will scroll to %c".concat(typeof H=="number"?H+"px":H.replace(/%/g,"%%"),"%c")]).call(Ce,We(rt("lime","")),We(rt("purple"))),{behavior:de,nextAnimateTo:H,target:Pe}]}),de==="auto"?(fe(),Pe&&(Pe.scrollTop=H==="100%"?Pe.scrollHeight-Pe.offsetHeight:H)):(de!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),v(H)),Xs(H,s)&&(u(function(){var Ce;return[bt(Ce=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ce,We(rt("lime","")),We(rt("purple"))),[{mode:s,nextAnimateTo:H}]]}),me(!0))},[u,fe,s,v,me,$]),_e=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var de;return bt(de=["%cscrollToBottom%c: Called"]).call(de,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:te||"smooth"})},[u,ve]),P=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var de;return bt(de=["%cscrollToTop%c: Called"]).call(de,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:te||"smooth"})},[u,ve]),X=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var Pe;return bt(Pe=["%cscrollToEnd%c: Called"]).call(Pe,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?P(de):_e(de)},[u,s,_e,P]),oe=E.useCallback(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=H.behavior;u(function(){var Pe;return bt(Pe=["%cscrollToStart%c: Called"]).call(Pe,We(rt("yellow","")))}),te!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var de={behavior:te||"smooth"};s===Qn?_e(de):P(de)},[u,s,_e,P]),ee=E.useCallback(function(){var H=$.current;if(H){if(p.current==="auto"){u(function(){var pt;return bt(pt=["%ctarget changed%c: Initial scroll"]).call(pt,We(rt("blue")))}),H.scrollTop=s===Qn?0:H.scrollHeight-H.offsetHeight,p.current=!1;return}var te=O.current,de=H.offsetHeight,Pe=H.scrollHeight,Ce=H.scrollTop,Be=s===Qn?0:Math.max(0,Pe-de-Ce),ut=Math.max(0,te-Ce),Nt=l({maxValue:Be,minValue:ut,offsetHeight:de,scrollHeight:Pe,scrollTop:Ce}),ot=Math.max(0,Math.min(Be,Nt)),nt;s===Qn||ot!==Be?nt=Ce+ot:nt="100%",u(function(){var pt,ht,wn;return[bt(pt=[bt(ht=bt(wn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(wn,typeof nt=="number"?nt+"px":nt.replace(/%/g,"%%"),"%c (%c")).call(ht,(nt==="100%"?Be:nt)+te,"px%c)")]).call(pt,We(rt("orange")),We(rt("purple")),We(rt("purple")),We(rt("purple"))),{animateFrom:te,maxValue:Be,minValue:ut,nextAnimateTo:nt,nextValue:ot,offsetHeight:de,rawNextValue:Nt,scrollHeight:Pe,scrollTop:Ce}]}),ve(nt,{behavior:"smooth"})}},[O,u,s,l,ve,$]),xe=E.useCallback(function(H){var te,de=H.timeStampLow,Pe=y.current,Ce=$.current,Be=Pe!==null;if(!(de<=f.current||!Ce)){var ut=RT({mode:s,target:Ce}),Nt=ut.atBottom,ot=ut.atEnd,nt=ut.atStart,pt=ut.atTop;j(Nt),K(ot),ae(nt),q(pt);var ht=Ce.offsetHeight,wn=Ce.scrollHeight,Pn=I.current,er=B.current,Gr=ht!==Pn,Tr=wn!==er;if(Gr&&(I.current=ht),Tr&&(B.current=wn),!Gr&&!Tr){var tr=Be&&Xs(Pe,s)||ot;ce.current!==tr&&(u(function(){var it,mt,Dt,jt;return[bt(it=["%conScroll%c: %csetSticky%c(%c".concat(tr,"%c)")]).call(it,We(rt("red")),We(rt("red")),We(rt("purple"))),bt(mt=[bt(Dt=bt(jt="(animating = %c".concat(Be,"%c && isEnd = %c")).call(jt,Xs(Pe,s),"%c) || atEnd = %c")).call(Dt,ot,"%c")]).call(mt,We(rt("purple")),We(rt("purple")),We(rt("purple")),[{animating:Be,animateTo:Pe,atEnd:ot,mode:s,offsetHeight:Ce.offsetHeight,scrollHeight:Ce.scrollHeight,sticky:ce.current,nextSticky:tr}])]}),me(tr))}else ce.current&&(u(function(){var it;return[bt(it=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(it,We(rt("red")),We(rt("orange")),[{offsetHeightChanged:Gr,scrollHeightChanged:Tr}]),{nextOffsetHeight:ht,prevOffsetHeight:Pn,nextScrollHeight:wn,prevScrollHeight:er}]}),ee());var Zr=Ce.scrollTop;Ku(te=Q.current).call(te,function(it){return it({scrollTop:Zr})})}},[y,u,f,s,I,B,Q,ee,j,K,ae,q,me,ce,$]);E.useEffect(function(){if(k){var H=!1,te=lce(function(){var de=$.current,Pe=y.current!==null;ce.current?RT({mode:s,target:de}).atEnd?H=!1:H?To()-H>cce&&(Pe||(O.current=de.scrollTop,u(function(){var Ce;return bt(Ce=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ce,We(rt("navy")),We(rt("orange")))}),ee()),H=!1):H=To():de.scrollHeight<=de.offsetHeight&&!ce.current&&(u(function(){var Ce;return[bt(Ce=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ce,We(rt("navy")),We(rt("purple"))),[{offsetHeight:de.offsetHeight,scrollHeight:de.scrollHeight,sticky:ce.current}]]}),me(!0))},Math.max(AT,n)||AT);return function(){return clearInterval(te)}}},[y,n,u,s,ee,me,ce,k,$]);var we=E.useMemo(function(){var H=IT[c]||(IT[c]=hse({key:"react-scroll-to-bottom--css-"+Nse(),nonce:c}));return function(te){return H.css(te)+""}},[c]),ke=E.useMemo(function(){return{observeScrollPosition:G,setTarget:S,styleToClassName:we}},[G,S,we]),Fe=E.useMemo(function(){return{atBottom:R,atEnd:F,atStart:J,atTop:w,mode:s}},[R,F,J,w,s]),Oe=E.useMemo(function(){var H=m!==null;return{animating:H,animatingToEnd:H&&Xs(m,s),sticky:pe}},[m,s,pe]),z=E.useMemo(function(){return OT(OT({},Fe),Oe)},[Fe,Oe]),Z=E.useMemo(function(){return{scrollTo:ve,scrollToBottom:_e,scrollToEnd:X,scrollToStart:oe,scrollToTop:P}},[ve,_e,X,oe,P]);return E.useEffect(function(){if(k){var H=function(){B.current=k.scrollHeight};return k.addEventListener("focus",H,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",H)}}},[k]),u(function(){var H;return[bt(H=["%cRender%c: Render"]).call(H,We(rt("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),E.createElement(Iu.Provider,{value:ke},E.createElement(Km.Provider,{value:Z},E.createElement(Ym.Provider,{value:z},E.createElement(Gm.Provider,{value:Fe},E.createElement(Zm.Provider,{value:Oe},r,k&&E.createElement(kT,{debounce:o,name:"scroll",onEvent:xe,target:k}),k&&m!==null&&E.createElement(CT,{name:"scrollTop",onEnd:fe,target:k,value:m}))))))};Gy.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:ace},Gy.propTypes={checkInterval:Ze.number,children:Ze.any,debounce:Ze.number,debug:Ze.bool,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func};var uce={height:"100%",overflowY:"auto",width:"100%"},Zy=function(t){var n=t.children,r=t.className,o=E.useContext(Iu),i=o.setTarget,a=Jm()(uce);return E.createElement("div",{className:Lm(a,(r||"")+""),ref:i},n)};Zy.defaultProps={children:void 0,className:void 0},Zy.propTypes={children:Ze.any,className:Ze.string};var fce={position:"relative"},Yy=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Jm()(fce);return E.createElement("div",{className:Lm(a,(r||"")+"")},E.createElement(Zy,{className:(i||"")+""},n),E.createElement(Xm,{className:(o||"")+""}))};Yy.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Yy.propTypes={children:Ze.any,className:Ze.string,followButtonClassName:Ze.string,scrollViewClassName:Ze.string};var Jy=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return E.createElement(Gy,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:f},E.createElement(Yy,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};Jy.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Jy.propTypes={checkInterval:Ze.number,children:Ze.any,className:Ze.string,debounce:Ze.number,debug:Ze.bool,followButtonClassName:Ze.string,initialScrollBehavior:Ze.oneOf(["auto","smooth"]),mode:Ze.oneOf(["bottom","top"]),nonce:Ze.string,scroller:Ze.func,scrollViewClassName:Ze.string};function dce(){var e=dk(),t=e.scrollToBottom;return t}Oz();const MT=E.memo(({scrollDownButton:e,...t})=>{const{messageList:n}=ct,r=_n(v=>v.conversationId),o=Ne(v=>v.messages)[r??""]??[],i=Ne(v=>v.setState),a=Ne(v=>v.client),s=Ne(v=>v.messageContainerRef),c=Ne(v=>v.isTyping),l=Ne(v=>v.setIsTyping),u=E.useMemo(()=>KA(o),[o]),[f,p]=E.useState(!0),{y:d}=h6(s),h=E.useCallback(()=>{if(!s.current)return;const{scrollHeight:v}=s.current;f&&s.current.scrollTo({top:v})},[]);E.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:v,timeout:y})=>{l(v,y)}),[]),E.useEffect(()=>{const v=o[o.length-1];i({disableComposer:!!(v!=null&&v.disableInput)})},[o.length]),E.useEffect(()=>{if(!s.current)return;const{offsetHeight:v,scrollHeight:y,scrollTop:g}=s.current;p(y<=g+v+100)},[d]);const m=e!=null&&e.icon?e==null?void 0:e.icon:F6;return L.jsxs(Jy,{...t,...n.container,followButtonClassName:"bpHidden",scrollViewClassName:n.viewPort.className,children:[L.jsx(Cz,{}),u.map(v=>L.jsx(gh,{scroll:h,...v},v.id)),c&&L.jsx(gh,{scroll:h,direction:"incoming",children:L.jsx(pE,{})}),L.jsx("li",{"data-is-at-bottom":f,...n.scrollDownButton.container,children:L.jsxs(pce,{children:[(e==null?void 0:e.text)??"Back"," ",L.jsx(m,{...n.scrollDownButton.icon})]})})]})}),pce=e=>{const[t]=hk(),n=dce(),{messageList:{scrollDownButton:r}}=ct;return!t&&L.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},hce=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:o}=E1(),i=E.useMemo(()=>Vg({color:e,fontFamily:t,radius:n,themeMode:r,variant:o}),[e,t,n,r,o]);return L.jsxs(L.Fragment,{children:[L.jsxs(cE,{children:[L.jsx(dE,{}),L.jsx(MT,{}),L.jsx(PS,{})]}),L.jsx("style",{children:i})]})};Te.Avatar=Lf,Te.Block=Wi,Te.Composer=PS,Te.Container=cE,Te.Fab=mz,Te.Header=dE,Te.Message=gh,Te.MessageList=MT,Te.Modal=Eo,Te.ModalProvider=IS,Te.RestartConversation=fE,Te.TypingIndicator=pE,Te.Webchat=hce,Te.WebchatProvider=B9,Te.WebchatThemeSchema=Ff,Te.__adapters=uA,Te.avatarThemeSchema=vc,Te.blockThemeSchema=Lg,Te.clientModePropsSchema=qg,Te.configPropsSchema=Hg,Te.configurationSchema=Dg,Te.cssStyleSchema=Fg,Te.descriptionItemSchema=fi,Te.fileTypes=Xx,Te.generateThemeStylesheet=Vg,Te.getClient=e1,Te.initPropsSchema=eP,Te.isFileType=Qx,Te.markdownTypeSchema=jg,Te.renderers=_S,Te.statePropsSchema=Ug,Te.styleOptionSchema=ue,Te.themeSchema=Bg,Te.useClient=fB,Te.useWebchatStore=Ne,Te.userPropsSchema=zg,Te.webchatClasses=ct,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|