@tonyclaw/llm-inspector 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{u as nu,a as Up,r as v,j as l,b as Nr,R as at,c as ru,d as Zp,e as Dr,g as Ni}from"./main-BjnjXVBU.js";function Q(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,d=Object.keys(u);for(let h=0;h<d.length;h++){const p=d[h];p in a||(a[p]=u[p].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=n?.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Dn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ou extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const su={};function Qt(e){return su}function iu(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Hs(e,t){return typeof t=="bigint"?t.toString():t}function Io(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ti(e){return e==null}function Ai(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Vp(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=n>o?n:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const Ra=Symbol("evaluating");function Te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ra)return r===void 0&&(r=Ra,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function vn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oa(e){return JSON.stringify(e)}function Wp(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const au="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function br(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Hp=Io(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Un(e){if(br(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(br(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function lu(e){return Un(e)?{...e}:Array.isArray(e)?[...e]:e}const qp=new Set(["string","number","symbol"]);function Zn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function on(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ye(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Kp(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Jp={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Gp(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=rn(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return vn(this,"shape",i),i},checks:[]});return on(e,s)}function Yp(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=rn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return vn(this,"shape",i),i},checks:[]});return on(e,s)}function Xp(e,t){if(!Un(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=rn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return vn(this,"shape",s),s}});return on(e,o)}function Qp(e,t){if(!Un(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return vn(this,"shape",r),r}});return on(e,n)}function em(e,t){const n=rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return vn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return on(e,n)}function tm(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=rn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return vn(this,"shape",c),c},checks:[]});return on(t,i)}function nm(e,t,n){const r=rn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return vn(this,"shape",s),s}});return on(t,r)}function zn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Pn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Mr(e){return typeof e=="string"?e:e?.message}function en(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Mr(e.inst?._zod.def?.error?.(e))??Mr(t?.error?.(e))??Mr(n.customError?.(e))??Mr(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ii(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wr(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const cu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uu=Q("$ZodError",cu),du=Q("$ZodError",cu,{Parent:Error});function rm(e,t=n=>n.message){const n={},r=[];for(const o of e.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}}function om(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return r(e),n}const zi=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Dn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>en(c,s,Qt())));throw au(a,o?.callee),a}return i.value},Pi=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>en(c,s,Qt())));throw au(a,o?.callee),a}return i.value},zo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Dn;return s.issues.length?{success:!1,error:new(e??uu)(s.issues.map(i=>en(i,o,Qt())))}:{success:!0,data:s.value}},sm=zo(du),Po=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>en(i,o,Qt())))}:{success:!0,data:s.value}},im=Po(du),am=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zi(e)(t,n,o)},lm=e=>(t,n,r)=>zi(e)(t,n,r),cm=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pi(e)(t,n,o)},um=e=>async(t,n,r)=>Pi(e)(t,n,r),dm=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zo(e)(t,n,o)},fm=e=>(t,n,r)=>zo(e)(t,n,r),hm=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Po(e)(t,n,o)},pm=e=>async(t,n,r)=>Po(e)(t,n,r),mm=/^[cC][^\s-]{8,}$/,gm=/^[0-9a-z]+$/,xm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ym=/^[0-9a-vA-V]{20}$/,vm=/^[A-Za-z0-9]{27}$/,bm=/^[a-zA-Z0-9_-]{21}$/,wm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,km=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Da=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_m=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Cm(){return new RegExp(Sm,"u")}const jm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Em=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Nm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Am=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fu=/^[A-Za-z0-9_-]*$/,Im=/^\+[1-9]\d{6,14}$/,hu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zm=new RegExp(`^${hu}$`);function pu(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pm(e){return new RegExp(`^${pu(e)}$`)}function Rm(e){const t=pu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${hu}T(?:${r})$`)}const Om=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Dm=/^-?\d+$/,mu=/^-?\d+(?:\.\d+)?$/,Mm=/^(?:true|false)$/i,Lm=/^null$/i,Fm=/^[^A-Z]*$/,$m=/^[^a-z]*$/,ut=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gu={number:"number",bigint:"bigint",object:"date"},xu=Q("$ZodCheckLessThan",(e,t)=>{ut.init(e,t);const n=gu[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yu=Q("$ZodCheckGreaterThan",(e,t)=>{ut.init(e,t);const n=gu[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bm=Q("$ZodCheckMultipleOf",(e,t)=>{ut.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Vp(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Um=Q("$ZodCheckNumberFormat",(e,t)=>{ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Jp[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,n&&(a.pattern=Dm)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Zm=Q("$ZodCheckMaxLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Ii(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vm=Q("$ZodCheckMinLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Ii(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Wm=Q("$ZodCheckLengthEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Ii(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ro=Q("$ZodCheckStringFormat",(e,t)=>{var n,r;ut.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Hm=Q("$ZodCheckRegex",(e,t)=>{Ro.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qm=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fm),Ro.init(e,t)}),Km=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$m),Ro.init(e,t)}),Jm=Q("$ZodCheckIncludes",(e,t)=>{ut.init(e,t);const n=Zn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Gm=Q("$ZodCheckStartsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`^${Zn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ym=Q("$ZodCheckEndsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`.*${Zn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Xm=Q("$ZodCheckOverwrite",(e,t)=>{ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Qm{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
1
+ import{u as nu,a as Up,r as v,j as l,b as Nr,R as at,c as ru,d as Zp,e as Dr,g as Ni}from"./main-BA7dEkGs.js";function Q(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=i.prototype,d=Object.keys(u);for(let h=0;h<d.length;h++){const p=d[h];p in a||(a[p]=u[p].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const u=n?.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Dn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ou extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const su={};function Qt(e){return su}function iu(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Hs(e,t){return typeof t=="bigint"?t.toString():t}function Io(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ti(e){return e==null}function Ai(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Vp(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const s=n>o?n:o,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}const Ra=Symbol("evaluating");function Te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ra)return r===void 0&&(r=Ra,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function vn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oa(e){return JSON.stringify(e)}function Wp(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const au="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function br(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Hp=Io(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Un(e){if(br(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(br(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function lu(e){return Un(e)?{...e}:Array.isArray(e)?[...e]:e}const qp=new Set(["string","number","symbol"]);function Zn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function on(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ye(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Kp(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Jp={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Gp(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=rn(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return vn(this,"shape",i),i},checks:[]});return on(e,s)}function Yp(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=rn(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return vn(this,"shape",i),i},checks:[]});return on(e,s)}function Xp(e,t){if(!Un(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=rn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return vn(this,"shape",s),s}});return on(e,o)}function Qp(e,t){if(!Un(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return vn(this,"shape",r),r}});return on(e,n)}function em(e,t){const n=rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return vn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return on(e,n)}function tm(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=rn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return vn(this,"shape",c),c},checks:[]});return on(t,i)}function nm(e,t,n){const r=rn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return vn(this,"shape",s),s}});return on(t,r)}function zn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Pn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Mr(e){return typeof e=="string"?e:e?.message}function en(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Mr(e.inst?._zod.def?.error?.(e))??Mr(t?.error?.(e))??Mr(n.customError?.(e))??Mr(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ii(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wr(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const cu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uu=Q("$ZodError",cu),du=Q("$ZodError",cu,{Parent:Error});function rm(e,t=n=>n.message){const n={},r=[];for(const o of e.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}}function om(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(i=>r({issues:i}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let i=n,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(i[c]=i[c]||{_errors:[]},i[c]._errors.push(t(s))):i[c]=i[c]||{_errors:[]},i=i[c],a++}}};return r(e),n}const zi=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Dn;if(i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>en(c,s,Qt())));throw au(a,o?.callee),a}return i.value},Pi=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??e)(i.issues.map(c=>en(c,s,Qt())));throw au(a,o?.callee),a}return i.value},zo=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Dn;return s.issues.length?{success:!1,error:new(e??uu)(s.issues.map(i=>en(i,o,Qt())))}:{success:!0,data:s.value}},sm=zo(du),Po=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>en(i,o,Qt())))}:{success:!0,data:s.value}},im=Po(du),am=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zi(e)(t,n,o)},lm=e=>(t,n,r)=>zi(e)(t,n,r),cm=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pi(e)(t,n,o)},um=e=>async(t,n,r)=>Pi(e)(t,n,r),dm=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zo(e)(t,n,o)},fm=e=>(t,n,r)=>zo(e)(t,n,r),hm=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Po(e)(t,n,o)},pm=e=>async(t,n,r)=>Po(e)(t,n,r),mm=/^[cC][^\s-]{8,}$/,gm=/^[0-9a-z]+$/,xm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ym=/^[0-9a-vA-V]{20}$/,vm=/^[A-Za-z0-9]{27}$/,bm=/^[a-zA-Z0-9_-]{21}$/,wm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,km=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Da=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_m=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Cm(){return new RegExp(Sm,"u")}const jm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Em=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Nm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Am=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fu=/^[A-Za-z0-9_-]*$/,Im=/^\+[1-9]\d{6,14}$/,hu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zm=new RegExp(`^${hu}$`);function pu(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pm(e){return new RegExp(`^${pu(e)}$`)}function Rm(e){const t=pu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${hu}T(?:${r})$`)}const Om=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Dm=/^-?\d+$/,mu=/^-?\d+(?:\.\d+)?$/,Mm=/^(?:true|false)$/i,Lm=/^null$/i,Fm=/^[^A-Z]*$/,$m=/^[^a-z]*$/,ut=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gu={number:"number",bigint:"bigint",object:"date"},xu=Q("$ZodCheckLessThan",(e,t)=>{ut.init(e,t);const n=gu[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yu=Q("$ZodCheckGreaterThan",(e,t)=>{ut.init(e,t);const n=gu[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bm=Q("$ZodCheckMultipleOf",(e,t)=>{ut.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Vp(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Um=Q("$ZodCheckNumberFormat",(e,t)=>{ut.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Jp[t.format];e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,a.minimum=o,a.maximum=s,n&&(a.pattern=Dm)}),e._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Zm=Q("$ZodCheckMaxLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const i=Ii(o);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vm=Q("$ZodCheckMinLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const i=Ii(o);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Wm=Q("$ZodCheckLengthEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Ti(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const i=Ii(o),a=s>t.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ro=Q("$ZodCheckStringFormat",(e,t)=>{var n,r;ut.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Hm=Q("$ZodCheckRegex",(e,t)=>{Ro.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qm=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fm),Ro.init(e,t)}),Km=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$m),Ro.init(e,t)}),Jm=Q("$ZodCheckIncludes",(e,t)=>{ut.init(e,t);const n=Zn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Gm=Q("$ZodCheckStartsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`^${Zn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ym=Q("$ZodCheckEndsWith",(e,t)=>{ut.init(e,t);const n=new RegExp(`.*${Zn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Xm=Q("$ZodCheckOverwrite",(e,t)=>{ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Qm{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
2
  `).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
3
3
  `))}}const eg={major:4,minor:3,patch:6},Be=Q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eg;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(i,a,c)=>{let u=zn(i),d;for(const h of a){if(h._zod.def.when){if(!h._zod.def.when(i))continue}else if(u)continue;const p=i.issues.length,f=h._zod.check(i);if(f instanceof Promise&&c?.async===!1)throw new Dn;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,i.issues.length!==p&&(u||(u=zn(i,p)))});else{if(i.issues.length===p)continue;u||(u=zn(i,p))}}return d?d.then(()=>i):i},s=(i,a,c)=>{if(zn(i))return i.aborted=!0,i;const u=o(a,r,c);if(u instanceof Promise){if(c.async===!1)throw new Dn;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,i,a)):s(u,i,a)}const c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Dn;return c.then(u=>o(u,r,a))}return o(c,r,a)}}Te(e,"~standard",()=>({validate:o=>{try{const s=sm(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return im(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Ri=Q("$ZodString",(e,t)=>{Be.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Om(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ze=Q("$ZodStringFormat",(e,t)=>{Ro.init(e,t),Ri.init(e,t)}),tg=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=km),Ze.init(e,t)}),ng=Q("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Da(r))}else t.pattern??(t.pattern=Da());Ze.init(e,t)}),rg=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_m),Ze.init(e,t)}),og=Q("$ZodURL",(e,t)=>{Ze.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),sg=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Cm()),Ze.init(e,t)}),ig=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=bm),Ze.init(e,t)}),ag=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=mm),Ze.init(e,t)}),lg=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=gm),Ze.init(e,t)}),cg=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=xm),Ze.init(e,t)}),ug=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ym),Ze.init(e,t)}),dg=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=vm),Ze.init(e,t)}),fg=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Rm(t)),Ze.init(e,t)}),hg=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zm),Ze.init(e,t)}),pg=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Pm(t)),Ze.init(e,t)}),mg=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=wm),Ze.init(e,t)}),gg=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jm),Ze.init(e,t),e._zod.bag.format="ipv4"}),xg=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Em),Ze.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),yg=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nm),Ze.init(e,t)}),vg=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Tm),Ze.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function vu(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const bg=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Am),Ze.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{vu(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function wg(e){if(!fu.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return vu(n)}const kg=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fu),Ze.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{wg(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_g=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Im),Ze.init(e,t)});function Sg(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Cg=Q("$ZodJWT",(e,t)=>{Ze.init(e,t),e._zod.check=n=>{Sg(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),bu=Q("$ZodNumber",(e,t)=>{Be.init(e,t),e._zod.pattern=e._zod.bag.pattern??mu,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),jg=Q("$ZodNumberFormat",(e,t)=>{Um.init(e,t),bu.init(e,t)}),Eg=Q("$ZodBoolean",(e,t)=>{Be.init(e,t),e._zod.pattern=Mm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),Ng=Q("$ZodNull",(e,t)=>{Be.init(e,t),e._zod.pattern=Lm,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),Tg=Q("$ZodUnknown",(e,t)=>{Be.init(e,t),e._zod.parse=n=>n}),Ag=Q("$ZodNever",(e,t)=>{Be.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ma(e,t,n){e.issues.length&&t.issues.push(...Pn(n,e.issues)),t.value[n]=e.value}const Ig=Q("$ZodArray",(e,t)=>{Be.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(u=>Ma(u,n,i))):Ma(c,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function ao(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Pn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function wu(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=Kp(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ku(e,t,n,r,o,s){const i=[],a=o.keySet,c=o.catchall._zod,u=c.def.type,d=c.optout==="optional";for(const h in t){if(a.has(h))continue;if(u==="never"){i.push(h);continue}const p=c.run({value:t[h],issues:[]},r);p instanceof Promise?e.push(p.then(f=>ao(f,n,h,t,d))):ao(p,n,h,t,d)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const zg=Q("$ZodObject",(e,t)=>{if(Be.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=Io(()=>wu(t));Te(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const d=a[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const h of d.values)c[u].add(h)}}return c});const o=br,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=r.value);const u=a.value;if(!o(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const d=[],h=i.shape;for(const p of i.keys){const f=h[p],g=f._zod.optout==="optional",m=f._zod.run({value:u[p],issues:[]},c);m instanceof Promise?d.push(m.then(y=>ao(y,a,p,u,g))):ao(m,a,p,u,g)}return s?ku(d,u,a,c,r.value,e):d.length?Promise.all(d).then(()=>a):a}}),Pg=Q("$ZodObjectJIT",(e,t)=>{zg.init(e,t);const n=e._zod.parse,r=Io(()=>wu(t)),o=p=>{const f=new Qm(["shape","payload","ctx"]),g=r.value,m=w=>{const S=Oa(w);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};f.write("const input = payload.value;");const y=Object.create(null);let x=0;for(const w of g.keys)y[w]=`key_${x++}`;f.write("const newResult = {};");for(const w of g.keys){const S=y[w],j=Oa(w),N=p[w]?._zod?.optout==="optional";f.write(`const ${S} = ${m(w)};`),N?f.write(`
4
4
  if (${S}.issues.length) {
@@ -81,7 +81,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
81
81
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
82
82
 
83
83
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},p2="DialogDescriptionWarning",m2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zd(p2).contentName}}.`;return v.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},g2=Ad,x2=zd,y2=Rd,v2=Od,b2=Dd,w2=Ld,k2=Bd;function _2(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function S2(e){const[t,n]=v.useState(void 0);return Qe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const C2=["top","right","bottom","left"],tn=Math.min,pt=Math.max,ho=Math.round,Wr=Math.floor,Mt=e=>({x:e,y:e}),j2={left:"right",right:"left",bottom:"top",top:"bottom"},E2={start:"end",end:"start"};function Qs(e,t,n){return pt(e,tn(t,n))}function Ht(e,t){return typeof e=="function"?e(t):e}function qt(e){return e.split("-")[0]}function Xn(e){return e.split("-")[1]}function Xi(e){return e==="x"?"y":"x"}function Qi(e){return e==="y"?"height":"width"}const N2=new Set(["top","bottom"]);function Ot(e){return N2.has(qt(e))?"y":"x"}function ea(e){return Xi(Ot(e))}function T2(e,t,n){n===void 0&&(n=!1);const r=Xn(e),o=ea(e),s=Qi(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=po(i)),[i,po(i)]}function A2(e){const t=po(e);return[ei(e),t,ei(t)]}function ei(e){return e.replace(/start|end/g,t=>E2[t])}const vl=["left","right"],bl=["right","left"],I2=["top","bottom"],z2=["bottom","top"];function P2(e,t,n){switch(e){case"top":case"bottom":return n?t?bl:vl:t?vl:bl;case"left":case"right":return t?I2:z2;default:return[]}}function R2(e,t,n,r){const o=Xn(e);let s=P2(qt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ei)))),s}function po(e){return e.replace(/left|right|bottom|top/g,t=>j2[t])}function O2(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vd(e){return typeof e!="number"?O2(e):{top:e,right:e,bottom:e,left:e}}function mo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wl(e,t,n){let{reference:r,floating:o}=e;const s=Ot(t),i=ea(t),a=Qi(i),c=qt(t),u=s==="y",d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(c){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-o.width,y:h};break;default:f={x:r.x,y:r.y}}switch(Xn(t)){case"start":f[i]-=p*(n&&u?-1:1);break;case"end":f[i]+=p*(n&&u?-1:1);break}return f}async function D2(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Ht(t,e),g=Vd(f),y=a[p?h==="floating"?"reference":"floating":h],x=mo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),b=h==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},j=mo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:c}):b);return{top:(x.top-j.top+g.top)/S.y,bottom:(j.bottom-x.bottom+g.bottom)/S.y,left:(x.left-j.left+g.left)/S.x,right:(j.right-x.right+g.right)/S.x}}const M2=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=wl(u,r,c),p=r,f={},g=0;for(let y=0;y<a.length;y++){var m;const{name:x,fn:b}=a[y],{x:w,y:S,data:j,reset:C}=await b({x:d,y:h,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:u,platform:{...i,detectOverflow:(m=i.detectOverflow)!=null?m:D2},elements:{reference:e,floating:t}});d=w??d,h=S??h,f={...f,[x]:{...f[x],...j}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:h}=wl(u,p,c)),y=-1)}return{x:d,y:h,placement:p,strategy:o,middlewareData:f}},L2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ht(e,t)||{};if(u==null)return{};const h=Vd(d),p={x:n,y:r},f=ea(o),g=Qi(f),m=await i.getDimensions(u),y=f==="y",x=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[f]-p[f]-s.floating[g],j=p[f]-s.reference[f],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=C?C[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(C)))&&(N=a.floating[w]||s.floating[g]);const T=S/2-j/2,z=N/2-m[g]/2-1,O=tn(h[x],z),L=tn(h[b],z),E=O,M=N-m[g]-L,k=N/2-m[g]/2+T,D=Qs(E,k,M),H=!c.arrow&&Xn(o)!=null&&k!==D&&s.reference[g]/2-(k<E?O:L)-m[g]/2<0,B=H?k<E?k-E:k-M:0;return{[f]:p[f]+B,data:{[f]:D,centerOffset:k-D-B,...H&&{alignmentOffset:B}},reset:H}}}),F2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=Ht(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=qt(o),b=Ot(a),w=qt(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=p||(w||!m?[po(a)]:A2(a)),C=g!=="none";!p&&C&&j.push(...R2(a,m,g,S));const N=[a,...j],T=await c.detectOverflow(t,y),z=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&z.push(T[x]),h){const k=T2(o,i,S);z.push(T[k[0]],T[k[1]])}if(O=[...O,{placement:o,overflows:z}],!z.every(k=>k<=0)){var L,E;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,D=N[k];if(D&&(!(h==="alignment"?b!==Ot(D):!1)||O.every(q=>Ot(q.placement)===b?q.overflows[0]>0:!0)))return{data:{index:k,overflows:O},reset:{placement:D}};let H=(E=O.filter(B=>B.overflows[0]<=0).sort((B,q)=>B.overflows[1]-q.overflows[1])[0])==null?void 0:E.placement;if(!H)switch(f){case"bestFit":{var M;const B=(M=O.filter(q=>{if(C){const Y=Ot(q.placement);return Y===b||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,A)=>Y+A,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:M[0];B&&(H=B);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function kl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _l(e){return C2.some(t=>e[t]>=0)}const $2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ht(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=kl(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_l(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=kl(i,n.floating);return{data:{escapedOffsets:a,escaped:_l(a)}}}default:return{}}}}},Wd=new Set(["left","top"]);async function B2(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=qt(n),a=Xn(n),c=Ot(n)==="y",u=Wd.has(i)?-1:1,d=s&&c?-1:1,h=Ht(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),c?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const U2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await B2(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Z2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:b,y:w}=x;return{x:b,y:w}}},...u}=Ht(e,t),d={x:n,y:r},h=await s.detectOverflow(t,u),p=Ot(qt(o)),f=Xi(p);let g=d[f],m=d[p];if(i){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=g+h[x],S=g-h[b];g=Qs(w,g,S)}if(a){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=m+h[x],S=m-h[b];m=Qs(w,m,S)}const y=c.fn({...t,[f]:g,[p]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:i,[p]:a}}}}}},V2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Ht(e,t),d={x:n,y:r},h=Ot(o),p=Xi(h);let f=d[p],g=d[h];const m=Ht(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=p==="y"?"height":"width",S=s.reference[p]-s.floating[w]+y.mainAxis,j=s.reference[p]+s.reference[w]-y.mainAxis;f<S?f=S:f>j&&(f=j)}if(u){var x,b;const w=p==="y"?"width":"height",S=Wd.has(qt(o)),j=s.reference[h]-s.floating[w]+(S&&((x=i.offset)==null?void 0:x[h])||0)+(S?0:y.crossAxis),C=s.reference[h]+s.reference[w]+(S?0:((b=i.offset)==null?void 0:b[h])||0)-(S?y.crossAxis:0);g<j?g=j:g>C&&(g=C)}return{[p]:f,[h]:g}}}},W2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=Ht(e,t),d=await i.detectOverflow(t,u),h=qt(o),p=Xn(o),f=Ot(o)==="y",{width:g,height:m}=s.floating;let y,x;h==="top"||h==="bottom"?(y=h,x=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,y=p==="end"?"top":"bottom");const b=m-d.top-d.bottom,w=g-d.left-d.right,S=tn(m-d[y],b),j=tn(g-d[x],w),C=!t.middlewareData.shift;let N=S,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=b),C&&!p){const O=pt(d.left,0),L=pt(d.right,0),E=pt(d.top,0),M=pt(d.bottom,0);f?T=g-2*(O!==0||L!==0?O+L:pt(d.left,d.right)):N=m-2*(E!==0||M!==0?E+M:pt(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:N});const z=await i.getDimensions(a.floating);return g!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function Uo(){return typeof window<"u"}function Qn(e){return Hd(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(Hd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hd(e){return Uo()?e instanceof Node||e instanceof gt(e).Node:!1}function Nt(e){return Uo()?e instanceof Element||e instanceof gt(e).Element:!1}function Lt(e){return Uo()?e instanceof HTMLElement||e instanceof gt(e).HTMLElement:!1}function Sl(e){return!Uo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}const H2=new Set(["inline","contents"]);function Ar(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!H2.has(o)}const q2=new Set(["table","td","th"]);function K2(e){return q2.has(Qn(e))}const J2=[":popover-open",":modal"];function Zo(e){return J2.some(t=>{try{return e.matches(t)}catch{return!1}})}const G2=["transform","translate","scale","rotate","perspective"],Y2=["transform","translate","scale","rotate","perspective","filter"],X2=["paint","layout","strict","content"];function ta(e){const t=na(),n=Nt(e)?Tt(e):e;return G2.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Y2.some(r=>(n.willChange||"").includes(r))||X2.some(r=>(n.contain||"").includes(r))}function Q2(e){let t=nn(e);for(;Lt(t)&&!Hn(t);){if(ta(t))return t;if(Zo(t))return null;t=nn(t)}return null}function na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ew=new Set(["html","body","#document"]);function Hn(e){return ew.has(Qn(e))}function Tt(e){return gt(e).getComputedStyle(e)}function Vo(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nn(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Sl(e)&&e.host||$t(e);return Sl(t)?t.host:t}function qd(e){const t=nn(e);return Hn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lt(t)&&Ar(t)?t:qd(t)}function Sr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=qd(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=gt(o);if(s){const a=ti(i);return t.concat(i,i.visualViewport||[],Ar(o)?o:[],a&&n?Sr(a):[])}return t.concat(o,Sr(o,[],n))}function ti(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kd(e){const t=Tt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Lt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ho(n)!==s||ho(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ra(e){return Nt(e)?e:e.contextElement}function Ln(e){const t=ra(e);if(!Lt(t))return Mt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Kd(t);let i=(s?ho(n.width):n.width)/r,a=(s?ho(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const tw=Mt(0);function Jd(e){const t=gt(e);return!na()||!t.visualViewport?tw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gt(e)?!1:t}function gn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ra(e);let i=Mt(1);t&&(r?Nt(r)&&(i=Ln(r)):i=Ln(e));const a=nw(s,n,r)?Jd(s):Mt(0);let c=(o.left+a.x)/i.x,u=(o.top+a.y)/i.y,d=o.width/i.x,h=o.height/i.y;if(s){const p=gt(s),f=r&&Nt(r)?gt(r):r;let g=p,m=ti(g);for(;m&&r&&f!==g;){const y=Ln(m),x=m.getBoundingClientRect(),b=Tt(m),w=x.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,S=x.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,h*=y.y,c+=w,u+=S,g=gt(m),m=ti(g)}}return mo({width:d,height:h,x:c,y:u})}function Wo(e,t){const n=Vo(e).scrollLeft;return t?t.left+n:gn($t(e)).left+n}function Gd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=$t(r),a=t?Zo(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Mt(1);const d=Mt(0),h=Lt(r);if((h||!h&&!s)&&((Qn(r)!=="body"||Ar(i))&&(c=Vo(r)),Lt(r))){const f=gn(r);u=Ln(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const p=i&&!h&&!s?Gd(i,c):Mt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function ow(e){return Array.from(e.getClientRects())}function sw(e){const t=$t(e),n=Vo(e),r=e.ownerDocument.body,o=pt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=pt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Wo(e);const a=-n.scrollTop;return Tt(r).direction==="rtl"&&(i+=pt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Cl=25;function iw(e,t){const n=gt(e),r=$t(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const d=na();(!d||d&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const u=Wo(r);if(u<=0){const d=r.ownerDocument,h=d.body,p=getComputedStyle(h),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-h.clientWidth-f);g<=Cl&&(s-=g)}else u<=Cl&&(s+=u);return{width:s,height:i,x:a,y:c}}const aw=new Set(["absolute","fixed"]);function lw(e,t){const n=gn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Lt(e)?Ln(e):Mt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function jl(e,t,n){let r;if(t==="viewport")r=iw(e,n);else if(t==="document")r=sw($t(e));else if(Nt(t))r=lw(t,n);else{const o=Jd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return mo(r)}function Yd(e,t){const n=nn(e);return n===t||!Nt(n)||Hn(n)?!1:Tt(n).position==="fixed"||Yd(n,t)}function cw(e,t){const n=t.get(e);if(n)return n;let r=Sr(e,[],!1).filter(a=>Nt(a)&&Qn(a)!=="body"),o=null;const s=Tt(e).position==="fixed";let i=s?nn(e):e;for(;Nt(i)&&!Hn(i);){const a=Tt(i),c=ta(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&aw.has(o.position)||Ar(i)&&!c&&Yd(e,i))?r=r.filter(d=>d!==i):o=a,i=nn(i)}return t.set(e,r),r}function uw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Zo(t)?[]:cw(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const h=jl(t,d,o);return u.top=pt(h.top,u.top),u.right=tn(h.right,u.right),u.bottom=tn(h.bottom,u.bottom),u.left=pt(h.left,u.left),u},jl(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dw(e){const{width:t,height:n}=Kd(e);return{width:t,height:n}}function fw(e,t,n){const r=Lt(t),o=$t(t),s=n==="fixed",i=gn(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Mt(0);function u(){c.x=Wo(o)}if(r||!r&&!s)if((Qn(t)!=="body"||Ar(o))&&(a=Vo(t)),r){const f=gn(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else o&&u();s&&!r&&o&&u();const d=o&&!r&&!s?Gd(o,a):Mt(0),h=i.left+a.scrollLeft-c.x-d.x,p=i.top+a.scrollTop-c.y-d.y;return{x:h,y:p,width:i.width,height:i.height}}function ws(e){return Tt(e).position==="static"}function El(e,t){if(!Lt(e)||Tt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $t(e)===n&&(n=n.ownerDocument.body),n}function Xd(e,t){const n=gt(e);if(Zo(e))return n;if(!Lt(e)){let o=nn(e);for(;o&&!Hn(o);){if(Nt(o)&&!ws(o))return o;o=nn(o)}return n}let r=El(e,t);for(;r&&K2(r)&&ws(r);)r=El(r,t);return r&&Hn(r)&&ws(r)&&!ta(r)?n:r||Q2(e)||n}const hw=async function(e){const t=this.getOffsetParent||Xd,n=this.getDimensions,r=await n(e.floating);return{reference:fw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pw(e){return Tt(e).direction==="rtl"}const mw={convertOffsetParentRelativeRectToViewportRelativeRect:rw,getDocumentElement:$t,getClippingRect:uw,getOffsetParent:Xd,getElementRects:hw,getClientRects:ow,getDimensions:dw,getScale:Ln,isElement:Nt,isRTL:pw};function Qd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gw(e,t){let n=null,r;const o=$t(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=u;if(a||t(),!p||!f)return;const g=Wr(h),m=Wr(o.clientWidth-(d+p)),y=Wr(o.clientHeight-(h+f)),x=Wr(d),w={rootMargin:-g+"px "+-m+"px "+-y+"px "+-x+"px",threshold:pt(0,tn(1,c))||1};let S=!0;function j(C){const N=C[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Qd(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(j,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,w)}n.observe(e)}return i(!0),s}function xw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ra(e),d=o||s?[...u?Sr(u):[],...Sr(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const h=u&&a?gw(u,n):null;let p=-1,f=null;i&&(f=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!c&&f.observe(u),f.observe(t));let g,m=c?gn(e):null;c&&y();function y(){const x=gn(e);m&&!Qd(m,x)&&n(),m=x,g=requestAnimationFrame(y)}return n(),()=>{var x;d.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),h?.(),(x=f)==null||x.disconnect(),f=null,c&&cancelAnimationFrame(g)}}const yw=U2,vw=Z2,bw=F2,ww=W2,kw=$2,Nl=L2,_w=V2,Sw=(e,t,n)=>{const r=new Map,o={platform:mw,...n},s={...o.platform,_c:r};return M2(e,t,{...o,platform:s})};var Cw=typeof document<"u",jw=function(){},ro=Cw?v.useLayoutEffect:jw;function go(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(!go(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!go(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ef(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tl(e,t){const n=ef(e);return Math.round(t*n)/n}function ks(e){const t=v.useRef(e);return ro(()=>{t.current=e}),t}function Ew(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,h]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=v.useState(r);go(p,r)||f(r);const[g,m]=v.useState(null),[y,x]=v.useState(null),b=v.useCallback(q=>{q!==C.current&&(C.current=q,m(q))},[]),w=v.useCallback(q=>{q!==N.current&&(N.current=q,x(q))},[]),S=s||g,j=i||y,C=v.useRef(null),N=v.useRef(null),T=v.useRef(d),z=c!=null,O=ks(c),L=ks(o),E=ks(u),M=v.useCallback(()=>{if(!C.current||!N.current)return;const q={placement:t,strategy:n,middleware:p};L.current&&(q.platform=L.current),Sw(C.current,N.current,q).then(Y=>{const A={...Y,isPositioned:E.current!==!1};k.current&&!go(T.current,A)&&(T.current=A,Nr.flushSync(()=>{h(A)}))})},[p,t,n,L,E]);ro(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(q=>({...q,isPositioned:!1})))},[u]);const k=v.useRef(!1);ro(()=>(k.current=!0,()=>{k.current=!1}),[]),ro(()=>{if(S&&(C.current=S),j&&(N.current=j),S&&j){if(O.current)return O.current(S,j,M);M()}},[S,j,M,O,z]);const D=v.useMemo(()=>({reference:C,floating:N,setReference:b,setFloating:w}),[b,w]),H=v.useMemo(()=>({reference:S,floating:j}),[S,j]),B=v.useMemo(()=>{const q={position:n,left:0,top:0};if(!H.floating)return q;const Y=Tl(H.floating,d.x),A=Tl(H.floating,d.y);return a?{...q,transform:"translate("+Y+"px, "+A+"px)",...ef(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:A}},[n,a,H.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:M,refs:D,elements:H,floatingStyles:B}),[d,M,D,H,B])}const Nw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Nl({element:r.current,padding:o}).fn(n):{}:r?Nl({element:r,padding:o}).fn(n):{}}}},Tw=(e,t)=>({...yw(e),options:[e,t]}),Aw=(e,t)=>({...vw(e),options:[e,t]}),Iw=(e,t)=>({..._w(e),options:[e,t]}),zw=(e,t)=>({...bw(e),options:[e,t]}),Pw=(e,t)=>({...ww(e),options:[e,t]}),Rw=(e,t)=>({...kw(e),options:[e,t]}),Ow=(e,t)=>({...Nw(e),options:[e,t]});var Dw="Arrow",tf=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return l.jsx(Ce.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});tf.displayName=Dw;var Mw=tf,oa="Popper",[nf,Ho]=Jt(oa),[Lw,rf]=nf(oa),of=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return l.jsx(Lw,{scope:t,anchor:r,onAnchorChange:o,children:n})};of.displayName=oa;var sf="PopperAnchor",af=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=rf(sf,n),i=v.useRef(null),a=De(t,i),c=v.useRef(null);return v.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:l.jsx(Ce.div,{...o,ref:a})});af.displayName=sf;var sa="PopperContent",[Fw,$w]=nf(sa),lf=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:g,...m}=e,y=rf(sa,n),[x,b]=v.useState(null),w=De(t,te=>b(te)),[S,j]=v.useState(null),C=S2(S),N=C?.width??0,T=C?.height??0,z=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(u)?u:[u],E=L.length>0,M={padding:O,boundary:L.filter(Uw),altBoundary:E},{refs:k,floatingStyles:D,placement:H,isPositioned:B,middlewareData:q}=Ew({strategy:"fixed",placement:z,whileElementsMounted:(...te)=>xw(...te,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[Tw({mainAxis:o+T,alignmentAxis:i}),c&&Aw({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Iw():void 0,...M}),c&&zw({...M}),Pw({...M,apply:({elements:te,rects:ce,availableWidth:fe,availableHeight:ge})=>{const{width:xe,height:Ee}=ce.reference,Le=te.floating.style;Le.setProperty("--radix-popper-available-width",`${fe}px`),Le.setProperty("--radix-popper-available-height",`${ge}px`),Le.setProperty("--radix-popper-anchor-width",`${xe}px`),Le.setProperty("--radix-popper-anchor-height",`${Ee}px`)}}),S&&Ow({element:S,padding:a}),Zw({arrowWidth:N,arrowHeight:T}),p&&Rw({strategy:"referenceHidden",...M})]}),[Y,A]=df(H),W=st(g);Qe(()=>{B&&W?.()},[B,W]);const V=q.arrow?.x,I=q.arrow?.y,oe=q.arrow?.centerOffset!==0,[X,de]=v.useState();return Qe(()=>{x&&de(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:B?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Fw,{scope:n,placedSide:Y,onArrowChange:j,arrowX:V,arrowY:I,shouldHideArrow:oe,children:l.jsx(Ce.div,{"data-side":Y,"data-align":A,...m,ref:w,style:{...m.style,animation:B?void 0:"none"}})})})});lf.displayName=sa;var cf="PopperArrow",Bw={top:"bottom",right:"left",bottom:"top",left:"right"},uf=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=$w(cf,r),i=Bw[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(Mw,{...o,ref:n,style:{...o.style,display:"block"}})})});uf.displayName=cf;function Uw(e){return e!==null}var Zw=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=df(n),h={start:"0%",center:"50%",end:"100%"}[d],p=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+c/2;let g="",m="";return u==="bottom"?(g=i?h:`${p}px`,m=`${-c}px`):u==="top"?(g=i?h:`${p}px`,m=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,m=i?h:`${f}px`):u==="left"&&(g=`${r.floating.width+c}px`,m=i?h:`${f}px`),{data:{x:g,y:m}}}});function df(e){const[t,n="center"]=e.split("-");return[t,n]}var ff=of,hf=af,pf=lf,mf=uf,_s="rovingFocusGroup.onEntryFocus",Vw={bubbles:!1,cancelable:!0},Ir="RovingFocusGroup",[ni,gf,Ww]=dd(Ir),[Hw,xf]=Jt(Ir,[Ww]),[qw,Kw]=Hw(Ir),yf=v.forwardRef((e,t)=>l.jsx(ni.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(ni.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Jw,{...e,ref:t})})}));yf.displayName=Ir;var Jw=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,p=v.useRef(null),f=De(t,p),g=Mo(s),[m,y]=pn({prop:i,defaultProp:a??null,onChange:c,caller:Ir}),[x,b]=v.useState(!1),w=st(u),S=gf(n),j=v.useRef(!1),[C,N]=v.useState(0);return v.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(_s,w),()=>T.removeEventListener(_s,w)},[w]),l.jsx(qw,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:v.useCallback(T=>y(T),[y]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>N(T=>T+1),[]),onFocusableItemRemove:v.useCallback(()=>N(T=>T-1),[]),children:l.jsx(Ce.div,{tabIndex:x||C===0?-1:0,"data-orientation":r,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:we(e.onMouseDown,()=>{j.current=!0}),onFocus:we(e.onFocus,T=>{const z=!j.current;if(T.target===T.currentTarget&&z&&!x){const O=new CustomEvent(_s,Vw);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const L=S().filter(H=>H.focusable),E=L.find(H=>H.active),M=L.find(H=>H.id===m),D=[E,M,...L].filter(Boolean).map(H=>H.ref.current);wf(D,d)}}j.current=!1}),onBlur:we(e.onBlur,()=>b(!1))})})}),vf="RovingFocusGroupItem",bf=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=Dt(),u=s||c,d=Kw(vf,n),h=d.currentTabStopId===u,p=gf(n),{onFocusableItemAdd:f,onFocusableItemRemove:g,currentTabStopId:m}=d;return v.useEffect(()=>{if(r)return f(),()=>g()},[r,f,g]),l.jsx(ni.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(Ce.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:we(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:we(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:we(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=Xw(y,d.orientation,d.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(y.currentTarget);w=d.loop?Qw(w,S+1):w.slice(S+1)}setTimeout(()=>wf(w))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:m!=null}):i})})});bf.displayName=vf;var Gw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xw(e,t,n){const r=Yw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gw[r]}function wf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Qw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ek=yf,tk=bf;function ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function nk(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ia="ScrollArea",[kf]=Jt(ia),[rk,_t]=kf(ia),_f=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,c]=v.useState(null),[u,d]=v.useState(null),[h,p]=v.useState(null),[f,g]=v.useState(null),[m,y]=v.useState(null),[x,b]=v.useState(0),[w,S]=v.useState(0),[j,C]=v.useState(!1),[N,T]=v.useState(!1),z=De(t,L=>c(L)),O=Mo(o);return l.jsx(rk,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:a,viewport:u,onViewportChange:d,content:h,onContentChange:p,scrollbarX:f,onScrollbarXChange:g,scrollbarXEnabled:j,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:N,onScrollbarYEnabledChange:T,onCornerWidthChange:b,onCornerHeightChange:S,children:l.jsx(Ce.div,{dir:O,...i,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});_f.displayName=ia;var Sf="ScrollAreaViewport",Cf=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=_t(Sf,n),a=v.useRef(null),c=De(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(Ce.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Cf.displayName=Sf;var Bt="ScrollAreaScrollbar",jf=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Bt,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return v.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?l.jsx(ok,{...r,ref:t,forceMount:n}):o.type==="scroll"?l.jsx(sk,{...r,ref:t,forceMount:n}):o.type==="auto"?l.jsx(Ef,{...r,ref:t,forceMount:n}):o.type==="always"?l.jsx(aa,{...r,ref:t}):null});jf.displayName=Bt;var ok=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Bt,e.__scopeScrollArea),[s,i]=v.useState(!1);return v.useEffect(()=>{const a=o.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),l.jsx(kt,{present:n||s,children:l.jsx(Ef,{"data-state":s?"visible":"hidden",...r,ref:t})})}),sk=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_t(Bt,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Ko(()=>c("SCROLL_END"),100),[a,c]=nk("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),v.useEffect(()=>{const u=o.viewport,d=s?"scrollLeft":"scrollTop";if(u){let h=u[d];const p=()=>{const f=u[d];h!==f&&(c("SCROLL"),i()),h=f};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,s,c,i]),l.jsx(kt,{present:n||a!=="hidden",children:l.jsx(aa,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:we(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:we(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Ef=v.forwardRef((e,t)=>{const n=_t(Bt,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=v.useState(!1),a=e.orientation==="horizontal",c=Ko(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return qn(n.viewport,c),qn(n.content,c),l.jsx(kt,{present:r||s,children:l.jsx(aa,{"data-state":s?"visible":"hidden",...o,ref:t})})}),aa=v.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=_t(Bt,e.__scopeScrollArea),s=v.useRef(null),i=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=zf(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:p=>i.current=p};function h(p,f){return dk(p,i.current,a,f)}return n==="horizontal"?l.jsx(ik,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,f=Al(p,a,o.dir);s.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=h(p,o.dir))}}):n==="vertical"?l.jsx(ak,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,f=Al(p,a);s.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=h(p))}}):null}),ik=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=_t(Bt,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=De(t,c,s.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(Tf,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":qo(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Rf(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:yo(i.paddingLeft),paddingEnd:yo(i.paddingRight)}})}})}),ak=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=_t(Bt,e.__scopeScrollArea),[i,a]=v.useState(),c=v.useRef(null),u=De(t,c,s.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(Tf,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":qo(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Rf(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:yo(i.paddingTop),paddingEnd:yo(i.paddingBottom)}})}})}),[lk,Nf]=kf(Bt),Tf=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...p}=e,f=_t(Bt,n),[g,m]=v.useState(null),y=De(t,z=>m(z)),x=v.useRef(null),b=v.useRef(""),w=f.viewport,S=r.content-r.viewport,j=st(d),C=st(c),N=Ko(h,10);function T(z){if(x.current){const O=z.clientX-x.current.left,L=z.clientY-x.current.top;u({x:O,y:L})}}return v.useEffect(()=>{const z=O=>{const L=O.target;g?.contains(L)&&j(O,S)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[w,g,S,j]),v.useEffect(C,[r,C]),qn(g,N),qn(f.content,N),l.jsx(lk,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:st(s),onThumbPointerUp:st(i),onThumbPositionChange:C,onThumbPointerDown:st(a),children:l.jsx(Ce.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:we(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),x.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),T(z))}),onPointerMove:we(e.onPointerMove,T),onPointerUp:we(e.onPointerUp,z=>{const O=z.target;O.hasPointerCapture(z.pointerId)&&O.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),x.current=null})})})}),xo="ScrollAreaThumb",Af=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nf(xo,e.__scopeScrollArea);return l.jsx(kt,{present:n||o.hasThumb,children:l.jsx(ck,{ref:t,...r})})}),ck=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=_t(xo,n),i=Nf(xo,n),{onThumbPositionChange:a}=i,c=De(t,h=>i.onThumbChange(h)),u=v.useRef(void 0),d=Ko(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const h=s.viewport;if(h){const p=()=>{if(d(),!u.current){const f=fk(h,a);u.current=f,a()}};return a(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[s.viewport,d,a]),l.jsx(Ce.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:we(e.onPointerDownCapture,h=>{const f=h.target.getBoundingClientRect(),g=h.clientX-f.left,m=h.clientY-f.top;i.onThumbPointerDown({x:g,y:m})}),onPointerUp:we(e.onPointerUp,i.onThumbPointerUp)})});Af.displayName=xo;var la="ScrollAreaCorner",If=v.forwardRef((e,t)=>{const n=_t(la,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(uk,{...e,ref:t}):null});If.displayName=la;var uk=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=_t(la,n),[s,i]=v.useState(0),[a,c]=v.useState(0),u=!!(s&&a);return qn(o.scrollbarX,()=>{const d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),c(d)}),qn(o.scrollbarY,()=>{const d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),i(d)}),u?l.jsx(Ce.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function yo(e){return e?parseInt(e,10):0}function zf(e,t){const n=e/t;return isNaN(n)?0:n}function qo(e){const t=zf(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function dk(e,t,n,r="ltr"){const o=qo(n),s=o/2,i=t||s,a=o-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return Pf([c,u],h)(e)}function Al(e,t,n="ltr"){const r=qo(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,c=n==="ltr"?[0,i]:[i*-1,0],u=ri(e,c);return Pf([0,i],[0,a])(u)}function Pf(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Rf(e,t){return e>0&&e<t}var fk=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function Ko(e,t){const n=st(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function qn(e,t){const n=st(t);Qe(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var hk=_f,pk=Cf,mk=If,gk=[" ","Enter","ArrowUp","ArrowDown"],xk=[" ","Enter"],xn="Select",[Jo,Go,yk]=dd(xn),[er]=Jt(xn,[yk,Ho]),Yo=Ho(),[vk,an]=er(xn),[bk,wk]=er(xn),Of=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:p,required:f,form:g}=e,m=Yo(t),[y,x]=v.useState(null),[b,w]=v.useState(null),[S,j]=v.useState(!1),C=Mo(u),[N,T]=pn({prop:r,defaultProp:o??!1,onChange:s,caller:xn}),[z,O]=pn({prop:i,defaultProp:a,onChange:c,caller:xn}),L=v.useRef(null),E=y?g||!!y.closest("form"):!0,[M,k]=v.useState(new Set),D=Array.from(M).map(H=>H.props.value).join(";");return l.jsx(ff,{...m,children:l.jsxs(vk,{required:f,scope:t,trigger:y,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:Dt(),value:z,onValueChange:O,open:N,onOpenChange:T,dir:C,triggerPointerDownPosRef:L,disabled:p,children:[l.jsx(Jo.Provider,{scope:t,children:l.jsx(bk,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(H=>{k(B=>new Set(B).add(H))},[]),onNativeOptionRemove:v.useCallback(H=>{k(B=>{const q=new Set(B);return q.delete(H),q})},[]),children:n})}),E?l.jsxs(rh,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:h,value:z,onChange:H=>O(H.target.value),disabled:p,form:g,children:[z===void 0?l.jsx("option",{value:""}):null,Array.from(M)]},D):null]})})};Of.displayName=xn;var Df="SelectTrigger",Mf=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Yo(n),i=an(Df,n),a=i.disabled||r,c=De(t,i.onTriggerChange),u=Go(n),d=v.useRef("touch"),[h,p,f]=sh(m=>{const y=u().filter(w=>!w.disabled),x=y.find(w=>w.value===i.value),b=ih(y,m,x);b!==void 0&&i.onValueChange(b.value)}),g=m=>{a||(i.onOpenChange(!0),f()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(hf,{asChild:!0,...s,children:l.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":oh(i.value)?"":void 0,...o,ref:c,onClick:we(o.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&g(m)}),onPointerDown:we(o.onPointerDown,m=>{d.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:we(o.onKeyDown,m=>{const y=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(y&&m.key===" ")&&gk.includes(m.key)&&(g(),m.preventDefault())})})})});Mf.displayName=Df;var Lf="SelectValue",Ff=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=an(Lf,n),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,h=De(t,c.onValueNodeChange);return Qe(()=>{u(d)},[u,d]),l.jsx(Ce.span,{...a,ref:h,style:{pointerEvents:"none"},children:oh(c.value)?l.jsx(l.Fragment,{children:i}):s})});Ff.displayName=Lf;var kk="SelectIcon",$f=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.jsx(Ce.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});$f.displayName=kk;var _k="SelectPortal",Bf=e=>l.jsx(Fo,{asChild:!0,...e});Bf.displayName=_k;var yn="SelectContent",Uf=v.forwardRef((e,t)=>{const n=an(yn,e.__scopeSelect),[r,o]=v.useState();if(Qe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Nr.createPortal(l.jsx(Zf,{scope:e.__scopeSelect,children:l.jsx(Jo.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(Vf,{...e,ref:t})});Uf.displayName=yn;var jt=10,[Zf,ln]=er(yn),Sk="SelectContentImpl",Ck=Wn("SelectContent.RemoveScroll"),Vf=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:g,hideWhenDetached:m,avoidCollisions:y,...x}=e,b=an(yn,n),[w,S]=v.useState(null),[j,C]=v.useState(null),N=De(t,te=>S(te)),[T,z]=v.useState(null),[O,L]=v.useState(null),E=Go(n),[M,k]=v.useState(!1),D=v.useRef(!1);v.useEffect(()=>{if(w)return Nd(w)},[w]),vd();const H=v.useCallback(te=>{const[ce,...fe]=E().map(Ee=>Ee.ref.current),[ge]=fe.slice(-1),xe=document.activeElement;for(const Ee of te)if(Ee===xe||(Ee?.scrollIntoView({block:"nearest"}),Ee===ce&&j&&(j.scrollTop=0),Ee===ge&&j&&(j.scrollTop=j.scrollHeight),Ee?.focus(),document.activeElement!==xe))return},[E,j]),B=v.useCallback(()=>H([T,w]),[H,T,w]);v.useEffect(()=>{M&&B()},[M,B]);const{onOpenChange:q,triggerPointerDownPosRef:Y}=b;v.useEffect(()=>{if(w){let te={x:0,y:0};const ce=ge=>{te={x:Math.abs(Math.round(ge.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(ge.pageY)-(Y.current?.y??0))}},fe=ge=>{te.x<=10&&te.y<=10?ge.preventDefault():w.contains(ge.target)||q(!1),document.removeEventListener("pointermove",ce),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",fe,{capture:!0})}}},[w,q,Y]),v.useEffect(()=>{const te=()=>q(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[q]);const[A,W]=sh(te=>{const ce=E().filter(xe=>!xe.disabled),fe=ce.find(xe=>xe.ref.current===document.activeElement),ge=ih(ce,te,fe);ge&&setTimeout(()=>ge.ref.current.focus())}),V=v.useCallback((te,ce,fe)=>{const ge=!D.current&&!fe;(b.value!==void 0&&b.value===ce||ge)&&(z(te),ge&&(D.current=!0))},[b.value]),I=v.useCallback(()=>w?.focus(),[w]),oe=v.useCallback((te,ce,fe)=>{const ge=!D.current&&!fe;(b.value!==void 0&&b.value===ce||ge)&&L(te)},[b.value]),X=r==="popper"?oi:Wf,de=X===oi?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:g,hideWhenDetached:m,avoidCollisions:y}:{};return l.jsx(Zf,{scope:n,content:w,viewport:j,onViewportChange:C,itemRefCallback:V,selectedItem:T,onItemLeave:I,itemTextRefCallback:oe,focusSelectedItem:B,selectedItemText:O,position:r,isPositioned:M,searchRef:A,children:l.jsx(Ki,{as:Ck,allowPinchZoom:!0,children:l.jsx(qi,{asChild:!0,trapped:b.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:we(o,te=>{b.trigger?.focus({preventScroll:!0}),te.preventDefault()}),children:l.jsx(Lo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(X,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:te=>te.preventDefault(),...x,...de,onPlaced:()=>k(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:we(x.onKeyDown,te=>{const ce=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!ce&&te.key.length===1&&W(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let ge=E().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);if(["ArrowUp","End"].includes(te.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const xe=te.target,Ee=ge.indexOf(xe);ge=ge.slice(Ee+1)}setTimeout(()=>H(ge)),te.preventDefault()}})})})})})})});Vf.displayName=Sk;var jk="SelectItemAlignedPosition",Wf=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=an(yn,n),i=ln(yn,n),[a,c]=v.useState(null),[u,d]=v.useState(null),h=De(t,N=>d(N)),p=Go(n),f=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:x,focusSelectedItem:b}=i,w=v.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&y&&x){const N=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),z=s.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(s.dir!=="rtl"){const xe=O.left-T.left,Ee=z.left-xe,Le=N.left-Ee,_=N.width+Le,ee=Math.max(_,T.width),J=window.innerWidth-jt,R=ri(Ee,[jt,Math.max(jt,J-ee)]);a.style.minWidth=_+"px",a.style.left=R+"px"}else{const xe=T.right-O.right,Ee=window.innerWidth-z.right-xe,Le=window.innerWidth-N.right-Ee,_=N.width+Le,ee=Math.max(_,T.width),J=window.innerWidth-jt,R=ri(Ee,[jt,Math.max(jt,J-ee)]);a.style.minWidth=_+"px",a.style.right=R+"px"}const L=p(),E=window.innerHeight-jt*2,M=m.scrollHeight,k=window.getComputedStyle(u),D=parseInt(k.borderTopWidth,10),H=parseInt(k.paddingTop,10),B=parseInt(k.borderBottomWidth,10),q=parseInt(k.paddingBottom,10),Y=D+H+M+q+B,A=Math.min(y.offsetHeight*5,Y),W=window.getComputedStyle(m),V=parseInt(W.paddingTop,10),I=parseInt(W.paddingBottom,10),oe=N.top+N.height/2-jt,X=E-oe,de=y.offsetHeight/2,te=y.offsetTop+de,ce=D+H+te,fe=Y-ce;if(ce<=oe){const xe=L.length>0&&y===L[L.length-1].ref.current;a.style.bottom="0px";const Ee=u.clientHeight-m.offsetTop-m.offsetHeight,Le=Math.max(X,de+(xe?I:0)+Ee+B),_=ce+Le;a.style.height=_+"px"}else{const xe=L.length>0&&y===L[0].ref.current;a.style.top="0px";const Le=Math.max(oe,D+m.offsetTop+(xe?V:0)+de)+fe;a.style.height=Le+"px",m.scrollTop=ce-oe+m.offsetTop}a.style.margin=`${jt}px 0`,a.style.minHeight=A+"px",a.style.maxHeight=E+"px",r?.(),requestAnimationFrame(()=>f.current=!0)}},[p,s.trigger,s.valueNode,a,u,m,y,x,s.dir,r]);Qe(()=>w(),[w]);const[S,j]=v.useState();Qe(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const C=v.useCallback(N=>{N&&g.current===!0&&(w(),b?.(),g.current=!1)},[w,b]);return l.jsx(Nk,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:f,onScrollButtonChange:C,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(Ce.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Wf.displayName=jk;var Ek="SelectPopperPosition",oi=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=jt,...s}=e,i=Yo(n);return l.jsx(pf,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oi.displayName=Ek;var[Nk,ca]=er(yn,{}),si="SelectViewport",Hf=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ln(si,n),i=ca(si,n),a=De(t,s.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Jo.Slot,{scope:n,children:l.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:we(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=i;if(p?.current&&h){const f=Math.abs(c.current-d.scrollTop);if(f>0){const g=window.innerHeight-jt*2,m=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),x=Math.max(m,y);if(x<g){const b=x+f,w=Math.min(g,b),S=b-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});Hf.displayName=si;var qf="SelectGroup",[Tk,Ak]=er(qf),Ik=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dt();return l.jsx(Tk,{scope:n,id:o,children:l.jsx(Ce.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ik.displayName=qf;var Kf="SelectLabel",zk=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ak(Kf,n);return l.jsx(Ce.div,{id:o.id,...r,ref:t})});zk.displayName=Kf;var vo="SelectItem",[Pk,Jf]=er(vo),Gf=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=an(vo,n),c=ln(vo,n),u=a.value===r,[d,h]=v.useState(s??""),[p,f]=v.useState(!1),g=De(t,b=>c.itemRefCallback?.(b,r,o)),m=Dt(),y=v.useRef("touch"),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Pk,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:v.useCallback(b=>{h(w=>w||(b?.textContent??"").trim())},[]),children:l.jsx(Jo.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:l.jsx(Ce.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:we(i.onFocus,()=>f(!0)),onBlur:we(i.onBlur,()=>f(!1)),onClick:we(i.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:we(i.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:we(i.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:we(i.onPointerMove,b=>{y.current=b.pointerType,o?c.onItemLeave?.():y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(i.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:we(i.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(xk.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});Gf.displayName=vo;var gr="SelectItemText",Yf=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=an(gr,n),a=ln(gr,n),c=Jf(gr,n),u=wk(gr,n),[d,h]=v.useState(null),p=De(t,x=>h(x),c.onItemTextChange,x=>a.itemTextRefCallback?.(x,c.value,c.disabled)),f=d?.textContent,g=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return Qe(()=>(m(g),()=>y(g)),[m,y,g]),l.jsxs(l.Fragment,{children:[l.jsx(Ce.span,{id:c.textId,...s,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Nr.createPortal(s.children,i.valueNode):null]})});Yf.displayName=gr;var Xf="SelectItemIndicator",Qf=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Jf(Xf,n).isSelected?l.jsx(Ce.span,{"aria-hidden":!0,...r,ref:t}):null});Qf.displayName=Xf;var ii="SelectScrollUpButton",eh=v.forwardRef((e,t)=>{const n=ln(ii,e.__scopeSelect),r=ca(ii,e.__scopeSelect),[o,s]=v.useState(!1),i=De(t,r.onScrollButtonChange);return Qe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(nh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});eh.displayName=ii;var ai="SelectScrollDownButton",th=v.forwardRef((e,t)=>{const n=ln(ai,e.__scopeSelect),r=ca(ai,e.__scopeSelect),[o,s]=v.useState(!1),i=De(t,r.onScrollButtonChange);return Qe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?l.jsx(nh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});th.displayName=ai;var nh=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ln("SelectScrollButton",n),i=v.useRef(null),a=Go(n),c=v.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Qe(()=>{a().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),l.jsx(Ce.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:we(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:we(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:we(o.onPointerLeave,()=>{c()})})}),Rk="SelectSeparator",Ok=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Ce.div,{"aria-hidden":!0,...r,ref:t})});Ok.displayName=Rk;var li="SelectArrow",Dk=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Yo(n),s=an(li,n),i=ln(li,n);return s.open&&i.position==="popper"?l.jsx(mf,{...o,...r,ref:t}):null});Dk.displayName=li;var Mk="SelectBubbleInput",rh=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),s=De(r,o),i=_2(t);return v.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const h=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(h)}},[i,t]),l.jsx(Ce.select,{...n,style:{...cd,...n.style},ref:s,defaultValue:t})});rh.displayName=Mk;function oh(e){return e===""||e===void 0}function sh(e){const t=st(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(i=>{const a=n.current+i;t(a),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ih(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Lk(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Lk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fk=Of,$k=Mf,Bk=Ff,Uk=$f,Zk=Bf,Vk=Uf,Wk=Hf,Hk=Gf,qk=Yf,Kk=Qf,Jk=eh,Gk=th,Yk="Separator",Il="horizontal",Xk=["horizontal","vertical"],ah=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Il,...o}=e,s=Qk(r)?r:Il,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(Ce.div,{"data-orientation":s,...a,...o,ref:t})});ah.displayName=Yk;function Qk(e){return Xk.includes(e)}var e_=ah,Xo="Tabs",[t_]=Jt(Xo,[xf]),lh=xf(),[n_,ua]=t_(Xo),ch=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Mo(a),[h,p]=pn({prop:r,onChange:o,defaultProp:s??"",caller:Xo});return l.jsx(n_,{scope:n,baseId:Dt(),value:h,onValueChange:p,orientation:i,dir:d,activationMode:c,children:l.jsx(Ce.div,{dir:d,"data-orientation":i,...u,ref:t})})});ch.displayName=Xo;var uh="TabsList",dh=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=ua(uh,n),i=lh(n);return l.jsx(ek,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:l.jsx(Ce.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});dh.displayName=uh;var fh="TabsTrigger",hh=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=ua(fh,n),a=lh(n),c=gh(i.baseId,r),u=xh(i.baseId,r),d=r===i.value;return l.jsx(tk,{asChild:!0,...a,focusable:!o,active:d,children:l.jsx(Ce.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...s,ref:t,onMouseDown:we(e.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?i.onValueChange(r):h.preventDefault()}),onKeyDown:we(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&i.onValueChange(r)}),onFocus:we(e.onFocus,()=>{const h=i.activationMode!=="manual";!d&&!o&&h&&i.onValueChange(r)})})})});hh.displayName=fh;var ph="TabsContent",mh=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=ua(ph,n),c=gh(a.baseId,r),u=xh(a.baseId,r),d=r===a.value,h=v.useRef(d);return v.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),l.jsx(kt,{present:o||d,children:({present:p})=>l.jsx(Ce.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&s})})});mh.displayName=ph;function gh(e,t){return`${e}-trigger-${t}`}function xh(e,t){return`${e}-content-${t}`}var r_=ch,o_=dh,s_=hh,i_=mh,[Qo]=Jt("Tooltip",[Ho]),es=Ho(),yh="TooltipProvider",a_=700,ci="tooltip.open",[l_,da]=Qo(yh),vh=e=>{const{__scopeTooltip:t,delayDuration:n=a_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=v.useRef(!0),a=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(l_,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})};vh.displayName=yh;var Cr="Tooltip",[c_,zr]=Qo(Cr),bh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=da(Cr,e.__scopeTooltip),u=es(t),[d,h]=v.useState(null),p=Dt(),f=v.useRef(0),g=i??c.disableHoverableContent,m=a??c.delayDuration,y=v.useRef(!1),[x,b]=pn({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(ci))):c.onClose(),s?.(N)},caller:Cr}),w=v.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),S=v.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y.current=!1,b(!0)},[b]),j=v.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b(!1)},[b]),C=v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{y.current=!0,b(!0),f.current=0},m)},[m,b]);return v.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),l.jsx(ff,{...u,children:l.jsx(c_,{scope:t,contentId:p,open:x,stateAttribute:w,trigger:d,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?C():S()},[c.isOpenDelayedRef,C,S]),onTriggerLeave:v.useCallback(()=>{g?j():(window.clearTimeout(f.current),f.current=0)},[j,g]),onOpen:S,onClose:j,disableHoverableContent:g,children:n})})};bh.displayName=Cr;var ui="TooltipTrigger",wh=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zr(ui,n),s=da(ui,n),i=es(n),a=v.useRef(null),c=De(t,a,o.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),h=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(hf,{asChild:!0,...i,children:l.jsx(Ce.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:we(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:we(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:we(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:we(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:we(e.onBlur,o.onClose),onClick:we(e.onClick,o.onClose)})})});wh.displayName=ui;var fa="TooltipPortal",[u_,d_]=Qo(fa,{forceMount:void 0}),kh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=zr(fa,t);return l.jsx(u_,{scope:t,forceMount:n,children:l.jsx(kt,{present:n||s.open,children:l.jsx(Fo,{asChild:!0,container:o,children:r})})})};kh.displayName=fa;var Kn="TooltipContent",_h=v.forwardRef((e,t)=>{const n=d_(Kn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=zr(Kn,e.__scopeTooltip);return l.jsx(kt,{present:r||i.open,children:i.disableHoverableContent?l.jsx(Sh,{side:o,...s,ref:t}):l.jsx(f_,{side:o,...s,ref:t})})}),f_=v.forwardRef((e,t)=>{const n=zr(Kn,e.__scopeTooltip),r=da(Kn,e.__scopeTooltip),o=v.useRef(null),s=De(t,o),[i,a]=v.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:h}=r,p=v.useCallback(()=>{a(null),h(!1)},[h]),f=v.useCallback((g,m)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},b=g_(x,y.getBoundingClientRect()),w=x_(x,b),S=y_(m.getBoundingClientRect()),j=b_([...w,...S]);a(j),h(!0)},[h]);return v.useEffect(()=>()=>p(),[p]),v.useEffect(()=>{if(c&&d){const g=y=>f(y,d),m=y=>f(y,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[c,d,f,p]),v.useEffect(()=>{if(i){const g=m=>{const y=m.target,x={x:m.clientX,y:m.clientY},b=c?.contains(y)||d?.contains(y),w=!v_(x,i);b?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,i,u,p]),l.jsx(Sh,{...e,ref:s})}),[h_,p_]=Qo(Cr,{isInside:!1}),m_=Dv("TooltipContent"),Sh=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=zr(Kn,n),u=es(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(ci,d),()=>document.removeEventListener(ci,d)),[d]),v.useEffect(()=>{if(c.trigger){const h=p=>{p.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(Lo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(pf,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(m_,{children:r}),l.jsx(h_,{scope:n,isInside:!0,children:l.jsx(Zv,{id:c.contentId,role:"tooltip",children:o||r})})]})})});_h.displayName=Kn;var Ch="TooltipArrow",jh=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=es(n);return p_(Ch,n).isInside?null:l.jsx(mf,{...o,...r,ref:t})});jh.displayName=Ch;function g_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function x_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function y_(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function v_(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],u=a.x,d=a.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function b_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),w_(t)}function w_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var k_=vh,__=bh,S_=wh,C_=kh,j_=_h,E_=jh;function Eh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Eh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Eh(e))&&(r&&(r+=" "),r+=t);return r}const N_=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},T_=(e,t)=>({classGroupId:e,validator:t}),Th=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),bo="-",zl=[],A_="arbitrary..",I_=e=>{const t=P_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return z_(i);const a=i.split(bo),c=a[0]===""&&a.length>1?1:0;return Ah(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=r[i],u=n[i];return c?u?N_(u,c):c:u||zl}return n[i]||zl}}},Ah=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const u=Ah(e,t+1,s);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(bo):e.slice(t).join(bo),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},z_=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?A_+r:void 0})(),P_=e=>{const{theme:t,classGroups:n}=e;return R_(n,t)},R_=(e,t)=>{const n=Th();for(const r in e){const o=e[r];ha(o,n,r,t)}return n},ha=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];O_(i,t,n,r)}},O_=(e,t,n,r)=>{if(typeof e=="string"){D_(e,t,n);return}if(typeof e=="function"){M_(e,t,n,r);return}L_(e,t,n,r)},D_=(e,t,n)=>{const r=e===""?t:Ih(t,e);r.classGroupId=n},M_=(e,t,n,r)=>{if(F_(e)){ha(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(T_(n,e))},L_=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];ha(c,Ih(t,a),n,r)}},Ih=(e,t)=>{let n=e;const r=t.split(bo),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=Th(),n.nextPart.set(i,a)),n=a}return n},F_=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},di="!",Pl=":",B_=[],Rl=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),U_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,c=0,u;const d=o.length;for(let m=0;m<d;m++){const y=o[m];if(i===0&&a===0){if(y===Pl){s.push(o.slice(c,m)),c=m+1;continue}if(y==="/"){u=m;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const h=s.length===0?o:o.slice(c);let p=h,f=!1;h.endsWith(di)?(p=h.slice(0,-1),f=!0):h.startsWith(di)&&(p=h.slice(1),f=!0);const g=u&&u>c?u-c:void 0;return Rl(s,f,p,g)};if(t){const o=t+Pl,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Rl(B_,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Z_=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},V_=e=>({cache:$_(e.cacheSize),parseClassName:U_(e),sortModifiers:Z_(e),...I_(e)}),W_=/\s+/,H_=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(W_);let c="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:h,modifiers:p,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}=n(d);if(h){c=d+(c.length>0?" "+c:c);continue}let y=!!m,x=r(y?g.substring(0,m):g);if(!x){if(!y){c=d+(c.length>0?" "+c:c);continue}if(x=r(g),!x){c=d+(c.length>0?" "+c:c);continue}y=!1}const b=p.length===0?"":p.length===1?p[0]:s(p).join(":"),w=f?b+di:b,S=w+x;if(i.indexOf(S)>-1)continue;i.push(S);const j=o(x,y);for(let C=0;C<j.length;++C){const N=j[C];i.push(w+N)}c=d+(c.length>0?" "+c:c)}return c},q_=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=zh(n))&&(o&&(o+=" "),o+=r);return o},zh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zh(e[r]))&&(n&&(n+=" "),n+=t);return n},K_=(e,...t)=>{let n,r,o,s;const i=c=>{const u=t.reduce((d,h)=>h(d),e());return n=V_(u),r=n.cache.get,o=n.cache.set,s=a,a(c)},a=c=>{const u=r(c);if(u)return u;const d=H_(c,n);return o(c,d),d};return s=i,(...c)=>s(q_(...c))},J_=[],Ge=e=>{const t=n=>n[e]||J_;return t.isThemeGetter=!0,t},Ph=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,G_=/^\d+\/\d+$/,Y_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,En=e=>G_.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),Gt=e=>!!e&&Number.isInteger(Number(e)),Ss=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Vt=e=>Y_.test(e),nS=()=>!0,rS=e=>X_.test(e)&&!Q_.test(e),Oh=()=>!1,oS=e=>eS.test(e),sS=e=>tS.test(e),iS=e=>!pe(e)&&!me(e),aS=e=>tr(e,Lh,Oh),pe=e=>Ph.test(e),dn=e=>tr(e,Fh,rS),Cs=e=>tr(e,fS,Ne),Ol=e=>tr(e,Dh,Oh),lS=e=>tr(e,Mh,sS),Hr=e=>tr(e,$h,oS),me=e=>Rh.test(e),ar=e=>nr(e,Fh),cS=e=>nr(e,hS),Dl=e=>nr(e,Dh),uS=e=>nr(e,Lh),dS=e=>nr(e,Mh),qr=e=>nr(e,$h,!0),tr=(e,t,n)=>{const r=Ph.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},nr=(e,t,n=!1)=>{const r=Rh.exec(e);return r?r[1]?t(r[1]):n:!1},Dh=e=>e==="position"||e==="percentage",Mh=e=>e==="image"||e==="url",Lh=e=>e==="length"||e==="size"||e==="bg-size",Fh=e=>e==="length",fS=e=>e==="number",hS=e=>e==="family-name",$h=e=>e==="shadow",pS=()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),o=Ge("tracking"),s=Ge("leading"),i=Ge("breakpoint"),a=Ge("container"),c=Ge("spacing"),u=Ge("radius"),d=Ge("shadow"),h=Ge("inset-shadow"),p=Ge("text-shadow"),f=Ge("drop-shadow"),g=Ge("blur"),m=Ge("perspective"),y=Ge("aspect"),x=Ge("ease"),b=Ge("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...S(),me,pe],C=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[me,pe,c],z=()=>[En,"full","auto",...T()],O=()=>[Gt,"none","subgrid",me,pe],L=()=>["auto",{span:["full",Gt,me,pe]},Gt,me,pe],E=()=>[Gt,"auto",me,pe],M=()=>["auto","min","max","fr",me,pe],k=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...T()],B=()=>[En,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],q=()=>[e,me,pe],Y=()=>[...S(),Dl,Ol,{position:[me,pe]}],A=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",uS,aS,{size:[me,pe]}],V=()=>[Ss,ar,dn],I=()=>["","none","full",u,me,pe],oe=()=>["",Ne,ar,dn],X=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Ne,Ss,Dl,Ol],ce=()=>["","none",g,me,pe],fe=()=>["none",Ne,me,pe],ge=()=>["none",Ne,me,pe],xe=()=>[Ne,me,pe],Ee=()=>[En,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vt],breakpoint:[Vt],color:[nS],container:[Vt],"drop-shadow":[Vt],ease:["in","out","in-out"],font:[iS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vt],shadow:[Vt],spacing:["px",Ne],text:[Vt],"text-shadow":[Vt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",En,pe,me,y]}],container:["container"],columns:[{columns:[Ne,pe,me,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Gt,"auto",me,pe]}],basis:[{basis:[En,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,En,"auto","initial","none",pe]}],grow:[{grow:["",Ne,me,pe]}],shrink:[{shrink:["",Ne,me,pe]}],order:[{order:[Gt,"first","last","none",me,pe]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...k(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...k()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,ar,dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,Cs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ss,pe]}],"font-family":[{font:[cS,pe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,me,pe]}],"line-clamp":[{"line-clamp":[Ne,"none",me,Cs]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",me,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",me,dn]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Ne,"auto",me,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gt,me,pe],radial:["",me,pe],conic:[Gt,me,pe]},dS,lS]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,me,pe]}],"outline-w":[{outline:["",Ne,ar,dn]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",d,qr,Hr]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",h,qr,Hr]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Ne,dn]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",p,qr,Hr]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Ne,me,pe]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[me,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,pe]}],filter:[{filter:["","none",me,pe]}],blur:[{blur:ce()}],brightness:[{brightness:[Ne,me,pe]}],contrast:[{contrast:[Ne,me,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,qr,Hr]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Ne,me,pe]}],"hue-rotate":[{"hue-rotate":[Ne,me,pe]}],invert:[{invert:["",Ne,me,pe]}],saturate:[{saturate:[Ne,me,pe]}],sepia:[{sepia:["",Ne,me,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,pe]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,me,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,me,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,me,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,me,pe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,me,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,me,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,me,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,me,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",me,pe]}],ease:[{ease:["linear","initial",x,me,pe]}],delay:[{delay:[Ne,me,pe]}],animate:[{animate:["none",b,me,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,me,pe]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[me,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,pe]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Ne,ar,dn,Cs]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mS=K_(pS);function he(...e){return mS(Nh(e))}function Ye(e){return e>=1048576?(e/1048576).toFixed(1).replace(/\.0$/,"")+"M":e>=1024?(e/1024).toFixed(1).replace(/\.0$/,"")+"K":e.toString()}function Bh(e){return e===null?"pending":e>=200&&e<300?"success":e>=400&&e<500?"client_error":e>=500?"server_error":"pending"}function qe({delayDuration:e=0,...t}){return l.jsx(k_,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Ae({...e}){return l.jsx(__,{"data-slot":"tooltip",...e})}function Ie({...e}){return l.jsx(S_,{"data-slot":"tooltip-trigger",...e})}function ze({className:e,sideOffset:t=0,children:n,...r}){return l.jsx(C_,{children:l.jsxs(j_,{"data-slot":"tooltip-content",sideOffset:t,className:he("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,l.jsx(E_,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function Kr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var js={exports:{}};var Ml;function gS(){return Ml||(Ml=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,o,s){function i(u,d){if(!o[u]){if(!r[u]){var h=typeof Kr=="function"&&Kr;if(!d&&h)return h(u,!0);if(a)return a(u,!0);var p=new Error("Cannot find module '"+u+"'");throw p.code="MODULE_NOT_FOUND",p}var f=o[u]={exports:{}};r[u][0].call(f.exports,function(g){var m=r[u][1][g];return i(m||g)},f,f.exports,n,r,o,s)}return o[u].exports}for(var a=typeof Kr=="function"&&Kr,c=0;c<s.length;c++)i(s[c]);return i})({1:[function(n,r,o){var s=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var u,d,h,p,f,g,m,y=[],x=0,b=c.length,w=b,S=s.getTypeOf(c)!=="string";x<c.length;)w=b-x,h=S?(u=c[x++],d=x<b?c[x++]:0,x<b?c[x++]:0):(u=c.charCodeAt(x++),d=x<b?c.charCodeAt(x++):0,x<b?c.charCodeAt(x++):0),p=u>>2,f=(3&u)<<4|d>>4,g=1<w?(15&d)<<2|h>>6:64,m=2<w?63&h:64,y.push(a.charAt(p)+a.charAt(f)+a.charAt(g)+a.charAt(m));return y.join("")},o.decode=function(c){var u,d,h,p,f,g,m=0,y=0,x="data:";if(c.substr(0,x.length)===x)throw new Error("Invalid base64 input, it looks like a data url.");var b,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&w--,c.charAt(c.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(b=i.uint8array?new Uint8Array(0|w):new Array(0|w);m<c.length;)u=a.indexOf(c.charAt(m++))<<2|(p=a.indexOf(c.charAt(m++)))>>4,d=(15&p)<<4|(f=a.indexOf(c.charAt(m++)))>>2,h=(3&f)<<6|(g=a.indexOf(c.charAt(m++))),b[y++]=u,f!==64&&(b[y++]=d),g!==64&&(b[y++]=h);return b}},{"./support":30,"./utils":32}],2:[function(n,r,o){var s=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,h,p,f,g){this.compressedSize=d,this.uncompressedSize=h,this.crc32=p,this.compression=f,this.compressedContent=g}u.prototype={getContentWorker:function(){var d=new i(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),h=this;return d.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,h,p){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(h.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression",h)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,o){var s=n("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},o.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,o){var s=n("./utils"),i=(function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c})();r.exports=function(a,c){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?(function(u,d,h,p){var f=i,g=p+h;u^=-1;for(var m=p;m<g;m++)u=u>>>8^f[255&(u^d[m])];return-1^u})(0|c,a,a.length,0):(function(u,d,h,p){var f=i,g=p+h;u^=-1;for(var m=p;m<g;m++)u=u>>>8^f[255&(u^d.charCodeAt(m))];return-1^u})(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(n,r,o){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=s?"uint8array":"array";function d(h,p){c.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=p,this.meta={}}o.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,h.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(p){h.push({data:p,meta:h.meta})}},o.compressWorker=function(h){return new d("Deflate",h)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,o){function s(f,g){var m,y="";for(m=0;m<g;m++)y+=String.fromCharCode(255&f),f>>>=8;return y}function i(f,g,m,y,x,b){var w,S,j=f.file,C=f.compression,N=b!==u.utf8encode,T=a.transformTo("string",b(j.name)),z=a.transformTo("string",u.utf8encode(j.name)),O=j.comment,L=a.transformTo("string",b(O)),E=a.transformTo("string",u.utf8encode(O)),M=z.length!==j.name.length,k=E.length!==O.length,D="",H="",B="",q=j.dir,Y=j.date,A={crc32:0,compressedSize:0,uncompressedSize:0};g&&!m||(A.crc32=f.crc32,A.compressedSize=f.compressedSize,A.uncompressedSize=f.uncompressedSize);var W=0;g&&(W|=8),N||!M&&!k||(W|=2048);var V=0,I=0;q&&(V|=16),x==="UNIX"?(I=798,V|=(function(X,de){var te=X;return X||(te=de?16893:33204),(65535&te)<<16})(j.unixPermissions,q)):(I=20,V|=(function(X){return 63&(X||0)})(j.dosPermissions)),w=Y.getUTCHours(),w<<=6,w|=Y.getUTCMinutes(),w<<=5,w|=Y.getUTCSeconds()/2,S=Y.getUTCFullYear()-1980,S<<=4,S|=Y.getUTCMonth()+1,S<<=5,S|=Y.getUTCDate(),M&&(H=s(1,1)+s(d(T),4)+z,D+="up"+s(H.length,2)+H),k&&(B=s(1,1)+s(d(L),4)+E,D+="uc"+s(B.length,2)+B);var oe="";return oe+=`
84
- \0`,oe+=s(W,2),oe+=C.magic,oe+=s(w,2),oe+=s(S,2),oe+=s(A.crc32,4),oe+=s(A.compressedSize,4),oe+=s(A.uncompressedSize,4),oe+=s(T.length,2),oe+=s(D.length,2),{fileRecord:h.LOCAL_FILE_HEADER+oe+T+D,dirRecord:h.CENTRAL_FILE_HEADER+s(I,2)+oe+s(L.length,2)+"\0\0\0\0"+s(V,4)+s(y,4)+T+D+L}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),h=n("../signature");function p(f,g,m,y){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=m,this.encodeFileName=y,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,c),p.prototype.push=function(f){var g=f.meta.percent||0,m=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,c.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:m?(g+100*(m-y-1))/m:100}}))},p.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var g=this.streamFiles&&!f.file.dir;if(g){var m=i(f,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(f){this.accumulate=!1;var g=this.streamFiles&&!f.file.dir,m=i(f,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),g)this.push({data:(function(y){return h.DATA_DESCRIPTOR+s(y.crc32,4)+s(y.compressedSize,4)+s(y.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var f=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var m=this.bytesWritten-f,y=(function(x,b,w,S,j){var C=a.transformTo("string",j(S));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(x,2)+s(x,2)+s(b,4)+s(w,4)+s(C.length,2)+C})(this.dirRecords.length,m,f,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(f){this._sources.push(f);var g=this;return f.on("data",function(m){g.processChunk(m)}),f.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),f.on("error",function(m){g.error(m)}),this},p.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(f){var g=this._sources;if(!c.prototype.error.call(this,f))return!1;for(var m=0;m<g.length;m++)try{g[m].error(f)}catch{}return!0},p.prototype.lock=function(){c.prototype.lock.call(this);for(var f=this._sources,g=0;g<f.length;g++)f[g].lock()},r.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,o){var s=n("../compressions"),i=n("./ZipFileWorker");o.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),h=0;try{a.forEach(function(p,f){h++;var g=(function(b,w){var S=b||w,j=s[S];if(!j)throw new Error(S+" is not a valid compression method !");return j})(f.options.compression,c.compression),m=f.options.compressionOptions||c.compressionOptions||{},y=f.dir,x=f.date;f._compressWorker(g,m).withStreamInfo("file",{name:p,dir:y,date:x,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(d)}),d.entriesCount=h}catch(p){d.error(p)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,o){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new s;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(i,a){return new s().loadAsync(i,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var s=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function h(p){return new i.Promise(function(f,g){var m=p.decompressed.getContentWorker().pipe(new u);m.on("error",function(y){g(y)}).on("end",function(){m.streamInfo.crc32!==p.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}r.exports=function(p,f){var g=this;return f=s.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(p)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",p,!0,f.optimizedBinaryString,f.base64).then(function(m){var y=new c(f);return y.load(m),y}).then(function(m){var y=[i.Promise.resolve(m)],x=m.files;if(f.checkCRC32)for(var b=0;b<x.length;b++)y.push(h(x[b]));return i.Promise.all(y)}).then(function(m){for(var y=m.shift(),x=y.files,b=0;b<x.length;b++){var w=x[b],S=w.fileNameStr,j=s.resolve(w.fileNameStr);g.file(j,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:f.createFolders}),w.dir||(g.file(j).unsafeOriginalName=S)}return y.zipComment.length&&(g.comment=y.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,o){var s=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}s.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,o){var s=n("readable-stream").Readable;function i(a,c,u){s.call(this,c),this._helper=a;var d=this;a.on("data",function(h,p){d.push(h)||d._helper.pause(),u&&u(p)}).on("error",function(h){d.emit("error",h)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,s),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,i);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,i)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var i=new Buffer(s);return i.fill(0),i},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,o){function s(j,C,N){var T,z=a.getTypeOf(C),O=a.extend(N||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(j=x(j)),O.createFolders&&(T=y(j))&&b.call(this,T,!0);var L=z==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!L),(C instanceof h&&C.uncompressedSize===0||O.dir||!C||C.length===0)&&(O.base64=!1,O.binary=!0,C="",O.compression="STORE",z="string");var E=null;E=C instanceof h||C instanceof c?C:g.isNode&&g.isStream(C)?new m(j,C):a.prepareContent(j,C,O.binary,O.optimizedBinaryString,O.base64);var M=new p(j,E,O);this.files[j]=M}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),h=n("./compressedObject"),p=n("./zipObject"),f=n("./generate"),g=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),y=function(j){j.slice(-1)==="/"&&(j=j.substring(0,j.length-1));var C=j.lastIndexOf("/");return 0<C?j.substring(0,C):""},x=function(j){return j.slice(-1)!=="/"&&(j+="/"),j},b=function(j,C){return C=C!==void 0?C:d.createFolders,j=x(j),this.files[j]||s.call(this,j,null,{dir:!0,createFolders:C}),this.files[j]};function w(j){return Object.prototype.toString.call(j)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(j){var C,N,T;for(C in this.files)T=this.files[C],(N=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&j(N,T)},filter:function(j){var C=[];return this.forEach(function(N,T){j(N,T)&&C.push(T)}),C},file:function(j,C,N){if(arguments.length!==1)return j=this.root+j,s.call(this,j,C,N),this;if(w(j)){var T=j;return this.filter(function(O,L){return!L.dir&&T.test(O)})}var z=this.files[this.root+j];return z&&!z.dir?z:null},folder:function(j){if(!j)return this;if(w(j))return this.filter(function(z,O){return O.dir&&j.test(z)});var C=this.root+j,N=b.call(this,C),T=this.clone();return T.root=N.name,T},remove:function(j){j=this.root+j;var C=this.files[j];if(C||(j.slice(-1)!=="/"&&(j+="/"),C=this.files[j]),C&&!C.dir)delete this.files[j];else for(var N=this.filter(function(z,O){return O.name.slice(0,j.length)===j}),T=0;T<N.length;T++)delete this.files[N[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(j){var C,N={};try{if((N=a.extend(j||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var T=N.comment||this.comment||"";C=f.generateWorker(this,N,T)}catch(z){(C=new c("error")).error(z)}return new u(C,N.type||"string",N.mimeType)},generateAsync:function(j,C){return this.generateInternalStream(j).accumulate(C)},generateNodeStream:function(j,C){return(j=j||{}).type||(j.type="nodebuffer"),this.generateInternalStream(j).toNodejsStream(C)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),h=a.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===c&&this.data[p+1]===u&&this.data[p+2]===d&&this.data[p+3]===h)return p-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),h=a.charCodeAt(3),p=this.readData(4);return c===p[0]&&u===p[1]&&d===p[2]&&h===p[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,o){var s=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,o){var s=n("./Uint8ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,o){var s=n("./ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var s=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(h){var p=s.getTypeOf(h);return s.checkSupport(p),p!=="string"||i.uint8array?p==="nodebuffer"?new u(h):i.uint8array?new d(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new c(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var s=n("./GenericWorker"),i=n("../utils");function a(c){s.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,s),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,o){var s=n("./GenericWorker"),i=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=s.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}s.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,o){function s(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=s},{}],29:[function(n,r,o){var s=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),h=null;if(u.nodestream)try{h=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(g,m){return new d.Promise(function(y,x){var b=[],w=g._internalType,S=g._outputType,j=g._mimeType;g.on("data",function(C,N){b.push(C),m&&m(N)}).on("error",function(C){b=[],x(C)}).on("end",function(){try{var C=(function(N,T,z){switch(N){case"blob":return s.newBlob(s.transformTo("arraybuffer",T),z);case"base64":return c.encode(T);default:return s.transformTo(N,T)}})(S,(function(N,T){var z,O=0,L=null,E=0;for(z=0;z<T.length;z++)E+=T[z].length;switch(N){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for(L=new Uint8Array(E),z=0;z<T.length;z++)L.set(T[z],O),O+=T[z].length;return L;case"nodebuffer":return Buffer.concat(T);default:throw new Error("concat : unsupported type '"+N+"'")}})(w,b),j);y(C)}catch(N){x(N)}b=[]}).resume()})}function f(g,m,y){var x=m;switch(m){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=m,this._mimeType=y,s.checkSupport(x),this._worker=g.pipe(new i(x)),g.lock()}catch(b){this._worker=new a("error"),this._worker.error(b)}}f.prototype={accumulate:function(g){return p(this,g)},on:function(g,m){var y=this;return g==="data"?this._worker.on(g,function(x){m.call(y,x.data,x.meta)}):this._worker.on(g,function(){s.delay(m,arguments,y)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var s=new ArrayBuffer(0);try{o.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(s),o.blob=i.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!n("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,o){for(var s=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function h(){c.call(this,"utf-8 decode"),this.leftOver=null}function p(){c.call(this,"utf-8 encode")}o.utf8encode=function(f){return i.nodebuffer?a.newBufferFrom(f,"utf-8"):(function(g){var m,y,x,b,w,S=g.length,j=0;for(b=0;b<S;b++)(64512&(y=g.charCodeAt(b)))==55296&&b+1<S&&(64512&(x=g.charCodeAt(b+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),b++),j+=y<128?1:y<2048?2:y<65536?3:4;for(m=i.uint8array?new Uint8Array(j):new Array(j),b=w=0;w<j;b++)(64512&(y=g.charCodeAt(b)))==55296&&b+1<S&&(64512&(x=g.charCodeAt(b+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),b++),y<128?m[w++]=y:(y<2048?m[w++]=192|y>>>6:(y<65536?m[w++]=224|y>>>12:(m[w++]=240|y>>>18,m[w++]=128|y>>>12&63),m[w++]=128|y>>>6&63),m[w++]=128|63&y);return m})(f)},o.utf8decode=function(f){return i.nodebuffer?s.transformTo("nodebuffer",f).toString("utf-8"):(function(g){var m,y,x,b,w=g.length,S=new Array(2*w);for(m=y=0;m<w;)if((x=g[m++])<128)S[y++]=x;else if(4<(b=u[x]))S[y++]=65533,m+=b-1;else{for(x&=b===2?31:b===3?15:7;1<b&&m<w;)x=x<<6|63&g[m++],b--;1<b?S[y++]=65533:x<65536?S[y++]=x:(x-=65536,S[y++]=55296|x>>10&1023,S[y++]=56320|1023&x)}return S.length!==y&&(S.subarray?S=S.subarray(0,y):S.length=y),s.applyFromCharCode(S)})(f=s.transformTo(i.uint8array?"uint8array":"array",f))},s.inherits(h,c),h.prototype.processChunk=function(f){var g=s.transformTo(i.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=g;(g=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),g.set(m,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var y=(function(b,w){var S;for((w=w||b.length)>b.length&&(w=b.length),S=w-1;0<=S&&(192&b[S])==128;)S--;return S<0||S===0?w:S+u[b[S]]>w?S:w})(g),x=g;y!==g.length&&(i.uint8array?(x=g.subarray(0,y),this.leftOver=g.subarray(y,g.length)):(x=g.slice(0,y),this.leftOver=g.slice(y,g.length))),this.push({data:o.utf8decode(x),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=h,s.inherits(p,c),p.prototype.processChunk=function(f){this.push({data:o.utf8encode(f.data),meta:f.meta})},o.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,o){var s=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(m){return m}function d(m,y){for(var x=0;x<m.length;++x)y[x]=255&m.charCodeAt(x);return y}n("setimmediate"),o.newBlob=function(m,y){o.checkSupport("blob");try{return new Blob([m],{type:y})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(m),x.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(m,y,x){var b=[],w=0,S=m.length;if(S<=x)return String.fromCharCode.apply(null,m);for(;w<S;)y==="array"||y==="nodebuffer"?b.push(String.fromCharCode.apply(null,m.slice(w,Math.min(w+x,S)))):b.push(String.fromCharCode.apply(null,m.subarray(w,Math.min(w+x,S)))),w+=x;return b.join("")},stringifyByChar:function(m){for(var y="",x=0;x<m.length;x++)y+=String.fromCharCode(m[x]);return y},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function p(m){var y=65536,x=o.getTypeOf(m),b=!0;if(x==="uint8array"?b=h.applyCanBeUsed.uint8array:x==="nodebuffer"&&(b=h.applyCanBeUsed.nodebuffer),b)for(;1<y;)try{return h.stringifyByChunk(m,x,y)}catch{y=Math.floor(y/2)}return h.stringifyByChar(m)}function f(m,y){for(var x=0;x<m.length;x++)y[x]=m[x];return y}o.applyFromCharCode=p;var g={};g.string={string:u,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return g.string.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:function(m){return d(m,a.allocBuffer(m.length))}},g.array={string:p,array:u,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(m)}},g.arraybuffer={string:function(m){return p(new Uint8Array(m))},array:function(m){return f(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:u,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(new Uint8Array(m))}},g.uint8array={string:p,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:u,nodebuffer:function(m){return a.newBufferFrom(m)}},g.nodebuffer={string:p,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return g.nodebuffer.uint8array(m).buffer},uint8array:function(m){return f(m,new Uint8Array(m.length))},nodebuffer:u},o.transformTo=function(m,y){if(y=y||"",!m)return y;o.checkSupport(m);var x=o.getTypeOf(y);return g[x][m](y)},o.resolve=function(m){for(var y=m.split("/"),x=[],b=0;b<y.length;b++){var w=y[b];w==="."||w===""&&b!==0&&b!==y.length-1||(w===".."?x.pop():x.push(w))}return x.join("/")},o.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(m)?"nodebuffer":s.uint8array&&m instanceof Uint8Array?"uint8array":s.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(m){var y,x,b="";for(x=0;x<(m||"").length;x++)b+="\\x"+((y=m.charCodeAt(x))<16?"0":"")+y.toString(16).toUpperCase();return b},o.delay=function(m,y,x){setImmediate(function(){m.apply(x||null,y||[])})},o.inherits=function(m,y){function x(){}x.prototype=y.prototype,m.prototype=new x},o.extend=function(){var m,y,x={};for(m=0;m<arguments.length;m++)for(y in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],y)&&x[y]===void 0&&(x[y]=arguments[m][y]);return x},o.prepareContent=function(m,y,x,b,w){return c.Promise.resolve(y).then(function(S){return s.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new c.Promise(function(j,C){var N=new FileReader;N.onload=function(T){j(T.target.result)},N.onerror=function(T){C(T.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var j=o.getTypeOf(S);return j?(j==="arraybuffer"?S=o.transformTo("uint8array",S):j==="string"&&(w?S=i.decode(S):x&&b!==!0&&(S=(function(C){return d(C,s.uint8array?new Uint8Array(C.length):new Array(C.length))})(S))),S):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(h){this.files=[],this.loadOptions=h}d.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(p)+", expected "+i.pretty(h)+")")}},isSignature:function(h,p){var f=this.reader.index;this.reader.setIndex(h);var g=this.reader.readString(4)===p;return this.reader.setIndex(f),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),p=u.uint8array?"uint8array":"array",f=i.transformTo(p,h);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,p,f,g=this.zip64EndOfCentralSize-44;0<g;)h=this.reader.readInt(2),p=this.reader.readInt(4),f=this.reader.readData(p),this.zip64ExtensibleData[h]={id:h,length:p,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,p;for(h=0;h<this.files.length;h++)p=this.files[h],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(h=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var p=h;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var g=p-f;if(0<g)this.isSignature(p,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(h){this.reader=s(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),h=n("./support");function p(f,g){this.options=f,this.loadOptions=g}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var g,m;if(f.skip(22),this.fileNameLength=f.readInt(2),m=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(y){for(var x in d)if(Object.prototype.hasOwnProperty.call(d,x)&&d[x].magic===y)return d[x];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var g=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(g),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=s(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var g,m,y,x=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<x;)g=f.readInt(2),m=f.readInt(2),y=f.readData(m),this.extraFields[g]={id:g,length:m,value:y};f.setIndex(x)},handleUTF8:function(){var f=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var m=i.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var x=i.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var g=s(f.value);return g.readInt(1)!==1||c(this.fileName)!==g.readInt(4)?null:u.utf8decode(g.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var g=s(f.value);return g.readInt(1)!==1||c(this.fileComment)!==g.readInt(4)?null:u.utf8decode(g.readData(f.length-5))}return null}},r.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,o){function s(g,m,y){this.name=g,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=m,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");s.prototype={internalStream:function(g){var m=null,y="string";try{if(!g)throw new Error("No output type specified.");var x=(y=g.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),m=this._decompressWorker();var b=!this._dataBinary;b&&!x&&(m=m.pipe(new c.Utf8EncodeWorker)),!b&&x&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(w){(m=new d("error")).error(w)}return new i(m,y,"")},async:function(g,m){return this.internalStream(g).accumulate(m)},nodeStream:function(g,m){return this.internalStream(g||"nodebuffer").toNodejsStream(m)},_compressWorker:function(g,m){if(this._data instanceof u&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(y,g,m)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<h.length;f++)s.prototype[h[f]]=p;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,o){(function(s){var i,a,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var u=0,d=new c(g),h=s.document.createTextNode("");d.observe(h,{characterData:!0}),i=function(){h.data=u=++u%2}}else if(s.setImmediate||s.MessageChannel===void 0)i="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){g(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(g,0)};else{var p=new s.MessageChannel;p.port1.onmessage=g,i=function(){p.port2.postMessage(0)}}var f=[];function g(){var m,y;a=!0;for(var x=f.length;x;){for(y=f,f=[],m=-1;++m<x;)y[m]();x=f.length}a=!1}r.exports=function(m){f.push(m)!==1||a||i()}}).call(this,typeof Dr<"u"?Dr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,o){var s=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function h(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,x!==i&&m(this,x)}function p(x,b,w){this.promise=x,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function f(x,b,w){s(function(){var S;try{S=b(w)}catch(j){return a.reject(x,j)}S===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,S)})}function g(x){var b=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof b=="function")return function(){b.apply(x,arguments)}}function m(x,b){var w=!1;function S(N){w||(w=!0,a.reject(x,N))}function j(N){w||(w=!0,a.resolve(x,N))}var C=y(function(){b(j,S)});C.status==="error"&&S(C.value)}function y(x,b){var w={};try{w.value=x(b),w.status="success"}catch(S){w.status="error",w.value=S}return w}(r.exports=h).prototype.finally=function(x){if(typeof x!="function")return this;var b=this.constructor;return this.then(function(w){return b.resolve(x()).then(function(){return w})},function(w){return b.resolve(x()).then(function(){throw w})})},h.prototype.catch=function(x){return this.then(null,x)},h.prototype.then=function(x,b){if(typeof x!="function"&&this.state===u||typeof b!="function"&&this.state===c)return this;var w=new this.constructor(i);return this.state!==d?f(w,this.state===u?x:b,this.outcome):this.queue.push(new p(w,x,b)),w},p.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},p.prototype.otherCallFulfilled=function(x){f(this.promise,this.onFulfilled,x)},p.prototype.callRejected=function(x){a.reject(this.promise,x)},p.prototype.otherCallRejected=function(x){f(this.promise,this.onRejected,x)},a.resolve=function(x,b){var w=y(g,b);if(w.status==="error")return a.reject(x,w.value);var S=w.value;if(S)m(x,S);else{x.state=u,x.outcome=b;for(var j=-1,C=x.queue.length;++j<C;)x.queue[j].callFulfilled(b)}return x},a.reject=function(x,b){x.state=c,x.outcome=b;for(var w=-1,S=x.queue.length;++w<S;)x.queue[w].callRejected(b);return x},h.resolve=function(x){return x instanceof this?x:a.resolve(new this(i),x)},h.reject=function(x){var b=new this(i);return a.reject(b,x)},h.all=function(x){var b=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=x.length,S=!1;if(!w)return this.resolve([]);for(var j=new Array(w),C=0,N=-1,T=new this(i);++N<w;)z(x[N],N);return T;function z(O,L){b.resolve(O).then(function(E){j[L]=E,++C!==w||S||(S=!0,a.resolve(T,j))},function(E){S||(S=!0,a.reject(T,E))})}},h.race=function(x){var b=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=x.length,S=!1;if(!w)return this.resolve([]);for(var j=-1,C=new this(i);++j<w;)N=x[j],b.resolve(N).then(function(T){S||(S=!0,a.resolve(C,T))},function(T){S||(S=!0,a.reject(C,T))});var N;return C}},{immediate:36}],38:[function(n,r,o){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,o){var s=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,h=0,p=-1,f=0,g=8;function m(x){if(!(this instanceof m))return new m(x);this.options=i.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},x||{});var b=this.options;b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var w=s.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(w!==h)throw new Error(c[w]);if(b.header&&s.deflateSetHeader(this.strm,b.header),b.dictionary){var S;if(S=typeof b.dictionary=="string"?a.string2buf(b.dictionary):d.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(w=s.deflateSetDictionary(this.strm,S))!==h)throw new Error(c[w]);this._dict_set=!0}}function y(x,b){var w=new m(b);if(w.push(x,!0),w.err)throw w.msg||c[w.err];return w.result}m.prototype.push=function(x,b){var w,S,j=this.strm,C=this.options.chunkSize;if(this.ended)return!1;S=b===~~b?b:b===!0?4:0,typeof x=="string"?j.input=a.string2buf(x):d.call(x)==="[object ArrayBuffer]"?j.input=new Uint8Array(x):j.input=x,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new i.Buf8(C),j.next_out=0,j.avail_out=C),(w=s.deflate(j,S))!==1&&w!==h)return this.onEnd(w),!(this.ended=!0);j.avail_out!==0&&(j.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(j.output,j.next_out))):this.onData(i.shrinkBuf(j.output,j.next_out)))}while((0<j.avail_in||j.avail_out===0)&&w!==1);return S===4?(w=s.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===h):S!==2||(this.onEnd(h),!(j.avail_out=0))},m.prototype.onData=function(x){this.chunks.push(x)},m.prototype.onEnd=function(x){x===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},o.Deflate=m,o.deflate=y,o.deflateRaw=function(x,b){return(b=b||{}).raw=!0,y(x,b)},o.gzip=function(x,b){return(b=b||{}).gzip=!0,y(x,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,o){var s=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),h=n("./zlib/gzheader"),p=Object.prototype.toString;function f(m){if(!(this instanceof f))return new f(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||m&&m.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var x=s.inflateInit2(this.strm,y.windowBits);if(x!==c.Z_OK)throw new Error(u[x]);this.header=new h,s.inflateGetHeader(this.strm,this.header)}function g(m,y){var x=new f(y);if(x.push(m,!0),x.err)throw x.msg||u[x.err];return x.result}f.prototype.push=function(m,y){var x,b,w,S,j,C,N=this.strm,T=this.options.chunkSize,z=this.options.dictionary,O=!1;if(this.ended)return!1;b=y===~~y?y:y===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?N.input=a.binstring2buf(m):p.call(m)==="[object ArrayBuffer]"?N.input=new Uint8Array(m):N.input=m,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new i.Buf8(T),N.next_out=0,N.avail_out=T),(x=s.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&z&&(C=typeof z=="string"?a.string2buf(z):p.call(z)==="[object ArrayBuffer]"?new Uint8Array(z):z,x=s.inflateSetDictionary(this.strm,C)),x===c.Z_BUF_ERROR&&O===!0&&(x=c.Z_OK,O=!1),x!==c.Z_STREAM_END&&x!==c.Z_OK)return this.onEnd(x),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&x!==c.Z_STREAM_END&&(N.avail_in!==0||b!==c.Z_FINISH&&b!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(N.output,N.next_out),S=N.next_out-w,j=a.buf2string(N.output,w),N.next_out=S,N.avail_out=T-S,S&&i.arraySet(N.output,N.output,w,S,0),this.onData(j)):this.onData(i.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(O=!0)}while((0<N.avail_in||N.avail_out===0)&&x!==c.Z_STREAM_END);return x===c.Z_STREAM_END&&(b=c.Z_FINISH),b===c.Z_FINISH?(x=s.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===c.Z_OK):b!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},f.prototype.onData=function(m){this.chunks.push(m)},f.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Inflate=f,o.inflate=g,o.inflateRaw=function(m,y){return(y=y||{}).raw=!0,g(m,y)},o.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var h in d)d.hasOwnProperty(h)&&(c[h]=d[h])}}return c},o.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,h,p){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+h),p);else for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){var u,d,h,p,f,g;for(u=h=0,d=c.length;u<d;u++)h+=c[u].length;for(g=new Uint8Array(h),u=p=0,d=c.length;u<d;u++)f=c[u],g.set(f,p),p+=f.length;return g}},a={arraySet:function(c,u,d,h,p){for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,i)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(s)},{}],42:[function(n,r,o){var s=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new s.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(h,p){if(p<65537&&(h.subarray&&a||!h.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(h,p));for(var f="",g=0;g<p;g++)f+=String.fromCharCode(h[g]);return f}c[254]=c[254]=1,o.string2buf=function(h){var p,f,g,m,y,x=h.length,b=0;for(m=0;m<x;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<x&&(64512&(g=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(g-56320),m++),b+=f<128?1:f<2048?2:f<65536?3:4;for(p=new s.Buf8(b),m=y=0;y<b;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<x&&(64512&(g=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(g-56320),m++),f<128?p[y++]=f:(f<2048?p[y++]=192|f>>>6:(f<65536?p[y++]=224|f>>>12:(p[y++]=240|f>>>18,p[y++]=128|f>>>12&63),p[y++]=128|f>>>6&63),p[y++]=128|63&f);return p},o.buf2binstring=function(h){return d(h,h.length)},o.binstring2buf=function(h){for(var p=new s.Buf8(h.length),f=0,g=p.length;f<g;f++)p[f]=h.charCodeAt(f);return p},o.buf2string=function(h,p){var f,g,m,y,x=p||h.length,b=new Array(2*x);for(f=g=0;f<x;)if((m=h[f++])<128)b[g++]=m;else if(4<(y=c[m]))b[g++]=65533,f+=y-1;else{for(m&=y===2?31:y===3?15:7;1<y&&f<x;)m=m<<6|63&h[f++],y--;1<y?b[g++]=65533:m<65536?b[g++]=m:(m-=65536,b[g++]=55296|m>>10&1023,b[g++]=56320|1023&m)}return d(b,g)},o.utf8border=function(h,p){var f;for((p=p||h.length)>h.length&&(p=h.length),f=p-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?p:f+c[h[f]]>p?f:p}},{"./common":41}],43:[function(n,r,o){r.exports=function(s,i,a,c){for(var u=65535&s|0,d=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--h;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var s=(function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a})();r.exports=function(i,a,c,u){var d=s,h=u+c;i^=-1;for(var p=u;p<h;p++)i=i>>>8^d[255&(i^a[p])];return-1^i}},{}],46:[function(n,r,o){var s,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),h=0,p=4,f=0,g=-2,m=-1,y=4,x=2,b=8,w=9,S=286,j=30,C=19,N=2*S+1,T=15,z=3,O=258,L=O+z+1,E=42,M=113,k=1,D=2,H=3,B=4;function q(_,ee){return _.msg=d[ee],ee}function Y(_){return(_<<1)-(4<_?9:0)}function A(_){for(var ee=_.length;0<=--ee;)_[ee]=0}function W(_){var ee=_.state,J=ee.pending;J>_.avail_out&&(J=_.avail_out),J!==0&&(i.arraySet(_.output,ee.pending_buf,ee.pending_out,J,_.next_out),_.next_out+=J,ee.pending_out+=J,_.total_out+=J,_.avail_out-=J,ee.pending-=J,ee.pending===0&&(ee.pending_out=0))}function V(_,ee){a._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,ee),_.block_start=_.strstart,W(_.strm)}function I(_,ee){_.pending_buf[_.pending++]=ee}function oe(_,ee){_.pending_buf[_.pending++]=ee>>>8&255,_.pending_buf[_.pending++]=255&ee}function X(_,ee){var J,R,P=_.max_chain_length,F=_.strstart,U=_.prev_length,G=_.nice_match,$=_.strstart>_.w_size-L?_.strstart-(_.w_size-L):0,ne=_.window,le=_.w_mask,se=_.prev,Z=_.strstart+O,re=ne[F+U-1],ue=ne[F+U];_.prev_length>=_.good_match&&(P>>=2),G>_.lookahead&&(G=_.lookahead);do if(ne[(J=ee)+U]===ue&&ne[J+U-1]===re&&ne[J]===ne[F]&&ne[++J]===ne[F+1]){F+=2,J++;do;while(ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&F<Z);if(R=O-(Z-F),F=Z-O,U<R){if(_.match_start=ee,G<=(U=R))break;re=ne[F+U-1],ue=ne[F+U]}}while((ee=se[ee&le])>$&&--P!=0);return U<=_.lookahead?U:_.lookahead}function de(_){var ee,J,R,P,F,U,G,$,ne,le,se=_.w_size;do{if(P=_.window_size-_.lookahead-_.strstart,_.strstart>=se+(se-L)){for(i.arraySet(_.window,_.window,se,se,0),_.match_start-=se,_.strstart-=se,_.block_start-=se,ee=J=_.hash_size;R=_.head[--ee],_.head[ee]=se<=R?R-se:0,--J;);for(ee=J=se;R=_.prev[--ee],_.prev[ee]=se<=R?R-se:0,--J;);P+=se}if(_.strm.avail_in===0)break;if(U=_.strm,G=_.window,$=_.strstart+_.lookahead,ne=P,le=void 0,le=U.avail_in,ne<le&&(le=ne),J=le===0?0:(U.avail_in-=le,i.arraySet(G,U.input,U.next_in,le,$),U.state.wrap===1?U.adler=c(U.adler,G,le,$):U.state.wrap===2&&(U.adler=u(U.adler,G,le,$)),U.next_in+=le,U.total_in+=le,le),_.lookahead+=J,_.lookahead+_.insert>=z)for(F=_.strstart-_.insert,_.ins_h=_.window[F],_.ins_h=(_.ins_h<<_.hash_shift^_.window[F+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[F+z-1])&_.hash_mask,_.prev[F&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=F,F++,_.insert--,!(_.lookahead+_.insert<z)););}while(_.lookahead<L&&_.strm.avail_in!==0)}function te(_,ee){for(var J,R;;){if(_.lookahead<L){if(de(_),_.lookahead<L&&ee===h)return k;if(_.lookahead===0)break}if(J=0,_.lookahead>=z&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),J!==0&&_.strstart-J<=_.w_size-L&&(_.match_length=X(_,J)),_.match_length>=z)if(R=a._tr_tally(_,_.strstart-_.match_start,_.match_length-z),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=z){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else R=a._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(R&&(V(_,!1),_.strm.avail_out===0))return k}return _.insert=_.strstart<z-1?_.strstart:z-1,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):_.last_lit&&(V(_,!1),_.strm.avail_out===0)?k:D}function ce(_,ee){for(var J,R,P;;){if(_.lookahead<L){if(de(_),_.lookahead<L&&ee===h)return k;if(_.lookahead===0)break}if(J=0,_.lookahead>=z&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=z-1,J!==0&&_.prev_length<_.max_lazy_match&&_.strstart-J<=_.w_size-L&&(_.match_length=X(_,J),_.match_length<=5&&(_.strategy===1||_.match_length===z&&4096<_.strstart-_.match_start)&&(_.match_length=z-1)),_.prev_length>=z&&_.match_length<=_.prev_length){for(P=_.strstart+_.lookahead-z,R=a._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-z),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=P&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=z-1,_.strstart++,R&&(V(_,!1),_.strm.avail_out===0))return k}else if(_.match_available){if((R=a._tr_tally(_,0,_.window[_.strstart-1]))&&V(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return k}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(R=a._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<z-1?_.strstart:z-1,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):_.last_lit&&(V(_,!1),_.strm.avail_out===0)?k:D}function fe(_,ee,J,R,P){this.good_length=_,this.max_lazy=ee,this.nice_length=J,this.max_chain=R,this.func=P}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*N),this.dyn_dtree=new i.Buf16(2*(2*j+1)),this.bl_tree=new i.Buf16(2*(2*C+1)),A(this.dyn_ltree),A(this.dyn_dtree),A(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(T+1),this.heap=new i.Buf16(2*S+1),A(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*S+1),A(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function xe(_){var ee;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=x,(ee=_.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?E:M,_.adler=ee.wrap===2?0:1,ee.last_flush=h,a._tr_init(ee),f):q(_,g)}function Ee(_){var ee=xe(_);return ee===f&&(function(J){J.window_size=2*J.w_size,A(J.head),J.max_lazy_match=s[J.level].max_lazy,J.good_match=s[J.level].good_length,J.nice_match=s[J.level].nice_length,J.max_chain_length=s[J.level].max_chain,J.strstart=0,J.block_start=0,J.lookahead=0,J.insert=0,J.match_length=J.prev_length=z-1,J.match_available=0,J.ins_h=0})(_.state),ee}function Le(_,ee,J,R,P,F){if(!_)return g;var U=1;if(ee===m&&(ee=6),R<0?(U=0,R=-R):15<R&&(U=2,R-=16),P<1||w<P||J!==b||R<8||15<R||ee<0||9<ee||F<0||y<F)return q(_,g);R===8&&(R=9);var G=new ge;return(_.state=G).strm=_,G.wrap=U,G.gzhead=null,G.w_bits=R,G.w_size=1<<G.w_bits,G.w_mask=G.w_size-1,G.hash_bits=P+7,G.hash_size=1<<G.hash_bits,G.hash_mask=G.hash_size-1,G.hash_shift=~~((G.hash_bits+z-1)/z),G.window=new i.Buf8(2*G.w_size),G.head=new i.Buf16(G.hash_size),G.prev=new i.Buf16(G.w_size),G.lit_bufsize=1<<P+6,G.pending_buf_size=4*G.lit_bufsize,G.pending_buf=new i.Buf8(G.pending_buf_size),G.d_buf=1*G.lit_bufsize,G.l_buf=3*G.lit_bufsize,G.level=ee,G.strategy=F,G.method=J,Ee(_)}s=[new fe(0,0,0,0,function(_,ee){var J=65535;for(J>_.pending_buf_size-5&&(J=_.pending_buf_size-5);;){if(_.lookahead<=1){if(de(_),_.lookahead===0&&ee===h)return k;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var R=_.block_start+J;if((_.strstart===0||_.strstart>=R)&&(_.lookahead=_.strstart-R,_.strstart=R,V(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-L&&(V(_,!1),_.strm.avail_out===0))return k}return _.insert=0,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):(_.strstart>_.block_start&&(V(_,!1),_.strm.avail_out),k)}),new fe(4,4,8,4,te),new fe(4,5,16,8,te),new fe(4,6,32,32,te),new fe(4,4,16,16,ce),new fe(8,16,32,32,ce),new fe(8,16,128,128,ce),new fe(8,32,128,256,ce),new fe(32,128,258,1024,ce),new fe(32,258,258,4096,ce)],o.deflateInit=function(_,ee){return Le(_,ee,b,15,8,0)},o.deflateInit2=Le,o.deflateReset=Ee,o.deflateResetKeep=xe,o.deflateSetHeader=function(_,ee){return _&&_.state?_.state.wrap!==2?g:(_.state.gzhead=ee,f):g},o.deflate=function(_,ee){var J,R,P,F;if(!_||!_.state||5<ee||ee<0)return _?q(_,g):g;if(R=_.state,!_.output||!_.input&&_.avail_in!==0||R.status===666&&ee!==p)return q(_,_.avail_out===0?-5:g);if(R.strm=_,J=R.last_flush,R.last_flush=ee,R.status===E)if(R.wrap===2)_.adler=0,I(R,31),I(R,139),I(R,8),R.gzhead?(I(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),I(R,255&R.gzhead.time),I(R,R.gzhead.time>>8&255),I(R,R.gzhead.time>>16&255),I(R,R.gzhead.time>>24&255),I(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),I(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(I(R,255&R.gzhead.extra.length),I(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(_.adler=u(_.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(I(R,0),I(R,0),I(R,0),I(R,0),I(R,0),I(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),I(R,3),R.status=M);else{var U=b+(R.w_bits-8<<4)<<8;U|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(U|=32),U+=31-U%31,R.status=M,oe(R,U),R.strstart!==0&&(oe(R,_.adler>>>16),oe(R,65535&_.adler)),_.adler=1}if(R.status===69)if(R.gzhead.extra){for(P=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending!==R.pending_buf_size));)I(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,I(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),F===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,I(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),F===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&W(_),R.pending+2<=R.pending_buf_size&&(I(R,255&_.adler),I(R,_.adler>>8&255),_.adler=0,R.status=M)):R.status=M),R.pending!==0){if(W(_),_.avail_out===0)return R.last_flush=-1,f}else if(_.avail_in===0&&Y(ee)<=Y(J)&&ee!==p)return q(_,-5);if(R.status===666&&_.avail_in!==0)return q(_,-5);if(_.avail_in!==0||R.lookahead!==0||ee!==h&&R.status!==666){var G=R.strategy===2?(function($,ne){for(var le;;){if($.lookahead===0&&(de($),$.lookahead===0)){if(ne===h)return k;break}if($.match_length=0,le=a._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,le&&(V($,!1),$.strm.avail_out===0))return k}return $.insert=0,ne===p?(V($,!0),$.strm.avail_out===0?H:B):$.last_lit&&(V($,!1),$.strm.avail_out===0)?k:D})(R,ee):R.strategy===3?(function($,ne){for(var le,se,Z,re,ue=$.window;;){if($.lookahead<=O){if(de($),$.lookahead<=O&&ne===h)return k;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=z&&0<$.strstart&&(se=ue[Z=$.strstart-1])===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]){re=$.strstart+O;do;while(se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&Z<re);$.match_length=O-(re-Z),$.match_length>$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=z?(le=a._tr_tally($,1,$.match_length-z),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(le=a._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),le&&(V($,!1),$.strm.avail_out===0))return k}return $.insert=0,ne===p?(V($,!0),$.strm.avail_out===0?H:B):$.last_lit&&(V($,!1),$.strm.avail_out===0)?k:D})(R,ee):s[R.level].func(R,ee);if(G!==H&&G!==B||(R.status=666),G===k||G===H)return _.avail_out===0&&(R.last_flush=-1),f;if(G===D&&(ee===1?a._tr_align(R):ee!==5&&(a._tr_stored_block(R,0,0,!1),ee===3&&(A(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),W(_),_.avail_out===0))return R.last_flush=-1,f}return ee!==p?f:R.wrap<=0?1:(R.wrap===2?(I(R,255&_.adler),I(R,_.adler>>8&255),I(R,_.adler>>16&255),I(R,_.adler>>24&255),I(R,255&_.total_in),I(R,_.total_in>>8&255),I(R,_.total_in>>16&255),I(R,_.total_in>>24&255)):(oe(R,_.adler>>>16),oe(R,65535&_.adler)),W(_),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?f:1)},o.deflateEnd=function(_){var ee;return _&&_.state?(ee=_.state.status)!==E&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==M&&ee!==666?q(_,g):(_.state=null,ee===M?q(_,-3):f):g},o.deflateSetDictionary=function(_,ee){var J,R,P,F,U,G,$,ne,le=ee.length;if(!_||!_.state||(F=(J=_.state).wrap)===2||F===1&&J.status!==E||J.lookahead)return g;for(F===1&&(_.adler=c(_.adler,ee,le,0)),J.wrap=0,le>=J.w_size&&(F===0&&(A(J.head),J.strstart=0,J.block_start=0,J.insert=0),ne=new i.Buf8(J.w_size),i.arraySet(ne,ee,le-J.w_size,J.w_size,0),ee=ne,le=J.w_size),U=_.avail_in,G=_.next_in,$=_.input,_.avail_in=le,_.next_in=0,_.input=ee,de(J);J.lookahead>=z;){for(R=J.strstart,P=J.lookahead-(z-1);J.ins_h=(J.ins_h<<J.hash_shift^J.window[R+z-1])&J.hash_mask,J.prev[R&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=R,R++,--P;);J.strstart=R,J.lookahead=z-1,de(J)}return J.strstart+=J.lookahead,J.block_start=J.strstart,J.insert=J.lookahead,J.lookahead=0,J.match_length=J.prev_length=z-1,J.match_available=0,_.next_in=G,_.input=$,_.avail_in=U,J.wrap=F,f},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(s,i){var a,c,u,d,h,p,f,g,m,y,x,b,w,S,j,C,N,T,z,O,L,E,M,k,D;a=s.state,c=s.next_in,k=s.input,u=c+(s.avail_in-5),d=s.next_out,D=s.output,h=d-(i-s.avail_out),p=d+(s.avail_out-257),f=a.dmax,g=a.wsize,m=a.whave,y=a.wnext,x=a.window,b=a.hold,w=a.bits,S=a.lencode,j=a.distcode,C=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{w<15&&(b+=k[c++]<<w,w+=8,b+=k[c++]<<w,w+=8),T=S[b&C];t:for(;;){if(b>>>=z=T>>>24,w-=z,(z=T>>>16&255)===0)D[d++]=65535&T;else{if(!(16&z)){if((64&z)==0){T=S[(65535&T)+(b&(1<<z)-1)];continue t}if(32&z){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}O=65535&T,(z&=15)&&(w<z&&(b+=k[c++]<<w,w+=8),O+=b&(1<<z)-1,b>>>=z,w-=z),w<15&&(b+=k[c++]<<w,w+=8,b+=k[c++]<<w,w+=8),T=j[b&N];n:for(;;){if(b>>>=z=T>>>24,w-=z,!(16&(z=T>>>16&255))){if((64&z)==0){T=j[(65535&T)+(b&(1<<z)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(L=65535&T,w<(z&=15)&&(b+=k[c++]<<w,(w+=8)<z&&(b+=k[c++]<<w,w+=8)),f<(L+=b&(1<<z)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(b>>>=z,w-=z,(z=d-h)<L){if(m<(z=L-z)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(M=x,(E=0)===y){if(E+=g-z,z<O){for(O-=z;D[d++]=x[E++],--z;);E=d-L,M=D}}else if(y<z){if(E+=g+y-z,(z-=y)<O){for(O-=z;D[d++]=x[E++],--z;);if(E=0,y<O){for(O-=z=y;D[d++]=x[E++],--z;);E=d-L,M=D}}}else if(E+=y-z,z<O){for(O-=z;D[d++]=x[E++],--z;);E=d-L,M=D}for(;2<O;)D[d++]=M[E++],D[d++]=M[E++],D[d++]=M[E++],O-=3;O&&(D[d++]=M[E++],1<O&&(D[d++]=M[E++]))}else{for(E=d-L;D[d++]=D[E++],D[d++]=D[E++],D[d++]=D[E++],2<(O-=3););O&&(D[d++]=D[E++],1<O&&(D[d++]=D[E++]))}break}}break}}while(c<u&&d<p);c-=O=w>>3,b&=(1<<(w-=O<<3))-1,s.next_in=c,s.next_out=d,s.avail_in=c<u?u-c+5:5-(c-u),s.avail_out=d<p?p-d+257:257-(d-p),a.hold=b,a.bits=w}},{}],49:[function(n,r,o){var s=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,h=2,p=0,f=-2,g=1,m=852,y=592;function x(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(E){var M;return E&&E.state?(M=E.state,E.total_in=E.total_out=M.total=0,E.msg="",M.wrap&&(E.adler=1&M.wrap),M.mode=g,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new s.Buf32(m),M.distcode=M.distdyn=new s.Buf32(y),M.sane=1,M.back=-1,p):f}function S(E){var M;return E&&E.state?((M=E.state).wsize=0,M.whave=0,M.wnext=0,w(E)):f}function j(E,M){var k,D;return E&&E.state?(D=E.state,M<0?(k=0,M=-M):(k=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?f:(D.window!==null&&D.wbits!==M&&(D.window=null),D.wrap=k,D.wbits=M,S(E))):f}function C(E,M){var k,D;return E?(D=new b,(E.state=D).window=null,(k=j(E,M))!==p&&(E.state=null),k):f}var N,T,z=!0;function O(E){if(z){var M;for(N=new s.Buf32(512),T=new s.Buf32(32),M=0;M<144;)E.lens[M++]=8;for(;M<256;)E.lens[M++]=9;for(;M<280;)E.lens[M++]=7;for(;M<288;)E.lens[M++]=8;for(u(d,E.lens,0,288,N,0,E.work,{bits:9}),M=0;M<32;)E.lens[M++]=5;u(h,E.lens,0,32,T,0,E.work,{bits:5}),z=!1}E.lencode=N,E.lenbits=9,E.distcode=T,E.distbits=5}function L(E,M,k,D){var H,B=E.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new s.Buf8(B.wsize)),D>=B.wsize?(s.arraySet(B.window,M,k-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(D<(H=B.wsize-B.wnext)&&(H=D),s.arraySet(B.window,M,k-D,H,B.wnext),(D-=H)?(s.arraySet(B.window,M,k-D,D,0),B.wnext=D,B.whave=B.wsize):(B.wnext+=H,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=H))),0}o.inflateReset=S,o.inflateReset2=j,o.inflateResetKeep=w,o.inflateInit=function(E){return C(E,15)},o.inflateInit2=C,o.inflate=function(E,M){var k,D,H,B,q,Y,A,W,V,I,oe,X,de,te,ce,fe,ge,xe,Ee,Le,_,ee,J,R,P=0,F=new s.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return f;(k=E.state).mode===12&&(k.mode=13),q=E.next_out,H=E.output,A=E.avail_out,B=E.next_in,D=E.input,Y=E.avail_in,W=k.hold,V=k.bits,I=Y,oe=A,ee=p;e:for(;;)switch(k.mode){case g:if(k.wrap===0){k.mode=13;break}for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(2&k.wrap&&W===35615){F[k.check=0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0),V=W=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&W)<<8)+(W>>8))%31){E.msg="incorrect header check",k.mode=30;break}if((15&W)!=8){E.msg="unknown compression method",k.mode=30;break}if(V-=4,_=8+(15&(W>>>=4)),k.wbits===0)k.wbits=_;else if(_>k.wbits){E.msg="invalid window size",k.mode=30;break}k.dmax=1<<_,E.adler=k.check=1,k.mode=512&W?10:12,V=W=0;break;case 2:for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(k.flags=W,(255&k.flags)!=8){E.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){E.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=W>>8&1),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0,k.mode=3;case 3:for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.head&&(k.head.time=W),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,F[2]=W>>>16&255,F[3]=W>>>24&255,k.check=a(k.check,F,4,0)),V=W=0,k.mode=4;case 4:for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.head&&(k.head.xflags=255&W,k.head.os=W>>8),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0,k.mode=5;case 5:if(1024&k.flags){for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.length=W,k.head&&(k.head.extra_len=W),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(Y<(X=k.length)&&(X=Y),X&&(k.head&&(_=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),s.arraySet(k.head.extra,D,B,X,_)),512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,k.length-=X),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(Y===0)break e;for(X=0;_=D[B+X++],k.head&&_&&k.length<65536&&(k.head.name+=String.fromCharCode(_)),_&&X<Y;);if(512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,_)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(Y===0)break e;for(X=0;_=D[B+X++],k.head&&_&&k.length<65536&&(k.head.comment+=String.fromCharCode(_)),_&&X<Y;);if(512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,_)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W!==(65535&k.check)){E.msg="header crc mismatch",k.mode=30;break}V=W=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),E.adler=k.check=0,k.mode=12;break;case 10:for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}E.adler=k.check=x(W),V=W=0,k.mode=11;case 11:if(k.havedict===0)return E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,2;E.adler=k.check=1,k.mode=12;case 12:if(M===5||M===6)break e;case 13:if(k.last){W>>>=7&V,V-=7&V,k.mode=27;break}for(;V<3;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}switch(k.last=1&W,V-=1,3&(W>>>=1)){case 0:k.mode=14;break;case 1:if(O(k),k.mode=20,M!==6)break;W>>>=2,V-=2;break e;case 2:k.mode=17;break;case 3:E.msg="invalid block type",k.mode=30}W>>>=2,V-=2;break;case 14:for(W>>>=7&V,V-=7&V;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if((65535&W)!=(W>>>16^65535)){E.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&W,V=W=0,k.mode=15,M===6)break e;case 15:k.mode=16;case 16:if(X=k.length){if(Y<X&&(X=Y),A<X&&(X=A),X===0)break e;s.arraySet(H,D,B,X,q),Y-=X,B+=X,A-=X,q+=X,k.length-=X;break}k.mode=12;break;case 17:for(;V<14;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(k.nlen=257+(31&W),W>>>=5,V-=5,k.ndist=1+(31&W),W>>>=5,V-=5,k.ncode=4+(15&W),W>>>=4,V-=4,286<k.nlen||30<k.ndist){E.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;V<3;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.lens[U[k.have++]]=7&W,W>>>=3,V-=3}for(;k.have<19;)k.lens[U[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,J={bits:k.lenbits},ee=u(0,k.lens,0,19,k.lencode,0,k.work,J),k.lenbits=J.bits,ee){E.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;fe=(P=k.lencode[W&(1<<k.lenbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(ge<16)W>>>=ce,V-=ce,k.lens[k.have++]=ge;else{if(ge===16){for(R=ce+2;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W>>>=ce,V-=ce,k.have===0){E.msg="invalid bit length repeat",k.mode=30;break}_=k.lens[k.have-1],X=3+(3&W),W>>>=2,V-=2}else if(ge===17){for(R=ce+3;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}V-=ce,_=0,X=3+(7&(W>>>=ce)),W>>>=3,V-=3}else{for(R=ce+7;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}V-=ce,_=0,X=11+(127&(W>>>=ce)),W>>>=7,V-=7}if(k.have+X>k.nlen+k.ndist){E.msg="invalid bit length repeat",k.mode=30;break}for(;X--;)k.lens[k.have++]=_}}if(k.mode===30)break;if(k.lens[256]===0){E.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,J={bits:k.lenbits},ee=u(d,k.lens,0,k.nlen,k.lencode,0,k.work,J),k.lenbits=J.bits,ee){E.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,J={bits:k.distbits},ee=u(h,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,J),k.distbits=J.bits,ee){E.msg="invalid distances set",k.mode=30;break}if(k.mode=20,M===6)break e;case 20:k.mode=21;case 21:if(6<=Y&&258<=A){E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,c(E,oe),q=E.next_out,H=E.output,A=E.avail_out,B=E.next_in,D=E.input,Y=E.avail_in,W=k.hold,V=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;fe=(P=k.lencode[W&(1<<k.lenbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(fe&&(240&fe)==0){for(xe=ce,Ee=fe,Le=ge;fe=(P=k.lencode[Le+((W&(1<<xe+Ee)-1)>>xe)])>>>16&255,ge=65535&P,!(xe+(ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}W>>>=xe,V-=xe,k.back+=xe}if(W>>>=ce,V-=ce,k.back+=ce,k.length=ge,fe===0){k.mode=26;break}if(32&fe){k.back=-1,k.mode=12;break}if(64&fe){E.msg="invalid literal/length code",k.mode=30;break}k.extra=15&fe,k.mode=22;case 22:if(k.extra){for(R=k.extra;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.length+=W&(1<<k.extra)-1,W>>>=k.extra,V-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;fe=(P=k.distcode[W&(1<<k.distbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if((240&fe)==0){for(xe=ce,Ee=fe,Le=ge;fe=(P=k.distcode[Le+((W&(1<<xe+Ee)-1)>>xe)])>>>16&255,ge=65535&P,!(xe+(ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}W>>>=xe,V-=xe,k.back+=xe}if(W>>>=ce,V-=ce,k.back+=ce,64&fe){E.msg="invalid distance code",k.mode=30;break}k.offset=ge,k.extra=15&fe,k.mode=24;case 24:if(k.extra){for(R=k.extra;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.offset+=W&(1<<k.extra)-1,W>>>=k.extra,V-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){E.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(A===0)break e;if(X=oe-A,k.offset>X){if((X=k.offset-X)>k.whave&&k.sane){E.msg="invalid distance too far back",k.mode=30;break}de=X>k.wnext?(X-=k.wnext,k.wsize-X):k.wnext-X,X>k.length&&(X=k.length),te=k.window}else te=H,de=q-k.offset,X=k.length;for(A<X&&(X=A),A-=X,k.length-=X;H[q++]=te[de++],--X;);k.length===0&&(k.mode=21);break;case 26:if(A===0)break e;H[q++]=k.length,A--,k.mode=21;break;case 27:if(k.wrap){for(;V<32;){if(Y===0)break e;Y--,W|=D[B++]<<V,V+=8}if(oe-=A,E.total_out+=oe,k.total+=oe,oe&&(E.adler=k.check=k.flags?a(k.check,H,oe,q-oe):i(k.check,H,oe,q-oe)),oe=A,(k.flags?W:x(W))!==k.check){E.msg="incorrect data check",k.mode=30;break}V=W=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W!==(4294967295&k.total)){E.msg="incorrect length check",k.mode=30;break}V=W=0}k.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;default:return f}return E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,(k.wsize||oe!==E.avail_out&&k.mode<30&&(k.mode<27||M!==4))&&L(E,E.output,E.next_out,oe-E.avail_out)?(k.mode=31,-4):(I-=E.avail_in,oe-=E.avail_out,E.total_in+=I,E.total_out+=oe,k.total+=oe,k.wrap&&oe&&(E.adler=k.check=k.flags?a(k.check,H,oe,E.next_out-oe):i(k.check,H,oe,E.next_out-oe)),E.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(I==0&&oe===0||M===4)&&ee===p&&(ee=-5),ee)},o.inflateEnd=function(E){if(!E||!E.state)return f;var M=E.state;return M.window&&(M.window=null),E.state=null,p},o.inflateGetHeader=function(E,M){var k;return E&&E.state?(2&(k=E.state).wrap)==0?f:((k.head=M).done=!1,p):f},o.inflateSetDictionary=function(E,M){var k,D=M.length;return E&&E.state?(k=E.state).wrap!==0&&k.mode!==11?f:k.mode===11&&i(1,M,D,0)!==k.check?-3:L(E,M,D,D)?(k.mode=31,-4):(k.havedict=1,p):f},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,o){var s=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,h,p,f,g,m,y,x){var b,w,S,j,C,N,T,z,O,L=x.bits,E=0,M=0,k=0,D=0,H=0,B=0,q=0,Y=0,A=0,W=0,V=null,I=0,oe=new s.Buf16(16),X=new s.Buf16(16),de=null,te=0;for(E=0;E<=15;E++)oe[E]=0;for(M=0;M<f;M++)oe[h[p+M]]++;for(H=L,D=15;1<=D&&oe[D]===0;D--);if(D<H&&(H=D),D===0)return g[m++]=20971520,g[m++]=20971520,x.bits=1,0;for(k=1;k<D&&oe[k]===0;k++);for(H<k&&(H=k),E=Y=1;E<=15;E++)if(Y<<=1,(Y-=oe[E])<0)return-1;if(0<Y&&(d===0||D!==1))return-1;for(X[1]=0,E=1;E<15;E++)X[E+1]=X[E]+oe[E];for(M=0;M<f;M++)h[p+M]!==0&&(y[X[h[p+M]]++]=M);if(N=d===0?(V=de=y,19):d===1?(V=i,I-=257,de=a,te-=257,256):(V=c,de=u,-1),E=k,C=m,q=M=W=0,S=-1,j=(A=1<<(B=H))-1,d===1&&852<A||d===2&&592<A)return 1;for(;;){for(T=E-q,O=y[M]<N?(z=0,y[M]):y[M]>N?(z=de[te+y[M]],V[I+y[M]]):(z=96,0),b=1<<E-q,k=w=1<<B;g[C+(W>>q)+(w-=b)]=T<<24|z<<16|O|0,w!==0;);for(b=1<<E-1;W&b;)b>>=1;if(b!==0?(W&=b-1,W+=b):W=0,M++,--oe[E]==0){if(E===D)break;E=h[p+y[M]]}if(H<E&&(W&j)!==S){for(q===0&&(q=H),C+=k,Y=1<<(B=E-q);B+q<D&&!((Y-=oe[B+q])<=0);)B++,Y<<=1;if(A+=1<<B,d===1&&852<A||d===2&&592<A)return 1;g[S=W&j]=H<<24|B<<16|C-m|0}}return W!==0&&(g[C+W]=E-q<<24|64<<16|0),x.bits=H,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var s=n("../utils/common"),i=0,a=1;function c(P){for(var F=P.length;0<=--F;)P[F]=0}var u=0,d=29,h=256,p=h+1+d,f=30,g=19,m=2*p+1,y=15,x=16,b=7,w=256,S=16,j=17,C=18,N=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],T=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=new Array(2*(p+2));c(L);var E=new Array(2*f);c(E);var M=new Array(512);c(M);var k=new Array(256);c(k);var D=new Array(d);c(D);var H,B,q,Y=new Array(f);function A(P,F,U,G,$){this.static_tree=P,this.extra_bits=F,this.extra_base=U,this.elems=G,this.max_length=$,this.has_stree=P&&P.length}function W(P,F){this.dyn_tree=P,this.max_code=0,this.stat_desc=F}function V(P){return P<256?M[P]:M[256+(P>>>7)]}function I(P,F){P.pending_buf[P.pending++]=255&F,P.pending_buf[P.pending++]=F>>>8&255}function oe(P,F,U){P.bi_valid>x-U?(P.bi_buf|=F<<P.bi_valid&65535,I(P,P.bi_buf),P.bi_buf=F>>x-P.bi_valid,P.bi_valid+=U-x):(P.bi_buf|=F<<P.bi_valid&65535,P.bi_valid+=U)}function X(P,F,U){oe(P,U[2*F],U[2*F+1])}function de(P,F){for(var U=0;U|=1&P,P>>>=1,U<<=1,0<--F;);return U>>>1}function te(P,F,U){var G,$,ne=new Array(y+1),le=0;for(G=1;G<=y;G++)ne[G]=le=le+U[G-1]<<1;for($=0;$<=F;$++){var se=P[2*$+1];se!==0&&(P[2*$]=de(ne[se]++,se))}}function ce(P){var F;for(F=0;F<p;F++)P.dyn_ltree[2*F]=0;for(F=0;F<f;F++)P.dyn_dtree[2*F]=0;for(F=0;F<g;F++)P.bl_tree[2*F]=0;P.dyn_ltree[2*w]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function fe(P){8<P.bi_valid?I(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function ge(P,F,U,G){var $=2*F,ne=2*U;return P[$]<P[ne]||P[$]===P[ne]&&G[F]<=G[U]}function xe(P,F,U){for(var G=P.heap[U],$=U<<1;$<=P.heap_len&&($<P.heap_len&&ge(F,P.heap[$+1],P.heap[$],P.depth)&&$++,!ge(F,G,P.heap[$],P.depth));)P.heap[U]=P.heap[$],U=$,$<<=1;P.heap[U]=G}function Ee(P,F,U){var G,$,ne,le,se=0;if(P.last_lit!==0)for(;G=P.pending_buf[P.d_buf+2*se]<<8|P.pending_buf[P.d_buf+2*se+1],$=P.pending_buf[P.l_buf+se],se++,G===0?X(P,$,F):(X(P,(ne=k[$])+h+1,F),(le=N[ne])!==0&&oe(P,$-=D[ne],le),X(P,ne=V(--G),U),(le=T[ne])!==0&&oe(P,G-=Y[ne],le)),se<P.last_lit;);X(P,w,F)}function Le(P,F){var U,G,$,ne=F.dyn_tree,le=F.stat_desc.static_tree,se=F.stat_desc.has_stree,Z=F.stat_desc.elems,re=-1;for(P.heap_len=0,P.heap_max=m,U=0;U<Z;U++)ne[2*U]!==0?(P.heap[++P.heap_len]=re=U,P.depth[U]=0):ne[2*U+1]=0;for(;P.heap_len<2;)ne[2*($=P.heap[++P.heap_len]=re<2?++re:0)]=1,P.depth[$]=0,P.opt_len--,se&&(P.static_len-=le[2*$+1]);for(F.max_code=re,U=P.heap_len>>1;1<=U;U--)xe(P,ne,U);for($=Z;U=P.heap[1],P.heap[1]=P.heap[P.heap_len--],xe(P,ne,1),G=P.heap[1],P.heap[--P.heap_max]=U,P.heap[--P.heap_max]=G,ne[2*$]=ne[2*U]+ne[2*G],P.depth[$]=(P.depth[U]>=P.depth[G]?P.depth[U]:P.depth[G])+1,ne[2*U+1]=ne[2*G+1]=$,P.heap[1]=$++,xe(P,ne,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(ue,be){var Pe,He,ft,Re,It,Ut,Ve=be.dyn_tree,Zt=be.max_code,Ct=be.stat_desc.static_tree,$p=be.stat_desc.has_stree,Bp=be.stat_desc.extra_bits,Pa=be.stat_desc.extra_base,ir=be.stat_desc.max_length,Or=0;for(Re=0;Re<=y;Re++)ue.bl_count[Re]=0;for(Ve[2*ue.heap[ue.heap_max]+1]=0,Pe=ue.heap_max+1;Pe<m;Pe++)ir<(Re=Ve[2*Ve[2*(He=ue.heap[Pe])+1]+1]+1)&&(Re=ir,Or++),Ve[2*He+1]=Re,Zt<He||(ue.bl_count[Re]++,It=0,Pa<=He&&(It=Bp[He-Pa]),Ut=Ve[2*He],ue.opt_len+=Ut*(Re+It),$p&&(ue.static_len+=Ut*(Ct[2*He+1]+It)));if(Or!==0){do{for(Re=ir-1;ue.bl_count[Re]===0;)Re--;ue.bl_count[Re]--,ue.bl_count[Re+1]+=2,ue.bl_count[ir]--,Or-=2}while(0<Or);for(Re=ir;Re!==0;Re--)for(He=ue.bl_count[Re];He!==0;)Zt<(ft=ue.heap[--Pe])||(Ve[2*ft+1]!==Re&&(ue.opt_len+=(Re-Ve[2*ft+1])*Ve[2*ft],Ve[2*ft+1]=Re),He--)}})(P,F),te(ne,re,P.bl_count)}function _(P,F,U){var G,$,ne=-1,le=F[1],se=0,Z=7,re=4;for(le===0&&(Z=138,re=3),F[2*(U+1)+1]=65535,G=0;G<=U;G++)$=le,le=F[2*(G+1)+1],++se<Z&&$===le||(se<re?P.bl_tree[2*$]+=se:$!==0?($!==ne&&P.bl_tree[2*$]++,P.bl_tree[2*S]++):se<=10?P.bl_tree[2*j]++:P.bl_tree[2*C]++,ne=$,re=(se=0)===le?(Z=138,3):$===le?(Z=6,3):(Z=7,4))}function ee(P,F,U){var G,$,ne=-1,le=F[1],se=0,Z=7,re=4;for(le===0&&(Z=138,re=3),G=0;G<=U;G++)if($=le,le=F[2*(G+1)+1],!(++se<Z&&$===le)){if(se<re)for(;X(P,$,P.bl_tree),--se!=0;);else $!==0?($!==ne&&(X(P,$,P.bl_tree),se--),X(P,S,P.bl_tree),oe(P,se-3,2)):se<=10?(X(P,j,P.bl_tree),oe(P,se-3,3)):(X(P,C,P.bl_tree),oe(P,se-11,7));ne=$,re=(se=0)===le?(Z=138,3):$===le?(Z=6,3):(Z=7,4)}}c(Y);var J=!1;function R(P,F,U,G){oe(P,(u<<1)+(G?1:0),3),(function($,ne,le,se){fe($),I($,le),I($,~le),s.arraySet($.pending_buf,$.window,ne,le,$.pending),$.pending+=le})(P,F,U)}o._tr_init=function(P){J||((function(){var F,U,G,$,ne,le=new Array(y+1);for($=G=0;$<d-1;$++)for(D[$]=G,F=0;F<1<<N[$];F++)k[G++]=$;for(k[G-1]=$,$=ne=0;$<16;$++)for(Y[$]=ne,F=0;F<1<<T[$];F++)M[ne++]=$;for(ne>>=7;$<f;$++)for(Y[$]=ne<<7,F=0;F<1<<T[$]-7;F++)M[256+ne++]=$;for(U=0;U<=y;U++)le[U]=0;for(F=0;F<=143;)L[2*F+1]=8,F++,le[8]++;for(;F<=255;)L[2*F+1]=9,F++,le[9]++;for(;F<=279;)L[2*F+1]=7,F++,le[7]++;for(;F<=287;)L[2*F+1]=8,F++,le[8]++;for(te(L,p+1,le),F=0;F<f;F++)E[2*F+1]=5,E[2*F]=de(F,5);H=new A(L,N,h+1,p,y),B=new A(E,T,0,f,y),q=new A(new Array(0),z,0,g,b)})(),J=!0),P.l_desc=new W(P.dyn_ltree,H),P.d_desc=new W(P.dyn_dtree,B),P.bl_desc=new W(P.bl_tree,q),P.bi_buf=0,P.bi_valid=0,ce(P)},o._tr_stored_block=R,o._tr_flush_block=function(P,F,U,G){var $,ne,le=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(se){var Z,re=4093624447;for(Z=0;Z<=31;Z++,re>>>=1)if(1&re&&se.dyn_ltree[2*Z]!==0)return i;if(se.dyn_ltree[18]!==0||se.dyn_ltree[20]!==0||se.dyn_ltree[26]!==0)return a;for(Z=32;Z<h;Z++)if(se.dyn_ltree[2*Z]!==0)return a;return i})(P)),Le(P,P.l_desc),Le(P,P.d_desc),le=(function(se){var Z;for(_(se,se.dyn_ltree,se.l_desc.max_code),_(se,se.dyn_dtree,se.d_desc.max_code),Le(se,se.bl_desc),Z=g-1;3<=Z&&se.bl_tree[2*O[Z]+1]===0;Z--);return se.opt_len+=3*(Z+1)+5+5+4,Z})(P),$=P.opt_len+3+7>>>3,(ne=P.static_len+3+7>>>3)<=$&&($=ne)):$=ne=U+5,U+4<=$&&F!==-1?R(P,F,U,G):P.strategy===4||ne===$?(oe(P,2+(G?1:0),3),Ee(P,L,E)):(oe(P,4+(G?1:0),3),(function(se,Z,re,ue){var be;for(oe(se,Z-257,5),oe(se,re-1,5),oe(se,ue-4,4),be=0;be<ue;be++)oe(se,se.bl_tree[2*O[be]+1],3);ee(se,se.dyn_ltree,Z-1),ee(se,se.dyn_dtree,re-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,le+1),Ee(P,P.dyn_ltree,P.dyn_dtree)),ce(P),G&&fe(P)},o._tr_tally=function(P,F,U){return P.pending_buf[P.d_buf+2*P.last_lit]=F>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&F,P.pending_buf[P.l_buf+P.last_lit]=255&U,P.last_lit++,F===0?P.dyn_ltree[2*U]++:(P.matches++,F--,P.dyn_ltree[2*(k[U]+h+1)]++,P.dyn_dtree[2*V(F)]++),P.last_lit===P.lit_bufsize-1},o._tr_align=function(P){oe(P,2,3),X(P,w,L),(function(F){F.bi_valid===16?(I(F,F.bi_buf),F.bi_buf=0,F.bi_valid=0):8<=F.bi_valid&&(F.pending_buf[F.pending++]=255&F.bi_buf,F.bi_buf>>=8,F.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(s){(function(i,a){if(!i.setImmediate){var c,u,d,h,p=1,f={},g=!1,m=i.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(i);y=y&&y.setTimeout?y:i,c={}.toString.call(i.process)==="[object process]"?function(S){process.nextTick(function(){b(S)})}:(function(){if(i.postMessage&&!i.importScripts){var S=!0,j=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=j,S}})()?(h="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",w,!1):i.attachEvent("onmessage",w),function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){b(S.data)},function(S){d.port2.postMessage(S)}):m&&"onreadystatechange"in m.createElement("script")?(u=m.documentElement,function(S){var j=m.createElement("script");j.onreadystatechange=function(){b(S),j.onreadystatechange=null,u.removeChild(j),j=null},u.appendChild(j)}):function(S){setTimeout(b,0,S)},y.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var j=new Array(arguments.length-1),C=0;C<j.length;C++)j[C]=arguments[C+1];var N={callback:S,args:j};return f[p]=N,c(p),p++},y.clearImmediate=x}function x(S){delete f[S]}function b(S){if(g)setTimeout(b,0,S);else{var j=f[S];if(j){g=!0;try{(function(C){var N=C.callback,T=C.args;switch(T.length){case 0:N();break;case 1:N(T[0]);break;case 2:N(T[0],T[1]);break;case 3:N(T[0],T[1],T[2]);break;default:N.apply(a,T)}})(j)}finally{x(S),g=!1}}}}function w(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&b(+S.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Dr<"u"?Dr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(js)),js.exports}var xS=gS();const yS=Ni(xS);async function vS(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}async function bS(e){const t=new yS;for(const i of e)i.rawRequestBody!==null&&t.file(`#${i.id}.Request.json`,i.rawRequestBody),i.responseText!==null&&t.file(`#${i.id}.Response.json`,i.responseText);const n=e.filter(i=>i.streaming);await Promise.allSettled(n.map(async i=>{const a=await vS(i.id);a!==null&&t.file(`#${i.id}.SSE.Response.json`,a)}));const r=await t.generateAsync({type:"blob"}),o=URL.createObjectURL(r),s=document.createElement("a");s.href=o,s.download=`llm-inspector-export-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)}const wS="1.16.0",kS={version:wS},Ll=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fl=Nh,pa=(e,t)=>n=>{var r;if(t?.variants==null)return Fl(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],h=s?.[u];if(d===null)return null;const p=Ll(d)||Ll(h);return o[u][p]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...u,h,p]:u},[]);return Fl(e,i,c,n?.class,n?.className)},_S=pa("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function xt({className:e,variant:t="default",asChild:n=!1,...r}){const o=n?Rv:"span";return l.jsx(o,{"data-slot":"badge","data-variant":t,className:he(_S({variant:t}),e),...r})}function ts({...e}){return l.jsx(g2,{"data-slot":"dialog",...e})}function SS({...e}){return l.jsx(x2,{"data-slot":"dialog-trigger",...e})}function CS({...e}){return l.jsx(y2,{"data-slot":"dialog-portal",...e})}function jS({className:e,...t}){return l.jsx(v2,{"data-slot":"dialog-overlay",className:he("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function ns({className:e,children:t,...n}){return l.jsxs(CS,{children:[l.jsx(jS,{}),l.jsxs(b2,{"data-slot":"dialog-content",className:he("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,l.jsxs(k2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(id,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rs({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-header",className:he("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function os({className:e,...t}){return l.jsx(w2,{"data-slot":"dialog-title",className:he("text-lg font-semibold leading-none tracking-tight",e),...t})}const ES=pa("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Xe({className:e,variant:t,size:n,...r}){return l.jsx("button",{"data-slot":"button",className:he(ES({variant:t,size:n,className:e})),...r})}function Uh({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",variant:s="default",onConfirm:i}){return l.jsx(ts,{open:e,onOpenChange:t,children:l.jsxs(ns,{children:[l.jsx(rs,{children:l.jsx(os,{children:n})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:r}),l.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[l.jsx(Xe,{variant:"outline",size:"sm",onClick:()=>t(!1),children:"Cancel"}),l.jsx(Xe,{variant:s,size:"sm",onClick:()=>{i(),t(!1)},children:o})]})]})})}const NS={anthropic:"Anthropic",openai:"OpenAI",unknown:"Unknown"};function $l(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function TS({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:s,apiFormat:i,expanded:a,onToggle:c,hideApiFormat:u=!1,isLoading:d=!1,userAgent:h,onClear:p}){const[f,g]=v.useState(!1),m=y=>{y.stopPropagation(),p!==void 0&&g(!0)};return l.jsxs("div",{role:"button",tabIndex:0,className:he("flex items-center gap-3 px-3 py-2 cursor-pointer transition-colors","hover:bg-muted/50","select-none","border border-border rounded-lg mb-2 bg-background sticky top-0 z-10"),onClick:c,onKeyDown:y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),c())},children:[a?l.jsx(yt,{className:"size-4 text-muted-foreground shrink-0"}):d?l.jsx(_r,{className:"size-4 animate-spin text-muted-foreground shrink-0"}):l.jsx(bt,{className:"size-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-purple-400/90 font-mono text-xs font-semibold shrink-0",title:e,children:e.length>24?e.slice(0,12)+"…"+e.slice(-12):e}),h!=null&&h!==""&&l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",title:h,children:[l.jsx(jv,{className:"size-3"}),l.jsx("span",{className:"font-mono tabular-nums truncate max-w-[120px]",children:h})]}),!u&&l.jsx(xt,{variant:"outline",className:he("text-[10px] px-1.5 py-0 h-5 font-mono shrink-0",i==="openai"&&"border-blue-500/40 text-blue-400",i==="anthropic"&&"border-orange-500/40 text-orange-400",i==="unknown"&&"border-muted text-muted-foreground"),children:NS[i]}),l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[l.jsx(Oo,{className:"size-3"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[$l(t)," - ",$l(n)]})]}),l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[l.jsx(ed,{className:"size-3"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[r," call",r!==1?"s":""]})]}),l.jsxs("span",{className:"flex items-center gap-1 text-xs shrink-0",children:[l.jsx(Tr,{className:"size-3 text-muted-foreground"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[l.jsx("span",{className:"text-blue-400",children:Ye(o)})," / ",l.jsx("span",{className:"text-amber-400",children:Ye(s)})]})]}),l.jsx("span",{className:"flex-1 min-w-0"}),p!==void 0&&l.jsx("button",{type:"button",onClick:m,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-6 rounded hover:bg-muted cursor-pointer",children:l.jsx(sd,{className:"size-3.5"})}),l.jsx(Uh,{open:f,onOpenChange:g,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{p?.()}})]})}function AS(e){const t=e.find(n=>n.apiFormat!=="unknown");return t!==void 0?t.apiFormat:e[0]?.apiFormat??"unknown"}function IS(e){let t=!1,n=!1;for(const r of e)if(r.apiFormat==="anthropic"?t=!0:r.apiFormat==="openai"&&(n=!0),t&&n)return!0;return!1}function wo(e){if(e.isTest===!0)return"provider-test";if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function zS(e){const t=new Map;for(const r of e){const o=wo(r),s=t.get(o);s!==void 0?s.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const s=[...o].sort((i,a)=>i.timestamp.localeCompare(a.timestamp));n.push({id:r,conversationId:r,logs:s})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function Bl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function PS(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);return typeof t=="string"&&(t=JSON.parse(t)),Bl(t)?typeof t.stop_reason=="string"?t.stop_reason==="end_turn"||t.stop_reason==="tool_use"?t.stop_reason:null:Array.isArray(t.choices)&&t.choices.length>0&&Bl(t.choices[0])&&typeof t.choices[0].finish_reason=="string"&&t.choices[0].finish_reason==="stop"?"stop":null:null}catch{return null}}function Zh(e){return e==="end_turn"||e==="stop"}const RS="x-anthropic-billing-header:";function OS(e){return e.trimStart().toLowerCase().startsWith(RS)}function DS(e){return Du(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function MS(e){if(!Du(e))return!1;const t=nl(e,"type"),n=nl(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:OS(n)}function LS(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!DS(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const s of n){if(MS(s)){o+=1;continue}r.push(s)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}function FS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $S=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,US={};function Ul(e,t){return(US.jsx?BS:$S).test(e)}const ZS=/[ \t\n\f\r]/g;function VS(e){return typeof e=="object"?e.type==="text"?Zl(e.value):!1:Zl(e)}function Zl(e){return e.replace(ZS,"")===""}class Pr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Pr.prototype.normal={};Pr.prototype.property={};Pr.prototype.space=void 0;function Vh(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Pr(n,r,t)}function fi(e){return e.toLowerCase()}class dt{constructor(t,n){this.attribute=n,this.property=t}}dt.prototype.attribute="";dt.prototype.booleanish=!1;dt.prototype.boolean=!1;dt.prototype.commaOrSpaceSeparated=!1;dt.prototype.commaSeparated=!1;dt.prototype.defined=!1;dt.prototype.mustUseProperty=!1;dt.prototype.number=!1;dt.prototype.overloadedBoolean=!1;dt.prototype.property="";dt.prototype.spaceSeparated=!1;dt.prototype.space=void 0;let WS=0;const je=kn(),Je=kn(),hi=kn(),ie=kn(),Fe=kn(),Fn=kn(),ht=kn();function kn(){return 2**++WS}const pi=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Je,commaOrSpaceSeparated:ht,commaSeparated:Fn,number:ie,overloadedBoolean:hi,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Es=Object.keys(pi);class ma extends dt{constructor(t,n,r,o){let s=-1;if(super(t,n),Vl(this,"space",o),typeof r=="number")for(;++s<Es.length;){const i=Es[s];Vl(this,Es[s],(r&pi[i])===pi[i])}}}ma.prototype.defined=!0;function Vl(e,t,n){n&&(e[t]=n)}function rr(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new ma(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[fi(r)]=r,n[fi(s.attribute)]=r}return new Pr(t,n,e.space)}const Wh=rr({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Fe,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:ie,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Fe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Je,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hh(e,t){return t in e?e[t]:t}function qh(e,t){return Hh(e,t.toLowerCase())}const HS=rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fn,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:Fe,autoFocus:je,autoPlay:je,blocking:Fe,capture:null,charSet:null,checked:je,cite:null,className:Fe,cols:ie,colSpan:null,content:null,contentEditable:Je,controls:je,controlsList:Fe,coords:ie|Fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:hi,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:Fe,height:ie,hidden:hi,high:ie,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:je,itemType:Fe,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,onBeforeToggle: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:Fe,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:Fe,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:Fe,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Je,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:Je,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,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:Je,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},space:"html",transform:qh}),qS=rr({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",transformOrigin:"transform-origin",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"},properties:{about:ht,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:Fe,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:Fn,g2:Fn,glyphName:Fn,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:ht,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:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ht,rev:ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ht,requiredFeatures:ht,requiredFonts:ht,requiredFormats:ht,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:ht,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:ht,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:ht,to:null,transform:null,transformOrigin: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},space:"svg",transform:Hh}),Kh=rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Jh=rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qh}),Gh=rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KS={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"},JS=/[A-Z]/g,Wl=/-[a-z]/g,GS=/^data[-\w.:]+$/i;function YS(e,t){const n=fi(t);let r=t,o=dt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&GS.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Wl,QS);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Wl.test(s)){let i=s.replace(JS,XS);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ma}return new o(r,t)}function XS(e){return"-"+e.toLowerCase()}function QS(e){return e.charAt(1).toUpperCase()}const eC=Vh([Wh,HS,Kh,Jh,Gh],"html"),ga=Vh([Wh,qS,Kh,Jh,Gh],"svg");function tC(e){return e.join(" ").trim()}var Nn={},Ns,Hl;function nC(){if(Hl)return Ns;Hl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
84
+ \0`,oe+=s(W,2),oe+=C.magic,oe+=s(w,2),oe+=s(S,2),oe+=s(A.crc32,4),oe+=s(A.compressedSize,4),oe+=s(A.uncompressedSize,4),oe+=s(T.length,2),oe+=s(D.length,2),{fileRecord:h.LOCAL_FILE_HEADER+oe+T+D,dirRecord:h.CENTRAL_FILE_HEADER+s(I,2)+oe+s(L.length,2)+"\0\0\0\0"+s(V,4)+s(y,4)+T+D+L}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),h=n("../signature");function p(f,g,m,y){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=m,this.encodeFileName=y,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,c),p.prototype.push=function(f){var g=f.meta.percent||0,m=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,c.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:m?(g+100*(m-y-1))/m:100}}))},p.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var g=this.streamFiles&&!f.file.dir;if(g){var m=i(f,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(f){this.accumulate=!1;var g=this.streamFiles&&!f.file.dir,m=i(f,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),g)this.push({data:(function(y){return h.DATA_DESCRIPTOR+s(y.crc32,4)+s(y.compressedSize,4)+s(y.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var f=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var m=this.bytesWritten-f,y=(function(x,b,w,S,j){var C=a.transformTo("string",j(S));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(x,2)+s(x,2)+s(b,4)+s(w,4)+s(C.length,2)+C})(this.dirRecords.length,m,f,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(f){this._sources.push(f);var g=this;return f.on("data",function(m){g.processChunk(m)}),f.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),f.on("error",function(m){g.error(m)}),this},p.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(f){var g=this._sources;if(!c.prototype.error.call(this,f))return!1;for(var m=0;m<g.length;m++)try{g[m].error(f)}catch{}return!0},p.prototype.lock=function(){c.prototype.lock.call(this);for(var f=this._sources,g=0;g<f.length;g++)f[g].lock()},r.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,o){var s=n("../compressions"),i=n("./ZipFileWorker");o.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),h=0;try{a.forEach(function(p,f){h++;var g=(function(b,w){var S=b||w,j=s[S];if(!j)throw new Error(S+" is not a valid compression method !");return j})(f.options.compression,c.compression),m=f.options.compressionOptions||c.compressionOptions||{},y=f.dir,x=f.date;f._compressWorker(g,m).withStreamInfo("file",{name:p,dir:y,date:x,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(d)}),d.entriesCount=h}catch(p){d.error(p)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,o){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new s;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(i,a){return new s().loadAsync(i,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var s=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function h(p){return new i.Promise(function(f,g){var m=p.decompressed.getContentWorker().pipe(new u);m.on("error",function(y){g(y)}).on("end",function(){m.streamInfo.crc32!==p.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}r.exports=function(p,f){var g=this;return f=s.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(p)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",p,!0,f.optimizedBinaryString,f.base64).then(function(m){var y=new c(f);return y.load(m),y}).then(function(m){var y=[i.Promise.resolve(m)],x=m.files;if(f.checkCRC32)for(var b=0;b<x.length;b++)y.push(h(x[b]));return i.Promise.all(y)}).then(function(m){for(var y=m.shift(),x=y.files,b=0;b<x.length;b++){var w=x[b],S=w.fileNameStr,j=s.resolve(w.fileNameStr);g.file(j,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:f.createFolders}),w.dir||(g.file(j).unsafeOriginalName=S)}return y.zipComment.length&&(g.comment=y.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,o){var s=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}s.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,o){var s=n("readable-stream").Readable;function i(a,c,u){s.call(this,c),this._helper=a;var d=this;a.on("data",function(h,p){d.push(h)||d._helper.pause(),u&&u(p)}).on("error",function(h){d.emit("error",h)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,s),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,i);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,i)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var i=new Buffer(s);return i.fill(0),i},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,o){function s(j,C,N){var T,z=a.getTypeOf(C),O=a.extend(N||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(j=x(j)),O.createFolders&&(T=y(j))&&b.call(this,T,!0);var L=z==="string"&&O.binary===!1&&O.base64===!1;N&&N.binary!==void 0||(O.binary=!L),(C instanceof h&&C.uncompressedSize===0||O.dir||!C||C.length===0)&&(O.base64=!1,O.binary=!0,C="",O.compression="STORE",z="string");var E=null;E=C instanceof h||C instanceof c?C:g.isNode&&g.isStream(C)?new m(j,C):a.prepareContent(j,C,O.binary,O.optimizedBinaryString,O.base64);var M=new p(j,E,O);this.files[j]=M}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),h=n("./compressedObject"),p=n("./zipObject"),f=n("./generate"),g=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),y=function(j){j.slice(-1)==="/"&&(j=j.substring(0,j.length-1));var C=j.lastIndexOf("/");return 0<C?j.substring(0,C):""},x=function(j){return j.slice(-1)!=="/"&&(j+="/"),j},b=function(j,C){return C=C!==void 0?C:d.createFolders,j=x(j),this.files[j]||s.call(this,j,null,{dir:!0,createFolders:C}),this.files[j]};function w(j){return Object.prototype.toString.call(j)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(j){var C,N,T;for(C in this.files)T=this.files[C],(N=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&j(N,T)},filter:function(j){var C=[];return this.forEach(function(N,T){j(N,T)&&C.push(T)}),C},file:function(j,C,N){if(arguments.length!==1)return j=this.root+j,s.call(this,j,C,N),this;if(w(j)){var T=j;return this.filter(function(O,L){return!L.dir&&T.test(O)})}var z=this.files[this.root+j];return z&&!z.dir?z:null},folder:function(j){if(!j)return this;if(w(j))return this.filter(function(z,O){return O.dir&&j.test(z)});var C=this.root+j,N=b.call(this,C),T=this.clone();return T.root=N.name,T},remove:function(j){j=this.root+j;var C=this.files[j];if(C||(j.slice(-1)!=="/"&&(j+="/"),C=this.files[j]),C&&!C.dir)delete this.files[j];else for(var N=this.filter(function(z,O){return O.name.slice(0,j.length)===j}),T=0;T<N.length;T++)delete this.files[N[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(j){var C,N={};try{if((N=a.extend(j||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var T=N.comment||this.comment||"";C=f.generateWorker(this,N,T)}catch(z){(C=new c("error")).error(z)}return new u(C,N.type||"string",N.mimeType)},generateAsync:function(j,C){return this.generateInternalStream(j).accumulate(C)},generateNodeStream:function(j,C){return(j=j||{}).type||(j.type="nodebuffer"),this.generateInternalStream(j).toNodejsStream(C)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),h=a.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===c&&this.data[p+1]===u&&this.data[p+2]===d&&this.data[p+3]===h)return p-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),h=a.charCodeAt(3),p=this.readData(4);return c===p[0]&&u===p[1]&&d===p[2]&&h===p[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,o){var s=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,o){var s=n("./Uint8ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,o){var s=n("./ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var s=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(h){var p=s.getTypeOf(h);return s.checkSupport(p),p!=="string"||i.uint8array?p==="nodebuffer"?new u(h):i.uint8array?new d(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new c(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var s=n("./GenericWorker"),i=n("../utils");function a(c){s.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,s),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,o){var s=n("./GenericWorker"),i=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=s.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}s.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,o){function s(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=s},{}],29:[function(n,r,o){var s=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),h=null;if(u.nodestream)try{h=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(g,m){return new d.Promise(function(y,x){var b=[],w=g._internalType,S=g._outputType,j=g._mimeType;g.on("data",function(C,N){b.push(C),m&&m(N)}).on("error",function(C){b=[],x(C)}).on("end",function(){try{var C=(function(N,T,z){switch(N){case"blob":return s.newBlob(s.transformTo("arraybuffer",T),z);case"base64":return c.encode(T);default:return s.transformTo(N,T)}})(S,(function(N,T){var z,O=0,L=null,E=0;for(z=0;z<T.length;z++)E+=T[z].length;switch(N){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for(L=new Uint8Array(E),z=0;z<T.length;z++)L.set(T[z],O),O+=T[z].length;return L;case"nodebuffer":return Buffer.concat(T);default:throw new Error("concat : unsupported type '"+N+"'")}})(w,b),j);y(C)}catch(N){x(N)}b=[]}).resume()})}function f(g,m,y){var x=m;switch(m){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=m,this._mimeType=y,s.checkSupport(x),this._worker=g.pipe(new i(x)),g.lock()}catch(b){this._worker=new a("error"),this._worker.error(b)}}f.prototype={accumulate:function(g){return p(this,g)},on:function(g,m){var y=this;return g==="data"?this._worker.on(g,function(x){m.call(y,x.data,x.meta)}):this._worker.on(g,function(){s.delay(m,arguments,y)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var s=new ArrayBuffer(0);try{o.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(s),o.blob=i.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!n("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,o){for(var s=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function h(){c.call(this,"utf-8 decode"),this.leftOver=null}function p(){c.call(this,"utf-8 encode")}o.utf8encode=function(f){return i.nodebuffer?a.newBufferFrom(f,"utf-8"):(function(g){var m,y,x,b,w,S=g.length,j=0;for(b=0;b<S;b++)(64512&(y=g.charCodeAt(b)))==55296&&b+1<S&&(64512&(x=g.charCodeAt(b+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),b++),j+=y<128?1:y<2048?2:y<65536?3:4;for(m=i.uint8array?new Uint8Array(j):new Array(j),b=w=0;w<j;b++)(64512&(y=g.charCodeAt(b)))==55296&&b+1<S&&(64512&(x=g.charCodeAt(b+1)))==56320&&(y=65536+(y-55296<<10)+(x-56320),b++),y<128?m[w++]=y:(y<2048?m[w++]=192|y>>>6:(y<65536?m[w++]=224|y>>>12:(m[w++]=240|y>>>18,m[w++]=128|y>>>12&63),m[w++]=128|y>>>6&63),m[w++]=128|63&y);return m})(f)},o.utf8decode=function(f){return i.nodebuffer?s.transformTo("nodebuffer",f).toString("utf-8"):(function(g){var m,y,x,b,w=g.length,S=new Array(2*w);for(m=y=0;m<w;)if((x=g[m++])<128)S[y++]=x;else if(4<(b=u[x]))S[y++]=65533,m+=b-1;else{for(x&=b===2?31:b===3?15:7;1<b&&m<w;)x=x<<6|63&g[m++],b--;1<b?S[y++]=65533:x<65536?S[y++]=x:(x-=65536,S[y++]=55296|x>>10&1023,S[y++]=56320|1023&x)}return S.length!==y&&(S.subarray?S=S.subarray(0,y):S.length=y),s.applyFromCharCode(S)})(f=s.transformTo(i.uint8array?"uint8array":"array",f))},s.inherits(h,c),h.prototype.processChunk=function(f){var g=s.transformTo(i.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=g;(g=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),g.set(m,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var y=(function(b,w){var S;for((w=w||b.length)>b.length&&(w=b.length),S=w-1;0<=S&&(192&b[S])==128;)S--;return S<0||S===0?w:S+u[b[S]]>w?S:w})(g),x=g;y!==g.length&&(i.uint8array?(x=g.subarray(0,y),this.leftOver=g.subarray(y,g.length)):(x=g.slice(0,y),this.leftOver=g.slice(y,g.length))),this.push({data:o.utf8decode(x),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=h,s.inherits(p,c),p.prototype.processChunk=function(f){this.push({data:o.utf8encode(f.data),meta:f.meta})},o.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,o){var s=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(m){return m}function d(m,y){for(var x=0;x<m.length;++x)y[x]=255&m.charCodeAt(x);return y}n("setimmediate"),o.newBlob=function(m,y){o.checkSupport("blob");try{return new Blob([m],{type:y})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(m),x.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(m,y,x){var b=[],w=0,S=m.length;if(S<=x)return String.fromCharCode.apply(null,m);for(;w<S;)y==="array"||y==="nodebuffer"?b.push(String.fromCharCode.apply(null,m.slice(w,Math.min(w+x,S)))):b.push(String.fromCharCode.apply(null,m.subarray(w,Math.min(w+x,S)))),w+=x;return b.join("")},stringifyByChar:function(m){for(var y="",x=0;x<m.length;x++)y+=String.fromCharCode(m[x]);return y},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function p(m){var y=65536,x=o.getTypeOf(m),b=!0;if(x==="uint8array"?b=h.applyCanBeUsed.uint8array:x==="nodebuffer"&&(b=h.applyCanBeUsed.nodebuffer),b)for(;1<y;)try{return h.stringifyByChunk(m,x,y)}catch{y=Math.floor(y/2)}return h.stringifyByChar(m)}function f(m,y){for(var x=0;x<m.length;x++)y[x]=m[x];return y}o.applyFromCharCode=p;var g={};g.string={string:u,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return g.string.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:function(m){return d(m,a.allocBuffer(m.length))}},g.array={string:p,array:u,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(m)}},g.arraybuffer={string:function(m){return p(new Uint8Array(m))},array:function(m){return f(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:u,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(new Uint8Array(m))}},g.uint8array={string:p,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:u,nodebuffer:function(m){return a.newBufferFrom(m)}},g.nodebuffer={string:p,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return g.nodebuffer.uint8array(m).buffer},uint8array:function(m){return f(m,new Uint8Array(m.length))},nodebuffer:u},o.transformTo=function(m,y){if(y=y||"",!m)return y;o.checkSupport(m);var x=o.getTypeOf(y);return g[x][m](y)},o.resolve=function(m){for(var y=m.split("/"),x=[],b=0;b<y.length;b++){var w=y[b];w==="."||w===""&&b!==0&&b!==y.length-1||(w===".."?x.pop():x.push(w))}return x.join("/")},o.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(m)?"nodebuffer":s.uint8array&&m instanceof Uint8Array?"uint8array":s.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(m){var y,x,b="";for(x=0;x<(m||"").length;x++)b+="\\x"+((y=m.charCodeAt(x))<16?"0":"")+y.toString(16).toUpperCase();return b},o.delay=function(m,y,x){setImmediate(function(){m.apply(x||null,y||[])})},o.inherits=function(m,y){function x(){}x.prototype=y.prototype,m.prototype=new x},o.extend=function(){var m,y,x={};for(m=0;m<arguments.length;m++)for(y in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],y)&&x[y]===void 0&&(x[y]=arguments[m][y]);return x},o.prepareContent=function(m,y,x,b,w){return c.Promise.resolve(y).then(function(S){return s.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new c.Promise(function(j,C){var N=new FileReader;N.onload=function(T){j(T.target.result)},N.onerror=function(T){C(T.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var j=o.getTypeOf(S);return j?(j==="arraybuffer"?S=o.transformTo("uint8array",S):j==="string"&&(w?S=i.decode(S):x&&b!==!0&&(S=(function(C){return d(C,s.uint8array?new Uint8Array(C.length):new Array(C.length))})(S))),S):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(h){this.files=[],this.loadOptions=h}d.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(p)+", expected "+i.pretty(h)+")")}},isSignature:function(h,p){var f=this.reader.index;this.reader.setIndex(h);var g=this.reader.readString(4)===p;return this.reader.setIndex(f),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),p=u.uint8array?"uint8array":"array",f=i.transformTo(p,h);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,p,f,g=this.zip64EndOfCentralSize-44;0<g;)h=this.reader.readInt(2),p=this.reader.readInt(4),f=this.reader.readData(p),this.zip64ExtensibleData[h]={id:h,length:p,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,p;for(h=0;h<this.files.length;h++)p=this.files[h],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(h=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var p=h;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var g=p-f;if(0<g)this.isSignature(p,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(h){this.reader=s(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),h=n("./support");function p(f,g){this.options=f,this.loadOptions=g}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var g,m;if(f.skip(22),this.fileNameLength=f.readInt(2),m=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(y){for(var x in d)if(Object.prototype.hasOwnProperty.call(d,x)&&d[x].magic===y)return d[x];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var g=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(g),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=s(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var g,m,y,x=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<x;)g=f.readInt(2),m=f.readInt(2),y=f.readData(m),this.extraFields[g]={id:g,length:m,value:y};f.setIndex(x)},handleUTF8:function(){var f=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var m=i.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var x=i.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var g=s(f.value);return g.readInt(1)!==1||c(this.fileName)!==g.readInt(4)?null:u.utf8decode(g.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var g=s(f.value);return g.readInt(1)!==1||c(this.fileComment)!==g.readInt(4)?null:u.utf8decode(g.readData(f.length-5))}return null}},r.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,o){function s(g,m,y){this.name=g,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=m,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");s.prototype={internalStream:function(g){var m=null,y="string";try{if(!g)throw new Error("No output type specified.");var x=(y=g.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),m=this._decompressWorker();var b=!this._dataBinary;b&&!x&&(m=m.pipe(new c.Utf8EncodeWorker)),!b&&x&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(w){(m=new d("error")).error(w)}return new i(m,y,"")},async:function(g,m){return this.internalStream(g).accumulate(m)},nodeStream:function(g,m){return this.internalStream(g||"nodebuffer").toNodejsStream(m)},_compressWorker:function(g,m){if(this._data instanceof u&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(y,g,m)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<h.length;f++)s.prototype[h[f]]=p;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,o){(function(s){var i,a,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var u=0,d=new c(g),h=s.document.createTextNode("");d.observe(h,{characterData:!0}),i=function(){h.data=u=++u%2}}else if(s.setImmediate||s.MessageChannel===void 0)i="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){g(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(g,0)};else{var p=new s.MessageChannel;p.port1.onmessage=g,i=function(){p.port2.postMessage(0)}}var f=[];function g(){var m,y;a=!0;for(var x=f.length;x;){for(y=f,f=[],m=-1;++m<x;)y[m]();x=f.length}a=!1}r.exports=function(m){f.push(m)!==1||a||i()}}).call(this,typeof Dr<"u"?Dr:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,o){var s=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function h(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,x!==i&&m(this,x)}function p(x,b,w){this.promise=x,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function f(x,b,w){s(function(){var S;try{S=b(w)}catch(j){return a.reject(x,j)}S===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,S)})}function g(x){var b=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof b=="function")return function(){b.apply(x,arguments)}}function m(x,b){var w=!1;function S(N){w||(w=!0,a.reject(x,N))}function j(N){w||(w=!0,a.resolve(x,N))}var C=y(function(){b(j,S)});C.status==="error"&&S(C.value)}function y(x,b){var w={};try{w.value=x(b),w.status="success"}catch(S){w.status="error",w.value=S}return w}(r.exports=h).prototype.finally=function(x){if(typeof x!="function")return this;var b=this.constructor;return this.then(function(w){return b.resolve(x()).then(function(){return w})},function(w){return b.resolve(x()).then(function(){throw w})})},h.prototype.catch=function(x){return this.then(null,x)},h.prototype.then=function(x,b){if(typeof x!="function"&&this.state===u||typeof b!="function"&&this.state===c)return this;var w=new this.constructor(i);return this.state!==d?f(w,this.state===u?x:b,this.outcome):this.queue.push(new p(w,x,b)),w},p.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},p.prototype.otherCallFulfilled=function(x){f(this.promise,this.onFulfilled,x)},p.prototype.callRejected=function(x){a.reject(this.promise,x)},p.prototype.otherCallRejected=function(x){f(this.promise,this.onRejected,x)},a.resolve=function(x,b){var w=y(g,b);if(w.status==="error")return a.reject(x,w.value);var S=w.value;if(S)m(x,S);else{x.state=u,x.outcome=b;for(var j=-1,C=x.queue.length;++j<C;)x.queue[j].callFulfilled(b)}return x},a.reject=function(x,b){x.state=c,x.outcome=b;for(var w=-1,S=x.queue.length;++w<S;)x.queue[w].callRejected(b);return x},h.resolve=function(x){return x instanceof this?x:a.resolve(new this(i),x)},h.reject=function(x){var b=new this(i);return a.reject(b,x)},h.all=function(x){var b=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=x.length,S=!1;if(!w)return this.resolve([]);for(var j=new Array(w),C=0,N=-1,T=new this(i);++N<w;)z(x[N],N);return T;function z(O,L){b.resolve(O).then(function(E){j[L]=E,++C!==w||S||(S=!0,a.resolve(T,j))},function(E){S||(S=!0,a.reject(T,E))})}},h.race=function(x){var b=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=x.length,S=!1;if(!w)return this.resolve([]);for(var j=-1,C=new this(i);++j<w;)N=x[j],b.resolve(N).then(function(T){S||(S=!0,a.resolve(C,T))},function(T){S||(S=!0,a.reject(C,T))});var N;return C}},{immediate:36}],38:[function(n,r,o){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,o){var s=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,h=0,p=-1,f=0,g=8;function m(x){if(!(this instanceof m))return new m(x);this.options=i.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},x||{});var b=this.options;b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var w=s.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(w!==h)throw new Error(c[w]);if(b.header&&s.deflateSetHeader(this.strm,b.header),b.dictionary){var S;if(S=typeof b.dictionary=="string"?a.string2buf(b.dictionary):d.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(w=s.deflateSetDictionary(this.strm,S))!==h)throw new Error(c[w]);this._dict_set=!0}}function y(x,b){var w=new m(b);if(w.push(x,!0),w.err)throw w.msg||c[w.err];return w.result}m.prototype.push=function(x,b){var w,S,j=this.strm,C=this.options.chunkSize;if(this.ended)return!1;S=b===~~b?b:b===!0?4:0,typeof x=="string"?j.input=a.string2buf(x):d.call(x)==="[object ArrayBuffer]"?j.input=new Uint8Array(x):j.input=x,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new i.Buf8(C),j.next_out=0,j.avail_out=C),(w=s.deflate(j,S))!==1&&w!==h)return this.onEnd(w),!(this.ended=!0);j.avail_out!==0&&(j.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(j.output,j.next_out))):this.onData(i.shrinkBuf(j.output,j.next_out)))}while((0<j.avail_in||j.avail_out===0)&&w!==1);return S===4?(w=s.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===h):S!==2||(this.onEnd(h),!(j.avail_out=0))},m.prototype.onData=function(x){this.chunks.push(x)},m.prototype.onEnd=function(x){x===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},o.Deflate=m,o.deflate=y,o.deflateRaw=function(x,b){return(b=b||{}).raw=!0,y(x,b)},o.gzip=function(x,b){return(b=b||{}).gzip=!0,y(x,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,o){var s=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),h=n("./zlib/gzheader"),p=Object.prototype.toString;function f(m){if(!(this instanceof f))return new f(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||m&&m.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var x=s.inflateInit2(this.strm,y.windowBits);if(x!==c.Z_OK)throw new Error(u[x]);this.header=new h,s.inflateGetHeader(this.strm,this.header)}function g(m,y){var x=new f(y);if(x.push(m,!0),x.err)throw x.msg||u[x.err];return x.result}f.prototype.push=function(m,y){var x,b,w,S,j,C,N=this.strm,T=this.options.chunkSize,z=this.options.dictionary,O=!1;if(this.ended)return!1;b=y===~~y?y:y===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?N.input=a.binstring2buf(m):p.call(m)==="[object ArrayBuffer]"?N.input=new Uint8Array(m):N.input=m,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new i.Buf8(T),N.next_out=0,N.avail_out=T),(x=s.inflate(N,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&z&&(C=typeof z=="string"?a.string2buf(z):p.call(z)==="[object ArrayBuffer]"?new Uint8Array(z):z,x=s.inflateSetDictionary(this.strm,C)),x===c.Z_BUF_ERROR&&O===!0&&(x=c.Z_OK,O=!1),x!==c.Z_STREAM_END&&x!==c.Z_OK)return this.onEnd(x),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&x!==c.Z_STREAM_END&&(N.avail_in!==0||b!==c.Z_FINISH&&b!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(N.output,N.next_out),S=N.next_out-w,j=a.buf2string(N.output,w),N.next_out=S,N.avail_out=T-S,S&&i.arraySet(N.output,N.output,w,S,0),this.onData(j)):this.onData(i.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(O=!0)}while((0<N.avail_in||N.avail_out===0)&&x!==c.Z_STREAM_END);return x===c.Z_STREAM_END&&(b=c.Z_FINISH),b===c.Z_FINISH?(x=s.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===c.Z_OK):b!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(N.avail_out=0))},f.prototype.onData=function(m){this.chunks.push(m)},f.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Inflate=f,o.inflate=g,o.inflateRaw=function(m,y){return(y=y||{}).raw=!0,g(m,y)},o.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var h in d)d.hasOwnProperty(h)&&(c[h]=d[h])}}return c},o.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,h,p){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+h),p);else for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){var u,d,h,p,f,g;for(u=h=0,d=c.length;u<d;u++)h+=c[u].length;for(g=new Uint8Array(h),u=p=0,d=c.length;u<d;u++)f=c[u],g.set(f,p),p+=f.length;return g}},a={arraySet:function(c,u,d,h,p){for(var f=0;f<h;f++)c[p+f]=u[d+f]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,i)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(s)},{}],42:[function(n,r,o){var s=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new s.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(h,p){if(p<65537&&(h.subarray&&a||!h.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(h,p));for(var f="",g=0;g<p;g++)f+=String.fromCharCode(h[g]);return f}c[254]=c[254]=1,o.string2buf=function(h){var p,f,g,m,y,x=h.length,b=0;for(m=0;m<x;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<x&&(64512&(g=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(g-56320),m++),b+=f<128?1:f<2048?2:f<65536?3:4;for(p=new s.Buf8(b),m=y=0;y<b;m++)(64512&(f=h.charCodeAt(m)))==55296&&m+1<x&&(64512&(g=h.charCodeAt(m+1)))==56320&&(f=65536+(f-55296<<10)+(g-56320),m++),f<128?p[y++]=f:(f<2048?p[y++]=192|f>>>6:(f<65536?p[y++]=224|f>>>12:(p[y++]=240|f>>>18,p[y++]=128|f>>>12&63),p[y++]=128|f>>>6&63),p[y++]=128|63&f);return p},o.buf2binstring=function(h){return d(h,h.length)},o.binstring2buf=function(h){for(var p=new s.Buf8(h.length),f=0,g=p.length;f<g;f++)p[f]=h.charCodeAt(f);return p},o.buf2string=function(h,p){var f,g,m,y,x=p||h.length,b=new Array(2*x);for(f=g=0;f<x;)if((m=h[f++])<128)b[g++]=m;else if(4<(y=c[m]))b[g++]=65533,f+=y-1;else{for(m&=y===2?31:y===3?15:7;1<y&&f<x;)m=m<<6|63&h[f++],y--;1<y?b[g++]=65533:m<65536?b[g++]=m:(m-=65536,b[g++]=55296|m>>10&1023,b[g++]=56320|1023&m)}return d(b,g)},o.utf8border=function(h,p){var f;for((p=p||h.length)>h.length&&(p=h.length),f=p-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?p:f+c[h[f]]>p?f:p}},{"./common":41}],43:[function(n,r,o){r.exports=function(s,i,a,c){for(var u=65535&s|0,d=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--h;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var s=(function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a})();r.exports=function(i,a,c,u){var d=s,h=u+c;i^=-1;for(var p=u;p<h;p++)i=i>>>8^d[255&(i^a[p])];return-1^i}},{}],46:[function(n,r,o){var s,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),h=0,p=4,f=0,g=-2,m=-1,y=4,x=2,b=8,w=9,S=286,j=30,C=19,N=2*S+1,T=15,z=3,O=258,L=O+z+1,E=42,M=113,k=1,D=2,H=3,B=4;function q(_,ee){return _.msg=d[ee],ee}function Y(_){return(_<<1)-(4<_?9:0)}function A(_){for(var ee=_.length;0<=--ee;)_[ee]=0}function W(_){var ee=_.state,J=ee.pending;J>_.avail_out&&(J=_.avail_out),J!==0&&(i.arraySet(_.output,ee.pending_buf,ee.pending_out,J,_.next_out),_.next_out+=J,ee.pending_out+=J,_.total_out+=J,_.avail_out-=J,ee.pending-=J,ee.pending===0&&(ee.pending_out=0))}function V(_,ee){a._tr_flush_block(_,0<=_.block_start?_.block_start:-1,_.strstart-_.block_start,ee),_.block_start=_.strstart,W(_.strm)}function I(_,ee){_.pending_buf[_.pending++]=ee}function oe(_,ee){_.pending_buf[_.pending++]=ee>>>8&255,_.pending_buf[_.pending++]=255&ee}function X(_,ee){var J,R,P=_.max_chain_length,F=_.strstart,U=_.prev_length,G=_.nice_match,$=_.strstart>_.w_size-L?_.strstart-(_.w_size-L):0,ne=_.window,le=_.w_mask,se=_.prev,Z=_.strstart+O,re=ne[F+U-1],ue=ne[F+U];_.prev_length>=_.good_match&&(P>>=2),G>_.lookahead&&(G=_.lookahead);do if(ne[(J=ee)+U]===ue&&ne[J+U-1]===re&&ne[J]===ne[F]&&ne[++J]===ne[F+1]){F+=2,J++;do;while(ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&ne[++F]===ne[++J]&&F<Z);if(R=O-(Z-F),F=Z-O,U<R){if(_.match_start=ee,G<=(U=R))break;re=ne[F+U-1],ue=ne[F+U]}}while((ee=se[ee&le])>$&&--P!=0);return U<=_.lookahead?U:_.lookahead}function de(_){var ee,J,R,P,F,U,G,$,ne,le,se=_.w_size;do{if(P=_.window_size-_.lookahead-_.strstart,_.strstart>=se+(se-L)){for(i.arraySet(_.window,_.window,se,se,0),_.match_start-=se,_.strstart-=se,_.block_start-=se,ee=J=_.hash_size;R=_.head[--ee],_.head[ee]=se<=R?R-se:0,--J;);for(ee=J=se;R=_.prev[--ee],_.prev[ee]=se<=R?R-se:0,--J;);P+=se}if(_.strm.avail_in===0)break;if(U=_.strm,G=_.window,$=_.strstart+_.lookahead,ne=P,le=void 0,le=U.avail_in,ne<le&&(le=ne),J=le===0?0:(U.avail_in-=le,i.arraySet(G,U.input,U.next_in,le,$),U.state.wrap===1?U.adler=c(U.adler,G,le,$):U.state.wrap===2&&(U.adler=u(U.adler,G,le,$)),U.next_in+=le,U.total_in+=le,le),_.lookahead+=J,_.lookahead+_.insert>=z)for(F=_.strstart-_.insert,_.ins_h=_.window[F],_.ins_h=(_.ins_h<<_.hash_shift^_.window[F+1])&_.hash_mask;_.insert&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[F+z-1])&_.hash_mask,_.prev[F&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=F,F++,_.insert--,!(_.lookahead+_.insert<z)););}while(_.lookahead<L&&_.strm.avail_in!==0)}function te(_,ee){for(var J,R;;){if(_.lookahead<L){if(de(_),_.lookahead<L&&ee===h)return k;if(_.lookahead===0)break}if(J=0,_.lookahead>=z&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),J!==0&&_.strstart-J<=_.w_size-L&&(_.match_length=X(_,J)),_.match_length>=z)if(R=a._tr_tally(_,_.strstart-_.match_start,_.match_length-z),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=z){for(_.match_length--;_.strstart++,_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart,--_.match_length!=0;);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+1])&_.hash_mask;else R=a._tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(R&&(V(_,!1),_.strm.avail_out===0))return k}return _.insert=_.strstart<z-1?_.strstart:z-1,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):_.last_lit&&(V(_,!1),_.strm.avail_out===0)?k:D}function ce(_,ee){for(var J,R,P;;){if(_.lookahead<L){if(de(_),_.lookahead<L&&ee===h)return k;if(_.lookahead===0)break}if(J=0,_.lookahead>=z&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=z-1,J!==0&&_.prev_length<_.max_lazy_match&&_.strstart-J<=_.w_size-L&&(_.match_length=X(_,J),_.match_length<=5&&(_.strategy===1||_.match_length===z&&4096<_.strstart-_.match_start)&&(_.match_length=z-1)),_.prev_length>=z&&_.match_length<=_.prev_length){for(P=_.strstart+_.lookahead-z,R=a._tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-z),_.lookahead-=_.prev_length-1,_.prev_length-=2;++_.strstart<=P&&(_.ins_h=(_.ins_h<<_.hash_shift^_.window[_.strstart+z-1])&_.hash_mask,J=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),--_.prev_length!=0;);if(_.match_available=0,_.match_length=z-1,_.strstart++,R&&(V(_,!1),_.strm.avail_out===0))return k}else if(_.match_available){if((R=a._tr_tally(_,0,_.window[_.strstart-1]))&&V(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return k}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(R=a._tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<z-1?_.strstart:z-1,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):_.last_lit&&(V(_,!1),_.strm.avail_out===0)?k:D}function fe(_,ee,J,R,P){this.good_length=_,this.max_lazy=ee,this.nice_length=J,this.max_chain=R,this.func=P}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*N),this.dyn_dtree=new i.Buf16(2*(2*j+1)),this.bl_tree=new i.Buf16(2*(2*C+1)),A(this.dyn_ltree),A(this.dyn_dtree),A(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(T+1),this.heap=new i.Buf16(2*S+1),A(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*S+1),A(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function xe(_){var ee;return _&&_.state?(_.total_in=_.total_out=0,_.data_type=x,(ee=_.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?E:M,_.adler=ee.wrap===2?0:1,ee.last_flush=h,a._tr_init(ee),f):q(_,g)}function Ee(_){var ee=xe(_);return ee===f&&(function(J){J.window_size=2*J.w_size,A(J.head),J.max_lazy_match=s[J.level].max_lazy,J.good_match=s[J.level].good_length,J.nice_match=s[J.level].nice_length,J.max_chain_length=s[J.level].max_chain,J.strstart=0,J.block_start=0,J.lookahead=0,J.insert=0,J.match_length=J.prev_length=z-1,J.match_available=0,J.ins_h=0})(_.state),ee}function Le(_,ee,J,R,P,F){if(!_)return g;var U=1;if(ee===m&&(ee=6),R<0?(U=0,R=-R):15<R&&(U=2,R-=16),P<1||w<P||J!==b||R<8||15<R||ee<0||9<ee||F<0||y<F)return q(_,g);R===8&&(R=9);var G=new ge;return(_.state=G).strm=_,G.wrap=U,G.gzhead=null,G.w_bits=R,G.w_size=1<<G.w_bits,G.w_mask=G.w_size-1,G.hash_bits=P+7,G.hash_size=1<<G.hash_bits,G.hash_mask=G.hash_size-1,G.hash_shift=~~((G.hash_bits+z-1)/z),G.window=new i.Buf8(2*G.w_size),G.head=new i.Buf16(G.hash_size),G.prev=new i.Buf16(G.w_size),G.lit_bufsize=1<<P+6,G.pending_buf_size=4*G.lit_bufsize,G.pending_buf=new i.Buf8(G.pending_buf_size),G.d_buf=1*G.lit_bufsize,G.l_buf=3*G.lit_bufsize,G.level=ee,G.strategy=F,G.method=J,Ee(_)}s=[new fe(0,0,0,0,function(_,ee){var J=65535;for(J>_.pending_buf_size-5&&(J=_.pending_buf_size-5);;){if(_.lookahead<=1){if(de(_),_.lookahead===0&&ee===h)return k;if(_.lookahead===0)break}_.strstart+=_.lookahead,_.lookahead=0;var R=_.block_start+J;if((_.strstart===0||_.strstart>=R)&&(_.lookahead=_.strstart-R,_.strstart=R,V(_,!1),_.strm.avail_out===0)||_.strstart-_.block_start>=_.w_size-L&&(V(_,!1),_.strm.avail_out===0))return k}return _.insert=0,ee===p?(V(_,!0),_.strm.avail_out===0?H:B):(_.strstart>_.block_start&&(V(_,!1),_.strm.avail_out),k)}),new fe(4,4,8,4,te),new fe(4,5,16,8,te),new fe(4,6,32,32,te),new fe(4,4,16,16,ce),new fe(8,16,32,32,ce),new fe(8,16,128,128,ce),new fe(8,32,128,256,ce),new fe(32,128,258,1024,ce),new fe(32,258,258,4096,ce)],o.deflateInit=function(_,ee){return Le(_,ee,b,15,8,0)},o.deflateInit2=Le,o.deflateReset=Ee,o.deflateResetKeep=xe,o.deflateSetHeader=function(_,ee){return _&&_.state?_.state.wrap!==2?g:(_.state.gzhead=ee,f):g},o.deflate=function(_,ee){var J,R,P,F;if(!_||!_.state||5<ee||ee<0)return _?q(_,g):g;if(R=_.state,!_.output||!_.input&&_.avail_in!==0||R.status===666&&ee!==p)return q(_,_.avail_out===0?-5:g);if(R.strm=_,J=R.last_flush,R.last_flush=ee,R.status===E)if(R.wrap===2)_.adler=0,I(R,31),I(R,139),I(R,8),R.gzhead?(I(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),I(R,255&R.gzhead.time),I(R,R.gzhead.time>>8&255),I(R,R.gzhead.time>>16&255),I(R,R.gzhead.time>>24&255),I(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),I(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(I(R,255&R.gzhead.extra.length),I(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(_.adler=u(_.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(I(R,0),I(R,0),I(R,0),I(R,0),I(R,0),I(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),I(R,3),R.status=M);else{var U=b+(R.w_bits-8<<4)<<8;U|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(U|=32),U+=31-U%31,R.status=M,oe(R,U),R.strstart!==0&&(oe(R,_.adler>>>16),oe(R,65535&_.adler)),_.adler=1}if(R.status===69)if(R.gzhead.extra){for(P=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending!==R.pending_buf_size));)I(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,I(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),F===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){P=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),W(_),P=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,I(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>P&&(_.adler=u(_.adler,R.pending_buf,R.pending-P,P)),F===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&W(_),R.pending+2<=R.pending_buf_size&&(I(R,255&_.adler),I(R,_.adler>>8&255),_.adler=0,R.status=M)):R.status=M),R.pending!==0){if(W(_),_.avail_out===0)return R.last_flush=-1,f}else if(_.avail_in===0&&Y(ee)<=Y(J)&&ee!==p)return q(_,-5);if(R.status===666&&_.avail_in!==0)return q(_,-5);if(_.avail_in!==0||R.lookahead!==0||ee!==h&&R.status!==666){var G=R.strategy===2?(function($,ne){for(var le;;){if($.lookahead===0&&(de($),$.lookahead===0)){if(ne===h)return k;break}if($.match_length=0,le=a._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,le&&(V($,!1),$.strm.avail_out===0))return k}return $.insert=0,ne===p?(V($,!0),$.strm.avail_out===0?H:B):$.last_lit&&(V($,!1),$.strm.avail_out===0)?k:D})(R,ee):R.strategy===3?(function($,ne){for(var le,se,Z,re,ue=$.window;;){if($.lookahead<=O){if(de($),$.lookahead<=O&&ne===h)return k;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=z&&0<$.strstart&&(se=ue[Z=$.strstart-1])===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]){re=$.strstart+O;do;while(se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&se===ue[++Z]&&Z<re);$.match_length=O-(re-Z),$.match_length>$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=z?(le=a._tr_tally($,1,$.match_length-z),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(le=a._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),le&&(V($,!1),$.strm.avail_out===0))return k}return $.insert=0,ne===p?(V($,!0),$.strm.avail_out===0?H:B):$.last_lit&&(V($,!1),$.strm.avail_out===0)?k:D})(R,ee):s[R.level].func(R,ee);if(G!==H&&G!==B||(R.status=666),G===k||G===H)return _.avail_out===0&&(R.last_flush=-1),f;if(G===D&&(ee===1?a._tr_align(R):ee!==5&&(a._tr_stored_block(R,0,0,!1),ee===3&&(A(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),W(_),_.avail_out===0))return R.last_flush=-1,f}return ee!==p?f:R.wrap<=0?1:(R.wrap===2?(I(R,255&_.adler),I(R,_.adler>>8&255),I(R,_.adler>>16&255),I(R,_.adler>>24&255),I(R,255&_.total_in),I(R,_.total_in>>8&255),I(R,_.total_in>>16&255),I(R,_.total_in>>24&255)):(oe(R,_.adler>>>16),oe(R,65535&_.adler)),W(_),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?f:1)},o.deflateEnd=function(_){var ee;return _&&_.state?(ee=_.state.status)!==E&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==M&&ee!==666?q(_,g):(_.state=null,ee===M?q(_,-3):f):g},o.deflateSetDictionary=function(_,ee){var J,R,P,F,U,G,$,ne,le=ee.length;if(!_||!_.state||(F=(J=_.state).wrap)===2||F===1&&J.status!==E||J.lookahead)return g;for(F===1&&(_.adler=c(_.adler,ee,le,0)),J.wrap=0,le>=J.w_size&&(F===0&&(A(J.head),J.strstart=0,J.block_start=0,J.insert=0),ne=new i.Buf8(J.w_size),i.arraySet(ne,ee,le-J.w_size,J.w_size,0),ee=ne,le=J.w_size),U=_.avail_in,G=_.next_in,$=_.input,_.avail_in=le,_.next_in=0,_.input=ee,de(J);J.lookahead>=z;){for(R=J.strstart,P=J.lookahead-(z-1);J.ins_h=(J.ins_h<<J.hash_shift^J.window[R+z-1])&J.hash_mask,J.prev[R&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=R,R++,--P;);J.strstart=R,J.lookahead=z-1,de(J)}return J.strstart+=J.lookahead,J.block_start=J.strstart,J.insert=J.lookahead,J.lookahead=0,J.match_length=J.prev_length=z-1,J.match_available=0,_.next_in=G,_.input=$,_.avail_in=U,J.wrap=F,f},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(s,i){var a,c,u,d,h,p,f,g,m,y,x,b,w,S,j,C,N,T,z,O,L,E,M,k,D;a=s.state,c=s.next_in,k=s.input,u=c+(s.avail_in-5),d=s.next_out,D=s.output,h=d-(i-s.avail_out),p=d+(s.avail_out-257),f=a.dmax,g=a.wsize,m=a.whave,y=a.wnext,x=a.window,b=a.hold,w=a.bits,S=a.lencode,j=a.distcode,C=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{w<15&&(b+=k[c++]<<w,w+=8,b+=k[c++]<<w,w+=8),T=S[b&C];t:for(;;){if(b>>>=z=T>>>24,w-=z,(z=T>>>16&255)===0)D[d++]=65535&T;else{if(!(16&z)){if((64&z)==0){T=S[(65535&T)+(b&(1<<z)-1)];continue t}if(32&z){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}O=65535&T,(z&=15)&&(w<z&&(b+=k[c++]<<w,w+=8),O+=b&(1<<z)-1,b>>>=z,w-=z),w<15&&(b+=k[c++]<<w,w+=8,b+=k[c++]<<w,w+=8),T=j[b&N];n:for(;;){if(b>>>=z=T>>>24,w-=z,!(16&(z=T>>>16&255))){if((64&z)==0){T=j[(65535&T)+(b&(1<<z)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(L=65535&T,w<(z&=15)&&(b+=k[c++]<<w,(w+=8)<z&&(b+=k[c++]<<w,w+=8)),f<(L+=b&(1<<z)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(b>>>=z,w-=z,(z=d-h)<L){if(m<(z=L-z)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(M=x,(E=0)===y){if(E+=g-z,z<O){for(O-=z;D[d++]=x[E++],--z;);E=d-L,M=D}}else if(y<z){if(E+=g+y-z,(z-=y)<O){for(O-=z;D[d++]=x[E++],--z;);if(E=0,y<O){for(O-=z=y;D[d++]=x[E++],--z;);E=d-L,M=D}}}else if(E+=y-z,z<O){for(O-=z;D[d++]=x[E++],--z;);E=d-L,M=D}for(;2<O;)D[d++]=M[E++],D[d++]=M[E++],D[d++]=M[E++],O-=3;O&&(D[d++]=M[E++],1<O&&(D[d++]=M[E++]))}else{for(E=d-L;D[d++]=D[E++],D[d++]=D[E++],D[d++]=D[E++],2<(O-=3););O&&(D[d++]=D[E++],1<O&&(D[d++]=D[E++]))}break}}break}}while(c<u&&d<p);c-=O=w>>3,b&=(1<<(w-=O<<3))-1,s.next_in=c,s.next_out=d,s.avail_in=c<u?u-c+5:5-(c-u),s.avail_out=d<p?p-d+257:257-(d-p),a.hold=b,a.bits=w}},{}],49:[function(n,r,o){var s=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,h=2,p=0,f=-2,g=1,m=852,y=592;function x(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(E){var M;return E&&E.state?(M=E.state,E.total_in=E.total_out=M.total=0,E.msg="",M.wrap&&(E.adler=1&M.wrap),M.mode=g,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new s.Buf32(m),M.distcode=M.distdyn=new s.Buf32(y),M.sane=1,M.back=-1,p):f}function S(E){var M;return E&&E.state?((M=E.state).wsize=0,M.whave=0,M.wnext=0,w(E)):f}function j(E,M){var k,D;return E&&E.state?(D=E.state,M<0?(k=0,M=-M):(k=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?f:(D.window!==null&&D.wbits!==M&&(D.window=null),D.wrap=k,D.wbits=M,S(E))):f}function C(E,M){var k,D;return E?(D=new b,(E.state=D).window=null,(k=j(E,M))!==p&&(E.state=null),k):f}var N,T,z=!0;function O(E){if(z){var M;for(N=new s.Buf32(512),T=new s.Buf32(32),M=0;M<144;)E.lens[M++]=8;for(;M<256;)E.lens[M++]=9;for(;M<280;)E.lens[M++]=7;for(;M<288;)E.lens[M++]=8;for(u(d,E.lens,0,288,N,0,E.work,{bits:9}),M=0;M<32;)E.lens[M++]=5;u(h,E.lens,0,32,T,0,E.work,{bits:5}),z=!1}E.lencode=N,E.lenbits=9,E.distcode=T,E.distbits=5}function L(E,M,k,D){var H,B=E.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new s.Buf8(B.wsize)),D>=B.wsize?(s.arraySet(B.window,M,k-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(D<(H=B.wsize-B.wnext)&&(H=D),s.arraySet(B.window,M,k-D,H,B.wnext),(D-=H)?(s.arraySet(B.window,M,k-D,D,0),B.wnext=D,B.whave=B.wsize):(B.wnext+=H,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=H))),0}o.inflateReset=S,o.inflateReset2=j,o.inflateResetKeep=w,o.inflateInit=function(E){return C(E,15)},o.inflateInit2=C,o.inflate=function(E,M){var k,D,H,B,q,Y,A,W,V,I,oe,X,de,te,ce,fe,ge,xe,Ee,Le,_,ee,J,R,P=0,F=new s.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return f;(k=E.state).mode===12&&(k.mode=13),q=E.next_out,H=E.output,A=E.avail_out,B=E.next_in,D=E.input,Y=E.avail_in,W=k.hold,V=k.bits,I=Y,oe=A,ee=p;e:for(;;)switch(k.mode){case g:if(k.wrap===0){k.mode=13;break}for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(2&k.wrap&&W===35615){F[k.check=0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0),V=W=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&W)<<8)+(W>>8))%31){E.msg="incorrect header check",k.mode=30;break}if((15&W)!=8){E.msg="unknown compression method",k.mode=30;break}if(V-=4,_=8+(15&(W>>>=4)),k.wbits===0)k.wbits=_;else if(_>k.wbits){E.msg="invalid window size",k.mode=30;break}k.dmax=1<<_,E.adler=k.check=1,k.mode=512&W?10:12,V=W=0;break;case 2:for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(k.flags=W,(255&k.flags)!=8){E.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){E.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=W>>8&1),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0,k.mode=3;case 3:for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.head&&(k.head.time=W),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,F[2]=W>>>16&255,F[3]=W>>>24&255,k.check=a(k.check,F,4,0)),V=W=0,k.mode=4;case 4:for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.head&&(k.head.xflags=255&W,k.head.os=W>>8),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0,k.mode=5;case 5:if(1024&k.flags){for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.length=W,k.head&&(k.head.extra_len=W),512&k.flags&&(F[0]=255&W,F[1]=W>>>8&255,k.check=a(k.check,F,2,0)),V=W=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(Y<(X=k.length)&&(X=Y),X&&(k.head&&(_=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),s.arraySet(k.head.extra,D,B,X,_)),512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,k.length-=X),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(Y===0)break e;for(X=0;_=D[B+X++],k.head&&_&&k.length<65536&&(k.head.name+=String.fromCharCode(_)),_&&X<Y;);if(512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,_)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(Y===0)break e;for(X=0;_=D[B+X++],k.head&&_&&k.length<65536&&(k.head.comment+=String.fromCharCode(_)),_&&X<Y;);if(512&k.flags&&(k.check=a(k.check,D,X,B)),Y-=X,B+=X,_)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;V<16;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W!==(65535&k.check)){E.msg="header crc mismatch",k.mode=30;break}V=W=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),E.adler=k.check=0,k.mode=12;break;case 10:for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}E.adler=k.check=x(W),V=W=0,k.mode=11;case 11:if(k.havedict===0)return E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,2;E.adler=k.check=1,k.mode=12;case 12:if(M===5||M===6)break e;case 13:if(k.last){W>>>=7&V,V-=7&V,k.mode=27;break}for(;V<3;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}switch(k.last=1&W,V-=1,3&(W>>>=1)){case 0:k.mode=14;break;case 1:if(O(k),k.mode=20,M!==6)break;W>>>=2,V-=2;break e;case 2:k.mode=17;break;case 3:E.msg="invalid block type",k.mode=30}W>>>=2,V-=2;break;case 14:for(W>>>=7&V,V-=7&V;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if((65535&W)!=(W>>>16^65535)){E.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&W,V=W=0,k.mode=15,M===6)break e;case 15:k.mode=16;case 16:if(X=k.length){if(Y<X&&(X=Y),A<X&&(X=A),X===0)break e;s.arraySet(H,D,B,X,q),Y-=X,B+=X,A-=X,q+=X,k.length-=X;break}k.mode=12;break;case 17:for(;V<14;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(k.nlen=257+(31&W),W>>>=5,V-=5,k.ndist=1+(31&W),W>>>=5,V-=5,k.ncode=4+(15&W),W>>>=4,V-=4,286<k.nlen||30<k.ndist){E.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;V<3;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.lens[U[k.have++]]=7&W,W>>>=3,V-=3}for(;k.have<19;)k.lens[U[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,J={bits:k.lenbits},ee=u(0,k.lens,0,19,k.lencode,0,k.work,J),k.lenbits=J.bits,ee){E.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;fe=(P=k.lencode[W&(1<<k.lenbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(ge<16)W>>>=ce,V-=ce,k.lens[k.have++]=ge;else{if(ge===16){for(R=ce+2;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W>>>=ce,V-=ce,k.have===0){E.msg="invalid bit length repeat",k.mode=30;break}_=k.lens[k.have-1],X=3+(3&W),W>>>=2,V-=2}else if(ge===17){for(R=ce+3;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}V-=ce,_=0,X=3+(7&(W>>>=ce)),W>>>=3,V-=3}else{for(R=ce+7;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}V-=ce,_=0,X=11+(127&(W>>>=ce)),W>>>=7,V-=7}if(k.have+X>k.nlen+k.ndist){E.msg="invalid bit length repeat",k.mode=30;break}for(;X--;)k.lens[k.have++]=_}}if(k.mode===30)break;if(k.lens[256]===0){E.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,J={bits:k.lenbits},ee=u(d,k.lens,0,k.nlen,k.lencode,0,k.work,J),k.lenbits=J.bits,ee){E.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,J={bits:k.distbits},ee=u(h,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,J),k.distbits=J.bits,ee){E.msg="invalid distances set",k.mode=30;break}if(k.mode=20,M===6)break e;case 20:k.mode=21;case 21:if(6<=Y&&258<=A){E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,c(E,oe),q=E.next_out,H=E.output,A=E.avail_out,B=E.next_in,D=E.input,Y=E.avail_in,W=k.hold,V=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;fe=(P=k.lencode[W&(1<<k.lenbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(fe&&(240&fe)==0){for(xe=ce,Ee=fe,Le=ge;fe=(P=k.lencode[Le+((W&(1<<xe+Ee)-1)>>xe)])>>>16&255,ge=65535&P,!(xe+(ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}W>>>=xe,V-=xe,k.back+=xe}if(W>>>=ce,V-=ce,k.back+=ce,k.length=ge,fe===0){k.mode=26;break}if(32&fe){k.back=-1,k.mode=12;break}if(64&fe){E.msg="invalid literal/length code",k.mode=30;break}k.extra=15&fe,k.mode=22;case 22:if(k.extra){for(R=k.extra;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.length+=W&(1<<k.extra)-1,W>>>=k.extra,V-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;fe=(P=k.distcode[W&(1<<k.distbits)-1])>>>16&255,ge=65535&P,!((ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if((240&fe)==0){for(xe=ce,Ee=fe,Le=ge;fe=(P=k.distcode[Le+((W&(1<<xe+Ee)-1)>>xe)])>>>16&255,ge=65535&P,!(xe+(ce=P>>>24)<=V);){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}W>>>=xe,V-=xe,k.back+=xe}if(W>>>=ce,V-=ce,k.back+=ce,64&fe){E.msg="invalid distance code",k.mode=30;break}k.offset=ge,k.extra=15&fe,k.mode=24;case 24:if(k.extra){for(R=k.extra;V<R;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}k.offset+=W&(1<<k.extra)-1,W>>>=k.extra,V-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){E.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(A===0)break e;if(X=oe-A,k.offset>X){if((X=k.offset-X)>k.whave&&k.sane){E.msg="invalid distance too far back",k.mode=30;break}de=X>k.wnext?(X-=k.wnext,k.wsize-X):k.wnext-X,X>k.length&&(X=k.length),te=k.window}else te=H,de=q-k.offset,X=k.length;for(A<X&&(X=A),A-=X,k.length-=X;H[q++]=te[de++],--X;);k.length===0&&(k.mode=21);break;case 26:if(A===0)break e;H[q++]=k.length,A--,k.mode=21;break;case 27:if(k.wrap){for(;V<32;){if(Y===0)break e;Y--,W|=D[B++]<<V,V+=8}if(oe-=A,E.total_out+=oe,k.total+=oe,oe&&(E.adler=k.check=k.flags?a(k.check,H,oe,q-oe):i(k.check,H,oe,q-oe)),oe=A,(k.flags?W:x(W))!==k.check){E.msg="incorrect data check",k.mode=30;break}V=W=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;V<32;){if(Y===0)break e;Y--,W+=D[B++]<<V,V+=8}if(W!==(4294967295&k.total)){E.msg="incorrect length check",k.mode=30;break}V=W=0}k.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;default:return f}return E.next_out=q,E.avail_out=A,E.next_in=B,E.avail_in=Y,k.hold=W,k.bits=V,(k.wsize||oe!==E.avail_out&&k.mode<30&&(k.mode<27||M!==4))&&L(E,E.output,E.next_out,oe-E.avail_out)?(k.mode=31,-4):(I-=E.avail_in,oe-=E.avail_out,E.total_in+=I,E.total_out+=oe,k.total+=oe,k.wrap&&oe&&(E.adler=k.check=k.flags?a(k.check,H,oe,E.next_out-oe):i(k.check,H,oe,E.next_out-oe)),E.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(I==0&&oe===0||M===4)&&ee===p&&(ee=-5),ee)},o.inflateEnd=function(E){if(!E||!E.state)return f;var M=E.state;return M.window&&(M.window=null),E.state=null,p},o.inflateGetHeader=function(E,M){var k;return E&&E.state?(2&(k=E.state).wrap)==0?f:((k.head=M).done=!1,p):f},o.inflateSetDictionary=function(E,M){var k,D=M.length;return E&&E.state?(k=E.state).wrap!==0&&k.mode!==11?f:k.mode===11&&i(1,M,D,0)!==k.check?-3:L(E,M,D,D)?(k.mode=31,-4):(k.havedict=1,p):f},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,o){var s=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,h,p,f,g,m,y,x){var b,w,S,j,C,N,T,z,O,L=x.bits,E=0,M=0,k=0,D=0,H=0,B=0,q=0,Y=0,A=0,W=0,V=null,I=0,oe=new s.Buf16(16),X=new s.Buf16(16),de=null,te=0;for(E=0;E<=15;E++)oe[E]=0;for(M=0;M<f;M++)oe[h[p+M]]++;for(H=L,D=15;1<=D&&oe[D]===0;D--);if(D<H&&(H=D),D===0)return g[m++]=20971520,g[m++]=20971520,x.bits=1,0;for(k=1;k<D&&oe[k]===0;k++);for(H<k&&(H=k),E=Y=1;E<=15;E++)if(Y<<=1,(Y-=oe[E])<0)return-1;if(0<Y&&(d===0||D!==1))return-1;for(X[1]=0,E=1;E<15;E++)X[E+1]=X[E]+oe[E];for(M=0;M<f;M++)h[p+M]!==0&&(y[X[h[p+M]]++]=M);if(N=d===0?(V=de=y,19):d===1?(V=i,I-=257,de=a,te-=257,256):(V=c,de=u,-1),E=k,C=m,q=M=W=0,S=-1,j=(A=1<<(B=H))-1,d===1&&852<A||d===2&&592<A)return 1;for(;;){for(T=E-q,O=y[M]<N?(z=0,y[M]):y[M]>N?(z=de[te+y[M]],V[I+y[M]]):(z=96,0),b=1<<E-q,k=w=1<<B;g[C+(W>>q)+(w-=b)]=T<<24|z<<16|O|0,w!==0;);for(b=1<<E-1;W&b;)b>>=1;if(b!==0?(W&=b-1,W+=b):W=0,M++,--oe[E]==0){if(E===D)break;E=h[p+y[M]]}if(H<E&&(W&j)!==S){for(q===0&&(q=H),C+=k,Y=1<<(B=E-q);B+q<D&&!((Y-=oe[B+q])<=0);)B++,Y<<=1;if(A+=1<<B,d===1&&852<A||d===2&&592<A)return 1;g[S=W&j]=H<<24|B<<16|C-m|0}}return W!==0&&(g[C+W]=E-q<<24|64<<16|0),x.bits=H,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var s=n("../utils/common"),i=0,a=1;function c(P){for(var F=P.length;0<=--F;)P[F]=0}var u=0,d=29,h=256,p=h+1+d,f=30,g=19,m=2*p+1,y=15,x=16,b=7,w=256,S=16,j=17,C=18,N=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],T=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=new Array(2*(p+2));c(L);var E=new Array(2*f);c(E);var M=new Array(512);c(M);var k=new Array(256);c(k);var D=new Array(d);c(D);var H,B,q,Y=new Array(f);function A(P,F,U,G,$){this.static_tree=P,this.extra_bits=F,this.extra_base=U,this.elems=G,this.max_length=$,this.has_stree=P&&P.length}function W(P,F){this.dyn_tree=P,this.max_code=0,this.stat_desc=F}function V(P){return P<256?M[P]:M[256+(P>>>7)]}function I(P,F){P.pending_buf[P.pending++]=255&F,P.pending_buf[P.pending++]=F>>>8&255}function oe(P,F,U){P.bi_valid>x-U?(P.bi_buf|=F<<P.bi_valid&65535,I(P,P.bi_buf),P.bi_buf=F>>x-P.bi_valid,P.bi_valid+=U-x):(P.bi_buf|=F<<P.bi_valid&65535,P.bi_valid+=U)}function X(P,F,U){oe(P,U[2*F],U[2*F+1])}function de(P,F){for(var U=0;U|=1&P,P>>>=1,U<<=1,0<--F;);return U>>>1}function te(P,F,U){var G,$,ne=new Array(y+1),le=0;for(G=1;G<=y;G++)ne[G]=le=le+U[G-1]<<1;for($=0;$<=F;$++){var se=P[2*$+1];se!==0&&(P[2*$]=de(ne[se]++,se))}}function ce(P){var F;for(F=0;F<p;F++)P.dyn_ltree[2*F]=0;for(F=0;F<f;F++)P.dyn_dtree[2*F]=0;for(F=0;F<g;F++)P.bl_tree[2*F]=0;P.dyn_ltree[2*w]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function fe(P){8<P.bi_valid?I(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function ge(P,F,U,G){var $=2*F,ne=2*U;return P[$]<P[ne]||P[$]===P[ne]&&G[F]<=G[U]}function xe(P,F,U){for(var G=P.heap[U],$=U<<1;$<=P.heap_len&&($<P.heap_len&&ge(F,P.heap[$+1],P.heap[$],P.depth)&&$++,!ge(F,G,P.heap[$],P.depth));)P.heap[U]=P.heap[$],U=$,$<<=1;P.heap[U]=G}function Ee(P,F,U){var G,$,ne,le,se=0;if(P.last_lit!==0)for(;G=P.pending_buf[P.d_buf+2*se]<<8|P.pending_buf[P.d_buf+2*se+1],$=P.pending_buf[P.l_buf+se],se++,G===0?X(P,$,F):(X(P,(ne=k[$])+h+1,F),(le=N[ne])!==0&&oe(P,$-=D[ne],le),X(P,ne=V(--G),U),(le=T[ne])!==0&&oe(P,G-=Y[ne],le)),se<P.last_lit;);X(P,w,F)}function Le(P,F){var U,G,$,ne=F.dyn_tree,le=F.stat_desc.static_tree,se=F.stat_desc.has_stree,Z=F.stat_desc.elems,re=-1;for(P.heap_len=0,P.heap_max=m,U=0;U<Z;U++)ne[2*U]!==0?(P.heap[++P.heap_len]=re=U,P.depth[U]=0):ne[2*U+1]=0;for(;P.heap_len<2;)ne[2*($=P.heap[++P.heap_len]=re<2?++re:0)]=1,P.depth[$]=0,P.opt_len--,se&&(P.static_len-=le[2*$+1]);for(F.max_code=re,U=P.heap_len>>1;1<=U;U--)xe(P,ne,U);for($=Z;U=P.heap[1],P.heap[1]=P.heap[P.heap_len--],xe(P,ne,1),G=P.heap[1],P.heap[--P.heap_max]=U,P.heap[--P.heap_max]=G,ne[2*$]=ne[2*U]+ne[2*G],P.depth[$]=(P.depth[U]>=P.depth[G]?P.depth[U]:P.depth[G])+1,ne[2*U+1]=ne[2*G+1]=$,P.heap[1]=$++,xe(P,ne,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],(function(ue,be){var Pe,He,ft,Re,It,Ut,Ve=be.dyn_tree,Zt=be.max_code,Ct=be.stat_desc.static_tree,$p=be.stat_desc.has_stree,Bp=be.stat_desc.extra_bits,Pa=be.stat_desc.extra_base,ir=be.stat_desc.max_length,Or=0;for(Re=0;Re<=y;Re++)ue.bl_count[Re]=0;for(Ve[2*ue.heap[ue.heap_max]+1]=0,Pe=ue.heap_max+1;Pe<m;Pe++)ir<(Re=Ve[2*Ve[2*(He=ue.heap[Pe])+1]+1]+1)&&(Re=ir,Or++),Ve[2*He+1]=Re,Zt<He||(ue.bl_count[Re]++,It=0,Pa<=He&&(It=Bp[He-Pa]),Ut=Ve[2*He],ue.opt_len+=Ut*(Re+It),$p&&(ue.static_len+=Ut*(Ct[2*He+1]+It)));if(Or!==0){do{for(Re=ir-1;ue.bl_count[Re]===0;)Re--;ue.bl_count[Re]--,ue.bl_count[Re+1]+=2,ue.bl_count[ir]--,Or-=2}while(0<Or);for(Re=ir;Re!==0;Re--)for(He=ue.bl_count[Re];He!==0;)Zt<(ft=ue.heap[--Pe])||(Ve[2*ft+1]!==Re&&(ue.opt_len+=(Re-Ve[2*ft+1])*Ve[2*ft],Ve[2*ft+1]=Re),He--)}})(P,F),te(ne,re,P.bl_count)}function _(P,F,U){var G,$,ne=-1,le=F[1],se=0,Z=7,re=4;for(le===0&&(Z=138,re=3),F[2*(U+1)+1]=65535,G=0;G<=U;G++)$=le,le=F[2*(G+1)+1],++se<Z&&$===le||(se<re?P.bl_tree[2*$]+=se:$!==0?($!==ne&&P.bl_tree[2*$]++,P.bl_tree[2*S]++):se<=10?P.bl_tree[2*j]++:P.bl_tree[2*C]++,ne=$,re=(se=0)===le?(Z=138,3):$===le?(Z=6,3):(Z=7,4))}function ee(P,F,U){var G,$,ne=-1,le=F[1],se=0,Z=7,re=4;for(le===0&&(Z=138,re=3),G=0;G<=U;G++)if($=le,le=F[2*(G+1)+1],!(++se<Z&&$===le)){if(se<re)for(;X(P,$,P.bl_tree),--se!=0;);else $!==0?($!==ne&&(X(P,$,P.bl_tree),se--),X(P,S,P.bl_tree),oe(P,se-3,2)):se<=10?(X(P,j,P.bl_tree),oe(P,se-3,3)):(X(P,C,P.bl_tree),oe(P,se-11,7));ne=$,re=(se=0)===le?(Z=138,3):$===le?(Z=6,3):(Z=7,4)}}c(Y);var J=!1;function R(P,F,U,G){oe(P,(u<<1)+(G?1:0),3),(function($,ne,le,se){fe($),I($,le),I($,~le),s.arraySet($.pending_buf,$.window,ne,le,$.pending),$.pending+=le})(P,F,U)}o._tr_init=function(P){J||((function(){var F,U,G,$,ne,le=new Array(y+1);for($=G=0;$<d-1;$++)for(D[$]=G,F=0;F<1<<N[$];F++)k[G++]=$;for(k[G-1]=$,$=ne=0;$<16;$++)for(Y[$]=ne,F=0;F<1<<T[$];F++)M[ne++]=$;for(ne>>=7;$<f;$++)for(Y[$]=ne<<7,F=0;F<1<<T[$]-7;F++)M[256+ne++]=$;for(U=0;U<=y;U++)le[U]=0;for(F=0;F<=143;)L[2*F+1]=8,F++,le[8]++;for(;F<=255;)L[2*F+1]=9,F++,le[9]++;for(;F<=279;)L[2*F+1]=7,F++,le[7]++;for(;F<=287;)L[2*F+1]=8,F++,le[8]++;for(te(L,p+1,le),F=0;F<f;F++)E[2*F+1]=5,E[2*F]=de(F,5);H=new A(L,N,h+1,p,y),B=new A(E,T,0,f,y),q=new A(new Array(0),z,0,g,b)})(),J=!0),P.l_desc=new W(P.dyn_ltree,H),P.d_desc=new W(P.dyn_dtree,B),P.bl_desc=new W(P.bl_tree,q),P.bi_buf=0,P.bi_valid=0,ce(P)},o._tr_stored_block=R,o._tr_flush_block=function(P,F,U,G){var $,ne,le=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=(function(se){var Z,re=4093624447;for(Z=0;Z<=31;Z++,re>>>=1)if(1&re&&se.dyn_ltree[2*Z]!==0)return i;if(se.dyn_ltree[18]!==0||se.dyn_ltree[20]!==0||se.dyn_ltree[26]!==0)return a;for(Z=32;Z<h;Z++)if(se.dyn_ltree[2*Z]!==0)return a;return i})(P)),Le(P,P.l_desc),Le(P,P.d_desc),le=(function(se){var Z;for(_(se,se.dyn_ltree,se.l_desc.max_code),_(se,se.dyn_dtree,se.d_desc.max_code),Le(se,se.bl_desc),Z=g-1;3<=Z&&se.bl_tree[2*O[Z]+1]===0;Z--);return se.opt_len+=3*(Z+1)+5+5+4,Z})(P),$=P.opt_len+3+7>>>3,(ne=P.static_len+3+7>>>3)<=$&&($=ne)):$=ne=U+5,U+4<=$&&F!==-1?R(P,F,U,G):P.strategy===4||ne===$?(oe(P,2+(G?1:0),3),Ee(P,L,E)):(oe(P,4+(G?1:0),3),(function(se,Z,re,ue){var be;for(oe(se,Z-257,5),oe(se,re-1,5),oe(se,ue-4,4),be=0;be<ue;be++)oe(se,se.bl_tree[2*O[be]+1],3);ee(se,se.dyn_ltree,Z-1),ee(se,se.dyn_dtree,re-1)})(P,P.l_desc.max_code+1,P.d_desc.max_code+1,le+1),Ee(P,P.dyn_ltree,P.dyn_dtree)),ce(P),G&&fe(P)},o._tr_tally=function(P,F,U){return P.pending_buf[P.d_buf+2*P.last_lit]=F>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&F,P.pending_buf[P.l_buf+P.last_lit]=255&U,P.last_lit++,F===0?P.dyn_ltree[2*U]++:(P.matches++,F--,P.dyn_ltree[2*(k[U]+h+1)]++,P.dyn_dtree[2*V(F)]++),P.last_lit===P.lit_bufsize-1},o._tr_align=function(P){oe(P,2,3),X(P,w,L),(function(F){F.bi_valid===16?(I(F,F.bi_buf),F.bi_buf=0,F.bi_valid=0):8<=F.bi_valid&&(F.pending_buf[F.pending++]=255&F.bi_buf,F.bi_buf>>=8,F.bi_valid-=8)})(P)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(s){(function(i,a){if(!i.setImmediate){var c,u,d,h,p=1,f={},g=!1,m=i.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(i);y=y&&y.setTimeout?y:i,c={}.toString.call(i.process)==="[object process]"?function(S){process.nextTick(function(){b(S)})}:(function(){if(i.postMessage&&!i.importScripts){var S=!0,j=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=j,S}})()?(h="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",w,!1):i.attachEvent("onmessage",w),function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){b(S.data)},function(S){d.port2.postMessage(S)}):m&&"onreadystatechange"in m.createElement("script")?(u=m.documentElement,function(S){var j=m.createElement("script");j.onreadystatechange=function(){b(S),j.onreadystatechange=null,u.removeChild(j),j=null},u.appendChild(j)}):function(S){setTimeout(b,0,S)},y.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var j=new Array(arguments.length-1),C=0;C<j.length;C++)j[C]=arguments[C+1];var N={callback:S,args:j};return f[p]=N,c(p),p++},y.clearImmediate=x}function x(S){delete f[S]}function b(S){if(g)setTimeout(b,0,S);else{var j=f[S];if(j){g=!0;try{(function(C){var N=C.callback,T=C.args;switch(T.length){case 0:N();break;case 1:N(T[0]);break;case 2:N(T[0],T[1]);break;case 3:N(T[0],T[1],T[2]);break;default:N.apply(a,T)}})(j)}finally{x(S),g=!1}}}}function w(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&b(+S.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Dr<"u"?Dr:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(js)),js.exports}var xS=gS();const yS=Ni(xS);async function vS(e){try{const t=await fetch(`/api/logs/${e}/chunks`);if(!t.ok)return null;const n=await t.json();return JSON.stringify(n,null,2)}catch{return null}}async function bS(e){const t=new yS;for(const i of e)i.rawRequestBody!==null&&t.file(`#${i.id}.Request.json`,i.rawRequestBody),i.responseText!==null&&t.file(`#${i.id}.Response.json`,i.responseText);const n=e.filter(i=>i.streaming);await Promise.allSettled(n.map(async i=>{const a=await vS(i.id);a!==null&&t.file(`#${i.id}.SSE.Response.json`,a)}));const r=await t.generateAsync({type:"blob"}),o=URL.createObjectURL(r),s=document.createElement("a");s.href=o,s.download=`llm-inspector-export-${new Date().toISOString().slice(0,10)}.zip`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)}const wS="1.16.1",kS={version:wS},Ll=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fl=Nh,pa=(e,t)=>n=>{var r;if(t?.variants==null)return Fl(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const d=n?.[u],h=s?.[u];if(d===null)return null;const p=Ll(d)||Ll(h);return o[u][p]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...u,h,p]:u},[]);return Fl(e,i,c,n?.class,n?.className)},_S=pa("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function xt({className:e,variant:t="default",asChild:n=!1,...r}){const o=n?Rv:"span";return l.jsx(o,{"data-slot":"badge","data-variant":t,className:he(_S({variant:t}),e),...r})}function ts({...e}){return l.jsx(g2,{"data-slot":"dialog",...e})}function SS({...e}){return l.jsx(x2,{"data-slot":"dialog-trigger",...e})}function CS({...e}){return l.jsx(y2,{"data-slot":"dialog-portal",...e})}function jS({className:e,...t}){return l.jsx(v2,{"data-slot":"dialog-overlay",className:he("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function ns({className:e,children:t,...n}){return l.jsxs(CS,{children:[l.jsx(jS,{}),l.jsxs(b2,{"data-slot":"dialog-content",className:he("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,l.jsxs(k2,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(id,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rs({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-header",className:he("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function os({className:e,...t}){return l.jsx(w2,{"data-slot":"dialog-title",className:he("text-lg font-semibold leading-none tracking-tight",e),...t})}const ES=pa("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Xe({className:e,variant:t,size:n,...r}){return l.jsx("button",{"data-slot":"button",className:he(ES({variant:t,size:n,className:e})),...r})}function Uh({open:e,onOpenChange:t,title:n,description:r,confirmLabel:o="Confirm",variant:s="default",onConfirm:i}){return l.jsx(ts,{open:e,onOpenChange:t,children:l.jsxs(ns,{children:[l.jsx(rs,{children:l.jsx(os,{children:n})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:r}),l.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[l.jsx(Xe,{variant:"outline",size:"sm",onClick:()=>t(!1),children:"Cancel"}),l.jsx(Xe,{variant:s,size:"sm",onClick:()=>{i(),t(!1)},children:o})]})]})})}const NS={anthropic:"Anthropic",openai:"OpenAI",unknown:"Unknown"};function $l(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function TS({conversationId:e,startTime:t,endTime:n,totalCalls:r,totalInputTokens:o,totalOutputTokens:s,apiFormat:i,expanded:a,onToggle:c,hideApiFormat:u=!1,isLoading:d=!1,userAgent:h,onClear:p}){const[f,g]=v.useState(!1),m=y=>{y.stopPropagation(),p!==void 0&&g(!0)};return l.jsxs("div",{role:"button",tabIndex:0,className:he("flex items-center gap-3 px-3 py-2 cursor-pointer transition-colors","hover:bg-muted/50","select-none","border border-border rounded-lg mb-2 bg-background sticky top-0 z-10"),onClick:c,onKeyDown:y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),c())},children:[a?l.jsx(yt,{className:"size-4 text-muted-foreground shrink-0"}):d?l.jsx(_r,{className:"size-4 animate-spin text-muted-foreground shrink-0"}):l.jsx(bt,{className:"size-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-purple-400/90 font-mono text-xs font-semibold shrink-0",title:e,children:e.length>24?e.slice(0,12)+"…"+e.slice(-12):e}),h!=null&&h!==""&&l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",title:h,children:[l.jsx(jv,{className:"size-3"}),l.jsx("span",{className:"font-mono tabular-nums truncate max-w-[120px]",children:h})]}),!u&&l.jsx(xt,{variant:"outline",className:he("text-[10px] px-1.5 py-0 h-5 font-mono shrink-0",i==="openai"&&"border-blue-500/40 text-blue-400",i==="anthropic"&&"border-orange-500/40 text-orange-400",i==="unknown"&&"border-muted text-muted-foreground"),children:NS[i]}),l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[l.jsx(Oo,{className:"size-3"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[$l(t)," - ",$l(n)]})]}),l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs shrink-0",children:[l.jsx(ed,{className:"size-3"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[r," call",r!==1?"s":""]})]}),l.jsxs("span",{className:"flex items-center gap-1 text-xs shrink-0",children:[l.jsx(Tr,{className:"size-3 text-muted-foreground"}),l.jsxs("span",{className:"font-mono tabular-nums",children:[l.jsx("span",{className:"text-blue-400",children:Ye(o)})," / ",l.jsx("span",{className:"text-amber-400",children:Ye(s)})]})]}),l.jsx("span",{className:"flex-1 min-w-0"}),p!==void 0&&l.jsx("button",{type:"button",onClick:m,"aria-label":`Clear group (${r} request${r!==1?"s":""})`,title:"Clear this group",className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 inline-flex items-center justify-center size-6 rounded hover:bg-muted cursor-pointer",children:l.jsx(sd,{className:"size-3.5"})}),l.jsx(Uh,{open:f,onOpenChange:g,title:"Clear this group?",description:`This will remove ${r} request${r!==1?"s":""} from this conversation. This action cannot be undone.`,confirmLabel:"Clear",variant:"destructive",onConfirm:()=>{p?.()}})]})}function AS(e){const t=e.find(n=>n.apiFormat!=="unknown");return t!==void 0?t.apiFormat:e[0]?.apiFormat??"unknown"}function IS(e){let t=!1,n=!1;for(const r of e)if(r.apiFormat==="anthropic"?t=!0:r.apiFormat==="openai"&&(n=!0),t&&n)return!0;return!1}function wo(e){if(e.isTest===!0)return"provider-test";if(e.sessionId!==null&&e.sessionId!==""&&e.sessionId!==void 0)return e.sessionId;const t=e.clientPid!==null&&e.clientPid!==void 0,n=e.clientProjectFolder!==null&&e.clientProjectFolder!==void 0;if(!t&&!n)return"default";const r=t?`PID:${e.clientPid}`:"unknown",o=n?e.clientProjectFolder:"no-folder";return`${r}|${o}`}function zS(e){const t=new Map;for(const r of e){const o=wo(r),s=t.get(o);s!==void 0?s.push(r):t.set(o,[r])}const n=[];for(const[r,o]of t){const s=[...o].sort((i,a)=>i.timestamp.localeCompare(a.timestamp));n.push({id:r,conversationId:r,logs:s})}return n.sort((r,o)=>(r.logs[0]?.timestamp??"").localeCompare(o.logs[0]?.timestamp??"")),n}function Bl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function PS(e){if(e.responseText===null)return null;try{let t=JSON.parse(e.responseText);return typeof t=="string"&&(t=JSON.parse(t)),Bl(t)?typeof t.stop_reason=="string"?t.stop_reason==="end_turn"||t.stop_reason==="tool_use"?t.stop_reason:null:Array.isArray(t.choices)&&t.choices.length>0&&Bl(t.choices[0])&&typeof t.choices[0].finish_reason=="string"&&t.choices[0].finish_reason==="stop"?"stop":null:null}catch{return null}}function Zh(e){return e==="end_turn"||e==="stop"}const RS="x-anthropic-billing-header:";function OS(e){return e.trimStart().toLowerCase().startsWith(RS)}function DS(e){return Du(e)?Object.prototype.hasOwnProperty.call(e,"system"):!1}function MS(e){if(!Du(e))return!1;const t=nl(e,"type"),n=nl(e,"text");return typeof t!="string"||t!=="text"||typeof n!="string"?!1:OS(n)}function LS(e){let t;try{t=JSON.parse(e)}catch{return{body:e,removed:0}}if(!DS(t))return{body:e,removed:0};const n=t.system;if(!Array.isArray(n)||n.length===0)return{body:e,removed:0};const r=[];let o=0;for(const s of n){if(MS(s)){o+=1;continue}r.push(s)}return o===0?{body:e,removed:0}:(r.length===0?delete t.system:t.system=r,{body:JSON.stringify(t),removed:o})}function FS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $S=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,US={};function Ul(e,t){return(US.jsx?BS:$S).test(e)}const ZS=/[ \t\n\f\r]/g;function VS(e){return typeof e=="object"?e.type==="text"?Zl(e.value):!1:Zl(e)}function Zl(e){return e.replace(ZS,"")===""}class Pr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Pr.prototype.normal={};Pr.prototype.property={};Pr.prototype.space=void 0;function Vh(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Pr(n,r,t)}function fi(e){return e.toLowerCase()}class dt{constructor(t,n){this.attribute=n,this.property=t}}dt.prototype.attribute="";dt.prototype.booleanish=!1;dt.prototype.boolean=!1;dt.prototype.commaOrSpaceSeparated=!1;dt.prototype.commaSeparated=!1;dt.prototype.defined=!1;dt.prototype.mustUseProperty=!1;dt.prototype.number=!1;dt.prototype.overloadedBoolean=!1;dt.prototype.property="";dt.prototype.spaceSeparated=!1;dt.prototype.space=void 0;let WS=0;const je=kn(),Je=kn(),hi=kn(),ie=kn(),Fe=kn(),Fn=kn(),ht=kn();function kn(){return 2**++WS}const pi=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Je,commaOrSpaceSeparated:ht,commaSeparated:Fn,number:ie,overloadedBoolean:hi,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Es=Object.keys(pi);class ma extends dt{constructor(t,n,r,o){let s=-1;if(super(t,n),Vl(this,"space",o),typeof r=="number")for(;++s<Es.length;){const i=Es[s];Vl(this,Es[s],(r&pi[i])===pi[i])}}}ma.prototype.defined=!0;function Vl(e,t,n){n&&(e[t]=n)}function rr(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new ma(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[fi(r)]=r,n[fi(s.attribute)]=r}return new Pr(t,n,e.space)}const Wh=rr({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Fe,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:ie,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Fe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Je,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hh(e,t){return t in e?e[t]:t}function qh(e,t){return Hh(e,t.toLowerCase())}const HS=rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fn,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:Fe,autoFocus:je,autoPlay:je,blocking:Fe,capture:null,charSet:null,checked:je,cite:null,className:Fe,cols:ie,colSpan:null,content:null,contentEditable:Je,controls:je,controlsList:Fe,coords:ie|Fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:hi,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:Fe,height:ie,hidden:hi,high:ie,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:je,itemType:Fe,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,onBeforeToggle: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:Fe,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:Fe,required:je,reversed:je,rows:ie,rowSpan:ie,sandbox:Fe,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Je,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:Je,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,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:Je,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},space:"html",transform:qh}),qS=rr({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",transformOrigin:"transform-origin",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"},properties:{about:ht,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:Fe,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:Fn,g2:Fn,glyphName:Fn,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:ht,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:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ht,rev:ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ht,requiredFeatures:ht,requiredFonts:ht,requiredFormats:ht,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:ht,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:ht,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:ht,to:null,transform:null,transformOrigin: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},space:"svg",transform:Hh}),Kh=rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Jh=rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qh}),Gh=rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KS={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"},JS=/[A-Z]/g,Wl=/-[a-z]/g,GS=/^data[-\w.:]+$/i;function YS(e,t){const n=fi(t);let r=t,o=dt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&GS.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Wl,QS);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Wl.test(s)){let i=s.replace(JS,XS);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ma}return new o(r,t)}function XS(e){return"-"+e.toLowerCase()}function QS(e){return e.charAt(1).toUpperCase()}const eC=Vh([Wh,HS,Kh,Jh,Gh],"html"),ga=Vh([Wh,qS,Kh,Jh,Gh],"svg");function tC(e){return e.join(" ").trim()}var Nn={},Ns,Hl;function nC(){if(Hl)return Ns;Hl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
85
85
  `,u="/",d="*",h="",p="comment",f="declaration";function g(y,x){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];x=x||{};var b=1,w=1;function S(k){var D=k.match(t);D&&(b+=D.length);var H=k.lastIndexOf(c);w=~H?k.length-H:w+k.length}function j(){var k={line:b,column:w};return function(D){return D.position=new C(k),z(),D}}function C(k){this.start=k,this.end={line:b,column:w},this.source=x.source}C.prototype.content=y;function N(k){var D=new Error(x.source+":"+b+":"+w+": "+k);if(D.reason=k,D.filename=x.source,D.line=b,D.column=w,D.source=y,!x.silent)throw D}function T(k){var D=k.exec(y);if(D){var H=D[0];return S(H),y=y.slice(H.length),D}}function z(){T(n)}function O(k){var D;for(k=k||[];D=L();)D!==!1&&k.push(D);return k}function L(){var k=j();if(!(u!=y.charAt(0)||d!=y.charAt(1))){for(var D=2;h!=y.charAt(D)&&(d!=y.charAt(D)||u!=y.charAt(D+1));)++D;if(D+=2,h===y.charAt(D-1))return N("End of comment missing");var H=y.slice(2,D-2);return w+=2,S(H),y=y.slice(D),w+=2,k({type:p,comment:H})}}function E(){var k=j(),D=T(r);if(D){if(L(),!T(o))return N("property missing ':'");var H=T(s),B=k({type:f,property:m(D[0].replace(e,h)),value:H?m(H[0].replace(e,h)):h});return T(i),B}}function M(){var k=[];O(k);for(var D;D=E();)D!==!1&&(k.push(D),O(k));return k}return z(),M()}function m(y){return y?y.replace(a,h):h}return Ns=g,Ns}var ql;function rC(){if(ql)return Nn;ql=1;var e=Nn&&Nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.default=n;const t=e(nC());function n(r,o){let s=null;if(!r||typeof r!="string")return s;const i=(0,t.default)(r),a=typeof o=="function";return i.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;a?o(u,d,c):d&&(s=s||{},s[u]=d)}),s}return Nn}var lr={},Kl;function oC(){if(Kl)return lr;Kl=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},i=function(u,d){return d.toUpperCase()},a=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(o,a):u=u.replace(r,a),u.replace(t,i))};return lr.camelCase=c,lr}var cr,Jl;function sC(){if(Jl)return cr;Jl=1;var e=cr&&cr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(rC()),n=oC();function r(o,s){var i={};return!o||typeof o!="string"||(0,t.default)(o,function(a,c){a&&c&&(i[(0,n.camelCase)(a,s)]=c)}),i}return r.default=r,cr=r,cr}var iC=sC();const aC=Ni(iC),Yh=Xh("end"),xa=Xh("start");function Xh(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 lC(e){const t=xa(e),n=Yh(e);if(t&&n)return{start:t,end:n}}function xr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gl(e.position):"start"in e||"end"in e?Gl(e):"line"in e||"column"in e?mi(e):""}function mi(e){return Yl(e&&e.line)+":"+Yl(e&&e.column)}function Gl(e){return mi(e&&e.start)+"-"+mi(e&&e.end)}function Yl(e){return e&&typeof e=="number"?e:1}class rt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",s={},i=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(i=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=xr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=i&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rt.prototype.file="";rt.prototype.name="";rt.prototype.reason="";rt.prototype.message="";rt.prototype.stack="";rt.prototype.column=void 0;rt.prototype.line=void 0;rt.prototype.ancestors=void 0;rt.prototype.cause=void 0;rt.prototype.fatal=void 0;rt.prototype.place=void 0;rt.prototype.ruleId=void 0;rt.prototype.source=void 0;const ya={}.hasOwnProperty,cC=new Map,uC=/[A-Z]/g,dC=new Set(["table","tbody","thead","tfoot","tr"]),fC=new Set(["td","th"]),Qh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hC(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=wC(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=bC(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"?ga:eC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=ep(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function ep(e,t,n){if(t.type==="element")return pC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xC(e,t,n);if(t.type==="mdxjsEsm")return gC(e,t);if(t.type==="root")return yC(e,t,n);if(t.type==="text")return vC(e,t)}function pC(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=ga,e.schema=o),e.ancestors.push(t);const s=np(e,t.tagName,!1),i=kC(e,t);let a=ba(e,t);return dC.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!VS(c):!0})),tp(e,i,s,t),va(i,a),e.ancestors.pop(),e.schema=r,e.create(t,s,i,n)}function mC(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)}jr(e,t.position)}function gC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jr(e,t.position)}function xC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=ga,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:np(e,t.name,!0),i=_C(e,t),a=ba(e,t);return tp(e,i,s,t),va(i,a),e.ancestors.pop(),e.schema=r,e.create(t,s,i,n)}function yC(e,t,n){const r={};return va(r,ba(e,t)),e.create(t,e.Fragment,r,n)}function vC(e,t){return t.value}function tp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function va(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bC(e,t,n){return r;function r(o,s,i,a){const u=Array.isArray(i.children)?n:t;return a?u(s,i,a):u(s,i)}}function wC(e,t){return n;function n(r,o,s,i){const a=Array.isArray(s.children),c=xa(r);return t(o,s,i,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function kC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ya.call(t.properties,o)){const s=SC(e,o,t.properties[o]);if(s){const[i,a]=s;e.tableCellAlignToStyle&&i==="align"&&typeof a=="string"&&fC.has(t.tagName)?r=a:n[i]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _C(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const i=s.expression;i.type;const a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else jr(e,t.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else jr(e,t.position);else s=r.value===null?!0:r.value;n[o]=s}return n}function ba(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:cC;for(;++r<t.children.length;){const s=t.children[r];let i;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const u=o.get(c)||0;i=c+"-"+u,o.set(c,u+1)}}const a=ep(e,s,i);a!==void 0&&n.push(a)}return n}function SC(e,t,n){const r=YS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?FS(n):tC(n)),r.property==="style"){let o=typeof n=="object"?n:CC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=jC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?KS[r.property]||r.property:r.attribute,n]}}function CC(e,t){try{return aC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new rt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Qh+"#cannot-parse-style-attribute",o}}function np(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,i;for(;++s<o.length;){const a=Ul(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};i=i?{type:"MemberExpression",object:i,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=i}else r=Ul(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ya.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);jr(e)}function jr(e,t){const n=new rt("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=Qh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function jC(e){const t={};let n;for(n in e)ya.call(e,n)&&(t[EC(n)]=e[n]);return t}function EC(e){let t=e.replace(uC,NC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function NC(e){return"-"+e.toLowerCase()}const Ts={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"]},TC={};function AC(e,t){const n=TC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rp(e,r,o)}function rp(e,t,n){if(IC(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 Xl(e.children,t,n)}return Array.isArray(e)?Xl(e,t,n):""}function Xl(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=rp(e[o],t,n);return r.join("")}function IC(e){return!!(e&&typeof e=="object")}const Ql=document.createElement("i");function wa(e){const t="&"+e+";";Ql.innerHTML=t;const n=Ql.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ft(e,t,n,r){const o=e.length;let s=0,i;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function vt(e,t){return e.length>0?(Ft(e,e.length,0,t),e):t}const ec={}.hasOwnProperty;function zC(e){const t={};let n=-1;for(;++n<e.length;)PC(t,e[n]);return t}function PC(e,t){let n;for(n in t){const o=(ec.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let i;if(s)for(i in s){ec.call(o,i)||(o[i]=[]);const a=s[i];RC(o[i],Array.isArray(a)?a:a?[a]:[])}}}function RC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ft(e,0,0,r)}function op(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 $n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=cn(/[A-Za-z]/),mt=cn(/[\dA-Za-z]/),OC=cn(/[#-'*+\--9=?A-Z^-~]/);function gi(e){return e!==null&&(e<32||e===127)}const xi=cn(/\d/),DC=cn(/[\dA-Fa-f]/),MC=cn(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Oe(e){return e===-2||e===-1||e===32}const LC=cn(new RegExp("\\p{P}|\\p{S}","u")),FC=cn(/\s/);function cn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function or(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let i="";if(s===37&&mt(e.charCodeAt(n+1))&&mt(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(i=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(i=String.fromCharCode(s,a),o=1):i="�"}else i=String.fromCharCode(s);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function $e(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return i;function i(c){return Oe(c)?(e.enter(n),a(c)):t(c)}function a(c){return Oe(c)&&s++<o?(e.consume(c),a):(e.exit(n),t(c))}}const $C={tokenize:BC};function BC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),$e(e,t,"linePrefix")}function o(a){return e.enter("paragraph"),s(a)}function s(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,i(a)}function i(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return _e(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),i)}}const UC={tokenize:ZC},tc={tokenize:VC};function ZC(e){const t=this,n=[];let r=0,o,s,i;return a;function a(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const S=t.events.length;let j=S,C;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){C=t.events[j][1].end;break}x(r);let N=S;for(;N<t.events.length;)t.events[N][1].end={...C},N++;return Ft(t.events,j+1,0,t.events.slice(S)),t.events.length=N,u(w)}return a(w)}function u(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return g(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tc,d,h)(w)}function d(w){return o&&b(),x(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(tc,f,g)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){o&&b(),x(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),m(w)}function m(w){if(w===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(w);return}return _e(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),m)}function y(w,S){const j=t.sliceStream(w);if(S&&j.push(null),w.previous=s,s&&(s.next=w),s=w,o.defineSkip(w.start),o.write(j),t.parser.lazy[w.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<i&&(!o.events[C][1].end||o.events[C][1].end.offset>i))return;const N=t.events.length;let T=N,z,O;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(z){O=t.events[T][1].end;break}z=!0}for(x(r),C=N;C<t.events.length;)t.events[C][1].end={...O},C++;Ft(t.events,T+1,0,t.events.slice(N)),t.events.length=C}}function x(w){let S=n.length;for(;S-- >w;){const j=n[S];t.containerState=j[1],j[0].exit.call(t,e)}n.length=w}function b(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function VC(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nc(e){if(e===null||ct(e)||FC(e))return 1;if(LC(e))return 2}function ka(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const yi={name:"attention",resolveAll:WC,tokenize:HC};function WC(e,t){let n=-1,r,o,s,i,a,c,u,d;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 h={...e[r][1].end},p={...e[n][1].start};rc(h,-c),rc(p,c),i={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:c>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[r][1].end={...i.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=vt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=vt(u,[["enter",o,t],["enter",i,t],["exit",i,t],["enter",s,t]]),u=vt(u,ka(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=vt(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=vt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ft(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function HC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=nc(r);let s;return i;function i(c){return s=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===s)return e.consume(c),a;const u=e.exit("attentionSequence"),d=nc(c),h=!d||d===2&&o||n.includes(c),p=!o||o===2&&d||n.includes(r);return u._open=!!(s===42?h:h&&(o||!p)),u._close=!!(s===42?p:p&&(d||!h)),t(c)}}function rc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qC={name:"autolink",tokenize:KC};function KC(e,t,n){let r=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return Rt(f)?(e.consume(f),i):f===64?n(f):u(f)}function i(f){return f===43||f===45||f===46||mt(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||mt(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||gi(f)?n(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),d):OC(f)?(e.consume(f),u):n(f)}function d(f){return mt(f)?h(f):n(f)}function h(f){return f===46?(e.consume(f),r=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||mt(f))&&r++<63){const g=f===45?p:h;return e.consume(f),g}return n(f)}}const ss={partial:!0,tokenize:JC};function JC(e,t,n){return r;function r(s){return Oe(s)?$e(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?t(s):n(s)}}const sp={continuation:{tokenize:YC},exit:XC,name:"blockQuote",tokenize:GC};function GC(e,t,n){const r=this;return o;function o(i){if(i===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),s}return n(i)}function s(i){return Oe(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function YC(e,t,n){const r=this;return o;function o(i){return Oe(i)?$e(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):s(i)}function s(i){return e.attempt(sp,t,n)(i)}}function XC(e){e.exit("blockQuote")}const ip={name:"characterEscape",tokenize:QC};function QC(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return MC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const ap={name:"characterReference",tokenize:e5};function e5(e,t,n){const r=this;let o=0,s,i;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,i=mt,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,i=DC,d):(e.enter("characterReferenceValue"),s=7,i=xi,d(h))}function d(h){if(h===59&&o){const p=e.exit("characterReferenceValue");return i===mt&&!wa(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(h)&&o++<s?(e.consume(h),d):n(h)}}const oc={partial:!0,tokenize:n5},sc={concrete:!0,name:"codeFenced",tokenize:t5};function t5(e,t,n){const r=this,o={partial:!0,tokenize:j};let s=0,i=0,a;return c;function c(C){return u(C)}function u(C){const N=r.events[r.events.length-1];return s=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===a?(i++,e.consume(C),d):i<3?n(C):(e.exit("codeFencedFenceSequence"),Oe(C)?$e(e,h,"whitespace")(C):h(C))}function h(C){return C===null||_e(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(oc,m,S)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||_e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):Oe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$e(e,f,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),p)}function f(C){return C===null||_e(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||_e(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===a?n(C):(e.consume(C),g)}function m(C){return e.attempt(o,S,y)(C)}function y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return s>0&&Oe(C)?$e(e,b,"linePrefix",s+1)(C):b(C)}function b(C){return C===null||_e(C)?e.check(oc,m,S)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||_e(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),w)}function S(C){return e.exit("codeFenced"),t(C)}function j(C,N,T){let z=0;return O;function O(D){return C.enter("lineEnding"),C.consume(D),C.exit("lineEnding"),L}function L(D){return C.enter("codeFencedFence"),Oe(D)?$e(C,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):E(D)}function E(D){return D===a?(C.enter("codeFencedFenceSequence"),M(D)):T(D)}function M(D){return D===a?(z++,C.consume(D),M):z>=i?(C.exit("codeFencedFenceSequence"),Oe(D)?$e(C,k,"whitespace")(D):k(D)):T(D)}function k(D){return D===null||_e(D)?(C.exit("codeFencedFence"),N(D)):T(D)}}}function n5(e,t,n){const r=this;return o;function o(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s)}function s(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const As={name:"codeIndented",tokenize:o5},r5={partial:!0,tokenize:s5};function o5(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),$e(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(u):n(u)}function i(u){return u===null?c(u):_e(u)?e.attempt(r5,i,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||_e(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function s5(e,t,n){const r=this;return o;function o(i){return r.parser.lazy[r.now().line]?n(i):_e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):$e(e,s,"linePrefix",5)(i)}function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):_e(i)?o(i):n(i)}}const i5={name:"codeText",previous:l5,resolve:a5,tokenize:c5};function a5(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 l5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c5(e,t,n){let r=0,o,s;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(s=e.enter("codeTextSequence"),o=0,d(h)):_e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||_e(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",u(h))}}class u5{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ur(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ur(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ur(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ur(this.left,n.reverse())}}}function ur(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function lp(e){const t={};let n=-1,r,o,s,i,a,c,u;const d=new u5(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,d5(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,o=void 0;s--;)if(i=d.get(s),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=s);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},a=d.slice(o,n),a.unshift(r),d.splice(o,n-o+1,a))}}return Ft(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function d5(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const s=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const a=i.events,c=[],u={};let d,h,p=-1,f=n,g=0,m=0;const y=[m];for(;f;){for(;e.get(++o)[1]!==f;);s.push(o),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(m=p+1,y.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),p=y.length;p--;){const x=a.slice(y[p],y[p+1]),b=s.pop();c.push([b,b+x.length-1]),e.splice(b,2,x)}for(c.reverse(),p=-1;++p<c.length;)u[g+c[p][0]]=g+c[p][1],g+=c[p][1]-c[p][0]-1;return u}const f5={resolve:p5,tokenize:m5},h5={partial:!0,tokenize:g5};function p5(e){return lp(e),e}function m5(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?s(a):_e(a)?e.check(h5,i,s)(a):(e.consume(a),o)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function i(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function g5(e,t,n){const r=this;return o;function o(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),$e(e,s,"linePrefix")}function s(i){if(i===null||_e(i))return n(i);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function cp(e,t,n,r,o,s,i,a,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(x){return x===60?(e.enter(r),e.enter(o),e.enter(s),e.consume(x),e.exit(s),p):x===null||x===32||x===41||gi(x)?n(x):(e.enter(r),e.enter(i),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(x))}function p(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||_e(x)?n(x):(e.consume(x),x===92?g:f)}function g(x){return x===60||x===62||x===92?(e.consume(x),f):f(x)}function m(x){return!d&&(x===null||x===41||ct(x))?(e.exit("chunkString"),e.exit(a),e.exit(i),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,m):x===41?(e.consume(x),d--,m):x===null||x===32||x===40||gi(x)?n(x):(e.consume(x),x===92?y:m)}function y(x){return x===40||x===41||x===92?(e.consume(x),m):m(x)}}function up(e,t,n,r,o,s){const i=this;let a=0,c;return u;function u(f){return e.enter(r),e.enter(o),e.consume(f),e.exit(o),e.enter(s),d}function d(f){return a>999||f===null||f===91||f===93&&!c||f===94&&!a&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):f===93?(e.exit(s),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||_e(f)||a++>999?(e.exit("chunkString"),d(f)):(e.consume(f),c||(c=!Oe(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),a++,h):h(f)}}function dp(e,t,n,r,o,s){let i;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),i=p===40?41:p,c):n(p)}function c(p){return p===i?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===i?(e.exit(s),c(i)):p===null?n(p):_e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),$e(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===i||p===null||_e(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:d)}function h(p){return p===i||p===92?(e.consume(p),d):d(p)}}function yr(e,t){let n;return r;function r(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Oe(o)?$e(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const x5={name:"definition",tokenize:v5},y5={partial:!0,tokenize:b5};function v5(e,t,n){const r=this;let o;return s;function s(f){return e.enter("definition"),i(f)}function i(f){return up.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return o=$n(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):n(f)}function c(f){return ct(f)?yr(e,u)(f):u(f)}function u(f){return cp(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(y5,h,h)(f)}function h(f){return Oe(f)?$e(e,p,"whitespace")(f):p(f)}function p(f){return f===null||_e(f)?(e.exit("definition"),r.parser.defined.push(o),t(f)):n(f)}}function b5(e,t,n){return r;function r(a){return ct(a)?yr(e,o)(a):n(a)}function o(a){return dp(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Oe(a)?$e(e,i,"whitespace")(a):i(a)}function i(a){return a===null||_e(a)?t(a):n(a)}}const w5={name:"hardBreakEscape",tokenize:k5};function k5(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return _e(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const _5={name:"headingAtx",resolve:S5,tokenize:C5};function S5(e,t){let n=e.length-2,r=3,o,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ft(e,r,n-r+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function C5(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&r++<6?(e.consume(d),i):d===null||ct(d)?(e.exit("atxHeadingSequence"),a(d)):n(d)}function a(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||_e(d)?(e.exit("atxHeading"),t(d)):Oe(d)?$e(e,a,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),a(d))}function u(d){return d===null||d===35||ct(d)?(e.exit("atxHeadingText"),a(d)):(e.consume(d),u)}}const j5=["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"],ic=["pre","script","style","textarea"],E5={concrete:!0,name:"htmlFlow",resolveTo:A5,tokenize:I5},N5={partial:!0,tokenize:P5},T5={partial:!0,tokenize:z5};function A5(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 I5(e,t,n){const r=this;let o,s,i,a,c;return u;function u(I){return d(I)}function d(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),h}function h(I){return I===33?(e.consume(I),p):I===47?(e.consume(I),s=!0,m):I===63?(e.consume(I),o=3,r.interrupt?t:A):Rt(I)?(e.consume(I),i=String.fromCharCode(I),y):n(I)}function p(I){return I===45?(e.consume(I),o=2,f):I===91?(e.consume(I),o=5,a=0,g):Rt(I)?(e.consume(I),o=4,r.interrupt?t:A):n(I)}function f(I){return I===45?(e.consume(I),r.interrupt?t:A):n(I)}function g(I){const oe="CDATA[";return I===oe.charCodeAt(a++)?(e.consume(I),a===oe.length?r.interrupt?t:E:g):n(I)}function m(I){return Rt(I)?(e.consume(I),i=String.fromCharCode(I),y):n(I)}function y(I){if(I===null||I===47||I===62||ct(I)){const oe=I===47,X=i.toLowerCase();return!oe&&!s&&ic.includes(X)?(o=1,r.interrupt?t(I):E(I)):j5.includes(i.toLowerCase())?(o=6,oe?(e.consume(I),x):r.interrupt?t(I):E(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?b(I):w(I))}return I===45||mt(I)?(e.consume(I),i+=String.fromCharCode(I),y):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:E):n(I)}function b(I){return Oe(I)?(e.consume(I),b):O(I)}function w(I){return I===47?(e.consume(I),O):I===58||I===95||Rt(I)?(e.consume(I),S):Oe(I)?(e.consume(I),w):O(I)}function S(I){return I===45||I===46||I===58||I===95||mt(I)?(e.consume(I),S):j(I)}function j(I){return I===61?(e.consume(I),C):Oe(I)?(e.consume(I),j):w(I)}function C(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),c=I,N):Oe(I)?(e.consume(I),C):T(I)}function N(I){return I===c?(e.consume(I),c=null,z):I===null||_e(I)?n(I):(e.consume(I),N)}function T(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ct(I)?j(I):(e.consume(I),T)}function z(I){return I===47||I===62||Oe(I)?w(I):n(I)}function O(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||_e(I)?E(I):Oe(I)?(e.consume(I),L):n(I)}function E(I){return I===45&&o===2?(e.consume(I),H):I===60&&o===1?(e.consume(I),B):I===62&&o===4?(e.consume(I),W):I===63&&o===3?(e.consume(I),A):I===93&&o===5?(e.consume(I),Y):_e(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(N5,V,M)(I)):I===null||_e(I)?(e.exit("htmlFlowData"),M(I)):(e.consume(I),E)}function M(I){return e.check(T5,k,V)(I)}function k(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),D}function D(I){return I===null||_e(I)?M(I):(e.enter("htmlFlowData"),E(I))}function H(I){return I===45?(e.consume(I),A):E(I)}function B(I){return I===47?(e.consume(I),i="",q):E(I)}function q(I){if(I===62){const oe=i.toLowerCase();return ic.includes(oe)?(e.consume(I),W):E(I)}return Rt(I)&&i.length<8?(e.consume(I),i+=String.fromCharCode(I),q):E(I)}function Y(I){return I===93?(e.consume(I),A):E(I)}function A(I){return I===62?(e.consume(I),W):I===45&&o===2?(e.consume(I),A):E(I)}function W(I){return I===null||_e(I)?(e.exit("htmlFlowData"),V(I)):(e.consume(I),W)}function V(I){return e.exit("htmlFlow"),t(I)}}function z5(e,t,n){const r=this;return o;function o(i){return _e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s):n(i)}function s(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function P5(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ss,t,n)}}const R5={name:"htmlText",tokenize:O5};function O5(e,t,n){const r=this;let o,s,i;return a;function a(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),c}function c(A){return A===33?(e.consume(A),u):A===47?(e.consume(A),j):A===63?(e.consume(A),w):Rt(A)?(e.consume(A),T):n(A)}function u(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),s=0,g):Rt(A)?(e.consume(A),b):n(A)}function d(A){return A===45?(e.consume(A),f):n(A)}function h(A){return A===null?n(A):A===45?(e.consume(A),p):_e(A)?(i=h,B(A)):(e.consume(A),h)}function p(A){return A===45?(e.consume(A),f):h(A)}function f(A){return A===62?H(A):A===45?p(A):h(A)}function g(A){const W="CDATA[";return A===W.charCodeAt(s++)?(e.consume(A),s===W.length?m:g):n(A)}function m(A){return A===null?n(A):A===93?(e.consume(A),y):_e(A)?(i=m,B(A)):(e.consume(A),m)}function y(A){return A===93?(e.consume(A),x):m(A)}function x(A){return A===62?H(A):A===93?(e.consume(A),x):m(A)}function b(A){return A===null||A===62?H(A):_e(A)?(i=b,B(A)):(e.consume(A),b)}function w(A){return A===null?n(A):A===63?(e.consume(A),S):_e(A)?(i=w,B(A)):(e.consume(A),w)}function S(A){return A===62?H(A):w(A)}function j(A){return Rt(A)?(e.consume(A),C):n(A)}function C(A){return A===45||mt(A)?(e.consume(A),C):N(A)}function N(A){return _e(A)?(i=N,B(A)):Oe(A)?(e.consume(A),N):H(A)}function T(A){return A===45||mt(A)?(e.consume(A),T):A===47||A===62||ct(A)?z(A):n(A)}function z(A){return A===47?(e.consume(A),H):A===58||A===95||Rt(A)?(e.consume(A),O):_e(A)?(i=z,B(A)):Oe(A)?(e.consume(A),z):H(A)}function O(A){return A===45||A===46||A===58||A===95||mt(A)?(e.consume(A),O):L(A)}function L(A){return A===61?(e.consume(A),E):_e(A)?(i=L,B(A)):Oe(A)?(e.consume(A),L):z(A)}function E(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),o=A,M):_e(A)?(i=E,B(A)):Oe(A)?(e.consume(A),E):(e.consume(A),k)}function M(A){return A===o?(e.consume(A),o=void 0,D):A===null?n(A):_e(A)?(i=M,B(A)):(e.consume(A),M)}function k(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||ct(A)?z(A):(e.consume(A),k)}function D(A){return A===47||A===62||ct(A)?z(A):n(A)}function H(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function B(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),q}function q(A){return Oe(A)?$e(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Y(A)}function Y(A){return e.enter("htmlTextData"),i(A)}}const _a={name:"labelEnd",resolveAll:F5,resolveTo:$5,tokenize:B5},D5={tokenize:U5},M5={tokenize:Z5},L5={tokenize:V5};function F5(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Ft(e,0,e.length,n),e}function $5(e,t){let n=e.length,r=0,o,s,i,a;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(i=n);const c={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[i-2][1].start}};return a=[["enter",c,t],["enter",u,t]],a=vt(a,e.slice(s+1,s+r+3)),a=vt(a,[["enter",d,t]]),a=vt(a,ka(t.parser.constructs.insideSpan.null,e.slice(s+r+4,i-3),t)),a=vt(a,[["exit",d,t],e[i-2],e[i-1],["exit",u,t]]),a=vt(a,e.slice(i+1)),a=vt(a,[["exit",c,t]]),Ft(e,s,e.length,a),e}function B5(e,t,n){const r=this;let o=r.events.length,s,i;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return a;function a(p){return s?s._inactive?h(p):(i=r.parser.defined.includes($n(r.sliceSerialize({start:s.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(D5,d,i?d:h)(p):p===91?e.attempt(M5,d,i?u:h)(p):i?d(p):h(p)}function u(p){return e.attempt(L5,d,h)(p)}function d(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function U5(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return ct(h)?yr(e,s)(h):s(h)}function s(h){return h===41?d(h):cp(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return ct(h)?yr(e,c)(h):d(h)}function a(h){return n(h)}function c(h){return h===34||h===39||h===40?dp(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return ct(h)?yr(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Z5(e,t,n){const r=this;return o;function o(a){return up.call(r,e,s,i,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes($n(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function i(a){return n(a)}}function V5(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const W5={name:"labelStartImage",resolveAll:_a.resolveAll,tokenize:H5};function H5(e,t,n){const r=this;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),i):n(a)}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const q5={name:"labelStartLink",resolveAll:_a.resolveAll,tokenize:K5};function K5(e,t,n){const r=this;return o;function o(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),s}function s(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const Is={name:"lineEnding",tokenize:J5};function J5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),$e(e,t,"linePrefix")}}const oo={name:"thematicBreak",tokenize:G5};function G5(e,t,n){let r=0,o;return s;function s(u){return e.enter("thematicBreak"),i(u)}function i(u){return o=u,a(u)}function a(u){return u===o?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||_e(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===o?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Oe(u)?$e(e,a,"whitespace")(u):a(u))}}const it={continuation:{tokenize:ej},exit:nj,name:"list",tokenize:Q5},Y5={partial:!0,tokenize:rj},X5={partial:!0,tokenize:tj};function Q5(e,t,n){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,i=0;return a;function a(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:xi(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(oo,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return n(f)}function c(f){return xi(f)&&++i<10?(e.consume(f),c):(!r.interrupt||i<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(ss,r.interrupt?n:d,e.attempt(Y5,p,h))}function d(f){return r.containerState.initialBlankLine=!0,s++,p(f)}function h(f){return Oe(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function ej(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ss,o,s);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$e(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Oe(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(X5,t,i)(a))}function i(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,$e(e,e.attempt(it,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tj(e,t,n){const r=this;return $e(e,o,"listItemIndent",r.containerState.size+1);function o(s){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(s):n(s)}}function nj(e){e.exit(this.containerState.type)}function rj(e,t,n){const r=this;return $e(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const i=r.events[r.events.length-1];return!Oe(s)&&i&&i[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const ac={name:"setextUnderline",resolveTo:oj,tokenize:sj};function oj(e,t){let n=e.length,r,o,s;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),!s&&e[n][1].type==="definition"&&(s=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",i,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function sj(e,t,n){const r=this;let o;return s;function s(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=u,i(u)):n(u)}function i(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Oe(u)?$e(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||_e(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ij={tokenize:aj};function aj(e){const t=this,n=e.attempt(ss,r,e.attempt(this.parser.constructs.flowInitial,o,$e(e,e.attempt(this.parser.constructs.flow,o,e.attempt(f5,o)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lj={resolveAll:hp()},cj=fp("string"),uj=fp("text");function fp(e){return{resolveAll:hp(e==="text"?dj:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],s=n.attempt(o,i,a);return i;function i(d){return u(d)?s(d):a(d)}function a(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=o[d];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function hp(e){return t;function t(n,r){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,r):n}}function dj(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 s=o.length,i=-1,a=0,c;for(;s--;){const u=o[s];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)a++,i--;if(i)break;i=-1}else if(u===-2)c=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?i:r.start._bufferIndex+i,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const fj={42:it,43:it,45:it,48:it,49:it,50:it,51:it,52:it,53:it,54:it,55:it,56:it,57:it,62:sp},hj={91:x5},pj={[-2]:As,[-1]:As,32:As},mj={35:_5,42:oo,45:[ac,oo],60:E5,61:ac,95:oo,96:sc,126:sc},gj={38:ap,92:ip},xj={[-5]:Is,[-4]:Is,[-3]:Is,33:W5,38:ap,42:yi,60:[qC,R5],91:q5,92:[w5,ip],93:_a,95:yi,96:i5},yj={null:[yi,lj]},vj={null:[42,95]},bj={null:[]},wj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vj,contentInitial:hj,disable:bj,document:fj,flow:mj,flowInitial:pj,insideSpan:yj,string:gj,text:xj},Symbol.toStringTag,{value:"Module"}));function kj(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let i=[],a=[];const c={attempt:N(j),check:N(C),consume:b,enter:w,exit:S,interrupt:N(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&s.push(t),u;function h(L){return i=vt(i,L),y(),i[i.length-1]!==null?[]:(T(t,0),u.events=ka(s,u.events,u),u.events)}function p(L,E){return Sj(f(L),E)}function f(L){return _j(i,L)}function g(){const{_bufferIndex:L,_index:E,line:M,column:k,offset:D}=r;return{_bufferIndex:L,_index:E,line:M,column:k,offset:D}}function m(L){o[L.line]=L.column,O()}function y(){let L;for(;r._index<i.length;){const E=i[r._index];if(typeof E=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<E.length;)x(E.charCodeAt(r._bufferIndex));else x(E)}}function x(L){d=d(L)}function b(L){_e(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,O()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function w(L,E){const M=E||{};return M.type=L,M.start=g(),u.events.push(["enter",M,u]),a.push(M),M}function S(L){const E=a.pop();return E.end=g(),u.events.push(["exit",E,u]),E}function j(L,E){T(L,E.from)}function C(L,E){E.restore()}function N(L,E){return M;function M(k,D,H){let B,q,Y,A;return Array.isArray(k)?V(k):"tokenize"in k?V([k]):W(k);function W(de){return te;function te(ce){const fe=ce!==null&&de[ce],ge=ce!==null&&de.null,xe=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return V(xe)(ce)}}function V(de){return B=de,q=0,de.length===0?H:I(de[q])}function I(de){return te;function te(ce){return A=z(),Y=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?X():de.tokenize.call(E?Object.assign(Object.create(u),E):u,c,oe,X)(ce)}}function oe(de){return L(Y,A),D}function X(de){return A.restore(),++q<B.length?I(B[q]):H}}}function T(L,E){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Ft(u.events,E,u.events.length-E,L.resolve(u.events.slice(E),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function z(){const L=g(),E=u.previous,M=u.currentConstruct,k=u.events.length,D=Array.from(a);return{from:k,restore:H};function H(){r=L,u.previous=E,u.currentConstruct=M,u.events.length=k,a=D,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function _j(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,s)];else{if(i=e.slice(n,o),r>-1){const a=i[0];typeof a=="string"?i[0]=a.slice(r):i.shift()}s>0&&i.push(e[o].slice(0,s))}return i}function Sj(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const s=e[n];let i;if(typeof s=="string")i=s;else switch(s){case-5:{i="\r";break}case-4:{i=`
86
86
  `;break}case-3:{i=`\r
87
87
  `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&o)continue;i=" ";break}default:i=String.fromCharCode(s)}o=s===-2,r.push(i)}return r.join("")}function Cj(e){const r={constructs:zC([wj,...(e||{}).extensions||[]]),content:o($C),defined:[],document:o(UC),flow:o(ij),lazy:{},string:o(cj),text:o(uj)};return r;function o(s){return i;function i(a){return kj(r,s,a)}}}function jj(e){for(;!lp(e););return e}const lc=/[\0\t\n\r]/g;function Ej(){let e=1,t="",n=!0,r;return o;function o(s,i,a){const c=[];let u,d,h,p,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(lc.lastIndex=h,u=lc.exec(s),p=u&&u.index!==void 0?u.index:s.length,f=s.charCodeAt(p),!u){t=s.slice(h);break}if(f===10&&h===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<p&&(c.push(s.slice(h,p)),e+=p-h),f){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Nj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tj(e){return e.replace(Nj,Aj)}function Aj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return op(n.slice(s?2:1),s?16:10)}return wa(n)||e}const pp={}.hasOwnProperty;function Ij(e,t,n){return typeof t!="string"&&(n=t,t=void 0),zj(n)(jj(Cj(n).document().write(Ej()(e,t,!0))))}function zj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(F),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(ee),blockQuote:s(ge),characterEscape:z,characterReference:z,codeFenced:s(xe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:s(xe,i),codeText:s(Ee,i),codeTextData:z,data:z,codeFlowValue:z,definition:s(Le),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:s(_),hardBreakEscape:s(J),hardBreakTrailing:s(J),htmlFlow:s(R,i),htmlFlowData:z,htmlText:s(R,i),htmlTextData:z,image:s(P),label:i,link:s(F),listItem:s(G),listItemValue:p,listOrdered:s(U,h),listUnordered:s(U),paragraph:s($),reference:I,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:s(ee),strong:s(ne),thematicBreak:s(se)},exit:{atxHeading:c(),atxHeadingSequence:j,autolink:c(),autolinkEmail:fe,autolinkProtocol:ce,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:de,characterReference:te,codeFenced:c(y),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:O,codeIndented:c(x),codeText:c(D),codeTextData:O,data:O,definition:c(),definitionDestinationString:S,definitionLabelString:b,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(E),hardBreakTrailing:c(E),htmlFlow:c(M),htmlFlowData:O,htmlText:c(k),htmlTextData:O,image:c(B),label:Y,labelText:q,lineEnding:L,link:c(H),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:A,resourceTitleString:W,resource:V,setextHeading:c(T),setextHeadingLineSequence:N,setextHeadingText:C,strong:c(),thematicBreak:c()}};mp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let re={type:"root",children:[]};const ue={stack:[re],tokenStack:[],config:t,enter:a,exit:u,buffer:i,resume:d,data:n},be=[];let Pe=-1;for(;++Pe<Z.length;)if(Z[Pe][1].type==="listOrdered"||Z[Pe][1].type==="listUnordered")if(Z[Pe][0]==="enter")be.push(Pe);else{const He=be.pop();Pe=o(Z,He,Pe)}for(Pe=-1;++Pe<Z.length;){const He=t[Z[Pe][0]];pp.call(He,Z[Pe][1].type)&&He[Z[Pe][1].type].call(Object.assign({sliceSerialize:Z[Pe][2].sliceSerialize},ue),Z[Pe][1])}if(ue.tokenStack.length>0){const He=ue.tokenStack[ue.tokenStack.length-1];(He[1]||cc).call(ue,void 0,He[0])}for(re.position={start:Yt(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Yt(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)re=t.transforms[Pe](re)||re;return re}function o(Z,re,ue){let be=re-1,Pe=-1,He=!1,ft,Re,It,Ut;for(;++be<=ue;){const Ve=Z[be];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?Pe++:Pe--,Ut=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(ft&&!Ut&&!Pe&&!It&&(It=be),Ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ut=void 0}if(!Pe&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||Pe===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(ft){let Zt=be;for(Re=void 0;Zt--;){const Ct=Z[Zt];if(Ct[1].type==="lineEnding"||Ct[1].type==="lineEndingBlank"){if(Ct[0]==="exit")continue;Re&&(Z[Re][1].type="lineEndingBlank",He=!0),Ct[1].type="lineEnding",Re=Zt}else if(!(Ct[1].type==="linePrefix"||Ct[1].type==="blockQuotePrefix"||Ct[1].type==="blockQuotePrefixWhitespace"||Ct[1].type==="blockQuoteMarker"||Ct[1].type==="listItemIndent"))break}It&&(!Re||It<Re)&&(ft._spread=!0),ft.end=Object.assign({},Re?Z[Re][1].start:Ve[1].end),Z.splice(Re||be,0,["exit",ft,Ve[2]]),be++,ue++}if(Ve[1].type==="listItemPrefix"){const Zt={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};ft=Zt,Z.splice(be,0,["enter",Zt,Ve[2]]),be++,ue++,It=void 0,Ut=!0}}}return Z[re][1]._spread=He,ue}function s(Z,re){return ue;function ue(be){a.call(this,Z(be),be),re&&re.call(this,be)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(Z,re,ue){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([re,ue||void 0]),Z.position={start:Yt(re.start),end:void 0}}function c(Z){return re;function re(ue){Z&&Z.call(this,ue),u.call(this,ue)}}function u(Z,re){const ue=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==Z.type&&(re?re.call(this,Z,be[0]):(be[1]||cc).call(this,Z,be[0]));else throw new Error("Cannot close `"+Z.type+"` ("+xr({start:Z.start,end:Z.end})+"): it’s not open");ue.position.end=Yt(Z.end)}function d(){return AC(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(Z){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function f(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.lang=Z}function g(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.meta=Z}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.value=Z.replace(/(\r?\n|\r)$/g,"")}function b(Z){const re=this.resume(),ue=this.stack[this.stack.length-1];ue.label=re,ue.identifier=$n(this.sliceSerialize(Z)).toLowerCase()}function w(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.title=Z}function S(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.url=Z}function j(Z){const re=this.stack[this.stack.length-1];if(!re.depth){const ue=this.sliceSerialize(Z).length;re.depth=ue}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function N(Z){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function z(Z){const ue=this.stack[this.stack.length-1].children;let be=ue[ue.length-1];(!be||be.type!=="text")&&(be=le(),be.position={start:Yt(Z.start),end:void 0},ue.push(be)),this.stack.push(be)}function O(Z){const re=this.stack.pop();re.value+=this.sliceSerialize(Z),re.position.end=Yt(Z.end)}function L(Z){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=re.children[re.children.length-1];ue.position.end=Yt(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(z.call(this,Z),O.call(this,Z))}function E(){this.data.atHardBreak=!0}function M(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.value=Z}function k(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.value=Z}function D(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.value=Z}function H(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=re,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function B(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=re,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function q(Z){const re=this.sliceSerialize(Z),ue=this.stack[this.stack.length-2];ue.label=Tj(re),ue.identifier=$n(re).toLowerCase()}function Y(){const Z=this.stack[this.stack.length-1],re=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const be=Z.children;ue.children=be}else ue.alt=re}function A(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.url=Z}function W(){const Z=this.resume(),re=this.stack[this.stack.length-1];re.title=Z}function V(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function oe(Z){const re=this.resume(),ue=this.stack[this.stack.length-1];ue.label=re,ue.identifier=$n(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function X(Z){this.data.characterReferenceType=Z.type}function de(Z){const re=this.sliceSerialize(Z),ue=this.data.characterReferenceType;let be;ue?(be=op(re,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=wa(re);const Pe=this.stack[this.stack.length-1];Pe.value+=be}function te(Z){const re=this.stack.pop();re.position.end=Yt(Z.end)}function ce(Z){O.call(this,Z);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(Z)}function fe(Z){O.call(this,Z);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(Z)}function ge(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function Le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _(){return{type:"emphasis",children:[]}}function ee(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function R(){return{type:"html",value:""}}function P(){return{type:"image",title:null,url:"",alt:null}}function F(){return{type:"link",title:null,url:"",children:[]}}function U(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function G(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function $(){return{type:"paragraph",children:[]}}function ne(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function Yt(e){return{line:e.line,column:e.column,offset:e.offset}}function mp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?mp(e,r):Pj(e,r)}}function Pj(e,t){let n;for(n in t)if(pp.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 cc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xr({start:t.start,end:t.end})+") is still open")}function Rj(e){const t=this;t.parser=n;function n(r){return Ij(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Oj(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 Dj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`