var r8=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Kze=r8((S5e,Ek)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **//*! #__NO_SIDE_EFFECTS__ */function Tk(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const un={},Pd=[],fo=()=>{},i8=()=>!1,Rw=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),kk=e=>e.startsWith("onUpdate:"),Xn=Object.assign,Ck=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},s8=Object.prototype.hasOwnProperty,en=(e,t)=>s8.call(e,t),rt=Array.isArray,Md=e=>Am(e)==="[object Map]",Nf=e=>Am(e)==="[object Set]",bI=e=>Am(e)==="[object Date]",ht=e=>typeof e=="function",Cn=e=>typeof e=="string",Is=e=>typeof e=="symbol",an=e=>e!==null&&typeof e=="object",zF=e=>(an(e)||ht(e))&&ht(e.then)&&ht(e.catch),$F=Object.prototype.toString,Am=e=>$F.call(e),o8=e=>Am(e).slice(8,-1),HF=e=>Am(e)==="[object Object]",Ok=e=>Cn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yh=Tk(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Iw=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},a8=/-(\w)/g,xi=Iw(e=>e.replace(a8,(t,n)=>n?n.toUpperCase():"")),l8=/\B([A-Z])/g,Kl=Iw(e=>e.replace(l8,"-$1").toLowerCase()),Aw=Iw(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xh=Iw(e=>e?`on${Aw(e)}`:""),vl=(e,t)=>!Object.is(e,t),Dv=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},VF=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ky=e=>{const t=parseFloat(e);return isNaN(t)?e:t},jF=e=>{const t=Cn(e)?Number(e):NaN;return isNaN(t)?e:t};let wI;const Pw=()=>wI||(wI=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function xn(e){if(rt(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Cn(r)?f8(r):xn(r);if(i)for(const s in i)t[s]=i[s]}return t}else if(Cn(e)||an(e))return e}const u8=/;(?![^(]*\))/g,c8=/:([^]+)/,d8=/\/\*[^]*?\*\//g;function f8(e){const t={};return e.replace(d8,"").split(u8).forEach(n=>{if(n){const r=n.split(c8);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Le(e){let t="";if(Cn(e))t=e;else if(rt(e))for(let n=0;n<e.length;n++){const r=Le(e[n]);r&&(t+=r+" ")}else if(an(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Pt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Cn(t)&&(e.class=Le(t)),n&&(e.style=xn(n)),e}const h8="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",p8=Tk(h8);function UF(e){return!!e||e===""}function m8(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=lc(e[r],t[r]);return n}function lc(e,t){if(e===t)return!0;let n=bI(e),r=bI(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Is(e),r=Is(t),n||r)return e===t;if(n=rt(e),r=rt(t),n||r)return n&&r?m8(e,t):!1;if(n=an(e),r=an(t),n||r){if(!n||!r)return!1;const i=Object.keys(e).length,s=Object.keys(t).length;if(i!==s)return!1;for(const o in e){const a=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(a&&!l||!a&&l||!lc(e[o],t[o]))return!1}}return String(e)===String(t)}function Rk(e,t){return e.findIndex(n=>lc(n,t))}const WF=e=>!!(e&&e.__v_isRef===!0),ye=e=>Cn(e)?e:e==null?"":rt(e)||an(e)&&(e.toString===$F||!ht(e.toString))?WF(e)?ye(e.value):JSON.stringify(e,qF,2):String(e),qF=(e,t)=>WF(t)?qF(e,t.value):Md(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i],s)=>(n[S_(r,s)+" =>"]=i,n),{})}:Nf(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>S_(n))}:Is(t)?S_(t):an(t)&&!rt(t)&&!HF(t)?String(t):t,S_=(e,t="")=>{var n;return Is(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Xr;class GF{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xr,!t&&Xr&&(this.index=(Xr.scopes||(Xr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Xr;try{return Xr=this,t()}finally{Xr=n}}}on(){Xr=this}off(){Xr=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Pm(e){return new GF(e)}function Yl(){return Xr}function Xl(e,t=!1){Xr&&Xr.cleanups.push(e)}let vn;const x_=new WeakSet;class KF{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Xr&&Xr.active&&Xr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,x_.has(this)&&(x_.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||XF(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_I(this),JF(this);const t=vn,n=Cs;vn=this,Cs=!0;try{return this.fn()}finally{QF(this),vn=t,Cs=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Pk(t);this.deps=this.depsTail=void 0,_I(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?x_.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){e1(this)&&this.run()}get dirty(){return e1(this)}}let YF=0,Jh,Qh;function XF(e,t=!1){if(e.flags|=8,t){e.next=Qh,Qh=e;return}e.next=Jh,Jh=e}function Ik(){YF++}function Ak(){if(--YF>0)return;if(Qh){let t=Qh;for(Qh=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Jh;){let t=Jh;for(Jh=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function JF(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function QF(e){let t,n=e.depsTail,r=n;for(;r;){const i=r.prevDep;r.version===-1?(r===n&&(n=i),Pk(r),g8(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function e1(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ZF(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ZF(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Vp))return;e.globalVersion=Vp;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!e1(e)){e.flags&=-3;return}const n=vn,r=Cs;vn=e,Cs=!0;try{JF(e);const i=e.fn(e._value);(t.version===0||vl(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{vn=n,Cs=r,QF(e),e.flags&=-3}}function Pk(e,t=!1){const{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Pk(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function g8(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Cs=!0;const eB=[];function Jl(){eB.push(Cs),Cs=!1}function Ql(){const e=eB.pop();Cs=e===void 0?!0:e}function _I(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=vn;vn=void 0;try{t()}finally{vn=n}}}let Vp=0,v8=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Mw{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!vn||!Cs||vn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==vn)n=this.activeLink=new v8(vn,this),vn.deps?(n.prevDep=vn.depsTail,vn.depsTail.nextDep=n,vn.depsTail=n):vn.deps=vn.depsTail=n,tB(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=vn.depsTail,n.nextDep=void 0,vn.depsTail.nextDep=n,vn.depsTail=n,vn.deps===n&&(vn.deps=r)}return n}trigger(t){this.version++,Vp++,this.notify(t)}notify(t){Ik();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ak()}}}function tB(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)tB(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Cy=new WeakMap,Wu=Symbol(""),t1=Symbol(""),jp=Symbol("");function Nr(e,t,n){if(Cs&&vn){let r=Cy.get(e);r||Cy.set(e,r=new Map);let i=r.get(n);i||(r.set(n,i=new Mw),i.map=r,i.key=n),i.track()}}function Jo(e,t,n,r,i,s){const o=Cy.get(e);if(!o){Vp++;return}const a=l=>{l&&l.trigger()};if(Ik(),t==="clear")o.forEach(a);else{const l=rt(e),u=l&&Ok(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===jp||!Is(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(jp)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Wu)),Md(e)&&a(o.get(t1)));break;case"delete":l||(a(o.get(Wu)),Md(e)&&a(o.get(t1)));break;case"set":Md(e)&&a(o.get(Wu));break}}Ak()}function y8(e,t){const n=Cy.get(e);return n&&n.get(t)}function $c(e){const t=$t(e);return t===e?t:(Nr(t,"iterate",jp),Ji(e)?t:t.map(Lr))}function Dw(e){return Nr(e=$t(e),"iterate",jp),e}const b8={__proto__:null,[Symbol.iterator](){return E_(this,Symbol.iterator,Lr)},concat(...e){return $c(this).concat(...e.map(t=>rt(t)?$c(t):t))},entries(){return E_(this,"entries",e=>(e[1]=Lr(e[1]),e))},every(e,t){return Do(this,"every",e,t,void 0,arguments)},filter(e,t){return Do(this,"filter",e,t,n=>n.map(Lr),arguments)},find(e,t){return Do(this,"find",e,t,Lr,arguments)},findIndex(e,t){return Do(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Do(this,"findLast",e,t,Lr,arguments)},findLastIndex(e,t){return Do(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Do(this,"forEach",e,t,void 0,arguments)},includes(...e){return T_(this,"includes",e)},indexOf(...e){return T_(this,"indexOf",e)},join(e){return $c(this).join(e)},lastIndexOf(...e){return T_(this,"lastIndexOf",e)},map(e,t){return Do(this,"map",e,t,void 0,arguments)},pop(){return ch(this,"pop")},push(...e){return ch(this,"push",e)},reduce(e,...t){return SI(this,"reduce",e,t)},reduceRight(e,...t){return SI(this,"reduceRight",e,t)},shift(){return ch(this,"shift")},some(e,t){return Do(this,"some",e,t,void 0,arguments)},splice(...e){return ch(this,"splice",e)},toReversed(){return $c(this).toReversed()},toSorted(e){return $c(this).toSorted(e)},toSpliced(...e){return $c(this).toSpliced(...e)},unshift(...e){return ch(this,"unshift",e)},values(){return E_(this,"values",Lr)}};function E_(e,t,n){const r=Dw(e),i=r[t]();return r!==e&&!Ji(e)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const w8=Array.prototype;function Do(e,t,n,r,i,s){const o=Dw(e),a=o!==e&&!Ji(e),l=o[t];if(l!==w8[t]){const d=l.apply(e,s);return a?Lr(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Lr(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(o,u,r);return a&&i?i(c):c}function SI(e,t,n,r){const i=Dw(e);let s=n;return i!==e&&(Ji(e)?n.length>3&&(s=function(o,a,l){return n.call(this,o,a,l,e)}):s=function(o,a,l){return n.call(this,o,Lr(a),l,e)}),i[t](s,...r)}function T_(e,t,n){const r=$t(e);Nr(r,"iterate",jp);const i=r[t](...n);return(i===-1||i===!1)&&Mk(n[0])?(n[0]=$t(n[0]),r[t](...n)):i}function ch(e,t,n=[]){Jl(),Ik();const r=$t(e)[t].apply(e,n);return Ak(),Ql(),r}const _8=Tk("__proto__,__v_isRef,__isVue"),nB=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Is));function S8(e){Is(e)||(e=String(e));const t=$t(this);return Nr(t,"has",e),t.hasOwnProperty(e)}class rB{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(i?s?uB:lB:s?aB:oB).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=rt(t);if(!i){let l;if(o&&(l=b8[n]))return l;if(n==="hasOwnProperty")return S8}const a=Reflect.get(t,n,Jt(t)?t:r);return(Is(n)?nB.has(n):_8(n))||(i||Nr(t,"get",n),s)?a:Jt(a)?o&&Ok(n)?a:a.value:an(a)?i?Lf(a):Ca(a):a}}class iB extends rB{constructor(t=!1){super(!1,t)}set(t,n,r,i){let s=t[n];if(!this._isShallow){const l=uc(s);if(!Ji(r)&&!uc(r)&&(s=$t(s),r=$t(r)),!rt(t)&&Jt(s)&&!Jt(r))return l?!1:(s.value=r,!0)}const o=rt(t)&&Ok(n)?Number(n)<t.length:en(t,n),a=Reflect.set(t,n,r,Jt(t)?t:i);return t===$t(i)&&(o?vl(r,s)&&Jo(t,"set",n,r):Jo(t,"add",n,r)),a}deleteProperty(t,n){const r=en(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&r&&Jo(t,"delete",n,void 0),i}has(t,n){const r=Reflect.has(t,n);return(!Is(n)||!nB.has(n))&&Nr(t,"has",n),r}ownKeys(t){return Nr(t,"iterate",rt(t)?"length":Wu),Reflect.ownKeys(t)}}class sB extends rB{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const x8=new iB,E8=new sB,T8=new iB(!0),k8=new sB(!0),n1=e=>e,yg=e=>Reflect.getPrototypeOf(e);function C8(e,t,n){return function(...r){const i=this.__v_raw,s=$t(i),o=Md(s),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=i[e](...r),c=n?n1:t?r1:Lr;return!t&&Nr(s,"iterate",l?t1:Wu),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function bg(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function O8(e,t){const n={get(i){const s=this.__v_raw,o=$t(s),a=$t(i);e||(vl(i,a)&&Nr(o,"get",i),Nr(o,"get",a));const{has:l}=yg(o),u=t?n1:e?r1:Lr;if(l.call(o,i))return u(s.get(i));if(l.call(o,a))return u(s.get(a));s!==o&&s.get(i)},get size(){const i=this.__v_raw;return!e&&Nr($t(i),"iterate",Wu),Reflect.get(i,"size",i)},has(i){const s=this.__v_raw,o=$t(s),a=$t(i);return e||(vl(i,a)&&Nr(o,"has",i),Nr(o,"has",a)),i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){const o=this,a=o.__v_raw,l=$t(a),u=t?n1:e?r1:Lr;return!e&&Nr(l,"iterate",Wu),a.forEach((c,d)=>i.call(s,u(c),u(d),o))}};return Xn(n,e?{add:bg("add"),set:bg("set"),delete:bg("delete"),clear:bg("clear")}:{add(i){!t&&!Ji(i)&&!uc(i)&&(i=$t(i));const s=$t(this);return yg(s).has.call(s,i)||(s.add(i),Jo(s,"add",i,i)),this},set(i,s){!t&&!Ji(s)&&!uc(s)&&(s=$t(s));const o=$t(this),{has:a,get:l}=yg(o);let u=a.call(o,i);u||(i=$t(i),u=a.call(o,i));const c=l.call(o,i);return o.set(i,s),u?vl(s,c)&&Jo(o,"set",i,s):Jo(o,"add",i,s),this},delete(i){const s=$t(this),{has:o,get:a}=yg(s);let l=o.call(s,i);l||(i=$t(i),l=o.call(s,i)),a&&a.call(s,i);const u=s.delete(i);return l&&Jo(s,"delete",i,void 0),u},clear(){const i=$t(this),s=i.size!==0,o=i.clear();return s&&Jo(i,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=C8(i,e,t)}),n}function Nw(e,t){const n=O8(e,t);return(r,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(en(n,i)&&i in r?n:r,i,s)}const R8={get:Nw(!1,!1)},I8={get:Nw(!1,!0)},A8={get:Nw(!0,!1)},P8={get:Nw(!0,!0)},oB=new WeakMap,aB=new WeakMap,lB=new WeakMap,uB=new WeakMap;function M8(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function D8(e){return e.__v_skip||!Object.isExtensible(e)?0:M8(o8(e))}function Ca(e){return uc(e)?e:Lw(e,!1,x8,R8,oB)}function cB(e){return Lw(e,!1,T8,I8,aB)}function Lf(e){return Lw(e,!0,E8,A8,lB)}function Hc(e){return Lw(e,!0,k8,P8,uB)}function Lw(e,t,n,r,i){if(!an(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const o=D8(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function yl(e){return uc(e)?yl(e.__v_raw):!!(e&&e.__v_isReactive)}function uc(e){return!!(e&&e.__v_isReadonly)}function Ji(e){return!!(e&&e.__v_isShallow)}function Mk(e){return e?!!e.__v_raw:!1}function $t(e){const t=e&&e.__v_raw;return t?$t(t):e}function Mm(e){return!en(e,"__v_skip")&&Object.isExtensible(e)&&VF(e,"__v_skip",!0),e}const Lr=e=>an(e)?Ca(e):e,r1=e=>an(e)?Lf(e):e;function Jt(e){return e?e.__v_isRef===!0:!1}function U(e){return dB(e,!1)}function ho(e){return dB(e,!0)}function dB(e,t){return Jt(e)?e:new N8(e,t)}class N8{constructor(t,n){this.dep=new Mw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$t(t),this._value=n?t:Lr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Ji(t)||uc(t);t=r?t:$t(t),vl(t,n)&&(this._rawValue=t,this._value=r?t:Lr(t),this.dep.trigger())}}function y(e){return Jt(e)?e.value:e}function rr(e){return ht(e)?e():y(e)}const L8={get:(e,t,n)=>t==="__v_raw"?e:y(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Jt(i)&&!Jt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function fB(e){return yl(e)?e:new Proxy(e,L8)}class F8{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Mw,{get:r,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Dk(e){return new F8(e)}function fn(e){const t=rt(e)?new Array(e.length):{};for(const n in e)t[n]=pB(e,n);return t}class B8{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return y8($t(this._object),this._key)}}class z8{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function hB(e,t,n){return Jt(e)?e:ht(e)?new z8(e):an(e)&&arguments.length>1?pB(e,t,n):U(e)}function pB(e,t,n){const r=e[t];return Jt(r)?r:new B8(e,t,n)}class $8{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Mw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Vp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&vn!==this)return XF(this,!0),!0}get value(){const t=this.dep.track();return ZF(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function H8(e,t,n=!1){let r,i;return ht(e)?r=e:(r=e.get,i=e.set),new $8(r,i,n)}const wg={},Oy=new WeakMap;let xu;function V8(e,t=!1,n=xu){if(n){let r=Oy.get(n);r||Oy.set(n,r=[]),r.push(e)}}function j8(e,t,n=un){const{immediate:r,deep:i,once:s,scheduler:o,augmentJob:a,call:l}=n,u=_=>i?_:Ji(_)||i===!1||i===0?Qo(_,1):Qo(_);let c,d,f,h,p=!1,m=!1;if(Jt(e)?(d=()=>e.value,p=Ji(e)):yl(e)?(d=()=>u(e),p=!0):rt(e)?(m=!0,p=e.some(_=>yl(_)||Ji(_)),d=()=>e.map(_=>{if(Jt(_))return _.value;if(yl(_))return u(_);if(ht(_))return l?l(_,2):_()})):ht(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Jl();try{f()}finally{Ql()}}const _=xu;xu=c;try{return l?l(e,3,[h]):e(h)}finally{xu=_}}:d=fo,t&&i){const _=d,x=i===!0?1/0:i;d=()=>Qo(_(),x)}const g=Yl(),v=()=>{c.stop(),g&&g.active&&Ck(g.effects,c)};if(s&&t){const _=t;t=(...x)=>{_(...x),v()}}let w=m?new Array(e.length).fill(wg):wg;const b=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const x=c.run();if(i||p||(m?x.some((S,I)=>vl(S,w[I])):vl(x,w))){f&&f();const S=xu;xu=c;try{const I=[x,w===wg?void 0:m&&w[0]===wg?[]:w,h];l?l(t,3,I):t(...I),w=x}finally{xu=S}}}else c.run()};return a&&a(b),c=new KF(d),c.scheduler=o?()=>o(b,!1):b,h=_=>V8(_,!1,c),f=c.onStop=()=>{const _=Oy.get(c);if(_){if(l)l(_,4);else for(const x of _)x();Oy.delete(c)}},t?r?b(!0):w=c.run():o?o(b.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Qo(e,t=1/0,n){if(t<=0||!an(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Jt(e))Qo(e.value,t,n);else if(rt(e))for(let r=0;r<e.length;r++)Qo(e[r],t,n);else if(Nf(e)||Md(e))e.forEach(r=>{Qo(r,t,n)});else if(HF(e)){for(const r in e)Qo(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Qo(e[r],t,n)}return e}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Dm(e,t,n,r){try{return r?e(...r):e()}catch(i){Nm(i,t,n)}}function As(e,t,n,r){if(ht(e)){const i=Dm(e,t,n,r);return i&&zF(i)&&i.catch(s=>{Nm(s,t,n)}),i}if(rt(e)){const i=[];for(let s=0;s<e.length;s++)i.push(As(e[s],t,n,r));return i}}function Nm(e,t,n,r=!0){const i=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||un;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(s){Jl(),Dm(s,null,10,[e,l,u]),Ql();return}}U8(e,n,i,r,o)}function U8(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}const Qr=[];let Ys=-1;const Dd=[];let qa=null,ed=0;const mB=Promise.resolve();let Ry=null;function vt(e){const t=Ry||mB;return e?t.then(this?e.bind(this):e):t}function W8(e){let t=Ys+1,n=Qr.length;for(;t<n;){const r=t+n>>>1,i=Qr[r],s=Up(i);s<e||s===e&&i.flags&2?t=r+1:n=r}return t}function Nk(e){if(!(e.flags&1)){const t=Up(e),n=Qr[Qr.length-1];!n||!(e.flags&2)&&t>=Up(n)?Qr.push(e):Qr.splice(W8(t),0,e),e.flags|=1,gB()}}function gB(){Ry||(Ry=mB.then(yB))}function i1(e){rt(e)?Dd.push(...e):qa&&e.id===-1?qa.splice(ed+1,0,e):e.flags&1||(Dd.push(e),e.flags|=1),gB()}function xI(e,t,n=Ys+1){for(;n<Qr.length;n++){const r=Qr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Qr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function vB(e){if(Dd.length){const t=[...new Set(Dd)].sort((n,r)=>Up(n)-Up(r));if(Dd.length=0,qa){qa.push(...t);return}for(qa=t,ed=0;ed<qa.length;ed++){const n=qa[ed];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}qa=null,ed=0}}const Up=e=>e.id==null?e.flags&2?-1:1/0:e.id;function yB(e){try{for(Ys=0;Ys<Qr.length;Ys++){const t=Qr[Ys];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Dm(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ys<Qr.length;Ys++){const t=Qr[Ys];t&&(t.flags&=-2)}Ys=-1,Qr.length=0,vB(),Ry=null,(Qr.length||Dd.length)&&yB()}}let tr=null,bB=null;function Iy(e){const t=tr;return tr=e,bB=e&&e.type.__scopeId||null,t}function H(e,t=tr,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&FI(-1);const s=Iy(t);let o;try{o=e(...i)}finally{Iy(s),r._d&&FI(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function At(e,t){if(tr===null)return e;const n=Vw(tr),r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[s,o,a,l=un]=t[i];s&&(ht(s)&&(s={mounted:s,updated:s}),s.deep&&Qo(o),r.push({dir:s,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function pu(e,t,n,r){const i=e.dirs,s=t&&t.dirs;for(let o=0;o<i.length;o++){const a=i[o];s&&(a.oldValue=s[o].value);let l=a.dir[r];l&&(Jl(),As(l,n,8,[e.el,a,e,t]),Ql())}}const wB=Symbol("_vte"),_B=e=>e.__isTeleport,Zh=e=>e&&(e.disabled||e.disabled===""),EI=e=>e&&(e.defer||e.defer===""),TI=e=>typeof SVGElement<"u"&&e instanceof SVGElement,kI=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,s1=(e,t)=>{const n=e&&e.to;return Cn(n)?t?t(n):null:n},SB={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,s,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:m,createComment:g}}=u,v=Zh(t.props);let{shapeFlag:w,children:b,dynamicChildren:_}=t;if(e==null){const x=t.el=m(""),S=t.anchor=m("");h(x,n,r),h(S,n,r);const I=(R,O)=>{w&16&&(i&&i.isCE&&(i.ce._teleportTarget=R),c(b,R,O,i,s,o,a,l))},P=()=>{const R=t.target=s1(t.props,p),O=xB(R,t,m,h);R&&(o!=="svg"&&TI(R)?o="svg":o!=="mathml"&&kI(R)&&(o="mathml"),v||(I(R,O),Nv(t,!1)))};v&&(I(n,S),Nv(t,!0)),EI(t.props)?Yr(()=>{P(),t.el.__isMounted=!0},s):P()}else{if(EI(t.props)&&!e.el.__isMounted){Yr(()=>{SB.process(e,t,n,r,i,s,o,a,l,u),delete e.el.__isMounted},s);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,S=t.target=e.target,I=t.targetAnchor=e.targetAnchor,P=Zh(e.props),R=P?n:S,O=P?x:I;if(o==="svg"||TI(S)?o="svg":(o==="mathml"||kI(S))&&(o="mathml"),_?(f(e.dynamicChildren,_,R,i,s,o,a),$k(e,t,!0)):l||d(e,t,R,O,i,s,o,a,!1),v)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):_g(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=s1(t.props,p);M&&_g(t,M,null,u,0)}else P&&_g(t,S,I,u,1);Nv(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},s){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(i(u),i(c)),s&&i(l),o&16){const h=s||!Zh(f);for(let p=0;p<a.length;p++){const m=a[p];r(m,t,n,h,!!m.dynamicChildren)}}},move:_g,hydrate:q8};function _g(e,t,n,{o:{insert:r},m:i},s=2){s===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=s===2;if(d&&r(o,t,n),(!d||Zh(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],t,n,2);d&&r(a,t,n)}function q8(e,t,n,r,i,s,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=s1(t.props,l);if(f){const h=Zh(t.props),p=f._lpa||f.firstChild;if(t.shapeFlag&16)if(h)t.anchor=d(o(e),t,a(e),n,r,i,s),t.targetStart=p,t.targetAnchor=p&&o(p);else{t.anchor=o(e);let m=p;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}t.targetAnchor||xB(f,t,c,u),d(p&&o(p),t,f,n,r,i,s)}Nv(t,h)}return t.anchor&&o(t.anchor)}const Ff=SB;function Nv(e,t){const n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function xB(e,t,n,r){const i=t.targetStart=n(""),s=t.targetAnchor=n("");return i[wB]=s,e&&(r(i,e),r(s,e)),s}const Ga=Symbol("_leaveCb"),Sg=Symbol("_enterCb");function G8(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nt(()=>{e.isMounted=!0}),yr(()=>{e.isUnmounting=!0}),e}const $i=[Function,Array],EB={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:$i,onEnter:$i,onAfterEnter:$i,onEnterCancelled:$i,onBeforeLeave:$i,onLeave:$i,onAfterLeave:$i,onLeaveCancelled:$i,onBeforeAppear:$i,onAppear:$i,onAfterAppear:$i,onAppearCancelled:$i},TB=e=>{const t=e.subTree;return t.component?TB(t.component):t},K8={name:"BaseTransition",props:EB,setup(e,{slots:t}){const n=Jn(),r=G8();return()=>{const i=t.default&&OB(t.default(),!0);if(!i||!i.length)return;const s=kB(i),o=$t(e),{mode:a}=o;if(r.isLeaving)return k_(s);const l=CI(s);if(!l)return k_(s);let u=o1(l,o,r,n,d=>u=d);l.type!==er&&Wp(l,u);let c=n.subTree&&CI(n.subTree);if(c&&c.type!==er&&!io(l,c)&&TB(n).type!==er){let d=o1(c,o,r,n);if(Wp(c,d),a==="out-in"&&l.type!==er)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},k_(s);a==="in-out"&&l.type!==er?d.delayLeave=(f,h,p)=>{const m=CB(r,c);m[String(c.key)]=c,f[Ga]=()=>{h(),f[Ga]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{p(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function kB(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==er){t=n;break}}return t}const Y8=K8;function CB(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function o1(e,t,n,r,i){const{appear:s,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:w,onAppearCancelled:b}=t,_=String(e.key),x=CB(n,e),S=(R,O)=>{R&&As(R,r,9,O)},I=(R,O)=>{const M=O[1];S(R,O),rt(R)?R.every(E=>E.length<=1)&&M():R.length<=1&&M()},P={mode:o,persisted:a,beforeEnter(R){let O=l;if(!n.isMounted)if(s)O=g||l;else return;R[Ga]&&R[Ga](!0);const M=x[_];M&&io(e,M)&&M.el[Ga]&&M.el[Ga](),S(O,[R])},enter(R){let O=u,M=c,E=d;if(!n.isMounted)if(s)O=v||u,M=w||c,E=b||d;else return;let L=!1;const j=R[Sg]=F=>{L||(L=!0,F?S(E,[R]):S(M,[R]),P.delayedLeave&&P.delayedLeave(),R[Sg]=void 0)};O?I(O,[R,j]):j()},leave(R,O){const M=String(e.key);if(R[Sg]&&R[Sg](!0),n.isUnmounting)return O();S(f,[R]);let E=!1;const L=R[Ga]=j=>{E||(E=!0,O(),j?S(m,[R]):S(p,[R]),R[Ga]=void 0,x[M]===e&&delete x[M])};x[M]=e,h?I(h,[R,L]):L()},clone(R){const O=o1(R,t,n,r,i);return i&&i(O),O}};return P}function k_(e){if(Fw(e))return e=yo(e),e.children=null,e}function CI(e){if(!Fw(e))return _B(e.type)&&e.children?kB(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ht(n.default))return n.default()}}function Wp(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Wp(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function OB(e,t=!1,n){let r=[],i=0;for(let s=0;s<e.length;s++){let o=e[s];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:s);o.type===je?(o.patchFlag&128&&i++,r=r.concat(OB(o.children,t,a))):(t||o.type!==er)&&r.push(a!=null?yo(o,{key:a}):o)}if(i>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function ee(e,t){return ht(e)?Xn({name:e.name},t,{setup:e}):e}function RB(){const e=Jn();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function IB(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ay(e,t,n,r,i=!1){if(rt(e)){e.forEach((p,m)=>Ay(p,t&&(rt(t)?t[m]:t),n,r,i));return}if(Nd(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ay(e,t,n,r.component.subTree);return}const s=r.shapeFlag&4?Vw(r.component):r.el,o=i?null:s,{i:a,r:l}=e,u=t&&t.r,c=a.refs===un?a.refs={}:a.refs,d=a.setupState,f=$t(d),h=d===un?()=>!1:p=>en(f,p);if(u!=null&&u!==l&&(Cn(u)?(c[u]=null,h(u)&&(d[u]=null)):Jt(u)&&(u.value=null)),ht(l))Dm(l,a,12,[o,c]);else{const p=Cn(l),m=Jt(l);if(p||m){const g=()=>{if(e.f){const v=p?h(l)?d[l]:c[l]:l.value;i?rt(v)&&Ck(v,s):rt(v)?v.includes(s)||v.push(s):p?(c[l]=[s],h(l)&&(d[l]=c[l])):(l.value=[s],e.k&&(c[e.k]=l.value))}else p?(c[l]=o,h(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};o?(g.id=-1,Yr(g,n)):g()}}}Pw().requestIdleCallback;Pw().cancelIdleCallback;const Nd=e=>!!e.type.__asyncLoader,Fw=e=>e.type.__isKeepAlive;function Lk(e,t){AB(e,"a",t)}function Fk(e,t){AB(e,"da",t)}function AB(e,t,n=hr){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Bw(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Fw(i.parent.vnode)&&X8(r,t,n,i),i=i.parent}}function X8(e,t,n,r){const i=Bw(t,e,r,!0);On(()=>{Ck(r[t],i)},n)}function Bw(e,t,n=hr,r=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{Jl();const a=Fm(n),l=As(t,n,e,o);return a(),Ql(),l});return r?i.unshift(s):i.push(s),s}}const Oa=e=>(t,n=hr)=>{(!Gp||e==="sp")&&Bw(e,(...r)=>t(...r),n)},PB=Oa("bm"),nt=Oa("m"),MB=Oa("bu"),DB=Oa("u"),yr=Oa("bum"),On=Oa("um"),NB=Oa("sp"),LB=Oa("rtg"),J8=Oa("rtc");function Q8(e,t=hr){Bw("ec",e,t)}const FB="components";function En(e,t){return zB(FB,e,!0,t)||e}const BB=Symbol.for("v-ndc");function Rr(e){return Cn(e)?zB(FB,e,!1)||e:e||BB}function zB(e,t,n=!0,r=!1){const i=tr||hr;if(i){const s=i.type;{const a=U9(s,!1);if(a&&(a===t||a===xi(t)||a===Aw(xi(t))))return s}const o=OI(i[e]||s[e],t)||OI(i.appContext[e],t);return!o&&r?s:o}}function OI(e,t){return e&&(e[t]||e[xi(t)]||e[Aw(xi(t))])}function Ot(e,t,n,r){let i;const s=n,o=rt(e);if(o||Cn(e)){const a=o&&yl(e);let l=!1;a&&(l=!Ji(e),e=Dw(e)),i=new Array(e.length);for(let u=0,c=e.length;u<c;u++)i[u]=t(l?Lr(e[u]):e[u],u,void 0,s)}else if(typeof e=="number"){i=new Array(e);for(let a=0;a<e;a++)i[a]=t(a+1,a,void 0,s)}else if(an(e))if(e[Symbol.iterator])i=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);i=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];i[l]=t(e[c],c,l,s)}}else i=[];return i}function ce(e,t,n={},r,i){if(tr.ce||tr.parent&&Nd(tr.parent)&&tr.parent.ce)return t!=="default"&&(n.name=t),k(),X(je,null,[$("slot",n,r&&r())],64);let s=e[t];s&&s._c&&(s._d=!1),k();const o=s&&$B(s(n)),a=n.key||o&&o.key,l=X(je,{key:(a&&!Is(a)?a:`_${t}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function $B(e){return e.some(t=>cc(t)?!(t.type===er||t.type===je&&!$B(t.children)):!0)?e:null}function Z8(e,t){const n={};for(const r in e)n[Xh(r)]=e[r];return n}const a1=e=>e?uz(e)?Vw(e):a1(e.parent):null,ep=Xn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>a1(e.parent),$root:e=>a1(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Bk(e),$forceUpdate:e=>e.f||(e.f=()=>{Nk(e.update)}),$nextTick:e=>e.n||(e.n=vt.bind(e.proxy)),$watch:e=>S9.bind(e)}),C_=(e,t)=>e!==un&&!e.__isScriptSetup&&en(e,t),e9={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:i,props:s,accessCache:o,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(C_(r,t))return o[t]=1,r[t];if(i!==un&&en(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&en(u,t))return o[t]=3,s[t];if(n!==un&&en(n,t))return o[t]=4,n[t];u1&&(o[t]=0)}}const c=ep[t];let d,f;if(c)return t==="$attrs"&&Nr(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==un&&en(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,en(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return C_(i,t)?(i[t]=n,!0):r!==un&&en(r,t)?(r[t]=n,!0):en(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},o){let a;return!!n[o]||e!==un&&en(e,o)||C_(t,o)||(a=s[0])&&en(a,o)||en(r,o)||en(ep,o)||en(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:en(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function HB(){return VB().slots}function t9(){return VB().attrs}function VB(){const e=Jn();return e.setupContext||(e.setupContext=dz(e))}function l1(e){return rt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function jB(e,t){const n=l1(e);for(const r in t){if(r.startsWith("__skip"))continue;let i=n[r];i?rt(i)||ht(i)?i=n[r]={type:i,default:t[r]}:i.default=t[r]:i===null&&(i=n[r]={default:t[r]}),i&&t[`__skip_${r}`]&&(i.skipFactory=!0)}return n}let u1=!0;function n9(e){const t=Bk(e),n=e.proxy,r=e.ctx;u1=!1,t.beforeCreate&&RI(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:w,destroyed:b,unmounted:_,render:x,renderTracked:S,renderTriggered:I,errorCaptured:P,serverPrefetch:R,expose:O,inheritAttrs:M,components:E,directives:L,filters:j}=t;if(u&&r9(u,r,null),o)for(const Y in o){const Z=o[Y];ht(Z)&&(r[Y]=Z.bind(n))}if(i){const Y=i.call(n,n);an(Y)&&(e.data=Ca(Y))}if(u1=!0,s)for(const Y in s){const Z=s[Y],ne=ht(Z)?Z.bind(n,n):ht(Z.get)?Z.get.bind(n,n):fo,oe=!ht(Z)&&ht(Z.set)?Z.set.bind(n):fo,le=te({get:ne,set:oe});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>le.value,set:Ee=>le.value=Ee})}if(a)for(const Y in a)UB(a[Y],r,n,Y);if(l){const Y=ht(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(Z=>{Yn(Z,Y[Z])})}c&&RI(c,e,"c");function B(Y,Z){rt(Z)?Z.forEach(ne=>Y(ne.bind(n))):Z&&Y(Z.bind(n))}if(B(PB,d),B(nt,f),B(MB,h),B(DB,p),B(Lk,m),B(Fk,g),B(Q8,P),B(J8,S),B(LB,I),B(yr,w),B(On,_),B(NB,R),rt(O))if(O.length){const Y=e.exposed||(e.exposed={});O.forEach(Z=>{Object.defineProperty(Y,Z,{get:()=>n[Z],set:ne=>n[Z]=ne})})}else e.exposed||(e.exposed={});x&&e.render===fo&&(e.render=x),M!=null&&(e.inheritAttrs=M),E&&(e.components=E),L&&(e.directives=L),R&&IB(e)}function r9(e,t,n=fo){rt(e)&&(e=c1(e));for(const r in e){const i=e[r];let s;an(i)?"default"in i?s=Lt(i.from||r,i.default,!0):s=Lt(i.from||r):s=Lt(i),Jt(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):t[r]=s}}function RI(e,t,n){As(rt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function UB(e,t,n,r){let i=r.includes(".")?nz(n,r):()=>n[r];if(Cn(e)){const s=t[e];ht(s)&&He(i,s)}else if(ht(e))He(i,e.bind(n));else if(an(e))if(rt(e))e.forEach(s=>UB(s,t,n,r));else{const s=ht(e.handler)?e.handler.bind(n):t[e.handler];ht(s)&&He(i,s,e)}}function Bk(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(t);let l;return a?l=a:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Py(l,u,o,!0)),Py(l,t,o)),an(t)&&s.set(t,l),l}function Py(e,t,n,r=!1){const{mixins:i,extends:s}=t;s&&Py(e,s,n,!0),i&&i.forEach(o=>Py(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=i9[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const i9={data:II,props:AI,emits:AI,methods:Lh,computed:Lh,beforeCreate:Gr,created:Gr,beforeMount:Gr,mounted:Gr,beforeUpdate:Gr,updated:Gr,beforeDestroy:Gr,beforeUnmount:Gr,destroyed:Gr,unmounted:Gr,activated:Gr,deactivated:Gr,errorCaptured:Gr,serverPrefetch:Gr,components:Lh,directives:Lh,watch:o9,provide:II,inject:s9};function II(e,t){return t?e?function(){return Xn(ht(e)?e.call(this,this):e,ht(t)?t.call(this,this):t)}:t:e}function s9(e,t){return Lh(c1(e),c1(t))}function c1(e){if(rt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Gr(e,t){return e?[...new Set([].concat(e,t))]:t}function Lh(e,t){return e?Xn(Object.create(null),e,t):t}function AI(e,t){return e?rt(e)&&rt(t)?[...new Set([...e,...t])]:Xn(Object.create(null),l1(e),l1(t??{})):t}function o9(e,t){if(!e)return t;if(!t)return e;const n=Xn(Object.create(null),e);for(const r in t)n[r]=Gr(e[r],t[r]);return n}function WB(){return{app:null,config:{isNativeTag:i8,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let a9=0;function l9(e,t){return function(r,i=null){ht(r)||(r=Xn({},r)),i!=null&&!an(i)&&(i=null);const s=WB(),o=new WeakSet,a=[];let l=!1;const u=s.app={_uid:a9++,_component:r,_props:i,_container:null,_context:s,_instance:null,version:jw,get config(){return s.config},set config(c){},use(c,...d){return o.has(c)||(c&&ht(c.install)?(o.add(c),c.install(u,...d)):ht(c)&&(o.add(c),c(u,...d))),u},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),u},component(c,d){return d?(s.components[c]=d,u):s.components[c]},directive(c,d){return d?(s.directives[c]=d,u):s.directives[c]},mount(c,d,f){if(!l){const h=u._ceVNode||$(r,i);return h.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,Vw(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(As(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return s.provides[c]=d,u},runWithContext(c){const d=qu;qu=u;try{return c()}finally{qu=d}}};return u}}let qu=null;function Yn(e,t){if(hr){let n=hr.provides;const r=hr.parent&&hr.parent.provides;r===n&&(n=hr.provides=Object.create(r)),n[e]=t}}function Lt(e,t,n=!1){const r=hr||tr;if(r||qu){const i=qu?qu._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&ht(t)?t.call(r&&r.proxy):t}}function zw(){return!!(hr||tr||qu)}const qB={},GB=()=>Object.create(qB),KB=e=>Object.getPrototypeOf(e)===qB;function u9(e,t,n,r=!1){const i={},s=GB();e.propsDefaults=Object.create(null),YB(e,t,i,s);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);n?e.props=r?i:cB(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function c9(e,t,n,r){const{props:i,attrs:s,vnode:{patchFlag:o}}=e,a=$t(i),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Hw(e.emitsOptions,f))continue;const h=t[f];if(l)if(en(s,f))h!==s[f]&&(s[f]=h,u=!0);else{const p=xi(f);i[p]=d1(l,a,p,h,e,!1)}else h!==s[f]&&(s[f]=h,u=!0)}}}else{YB(e,t,i,s)&&(u=!0);let c;for(const d in a)(!t||!en(t,d)&&((c=Kl(d))===d||!en(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=d1(l,a,d,void 0,e,!0)):delete i[d]);if(s!==a)for(const d in s)(!t||!en(t,d))&&(delete s[d],u=!0)}u&&Jo(e.attrs,"set","")}function YB(e,t,n,r){const[i,s]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Yh(l))continue;const u=t[l];let c;i&&en(i,c=xi(l))?!s||!s.includes(c)?n[c]=u:(a||(a={}))[c]=u:Hw(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(s){const l=$t(n),u=a||un;for(let c=0;c<s.length;c++){const d=s[c];n[d]=d1(i,l,d,u[d],e,!en(u,d))}}return o}function d1(e,t,n,r,i,s){const o=e[n];if(o!=null){const a=en(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&ht(l)){const{propsDefaults:u}=i;if(n in u)r=u[n];else{const c=Fm(i);r=u[n]=l.call(null,t),c()}}else r=l;i.ce&&i.ce._setProp(n,r)}o[0]&&(s&&!a?r=!1:o[1]&&(r===""||r===Kl(n))&&(r=!0))}return r}const d9=new WeakMap;function XB(e,t,n=!1){const r=n?d9:t.propsCache,i=r.get(e);if(i)return i;const s=e.props,o={},a=[];let l=!1;if(!ht(e)){const c=d=>{l=!0;const[f,h]=XB(d,t,!0);Xn(o,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!l)return an(e)&&r.set(e,Pd),Pd;if(rt(s))for(let c=0;c<s.length;c++){const d=xi(s[c]);PI(d)&&(o[d]=un)}else if(s)for(const c in s){const d=xi(c);if(PI(d)){const f=s[c],h=o[d]=rt(f)||ht(f)?{type:f}:Xn({},f),p=h.type;let m=!1,g=!0;if(rt(p))for(let v=0;v<p.length;++v){const w=p[v],b=ht(w)&&w.name;if(b==="Boolean"){m=!0;break}else b==="String"&&(g=!1)}else m=ht(p)&&p.name==="Boolean";h[0]=m,h[1]=g,(m||en(h,"default"))&&a.push(d)}}const u=[o,a];return an(e)&&r.set(e,u),u}function PI(e){return e[0]!=="$"&&!Yh(e)}const JB=e=>e[0]==="_"||e==="$stable",zk=e=>rt(e)?e.map(ys):[ys(e)],f9=(e,t,n)=>{if(t._n)return t;const r=H((...i)=>zk(t(...i)),n);return r._c=!1,r},QB=(e,t,n)=>{const r=e._ctx;for(const i in e){if(JB(i))continue;const s=e[i];if(ht(s))t[i]=f9(i,s,r);else if(s!=null){const o=zk(s);t[i]=()=>o}}},ZB=(e,t)=>{const n=zk(t);e.slots.default=()=>n},ez=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},h9=(e,t,n)=>{const r=e.slots=GB();if(e.vnode.shapeFlag&32){const i=t._;i?(ez(r,t,n),n&&VF(r,"_",i,!0)):QB(t,r)}else t&&ZB(e,t)},p9=(e,t,n)=>{const{vnode:r,slots:i}=e;let s=!0,o=un;if(r.shapeFlag&32){const a=t._;a?n&&a===1?s=!1:ez(i,t,n):(s=!t.$stable,QB(t,i)),o=t}else t&&(ZB(e,t),o={default:1});if(s)for(const a in i)!JB(a)&&o[a]==null&&delete i[a]},Yr=N9;function m9(e){return g9(e)}function g9(e,t){const n=Pw();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=fo,insertStaticContent:p}=e,m=(Q,J,ae,we=null,be=null,T=null,V=void 0,ie=null,ue=!!J.dynamicChildren)=>{if(Q===J)return;Q&&!io(Q,J)&&(we=me(Q),Ee(Q,be,T,!0),Q=null),J.patchFlag===-2&&(ue=!1,J.dynamicChildren=null);const{type:he,ref:Se,shapeFlag:de}=J;switch(he){case Lm:g(Q,J,ae,we);break;case er:v(Q,J,ae,we);break;case R_:Q==null&&w(J,ae,we,V);break;case je:E(Q,J,ae,we,be,T,V,ie,ue);break;default:de&1?x(Q,J,ae,we,be,T,V,ie,ue):de&6?L(Q,J,ae,we,be,T,V,ie,ue):(de&64||de&128)&&he.process(Q,J,ae,we,be,T,V,ie,ue,Ie)}Se!=null&&be&&Ay(Se,Q&&Q.ref,T,J||Q,!J)},g=(Q,J,ae,we)=>{if(Q==null)r(J.el=a(J.children),ae,we);else{const be=J.el=Q.el;J.children!==Q.children&&u(be,J.children)}},v=(Q,J,ae,we)=>{Q==null?r(J.el=l(J.children||""),ae,we):J.el=Q.el},w=(Q,J,ae,we)=>{[Q.el,Q.anchor]=p(Q.children,J,ae,we,Q.el,Q.anchor)},b=({el:Q,anchor:J},ae,we)=>{let be;for(;Q&&Q!==J;)be=f(Q),r(Q,ae,we),Q=be;r(J,ae,we)},_=({el:Q,anchor:J})=>{let ae;for(;Q&&Q!==J;)ae=f(Q),i(Q),Q=ae;i(J)},x=(Q,J,ae,we,be,T,V,ie,ue)=>{J.type==="svg"?V="svg":J.type==="math"&&(V="mathml"),Q==null?S(J,ae,we,be,T,V,ie,ue):R(Q,J,be,T,V,ie,ue)},S=(Q,J,ae,we,be,T,V,ie)=>{let ue,he;const{props:Se,shapeFlag:de,transition:Pe,dirs:Ce}=Q;if(ue=Q.el=o(Q.type,T,Se&&Se.is,Se),de&8?c(ue,Q.children):de&16&&P(Q.children,ue,null,we,be,O_(Q,T),V,ie),Ce&&pu(Q,null,we,"created"),I(ue,Q,Q.scopeId,V,we),Se){for(const pe in Se)pe!=="value"&&!Yh(pe)&&s(ue,pe,null,Se[pe],T,we);"value"in Se&&s(ue,"value",null,Se.value,T),(he=Se.onVnodeBeforeMount)&&Ws(he,we,Q)}Ce&&pu(Q,null,we,"beforeMount");const re=v9(be,Pe);re&&Pe.beforeEnter(ue),r(ue,J,ae),((he=Se&&Se.onVnodeMounted)||re||Ce)&&Yr(()=>{he&&Ws(he,we,Q),re&&Pe.enter(ue),Ce&&pu(Q,null,we,"mounted")},be)},I=(Q,J,ae,we,be)=>{if(ae&&h(Q,ae),we)for(let T=0;T<we.length;T++)h(Q,we[T]);if(be){let T=be.subTree;if(J===T||iz(T.type)&&(T.ssContent===J||T.ssFallback===J)){const V=be.vnode;I(Q,V,V.scopeId,V.slotScopeIds,be.parent)}}},P=(Q,J,ae,we,be,T,V,ie,ue=0)=>{for(let he=ue;he<Q.length;he++){const Se=Q[he]=ie?Ka(Q[he]):ys(Q[he]);m(null,Se,J,ae,we,be,T,V,ie)}},R=(Q,J,ae,we,be,T,V)=>{const ie=J.el=Q.el;let{patchFlag:ue,dynamicChildren:he,dirs:Se}=J;ue|=Q.patchFlag&16;const de=Q.props||un,Pe=J.props||un;let Ce;if(ae&&mu(ae,!1),(Ce=Pe.onVnodeBeforeUpdate)&&Ws(Ce,ae,J,Q),Se&&pu(J,Q,ae,"beforeUpdate"),ae&&mu(ae,!0),(de.innerHTML&&Pe.innerHTML==null||de.textContent&&Pe.textContent==null)&&c(ie,""),he?O(Q.dynamicChildren,he,ie,ae,we,O_(J,be),T):V||Z(Q,J,ie,null,ae,we,O_(J,be),T,!1),ue>0){if(ue&16)M(ie,de,Pe,ae,be);else if(ue&2&&de.class!==Pe.class&&s(ie,"class",null,Pe.class,be),ue&4&&s(ie,"style",de.style,Pe.style,be),ue&8){const re=J.dynamicProps;for(let pe=0;pe<re.length;pe++){const De=re[pe],N=de[De],D=Pe[De];(D!==N||De==="value")&&s(ie,De,N,D,be,ae)}}ue&1&&Q.children!==J.children&&c(ie,J.children)}else!V&&he==null&&M(ie,de,Pe,ae,be);((Ce=Pe.onVnodeUpdated)||Se)&&Yr(()=>{Ce&&Ws(Ce,ae,J,Q),Se&&pu(J,Q,ae,"updated")},we)},O=(Q,J,ae,we,be,T,V)=>{for(let ie=0;ie<J.length;ie++){const ue=Q[ie],he=J[ie],Se=ue.el&&(ue.type===je||!io(ue,he)||ue.shapeFlag&70)?d(ue.el):ae;m(ue,he,Se,null,we,be,T,V,!0)}},M=(Q,J,ae,we,be)=>{if(J!==ae){if(J!==un)for(const T in J)!Yh(T)&&!(T in ae)&&s(Q,T,J[T],null,be,we);for(const T in ae){if(Yh(T))continue;const V=ae[T],ie=J[T];V!==ie&&T!=="value"&&s(Q,T,ie,V,be,we)}"value"in ae&&s(Q,"value",J.value,ae.value,be)}},E=(Q,J,ae,we,be,T,V,ie,ue)=>{const he=J.el=Q?Q.el:a(""),Se=J.anchor=Q?Q.anchor:a("");let{patchFlag:de,dynamicChildren:Pe,slotScopeIds:Ce}=J;Ce&&(ie=ie?ie.concat(Ce):Ce),Q==null?(r(he,ae,we),r(Se,ae,we),P(J.children||[],ae,Se,be,T,V,ie,ue)):de>0&&de&64&&Pe&&Q.dynamicChildren?(O(Q.dynamicChildren,Pe,ae,be,T,V,ie),(J.key!=null||be&&J===be.subTree)&&$k(Q,J,!0)):Z(Q,J,ae,Se,be,T,V,ie,ue)},L=(Q,J,ae,we,be,T,V,ie,ue)=>{J.slotScopeIds=ie,Q==null?J.shapeFlag&512?be.ctx.activate(J,ae,we,V,ue):j(J,ae,we,be,T,V,ue):F(Q,J,ue)},j=(Q,J,ae,we,be,T,V)=>{const ie=Q.component=$9(Q,we,be);if(Fw(Q)&&(ie.ctx.renderer=Ie),H9(ie,!1,V),ie.asyncDep){if(be&&be.registerDep(ie,B,V),!Q.el){const ue=ie.subTree=$(er);v(null,ue,J,ae)}}else B(ie,Q,J,ae,be,T,V)},F=(Q,J,ae)=>{const we=J.component=Q.component;if(O9(Q,J,ae))if(we.asyncDep&&!we.asyncResolved){Y(we,J,ae);return}else we.next=J,we.update();else J.el=Q.el,we.vnode=J},B=(Q,J,ae,we,be,T,V)=>{const ie=()=>{if(Q.isMounted){let{next:de,bu:Pe,u:Ce,parent:re,vnode:pe}=Q;{const C=tz(Q);if(C){de&&(de.el=pe.el,Y(Q,de,V)),C.asyncDep.then(()=>{Q.isUnmounted||ie()});return}}let De=de,N;mu(Q,!1),de?(de.el=pe.el,Y(Q,de,V)):de=pe,Pe&&Dv(Pe),(N=de.props&&de.props.onVnodeBeforeUpdate)&&Ws(N,re,de,pe),mu(Q,!0);const D=DI(Q),q=Q.subTree;Q.subTree=D,m(q,D,d(q.el),me(q),Q,be,T),de.el=D.el,De===null&&Hk(Q,D.el),Ce&&Yr(Ce,be),(N=de.props&&de.props.onVnodeUpdated)&&Yr(()=>Ws(N,re,de,pe),be)}else{let de;const{el:Pe,props:Ce}=J,{bm:re,m:pe,parent:De,root:N,type:D}=Q,q=Nd(J);mu(Q,!1),re&&Dv(re),!q&&(de=Ce&&Ce.onVnodeBeforeMount)&&Ws(de,De,J),mu(Q,!0);{N.ce&&N.ce._injectChildStyle(D);const C=Q.subTree=DI(Q);m(null,C,ae,we,Q,be,T),J.el=C.el}if(pe&&Yr(pe,be),!q&&(de=Ce&&Ce.onVnodeMounted)){const C=J;Yr(()=>Ws(de,De,C),be)}(J.shapeFlag&256||De&&Nd(De.vnode)&&De.vnode.shapeFlag&256)&&Q.a&&Yr(Q.a,be),Q.isMounted=!0,J=ae=we=null}};Q.scope.on();const ue=Q.effect=new KF(ie);Q.scope.off();const he=Q.update=ue.run.bind(ue),Se=Q.job=ue.runIfDirty.bind(ue);Se.i=Q,Se.id=Q.uid,ue.scheduler=()=>Nk(Se),mu(Q,!0),he()},Y=(Q,J,ae)=>{J.component=Q;const we=Q.vnode.props;Q.vnode=J,Q.next=null,c9(Q,J.props,we,ae),p9(Q,J.children,ae),Jl(),xI(Q),Ql()},Z=(Q,J,ae,we,be,T,V,ie,ue=!1)=>{const he=Q&&Q.children,Se=Q?Q.shapeFlag:0,de=J.children,{patchFlag:Pe,shapeFlag:Ce}=J;if(Pe>0){if(Pe&128){oe(he,de,ae,we,be,T,V,ie,ue);return}else if(Pe&256){ne(he,de,ae,we,be,T,V,ie,ue);return}}Ce&8?(Se&16&&Ue(he,be,T),de!==he&&c(ae,de)):Se&16?Ce&16?oe(he,de,ae,we,be,T,V,ie,ue):Ue(he,be,T,!0):(Se&8&&c(ae,""),Ce&16&&P(de,ae,we,be,T,V,ie,ue))},ne=(Q,J,ae,we,be,T,V,ie,ue)=>{Q=Q||Pd,J=J||Pd;const he=Q.length,Se=J.length,de=Math.min(he,Se);let Pe;for(Pe=0;Pe<de;Pe++){const Ce=J[Pe]=ue?Ka(J[Pe]):ys(J[Pe]);m(Q[Pe],Ce,ae,null,be,T,V,ie,ue)}he>Se?Ue(Q,be,T,!0,!1,de):P(J,ae,we,be,T,V,ie,ue,de)},oe=(Q,J,ae,we,be,T,V,ie,ue)=>{let he=0;const Se=J.length;let de=Q.length-1,Pe=Se-1;for(;he<=de&&he<=Pe;){const Ce=Q[he],re=J[he]=ue?Ka(J[he]):ys(J[he]);if(io(Ce,re))m(Ce,re,ae,null,be,T,V,ie,ue);else break;he++}for(;he<=de&&he<=Pe;){const Ce=Q[de],re=J[Pe]=ue?Ka(J[Pe]):ys(J[Pe]);if(io(Ce,re))m(Ce,re,ae,null,be,T,V,ie,ue);else break;de--,Pe--}if(he>de){if(he<=Pe){const Ce=Pe+1,re=Ce<Se?J[Ce].el:we;for(;he<=Pe;)m(null,J[he]=ue?Ka(J[he]):ys(J[he]),ae,re,be,T,V,ie,ue),he++}}else if(he>Pe)for(;he<=de;)Ee(Q[he],be,T,!0),he++;else{const Ce=he,re=he,pe=new Map;for(he=re;he<=Pe;he++){const se=J[he]=ue?Ka(J[he]):ys(J[he]);se.key!=null&&pe.set(se.key,he)}let De,N=0;const D=Pe-re+1;let q=!1,C=0;const G=new Array(D);for(he=0;he<D;he++)G[he]=0;for(he=Ce;he<=de;he++){const se=Q[he];if(N>=D){Ee(se,be,T,!0);continue}let ve;if(se.key!=null)ve=pe.get(se.key);else for(De=re;De<=Pe;De++)if(G[De-re]===0&&io(se,J[De])){ve=De;break}ve===void 0?Ee(se,be,T,!0):(G[ve-re]=he+1,ve>=C?C=ve:q=!0,m(se,J[ve],ae,null,be,T,V,ie,ue),N++)}const K=q?y9(G):Pd;for(De=K.length-1,he=D-1;he>=0;he--){const se=re+he,ve=J[se],ke=se+1<Se?J[se+1].el:we;G[he]===0?m(null,ve,ae,ke,be,T,V,ie,ue):q&&(De<0||he!==K[De]?le(ve,ae,ke,2):De--)}}},le=(Q,J,ae,we,be=null)=>{const{el:T,type:V,transition:ie,children:ue,shapeFlag:he}=Q;if(he&6){le(Q.component.subTree,J,ae,we);return}if(he&128){Q.suspense.move(J,ae,we);return}if(he&64){V.move(Q,J,ae,Ie);return}if(V===je){r(T,J,ae);for(let de=0;de<ue.length;de++)le(ue[de],J,ae,we);r(Q.anchor,J,ae);return}if(V===R_){b(Q,J,ae);return}if(we!==2&&he&1&&ie)if(we===0)ie.beforeEnter(T),r(T,J,ae),Yr(()=>ie.enter(T),be);else{const{leave:de,delayLeave:Pe,afterLeave:Ce}=ie,re=()=>r(T,J,ae),pe=()=>{de(T,()=>{re(),Ce&&Ce()})};Pe?Pe(T,re,pe):pe()}else r(T,J,ae)},Ee=(Q,J,ae,we=!1,be=!1)=>{const{type:T,props:V,ref:ie,children:ue,dynamicChildren:he,shapeFlag:Se,patchFlag:de,dirs:Pe,cacheIndex:Ce}=Q;if(de===-2&&(be=!1),ie!=null&&Ay(ie,null,ae,Q,!0),Ce!=null&&(J.renderCache[Ce]=void 0),Se&256){J.ctx.deactivate(Q);return}const re=Se&1&&Pe,pe=!Nd(Q);let De;if(pe&&(De=V&&V.onVnodeBeforeUnmount)&&Ws(De,J,Q),Se&6)Ve(Q.component,ae,we);else{if(Se&128){Q.suspense.unmount(ae,we);return}re&&pu(Q,null,J,"beforeUnmount"),Se&64?Q.type.remove(Q,J,ae,Ie,we):he&&!he.hasOnce&&(T!==je||de>0&&de&64)?Ue(he,J,ae,!1,!0):(T===je&&de&384||!be&&Se&16)&&Ue(ue,J,ae),we&&xe(Q)}(pe&&(De=V&&V.onVnodeUnmounted)||re)&&Yr(()=>{De&&Ws(De,J,Q),re&&pu(Q,null,J,"unmounted")},ae)},xe=Q=>{const{type:J,el:ae,anchor:we,transition:be}=Q;if(J===je){Me(ae,we);return}if(J===R_){_(Q);return}const T=()=>{i(ae),be&&!be.persisted&&be.afterLeave&&be.afterLeave()};if(Q.shapeFlag&1&&be&&!be.persisted){const{leave:V,delayLeave:ie}=be,ue=()=>V(ae,T);ie?ie(Q.el,T,ue):ue()}else T()},Me=(Q,J)=>{let ae;for(;Q!==J;)ae=f(Q),i(Q),Q=ae;i(J)},Ve=(Q,J,ae)=>{const{bum:we,scope:be,job:T,subTree:V,um:ie,m:ue,a:he}=Q;MI(ue),MI(he),we&&Dv(we),be.stop(),T&&(T.flags|=8,Ee(V,Q,J,ae)),ie&&Yr(ie,J),Yr(()=>{Q.isUnmounted=!0},J),J&&J.pendingBranch&&!J.isUnmounted&&Q.asyncDep&&!Q.asyncResolved&&Q.suspenseId===J.pendingId&&(J.deps--,J.deps===0&&J.resolve())},Ue=(Q,J,ae,we=!1,be=!1,T=0)=>{for(let V=T;V<Q.length;V++)Ee(Q[V],J,ae,we,be)},me=Q=>{if(Q.shapeFlag&6)return me(Q.component.subTree);if(Q.shapeFlag&128)return Q.suspense.next();const J=f(Q.anchor||Q.el),ae=J&&J[wB];return ae?f(ae):J};let _e=!1;const Te=(Q,J,ae)=>{Q==null?J._vnode&&Ee(J._vnode,null,null,!0):m(J._vnode||null,Q,J,null,null,null,ae),J._vnode=Q,_e||(_e=!0,xI(),vB(),_e=!1)},Ie={p:m,um:Ee,m:le,r:xe,mt:j,mc:P,pc:Z,pbc:O,n:me,o:e};return{render:Te,hydrate:void 0,createApp:l9(Te)}}function O_({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function mu({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function v9(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function $k(e,t,n=!1){const r=e.children,i=t.children;if(rt(r)&&rt(i))for(let s=0;s<r.length;s++){const o=r[s];let a=i[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[s]=Ka(i[s]),a.el=o.el),!n&&a.patchFlag!==-2&&$k(o,a)),a.type===Lm&&(a.el=o.el)}}function y9(e){const t=e.slice(),n=[0];let r,i,s,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(s=0,o=n.length-1;s<o;)a=s+o>>1,e[n[a]]<u?s=a+1:o=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,o=n[s-1];s-- >0;)n[s]=o,o=t[o];return n}function tz(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:tz(t)}function MI(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const b9=Symbol.for("v-scx"),w9=()=>Lt(b9);function Mt(e,t){return $w(e,null,t)}function _9(e,t){return $w(e,null,{flush:"post"})}function He(e,t,n){return $w(e,t,n)}function $w(e,t,n=un){const{immediate:r,deep:i,flush:s,once:o}=n,a=Xn({},n),l=t&&r||!t&&s!=="post";let u;if(Gp){if(s==="sync"){const h=w9();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=fo,h.resume=fo,h.pause=fo,h}}const c=hr;a.call=(h,p,m)=>As(h,c,p,m);let d=!1;s==="post"?a.scheduler=h=>{Yr(h,c&&c.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,p)=>{p?h():Nk(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=j8(e,t,a);return Gp&&(u?u.push(f):l&&f()),f}function S9(e,t,n){const r=this.proxy,i=Cn(e)?e.includes(".")?nz(r,e):()=>r[e]:e.bind(r,r);let s;ht(t)?s=t:(s=t.handler,n=t);const o=Fm(this),a=$w(i,s.bind(r),n);return o(),a}function nz(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}const x9=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${xi(t)}Modifiers`]||e[`${Kl(t)}Modifiers`];function E9(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||un;let i=n;const s=t.startsWith("update:"),o=s&&x9(r,t.slice(7));o&&(o.trim&&(i=n.map(c=>Cn(c)?c.trim():c)),o.number&&(i=n.map(ky)));let a,l=r[a=Xh(t)]||r[a=Xh(xi(t))];!l&&s&&(l=r[a=Xh(Kl(t))]),l&&As(l,e,6,i);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,As(u,e,6,i)}}function rz(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const s=e.emits;let o={},a=!1;if(!ht(e)){const l=u=>{const c=rz(u,t,!0);c&&(a=!0,Xn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(an(e)&&r.set(e,null),null):(rt(s)?s.forEach(l=>o[l]=null):Xn(o,s),an(e)&&r.set(e,o),o)}function Hw(e,t){return!e||!Rw(t)?!1:(t=t.slice(2).replace(/Once$/,""),en(e,t[0].toLowerCase()+t.slice(1))||en(e,Kl(t))||en(e,t))}function DI(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[s],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:p,inheritAttrs:m}=e,g=Iy(e);let v,w;try{if(n.shapeFlag&4){const _=i||r,x=_;v=ys(u.call(x,_,c,d,h,f,p)),w=a}else{const _=t;v=ys(_.length>1?_(d,{attrs:a,slots:o,emit:l}):_(d,null)),w=t.props?a:k9(a)}}catch(_){tp.length=0,Nm(_,e,1),v=$(er)}let b=v;if(w&&m!==!1){const _=Object.keys(w),{shapeFlag:x}=b;_.length&&x&7&&(s&&_.some(kk)&&(w=C9(w,s)),b=yo(b,w,!1,!0))}return n.dirs&&(b=yo(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Wp(b,n.transition),v=b,Iy(g),v}function T9(e,t=!0){let n;for(let r=0;r<e.length;r++){const i=e[r];if(cc(i)){if(i.type!==er||i.children==="v-if"){if(n)return;n=i}}else return}return n}const k9=e=>{let t;for(const n in e)(n==="class"||n==="style"||Rw(n))&&((t||(t={}))[n]=e[n]);return t},C9=(e,t)=>{const n={};for(const r in e)(!kk(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function O9(e,t,n){const{props:r,children:i,component:s}=e,{props:o,children:a,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?NI(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(o[f]!==r[f]&&!Hw(u,f))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?NI(r,o,u):!0:!!o;return!1}function NI(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const s=r[i];if(t[s]!==e[s]&&!Hw(n,s))return!0}return!1}function Hk({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const iz=e=>e.__isSuspense;let f1=0;const R9={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,s,o,a,l,u){if(e==null)A9(t,n,r,i,s,o,a,l,u);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}P9(e,t,n,r,i,o,a,l,u)}},hydrate:M9,normalize:D9},I9=R9;function qp(e,t){const n=e.props&&e.props[t];ht(n)&&n()}function A9(e,t,n,r,i,s,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),f=e.suspense=sz(e,i,r,t,d,n,s,o,a,l);u(null,f.pendingBranch=e.ssContent,d,null,r,f,s,o),f.deps>0?(qp(e,"onPending"),qp(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,o),Ld(f,e.ssFallback)):f.resolve(!1,!0)}function P9(e,t,n,r,i,s,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=f,io(f,m)?(l(m,f,d.hiddenContainer,null,i,d,s,o,a),d.deps<=0?d.resolve():g&&(v||(l(p,h,n,r,i,null,s,o,a),Ld(d,h)))):(d.pendingId=f1++,v?(d.isHydrating=!1,d.activeBranch=m):u(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),g?(l(null,f,d.hiddenContainer,null,i,d,s,o,a),d.deps<=0?d.resolve():(l(p,h,n,r,i,null,s,o,a),Ld(d,h))):p&&io(f,p)?(l(p,f,n,r,i,d,s,o,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,i,d,s,o,a),d.deps<=0&&d.resolve()));else if(p&&io(f,p))l(p,f,n,r,i,d,s,o,a),Ld(d,f);else if(qp(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=f1++,l(null,f,d.hiddenContainer,null,i,d,s,o,a),d.deps<=0)d.resolve();else{const{timeout:w,pendingId:b}=d;w>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},w):w===0&&d.fallback(h)}}function sz(e,t,n,r,i,s,o,a,l,u,c=!1){const{p:d,m:f,um:h,n:p,o:{parentNode:m,remove:g}}=u;let v;const w=L9(e);w&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?jF(e.props.timeout):void 0,_=s,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:f1++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(S=!1,I=!1){const{vnode:P,activeBranch:R,pendingBranch:O,pendingId:M,effects:E,parentComponent:L,container:j}=x;let F=!1;x.isHydrating?x.isHydrating=!1:S||(F=R&&O.transition&&O.transition.mode==="out-in",F&&(R.transition.afterLeave=()=>{M===x.pendingId&&(f(O,j,s===_?p(R):s,0),i1(E))}),R&&(m(R.el)===j&&(s=p(R)),h(R,L,x,!0)),F||f(O,j,s,0)),Ld(x,O),x.pendingBranch=null,x.isInFallback=!1;let B=x.parent,Y=!1;for(;B;){if(B.pendingBranch){B.effects.push(...E),Y=!0;break}B=B.parent}!Y&&!F&&i1(E),x.effects=[],w&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!I&&t.resolve()),qp(P,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:I,activeBranch:P,parentComponent:R,container:O,namespace:M}=x;qp(I,"onFallback");const E=p(P),L=()=>{x.isInFallback&&(d(null,S,O,E,R,null,M,a,l),Ld(x,S))},j=S.transition&&S.transition.mode==="out-in";j&&(P.transition.afterLeave=L),x.isInFallback=!0,h(P,R,null,!0),j||L()},move(S,I,P){x.activeBranch&&f(x.activeBranch,S,I,P),x.container=S},next(){return x.activeBranch&&p(x.activeBranch)},registerDep(S,I,P){const R=!!x.pendingBranch;R&&x.deps++;const O=S.vnode.el;S.asyncDep.catch(M=>{Nm(M,S,0)}).then(M=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:E}=S;p1(S,M,!1),O&&(E.el=O);const L=!O&&S.subTree.el;I(S,E,m(O||S.subTree.el),O?null:p(S.subTree),x,o,P),L&&g(L),Hk(S,E.el),R&&--x.deps===0&&x.resolve()})},unmount(S,I){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,S,I),x.pendingBranch&&h(x.pendingBranch,n,S,I)}};return x}function M9(e,t,n,r,i,s,o,a,l){const u=t.suspense=sz(t,r,n,e.parentNode,document.createElement("div"),null,i,s,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,s,o);return u.deps===0&&u.resolve(!1,!0),c}function D9(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=LI(r?n.default:n),e.ssFallback=r?LI(n.fallback):$(er)}function LI(e){let t;if(ht(e)){const n=Jd&&e._c;n&&(e._d=!1,k()),e=e(),n&&(e._d=!0,t=gi,oz())}return rt(e)&&(e=T9(e)),e=ys(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function N9(e,t){t&&t.pendingBranch?rt(e)?t.effects.push(...e):t.effects.push(e):i1(e)}function Ld(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,Hk(r,i))}function L9(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const je=Symbol.for("v-fgt"),Lm=Symbol.for("v-txt"),er=Symbol.for("v-cmt"),R_=Symbol.for("v-stc"),tp=[];let gi=null;function k(e=!1){tp.push(gi=e?null:[])}function oz(){tp.pop(),gi=tp[tp.length-1]||null}let Jd=1;function FI(e,t=!1){Jd+=e,e<0&&gi&&t&&(gi.hasOnce=!0)}function az(e){return e.dynamicChildren=Jd>0?gi||Pd:null,oz(),Jd>0&&gi&&gi.push(e),e}function W(e,t,n,r,i,s){return az(A(e,t,n,r,i,s,!0))}function X(e,t,n,r,i){return az($(e,t,n,r,i,!0))}function cc(e){return e?e.__v_isVNode===!0:!1}function io(e,t){return e.type===t.type&&e.key===t.key}const lz=({key:e})=>e??null,Lv=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Cn(e)||Jt(e)||ht(e)?{i:tr,r:e,k:t,f:!!n}:e:null);function A(e,t=null,n=null,r=0,i=null,s=e===je?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lz(t),ref:t&&Lv(t),scopeId:bB,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:tr};return a?(Vk(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Cn(n)?8:16),Jd>0&&!o&&gi&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&gi.push(l),l}const $=F9;function F9(e,t=null,n=null,r=0,i=null,s=!1){if((!e||e===BB)&&(e=er),cc(e)){const a=yo(e,t,!0);return n&&Vk(a,n),Jd>0&&!s&&gi&&(a.shapeFlag&6?gi[gi.indexOf(e)]=a:gi.push(a)),a.patchFlag=-2,a}if(W9(e)&&(e=e.__vccOpts),t){t=Ft(t);let{class:a,style:l}=t;a&&!Cn(a)&&(t.class=Le(a)),an(l)&&(Mk(l)&&!rt(l)&&(l=Xn({},l)),t.style=xn(l))}const o=Cn(e)?1:iz(e)?128:_B(e)?64:an(e)?4:ht(e)?2:0;return A(e,t,n,r,i,o,s,!0)}function Ft(e){return e?Mk(e)||KB(e)?Xn({},e):e:null}function yo(e,t,n=!1,r=!1){const{props:i,ref:s,patchFlag:o,children:a,transition:l}=e,u=t?Fe(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&lz(u),ref:t&&t.ref?n&&s?rt(s)?s.concat(Lv(t)):[s,Lv(t)]:Lv(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&yo(e.ssContent),ssFallback:e.ssFallback&&yo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Wp(c,l.clone(c)),c}function Ye(e=" ",t=0){return $(Lm,null,e,t)}function fe(e="",t=!1){return t?(k(),X(er,null,e)):$(er,null,e)}function ys(e){return e==null||typeof e=="boolean"?$(er):rt(e)?$(je,null,e.slice()):cc(e)?Ka(e):$(Lm,null,String(e))}function Ka(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:yo(e)}function Vk(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(rt(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Vk(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!KB(t)?t._ctx=tr:i===3&&tr&&(tr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ht(t)?(t={default:t,_ctx:tr},n=32):(t=String(t),r&64?(n=16,t=[Ye(t)]):n=8);e.children=t,e.shapeFlag|=n}function Fe(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=Le([t.class,r.class]));else if(i==="style")t.style=xn([t.style,r.style]);else if(Rw(i)){const s=t[i],o=r[i];o&&s!==o&&!(rt(s)&&s.includes(o))&&(t[i]=s?[].concat(s,o):o)}else i!==""&&(t[i]=r[i])}return t}function Ws(e,t,n,r=null){As(e,t,7,[n,r])}const B9=WB();let z9=0;function $9(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||B9,s={uid:z9++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new GF(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:XB(r,i),emitsOptions:rz(r,i),emit:null,emitted:null,propsDefaults:un,inheritAttrs:r.inheritAttrs,ctx:un,data:un,props:un,attrs:un,slots:un,refs:un,setupState:un,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=E9.bind(null,s),e.ce&&e.ce(s),s}let hr=null;const Jn=()=>hr||tr;let My,h1;{const e=Pw(),t=(n,r)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(r),s=>{i.length>1?i.forEach(o=>o(s)):i[0](s)}};My=t("__VUE_INSTANCE_SETTERS__",n=>hr=n),h1=t("__VUE_SSR_SETTERS__",n=>Gp=n)}const Fm=e=>{const t=hr;return My(e),e.scope.on(),()=>{e.scope.off(),My(t)}},BI=()=>{hr&&hr.scope.off(),My(null)};function uz(e){return e.vnode.shapeFlag&4}let Gp=!1;function H9(e,t=!1,n=!1){t&&h1(t);const{props:r,children:i}=e.vnode,s=uz(e);u9(e,r,s,t),h9(e,i,n);const o=s?V9(e,t):void 0;return t&&h1(!1),o}function V9(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,e9);const{setup:r}=n;if(r){Jl();const i=e.setupContext=r.length>1?dz(e):null,s=Fm(e),o=Dm(r,e,0,[e.props,i]),a=zF(o);if(Ql(),s(),(a||e.sp)&&!Nd(e)&&IB(e),a){if(o.then(BI,BI),t)return o.then(l=>{p1(e,l,t)}).catch(l=>{Nm(l,e,0)});e.asyncDep=o}else p1(e,o,t)}else cz(e,t)}function p1(e,t,n){ht(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:an(t)&&(e.setupState=fB(t)),cz(e,n)}let zI;function cz(e,t,n){const r=e.type;if(!e.render){if(!t&&zI&&!r.render){const i=r.template||Bk(e).template;if(i){const{isCustomElement:s,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Xn(Xn({isCustomElement:s,delimiters:a},o),l);r.render=zI(i,u)}}e.render=r.render||fo}{const i=Fm(e);Jl();try{n9(e)}finally{Ql(),i()}}}const j9={get(e,t){return Nr(e,"get",""),e[t]}};function dz(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,j9),slots:e.slots,emit:e.emit,expose:t}}function Vw(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(fB(Mm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ep)return ep[n](e)},has(t,n){return n in t||n in ep}})):e.proxy}function U9(e,t=!0){return ht(e)?e.displayName||e.name:e.name||t&&e.__name}function W9(e){return ht(e)&&"__vccOpts"in e}const te=(e,t)=>H8(e,t,Gp);function We(e,t,n){const r=arguments.length;return r===2?an(t)&&!rt(t)?cc(t)?$(e,null,[t]):$(e,t):$(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&cc(n)&&(n=[n]),$(e,t,n))}const jw="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let m1;const $I=typeof window<"u"&&window.trustedTypes;if($I)try{m1=$I.createPolicy("vue",{createHTML:e=>e})}catch{}const fz=m1?e=>m1.createHTML(e):e=>e,q9="http://www.w3.org/2000/svg",G9="http://www.w3.org/1998/Math/MathML",qo=typeof document<"u"?document:null,HI=qo&&qo.createElement("template"),K9={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t==="svg"?qo.createElementNS(q9,e):t==="mathml"?qo.createElementNS(G9,e):n?qo.createElement(e,{is:n}):qo.createElement(e);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>qo.createTextNode(e),createComment:e=>qo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,s){const o=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{HI.innerHTML=fz(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=HI.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Na="transition",dh="animation",Kp=Symbol("_vtc"),hz={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Y9=Xn({},EB,hz),X9=e=>(e.displayName="Transition",e.props=Y9,e),is=X9((e,{slots:t})=>We(Y8,J9(e),t)),gu=(e,t=[])=>{rt(e)?e.forEach(n=>n(...t)):e&&e(...t)},VI=e=>e?rt(e)?e.some(t=>t.length>1):e.length>1:!1;function J9(e){const t={};for(const E in e)E in hz||(t[E]=e[E]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=Q9(i),m=p&&p[0],g=p&&p[1],{onBeforeEnter:v,onEnter:w,onEnterCancelled:b,onLeave:_,onLeaveCancelled:x,onBeforeAppear:S=v,onAppear:I=w,onAppearCancelled:P=b}=t,R=(E,L,j,F)=>{E._enterCancelled=F,vu(E,L?c:a),vu(E,L?u:o),j&&j()},O=(E,L)=>{E._isLeaving=!1,vu(E,d),vu(E,h),vu(E,f),L&&L()},M=E=>(L,j)=>{const F=E?I:w,B=()=>R(L,E,j);gu(F,[L,B]),jI(()=>{vu(L,E?l:s),No(L,E?c:a),VI(F)||UI(L,r,m,B)})};return Xn(t,{onBeforeEnter(E){gu(v,[E]),No(E,s),No(E,o)},onBeforeAppear(E){gu(S,[E]),No(E,l),No(E,u)},onEnter:M(!1),onAppear:M(!0),onLeave(E,L){E._isLeaving=!0;const j=()=>O(E,L);No(E,d),E._enterCancelled?(No(E,f),GI()):(GI(),No(E,f)),jI(()=>{E._isLeaving&&(vu(E,d),No(E,h),VI(_)||UI(E,r,g,j))}),gu(_,[E,j])},onEnterCancelled(E){R(E,!1,void 0,!0),gu(b,[E])},onAppearCancelled(E){R(E,!0,void 0,!0),gu(P,[E])},onLeaveCancelled(E){O(E),gu(x,[E])}})}function Q9(e){if(e==null)return null;if(an(e))return[I_(e.enter),I_(e.leave)];{const t=I_(e);return[t,t]}}function I_(e){return jF(e)}function No(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Kp]||(e[Kp]=new Set)).add(t)}function vu(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Kp];n&&(n.delete(t),n.size||(e[Kp]=void 0))}function jI(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Z9=0;function UI(e,t,n,r){const i=e._endId=++Z9,s=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:o,timeout:a,propCount:l}=e7(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function e7(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(`${Na}Delay`),s=r(`${Na}Duration`),o=WI(i,s),a=r(`${dh}Delay`),l=r(`${dh}Duration`),u=WI(a,l);let c=null,d=0,f=0;t===Na?o>0&&(c=Na,d=o,f=s.length):t===dh?u>0&&(c=dh,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?Na:dh:null,f=c?c===Na?s.length:l.length:0);const h=c===Na&&/\b(transform|all)(,|$)/.test(r(`${Na}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function WI(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>qI(n)+qI(e[r])))}function qI(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function GI(){return document.body.offsetHeight}function t7(e,t,n){const r=e[Kp];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Dy=Symbol("_vod"),pz=Symbol("_vsh"),Cu={beforeMount(e,{value:t},{transition:n}){e[Dy]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):fh(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),fh(e,!0),r.enter(e)):r.leave(e,()=>{fh(e,!1)}):fh(e,t))},beforeUnmount(e,{value:t}){fh(e,t)}};function fh(e,t){e.style.display=t?e[Dy]:"none",e[pz]=!t}const n7=Symbol(""),r7=/(^|;)\s*display\s*:/;function i7(e,t,n){const r=e.style,i=Cn(n);let s=!1;if(n&&!i){if(t)if(Cn(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Fv(r,a,"")}else for(const o in t)n[o]==null&&Fv(r,o,"");for(const o in n)o==="display"&&(s=!0),Fv(r,o,n[o])}else if(i){if(t!==n){const o=r[n7];o&&(n+=";"+o),r.cssText=n,s=r7.test(n)}}else t&&e.removeAttribute("style");Dy in e&&(e[Dy]=s?r.display:"",e[pz]&&(r.display="none"))}const KI=/\s*!important$/;function Fv(e,t,n){if(rt(n))n.forEach(r=>Fv(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=s7(e,t);KI.test(n)?e.setProperty(Kl(r),n.replace(KI,""),"important"):e[r]=n}}const YI=["Webkit","Moz","ms"],A_={};function s7(e,t){const n=A_[t];if(n)return n;let r=xi(t);if(r!=="filter"&&r in e)return A_[t]=r;r=Aw(r);for(let i=0;i<YI.length;i++){const s=YI[i]+r;if(s in e)return A_[t]=s}return t}const XI="http://www.w3.org/1999/xlink";function JI(e,t,n,r,i,s=p8(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(XI,t.slice(6,t.length)):e.setAttributeNS(XI,t,n):n==null||s&&!UF(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Is(n)?String(n):n)}function QI(e,t,n,r,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?fz(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const a=s==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=UF(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Zo(e,t,n,r){e.addEventListener(t,n,r)}function o7(e,t,n,r){e.removeEventListener(t,n,r)}const ZI=Symbol("_vei");function a7(e,t,n,r,i=null){const s=e[ZI]||(e[ZI]={}),o=s[t];if(r&&o)o.value=r;else{const[a,l]=l7(t);if(r){const u=s[t]=d7(r,i);Zo(e,a,u,l)}else o&&(o7(e,a,o,l),s[t]=void 0)}}const eA=/(?:Once|Passive|Capture)$/;function l7(e){let t;if(eA.test(e)){t={};let r;for(;r=e.match(eA);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Kl(e.slice(2)),t]}let P_=0;const u7=Promise.resolve(),c7=()=>P_||(u7.then(()=>P_=0),P_=Date.now());function d7(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;As(f7(r,n.value),t,5,[r])};return n.value=e,n.attached=c7(),n}function f7(e,t){if(rt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const tA=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,h7=(e,t,n,r,i,s)=>{const o=i==="svg";t==="class"?t7(e,r,o):t==="style"?i7(e,n,r):Rw(t)?kk(t)||a7(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):p7(e,t,r,o))?(QI(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&JI(e,t,r,o,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Cn(r))?QI(e,xi(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),JI(e,t,r,o))};function p7(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&tA(t)&&ht(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return tA(t)&&Cn(n)?!1:t in e}const Ol=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rt(t)?n=>Dv(t,n):t};function m7(e){e.target.composing=!0}function nA(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qi=Symbol("_assign"),pi={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Qi]=Ol(i);const s=r||i.props&&i.props.type==="number";Zo(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),s&&(a=ky(a)),e[Qi](a)}),n&&Zo(e,"change",()=>{e.value=e.value.trim()}),t||(Zo(e,"compositionstart",m7),Zo(e,"compositionend",nA),Zo(e,"change",nA))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:s}},o){if(e[Qi]=Ol(o),e.composing)return;const a=(s||e.type==="number")&&!/^0\d/.test(e.value)?ky(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||i&&e.value.trim()===l)||(e.value=l))}},Ti={deep:!0,created(e,t,n){e[Qi]=Ol(n),Zo(e,"change",()=>{const r=e._modelValue,i=Qd(e),s=e.checked,o=e[Qi];if(rt(r)){const a=Rk(r,i),l=a!==-1;if(s&&!l)o(r.concat(i));else if(!s&&l){const u=[...r];u.splice(a,1),o(u)}}else if(Nf(r)){const a=new Set(r);s?a.add(i):a.delete(i),o(a)}else o(mz(e,s))})},mounted:rA,beforeUpdate(e,t,n){e[Qi]=Ol(n),rA(e,t,n)}};function rA(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(rt(t))i=Rk(t,r.props.value)>-1;else if(Nf(t))i=t.has(r.props.value);else{if(t===n)return;i=lc(t,mz(e,!0))}e.checked!==i&&(e.checked=i)}const iA={created(e,{value:t},n){e.checked=lc(t,n.props.value),e[Qi]=Ol(n),Zo(e,"change",()=>{e[Qi](Qd(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Qi]=Ol(r),t!==n&&(e.checked=lc(t,r.props.value))}},g7={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=Nf(t);Zo(e,"change",()=>{const s=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?ky(Qd(o)):Qd(o));e[Qi](e.multiple?i?new Set(s):s:s[0]),e._assigning=!0,vt(()=>{e._assigning=!1})}),e[Qi]=Ol(r)},mounted(e,{value:t}){sA(e,t)},beforeUpdate(e,t,n){e[Qi]=Ol(n)},updated(e,{value:t}){e._assigning||sA(e,t)}};function sA(e,t){const n=e.multiple,r=rt(t);if(!(n&&!r&&!Nf(t))){for(let i=0,s=e.options.length;i<s;i++){const o=e.options[i],a=Qd(o);if(n)if(r){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Rk(t,a)>-1}else o.selected=t.has(a);else if(lc(Qd(o),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qd(e){return"_value"in e?e._value:e.value}function mz(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const v7=["ctrl","shift","alt","meta"],y7={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>v7.some(n=>e[`${n}Key`]&&!t.includes(n))},lt=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(i,...s)=>{for(let o=0;o<t.length;o++){const a=y7[t[o]];if(a&&a(i,t))return}return e(i,...s)})},b7={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},fi=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=i=>{if(!("key"in i))return;const s=Kl(i.key);if(t.some(o=>o===s||b7[o]===s))return e(i)})},w7=Xn({patchProp:h7},K9);let oA;function _7(){return oA||(oA=m9(w7))}const aA=(...e)=>{const t=_7().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=x7(r);if(!i)return;const s=t._component;!ht(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=n(i,!1,S7(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function S7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function x7(e){return Cn(e)?document.querySelector(e):e}function gz(e,t,n){var r=n||{},i=r.noTrailing,s=i===void 0?!1:i,o=r.noLeading,a=o===void 0?!1:o,l=r.debounceMode,u=l===void 0?void 0:l,c,d=!1,f=0;function h(){c&&clearTimeout(c)}function p(g){var v=g||{},w=v.upcomingOnly,b=w===void 0?!1:w;h(),d=!b}function m(){for(var g=arguments.length,v=new Array(g),w=0;w<g;w++)v[w]=arguments[w];var b=this,_=Date.now()-f;if(d)return;function x(){f=Date.now(),t.apply(b,v)}function S(){c=void 0}!a&&u&&!c&&x(),h(),u===void 0&&_>e?a?(f=Date.now(),s||(c=setTimeout(u?S:x,e))):x():s!==!0&&(c=setTimeout(u?S:x,u===void 0?e-_:e))}return m.cancel=p,m}function E7(e,t,n){var r={},i=r.atBegin,s=i===void 0?!1:i;return gz(e,t,{debounceMode:s!==!1})}var g1=function(e,t){return g1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},g1(e,t)};function Oo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");g1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ge=function(){return ge=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ge.apply(this,arguments)};function ua(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ya(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}function Xa(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function $r(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var M_="Invariant Violation",lA=Object.setPrototypeOf,T7=lA===void 0?function(e,t){return e.__proto__=t,e}:lA,vz=function(e){Oo(t,e);function t(n){n===void 0&&(n=M_);var r=e.call(this,typeof n=="number"?M_+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=M_,T7(r,t.prototype),r}return t}(Error);function td(e,t){if(!e)throw new vz(t)}var yz=["debug","log","warn","error","silent"],k7=yz.indexOf("log");function xg(e){return function(){if(yz.indexOf(e)>=k7){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=xg("debug"),e.log=xg("log"),e.warn=xg("warn"),e.error=xg("error")})(td);var jk="3.12.5";function bs(e){try{return e()}catch{}}const v1=bs(function(){return globalThis})||bs(function(){return window})||bs(function(){return self})||bs(function(){return global})||bs(function(){return bs.constructor("return this")()});var uA=new Map;function y1(e){var t=uA.get(e)||1;return uA.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function bz(e,t){t===void 0&&(t=0);var n=y1("stringifyForDisplay");return JSON.stringify(e,function(r,i){return i===void 0?n:i},t).split(JSON.stringify(n)).join("<undefined>")}function Eg(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(typeof t=="number"){var i=t;t=Uk(i),t||(t=Wk(i,n),n=[])}e.apply(void 0,[t].concat(n))}}var et=Object.assign(function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];t||td(t,Uk(n,r)||Wk(n,r))},{debug:Eg(td.debug),log:Eg(td.log),warn:Eg(td.warn),error:Eg(td.error)});function ni(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new vz(Uk(e,t)||Wk(e,t))}var cA=Symbol.for("ApolloErrorMessageHandler_"+jk);function wz(e){if(typeof e=="string")return e;try{return bz(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Uk(e,t){if(t===void 0&&(t=[]),!!e)return v1[cA]&&v1[cA](e,t.map(wz))}function Wk(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:jk,message:e,args:t.map(wz)})))}function Bv(e,t){if(!!!e)throw new Error(t)}function C7(e){return typeof e=="object"&&e!==null}function O7(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const R7=/\r\n|[\n\r]/g;function b1(e,t){let n=0,r=1;for(const i of e.body.matchAll(R7)){if(typeof i.index=="number"||O7(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function I7(e){return _z(e.source,b1(e.source,e.start))}function _z(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,l=t.column+a,u=`${e.name}:${o}:${l} `,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){const f=Math.floor(l/80),h=l%80,p=[];for(let m=0;m<d.length;m+=80)p.push(d.slice(m,m+80));return u+dA([[`${o} |`,p[0]],...p.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(h)],["|",p[f+1]]])}return u+dA([[`${o-1} |`,c[i-1]],[`${o} |`,d],["|","^".padStart(l)],[`${o+1} |`,c[i+1]]])}function dA(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` `)}function A7(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class qk extends Error{constructor(t,...n){var r,i,s;const{nodes:o,source:a,positions:l,path:u,originalError:c,extensions:d}=A7(n);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=c??void 0,this.nodes=fA(Array.isArray(o)?o:o?[o]:void 0);const f=fA((r=this.nodes)===null||r===void 0?void 0:r.map(p=>p.loc).filter(p=>p!=null));this.source=a??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=l??(f==null?void 0:f.map(p=>p.start)),this.locations=l&&a?l.map(p=>b1(a,p)):f==null?void 0:f.map(p=>b1(p.source,p.start));const h=C7(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(s=d??h)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,qk):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=` `+I7(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=` `+_z(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function fA(e){return e===void 0||e.length===0?void 0:e}function dr(e,t,n){return new qk(`Syntax Error: ${n}`,{source:e,positions:[t]})}class P7{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Sz{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const xz={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},M7=new Set(Object.keys(xz));function hA(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&M7.has(t)}var md;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(md||(md={}));var w1;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(w1||(w1={}));var Ke;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Ke||(Ke={}));function _1(e){return e===9||e===32}function Yp(e){return e>=48&&e<=57}function Ez(e){return e>=97&&e<=122||e>=65&&e<=90}function Tz(e){return Ez(e)||e===95}function D7(e){return Ez(e)||Yp(e)||e===95}function N7(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],l=L7(a);l!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&l<n&&(n=l))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function L7(e){let t=0;for(;t<e.length&&_1(e.charCodeAt(t));)++t;return t}function F7(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(h=>h.length===0||_1(h.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,l=e.endsWith("\\"),u=a||l,c=!i||e.length>70||u||s||o;let d="";const f=i&&_1(e.charCodeAt(0));return(c&&!f||s)&&(d+=` `),d+=n,(c||u)&&(d+=` `),'"""'+d+'"""'}var Ne;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Ne||(Ne={}));class B7{constructor(t){const n=new Sz(Ne.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==Ne.EOF)do if(t.next)t=t.next;else{const n=$7(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===Ne.COMMENT);return t}}function z7(e){return e===Ne.BANG||e===Ne.DOLLAR||e===Ne.AMP||e===Ne.PAREN_L||e===Ne.PAREN_R||e===Ne.SPREAD||e===Ne.COLON||e===Ne.EQUALS||e===Ne.AT||e===Ne.BRACKET_L||e===Ne.BRACKET_R||e===Ne.BRACE_L||e===Ne.PIPE||e===Ne.BRACE_R}function Bf(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Uw(e,t){return kz(e.charCodeAt(t))&&Cz(e.charCodeAt(t+1))}function kz(e){return e>=55296&&e<=56319}function Cz(e){return e>=56320&&e<=57343}function dc(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return Ne.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Un(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Sz(t,n,r,s,o,i)}function $7(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return H7(e,i);case 33:return Un(e,Ne.BANG,i,i+1);case 36:return Un(e,Ne.DOLLAR,i,i+1);case 38:return Un(e,Ne.AMP,i,i+1);case 40:return Un(e,Ne.PAREN_L,i,i+1);case 41:return Un(e,Ne.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Un(e,Ne.SPREAD,i,i+3);break;case 58:return Un(e,Ne.COLON,i,i+1);case 61:return Un(e,Ne.EQUALS,i,i+1);case 64:return Un(e,Ne.AT,i,i+1);case 91:return Un(e,Ne.BRACKET_L,i,i+1);case 93:return Un(e,Ne.BRACKET_R,i,i+1);case 123:return Un(e,Ne.BRACE_L,i,i+1);case 124:return Un(e,Ne.PIPE,i,i+1);case 125:return Un(e,Ne.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?G7(e,i):j7(e,i)}if(Yp(s)||s===45)return V7(e,i,s);if(Tz(s))return K7(e,i);throw dr(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Bf(s)||Uw(n,i)?`Unexpected character: ${dc(e,i)}.`:`Invalid character: ${dc(e,i)}.`)}return Un(e,Ne.EOF,r,r)}function H7(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(s===10||s===13)break;if(Bf(s))++i;else if(Uw(n,i))i+=2;else break}return Un(e,Ne.COMMENT,t,i,n.slice(t+1,i))}function V7(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),Yp(s))throw dr(e.source,i,`Invalid number, unexpected digit after 0: ${dc(e,i)}.`)}else i=D_(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=!0,s=r.charCodeAt(++i),i=D_(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=D_(e,i,s),s=r.charCodeAt(i)),s===46||Tz(s))throw dr(e.source,i,`Invalid number, expected digit but got: ${dc(e,i)}.`);return Un(e,o?Ne.FLOAT:Ne.INT,t,i,r.slice(t,i))}function D_(e,t,n){if(!Yp(n))throw dr(e.source,t,`Invalid number, expected digit but got: ${dc(e,t)}.`);const r=e.source.body;let i=t+1;for(;Yp(r.charCodeAt(i));)++i;return i}function j7(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),Un(e,Ne.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);const l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?U7(e,i):W7(e,i):q7(e,i);o+=l.value,i+=l.size,s=i;continue}if(a===10||a===13)break;if(Bf(a))++i;else if(Uw(n,i))i+=2;else throw dr(e.source,i,`Invalid character within String: ${dc(e,i)}.`)}throw dr(e.source,i,"Unterminated string.")}function U7(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const s=n.charCodeAt(t+i++);if(s===125){if(i<5||!Bf(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Fh(s),r<0)break}throw dr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function W7(e,t){const n=e.source.body,r=pA(n,t+2);if(Bf(r))return{value:String.fromCodePoint(r),size:6};if(kz(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=pA(n,t+8);if(Cz(i))return{value:String.fromCodePoint(r,i),size:12}}throw dr(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function pA(e,t){return Fh(e.charCodeAt(t))<<12|Fh(e.charCodeAt(t+1))<<8|Fh(e.charCodeAt(t+2))<<4|Fh(e.charCodeAt(t+3))}function Fh(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function q7(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw dr(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function G7(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const l=[];for(;s<r;){const u=n.charCodeAt(s);if(u===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),l.push(a);const c=Un(e,Ne.BLOCK_STRING,t,s+3,N7(l).join(` `));return e.line+=l.length-1,e.lineStart=i,c}if(u===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(u===10||u===13){a+=n.slice(o,s),l.push(a),u===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(Bf(u))++s;else if(Uw(n,s))s+=2;else throw dr(e.source,s,`Invalid character within String: ${dc(e,s)}.`)}throw dr(e.source,s,"Unterminated string.")}function K7(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(D7(s))++i;else break}return Un(e,Ne.NAME,t,i,n.slice(t,i))}const Y7=10,Oz=2;function Gk(e){return Ww(e,[])}function Ww(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return X7(e,t);default:return String(e)}}function X7(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(J7(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Ww(r,n)}else if(Array.isArray(e))return Z7(e,n);return Q7(e,n)}function J7(e){return typeof e.toJSON=="function"}function Q7(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Oz?"["+eG(e)+"]":"{ "+n.map(([i,s])=>i+": "+Ww(s,t)).join(", ")+" }"}function Z7(e,t){if(e.length===0)return"[]";if(t.length>Oz)return"[Array]";const n=Math.min(Y7,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Ww(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function eG(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const tG=globalThis.process&&!0,nG=tG?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const o=Gk(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`)}}return!1};class Rz{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Bv(!1,`Body must be a string. Received: ${Gk(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Bv(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Bv(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function rG(e){return nG(e,Rz)}function iG(e,t){const n=new sG(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}class sG{constructor(t,n={}){const r=rG(t)?t:new Rz(t);this._lexer=new B7(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(Ne.NAME);return this.node(t,{kind:Ke.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ke.DOCUMENT,definitions:this.many(Ne.SOF,this.parseDefinition,Ne.EOF)})}parseDefinition(){if(this.peek(Ne.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Ne.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw dr(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(Ne.BRACE_L))return this.node(t,{kind:Ke.OPERATION_DEFINITION,operation:md.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(Ne.NAME)&&(r=this.parseName()),this.node(t,{kind:Ke.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(Ne.NAME);switch(t.value){case"query":return md.QUERY;case"mutation":return md.MUTATION;case"subscription":return md.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Ne.PAREN_L,this.parseVariableDefinition,Ne.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ke.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ne.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ne.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(Ne.DOLLAR),this.node(t,{kind:Ke.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ke.SELECTION_SET,selections:this.many(Ne.BRACE_L,this.parseSelection,Ne.BRACE_R)})}parseSelection(){return this.peek(Ne.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(Ne.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:Ke.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ne.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ne.PAREN_L,n,Ne.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(Ne.COLON),this.node(n,{kind:Ke.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(Ne.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Ne.NAME)?this.node(t,{kind:Ke.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Ke.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Ke.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Ke.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case Ne.BRACKET_L:return this.parseList(t);case Ne.BRACE_L:return this.parseObject(t);case Ne.INT:return this.advanceLexer(),this.node(n,{kind:Ke.INT,value:n.value});case Ne.FLOAT:return this.advanceLexer(),this.node(n,{kind:Ke.FLOAT,value:n.value});case Ne.STRING:case Ne.BLOCK_STRING:return this.parseStringLiteral();case Ne.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:Ke.BOOLEAN,value:!0});case"false":return this.node(n,{kind:Ke.BOOLEAN,value:!1});case"null":return this.node(n,{kind:Ke.NULL});default:return this.node(n,{kind:Ke.ENUM,value:n.value})}case Ne.DOLLAR:if(t)if(this.expectToken(Ne.DOLLAR),this._lexer.token.kind===Ne.NAME){const r=this._lexer.token.value;throw dr(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Ke.STRING,value:t.value,block:t.kind===Ne.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Ke.LIST,values:this.any(Ne.BRACKET_L,n,Ne.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Ke.OBJECT,fields:this.any(Ne.BRACE_L,n,Ne.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(Ne.COLON),this.node(n,{kind:Ke.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(Ne.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(Ne.AT),this.node(n,{kind:Ke.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(Ne.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Ne.BRACKET_R),n=this.node(t,{kind:Ke.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Ne.BANG)?this.node(t,{kind:Ke.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:Ke.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Ne.STRING)||this.peek(Ne.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(Ne.BRACE_L,this.parseOperationTypeDefinition,Ne.BRACE_R);return this.node(t,{kind:Ke.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(Ne.COLON);const r=this.parseNamedType();return this.node(t,{kind:Ke.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Ke.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:Ke.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Ne.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Ne.BRACE_L,this.parseFieldDefinition,Ne.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Ne.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:Ke.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Ne.PAREN_L,this.parseInputValueDef,Ne.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Ne.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(Ne.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:Ke.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:Ke.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:Ke.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Ne.EQUALS)?this.delimitedMany(Ne.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:Ke.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Ne.BRACE_L,this.parseEnumValueDefinition,Ne.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Ke.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw dr(this._lexer.source,this._lexer.token.start,`${Tg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:Ke.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Ne.BRACE_L,this.parseInputValueDef,Ne.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===Ne.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(Ne.BRACE_L,this.parseOperationTypeDefinition,Ne.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:Ke.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:Ke.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:Ke.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:Ke.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Ke.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Ke.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Ke.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ne.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:Ke.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Ne.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(w1,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new P7(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw dr(this._lexer.source,n.start,`Expected ${Iz(t)}, found ${Tg(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===Ne.NAME&&n.value===t)this.advanceLexer();else throw dr(this._lexer.source,n.start,`Expected "${t}", found ${Tg(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===Ne.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return dr(this._lexer.source,n.start,`Unexpected ${Tg(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==Ne.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw dr(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Tg(e){const t=e.value;return Iz(e.kind)+(t!=null?` "${t}"`:"")}function Iz(e){return z7(e)?`"${e}"`:e}function oG(e){return`"${e.replace(aG,lG)}"`}const aG=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function lG(e){return uG[e.charCodeAt(0)]}const uG=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],qw=Object.freeze({});function Ps(e,t,n=xz){const r=new Map;for(const v of Object.values(Ke))r.set(v,cG(t,v));let i,s=Array.isArray(e),o=[e],a=-1,l=[],u=e,c,d;const f=[],h=[];do{a++;const v=a===o.length,w=v&&l.length!==0;if(v){if(c=h.length===0?void 0:f[f.length-1],u=d,d=h.pop(),w)if(s){u=u.slice();let _=0;for(const[x,S]of l){const I=x-_;S===null?(u.splice(I,1),_++):u[I]=S}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[_,x]of l)u[_]=x}a=i.index,o=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(d){if(c=s?a:o[a],u=d[c],u==null)continue;f.push(c)}let b;if(!Array.isArray(u)){var p,m;hA(u)||Bv(!1,`Invalid AST Node: ${Gk(u)}.`);const _=v?(p=r.get(u.kind))===null||p===void 0?void 0:p.leave:(m=r.get(u.kind))===null||m===void 0?void 0:m.enter;if(b=_==null?void 0:_.call(t,u,c,d,f,h),b===qw)break;if(b===!1){if(!v){f.pop();continue}}else if(b!==void 0&&(l.push([c,b]),!v))if(hA(b))u=b;else{f.pop();continue}}if(b===void 0&&w&&l.push([c,u]),v)f.pop();else{var g;i={inArray:s,index:a,keys:o,edits:l,prev:i},s=Array.isArray(u),o=s?u:(g=n[u.kind])!==null&&g!==void 0?g:[],a=-1,l=[],d&&h.push(d),d=u}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function cG(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function dG(e){return Ps(e,hG)}const fG=80,hG={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Qe(e.definitions,` `)},OperationDefinition:{leave(e){const t=Dt("(",Qe(e.variableDefinitions,", "),")"),n=Qe([e.operation,Qe([e.name,t]),Qe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Dt(" = ",n)+Dt(" ",Qe(r," "))},SelectionSet:{leave:({selections:e})=>ds(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=Dt("",e,": ")+t;let o=s+Dt("(",Qe(n,", "),")");return o.length>fG&&(o=s+Dt(`( `,zv(Qe(n,` `)),` )`)),Qe([o,Qe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Dt(" ",Qe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Qe(["...",Dt("on ",e),Qe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Dt("(",Qe(n,", "),")")} on ${t} ${Dt("",Qe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?F7(e):oG(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Qe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Qe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Dt("(",Qe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Dt("",e,` `)+Qe(["schema",Qe(t," "),ds(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` `)+Qe(["scalar",t,Qe(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Dt("",e,` `)+Qe(["type",t,Dt("implements ",Qe(n," & ")),Qe(r," "),ds(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Dt("",e,` `)+t+(mA(n)?Dt(`( `,zv(Qe(n,` `)),` )`):Dt("(",Qe(n,", "),")"))+": "+r+Dt(" ",Qe(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Dt("",e,` `)+Qe([t+": "+n,Dt("= ",r),Qe(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Dt("",e,` `)+Qe(["interface",t,Dt("implements ",Qe(n," & ")),Qe(r," "),ds(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Dt("",e,` `)+Qe(["union",t,Qe(n," "),Dt("= ",Qe(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Dt("",e,` `)+Qe(["enum",t,Qe(n," "),ds(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` `)+Qe([t,Qe(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Dt("",e,` `)+Qe(["input",t,Qe(n," "),ds(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Dt("",e,` `)+"directive @"+t+(mA(n)?Dt(`( `,zv(Qe(n,` `)),` )`):Dt("(",Qe(n,", "),")"))+(r?" repeatable":"")+" on "+Qe(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Qe(["extend schema",Qe(e," "),ds(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Qe(["extend scalar",e,Qe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Qe(["extend type",e,Dt("implements ",Qe(t," & ")),Qe(n," "),ds(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Qe(["extend interface",e,Dt("implements ",Qe(t," & ")),Qe(n," "),ds(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Qe(["extend union",e,Qe(t," "),Dt("= ",Qe(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Qe(["extend enum",e,Qe(t," "),ds(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Qe(["extend input",e,Qe(t," "),ds(n)]," ")}};function Qe(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function ds(e){return Dt(`{ `,zv(Qe(e,` `)),` }`)}function Dt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function zv(e){return Dt(" ",e.replace(/\n/g,` `))}function mA(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` `)))!==null&&t!==void 0?t:!1}function gA(e){return e.kind===Ke.FIELD||e.kind===Ke.FRAGMENT_SPREAD||e.kind===Ke.INLINE_FRAGMENT}function Bm(e,t){var n=e.directives;return!n||!n.length?!0:gG(n).every(function(r){var i=r.directive,s=r.ifArgument,o=!1;return s.value.kind==="Variable"?(o=t&&t[s.value.name.value],et(o!==void 0,78,i.name.value)):o=s.value.value,i.name.value==="skip"?!o:o})}function Xp(e,t,n){var r=new Set(e),i=r.size;return Ps(t,{Directive:function(s){if(r.delete(s.name.value)&&(!n||!r.size))return qw}}),n?!r.size:r.size<i}function pG(e){return e&&Xp(["client","export"],e,!0)}function mG(e){var t=e.name.value;return t==="skip"||t==="include"}function gG(e){var t=[];return e&&e.length&&e.forEach(function(n){if(mG(n)){var r=n.arguments,i=n.name.value;et(r&&r.length===1,79,i);var s=r[0];et(s.name&&s.name.value==="if",80,i);var o=s.value;et(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),81,i),t.push({directive:n,ifArgument:s})}}),t}function vG(e){var t,n,r=(t=e.directives)===null||t===void 0?void 0:t.find(function(s){var o=s.name;return o.value==="unmask"});if(!r)return"mask";var i=(n=r.arguments)===null||n===void 0?void 0:n.find(function(s){var o=s.name;return o.value==="mode"});return globalThis.__DEV__!==!1&&i&&(i.value.kind===Ke.VARIABLE?globalThis.__DEV__!==!1&&et.warn(82):i.value.kind!==Ke.STRING?globalThis.__DEV__!==!1&&et.warn(83):i.value.value!=="migrate"&&globalThis.__DEV__!==!1&&et.warn(84,i.value.value)),i&&"value"in i.value&&i.value.value==="migrate"?"migrate":"unmask"}const yG=()=>Object.create(null),{forEach:bG,slice:vA}=Array.prototype,{hasOwnProperty:wG}=Object.prototype;class Ra{constructor(t=!0,n=yG){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return bG.call(t,r=>n=n.getChildTrie(r)),wG.call(n,"data")?n.data:n.data=this.makeData(vA.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,i=t.length;n&&r<i;++r){const s=n.mapFor(t[r],!1);n=s&&s.get(t[r])}return n&&n.data}remove(){return this.removeArray(arguments)}removeArray(t){let n;if(t.length){const r=t[0],i=this.mapFor(r,!1),s=i&&i.get(r);s&&(n=s.removeArray(vA.call(t,1)),!s.data&&!s.weak&&!(s.strong&&s.strong.size)&&i.delete(r))}else n=this.data,delete this.data;return n}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new Ra(this.weakness,this.makeData)),r}mapFor(t,n){return this.weakness&&_G(t)?this.weak||(n?this.weak=new WeakMap:void 0):this.strong||(n?this.strong=new Map:void 0)}}function _G(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var SG=bs(function(){return navigator.product})=="ReactNative",Ic=typeof WeakMap=="function"&&!(SG&&!global.HermesInternal),Kk=typeof WeakSet=="function",Az=typeof Symbol=="function"&&typeof Symbol.for=="function",Gw=Az&&Symbol.asyncIterator;bs(function(){return window.document.createElement});bs(function(){return navigator.userAgent.indexOf("jsdom")>=0});function Fn(e){return e!==null&&typeof e=="object"}function xG(e,t){var n=t,r=[];e.definitions.forEach(function(s){if(s.kind==="OperationDefinition")throw ni(85,s.operation,s.name?" named '".concat(s.name.value,"'"):"");s.kind==="FragmentDefinition"&&r.push(s)}),typeof n>"u"&&(et(r.length===1,86,r.length),n=r[0].name.value);var i=ge(ge({},e),{definitions:$r([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)});return i}function zf(e){e===void 0&&(e=[]);var t={};return e.forEach(function(n){t[n.name.value]=n}),t}function Kw(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var n=e.name.value;if(typeof t=="function")return t(n);var r=t&&t[n];return et(r,87,n),r||null}default:return null}}function EG(e){var t=!0;return Ps(e,{FragmentSpread:function(n){if(t=!!n.directives&&n.directives.some(function(r){return r.name.value==="unmask"}),!t)return qw}}),t}function TG(){}class S1{constructor(t=1/0,n=TG){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return n?(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0):!1}}function x1(){}const kG=x1,CG=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},OG=typeof WeakMap<"u"?WeakMap:Map,RG=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:x1,unregister:x1}},IG=10024;class Ny{constructor(t=1/0,n=kG){this.max=t,this.dispose=n,this.map=new OG,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let i=0;i<IG;i++){const s=r.next().value;if(!s)break;this.unfinalizedNodes.delete(s);const o=s.key;delete s.key,s.keyRef=new CG(o),this.registry.register(o,s,s)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new RG(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return n?(this.deleteNode(n),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var N_=new WeakSet;function Pz(e){e.size<=(e.max||-1)||N_.has(e)||(N_.add(e),setTimeout(function(){e.clean(),N_.delete(e)},100))}var Mz=function(e,t){var n=new Ny(e,t);return n.set=function(r,i){var s=Ny.prototype.set.call(this,r,i);return Pz(this),s},n},AG=function(e,t){var n=new S1(e,t);return n.set=function(r,i){var s=S1.prototype.set.call(this,r,i);return Pz(this),s},n},PG=Symbol.for("apollo.cacheSize"),pa=ge({},v1[PG]),Eu={};function Dz(e,t){Eu[e]=t}var MG=globalThis.__DEV__!==!1?FG:void 0,DG=globalThis.__DEV__!==!1?BG:void 0,NG=globalThis.__DEV__!==!1?Nz:void 0;function LG(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var n=t[0],r=t[1];return[n,pa[n]||r]}))}function FG(){var e,t,n,r,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:LG(),sizes:ge({print:(e=Eu.print)===null||e===void 0?void 0:e.call(Eu),parser:(t=Eu.parser)===null||t===void 0?void 0:t.call(Eu),canonicalStringify:(n=Eu.canonicalStringify)===null||n===void 0?void 0:n.call(Eu),links:T1(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:Fz(this.queryManager.documentTransform)}},(i=(r=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(r))}}function Nz(){return{cache:{fragmentQueryDocuments:Ja(this.getFragmentDoc)}}}function BG(){var e=this.config.fragments;return ge(ge({},Nz.apply(this)),{addTypenameDocumentTransform:Fz(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:Ja(this.storeReader.executeSelectionSet),executeSubSelectedArray:Ja(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:Ja(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:Ja(e==null?void 0:e.findFragmentSpreads),lookup:Ja(e==null?void 0:e.lookup),transform:Ja(e==null?void 0:e.transform)}})}function zG(e){return!!e&&"dirtyKey"in e}function Ja(e){return zG(e)?e.size:void 0}function Lz(e){return e!=null}function Fz(e){return E1(e).map(function(t){return{cache:t}})}function E1(e){return e?$r($r([Ja(e==null?void 0:e.performWork)],E1(e==null?void 0:e.left),!0),E1(e==null?void 0:e.right),!0).filter(Lz):[]}function T1(e){var t;return e?$r($r([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],T1(e==null?void 0:e.left),!0),T1(e==null?void 0:e.right),!0).filter(Lz):[]}var bl=Object.assign(function(t){return JSON.stringify(t,$G)},{reset:function(){gd=new AG(pa.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&Dz("canonicalStringify",function(){return gd.size});var gd;bl.reset();function $G(e,t){if(t&&typeof t=="object"){var n=Object.getPrototypeOf(t);if(n===Object.prototype||n===null){var r=Object.keys(t);if(r.every(HG))return t;var i=JSON.stringify(r),s=gd.get(i);if(!s){r.sort();var o=JSON.stringify(r);s=gd.get(o)||r,gd.set(i,s),gd.set(o,s)}var a=Object.create(n);return s.forEach(function(l){a[l]=t[l]}),a}}return t}function HG(e,t,n){return t===0||n[t-1]<=e}function Fd(e){return{__ref:String(e)}}function tn(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function VG(e){return Fn(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function jG(e){return e.kind==="StringValue"}function UG(e){return e.kind==="BooleanValue"}function WG(e){return e.kind==="IntValue"}function qG(e){return e.kind==="FloatValue"}function GG(e){return e.kind==="Variable"}function KG(e){return e.kind==="ObjectValue"}function YG(e){return e.kind==="ListValue"}function XG(e){return e.kind==="EnumValue"}function JG(e){return e.kind==="NullValue"}function Zd(e,t,n,r){if(WG(n)||qG(n))e[t.value]=Number(n.value);else if(UG(n)||jG(n))e[t.value]=n.value;else if(KG(n)){var i={};n.fields.map(function(o){return Zd(i,o.name,o.value,r)}),e[t.value]=i}else if(GG(n)){var s=(r||{})[n.name.value];e[t.value]=s}else if(YG(n))e[t.value]=n.values.map(function(o){var a={};return Zd(a,t,o,r),a[t.value]});else if(XG(n))e[t.value]=n.value;else if(JG(n))e[t.value]=null;else throw ni(96,t.value,n.kind)}function QG(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(i){n[i.name.value]={},i.arguments&&i.arguments.forEach(function(s){var o=s.name,a=s.value;return Zd(n[i.name.value],o,a,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(i){var s=i.name,o=i.value;return Zd(r,s,o,t)})),Bz(e.name.value,r,n)}var ZG=["connection","include","skip","client","rest","export","nonreactive"],hh=bl,Bz=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key)if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(a){i[a]=t[a]}),"".concat(n.connection.key,"(").concat(hh(i),")")}else return n.connection.key;var s=e;if(t){var o=hh(t);s+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(a){ZG.indexOf(a)===-1&&(n[a]&&Object.keys(n[a]).length?s+="@".concat(a,"(").concat(hh(n[a]),")"):s+="@".concat(a))}),s},{setStringify:function(e){var t=hh;return hh=e,t}});function Yw(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(r){var i=r.name,s=r.value;return Zd(n,i,s,t)}),n}return null}function ma(e){return e.alias?e.alias.value:e.name.value}function k1(e,t,n){for(var r,i=0,s=t.selections;i<s.length;i++){var o=s[i];if(Rl(o)){if(o.name.value==="__typename")return e[ma(o)]}else r?r.push(o):r=[o]}if(typeof e.__typename=="string")return e.__typename;if(r)for(var a=0,l=r;a<l.length;a++){var o=l[a],u=k1(e,Kw(o,n).selectionSet,n);if(typeof u=="string")return u}}function Rl(e){return e.kind==="Field"}function eK(e){return e.kind==="InlineFragment"}function $f(e){et(e&&e.kind==="Document",88);var t=e.definitions.filter(function(n){return n.kind!=="FragmentDefinition"}).map(function(n){if(n.kind!=="OperationDefinition")throw ni(89,n.kind);return n});return et(t.length<=1,90,t.length),e}function fc(e){return $f(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function Bh(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function Hf(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function zz(e){var t=fc(e);return et(t&&t.operation==="query",91),t}function $z(e){et(e.kind==="Document",92),et(e.definitions.length<=1,93);var t=e.definitions[0];return et(t.kind==="FragmentDefinition",94),t}function zm(e){$f(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if(i.kind==="OperationDefinition"){var s=i.operation;if(s==="query"||s==="mutation"||s==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw ni(95)}function Yk(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(r){r.defaultValue&&Zd(t,r.variable.name,r.defaultValue)}),t}let br=null;const yA={};let tK=1;const nK=()=>class{constructor(){this.id=["slot",tK++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=br;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===yA)break;return t!==br&&(br.slots[this.id]=n),!0}return br&&(br.slots[this.id]=yA),!1}getValue(){if(this.hasValue())return br.slots[this.id]}withValue(t,n,r,i){const s={__proto__:null,[this.id]:t},o=br;br={parent:o,slots:s};try{return n.apply(i,r)}finally{br=o}}static bind(t){const n=br;return function(){const r=br;try{return br=n,t.apply(this,arguments)}finally{br=r}}}static noContext(t,n,r){if(br){const i=br;try{return br=null,t.apply(r,n)}finally{br=i}}else return t.apply(r,n)}};function bA(e){try{return e()}catch{}}const L_="@wry/context:Slot",rK=bA(()=>globalThis)||bA(()=>global)||Object.create(null),wA=rK,Xk=wA[L_]||Array[L_]||function(e){try{Object.defineProperty(wA,L_,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(nK()),Xw=new Xk,{hasOwnProperty:iK}=Object.prototype,Jk=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function Qk(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const Jp=[],sK=100;function ef(e,t){if(!e)throw new Error(t||"assertion failure")}function Hz(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function Vz(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function jz(e){return e.slice(0)}class Jw{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Jw.count}peek(){if(this.value.length===1&&!Il(this))return _A(this),this.value[0]}recompute(t){return ef(!this.recomputing,"already recomputing"),_A(this),Il(this)?oK(this,t):Vz(this.value)}setDirty(){this.dirty||(this.dirty=!0,Uz(this),Qk(this))}dispose(){this.setDirty(),Yz(this),Zk(this,(t,n)=>{t.setDirty(),Xz(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Jp.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(Jk(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Jp.push(this.deps),this.deps=null)}}Jw.count=0;function _A(e){const t=Xw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Il(e)?qz(t,e):Gz(t,e),t}function oK(e,t){return Yz(e),Xw.withValue(e,aK,[e,t]),uK(e,t)&&lK(e),Vz(e.value)}function aK(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&e.value.length===1&&(r=jz(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!Hz(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function Il(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function lK(e){e.dirty=!1,!Il(e)&&Wz(e)}function Uz(e){Zk(e,qz)}function Wz(e){Zk(e,Gz)}function Zk(e,t){const n=e.parents.size;if(n){const r=Jk(e.parents);for(let i=0;i<n;++i)t(r[i],e)}}function qz(e,t){ef(e.childValues.has(t)),ef(Il(t));const n=!Il(e);if(!e.dirtyChildren)e.dirtyChildren=Jp.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),n&&Uz(e)}function Gz(e,t){ef(e.childValues.has(t)),ef(!Il(t));const n=e.childValues.get(t);n.length===0?e.childValues.set(t,jz(t.value)):Hz(n,t.value)||e.setDirty(),Kz(e,t),!Il(e)&&Wz(e)}function Kz(e,t){const n=e.dirtyChildren;n&&(n.delete(t),n.size===0&&(Jp.length<sK&&Jp.push(n),e.dirtyChildren=null))}function Yz(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{Xz(e,n)}),e.forgetDeps(),ef(e.dirtyChildren===null)}function Xz(e,t){t.parents.delete(e),e.childValues.delete(t),Kz(e,t)}function uK(e,t){if(typeof e.subscribe=="function")try{Qk(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const cK={setDirty:!0,dispose:!0,forget:!0};function Jz(e){const t=new Map;function n(r){const i=Xw.getValue();if(i){let s=t.get(r);s||t.set(r,s=new Set),i.dependOn(s)}}return n.dirty=function(i,s){const o=t.get(i);if(o){const a=s&&iK.call(cK,s)?s:"setDirty";Jk(o).forEach(l=>l[a]()),t.delete(i),Qk(o)}},n}let SA;function dK(...e){return(SA||(SA=new Ra(typeof WeakMap=="function"))).lookupArray(e)}const F_=new Set;function Qp(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=dK,normalizeResult:i,subscribe:s,cache:o=S1}=Object.create(null)){const a=typeof o=="function"?new o(t,f=>f.dispose()):o,l=function(){const f=r.apply(null,n?n.apply(null,arguments):arguments);if(f===void 0)return e.apply(null,arguments);let h=a.get(f);h||(a.set(f,h=new Jw(e)),h.normalizeResult=i,h.subscribe=s,h.forget=()=>a.delete(f));const p=h.recompute(Array.prototype.slice.call(arguments));return a.set(f,h),F_.add(a),Xw.hasValue()||(F_.forEach(m=>m.clean()),F_.clear()),p};Object.defineProperty(l,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:s,cache:a});function u(f){const h=f&&a.get(f);h&&h.setDirty()}l.dirtyKey=u,l.dirty=function(){u(r.apply(null,arguments))};function c(f){const h=f&&a.get(f);if(h)return h.peek()}l.peekKey=c,l.peek=function(){return c(r.apply(null,arguments))};function d(f){return f?a.delete(f):!1}return l.forgetKey=d,l.forget=function(){return d(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}function fK(e){return e}var Qz=function(){function e(t,n){n===void 0&&(n=Object.create(null)),this.resultCache=Kk?new WeakSet:new Set,this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=n.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(fK,{cache:!1})},e.split=function(t,n,r){return r===void 0&&(r=e.identity()),Object.assign(new e(function(i){var s=t(i)?n:r;return s.transformDocument(i)},{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new Ra(Ic);this.performWork=Qp(e.prototype.performWork.bind(this),{makeCacheKey:function(r){var i=t.getCacheKey(r);if(i)return et(Array.isArray(i),77),n.lookupArray(i)},max:pa["documentTransform.cache"],cache:Ny})}},e.prototype.performWork=function(t){return $f(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var n=this.performWork(t);return this.resultCache.add(n),n},e.prototype.concat=function(t){var n=this;return Object.assign(new e(function(r){return t.transformDocument(n.transformDocument(r))},{cache:!1}),{left:this,right:t})},e}(),np,Mu=Object.assign(function(e){var t=np.get(e);return t||(t=dG(e),np.set(e,t)),t},{reset:function(){np=new Mz(pa.print||2e3)}});Mu.reset();globalThis.__DEV__!==!1&&Dz("print",function(){return np?np.size:0});var Bn=Array.isArray;function bo(e){return Array.isArray(e)&&e.length>0}var xA={kind:Ke.FIELD,name:{kind:Ke.NAME,value:"__typename"}};function Zz(e,t){return!e||e.selectionSet.selections.every(function(n){return n.kind===Ke.FRAGMENT_SPREAD&&Zz(t[n.name.value],t)})}function hK(e){return Zz(fc(e)||$z(e),zf(Hf(e)))?null:e}function pK(e){var t=new Map,n=new Map;return e.forEach(function(r){r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),function(r){var i=t.get(r.name.value);return!i&&n.size&&n.forEach(function(s,o){o(r)&&(i=s)}),i}}function EA(e){var t=new Map;return function(r){r===void 0&&(r=e);var i=t.get(r);return i||t.set(r,i={variables:new Set,fragmentSpreads:new Set}),i}}function e5(e,t){$f(t);for(var n=EA(""),r=EA(""),i=function(v){for(var w=0,b=void 0;w<v.length&&(b=v[w]);++w)if(!Bn(b)){if(b.kind===Ke.OPERATION_DEFINITION)return n(b.name&&b.name.value);if(b.kind===Ke.FRAGMENT_DEFINITION)return r(b.name.value)}return globalThis.__DEV__!==!1&&et.error(97),null},s=0,o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===Ke.OPERATION_DEFINITION&&++s;var a=pK(e),l=function(v){return bo(v)&&v.map(a).some(function(w){return w&&w.remove})},u=new Map,c=!1,d={enter:function(v){if(l(v.directives))return c=!0,null}},f=Ps(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(v,w,b,_,x){var S=i(x);S&&S.variables.add(v.name.value)}},FragmentSpread:{enter:function(v,w,b,_,x){if(l(v.directives))return c=!0,null;var S=i(x);S&&S.fragmentSpreads.add(v.name.value)}},FragmentDefinition:{enter:function(v,w,b,_){u.set(JSON.stringify(_),v)},leave:function(v,w,b,_){var x=u.get(JSON.stringify(_));if(v===x)return v;if(s>0&&v.selectionSet.selections.every(function(S){return S.kind===Ke.FIELD&&S.name.value==="__typename"}))return r(v.name.value).removed=!0,c=!0,null}},Directive:{leave:function(v){if(a(v))return c=!0,null}}});if(!c)return t;var h=function(v){return v.transitiveVars||(v.transitiveVars=new Set(v.variables),v.removed||v.fragmentSpreads.forEach(function(w){h(r(w)).transitiveVars.forEach(function(b){v.transitiveVars.add(b)})})),v},p=new Set;f.definitions.forEach(function(v){v.kind===Ke.OPERATION_DEFINITION?h(n(v.name&&v.name.value)).fragmentSpreads.forEach(function(w){p.add(w)}):v.kind===Ke.FRAGMENT_DEFINITION&&s===0&&!r(v.name.value).removed&&p.add(v.name.value)}),p.forEach(function(v){h(r(v)).fragmentSpreads.forEach(function(w){p.add(w)})});var m=function(v){return!!(!p.has(v)||r(v).removed)},g={enter:function(v){if(m(v.name.value))return null}};return hK(Ps(f,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(v){if(v.variableDefinitions){var w=h(n(v.name&&v.name.value)).transitiveVars;if(w.size<v.variableDefinitions.length)return ge(ge({},v),{variableDefinitions:v.variableDefinitions.filter(function(b){return w.has(b.variable.name.value)})})}}}}))}var eC=Object.assign(function(e){return Ps(e,{SelectionSet:{enter:function(t,n,r){if(!(r&&r.kind===Ke.OPERATION_DEFINITION)){var i=t.selections;if(i){var s=i.some(function(a){return Rl(a)&&(a.name.value==="__typename"||a.name.value.lastIndexOf("__",0)===0)});if(!s){var o=r;if(!(Rl(o)&&o.directives&&o.directives.some(function(a){return a.name.value==="export"})))return ge(ge({},t),{selections:$r($r([],i,!0),[xA],!1)})}}}}}})},{added:function(e){return e===xA}});function mK(e){var t=zm(e),n=t.operation;if(n==="query")return e;var r=Ps(e,{OperationDefinition:{enter:function(i){return ge(ge({},i),{operation:"query"})}}});return r}function t5(e){$f(e);var t=e5([{test:function(n){return n.name.value==="client"},remove:!0}],e);return t}function gK(e){return $f(e),Ps(e,{FragmentSpread:function(t){var n;if(!(!((n=t.directives)===null||n===void 0)&&n.some(function(r){return r.name.value==="unmask"})))return ge(ge({},t),{directives:$r($r([],t.directives||[],!0),[{kind:Ke.DIRECTIVE,name:{kind:Ke.NAME,value:"nonreactive"}}],!1)})}})}var vK=Object.prototype.hasOwnProperty;function TA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Qw(e)}function Qw(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new Al,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var yK=function(e,t,n){return this.merge(e[n],t[n])},Al=function(){function e(t){t===void 0&&(t=yK),this.reconciler=t,this.isObject=Fn,this.pastCopies=new Set}return e.prototype.merge=function(t,n){for(var r=this,i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];return Fn(n)&&Fn(t)?(Object.keys(n).forEach(function(o){if(vK.call(t,o)){var a=t[o];if(n[o]!==a){var l=r.reconciler.apply(r,$r([t,n,o],i,!1));l!==a&&(t=r.shallowCopyForMerge(t),t[o]=l)}}else t=r.shallowCopyForMerge(t),t[o]=n[o]}),t):n},e.prototype.shallowCopyForMerge=function(t){return Fn(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=ge({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function bK(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=wK(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wK(e,t){if(e){if(typeof e=="string")return kA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kA(e,t)}}function kA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tC(e,t,n){return t&&CA(e.prototype,t),n&&CA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var nC=function(){return typeof Symbol=="function"},rC=function(e){return nC()&&!!Symbol[e]},iC=function(e){return rC(e)?Symbol[e]:"@@"+e};nC()&&!rC("observable")&&(Symbol.observable=Symbol("observable"));var _K=iC("iterator"),C1=iC("observable"),n5=iC("species");function Ly(e,t){var n=e[t];if(n!=null){if(typeof n!="function")throw new TypeError(n+" is not a function");return n}}function ph(e){var t=e.constructor;return t!==void 0&&(t=t[n5],t===null&&(t=void 0)),t!==void 0?t:bn}function SK(e){return e instanceof bn}function tf(e){tf.log?tf.log(e):setTimeout(function(){throw e})}function $v(e){Promise.resolve().then(function(){try{e()}catch(t){tf(t)}})}function r5(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var n=Ly(t,"unsubscribe");n&&n.call(t)}}catch(r){tf(r)}}function O1(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function xK(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(i5(e,t[n].type,t[n].value),e._state!=="closed");++n);}}function i5(e,t,n){e._state="running";var r=e._observer;try{var i=Ly(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(O1(e),i)i.call(r,n);else throw n;break;case"complete":O1(e),i&&i.call(r);break}}catch(s){tf(s)}e._state==="closed"?r5(e):e._state==="running"&&(e._state="ready")}function B_(e,t,n){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:n});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:n}],$v(function(){return xK(e)});return}i5(e,t,n)}}var EK=function(){function e(n,r){this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new TK(this);try{this._cleanup=r.call(void 0,i)}catch(s){i.error(s)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(O1(this),r5(this))},tC(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),TK=function(){function e(n){this._subscription=n}var t=e.prototype;return t.next=function(r){B_(this._subscription,"next",r)},t.error=function(r){B_(this._subscription,"error",r)},t.complete=function(){B_(this._subscription,"complete")},tC(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),bn=function(){function e(n){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof n!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=n}var t=e.prototype;return t.subscribe=function(r){return(typeof r!="object"||r===null)&&(r={next:r,error:arguments[1],complete:arguments[2]}),new EK(r,this._subscriber)},t.forEach=function(r){var i=this;return new Promise(function(s,o){if(typeof r!="function"){o(new TypeError(r+" is not a function"));return}function a(){l.unsubscribe(),s()}var l=i.subscribe({next:function(u){try{r(u,a)}catch(c){o(c),l.unsubscribe()}},error:o,complete:s})})},t.map=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var s=ph(this);return new s(function(o){return i.subscribe({next:function(a){try{a=r(a)}catch(l){return o.error(l)}o.next(a)},error:function(a){o.error(a)},complete:function(){o.complete()}})})},t.filter=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var s=ph(this);return new s(function(o){return i.subscribe({next:function(a){try{if(!r(a))return}catch(l){return o.error(l)}o.next(a)},error:function(a){o.error(a)},complete:function(){o.complete()}})})},t.reduce=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var s=ph(this),o=arguments.length>1,a=!1,l=arguments[1],u=l;return new s(function(c){return i.subscribe({next:function(d){var f=!a;if(a=!0,!f||o)try{u=r(u,d)}catch(h){return c.error(h)}else u=d},error:function(d){c.error(d)},complete:function(){if(!a&&!o)return c.error(new TypeError("Cannot reduce an empty sequence"));c.next(u),c.complete()}})})},t.concat=function(){for(var r=this,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];var a=ph(this);return new a(function(l){var u,c=0;function d(f){u=f.subscribe({next:function(h){l.next(h)},error:function(h){l.error(h)},complete:function(){c===s.length?(u=void 0,l.complete()):d(a.from(s[c++]))}})}return d(r),function(){u&&(u.unsubscribe(),u=void 0)}})},t.flatMap=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var s=ph(this);return new s(function(o){var a=[],l=i.subscribe({next:function(c){if(r)try{c=r(c)}catch(f){return o.error(f)}var d=s.from(c).subscribe({next:function(f){o.next(f)},error:function(f){o.error(f)},complete:function(){var f=a.indexOf(d);f>=0&&a.splice(f,1),u()}});a.push(d)},error:function(c){o.error(c)},complete:function(){u()}});function u(){l.closed&&a.length===0&&o.complete()}return function(){a.forEach(function(c){return c.unsubscribe()}),l.unsubscribe()}})},t[C1]=function(){return this},e.from=function(r){var i=typeof this=="function"?this:e;if(r==null)throw new TypeError(r+" is not an object");var s=Ly(r,C1);if(s){var o=s.call(r);if(Object(o)!==o)throw new TypeError(o+" is not an object");return SK(o)&&o.constructor===i?o:new i(function(a){return o.subscribe(a)})}if(rC("iterator")&&(s=Ly(r,_K),s))return new i(function(a){$v(function(){if(!a.closed){for(var l=bK(s.call(r)),u;!(u=l()).done;){var c=u.value;if(a.next(c),a.closed)return}a.complete()}})});if(Array.isArray(r))return new i(function(a){$v(function(){if(!a.closed){for(var l=0;l<r.length;++l)if(a.next(r[l]),a.closed)return;a.complete()}})});throw new TypeError(r+" is not observable")},e.of=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=typeof this=="function"?this:e;return new o(function(a){$v(function(){if(!a.closed){for(var l=0;l<i.length;++l)if(a.next(i[l]),a.closed)return;a.complete()}})})},tC(e,null,[{key:n5,get:function(){return this}}]),e}();nC()&&Object.defineProperty(bn,Symbol("extensions"),{value:{symbol:C1,hostReportError:tf},configurable:!0});function kK(e){var t,n=e.Symbol;if(typeof n=="function")if(n.observable)t=n.observable;else{typeof n.for=="function"?t=n.for("https://github.com/benlesh/symbol-observable"):t=n("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch{}}else t="@@observable";return t}var nd;typeof self<"u"?nd=self:typeof window<"u"?nd=window:typeof global<"u"?nd=global:typeof Ek<"u"?nd=Ek:nd=Function("return this")();kK(nd);var OA=bn.prototype,RA="@@observable";OA[RA]||(OA[RA]=function(){return this});function CK(e){return e.catch(function(){}),e}var OK=Object.prototype.toString;function s5(e){return R1(e)}function R1(e,t){switch(OK.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(i,s){n[s]=R1(i,t)}),n}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(i){r[i]=R1(e[i],t)}),r}default:return e}}function RK(e){var t=new Set([e]);return t.forEach(function(n){Fn(n)&&IK(n)===n&&Object.getOwnPropertyNames(n).forEach(function(r){Fn(n[r])&&t.add(n[r])})}),e}function IK(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function Fy(e){return globalThis.__DEV__!==!1&&RK(e),e}function rp(e,t,n){var r=[];e.forEach(function(i){return i[t]&&r.push(i)}),r.forEach(function(i){return i[t](n)})}function z_(e,t,n){return new bn(function(r){var i={then:function(l){return new Promise(function(u){return u(l())})}};function s(l,u){return function(c){if(l){var d=function(){return r.closed?0:l(c)};i=i.then(d,d).then(function(f){return r.next(f)},function(f){return r.error(f)})}else r[u](c)}}var o={next:s(t,"next"),error:s(n,"error"),complete:function(){i.then(function(){return r.complete()})}},a=e.subscribe(o);return function(){return a.unsubscribe()}})}function o5(e){function t(n){Object.defineProperty(e,n,{value:bn})}return Az&&Symbol.species&&t(Symbol.species),t("@@species"),e}function IA(e){return e&&typeof e.then=="function"}var rd=function(e){Oo(t,e);function t(n){var r=e.call(this,function(i){return r.addObserver(i),function(){return r.removeObserver(i)}})||this;return r.observers=new Set,r.promise=new Promise(function(i,s){r.resolve=i,r.reject=s}),r.handlers={next:function(i){r.sub!==null&&(r.latest=["next",i],r.notify("next",i),rp(r.observers,"next",i))},error:function(i){var s=r.sub;s!==null&&(s&&setTimeout(function(){return s.unsubscribe()}),r.sub=null,r.latest=["error",i],r.reject(i),r.notify("error",i),rp(r.observers,"error",i))},complete:function(){var i=r,s=i.sub,o=i.sources,a=o===void 0?[]:o;if(s!==null){var l=a.shift();l?IA(l)?l.then(function(u){return r.sub=u.subscribe(r.handlers)},r.handlers.error):r.sub=l.subscribe(r.handlers):(s&&setTimeout(function(){return s.unsubscribe()}),r.sub=null,r.latest&&r.latest[0]==="next"?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),rp(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(i){r.reject(i),r.sources=[],r.handlers.error(i)},r.promise.catch(function(i){}),typeof n=="function"&&(n=[new bn(n)]),IA(n)?n.then(function(i){return r.start(i)},r.handlers.error):r.start(n),r}return t.prototype.start=function(n){this.sub===void 0&&(this.sources=Array.from(n),this.handlers.complete())},t.prototype.deliverLastMessage=function(n){if(this.latest){var r=this.latest[0],i=n[r];i&&i.call(n,this.latest[1]),this.sub===null&&r==="next"&&n.complete&&n.complete()}},t.prototype.addObserver=function(n){this.observers.has(n)||(this.deliverLastMessage(n),this.observers.add(n))},t.prototype.removeObserver=function(n){this.observers.delete(n)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(n,r){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(s){return s(n,r)}))},t.prototype.beforeNext=function(n){var r=!1;this.nextResultListeners.add(function(i,s){r||(r=!0,n(i,s))})},t}(bn);o5(rd);function Bd(e){return"incremental"in e}function AK(e){return"hasNext"in e&&"data"in e}function PK(e){return Bd(e)||AK(e)}function MK(e){return Fn(e)&&"payload"in e}function a5(e,t){var n=e,r=new Al;return Bd(t)&&bo(t.incremental)&&t.incremental.forEach(function(i){for(var s=i.data,o=i.path,a=o.length-1;a>=0;--a){var l=o[a],u=!isNaN(+l),c=u?[]:{};c[l]=s,s=c}n=r.merge(n,s)}),n}function Hv(e){var t=I1(e);return bo(t)}function I1(e){var t=bo(e.errors)?e.errors.slice(0):[];return Bd(e)&&bo(e.incremental)&&e.incremental.forEach(function(n){n.errors&&t.push.apply(t,n.errors)}),t}function nf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(r){r&&Object.keys(r).forEach(function(i){var s=r[i];s!==void 0&&(n[i]=s)})}),n}function $_(e,t){return nf(e,t,t.variables&&{variables:nf(ge(ge({},e&&e.variables),t.variables))})}function H_(e){return new bn(function(t){t.error(e)})}var l5=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r};function DK(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw ni(46,i)}return e}function NK(e,t){var n=ge({},e),r=function(s){typeof s=="function"?n=ge(ge({},n),s(n)):n=ge(ge({},n),s)},i=function(){return ge({},n)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:r}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function LK(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?Bh(t.query)||void 0:""),t}function FK(e,t){var n=ge({},e),r=new Set(Object.keys(e));return Ps(t,{Variable:function(i,s,o){o&&o.kind!=="VariableDefinition"&&r.delete(i.name.value)}}),r.forEach(function(i){delete n[i]}),n}function AA(e,t){return t?t(e):bn.of()}function mh(e){return typeof e=="function"?new Vf(e):e}function kg(e){return e.request.length<=1}var Vf=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return bn.of()})},e.from=function(t){return t.length===0?e.empty():t.map(mh).reduce(function(n,r){return n.concat(r)})},e.split=function(t,n,r){var i=mh(n),s=mh(r||new e(AA)),o;return kg(i)&&kg(s)?o=new e(function(a){return t(a)?i.request(a)||bn.of():s.request(a)||bn.of()}):o=new e(function(a,l){return t(a)?i.request(a,l)||bn.of():s.request(a,l)||bn.of()}),Object.assign(o,{left:i,right:s})},e.execute=function(t,n){return t.request(NK(n.context,LK(DK(n))))||bn.of()},e.concat=function(t,n){var r=mh(t);if(kg(r))return globalThis.__DEV__!==!1&&et.warn(38,r),r;var i=mh(n),s;return kg(i)?s=new e(function(o){return r.request(o,function(a){return i.request(a)||bn.of()})||bn.of()}):s=new e(function(o,a){return r.request(o,function(l){return i.request(l,a)||bn.of()})||bn.of()}),Object.assign(s,{left:r,right:i})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(AA)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,n){throw ni(39)},e.prototype.onError=function(t,n){if(n&&n.error)return n.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),A1=Vf.execute;function BK(e){var t,n=e[Symbol.asyncIterator]();return t={next:function(){return n.next()}},t[Symbol.asyncIterator]=function(){return this},t}function zK(e){var t=null,n=null,r=!1,i=[],s=[];function o(d){if(!n){if(s.length){var f=s.shift();if(Array.isArray(f)&&f[0])return f[0]({value:d,done:!1})}i.push(d)}}function a(d){n=d;var f=s.slice();f.forEach(function(h){h[1](d)}),!t||t()}function l(){r=!0;var d=s.slice();d.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",o),e.removeListener("error",a),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",o),e.on("error",a),e.on("end",l),e.on("finish",l),e.on("close",l);function u(){return new Promise(function(d,f){if(n)return f(n);if(i.length)return d({value:i.shift(),done:!1});if(r)return d({value:void 0,done:!0});s.push([d,f])})}var c={next:function(){return u()}};return Gw&&(c[Symbol.asyncIterator]=function(){return this}),c}function $K(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(r,i){e.then(function(s){r({value:s,done:!1})}).catch(i)}))}};return Gw&&(n[Symbol.asyncIterator]=function(){return this}),n}function PA(e){var t={next:function(){return e.read()}};return Gw&&(t[Symbol.asyncIterator]=function(){return this}),t}function HK(e){return!!e.body}function VK(e){return!!e.getReader}function jK(e){return!!(Gw&&e[Symbol.asyncIterator])}function UK(e){return!!e.stream}function WK(e){return!!e.arrayBuffer}function qK(e){return!!e.pipe}function GK(e){var t=e;if(HK(e)&&(t=e.body),jK(t))return BK(t);if(VK(t))return PA(t.getReader());if(UK(t))return PA(t.stream().getReader());if(WK(t))return $K(t.arrayBuffer());if(qK(t))return zK(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var sC=Symbol();function KK(e){return e.extensions?Array.isArray(e.extensions[sC]):!1}function oC(e){return e.hasOwnProperty("graphQLErrors")}var YK=function(e){var t=$r($r($r([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(n){return Fn(n)&&n.message||"Error message not found."}).join(` `)},Zs=function(e){Oo(t,e);function t(n){var r=n.graphQLErrors,i=n.protocolErrors,s=n.clientErrors,o=n.networkError,a=n.errorMessage,l=n.extraInfo,u=e.call(this,a)||this;return u.name="ApolloError",u.graphQLErrors=r||[],u.protocolErrors=i||[],u.clientErrors=s||[],u.networkError=o||null,u.message=a||YK(u),u.extraInfo=l,u.cause=$r($r($r([o],r||[],!0),i||[],!0),s||[],!0).find(function(c){return!!c})||null,u.__proto__=t.prototype,u}return t}(Error),MA=Object.prototype.hasOwnProperty;function XK(e,t){return Ya(this,void 0,void 0,function(){var n,r,i,s,o,a,l,u,c,d,f,h,p,m,g,v,w,b,_,x,S,I,P,R;return Xa(this,function(O){switch(O.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");n=new TextDecoder("utf-8"),r=(R=e.headers)===null||R===void 0?void 0:R.get("content-type"),i="boundary=",s=r!=null&&r.includes(i)?r==null?void 0:r.substring((r==null?void 0:r.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",o=`\r --`.concat(s),a="",l=GK(e),u=!0,O.label=1;case 1:return u?[4,l.next()]:[3,3];case 2:for(c=O.sent(),d=c.value,f=c.done,h=typeof d=="string"?d:n.decode(d),p=a.length-o.length+1,u=!f,a+=h,m=a.indexOf(o,p);m>-1;){if(g=void 0,I=[a.slice(0,m),a.slice(m+o.length)],g=I[0],a=I[1],v=g.indexOf(`\r \r `),w=JK(g.slice(0,v)),b=w["content-type"],b&&b.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(_=g.slice(v),_){if(x=u5(e,_),Object.keys(x).length>1||"data"in x||"incremental"in x||"errors"in x||"payload"in x)if(MK(x)){if(S={},"payload"in x){if(Object.keys(x).length===1&&x.payload===null)return[2];S=ge({},x.payload)}"errors"in x&&(S=ge(ge({},S),{extensions:ge(ge({},"extensions"in S?S.extensions:null),(P={},P[sC]=x.errors,P))})),t(S)}else t(x);else if(Object.keys(x).length===1&&"hasNext"in x&&!x.hasNext)return[2]}m=a.indexOf(o)}return[3,1];case 3:return[2]}})})}function JK(e){var t={};return e.split(` `).forEach(function(n){var r=n.indexOf(":");if(r>-1){var i=n.slice(0,r).trim().toLowerCase(),s=n.slice(r+1).trim();t[i]=s}}),t}function u5(e,t){if(e.status>=300){var n=function(){try{return JSON.parse(t)}catch{return t}};l5(e,n(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var r=i;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function QK(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function ZK(e){return function(t){return t.text().then(function(n){return u5(t,n)}).then(function(n){return!Array.isArray(n)&&!MA.call(n,"data")&&!MA.call(n,"errors")&&l5(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(r){return r.operationName}):e.operationName,"'.")),n})}}var P1=function(e,t){var n;try{n=JSON.stringify(e)}catch(i){var r=ni(42,t,i.message);throw r.parseError=i,r}return n},eY={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},tY={accept:"*/*","content-type":"application/json"},nY={method:"POST"},rY={http:eY,headers:tY,options:nY},iY=function(e,t){return t(e)};function sY(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},s={};n.forEach(function(d){i=ge(ge(ge({},i),d.options),{headers:ge(ge({},i.headers),d.headers)}),d.credentials&&(i.credentials=d.credentials),s=ge(ge({},s),d.http)}),i.headers&&(i.headers=oY(i.headers,s.preserveHeaderCase));var o=e.operationName,a=e.extensions,l=e.variables,u=e.query,c={operationName:o,variables:l};return s.includeExtensions&&(c.extensions=a),s.includeQuery&&(c.query=t(u,Mu)),{options:i,body:c}}function oY(e,t){if(!t){var n={};return Object.keys(Object(e)).forEach(function(s){n[s.toLowerCase()]=e[s]}),n}var r={};Object.keys(Object(e)).forEach(function(s){r[s.toLowerCase()]={originalName:s,value:e[s]}});var i={};return Object.keys(r).forEach(function(s){i[r[s].originalName]=r[s].value}),i}var aY=function(e){if(!e&&typeof fetch>"u")throw ni(40)},lY=function(e,t){var n=e.getContext(),r=n.uri;return r||(typeof t=="function"?t(e):t||"/graphql")};function uY(e,t){var n=[],r=function(d,f){n.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=P1(t.variables,"Variables map")}catch(d){return{parseError:d}}r("variables",i)}if(t.extensions){var s=void 0;try{s=P1(t.extensions,"Extensions map")}catch(d){return{parseError:d}}r("extensions",s)}var o="",a=e,l=e.indexOf("#");l!==-1&&(o=e.substr(l),a=e.substr(0,l));var u=a.indexOf("?")===-1?"?":"&",c=a+u+n.join("&")+o;return{newURI:c}}var DA=bs(function(){return fetch}),cY=function(e){e===void 0&&(e={});var t=e.uri,n=t===void 0?"/graphql":t,r=e.fetch,i=e.print,s=i===void 0?iY:i,o=e.includeExtensions,a=e.preserveHeaderCase,l=e.useGETForQueries,u=e.includeUnusedVariables,c=u===void 0?!1:u,d=ua(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&aY(r||DA);var f={http:{includeExtensions:o,preserveHeaderCase:a},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new Vf(function(h){var p=lY(h,n),m=h.getContext(),g={};if(m.clientAwareness){var v=m.clientAwareness,w=v.name,b=v.version;w&&(g["apollographql-client-name"]=w),b&&(g["apollographql-client-version"]=b)}var _=ge(ge({},g),m.headers),x={http:m.http,options:m.fetchOptions,credentials:m.credentials,headers:_};if(Xp(["client"],h.query)){var S=t5(h.query);if(!S)return H_(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));h.query=S}var I=sY(h,s,rY,f,x),P=I.options,R=I.body;R.variables&&!c&&(R.variables=FK(R.variables,h.query));var O;!P.signal&&typeof AbortController<"u"&&(O=new AbortController,P.signal=O.signal);var M=function(ne){return ne.kind==="OperationDefinition"&&ne.operation==="mutation"},E=function(ne){return ne.kind==="OperationDefinition"&&ne.operation==="subscription"},L=E(zm(h.query)),j=Xp(["defer"],h.query);if(l&&!h.query.definitions.some(M)&&(P.method="GET"),j||L){P.headers=P.headers||{};var F="multipart/mixed;";L&&j&&globalThis.__DEV__!==!1&&et.warn(41),L?F+="boundary=graphql;subscriptionSpec=1.0,application/json":j&&(F+="deferSpec=20220824,application/json"),P.headers.accept=F}if(P.method==="GET"){var B=uY(p,R),Y=B.newURI,Z=B.parseError;if(Z)return H_(Z);p=Y}else try{P.body=P1(R,"Payload")}catch(ne){return H_(ne)}return new bn(function(ne){var oe=r||bs(function(){return fetch})||DA,le=ne.next.bind(ne);return oe(p,P).then(function(Ee){var xe;h.setContext({response:Ee});var Me=(xe=Ee.headers)===null||xe===void 0?void 0:xe.get("content-type");return Me!==null&&/^multipart\/mixed/i.test(Me)?XK(Ee,le):ZK(h)(Ee).then(le)}).then(function(){O=void 0,ne.complete()}).catch(function(Ee){O=void 0,QK(Ee,ne)}),function(){O&&O.abort()}})})},aC=function(e){Oo(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,cY(n).request)||this;return r.options=n,r}return t}(Vf);const{toString:NA,hasOwnProperty:dY}=Object.prototype,LA=Function.prototype.toString,M1=new Map;function wn(e,t){try{return D1(e,t)}finally{M1.clear()}}function D1(e,t){if(e===t)return!0;const n=NA.call(e),r=NA.call(t);if(n!==r)return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(BA(e,t))return!0;const i=FA(e),s=FA(t),o=i.length;if(o!==s.length)return!1;for(let a=0;a<o;++a)if(!dY.call(t,i[a]))return!1;for(let a=0;a<o;++a){const l=i[a];if(!D1(e[l],t[l]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(BA(e,t))return!0;const i=e.entries(),s=n==="[object Map]";for(;;){const o=i.next();if(o.done)break;const[a,l]=o.value;if(!t.has(a)||s&&!D1(l,t.get(a)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=LA.call(e);return i!==LA.call(t)?!1:!pY(i,hY)}}return!1}function FA(e){return Object.keys(e).filter(fY,e)}function fY(e){return this[e]!==void 0}const hY="{ [native code] }";function pY(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function BA(e,t){let n=M1.get(e);if(n){if(n.has(t))return!0}else M1.set(e,n=new Set);return n.add(t),!1}function c5(e,t,n,r){var i=t.data,s=ua(t,["data"]),o=n.data,a=ua(n,["data"]);return wn(s,a)&&Vv(zm(e).selectionSet,i,o,{fragmentMap:zf(Hf(e)),variables:r})}function Vv(e,t,n,r){if(t===n)return!0;var i=new Set;return e.selections.every(function(s){if(i.has(s)||(i.add(s),!Bm(s,r.variables))||zA(s))return!0;if(Rl(s)){var o=ma(s),a=t&&t[o],l=n&&n[o],u=s.selectionSet;if(!u)return wn(a,l);var c=Array.isArray(a),d=Array.isArray(l);if(c!==d)return!1;if(c&&d){var f=a.length;if(l.length!==f)return!1;for(var h=0;h<f;++h)if(!Vv(u,a[h],l[h],r))return!1;return!0}return Vv(u,a,l,r)}else{var p=Kw(s,r.fragmentMap);if(p)return zA(p)?!0:Vv(p.selectionSet,t,n,r)}})}function zA(e){return!!e.directives&&e.directives.some(mY)}function mY(e){return e.name.value==="nonreactive"}var d5=Ic?WeakMap:Map,f5=Kk?WeakSet:Set,lC=new Xk,$A=!1;function h5(){$A||($A=!0,globalThis.__DEV__!==!1&&et.warn(52))}function p5(e,t,n){return lC.withValue(!0,function(){var r=zh(e,t,n,!1);return Object.isFrozen(e)&&Fy(r),r})}function gY(e,t){if(t.has(e))return t.get(e);var n=Array.isArray(e)?[]:Object.create(null);return t.set(e,n),n}function zh(e,t,n,r,i){var s,o=n.knownChanged,a=gY(e,n.mutableTargets);if(Array.isArray(e)){for(var l=0,u=Array.from(e.entries());l<u.length;l++){var c=u[l],d=c[0],f=c[1];if(f===null){a[d]=null;continue}var h=zh(f,t,n,r,globalThis.__DEV__!==!1?"".concat(i||"","[").concat(d,"]"):void 0);o.has(h)&&o.add(a),a[d]=h}return o.has(a)?a:e}for(var p=0,m=t.selections;p<m.length;p++){var g=m[p],v=void 0;if(r&&o.add(a),g.kind===Ke.FIELD){var w=ma(g),b=g.selectionSet;if(v=a[w]||e[w],v===void 0)continue;if(b&&v!==null){var h=zh(e[w],b,n,r,globalThis.__DEV__!==!1?"".concat(i||"",".").concat(w):void 0);o.has(h)&&(v=h)}globalThis.__DEV__===!1&&(a[w]=v),globalThis.__DEV__!==!1&&(r&&w!=="__typename"&&!(!((s=Object.getOwnPropertyDescriptor(a,w))===null||s===void 0)&&s.value)?Object.defineProperty(a,w,vY(w,v,i||"",n.operationName,n.operationType)):(delete a[w],a[w]=v))}if(g.kind===Ke.INLINE_FRAGMENT&&(!g.typeCondition||n.cache.fragmentMatches(g,e.__typename))&&(v=zh(e,g.selectionSet,n,r,i)),g.kind===Ke.FRAGMENT_SPREAD){var _=g.name.value,x=n.fragmentMap[_]||(n.fragmentMap[_]=n.cache.lookupFragment(_));et(x,47,_);var S=vG(g);S!=="mask"&&(v=zh(e,x.selectionSet,n,S==="migrate",i))}o.has(v)&&o.add(a)}return"__typename"in e&&!("__typename"in a)&&(a.__typename=e.__typename),Object.keys(a).length!==Object.keys(e).length&&o.add(a),o.has(a)?a:e}function vY(e,t,n,r,i){var s=function(){return lC.getValue()||(globalThis.__DEV__!==!1&&et.warn(48,r?"".concat(i," '").concat(r,"'"):"anonymous ".concat(i),"".concat(n,".").concat(e).replace(/^\./,"")),s=function(){return t}),t};return{get:function(){return s()},set:function(o){s=function(){return o}},enumerable:!0,configurable:!0}}function m5(e,t,n,r){if(!n.fragmentMatches)return globalThis.__DEV__!==!1&&h5(),e;var i=t.definitions.filter(function(o){return o.kind===Ke.FRAGMENT_DEFINITION});typeof r>"u"&&(et(i.length===1,49,i.length),r=i[0].name.value);var s=i.find(function(o){return o.name.value===r});return et(!!s,50,r),e==null||wn(e,{})?e:p5(e,s.selectionSet,{operationType:"fragment",operationName:s.name.value,fragmentMap:zf(Hf(t)),cache:n,mutableTargets:new d5,knownChanged:new f5})}function yY(e,t,n){var r;if(!n.fragmentMatches)return globalThis.__DEV__!==!1&&h5(),e;var i=fc(t);return et(i,51),e==null?e:p5(e,i.selectionSet,{operationType:i.operation,operationName:(r=i.name)===null||r===void 0?void 0:r.value,fragmentMap:zf(Hf(t)),cache:n,mutableTargets:new d5,knownChanged:new f5})}var g5=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=Qp(xG,{max:pa["cache.fragmentQueryDocuments"]||1e3,cache:Ny})}return e.prototype.lookupFragment=function(t){return null},e.prototype.batch=function(t){var n=this,r=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(n)},r),i},e.prototype.recordOptimisticTransaction=function(t,n){this.performTransaction(t,n)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(ge(ge({},t),{rootId:t.id||"ROOT_QUERY",optimistic:n}))},e.prototype.watchFragment=function(t){var n=this,r=t.fragment,i=t.fragmentName,s=t.from,o=t.optimistic,a=o===void 0?!0:o,l=ua(t,["fragment","fragmentName","from","optimistic"]),u=this.getFragmentDoc(r,i),c=typeof s>"u"||typeof s=="string"?s:this.identify(s),d=!!t[Symbol.for("apollo.dataMasking")];if(globalThis.__DEV__!==!1){var f=i||$z(r).name.value;c||globalThis.__DEV__!==!1&&et.warn(1,f)}var h=ge(ge({},l),{returnPartialData:!0,id:c,query:u,optimistic:a}),p;return new bn(function(m){return n.watch(ge(ge({},h),{immediate:!0,callback:function(g){var v=d?m5(g.result,r,n,i):g.result;if(!(p&&c5(u,{data:p==null?void 0:p.result},{data:v}))){var w={data:v,complete:!!g.complete};g.missing&&(w.missing=Qw(g.missing.map(function(b){return b.missing}))),p=ge(ge({},g),{result:v}),m.next(w)}}}))})},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(ge(ge({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:n}))},e.prototype.writeQuery=function(t){var n=t.id,r=t.data,i=ua(t,["id","data"]);return this.write(Object.assign(i,{dataId:n||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(t){var n=t.id,r=t.data,i=t.fragment,s=t.fragmentName,o=ua(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(i,s),dataId:n,result:r}))},e.prototype.updateQuery=function(t,n){return this.batch({update:function(r){var i=r.readQuery(t),s=n(i);return s==null?i:(r.writeQuery(ge(ge({},t),{data:s})),s)}})},e.prototype.updateFragment=function(t,n){return this.batch({update:function(r){var i=r.readFragment(t),s=n(i);return s==null?i:(r.writeFragment(ge(ge({},t),{data:s})),s)}})},e}();globalThis.__DEV__!==!1&&(g5.prototype.getMemoryInternals=NG);var v5=function(e){Oo(t,e);function t(n,r,i,s){var o,a=e.call(this,n)||this;if(a.message=n,a.path=r,a.query=i,a.variables=s,Array.isArray(a.path)){a.missing=a.message;for(var l=a.path.length-1;l>=0;--l)a.missing=(o={},o[a.path[l]]=a.missing,o)}else a.missing=a.path;return a.__proto__=t.prototype,a}return t}(Error),cr=Object.prototype.hasOwnProperty;function gh(e){return e==null}function y5(e,t){var n=e.__typename,r=e.id,i=e._id;if(typeof n=="string"&&(t&&(t.keyObject=gh(r)?gh(i)?void 0:{_id:i}:{id:r}),gh(r)&&!gh(i)&&(r=i),!gh(r)))return"".concat(n,":").concat(typeof r=="number"||typeof r=="string"?r:JSON.stringify(r))}var b5={dataIdFromObject:y5,addTypename:!0,resultCaching:!0,canonizeResults:!1};function bY(e){return nf(b5,e)}function w5(e){var t=e.canonizeResults;return t===void 0?b5.canonizeResults:t}function wY(e,t){return tn(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var _5=/^[_a-z][_0-9a-z]*/i;function Pl(e){var t=e.match(_5);return t?t[0]:e}function N1(e,t,n){return Fn(t)?Bn(t)?t.every(function(r){return N1(e,r,n)}):e.selections.every(function(r){if(Rl(r)&&Bm(r,n)){var i=ma(r);return cr.call(t,i)&&(!r.selectionSet||N1(r.selectionSet,t[i],n))}return!0}):!1}function vd(e){return Fn(e)&&!tn(e)&&!Bn(e)}function _Y(){return new Al}function S5(e,t){var n=zf(Hf(e));return{fragmentMap:n,lookupFragment:function(r){var i=n[r];return!i&&t&&(i=t.lookup(r)),i||null}}}var jv=Object.create(null),V_=function(){return jv},HA=Object.create(null),Zw=function(){function e(t,n){var r=this;this.policies=t,this.group=n,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,s){return Fy(tn(i)?r.get(i.__ref,s):i&&i[s])},this.canRead=function(i){return tn(i)?r.has(i.__ref):typeof i=="object"},this.toReference=function(i,s){if(typeof i=="string")return Fd(i);if(tn(i))return i;var o=r.policies.identify(i)[0];if(o){var a=Fd(o);return s&&r.merge(o,i),a}}}return e.prototype.toObject=function(){return ge({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,n){if(this.group.depend(t,n),cr.call(this.data,t)){var r=this.data[t];if(r&&cr.call(r,n))return r[n]}if(n==="__typename"&&cr.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof $a)return this.parent.get(t,n)},e.prototype.lookup=function(t,n){if(n&&this.group.depend(t,"__exists"),cr.call(this.data,t))return this.data[t];if(this instanceof $a)return this.parent.lookup(t,n);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,n){var r=this,i;tn(t)&&(t=t.__ref),tn(n)&&(n=n.__ref);var s=typeof t=="string"?this.lookup(i=t):t,o=typeof n=="string"?this.lookup(i=n):n;if(o){et(typeof i=="string",2);var a=new Al(xY).merge(s,o);if(this.data[i]=a,a!==s&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);s||(l.__exists=1),Object.keys(o).forEach(function(u){if(!s||s[u]!==a[u]){l[u]=1;var c=Pl(u);c!==u&&!r.policies.hasKeyArgs(a.__typename,c)&&(l[c]=1),a[u]===void 0&&!(r instanceof $a)&&delete a[u]}}),l.__typename&&!(s&&s.__typename)&&this.policies.rootTypenamesById[i]===a.__typename&&delete l.__typename,Object.keys(l).forEach(function(u){return r.group.dirty(i,u)})}}},e.prototype.modify=function(t,n){var r=this,i=this.lookup(t);if(i){var s=Object.create(null),o=!1,a=!0,l={DELETE:jv,INVALIDATE:HA,isReference:tn,toReference:this.toReference,canRead:this.canRead,readField:function(u,c){return r.policies.readField(typeof u=="string"?{fieldName:u,from:c||Fd(t)}:u,{store:r})}};if(Object.keys(i).forEach(function(u){var c=Pl(u),d=i[u];if(d!==void 0){var f=typeof n=="function"?n:n[u]||n[c];if(f){var h=f===V_?jv:f(Fy(d),ge(ge({},l),{fieldName:c,storeFieldName:u,storage:r.getStorage(t,u)}));if(h===HA)r.group.dirty(t,u);else if(h===jv&&(h=void 0),h!==d&&(s[u]=h,o=!0,d=h,globalThis.__DEV__!==!1)){var p=function(x){if(r.lookup(x.__ref)===void 0)return globalThis.__DEV__!==!1&&et.warn(3,x),!0};if(tn(h))p(h);else if(Array.isArray(h))for(var m=!1,g=void 0,v=0,w=h;v<w.length;v++){var b=w[v];if(tn(b)){if(m=!0,p(b))break}else if(typeof b=="object"&&b){var _=r.policies.identify(b)[0];_&&(g=b)}if(m&&g!==void 0){globalThis.__DEV__!==!1&&et.warn(4,g);break}}}}d!==void 0&&(a=!1)}}),o)return this.merge(t,s),a&&(this instanceof $a?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,n,r){var i,s=this.lookup(t);if(s){var o=this.getFieldValue(s,"__typename"),a=n&&r?this.policies.getStoreFieldName({typename:o,fieldName:n,args:r}):n;return this.modify(t,a?(i={},i[a]=V_,i):V_)}return!1},e.prototype.evict=function(t,n){var r=!1;return t.id&&(cr.call(this.data,t.id)&&(r=this.delete(t.id,t.fieldName,t.args)),this instanceof $a&&this!==n&&(r=this.parent.evict(t,n)||r),(t.fieldName||r)&&this.group.dirty(t.id,t.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,n=this.toObject(),r=[];return this.getRootIdSet().forEach(function(i){cr.call(t.policies.rootTypenamesById,i)||r.push(i)}),r.length&&(n.__META={extraRootIds:r.sort()}),n},e.prototype.replace=function(t){var n=this;if(Object.keys(this.data).forEach(function(s){t&&cr.call(t,s)||n.delete(s)}),t){var r=t.__META,i=ua(t,["__META"]);Object.keys(i).forEach(function(s){n.merge(s,i[s])}),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof $a?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,n=this.getRootIdSet(),r=this.toObject();n.forEach(function(o){cr.call(r,o)&&(Object.keys(t.findChildRefIds(o)).forEach(n.add,n),delete r[o])});var i=Object.keys(r);if(i.length){for(var s=this;s instanceof $a;)s=s.parent;i.forEach(function(o){return s.delete(o)})}return i},e.prototype.findChildRefIds=function(t){if(!cr.call(this.refs,t)){var n=this.refs[t]=Object.create(null),r=this.data[t];if(!r)return n;var i=new Set([r]);i.forEach(function(s){tn(s)&&(n[s.__ref]=!0),Fn(s)&&Object.keys(s).forEach(function(o){var a=s[o];Fn(a)&&i.add(a)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),x5=function(){function e(t,n){n===void 0&&(n=null),this.caching=t,this.parent=n,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?Jz():null,this.keyMaker=new Ra(Ic)},e.prototype.depend=function(t,n){if(this.d){this.d(j_(t,n));var r=Pl(n);r!==n&&this.d(j_(t,r)),this.parent&&this.parent.depend(t,n)}},e.prototype.dirty=function(t,n){this.d&&this.d.dirty(j_(t,n),n==="__exists"?"forget":"setDirty")},e}();function j_(e,t){return t+"#"+e}function VA(e,t){ip(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(n){Oo(r,n);function r(i){var s=i.policies,o=i.resultCaching,a=o===void 0?!0:o,l=i.seed,u=n.call(this,s,new x5(a))||this;return u.stump=new SY(u),u.storageTrie=new Ra(Ic),l&&u.replace(l),u}return r.prototype.addLayer=function(i,s){return this.stump.addLayer(i,s)},r.prototype.removeLayer=function(){return this},r.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},r}(e);e.Root=t})(Zw);var $a=function(e){Oo(t,e);function t(n,r,i,s){var o=e.call(this,r.policies,s)||this;return o.id=n,o.parent=r,o.replay=i,o.group=s,i(o),o}return t.prototype.addLayer=function(n,r){return new t(n,this,r,this.group)},t.prototype.removeLayer=function(n){var r=this,i=this.parent.removeLayer(n);return n===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(s){var o=r.data[s],a=i.lookup(s);a?o?o!==a&&Object.keys(o).forEach(function(l){wn(o[l],a[l])||r.group.dirty(s,l)}):(r.group.dirty(s,"__exists"),Object.keys(a).forEach(function(l){r.group.dirty(s,l)})):r.delete(s)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return ge(ge({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(n){var r=this.parent.findChildRefIds(n);return cr.call(this.data,n)?ge(ge({},r),e.prototype.findChildRefIds.call(this,n)):r},t.prototype.getStorage=function(){for(var n=this.parent;n.parent;)n=n.parent;return n.getStorage.apply(n,arguments)},t}(Zw),SY=function(e){Oo(t,e);function t(n){return e.call(this,"EntityStore.Stump",n,function(){},new x5(n.group.caching,n.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(n,r){return this.parent.merge(n,r)},t}($a);function xY(e,t,n){var r=e[n],i=t[n];return wn(r,i)?r:i}function ip(e){return!!(e instanceof Zw&&e.group.caching)}function e0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function EY(e){return Fn(e)?Bn(e)?e.slice(0):ge({__proto__:Object.getPrototypeOf(e)},e):e}var jA=function(){function e(){this.known=new(Kk?WeakSet:Set),this.pool=new Ra(Ic),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Fn(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Fn(t)){var n=EY(t);return this.passes.set(n,t),n}return t},e.prototype.admit=function(t){var n=this;if(Fn(t)){var r=this.passes.get(t);if(r)return r;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var s=t.map(this.admit,this),o=this.pool.lookupArray(s);return o.array||(this.known.add(o.array=s),globalThis.__DEV__!==!1&&Object.freeze(s)),o.array}case null:case Object.prototype:{if(this.known.has(t))return t;var a=Object.getPrototypeOf(t),l=[a],u=this.sortedKeys(t);l.push(u.json);var c=l.length;u.sorted.forEach(function(h){l.push(n.admit(t[h]))});var o=this.pool.lookupArray(l);if(!o.object){var d=o.object=Object.create(a);this.known.add(d),u.sorted.forEach(function(h,p){d[h]=l[c+p]}),globalThis.__DEV__!==!1&&Object.freeze(d)}return o.object}}}return t},e.prototype.sortedKeys=function(t){var n=Object.keys(t),r=this.pool.lookupArray(n);if(!r.keys){n.sort();var i=JSON.stringify(n);(r.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,r.keys={sorted:n,json:i})}return r.keys},e}();function UA(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var TY=function(){function e(t){var n=this;this.knownResults=new(Ic?WeakMap:Map),this.config=nf(t,{addTypename:t.addTypename!==!1,canonizeResults:w5(t)}),this.canon=t.canon||new jA,this.executeSelectionSet=Qp(function(r){var i,s=r.context.canonizeResults,o=UA(r);o[3]=!s;var a=(i=n.executeSelectionSet).peek.apply(i,o);return a?s?ge(ge({},a),{result:n.canon.admit(a.result)}):a:(VA(r.context.store,r.enclosingRef.__ref),n.execSelectionSetImpl(r))},{max:this.config.resultCacheMaxSize||pa["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:UA,makeCacheKey:function(r,i,s,o){if(ip(s.store))return s.store.makeCacheKey(r,tn(i)?i.__ref:i,s.varString,o)}}),this.executeSubSelectedArray=Qp(function(r){return VA(r.context.store,r.enclosingRef.__ref),n.execSubSelectedArrayImpl(r)},{max:this.config.resultCacheMaxSize||pa["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(r){var i=r.field,s=r.array,o=r.context;if(ip(o.store))return o.store.makeCacheKey(i,s,o.varString)}})}return e.prototype.resetCanon=function(){this.canon=new jA},e.prototype.diffQueryAgainstStore=function(t){var n=t.store,r=t.query,i=t.rootId,s=i===void 0?"ROOT_QUERY":i,o=t.variables,a=t.returnPartialData,l=a===void 0?!0:a,u=t.canonizeResults,c=u===void 0?this.config.canonizeResults:u,d=this.config.cache.policies;o=ge(ge({},Yk(zz(r))),o);var f=Fd(s),h=this.executeSelectionSet({selectionSet:zm(r).selectionSet,objectOrReference:f,enclosingRef:f,context:ge({store:n,query:r,policies:d,variables:o,varString:bl(o),canonizeResults:c},S5(r,this.config.fragments))}),p;if(h.missing&&(p=[new v5(kY(h.missing),h.missing,r,o)],!l))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(t,n,r,i){if(ip(i.store)&&this.knownResults.get(t)===r){var s=this.executeSelectionSet.peek(r,n,i,this.canon.isKnown(t));if(s&&t===s.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var n=this,r=t.selectionSet,i=t.objectOrReference,s=t.enclosingRef,o=t.context;if(tn(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var a=o.variables,l=o.policies,u=o.store,c=u.getFieldValue(i,"__typename"),d=[],f,h=new Al;this.config.addTypename&&typeof c=="string"&&!l.rootIdsByTypename[c]&&d.push({__typename:c});function p(b,_){var x;return b.missing&&(f=h.merge(f,(x={},x[_]=b.missing,x))),b.result}var m=new Set(r.selections);m.forEach(function(b){var _,x;if(Bm(b,a))if(Rl(b)){var S=l.readField({fieldName:b.name.value,field:b,variables:o.variables,from:i},o),I=ma(b);S===void 0?eC.added(b)||(f=h.merge(f,(_={},_[I]="Can't find field '".concat(b.name.value,"' on ").concat(tn(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),_))):Bn(S)?S.length>0&&(S=p(n.executeSubSelectedArray({field:b,array:S,enclosingRef:s,context:o}),I)):b.selectionSet?S!=null&&(S=p(n.executeSelectionSet({selectionSet:b.selectionSet,objectOrReference:S,enclosingRef:tn(S)?S:s,context:o}),I)):o.canonizeResults&&(S=n.canon.pass(S)),S!==void 0&&d.push((x={},x[I]=S,x))}else{var P=Kw(b,o.lookupFragment);if(!P&&b.kind===Ke.FRAGMENT_SPREAD)throw ni(10,b.name.value);P&&l.fragmentMatches(P,c)&&P.selectionSet.selections.forEach(m.add,m)}});var g=Qw(d),v={result:g,missing:f},w=o.canonizeResults?this.canon.admit(v):Fy(v);return w.result&&this.knownResults.set(w.result,r),w},e.prototype.execSubSelectedArrayImpl=function(t){var n=this,r=t.field,i=t.array,s=t.enclosingRef,o=t.context,a,l=new Al;function u(c,d){var f;return c.missing&&(a=l.merge(a,(f={},f[d]=c.missing,f))),c.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(c,d){return c===null?null:Bn(c)?u(n.executeSubSelectedArray({field:r,array:c,enclosingRef:s,context:o}),d):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:c,enclosingRef:tn(c)?c:s,context:o}),d):(globalThis.__DEV__!==!1&&CY(o.store,r,c),c)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:a}},e}();function kY(e){try{JSON.stringify(e,function(t,n){if(typeof n=="string")throw n;return n})}catch(t){return t}}function CY(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(i){Fn(i)&&(et(!tn(i),11,wY(e,i),t.name.value),Object.values(i).forEach(r.add,r))})}}var uC=new Xk,WA=new WeakMap;function sp(e){var t=WA.get(e);return t||WA.set(e,t={vars:new Set,dep:Jz()}),t}function qA(e){sp(e).vars.forEach(function(t){return t.forgetCache(e)})}function OY(e){sp(e).vars.forEach(function(t){return t.attachCache(e)})}function RY(e){var t=new Set,n=new Set,r=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(l){sp(l).dep.dirty(r),IY(l)});var o=Array.from(n);n.clear(),o.forEach(function(l){return l(e)})}}else{var a=uC.getValue();a&&(i(a),sp(a).dep(r))}return e};r.onNextChange=function(s){return n.add(s),function(){n.delete(s)}};var i=r.attachCache=function(s){return t.add(s),sp(s).vars.add(r),r};return r.forgetCache=function(s){return t.delete(s)},r}function IY(e){e.broadcastWatches&&e.broadcastWatches()}var GA=Object.create(null);function cC(e){var t=JSON.stringify(e);return GA[t]||(GA[t]=Object.create(null))}function KA(e){var t=cC(e);return t.keyFieldsFn||(t.keyFieldsFn=function(n,r){var i=function(o,a){return r.readField(a,o)},s=r.keyObject=dC(e,function(o){var a=zd(r.storeObject,o,i);return a===void 0&&n!==r.storeObject&&cr.call(n,o[0])&&(a=zd(n,o,T5)),et(a!==void 0,5,o.join("."),n),a});return"".concat(r.typename,":").concat(JSON.stringify(s))})}function YA(e){var t=cC(e);return t.keyArgsFn||(t.keyArgsFn=function(n,r){var i=r.field,s=r.variables,o=r.fieldName,a=dC(e,function(u){var c=u[0],d=c.charAt(0);if(d==="@"){if(i&&bo(i.directives)){var f=c.slice(1),h=i.directives.find(function(v){return v.name.value===f}),p=h&&Yw(h,s);return p&&zd(p,u.slice(1))}return}if(d==="$"){var m=c.slice(1);if(s&&cr.call(s,m)){var g=u.slice(0);return g[0]=m,zd(s,g)}return}if(n)return zd(n,u)}),l=JSON.stringify(a);return(n||l!=="{}")&&(o+=":"+l),o})}function dC(e,t){var n=new Al;return E5(e).reduce(function(r,i){var s,o=t(i);if(o!==void 0){for(var a=i.length-1;a>=0;--a)o=(s={},s[i[a]]=o,s);r=n.merge(r,o)}return r},Object.create(null))}function E5(e){var t=cC(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(i,s){Bn(i)?(E5(i).forEach(function(o){return n.push(r.concat(o))}),r.length=0):(r.push(i),Bn(e[s+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function T5(e,t){return e[t]}function zd(e,t,n){return n=n||T5,k5(t.reduce(function r(i,s){return Bn(i)?i.map(function(o){return r(o,s)}):i&&n(i,s)},e))}function k5(e){return Fn(e)?Bn(e)?e.map(k5):dC(Object.keys(e).sort(),function(t){return zd(e,t)}):e}function L1(e){return e.args!==void 0?e.args:e.field?Yw(e.field,e.variables):null}var AY=function(){},XA=function(e,t){return t.fieldName},JA=function(e,t,n){var r=n.mergeObjects;return r(e,t)},QA=function(e,t){return t},PY=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=ge({dataIdFromObject:y5},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,n){var r,i=this,s=n&&(n.typename||((r=n.storeObject)===null||r===void 0?void 0:r.__typename))||t.__typename;if(s===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var o=n&&n.storeObject||t,a=ge(ge({},n),{typename:s,storeObject:o,readField:n&&n.readField||function(){var d=fC(arguments,o);return i.readField(d,{store:i.cache.data,variables:d.variables})}}),l,u=s&&this.getTypePolicy(s),c=u&&u.keyFn||this.config.dataIdFromObject;return lC.withValue(!0,function(){for(;c;){var d=c(ge(ge({},t),o),a);if(Bn(d))c=KA(d);else{l=d;break}}}),l=l?String(l):void 0,a.keyObject?[l,a.keyObject]:[l]},e.prototype.addTypePolicies=function(t){var n=this;Object.keys(t).forEach(function(r){var i=t[r],s=i.queryType,o=i.mutationType,a=i.subscriptionType,l=ua(i,["queryType","mutationType","subscriptionType"]);s&&n.setRootTypename("Query",r),o&&n.setRootTypename("Mutation",r),a&&n.setRootTypename("Subscription",r),cr.call(n.toBeAdded,r)?n.toBeAdded[r].push(l):n.toBeAdded[r]=[l]})},e.prototype.updateTypePolicy=function(t,n){var r=this,i=this.getTypePolicy(t),s=n.keyFields,o=n.fields;function a(l,u){l.merge=typeof u=="function"?u:u===!0?JA:u===!1?QA:l.merge}a(i,n.merge),i.keyFn=s===!1?AY:Bn(s)?KA(s):typeof s=="function"?s:i.keyFn,o&&Object.keys(o).forEach(function(l){var u=r.getFieldPolicy(t,l,!0),c=o[l];if(typeof c=="function")u.read=c;else{var d=c.keyArgs,f=c.read,h=c.merge;u.keyFn=d===!1?XA:Bn(d)?YA(d):typeof d=="function"?d:u.keyFn,typeof f=="function"&&(u.read=f),a(u,h)}u.read&&u.merge&&(u.keyFn=u.keyFn||XA)})},e.prototype.setRootTypename=function(t,n){n===void 0&&(n=t);var r="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[r];n!==i&&(et(!i||i===t,6,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)},e.prototype.addPossibleTypes=function(t){var n=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(r){n.getSupertypeSet(r,!0),t[r].forEach(function(i){n.getSupertypeSet(i,!0).add(r);var s=i.match(_5);(!s||s[0]!==i)&&n.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var n=this;if(!cr.call(this.typePolicies,t)){var r=this.typePolicies[t]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(o,a){if(o.test(t)){var l=n.supertypeMap.get(a);l&&l.forEach(function(u){return i.add(u)})}})),i&&i.size&&i.forEach(function(o){var a=n.getTypePolicy(o),l=a.fields,u=ua(a,["fields"]);Object.assign(r,u),Object.assign(r.fields,l)})}var s=this.toBeAdded[t];return s&&s.length&&s.splice(0).forEach(function(o){n.updateTypePolicy(t,o)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,n,r){if(t){var i=this.getTypePolicy(t).fields;return i[n]||r&&(i[n]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,n){var r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r},e.prototype.fragmentMatches=function(t,n,r,i){var s=this;if(!t.typeCondition)return!0;if(!n)return!1;var o=t.typeCondition.name.value;if(n===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(n,!0),l=[a],u=function(p){var m=s.getSupertypeSet(p,!1);m&&m.size&&l.indexOf(m)<0&&l.push(m)},c=!!(r&&this.fuzzySubtypes.size),d=!1,f=0;f<l.length;++f){var h=l[f];if(h.has(o))return a.has(o)||(d&&globalThis.__DEV__!==!1&&et.warn(7,n,o),a.add(o)),!0;h.forEach(u),c&&f===l.length-1&&N1(t.selectionSet,r,i)&&(c=!1,d=!0,this.fuzzySubtypes.forEach(function(p,m){var g=n.match(p);g&&g[0]===n&&u(m)}))}return!1},e.prototype.hasKeyArgs=function(t,n){var r=this.getFieldPolicy(t,n,!1);return!!(r&&r.keyFn)},e.prototype.getStoreFieldName=function(t){var n=t.typename,r=t.fieldName,i=this.getFieldPolicy(n,r,!1),s,o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:t.field||null,variables:t.variables},l=L1(t);o;){var u=o(l,a);if(Bn(u))o=YA(u);else{s=u||r;break}}return s===void 0&&(s=t.field?QG(t.field,t.variables):Bz(r,L1(t))),s===!1?r:r===Pl(s)?s:r+":"+s},e.prototype.readField=function(t,n){var r=t.from;if(r){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var s=n.store.getFieldValue(r,"__typename");s&&(t.typename=s)}var o=this.getStoreFieldName(t),a=Pl(o),l=n.store.getFieldValue(r,o),u=this.getFieldPolicy(t.typename,a,!1),c=u&&u.read;if(c){var d=ZA(this,r,t,n,n.store.getStorage(tn(r)?r.__ref:r,o));return uC.withValue(this.cache,c,[l,d])}return l}}},e.prototype.getReadFunction=function(t,n){var r=this.getFieldPolicy(t,n,!1);return r&&r.read},e.prototype.getMergeFunction=function(t,n,r){var i=this.getFieldPolicy(t,n,!1),s=i&&i.merge;return!s&&r&&(i=this.getTypePolicy(r),s=i&&i.merge),s},e.prototype.runMergeFunction=function(t,n,r,i,s){var o=r.field,a=r.typename,l=r.merge;return l===JA?C5(i.store)(t,n):l===QA?n:(i.overwrite&&(t=void 0),l(t,n,ZA(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:i.variables},i,s||Object.create(null))))},e}();function ZA(e,t,n,r,i){var s=e.getStoreFieldName(n),o=Pl(s),a=n.variables||r.variables,l=r.store,u=l.toReference,c=l.canRead;return{args:L1(n),field:n.field||null,fieldName:o,storeFieldName:s,variables:a,isReference:tn,toReference:u,storage:i,cache:e.cache,canRead:c,readField:function(){return e.readField(fC(arguments,t,a),r)},mergeObjects:C5(r.store)}}function fC(e,t,n){var r=e[0],i=e[1],s=e.length,o;return typeof r=="string"?o={fieldName:r,from:s>1?i:t}:(o=ge({},r),cr.call(o,"from")||(o.from=t)),globalThis.__DEV__!==!1&&o.from===void 0&&globalThis.__DEV__!==!1&&et.warn(8,bz(Array.from(e))),o.variables===void 0&&(o.variables=n),o}function C5(e){return function(n,r){if(Bn(n)||Bn(r))throw ni(9);if(Fn(n)&&Fn(r)){var i=e.getFieldValue(n,"__typename"),s=e.getFieldValue(r,"__typename"),o=i&&s&&i!==s;if(o)return r;if(tn(n)&&vd(r))return e.merge(n.__ref,r),n;if(vd(n)&&tn(r))return e.merge(n,r.__ref),r;if(vd(n)&&vd(r))return ge(ge({},n),r)}return r}}function U_(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:ge(ge({},e),{clientOnly:t,deferred:n})),i}var MY=function(){function e(t,n,r){this.cache=t,this.reader=n,this.fragments=r}return e.prototype.writeToStore=function(t,n){var r=this,i=n.query,s=n.result,o=n.dataId,a=n.variables,l=n.overwrite,u=fc(i),c=_Y();a=ge(ge({},Yk(u)),a);var d=ge(ge({store:t,written:Object.create(null),merge:function(h,p){return c.merge(h,p)},variables:a,varString:bl(a)},S5(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:s||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:d});if(!tn(f))throw ni(12,s);return d.incomingById.forEach(function(h,p){var m=h.storeObject,g=h.mergeTree,v=h.fieldNodeSet,w=Fd(p);if(g&&g.map.size){var b=r.applyMerges(g,w,m,d);if(tn(b))return;m=b}if(globalThis.__DEV__!==!1&&!d.overwrite){var _=Object.create(null);v.forEach(function(I){I.selectionSet&&(_[I.name.value]=!0)});var x=function(I){return _[Pl(I)]===!0},S=function(I){var P=g&&g.map.get(I);return!!(P&&P.info&&P.info.merge)};Object.keys(m).forEach(function(I){x(I)&&!S(I)&&DY(w,m,I,d.store)})}t.merge(p,m)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var n=this,r=t.dataId,i=t.result,s=t.selectionSet,o=t.context,a=t.mergeTree,l=this.cache.policies,u=Object.create(null),c=r&&l.rootTypenamesById[r]||k1(i,s,o.fragmentMap)||r&&o.store.get(r,"__typename");typeof c=="string"&&(u.__typename=c);var d=function(){var b=fC(arguments,u,o.variables);if(tn(b.from)){var _=o.incomingById.get(b.from.__ref);if(_){var x=l.readField(ge(ge({},b),{from:_.storeObject}),o);if(x!==void 0)return x}}return l.readField(b,o)},f=new Set;this.flattenFields(s,i,o,c).forEach(function(b,_){var x,S=ma(_),I=i[S];if(f.add(_),I!==void 0){var P=l.getStoreFieldName({typename:c,fieldName:_.name.value,field:_,variables:b.variables}),R=eP(a,P),O=n.processFieldValue(I,_,_.selectionSet?U_(b,!1,!1):b,R),M=void 0;_.selectionSet&&(tn(O)||vd(O))&&(M=d("__typename",O));var E=l.getMergeFunction(c,_.name.value,M);E?R.info={field:_,typename:c,merge:E}:tP(a,P),u=b.merge(u,(x={},x[P]=O,x))}else globalThis.__DEV__!==!1&&!b.clientOnly&&!b.deferred&&!eC.added(_)&&!l.getReadFunction(c,_.name.value)&&globalThis.__DEV__!==!1&&et.error(13,ma(_),i)});try{var h=l.identify(i,{typename:c,selectionSet:s,fragmentMap:o.fragmentMap,storeObject:u,readField:d}),p=h[0],m=h[1];r=r||p,m&&(u=o.merge(u,m))}catch(b){if(!r)throw b}if(typeof r=="string"){var g=Fd(r),v=o.written[r]||(o.written[r]=[]);if(v.indexOf(s)>=0||(v.push(s),this.reader&&this.reader.isFresh(i,g,s,o)))return g;var w=o.incomingById.get(r);return w?(w.storeObject=o.merge(w.storeObject,u),w.mergeTree=F1(w.mergeTree,a),f.forEach(function(b){return w.fieldNodeSet.add(b)})):o.incomingById.set(r,{storeObject:u,mergeTree:By(a)?void 0:a,fieldNodeSet:f}),g}return u},e.prototype.processFieldValue=function(t,n,r,i){var s=this;return!n.selectionSet||t===null?globalThis.__DEV__!==!1?s5(t):t:Bn(t)?t.map(function(o,a){var l=s.processFieldValue(o,n,r,eP(i,a));return tP(i,a),l}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:i})},e.prototype.flattenFields=function(t,n,r,i){i===void 0&&(i=k1(n,t,r.fragmentMap));var s=new Map,o=this.cache.policies,a=new Ra(!1);return function l(u,c){var d=a.lookup(u,c.clientOnly,c.deferred);d.visited||(d.visited=!0,u.selections.forEach(function(f){if(Bm(f,r.variables)){var h=c.clientOnly,p=c.deferred;if(!(h&&p)&&bo(f.directives)&&f.directives.forEach(function(v){var w=v.name.value;if(w==="client"&&(h=!0),w==="defer"){var b=Yw(v,r.variables);(!b||b.if!==!1)&&(p=!0)}}),Rl(f)){var m=s.get(f);m&&(h=h&&m.clientOnly,p=p&&m.deferred),s.set(f,U_(r,h,p))}else{var g=Kw(f,r.lookupFragment);if(!g&&f.kind===Ke.FRAGMENT_SPREAD)throw ni(14,f.name.value);g&&o.fragmentMatches(g,i,n,r.variables)&&l(g.selectionSet,U_(r,h,p))}}}))}(t,r),s},e.prototype.applyMerges=function(t,n,r,i,s){var o,a=this;if(t.map.size&&!tn(r)){var l=!Bn(r)&&(tn(n)||vd(n))?n:void 0,u=r;l&&!s&&(s=[tn(l)?l.__ref:l]);var c,d=function(f,h){return Bn(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var p=d(l,h),m=d(u,h);if(m!==void 0){s&&s.push(h);var g=a.applyMerges(f,p,m,i,s);g!==m&&(c=c||new Map,c.set(h,g)),s&&et(s.pop()===h)}}),c&&(r=Bn(u)?u.slice(0):ge({},u),c.forEach(function(f,h){r[h]=f}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,i,s&&(o=i.store).getStorage.apply(o,s)):r},e}(),O5=[];function eP(e,t){var n=e.map;return n.has(t)||n.set(t,O5.pop()||{map:new Map}),n.get(t)}function F1(e,t){if(e===t||!t||By(t))return e;if(!e||By(e))return t;var n=e.info&&t.info?ge(ge({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,s={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(a,l){s.map.set(l,F1(a,t.map.get(l))),o.delete(l)}),o.forEach(function(a){s.map.set(a,F1(t.map.get(a),e.map.get(a)))})}return s}function By(e){return!e||!(e.info||e.map.size)}function tP(e,t){var n=e.map,r=n.get(t);r&&By(r)&&(O5.push(r),n.delete(t))}var nP=new Set;function DY(e,t,n,r){var i=function(d){var f=r.getFieldValue(d,n);return typeof f=="object"&&f},s=i(e);if(s){var o=i(t);if(o&&!tn(s)&&!wn(s,o)&&!Object.keys(s).every(function(d){return r.getFieldValue(o,d)!==void 0})){var a=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),l=Pl(n),u="".concat(a,".").concat(l);if(!nP.has(u)){nP.add(u);var c=[];!Bn(s)&&!Bn(o)&&[s,o].forEach(function(d){var f=r.getFieldValue(d,"__typename");typeof f=="string"&&!c.includes(f)&&c.push(f)}),globalThis.__DEV__!==!1&&et.warn(15,l,a,c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"",u,ge({},s),ge({},o))}}}}var hC=function(e){Oo(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new Qz(eC),r.assumeImmutableResults=!0,r.makeVar=RY,r.txCount=0,r.config=bY(n),r.addTypename=!!r.config.addTypename,r.policies=new PY({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return t.prototype.init=function(){var n=this.data=new Zw.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=n.stump,this.resetResultCache()},t.prototype.resetResultCache=function(n){var r=this,i=this.storeReader,s=this.config.fragments;this.storeWriter=new MY(this,this.storeReader=new TY({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:w5(this.config),canon:n?void 0:i&&i.canon,fragments:s}),s),this.maybeBroadcastWatch=Qp(function(o,a){return r.broadcastWatch(o,a)},{max:this.config.resultCacheMaxSize||pa["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(o){var a=o.optimistic?r.optimisticData:r.data;if(ip(a)){var l=o.optimistic,u=o.id,c=o.variables;return a.makeCacheKey(o.query,o.callback,bl({optimistic:l,id:u,variables:c}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(o){return o.resetCaching()})},t.prototype.restore=function(n){return this.init(),n&&this.data.replace(n),this},t.prototype.extract=function(n){return n===void 0&&(n=!1),(n?this.optimisticData:this.data).extract()},t.prototype.read=function(n){var r=n.returnPartialData,i=r===void 0?!1:r;try{return this.storeReader.diffQueryAgainstStore(ge(ge({},n),{store:n.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(s){if(s instanceof v5)return null;throw s}},t.prototype.write=function(n){try{return++this.txCount,this.storeWriter.writeToStore(this.data,n)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(n){if(cr.call(n,"id")&&!n.id)return!1;var r=n.optimistic?this.optimisticData:this.data;try{return++this.txCount,r.modify(n.id||"ROOT_QUERY",n.fields)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(n){return this.storeReader.diffQueryAgainstStore(ge(ge({},n),{store:n.optimistic?this.optimisticData:this.data,rootId:n.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(n){var r=this;return this.watches.size||OY(this),this.watches.add(n),n.immediate&&this.maybeBroadcastWatch(n),function(){r.watches.delete(n)&&!r.watches.size&&qA(r),r.maybeBroadcastWatch.forget(n)}},t.prototype.gc=function(n){var r;bl.reset(),Mu.reset(),this.addTypenameTransform.resetCache(),(r=this.config.fragments)===null||r===void 0||r.resetCaches();var i=this.optimisticData.gc();return n&&!this.txCount&&(n.resetResultCache?this.resetResultCache(n.resetResultIdentities):n.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(n,r){return(r?this.optimisticData:this.data).retain(n)},t.prototype.release=function(n,r){return(r?this.optimisticData:this.data).release(n)},t.prototype.identify=function(n){if(tn(n))return n.__ref;try{return this.policies.identify(n)[0]}catch(r){globalThis.__DEV__!==!1&&et.warn(r)}},t.prototype.evict=function(n){if(!n.id){if(cr.call(n,"id"))return!1;n=ge(ge({},n),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(n,this.data)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(n){var r=this;return this.init(),bl.reset(),n&&n.discardWatches?(this.watches.forEach(function(i){return r.maybeBroadcastWatch.forget(i)}),this.watches.clear(),qA(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(n){var r=this.optimisticData.removeLayer(n);r!==this.optimisticData&&(this.optimisticData=r,this.broadcastWatches())},t.prototype.batch=function(n){var r=this,i=n.update,s=n.optimistic,o=s===void 0?!0:s,a=n.removeOptimistic,l=n.onWatchUpdated,u,c=function(f){var h=r,p=h.data,m=h.optimisticData;++r.txCount,f&&(r.data=r.optimisticData=f);try{return u=i(r)}finally{--r.txCount,r.data=p,r.optimisticData=m}},d=new Set;return l&&!this.txCount&&this.broadcastWatches(ge(ge({},n),{onWatchUpdated:function(f){return d.add(f),!1}})),typeof o=="string"?this.optimisticData=this.optimisticData.addLayer(o,c):o===!1?c(this.data):c(),typeof a=="string"&&(this.optimisticData=this.optimisticData.removeLayer(a)),l&&d.size?(this.broadcastWatches(ge(ge({},n),{onWatchUpdated:function(f,h){var p=l.call(this,f,h);return p!==!1&&d.delete(f),p}})),d.size&&d.forEach(function(f){return r.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(n),u},t.prototype.performTransaction=function(n,r){return this.batch({update:n,optimistic:r||r!==null})},t.prototype.transformDocument=function(n){return this.addTypenameToDocument(this.addFragmentsToDocument(n))},t.prototype.fragmentMatches=function(n,r){return this.policies.fragmentMatches(n,r)},t.prototype.lookupFragment=function(n){var r;return((r=this.config.fragments)===null||r===void 0?void 0:r.lookup(n))||null},t.prototype.broadcastWatches=function(n){var r=this;this.txCount||this.watches.forEach(function(i){return r.maybeBroadcastWatch(i,n)})},t.prototype.addFragmentsToDocument=function(n){var r=this.config.fragments;return r?r.transform(n):n},t.prototype.addTypenameToDocument=function(n){return this.addTypename?this.addTypenameTransform.transformDocument(n):n},t.prototype.broadcastWatch=function(n,r){var i=n.lastDiff,s=this.diff(n);r&&(n.optimistic&&typeof r.optimistic=="string"&&(s.fromOptimisticTransaction=!0),r.onWatchUpdated&&r.onWatchUpdated.call(this,n,s,i)===!1)||(!i||!wn(i.result,s.result))&&n.callback(n.lastDiff=s,i)},t}(g5);globalThis.__DEV__!==!1&&(hC.prototype.getMemoryInternals=DG);var on;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(on||(on={}));function Zp(e){return e?e<7:!1}var rP=Object.assign,NY=Object.hasOwnProperty,B1=function(e){Oo(t,e);function t(n){var r=n.queryManager,i=n.queryInfo,s=n.options,o=e.call(this,function(g){try{var v=g._subscription._observer;v&&!v.error&&(v.error=LY)}catch{}var w=!o.observers.size;o.observers.add(g);var b=o.last;return b&&b.error?g.error&&g.error(b.error):b&&b.result&&g.next&&g.next(o.maskResult(b.result)),w&&o.reobserve().catch(function(){}),function(){o.observers.delete(g)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=i,o.queryManager=r,o.waitForOwnResult=W_(s.fetchPolicy),o.isTornDown=!1,o.subscribeToMore=o.subscribeToMore.bind(o),o.maskResult=o.maskResult.bind(o);var a=r.defaultOptions.watchQuery,l=a===void 0?{}:a,u=l.fetchPolicy,c=u===void 0?"cache-first":u,d=s.fetchPolicy,f=d===void 0?c:d,h=s.initialFetchPolicy,p=h===void 0?f==="standby"?c:f:h;o.options=ge(ge({},s),{initialFetchPolicy:p,fetchPolicy:f}),o.queryId=i.queryId||r.generateQueryId();var m=fc(o.query);return o.queryName=m&&m.name&&m.name.value,o}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var n=this;return new Promise(function(r,i){var s={next:function(a){r(a),n.observers.delete(s),n.observers.size||n.queryManager.removeQuery(n.queryId),setTimeout(function(){o.unsubscribe()},0)},error:i},o=n.subscribe(s)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(n){n===void 0&&(n=!0);var r=this.getLastResult(!0),i=this.queryInfo.networkStatus||r&&r.networkStatus||on.ready,s=ge(ge({},r),{loading:Zp(i),networkStatus:i}),o=this.options.fetchPolicy,a=o===void 0?"cache-first":o;if(!(W_(a)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var l=this.queryInfo.getDiff();(l.complete||this.options.returnPartialData)&&(s.data=l.result),wn(s.data,{})&&(s.data=void 0),l.complete?(delete s.partial,l.complete&&s.networkStatus===on.loading&&(a==="cache-first"||a==="cache-only")&&(s.networkStatus=on.ready,s.loading=!1)):s.partial=!0,globalThis.__DEV__!==!1&&!l.complete&&!this.options.partialRefetch&&!s.loading&&!s.data&&!s.error&&I5(l.missing)}return n&&this.updateLastResult(s),s},t.prototype.getCurrentResult=function(n){return n===void 0&&(n=!0),this.maskResult(this.getCurrentFullResult(n))},t.prototype.isDifferentFromLastResult=function(n,r){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query),s=this.queryManager.dataMasking,o=s?i.nonReactiveQuery:this.query,a=s||i.hasNonreactiveDirective?!c5(o,this.last.result,n,this.variables):!wn(this.last.result,n);return a||r&&!wn(this.last.variables,r)},t.prototype.getLast=function(n,r){var i=this.last;if(i&&i[n]&&(!r||wn(i.variables,this.variables)))return i[n]},t.prototype.getLastResult=function(n){return this.getLast("result",n)},t.prototype.getLastError=function(n){return this.getLast("error",n)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(n){var r,i={pollInterval:0},s=this.options.fetchPolicy;if(s==="cache-and-network"?i.fetchPolicy=s:s==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&n&&NY.call(n,"variables")){var o=zz(this.query),a=o.variableDefinitions;(!a||!a.some(function(l){return l.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&et.warn(21,n,((r=o.name)===null||r===void 0?void 0:r.value)||o)}return n&&!wn(this.options.variables,n)&&(i.variables=this.options.variables=ge(ge({},this.options.variables),n)),this.queryInfo.resetLastWrite(),this.reobserve(i,on.refetch)},t.prototype.fetchMore=function(n){var r=this,i=ge(ge({},n.query?n:ge(ge(ge(ge({},this.options),{query:this.options.query}),n),{variables:ge(ge({},this.options.variables),n.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var s=this.queryManager.generateQueryId();this.lastQuery=n.query?this.transformDocument(this.options.query):i.query;var o=this.queryInfo,a=o.networkStatus;o.networkStatus=on.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var l=new Set,u=n==null?void 0:n.updateQuery,c=this.options.fetchPolicy!=="no-cache";return c||et(u,22),this.queryManager.fetchQuery(s,i,on.fetchMore).then(function(d){if(r.queryManager.removeQuery(s),o.networkStatus===on.fetchMore&&(o.networkStatus=a),c)r.queryManager.cache.batch({update:function(p){var m=n.updateQuery;m?p.updateQuery({query:r.query,variables:r.variables,returnPartialData:!0,optimistic:!1},function(g){return m(g,{fetchMoreResult:d.data,variables:i.variables})}):p.writeQuery({query:i.query,variables:i.variables,data:d.data})},onWatchUpdated:function(p){l.add(p.query)}});else{var f=r.getLast("result"),h=u(f.data,{fetchMoreResult:d.data,variables:i.variables});r.reportResult(ge(ge({},f),{data:h}),r.variables)}return r.maskResult(d)}).finally(function(){c&&!l.has(r.query)&&R5(r)})},t.prototype.subscribeToMore=function(n){var r=this,i=this.queryManager.startGraphQLSubscription({query:n.document,variables:n.variables,context:n.context}).subscribe({next:function(s){var o=n.updateQuery;o&&r.updateQuery(function(a,l){var u=l.variables;return o(a,{subscriptionData:s,variables:u})})},error:function(s){if(n.onError){n.onError(s);return}globalThis.__DEV__!==!1&&et.error(23,s)}});return this.subscriptions.add(i),function(){r.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(n){return this.reobserve(n)},t.prototype.silentSetOptions=function(n){var r=nf(this.options,n||{});rP(this.options,r)},t.prototype.setVariables=function(n){return wn(this.variables,n)?this.observers.size?this.result():Promise.resolve():(this.options.variables=n,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:n},on.setVariables):Promise.resolve())},t.prototype.updateQuery=function(n){var r=this.queryManager,i=r.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,s=n(i,{variables:this.variables});s&&(r.cache.writeQuery({query:this.options.query,data:s,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(n){this.options.pollInterval=n,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(n,r){if(r.nextFetchPolicy){var i=r.fetchPolicy,s=i===void 0?"cache-first":i,o=r.initialFetchPolicy,a=o===void 0?s:o;s==="standby"||(typeof r.nextFetchPolicy=="function"?r.fetchPolicy=r.nextFetchPolicy(s,{reason:n,options:r,observable:this,initialFetchPolicy:a}):n==="variables-changed"?r.fetchPolicy=a:r.fetchPolicy=r.nextFetchPolicy)}return r.fetchPolicy},t.prototype.fetch=function(n,r,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,n,r,i)},t.prototype.updatePolling=function(){var n=this;if(!this.queryManager.ssrMode){var r=this,i=r.pollingInfo,s=r.options.pollInterval;if(!s||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===s)){et(s,24);var o=i||(this.pollingInfo={});o.interval=s;var a=function(){var u,c;n.pollingInfo&&(!Zp(n.queryInfo.networkStatus)&&!(!((c=(u=n.options).skipPollAttempt)===null||c===void 0)&&c.call(u))?n.reobserve({fetchPolicy:n.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},on.poll).then(l,l):l())},l=function(){var u=n.pollingInfo;u&&(clearTimeout(u.timeout),u.timeout=setTimeout(a,u.interval))};l()}}},t.prototype.updateLastResult=function(n,r){r===void 0&&(r=this.variables);var i=this.getLastError();return i&&this.last&&!wn(r,this.last.variables)&&(i=void 0),this.last=ge({result:this.queryManager.assumeImmutableResults?n:s5(n),variables:r},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(n,r){var i=this;this.isTornDown=!1;var s=r===on.refetch||r===on.fetchMore||r===on.poll,o=this.options.variables,a=this.options.fetchPolicy,l=nf(this.options,n||{}),u=s?l:rP(this.options,l),c=this.transformDocument(u.query);this.lastQuery=c,s||(this.updatePolling(),n&&n.variables&&!wn(n.variables,o)&&u.fetchPolicy!=="standby"&&(u.fetchPolicy===a||typeof u.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",u),r===void 0&&(r=on.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=W_(u.fetchPolicy));var d=function(){i.concast===p&&(i.waitForOwnResult=!1)},f=u.variables&&ge({},u.variables),h=this.fetch(u,r,c),p=h.concast,m=h.fromLink,g={next:function(v){wn(i.variables,f)&&(d(),i.reportResult(v,f))},error:function(v){wn(i.variables,f)&&(oC(v)||(v=new Zs({networkError:v})),d(),i.reportError(v,f))}};return!s&&(m||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=p,this.observer=g),p.addObserver(g),p},t.prototype.reobserve=function(n,r){return CK(this.reobserveAsConcast(n,r).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.last;this.resetLastResults();var s=this.subscribe.apply(this,n);return this.last=i,s},t.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},t.prototype.reportResult=function(n,r){var i=this.getLastError(),s=this.isDifferentFromLastResult(n,r);(i||!n.partial||this.options.returnPartialData)&&this.updateLastResult(n,r),(i||s)&&rp(this.observers,"next",this.maskResult(n))},t.prototype.reportError=function(n,r){var i=ge(ge({},this.getLastResult()),{error:n,errors:n.graphQLErrors,networkStatus:on.error,loading:!1});this.updateLastResult(i,r),rp(this.observers,"error",this.last.error=n)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(n){return n.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(n){return this.queryManager.transform(n)},t.prototype.maskResult=function(n){return n&&"data"in n?ge(ge({},n),{data:this.queryManager.maskOperation({document:this.query,data:n.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):n},t}(bn);o5(B1);function R5(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,s){return this.nextFetchPolicy=r,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,s):n}}):e.reobserve()}function LY(e){globalThis.__DEV__!==!1&&et.error(25,e.message,e.stack)}function I5(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&et.debug(26,e)}function W_(e){return e==="network-only"||e==="no-cache"||e==="standby"}var yd=new(Ic?WeakMap:Map);function q_(e,t){var n=e[t];typeof n=="function"&&(e[t]=function(){return yd.set(e,(yd.get(e)+1)%1e15),n.apply(this,arguments)})}function iP(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var G_=function(){function e(t,n){n===void 0&&(n=t.generateQueryId()),this.queryId=n,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=t.cache;yd.has(r)||(yd.set(r,0),q_(r,"evict"),q_(r,"modify"),q_(r,"reset"))}return e.prototype.init=function(t){var n=t.networkStatus||on.loading;return this.variables&&this.networkStatus!==on.loading&&!wn(this.variables,t.variables)&&(n=on.setVariables),wn(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:n}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){iP(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&wn(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(t,n){this.lastDiff=t?{diff:t,options:n||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var n;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(n=this.observableQuery)===null||n===void 0?void 0:n.options.canonizeResults}},e.prototype.setDiff=function(t){var n=this,r,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&(!((r=this.observableQuery)===null||r===void 0)&&r.getLastError())||(this.updateLastDiff(t),!this.dirty&&!wn(i&&i.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return n.notify()},0))))},e.prototype.setObservableQuery=function(t){var n=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var r=n.getDiff();r.fromOptimisticTransaction?t.observe():R5(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;iP(this),this.shouldNotify()&&this.listeners.forEach(function(n){return n(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Zp(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var n=this;t===void 0&&(t=this.variables);var r=this.observableQuery;if(!(r&&r.options.fetchPolicy==="no-cache")){var i=ge(ge({},this.getDiffOptions(t)),{watcher:this,callback:function(s){return n.setDiff(s)}});(!this.lastWatch||!wn(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,n){var r=this.lastWrite;return!(r&&r.dmCount===yd.get(this.cache)&&wn(n,r.variables)&&wn(t.data,r.result.data))},e.prototype.markResult=function(t,n,r,i){var s=this,o=new Al,a=bo(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&bo(t.incremental)){var l=a5(this.getDiff().result,t);t.data=l}else if("hasNext"in t&&t.hasNext){var u=this.getDiff();t.data=o.merge(u.result,t.data)}this.graphQLErrors=a,r.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(r.variables)):i!==0&&(z1(t,r.errorPolicy)?this.cache.performTransaction(function(c){if(s.shouldWrite(t,r.variables))c.writeQuery({query:n,data:t.data,variables:r.variables,overwrite:i===1}),s.lastWrite={result:t,variables:r.variables,dmCount:yd.get(s.cache)};else if(s.lastDiff&&s.lastDiff.diff.complete){t.data=s.lastDiff.diff.result;return}var d=s.getDiffOptions(r.variables),f=c.diff(d);!s.stopped&&wn(s.variables,r.variables)&&s.updateWatch(r.variables),s.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=on.ready},e.prototype.markError=function(t){return this.networkStatus=on.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function z1(e,t){t===void 0&&(t="none");var n=t==="ignore"||t==="all",r=!Hv(e);return!r&&n&&e.data&&(r=!0),r}var FY=Object.prototype.hasOwnProperty,sP=Object.create(null),BY=function(){function e(t){var n=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new Mz(pa["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Ra(!1),this.noCacheWarningsByQueryId=new Set;var r=new Qz(function(s){return n.cache.transformDocument(s)},{cache:!1});this.cache=t.cache,this.link=t.link,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientAwareness=t.clientAwareness,this.localState=t.localState,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults,this.dataMasking=t.dataMasking;var i=t.documentTransform;this.documentTransform=i?r.concat(i).concat(r):r,this.defaultContext=t.defaultContext||Object.create(null),(this.onBroadcast=t.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(n,r){t.stopQueryNoBroadcast(r)}),this.cancelPendingFetches(ni(27))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(n){return n(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return Ya(this,arguments,void 0,function(n){var r,i,s,o,a,l,u,c=n.mutation,d=n.variables,f=n.optimisticResponse,h=n.updateQueries,p=n.refetchQueries,m=p===void 0?[]:p,g=n.awaitRefetchQueries,v=g===void 0?!1:g,w=n.update,b=n.onQueryUpdated,_=n.fetchPolicy,x=_===void 0?((l=this.defaultOptions.mutate)===null||l===void 0?void 0:l.fetchPolicy)||"network-only":_,S=n.errorPolicy,I=S===void 0?((u=this.defaultOptions.mutate)===null||u===void 0?void 0:u.errorPolicy)||"none":S,P=n.keepRootFields,R=n.context;return Xa(this,function(O){switch(O.label){case 0:return et(c,28),et(x==="network-only"||x==="no-cache",29),r=this.generateMutationId(),c=this.cache.transformForLink(this.transform(c)),i=this.getDocumentInfo(c).hasClientExports,d=this.getVariables(c,d),i?[4,this.localState.addExportedVariables(c,d,R)]:[3,2];case 1:d=O.sent(),O.label=2;case 2:return s=this.mutationStore&&(this.mutationStore[r]={mutation:c,variables:d,loading:!0,error:null}),o=f&&this.markMutationOptimistic(f,{mutationId:r,document:c,variables:d,fetchPolicy:x,errorPolicy:I,context:R,updateQueries:h,update:w,keepRootFields:P}),this.broadcastQueries(),a=this,[2,new Promise(function(M,E){return z_(a.getObservableFromLink(c,ge(ge({},R),{optimisticResponse:o?f:void 0}),d,{},!1),function(L){if(Hv(L)&&I==="none")throw new Zs({graphQLErrors:I1(L)});s&&(s.loading=!1,s.error=null);var j=ge({},L);return typeof m=="function"&&(m=m(j)),I==="ignore"&&Hv(j)&&delete j.errors,a.markMutationResult({mutationId:r,result:j,document:c,variables:d,fetchPolicy:x,errorPolicy:I,context:R,update:w,updateQueries:h,awaitRefetchQueries:v,refetchQueries:m,removeOptimistic:o?r:void 0,onQueryUpdated:b,keepRootFields:P})}).subscribe({next:function(L){a.broadcastQueries(),(!("hasNext"in L)||L.hasNext===!1)&&M(ge(ge({},L),{data:a.maskOperation({document:c,data:L.data,fetchPolicy:x,id:r})}))},error:function(L){s&&(s.loading=!1,s.error=L),o&&a.cache.removeOptimistic(r),a.broadcastQueries(),E(L instanceof Zs?L:new Zs({networkError:L}))}})})]}})})},e.prototype.markMutationResult=function(t,n){var r=this;n===void 0&&(n=this.cache);var i=t.result,s=[],o=t.fetchPolicy==="no-cache";if(!o&&z1(i,t.errorPolicy)){if(Bd(i)||s.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),Bd(i)&&bo(i.incremental)){var a=n.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),l=void 0;a.result&&(l=a5(a.result,i)),typeof l<"u"&&(i.data=l,s.push({result:l,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var u=t.updateQueries;u&&this.queries.forEach(function(d,f){var h=d.observableQuery,p=h&&h.queryName;if(!(!p||!FY.call(u,p))){var m=u[p],g=r.queries.get(f),v=g.document,w=g.variables,b=n.diff({query:v,variables:w,returnPartialData:!0,optimistic:!1}),_=b.result,x=b.complete;if(x&&_){var S=m(_,{mutationResult:i,queryName:v&&Bh(v)||void 0,queryVariables:w});S&&s.push({result:S,dataId:"ROOT_QUERY",query:v,variables:w})}}})}if(s.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(d){o||s.forEach(function(m){return d.write(m)});var f=t.update,h=!PK(i)||Bd(i)&&!i.hasNext;if(f){if(!o){var p=d.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});p.complete&&(i=ge(ge({},i),{data:p.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}h&&f(d,i,{context:t.context,variables:t.variables})}!o&&!t.keepRootFields&&h&&d.modify({id:"ROOT_MUTATION",fields:function(m,g){var v=g.fieldName,w=g.DELETE;return v==="__typename"?m:w}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return c.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(c).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,n){var r=this,i=typeof t=="function"?t(n.variables,{IGNORE:sP}):t;return i===sP?!1:(this.cache.recordOptimisticTransaction(function(s){try{r.markMutationResult(ge(ge({},n),{result:{data:i}}),s)}catch(o){globalThis.__DEV__!==!1&&et.error(o)}},n.mutationId),!0)},e.prototype.fetchQuery=function(t,n,r){return this.fetchConcastWithInfo(t,n,r).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(n,r){t[r]={variables:n.variables,networkStatus:n.networkStatus,networkError:n.networkError,graphQLErrors:n.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var n=this.queries.get(t);n&&(n.networkError=void 0,n.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var n=this.transformCache;if(!n.has(t)){var r={hasClientExports:pG(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:Xp(["nonreactive"],t),nonReactiveQuery:gK(t),clientQuery:this.localState.clientQuery(t),serverQuery:e5([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],t),defaultVars:Yk(fc(t)),asQuery:ge(ge({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?ge(ge({},i),{operation:"query"}):i})})};n.set(t,r)}return n.get(t)},e.prototype.getVariables=function(t,n){return ge(ge({},this.getDocumentInfo(t).defaultVars),n)},e.prototype.watchQuery=function(t){var n=this.transform(t.query);t=ge(ge({},t),{variables:this.getVariables(n,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new G_(this),i=new B1({queryManager:this,queryInfo:r,options:t});return i.lastQuery=n,this.queries.set(i.queryId,r),r.init({document:n,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,n){var r=this;n===void 0&&(n=this.generateQueryId()),et(t.query,30),et(t.query.kind==="Document",31),et(!t.returnPartialData,32),et(!t.pollInterval,33);var i=this.transform(t.query);return this.fetchQuery(n,ge(ge({},t),{query:i})).then(function(s){return s&&ge(ge({},s),{data:r.maskOperation({document:i,data:s.data,fetchPolicy:t.fetchPolicy,id:n})})}).finally(function(){return r.stopQuery(n)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var n=this.queries.get(t);n&&n.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(ni(34)),this.queries.forEach(function(n){n.observableQuery?n.networkStatus=on.loading:n.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var n=this;t===void 0&&(t="active");var r=new Map,i=new Map,s=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){if(typeof a=="string")i.set(a,a),s.set(a,!1);else if(VG(a)){var l=Mu(n.transform(a));i.set(l,Bh(a)),s.set(l,!1)}else Fn(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,l){var u=a.observableQuery,c=a.document;if(u){if(t==="all"){r.set(l,u);return}var d=u.queryName,f=u.options.fetchPolicy;if(f==="standby"||t==="active"&&!u.hasObservers())return;(t==="active"||d&&s.has(d)||c&&s.has(Mu(c)))&&(r.set(l,u),d&&s.set(d,!0),c&&s.set(Mu(c),!0))}}),o.size&&o.forEach(function(a){var l=y1("legacyOneTimeQuery"),u=n.getQuery(l).init({document:a.query,variables:a.variables}),c=new B1({queryManager:n,queryInfo:u,options:ge(ge({},a),{fetchPolicy:"network-only"})});et(c.queryId===l),u.setObservableQuery(c),r.set(l,c)}),globalThis.__DEV__!==!1&&s.size&&s.forEach(function(a,l){if(!a){var u=i.get(l);u?globalThis.__DEV__!==!1&&et.warn(35,u):globalThis.__DEV__!==!1&&et.warn(36)}}),r},e.prototype.reFetchObservableQueries=function(t){var n=this;t===void 0&&(t=!1);var r=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,s){var o=i.options.fetchPolicy;i.resetLastResults(),(t||o!=="standby"&&o!=="cache-only")&&r.push(i.refetch()),n.getQuery(s).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var n=this,r=t.query,i=t.variables,s=t.fetchPolicy,o=t.errorPolicy,a=o===void 0?"none":o,l=t.context,u=l===void 0?{}:l,c=t.extensions,d=c===void 0?{}:c;r=this.transform(r),i=this.getVariables(r,i);var f=function(p){return n.getObservableFromLink(r,u,p,d).map(function(m){s!=="no-cache"&&(z1(m,a)&&n.cache.write({query:r,result:m.data,dataId:"ROOT_SUBSCRIPTION",variables:p}),n.broadcastQueries());var g=Hv(m),v=KK(m);if(g||v){var w={};if(g&&(w.graphQLErrors=m.errors),v&&(w.protocolErrors=m.extensions[sC]),a==="none"||v)throw new Zs(w)}return a==="ignore"&&delete m.errors,m})};if(this.getDocumentInfo(r).hasClientExports){var h=this.localState.addExportedVariables(r,i,u).then(f);return new bn(function(p){var m=null;return h.then(function(g){return m=g.subscribe(p)},p.error),function(){return m&&m.unsubscribe()}})}return f(i)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,n,r,i,s){var o=this,a;s===void 0&&(s=(a=n==null?void 0:n.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var l,u=this.getDocumentInfo(t),c=u.serverQuery,d=u.clientQuery;if(c){var f=this,h=f.inFlightLinkObservables,p=f.link,m={query:c,variables:r,operationName:Bh(c)||void 0,context:this.prepareContext(ge(ge({},n),{forceFetch:!s})),extensions:i};if(n=m.context,s){var g=Mu(c),v=bl(r),w=h.lookup(g,v);if(l=w.observable,!l){var b=new rd([A1(p,m)]);l=w.observable=b,b.beforeNext(function(){h.remove(g,v)})}}else l=new rd([A1(p,m)])}else l=new rd([bn.of({data:{}})]),n=this.prepareContext(n);return d&&(l=z_(l,function(_){return o.localState.runResolvers({document:d,remoteResult:_,context:n,variables:r})})),l},e.prototype.getResultsFromLink=function(t,n,r){var i=t.lastRequestId=this.generateRequestId(),s=this.cache.transformForLink(r.query);return z_(this.getObservableFromLink(s,r.context,r.variables),function(o){var a=I1(o),l=a.length>0,u=r.errorPolicy;if(i>=t.lastRequestId){if(l&&u==="none")throw t.markError(new Zs({graphQLErrors:a}));t.markResult(o,s,r,n),t.markReady()}var c={data:o.data,loading:!1,networkStatus:on.ready};return l&&u==="none"&&(c.data=void 0),l&&u!=="ignore"&&(c.errors=a,c.networkStatus=on.error),c},function(o){var a=oC(o)?o:new Zs({networkError:o});throw i>=t.lastRequestId&&t.markError(a),a})},e.prototype.fetchConcastWithInfo=function(t,n,r,i){var s=this;r===void 0&&(r=on.loading),i===void 0&&(i=n.query);var o=this.getVariables(i,n.variables),a=this.getQuery(t),l=this.defaultOptions.watchQuery,u=n.fetchPolicy,c=u===void 0?l&&l.fetchPolicy||"cache-first":u,d=n.errorPolicy,f=d===void 0?l&&l.errorPolicy||"none":d,h=n.returnPartialData,p=h===void 0?!1:h,m=n.notifyOnNetworkStatusChange,g=m===void 0?!1:m,v=n.context,w=v===void 0?{}:v,b=Object.assign({},n,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:p,notifyOnNetworkStatusChange:g,context:w}),_=function(R){b.variables=R;var O=s.fetchQueryByPolicy(a,b,r);return b.fetchPolicy!=="standby"&&O.sources.length>0&&a.observableQuery&&a.observableQuery.applyNextFetchPolicy("after-fetch",n),O},x=function(){return s.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(R){x(),setTimeout(function(){return S.cancel(R)})});var S,I;if(this.getDocumentInfo(b.query).hasClientExports)S=new rd(this.localState.addExportedVariables(b.query,b.variables,b.context).then(_).then(function(R){return R.sources})),I=!0;else{var P=_(b.variables);I=P.fromLink,S=new rd(P.sources)}return S.promise.then(x,x),{concast:S,fromLink:I}},e.prototype.refetchQueries=function(t){var n=this,r=t.updateCache,i=t.include,s=t.optimistic,o=s===void 0?!1:s,a=t.removeOptimistic,l=a===void 0?o?y1("refetchQueries"):void 0:a,u=t.onQueryUpdated,c=new Map;i&&this.getObservableQueries(i).forEach(function(f,h){c.set(h,{oq:f,lastDiff:n.getQuery(h).getDiff()})});var d=new Map;return r&&this.cache.batch({update:r,optimistic:o&&l||!1,removeOptimistic:l,onWatchUpdated:function(f,h,p){var m=f.watcher instanceof G_&&f.watcher.observableQuery;if(m){if(u){c.delete(m.queryId);var g=u(m,h,p);return g===!0&&(g=m.refetch()),g!==!1&&d.set(m,g),g}u!==null&&c.set(m.queryId,{oq:m,lastDiff:p,diff:h})}}}),c.size&&c.forEach(function(f,h){var p=f.oq,m=f.lastDiff,g=f.diff,v;if(u){if(!g){var w=p.queryInfo;w.reset(),g=w.getDiff()}v=u(p,g,m)}(!u||v===!0)&&(v=p.refetch()),v!==!1&&d.set(p,v),h.indexOf("legacyOneTimeQuery")>=0&&n.stopQueryNoBroadcast(h)}),l&&this.cache.removeOptimistic(l),d},e.prototype.maskOperation=function(t){var n,r,i,s=t.document,o=t.data;if(globalThis.__DEV__!==!1){var a=t.fetchPolicy,l=t.id,u=(n=fc(s))===null||n===void 0?void 0:n.operation,c=((r=u==null?void 0:u[0])!==null&&r!==void 0?r:"o")+l;this.dataMasking&&a==="no-cache"&&!EG(s)&&!this.noCacheWarningsByQueryId.has(c)&&(this.noCacheWarningsByQueryId.add(c),globalThis.__DEV__!==!1&&et.warn(37,(i=Bh(s))!==null&&i!==void 0?i:"Unnamed ".concat(u??"operation")))}return this.dataMasking?yY(o,s,this.cache):o},e.prototype.maskFragment=function(t){var n=t.data,r=t.fragment,i=t.fragmentName;return this.dataMasking?m5(n,r,this.cache,i):n},e.prototype.fetchQueryByPolicy=function(t,n,r){var i=this,s=n.query,o=n.variables,a=n.fetchPolicy,l=n.refetchWritePolicy,u=n.errorPolicy,c=n.returnPartialData,d=n.context,f=n.notifyOnNetworkStatusChange,h=t.networkStatus;t.init({document:s,variables:o,networkStatus:r});var p=function(){return t.getDiff()},m=function(_,x){x===void 0&&(x=t.networkStatus||on.loading);var S=_.result;globalThis.__DEV__!==!1&&!c&&!wn(S,{})&&I5(_.missing);var I=function(P){return bn.of(ge({data:P,loading:Zp(x),networkStatus:x},_.complete?null:{partial:!0}))};return S&&i.getDocumentInfo(s).hasForcedResolvers?i.localState.runResolvers({document:s,remoteResult:{data:S},context:d,variables:o,onlyRunForcedResolvers:!0}).then(function(P){return I(P.data||void 0)}):u==="none"&&x===on.refetch&&Array.isArray(_.missing)?I(void 0):I(S)},g=a==="no-cache"?0:r===on.refetch&&l!=="merge"?1:2,v=function(){return i.getResultsFromLink(t,g,{query:s,variables:o,context:d,fetchPolicy:a,errorPolicy:u})},w=f&&typeof h=="number"&&h!==r&&Zp(r);switch(a){default:case"cache-first":{var b=p();return b.complete?{fromLink:!1,sources:[m(b,t.markReady())]}:c||w?{fromLink:!0,sources:[m(b),v()]}:{fromLink:!0,sources:[v()]}}case"cache-and-network":{var b=p();return b.complete||c||w?{fromLink:!0,sources:[m(b),v()]}:{fromLink:!0,sources:[v()]}}case"cache-only":return{fromLink:!1,sources:[m(p(),t.markReady())]};case"network-only":return w?{fromLink:!0,sources:[m(p()),v()]}:{fromLink:!0,sources:[v()]};case"no-cache":return w?{fromLink:!0,sources:[m(t.getDiff()),v()]}:{fromLink:!0,sources:[v()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new G_(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var n=this.localState.prepareContext(t);return ge(ge(ge({},this.defaultContext),n),{clientAwareness:this.clientAwareness})},e}(),zY=function(){function e(t){var n=t.cache,r=t.client,i=t.resolvers,s=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=n,r&&(this.client=r),i&&this.addResolvers(i),s&&this.setFragmentMatcher(s)}return e.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(r){n.resolvers=TA(n.resolvers,r)}):this.resolvers=TA(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return Ya(this,arguments,void 0,function(n){var r=n.document,i=n.remoteResult,s=n.context,o=n.variables,a=n.onlyRunForcedResolvers,l=a===void 0?!1:a;return Xa(this,function(u){return r?[2,this.resolveDocument(r,i.data,s,o,this.fragmentMatcher,l).then(function(c){return ge(ge({},i),{data:c.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Xp(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return t5(t)},e.prototype.prepareContext=function(t){var n=this.cache;return ge(ge({},t),{cache:n,getCacheKey:function(r){return n.identify(r)}})},e.prototype.addExportedVariables=function(t){return Ya(this,arguments,void 0,function(n,r,i){return r===void 0&&(r={}),i===void 0&&(i={}),Xa(this,function(s){return n?[2,this.resolveDocument(n,this.buildRootValueFromCache(n,r)||{},this.prepareContext(i),r).then(function(o){return ge(ge({},r),o.exportedVariables)})]:[2,ge({},r)]})})},e.prototype.shouldForceResolvers=function(t){var n=!1;return Ps(t,{Directive:{enter:function(r){if(r.name.value==="client"&&r.arguments&&(n=r.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),n))return qw}}}),n},e.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:mK(t),variables:n,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,n){return Ya(this,arguments,void 0,function(r,i,s,o,a,l){var u,c,d,f,h,p,m,g,v,w,b;return s===void 0&&(s={}),o===void 0&&(o={}),a===void 0&&(a=function(){return!0}),l===void 0&&(l=!1),Xa(this,function(_){return u=zm(r),c=Hf(r),d=zf(c),f=this.collectSelectionsToResolve(u,d),h=u.operation,p=h?h.charAt(0).toUpperCase()+h.slice(1):"Query",m=this,g=m.cache,v=m.client,w={fragmentMap:d,context:ge(ge({},s),{cache:g,client:v}),variables:o,fragmentMatcher:a,defaultOperationType:p,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:l},b=!1,[2,this.resolveSelectionSet(u.selectionSet,b,i,w).then(function(x){return{result:x,exportedVariables:w.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,n,r,i){return Ya(this,void 0,void 0,function(){var s,o,a,l,u,c=this;return Xa(this,function(d){return s=i.fragmentMap,o=i.context,a=i.variables,l=[r],u=function(f){return Ya(c,void 0,void 0,function(){var h,p;return Xa(this,function(m){return!n&&!i.selectionsToResolve.has(f)?[2]:Bm(f,a)?Rl(f)?[2,this.resolveField(f,n,r,i).then(function(g){var v;typeof g<"u"&&l.push((v={},v[ma(f)]=g,v))})]:(eK(f)?h=f:(h=s[f.name.value],et(h,19,f.name.value)),h&&h.typeCondition&&(p=h.typeCondition.name.value,i.fragmentMatcher(r,p,o))?[2,this.resolveSelectionSet(h.selectionSet,n,r,i).then(function(g){l.push(g)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(u)).then(function(){return Qw(l)})]})})},e.prototype.resolveField=function(t,n,r,i){return Ya(this,void 0,void 0,function(){var s,o,a,l,u,c,d,f,h,p=this;return Xa(this,function(m){return r?(s=i.variables,o=t.name.value,a=ma(t),l=o!==a,u=r[a]||r[o],c=Promise.resolve(u),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=r.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(h=f[l?o:a],h&&(c=Promise.resolve(uC.withValue(this.cache,h,[r,Yw(t,s),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,c.then(function(g){var v,w;if(g===void 0&&(g=u),t.directives&&t.directives.forEach(function(_){_.name.value==="export"&&_.arguments&&_.arguments.forEach(function(x){x.name.value==="as"&&x.value.kind==="StringValue"&&(i.exportedVariables[x.value.value]=g)})}),!t.selectionSet||g==null)return g;var b=(w=(v=t.directives)===null||v===void 0?void 0:v.some(function(_){return _.name.value==="client"}))!==null&&w!==void 0?w:!1;if(Array.isArray(g))return p.resolveSubSelectedArray(t,n||b,g,i);if(t.selectionSet)return p.resolveSelectionSet(t.selectionSet,n||b,g,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,n,r,i){var s=this;return Promise.all(r.map(function(o){if(o===null)return null;if(Array.isArray(o))return s.resolveSubSelectedArray(t,n,o,i);if(t.selectionSet)return s.resolveSelectionSet(t.selectionSet,n,o,i)}))},e.prototype.collectSelectionsToResolve=function(t,n){var r=function(o){return!Array.isArray(o)},i=this.selectionsToResolveCache;function s(o){if(!i.has(o)){var a=new Set;i.set(o,a),Ps(o,{Directive:function(l,u,c,d,f){l.name.value==="client"&&f.forEach(function(h){r(h)&&gA(h)&&a.add(h)})},FragmentSpread:function(l,u,c,d,f){var h=n[l.name.value];et(h,20,l.name.value);var p=s(h);p.size>0&&(f.forEach(function(m){r(m)&&gA(m)&&a.add(m)}),a.add(l),p.forEach(function(m){a.add(m)}))}})}return i.get(o)}return s(t)},e}(),oP=!1,pC=function(){function e(t){var n=this,r;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw ni(16);var i=t.uri,s=t.credentials,o=t.headers,a=t.cache,l=t.documentTransform,u=t.ssrMode,c=u===void 0?!1:u,d=t.ssrForceFetchDelay,f=d===void 0?0:d,h=t.connectToDevTools,p=t.queryDeduplication,m=p===void 0?!0:p,g=t.defaultOptions,v=t.defaultContext,w=t.assumeImmutableResults,b=w===void 0?a.assumeImmutableResults:w,_=t.resolvers,x=t.typeDefs,S=t.fragmentMatcher,I=t.name,P=t.version,R=t.devtools,O=t.dataMasking,M=t.link;M||(M=i?new aC({uri:i,credentials:s,headers:o}):Vf.empty()),this.link=M,this.cache=a,this.disableNetworkFetches=c||f>0,this.queryDeduplication=m,this.defaultOptions=g||Object.create(null),this.typeDefs=x,this.devtoolsConfig=ge(ge({},R),{enabled:(r=R==null?void 0:R.enabled)!==null&&r!==void 0?r:h}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),f&&setTimeout(function(){return n.disableNetworkFetches=!1},f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=jk,this.localState=new zY({cache:a,client:this,resolvers:_,fragmentMatcher:S}),this.queryManager=new BY({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:v,documentTransform:l,queryDeduplication:m,ssrMode:c,dataMasking:!!O,clientAwareness:{name:I,version:P},localState:this.localState,assumeImmutableResults:b,onBroadcast:this.devtoolsConfig.enabled?function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.getQueryStore(),mutations:n.queryManager.mutationStore||{}},dataWithOptimisticResults:n.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this,!oP&&globalThis.__DEV__!==!1&&(oP=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var r=window.navigator,i=r&&r.userAgent,s=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?s="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(s="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),s&&globalThis.__DEV__!==!1&&et.log("Download the Apollo DevTools for a better development experience: %s",s)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=$_(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=ge(ge({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=$_(this.defaultOptions.query,t)),et(t.fetchPolicy!=="cache-and-network",17),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=ge(ge({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=$_(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){var n=this,r=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(t).map(function(i){return ge(ge({},i),{data:n.queryManager.maskOperation({document:t.query,data:i.data,fetchPolicy:t.fetchPolicy,id:r})})})},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!1),this.cache.readQuery(t,n)},e.prototype.watchFragment=function(t){var n;return this.cache.watchFragment(ge(ge({},t),(n={},n[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,n)))},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!1),this.cache.readFragment(t,n)},e.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return A1(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(n){return n()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(n){return n()}))})},e.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var n=this.queryManager.refetchQueries(t),r=[],i=[];n.forEach(function(o,a){r.push(a),i.push(o)});var s=Promise.all(i);return s.queries=r,s.results=i,s.catch(function(o){globalThis.__DEV__!==!1&&et.debug(18,o)}),s},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();globalThis.__DEV__!==!1&&(pC.prototype.getMemoryInternals=MG);var Uv=new Map,$1=new Map,A5=!0,zy=!1;function P5(e){return e.replace(/[\s,]+/g," ").trim()}function $Y(e){return P5(e.source.body.substring(e.start,e.end))}function HY(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,s=$Y(r.loc),o=$1.get(i);o&&!o.has(s)?A5&&console.warn("Warning: fragment with name "+i+` already exists. graphql-tag enforces all fragment names across your application to be unique; read more about this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||$1.set(i,o=new Set),o.add(s),t.has(s)||(t.add(s),n.push(r))}else n.push(r)}),ge(ge({},e),{definitions:n})}function VY(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var s=r[i];s&&typeof s=="object"&&t.add(s)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function jY(e){var t=P5(e);if(!Uv.has(t)){var n=iG(e,{experimentalFragmentVariables:zy,allowLegacyFragmentVariables:zy});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Uv.set(t,VY(HY(n)))}return Uv.get(t)}function ln(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,s){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[s+1]}),jY(r)}function UY(){Uv.clear(),$1.clear()}function WY(){A5=!1}function qY(){zy=!0}function GY(){zy=!1}var vh={gql:ln,resetCaches:UY,disableFragmentWarnings:WY,enableExperimentalFragmentVariables:qY,disableExperimentalFragmentVariables:GY};(function(e){e.gql=vh.gql,e.resetCaches=vh.resetCaches,e.disableFragmentWarnings=vh.disableFragmentWarnings,e.enableExperimentalFragmentVariables=vh.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=vh.disableExperimentalFragmentVariables})(ln);ln.default=ln;var KY=Symbol("default-apollo-client"),H1=Symbol("apollo-clients");function K_(e,t){return e?e.default:t??void 0}function Y_(e,t){return e==null?void 0:e[t]}function Ac(e){let t;const n=V1;if(!zw())t=i=>i?Y_(n,i):K_(n,n.default);else{const i=Lt(H1,null),s=Lt(KY,null);t=o=>{if(o){const l=Y_(i,o);return l||Y_(n,o)}const a=K_(i,s);return a||K_(n,n.default)}}function r(i=e){const s=t(i);if(!s)throw new Error(`Apollo client with id ${i??"default"} not found. Use an app.runWithContext() or provideApolloClient() if you are outside of a component setup.`);return s}return{resolveClient:r,get client(){return r()}}}var V1={};function YY(e){return V1=e,function(t){const n=t();return V1={},n}}function X_(e){return Jt(e)?e:typeof e=="function"?te(e):U(e)}function XY(e){return Jt(e)?e:typeof e=="function"?te(e):e&&Ca(e)}function $y(){const e=[];function t(s){return e.push(s),{off:()=>n(s)}}function n(s){const o=e.indexOf(s);o!==-1&&e.splice(o,1)}function r(...s){for(const o of e)o(...s)}function i(){return e.length}return{on:t,off:n,trigger:r,getCount:i}}var Ha=typeof window>"u",bd={queries:U(0),mutations:U(0),subscriptions:U(0),components:new Map};function JY(){const e=Yl();if(!e)return{};let t;return bd.components.has(e)?t=bd.components.get(e):(bd.components.set(e,t={queries:U(0),mutations:U(0),subscriptions:U(0)}),Xl(()=>{bd.components.delete(e)})),{tracking:t}}function M5(e,t){if(Ha)return;const{tracking:n}=JY();He(e,(r,i)=>{if(i!=null&&r!==i){const s=r?1:-1;n&&(n[t].value+=s),bd[t].value+=s}},{immediate:!0}),Xl(()=>{e.value&&(n&&n[t].value--,bd[t].value--)})}function QY(e){M5(e,"queries")}function ZY(e){M5(e,"mutations")}function D5(e){return e instanceof Error?oC(e)?e:new Zs({networkError:e,errorMessage:e.message}):new Zs({networkError:Object.assign(new Error,{originalError:e}),errorMessage:String(e)})}function eX(e){return new Zs({graphQLErrors:e,errorMessage:`GraphQL response contains errors: ${e.map(t=>t.message).join(" | ")}`})}function Ro(e,t,n){return tX(e,t,n)}function tX(e,t,n={},r=!1){var i;const s=Yl(),o=Jn(),a=U(),l=X_(e),u=X_(t),c=XY(n),d=ho(),f=$y(),h=ho(null),p=$y(),m=U(!1);s&&QY(m);const g=U();let v,w=!1,b,_;const x=()=>{w=!0,v&&v()},S=re=>{_=re,b&&b(re)},I=()=>{v=void 0,b=void 0,w=!1,_=void 0};o&&((i=NB)==null||i(()=>{var re;if(!(!ae.value||Ha&&((re=a.value)==null?void 0:re.prefetch)===!1))return new Promise((pe,De)=>{v=()=>{I(),pe()},b=N=>{I(),De(N)},w?v():_&&b(_)}).finally(Me)}));const{resolveClient:P}=Ac();function R(){var re;return P((re=a.value)==null?void 0:re.clientId)}const O=ho();let M,E=!1,L=!1,j=!0;function F(){var re,pe,De,N,D;if(E||!ae.value||Ha&&((re=a.value)==null?void 0:re.prefetch)===!1||!Ae){x();return}Ha&&(be(l.value),ie(u.value),we(y(c))),E=!0,h.value=null,m.value=!0;const q=R();if(O.value=q.watchQuery({query:Ae,variables:T??{},...a.value,...Ha&&((pe=a.value)==null?void 0:pe.fetchPolicy)!=="no-cache"?{fetchPolicy:"network-only"}:{}}),B(),!Ha&&(j||!((De=a.value)!=null&&De.keepPreviousResult))&&(((N=a.value)==null?void 0:N.fetchPolicy)!=="no-cache"||a.value.notifyOnNetworkStatusChange)){const C=O.value.getCurrentResult(!1);!C.loading||C.partial||(D=a.value)!=null&&D.notifyOnNetworkStatusChange?(Z(C),L=!C.loading):C.error&&(oe(C.error),L=!0)}if(!Ha)for(const C of de)Ce(C);j=!1}function B(){M&&!M.closed||O.value&&(L=!1,M=O.value.subscribe({next:Z,error:oe}))}function Y(){var re,pe,De,N;const D=P((re=a.value)==null?void 0:re.clientId);return((pe=a.value)==null?void 0:pe.errorPolicy)||((N=(De=D.defaultOptions)==null?void 0:De.watchQuery)==null?void 0:N.errorPolicy)}function Z(re){var pe;if(L){L=!1;return}h.value=null,ne(re);const De=Y();De&&De==="all"&&!re.error&&((pe=re.errors)!=null&&pe.length)&&le(eX(re.errors)),x()}function ne(re){var pe,De;d.value=re.data&&Object.keys(re.data).length===0?re.error&&!((pe=a.value)!=null&&pe.returnPartialData)&&((De=a.value)==null?void 0:De.errorPolicy)==="none"?void 0:d.value:re.data,m.value=re.loading,g.value=re.networkStatus,vt(()=>{f.trigger(re,{client:R()})})}function oe(re){if(L){L=!1;return}const pe=D5(re),De=Y();De&&De!=="none"&&ne(O.value.getCurrentResult()),le(pe),S(pe),Ee()}function le(re){h.value=re,m.value=!1,g.value=8,vt(()=>{p.trigger(re,{client:R()})})}function Ee(){if(!O.value)return;const re=O.value.getLastError(),pe=O.value.getLastResult();O.value.resetLastResults(),B(),Object.assign(O.value,{lastError:re,lastResult:pe})}let xe=[];function Me(){x(),E&&(E=!1,m.value=!1,xe.forEach(re=>re()),xe=[],O.value&&(O.value.stopPolling(),O.value=null),M&&(M.unsubscribe(),M=void 0))}let Ve=!1;function Ue(){!E||Ve||(Ve=!0,vt(()=>{E&&(Me(),F()),Ve=!1}))}let me,_e=!1;function Te(){var re,pe;a.value?((re=a.value)!=null&&re.throttle?me=gz(a.value.throttle,Ue):(pe=a.value)!=null&&pe.debounce?me=E7(a.value.debounce,Ue):me=Ue,_e=!0):me=Ue}function Ie(){!E||Ve||(_e||Te(),me())}let Ae=l.value;const Q=U(r),J=te(()=>!a.value||a.value.enabled==null||a.value.enabled),ae=te(()=>J.value&&!Q.value&&!!l.value);He(()=>y(c),we,{deep:!0,immediate:!0});function we(re){a.value&&(a.value.throttle!==re.throttle||a.value.debounce!==re.debounce)&&Te(),a.value=re,Ie()}He(l,be);function be(re){Ae=re,Ie()}let T,V;He(()=>{if(ae.value)return u.value},ie,{deep:!0,immediate:!0});function ie(re){const pe=JSON.stringify([re,ae.value]);pe!==V&&(T=re,Ie()),V=pe}function ue(re=void 0){if(O.value)return re&&(T=re),h.value=null,m.value=!0,O.value.refetch(re).then(pe=>{var De;const N=(De=O.value)==null?void 0:De.getCurrentResult();return N&&ne(N),pe})}function he(re){O.value&&O.value.updateQuery(re)}function Se(re){if(O.value)return h.value=null,m.value=!0,O.value.fetchMore(re).then(pe=>{var De;const N=(De=O.value)==null?void 0:De.getCurrentResult();return N&&ne(N),pe})}const de=[];function Pe(re){if(Ha)return;const pe=X_(re);He(pe,(De,N,D)=>{const q=de.findIndex(G=>G.options===N);q!==-1&&de.splice(q,1);const C={options:De,unsubscribeFns:[]};de.push(C),Ce(C),D(()=>{C.unsubscribeFns.forEach(G=>G()),C.unsubscribeFns=[]})},{immediate:!0})}function Ce(re){if(!E)return;if(!O.value)throw new Error("Query is not defined");const pe=O.value.subscribeToMore(re.options);xe.push(pe),re.unsubscribeFns.push(pe)}return He(ae,re=>{re?vt(()=>{F()}):Me()}),ae.value&&F(),s?Xl(()=>{Me(),de.length=0}):console.warn("[Vue apollo] useQuery() is called outside of an active effect scope and the query will not be automatically stopped."),{result:d,loading:m,networkStatus:g,error:h,start:F,stop:Me,restart:Ie,forceDisabled:Q,document:l,variables:u,options:c,query:O,refetch:ue,fetchMore:Se,subscribeToMore:Pe,updateQuery:he,onResult:f.on,onError:p.on}}function mC(e,t={}){const n=Yl(),r=U(!1);n&&ZY(r);const i=ho(null),s=U(!1),o=$y(),a=$y(),{resolveClient:l}=Ac();async function u(c,d={}){let f;typeof e=="function"?f=e():Jt(e)?f=e.value:f=e;let h;typeof t=="function"?h=t():Jt(t)?h=t.value:h=t;const p=l(h.clientId);i.value=null,r.value=!0,s.value=!0;try{const m=await p.mutate({mutation:f,...h,...d,variables:c??h.variables?{...h.variables,...c}:void 0});return r.value=!1,await vt(),o.trigger(m,{client:p}),m}catch(m){const g=D5(m);if(i.value=g,r.value=!1,a.trigger(g,{client:p}),h.throws==="always"||h.throws!=="never"&&!a.getCount())throw g}return null}return n&&Xl(()=>{r.value=!1}),{mutate:u,loading:r,error:i,called:s,onDone:o.on,onError:a.on}}/*! * pinia v2.3.0 * (c) 2024 Eduardo San Martin Morote * @license MIT */let N5;const t0=e=>N5=e,L5=Symbol();function j1(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var op;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(op||(op={}));function nX(){const e=Pm(!0),t=e.run(()=>U({}));let n=[],r=[];const i=Mm({install(s){t0(i),i._a=s,s.provide(L5,i),s.config.globalProperties.$pinia=i,r.forEach(o=>n.push(o)),r=[]},use(s){return this._a?n.push(s):r.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const F5=()=>{};function aP(e,t,n,r=F5){e.push(t);const i=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Yl()&&Xl(i),i}function Vc(e,...t){e.slice().forEach(n=>{n(...t)})}const rX=e=>e(),lP=Symbol(),J_=Symbol();function U1(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],i=e[n];j1(i)&&j1(r)&&e.hasOwnProperty(n)&&!Jt(r)&&!yl(r)?e[n]=U1(i,r):e[n]=r}return e}const iX=Symbol();function sX(e){return!j1(e)||!e.hasOwnProperty(iX)}const{assign:Va}=Object;function oX(e){return!!(Jt(e)&&e.effect)}function aX(e,t,n,r){const{state:i,actions:s,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=i?i():{});const c=fn(n.state.value[e]);return Va(c,s,Object.keys(o||{}).reduce((d,f)=>(d[f]=Mm(te(()=>{t0(n);const h=n._s.get(e);return o[f].call(h,h)})),d),{}))}return l=B5(e,u,t,n,r,!0),l}function B5(e,t,n={},r,i,s){let o;const a=Va({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],h;const p=r.state.value[e];!s&&!p&&(r.state.value[e]={}),U({});let m;function g(P){let R;u=c=!1,typeof P=="function"?(P(r.state.value[e]),R={type:op.patchFunction,storeId:e,events:h}):(U1(r.state.value[e],P),R={type:op.patchObject,payload:P,storeId:e,events:h});const O=m=Symbol();vt().then(()=>{m===O&&(u=!0)}),c=!0,Vc(d,R,r.state.value[e])}const v=s?function(){const{state:R}=n,O=R?R():{};this.$patch(M=>{Va(M,O)})}:F5;function w(){o.stop(),d=[],f=[],r._s.delete(e)}const b=(P,R="")=>{if(lP in P)return P[J_]=R,P;const O=function(){t0(r);const M=Array.from(arguments),E=[],L=[];function j(Y){E.push(Y)}function F(Y){L.push(Y)}Vc(f,{args:M,name:O[J_],store:x,after:j,onError:F});let B;try{B=P.apply(this&&this.$id===e?this:x,M)}catch(Y){throw Vc(L,Y),Y}return B instanceof Promise?B.then(Y=>(Vc(E,Y),Y)).catch(Y=>(Vc(L,Y),Promise.reject(Y))):(Vc(E,B),B)};return O[lP]=!0,O[J_]=R,O},_={_p:r,$id:e,$onAction:aP.bind(null,f),$patch:g,$reset:v,$subscribe(P,R={}){const O=aP(d,P,R.detached,()=>M()),M=o.run(()=>He(()=>r.state.value[e],E=>{(R.flush==="sync"?c:u)&&P({storeId:e,type:op.direct,events:h},E)},Va({},l,R)));return O},$dispose:w},x=Ca(_);r._s.set(e,x);const I=(r._a&&r._a.runWithContext||rX)(()=>r._e.run(()=>(o=Pm()).run(()=>t({action:b}))));for(const P in I){const R=I[P];if(Jt(R)&&!oX(R)||yl(R))s||(p&&sX(R)&&(Jt(R)?R.value=p[P]:U1(R,p[P])),r.state.value[e][P]=R);else if(typeof R=="function"){const O=b(R,P);I[P]=O,a.actions[P]=R}}return Va(x,I),Va($t(x),I),Object.defineProperty(x,"$state",{get:()=>r.state.value[e],set:P=>{g(R=>{Va(R,P)})}}),r._p.forEach(P=>{Va(x,o.run(()=>P({store:x,app:r._a,pinia:r,options:a})))}),p&&s&&n.hydrate&&n.hydrate(x.$state,p),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function z5(e,t,n){let r,i;const s=typeof t=="function";typeof e=="string"?(r=e,i=s?n:t):(i=e,r=e.id);function o(a,l){const u=zw();return a=a||(u?Lt(L5,null):null),a&&t0(a),a=N5,a._s.has(r)||(s?B5(r,t,i,a):aX(r,i,a)),a._s.get(r)}return o.$id=r,o}var lX=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uP(Object(n),!0).forEach(function(r){uX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uX(e,t,n){return(t=function(r){var i=function(s,o){if(Ku(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var l=a.call(s,o||"default");if(Ku(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(s)}(r,"string");return Ku(i)==="symbol"?i:String(i)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ku(e){return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}(function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,i=String(n),s=i.length,o=-1,a="",l=i.charCodeAt(0);++o<s;)(r=i.charCodeAt(o))!=0?a+=r>=1&&r<=31||r==127||o==0&&r>=48&&r<=57||o==1&&r>=48&&r<=57&&l==45?"\\"+r.toString(16)+" ":o==0&&s==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+i.charAt(o):i.charAt(o):a+="�";return a};e.CSS||(e.CSS={}),e.CSS.escape=t})(lX);var cX={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function dX(e){if(Ku(e)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Gu(Gu({},cX),e);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(Ku(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var n={};return{bootstrap:fX.bind(null,t,n),mount:hX.bind(null,t,n),unmount:mX.bind(null,t,n),update:pX.bind(null,t,n)}}function fX(e){return e.loadRootComponent?e.loadRootComponent().then(function(t){return e.rootComponent=t}):Promise.resolve()}function hX(e,t,n){var r={};return Promise.resolve().then(function(){return function(i,s){return typeof i.appOptions=="function"?i.appOptions(s):Promise.resolve(Gu({},i.appOptions))}(e,n).then(function(i){var s;if(n.domElement&&!i.el&&(i.el=n.domElement),i.el)if(typeof i.el=="string"){if(!(s=document.querySelector(i.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(i.el))}else(s=i.el).id||(s.id="single-spa-application:".concat(n.name)),i.el="#".concat(CSS.escape(s.id));else{var o="single-spa-application:".concat(n.name);i.el="#".concat(CSS.escape(o)),(s=document.getElementById(o))||((s=document.createElement("div")).id=o,document.body.appendChild(s))}if(!e.replaceMode&&(i.el=i.el+" .single-spa-container",!s.querySelector(".single-spa-container"))){var a=document.createElement("div");a.className="single-spa-container",s.appendChild(a)}r.domEl=s,i.render||i.template||!e.rootComponent||(i.render=function(u){return u(e.rootComponent)}),i.data||(i.data={});var l=i.data;if(i.data=function(){return Gu(Gu({},typeof l=="function"?l.call(this,this):l),n)},e.createApp){if(r.vueInstance=e.createApp(i),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,n)).then(function(){return r.root=r.vueInstance.mount(i.el),t[n.name]=r,r.vueInstance});r.root=r.vueInstance.mount(i.el)}else if(r.vueInstance=new e.Vue(i),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,n)).then(function(){return t[n.name]=r,r.vueInstance});return t[n.name]=r,r.vueInstance})})}function pX(e,t,n){return Promise.resolve().then(function(){var r=t[n.name],i=Gu(Gu({},e.appOptions.data||{}),n),s=r.root||r.vueInstance;for(var o in i)s[o]=i[o]})}function mX(e,t,n){return Promise.resolve().then(function(){var r=t[n.name];e.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const gX=new Set(["title","titleTemplate","script","style","noscript"]),Wv=new Set(["base","meta","link","style","script","noscript"]),vX=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),yX=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),$5=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),bX=typeof window<"u";function Hy(e){let t=9;for(let n=0;n<e.length;)t=Math.imul(t^e.charCodeAt(n++),9**9);return((t^t>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function W1(e){if(e._h)return e._h;if(e._d)return Hy(e._d);let t=`${e.tag}:${e.textContent||e.innerHTML||""}:`;for(const n in e.props)t+=`${n}:${String(e.props[n])},`;return Hy(t)}function wX(e,t){return e instanceof Promise?e.then(t):t(e)}function q1(e,t,n,r){const i=r||V5(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[e==="script"||e==="noscript"||e==="style"?"innerHTML":"textContent"]:t},e==="templateParams"||e==="titleTemplate");if(i instanceof Promise)return i.then(o=>q1(e,t,n,o));const s={tag:e,props:i};for(const o of $5){const a=s.props[o]!==void 0?s.props[o]:n[o];a!==void 0&&((!(o==="innerHTML"||o==="textContent"||o==="children")||gX.has(s.tag))&&(s[o==="children"?"innerHTML":o]=a),delete s.props[o])}return s.props.body&&(s.tagPosition="bodyClose",delete s.props.body),s.tag==="script"&&typeof s.innerHTML=="object"&&(s.innerHTML=JSON.stringify(s.innerHTML),s.props.type=s.props.type||"application/json"),Array.isArray(s.props.content)?s.props.content.map(o=>({...s,props:{...s.props,content:o}})):s}function _X(e,t){var r;const n=e==="class"?" ":";";return t&&typeof t=="object"&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,i])=>i).map(([i,s])=>e==="style"?`${i}:${s}`:i)),(r=String(Array.isArray(t)?t.join(n):t))==null?void 0:r.split(n).filter(i=>!!i.trim()).join(n)}function H5(e,t,n,r){for(let i=r;i<n.length;i+=1){const s=n[i];if(s==="class"||s==="style"){e[s]=_X(s,e[s]);continue}if(e[s]instanceof Promise)return e[s].then(o=>(e[s]=o,H5(e,t,n,i)));if(!t&&!$5.has(s)){const o=String(e[s]),a=s.startsWith("data-");o==="true"||o===""?e[s]=a?"true":!0:e[s]||(a&&o==="false"?e[s]="false":delete e[s])}}}function V5(e,t=!1){const n=H5(e,t,Object.keys(e),0);return n instanceof Promise?n.then(()=>e):e}const SX=10;function j5(e,t,n){for(let r=n;r<t.length;r+=1){const i=t[r];if(i instanceof Promise)return i.then(s=>(t[r]=s,j5(e,t,r)));Array.isArray(i)?e.push(...i):e.push(i)}}function xX(e){const t=[],n=e.resolvedInput;for(const i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;const s=n[i];if(!(s===void 0||!vX.has(i))){if(Array.isArray(s)){for(const o of s)t.push(q1(i,o,e));continue}t.push(q1(i,s,e))}}if(t.length===0)return[];const r=[];return wX(j5(r,t,0),()=>r.map((i,s)=>(i._e=e._i,e.mode&&(i._m=e.mode),i._p=(e._i<<SX)+s,i)))}const cP=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),dP={base:-10,title:10},fP={critical:-80,high:-10,low:20};function Vy(e){const t=e.tagPriority;if(typeof t=="number")return t;let n=100;return e.tag==="meta"?e.props["http-equiv"]==="content-security-policy"?n=-30:e.props.charset?n=-20:e.props.name==="viewport"&&(n=-15):e.tag==="link"&&e.props.rel==="preconnect"?n=20:e.tag in dP&&(n=dP[e.tag]),t&&t in fP?n+fP[t]:n}const EX=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],TX=["name","property","http-equiv"];function U5(e){const{props:t,tag:n}=e;if(yX.has(n))return n;if(n==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(t.id)return`${n}:id:${t.id}`;for(const r of TX)if(t[r]!==void 0)return`${n}:${r}:${t[r]}`;return!1}const Qa="%separator";function kX(e,t,n=!1){var i;let r;if(t==="s"||t==="pageTitle")r=e.pageTitle;else if(t.includes(".")){const s=t.indexOf(".");r=(i=e[t.substring(0,s)])==null?void 0:i[t.substring(s+1)]}else r=e[t];if(r!==void 0)return n?(r||"").replace(/"/g,'\\"'):r||""}const CX=new RegExp(`${Qa}(?:\\s*${Qa})*`,"g");function Cg(e,t,n,r=!1){if(typeof e!="string"||!e.includes("%"))return e;let i=e;try{i=decodeURI(e)}catch{}const s=i.match(/%\w+(?:\.\w+)?/g);if(!s)return e;const o=e.includes(Qa);return e=e.replace(/%\w+(?:\.\w+)?/g,a=>{if(a===Qa||!s.includes(a))return a;const l=kX(t,a.slice(1),r);return l!==void 0?l:a}).trim(),o&&(e.endsWith(Qa)&&(e=e.slice(0,-Qa.length)),e.startsWith(Qa)&&(e=e.slice(Qa.length)),e=e.replace(CX,n).trim()),e}function hP(e,t){return e==null?t||null:typeof e=="function"?e(t):e}async function W5(e,t={}){const n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;const r={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",r),!!r.shouldRender)return e._domUpdatePromise||(e._domUpdatePromise=new Promise(async i=>{var d;const s=(await e.resolveTags()).map(f=>({tag:f,id:Wv.has(f.tag)?W1(f):f.tag,shouldRender:!0}));let o=e._dom;if(!o){o={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};const f=new Set;for(const h of["body","head"]){const p=(d=n[h])==null?void 0:d.children;for(const m of p){const g=m.tagName.toLowerCase();if(!Wv.has(g))continue;const v={tag:g,props:await V5(m.getAttributeNames().reduce((x,S)=>({...x,[S]:m.getAttribute(S)}),{})),innerHTML:m.innerHTML},w=U5(v);let b=w,_=1;for(;b&&f.has(b);)b=`${w}:${_++}`;b&&(v._d=b,f.add(b)),o.elMap[m.getAttribute("data-hid")||W1(v)]=m}}}o.pendingSideEffects={...o.sideEffects},o.sideEffects={};function a(f,h,p){const m=`${f}:${h}`;o.sideEffects[m]=p,delete o.pendingSideEffects[m]}function l({id:f,$el:h,tag:p}){const m=p.tag.endsWith("Attrs");if(o.elMap[f]=h,m||(p.textContent&&p.textContent!==h.textContent&&(h.textContent=p.textContent),p.innerHTML&&p.innerHTML!==h.innerHTML&&(h.innerHTML=p.innerHTML),a(f,"el",()=>{var g;(g=o.elMap[f])==null||g.remove(),delete o.elMap[f]})),p._eventHandlers)for(const g in p._eventHandlers)Object.prototype.hasOwnProperty.call(p._eventHandlers,g)&&h.getAttribute(`data-${g}`)!==""&&((p.tag==="bodyAttrs"?n.defaultView:h).addEventListener(g.substring(2),p._eventHandlers[g].bind(h)),h.setAttribute(`data-${g}`,""));for(const g in p.props){if(!Object.prototype.hasOwnProperty.call(p.props,g))continue;const v=p.props[g],w=`attr:${g}`;if(g==="class"){if(!v)continue;for(const b of v.split(" "))m&&a(f,`${w}:${b}`,()=>h.classList.remove(b)),!h.classList.contains(b)&&h.classList.add(b)}else if(g==="style"){if(!v)continue;for(const b of v.split(";")){const _=b.indexOf(":"),x=b.substring(0,_).trim(),S=b.substring(_+1).trim();a(f,`${w}:${x}`,()=>{h.style.removeProperty(x)}),h.style.setProperty(x,S)}}else h.getAttribute(g)!==v&&h.setAttribute(g,v===!0?"":String(v)),m&&a(f,w,()=>h.removeAttribute(g))}}const u=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of s){const{tag:h,shouldRender:p,id:m}=f;if(p){if(h.tag==="title"){n.title=h.textContent;continue}f.$el=f.$el||o.elMap[m],f.$el?l(f):Wv.has(h.tag)&&u.push(f)}}for(const f of u){const h=f.tag.tagPosition||"head";f.$el=n.createElement(f.tag.tag),l(f),c[h]=c[h]||n.createDocumentFragment(),c[h].appendChild(f.$el)}for(const f of s)await e.hooks.callHook("dom:renderTag",f,n,a);c.head&&n.head.appendChild(c.head),c.bodyOpen&&n.body.insertBefore(c.bodyOpen,n.body.firstChild),c.bodyClose&&n.body.appendChild(c.bodyClose);for(const f in o.pendingSideEffects)o.pendingSideEffects[f]();e._dom=o,await e.hooks.callHook("dom:rendered",{renders:s}),i()}).finally(()=>{e._domUpdatePromise=void 0,e.dirty=!1})),e._domUpdatePromise}function q5(e,t={}){const n=t.delayFn||(r=>setTimeout(r,10));return e._domDebouncedUpdatePromise=e._domDebouncedUpdatePromise||new Promise(r=>n(()=>W5(e,t).then(()=>{delete e._domDebouncedUpdatePromise,r()})))}function OX(e){return t=>{var r,i;const n=((i=(r=t.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:i.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":s=>{q5(s,e)}}}}}function G1(e,t={},n){for(const r in e){const i=e[r],s=n?`${n}:${r}`:r;typeof i=="object"&&i!==null?G1(i,t,s):typeof i=="function"&&(t[s]=i)}return t}const RX={run:e=>e()},IX=()=>RX,G5=typeof console.createTask<"u"?console.createTask:IX;function AX(e,t){const n=t.shift(),r=G5(n);return e.reduce((i,s)=>i.then(()=>r.run(()=>s(...t))),Promise.resolve())}function PX(e,t){const n=t.shift(),r=G5(n);return Promise.all(e.map(i=>r.run(()=>i(...t))))}function Q_(e,t){for(const n of[...e])n(t)}class MX{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const i=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let o=s.message;o||(o=`${i} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||(console.warn(o),this._deprecatedMessages.add(o))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,i=(...s)=>(typeof r=="function"&&r(),r=void 0,i=void 0,n(...s));return r=this.hook(t,i),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const i of r)this.hook(t,i)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=G1(t),r=Object.keys(n).map(i=>this.hook(i,n[i]));return()=>{for(const i of r.splice(0,r.length))i()}}removeHooks(t){const n=G1(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(AX,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(PX,t,...n)}callHookWith(t,n,...r){const i=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Q_(this._before,i);const s=t(n in this._hooks?[...this._hooks[n]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&i&&Q_(this._after,i)}):(this._after&&i&&Q_(this._after,i),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function DX(){return new MX}const NX=new Set(["templateParams","htmlAttrs","bodyAttrs"]),LX={hooks:{"tag:normalise":({tag:e})=>{e.props.hid&&(e.key=e.props.hid,delete e.props.hid),e.props.vmid&&(e.key=e.props.vmid,delete e.props.vmid),e.props.key&&(e.key=e.props.key,delete e.props.key);const t=U5(e);t&&!t.startsWith("meta:og:")&&!t.startsWith("meta:twitter:")&&delete e.key;const n=t||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":e=>{const t=Object.create(null);for(const r of e.tags){const i=(r.key?`${r.tag}:${r.key}`:r._d)||W1(r),s=t[i];if(s){let a=r==null?void 0:r.tagDuplicateStrategy;if(!a&&NX.has(r.tag)&&(a="merge"),a==="merge"){const l=s.props;l.style&&r.props.style&&(l.style[l.style.length-1]!==";"&&(l.style+=";"),r.props.style=`${l.style} ${r.props.style}`),l.class&&r.props.class?r.props.class=`${l.class} ${r.props.class}`:l.class&&(r.props.class=l.class),t[i].props={...l,...r.props};continue}else if(r._e===s._e){s._duped=s._duped||[],r._d=`${s._d}:${s._duped.length+1}`,s._duped.push(r);continue}else if(Vy(r)>Vy(s))continue}if(!(r.innerHTML||r.textContent||Object.keys(r.props).length!==0)&&Wv.has(r.tag)){delete t[i];continue}t[i]=r}const n=[];for(const r in t){const i=t[r],s=i._duped;n.push(i),s&&(delete i._duped,n.push(...s))}e.tags=n,e.tags=e.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},FX=new Set(["script","link","bodyAttrs"]),BX=e=>({hooks:{"tags:resolve":t=>{for(const n of t.tags){if(!FX.has(n.tag))continue;const r=n.props;for(const i in r){if(i[0]!=="o"||i[1]!=="n"||!Object.prototype.hasOwnProperty.call(r,i))continue;const s=r[i];typeof s=="function"&&(e.ssr&&cP.has(i)?r[i]=`this.dataset.${i}fired = true`:delete r[i],n._eventHandlers=n._eventHandlers||{},n._eventHandlers[i]=s)}e.ssr&&n._eventHandlers&&(n.props.src||n.props.href)&&(n.key=n.key||Hy(n.props.src||n.props.href))}},"dom:renderTag":({$el:t,tag:n})=>{var i,s;const r=t==null?void 0:t.dataset;if(r)for(const o in r){if(!o.endsWith("fired"))continue;const a=o.slice(0,-5);cP.has(a)&&((s=(i=n._eventHandlers)==null?void 0:i[a])==null||s.call(t,new Event(a.substring(2))))}}}}),zX=new Set(["link","style","script","noscript"]),$X={hooks:{"tag:normalise":({tag:e})=>{e.key&&zX.has(e.tag)&&(e.props["data-hid"]=e._h=Hy(e.key))}}},HX={mode:"server",hooks:{"tags:beforeResolve":e=>{const t={};let n=!1;for(const r of e.tags)r._m!=="server"||r.tag!=="titleTemplate"&&r.tag!=="templateParams"&&r.tag!=="title"||(t[r.tag]=r.tag==="title"||r.tag==="titleTemplate"?r.textContent:r.props,n=!0);n&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},VX={hooks:{"tags:resolve":e=>{var t;for(const n of e.tags)if(typeof n.tagPriority=="string")for(const{prefix:r,offset:i}of EX){if(!n.tagPriority.startsWith(r))continue;const s=n.tagPriority.substring(r.length),o=(t=e.tags.find(a=>a._d===s))==null?void 0:t._p;if(o!==void 0){n._p=o+i;break}}e.tags.sort((n,r)=>{const i=Vy(n),s=Vy(r);return i<s?-1:i>s?1:n._p-r._p})}}},jX={meta:"content",link:"href",htmlAttrs:"lang"},UX=["innerHTML","textContent"],WX=e=>({hooks:{"tags:resolve":t=>{var o;const{tags:n}=t;let r;for(let a=0;a<n.length;a+=1)n[a].tag==="templateParams"&&(r=t.tags.splice(a,1)[0].props,a-=1);const i=r||{},s=i.separator||"|";delete i.separator,i.pageTitle=Cg(i.pageTitle||((o=n.find(a=>a.tag==="title"))==null?void 0:o.textContent)||"",i,s);for(const a of n){if(a.processTemplateParams===!1)continue;const l=jX[a.tag];if(l&&typeof a.props[l]=="string")a.props[l]=Cg(a.props[l],i,s);else if(a.processTemplateParams||a.tag==="titleTemplate"||a.tag==="title")for(const u of UX)typeof a[u]=="string"&&(a[u]=Cg(a[u],i,s,a.tag==="script"&&a.props.type.endsWith("json")))}e._templateParams=i,e._separator=s},"tags:afterResolve":({tags:t})=>{let n;for(let r=0;r<t.length;r+=1){const i=t[r];i.tag==="title"&&i.processTemplateParams!==!1&&(n=i)}n!=null&&n.textContent&&(n.textContent=Cg(n.textContent,e._templateParams,e._separator))}}}),qX={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n,r;for(let i=0;i<t.length;i+=1){const s=t[i];s.tag==="title"?n=s:s.tag==="titleTemplate"&&(r=s)}if(r&&n){const i=hP(r.textContent,n.textContent);i!==null?n.textContent=i||n.textContent:e.tags.splice(e.tags.indexOf(n),1)}else if(r){const i=hP(r.textContent);i!==null&&(r.textContent=i,r.tag="title",r=void 0)}r&&e.tags.splice(e.tags.indexOf(r),1)}}},GX={hooks:{"tags:afterResolve":e=>{for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&(t.props.type==="application/ld+json"||t.props.type==="application/json")?t.innerHTML=t.innerHTML.replace(/</g,"\\u003C"):t.innerHTML=t.innerHTML.replace(new RegExp(`</${t.tag}`,"g"),`<\\/${t.tag}`))}}};let K5;function KX(e={}){const t=YX(e);return t.use(OX()),K5=t}function pP(e,t){return!e||e==="server"&&t||e==="client"&&!t}function YX(e={}){const t=DX();t.addHooks(e.hooks||{}),e.document=e.document||(bX?document:void 0);const n=!e.document,r=()=>{a.dirty=!0,t.callHook("entries:updated",a)};let i=0,s=[];const o=[],a={plugins:o,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return s},use(l){const u=typeof l=="function"?l(a):l;(!u.key||!o.some(c=>c.key===u.key))&&(o.push(u),pP(u.mode,n)&&t.addHooks(u.hooks||{}))},push(l,u){u==null||delete u.head;const c={_i:i++,input:l,...u};return pP(c.mode,n)&&(s.push(c),r()),{dispose(){s=s.filter(d=>d._i!==c._i),r()},patch(d){for(const f of s)f._i===c._i&&(f.input=c.input=d);r()}}},async resolveTags(){const l={tags:[],entries:[...s]};await t.callHook("entries:resolve",l);for(const u of l.entries){const c=u.resolvedInput||u.input;if(u.resolvedInput=await(u.transform?u.transform(c):c),u.resolvedInput)for(const d of await xX(u)){const f={tag:d,entry:u,resolvedOptions:a.resolvedOptions};await t.callHook("tag:normalise",f),l.tags.push(f.tag)}}return await t.callHook("tags:beforeResolve",l),await t.callHook("tags:resolve",l),await t.callHook("tags:afterResolve",l),l.tags},ssr:n};return[LX,HX,BX,$X,VX,WX,qX,GX,...(e==null?void 0:e.plugins)||[]].forEach(l=>a.use(l)),a.hooks.callHook("init",a),a}function XX(){return K5}const JX=jw[0]==="3";function QX(e){return typeof e=="function"?e():y(e)}function jy(e){if(e instanceof Promise||e instanceof Date||e instanceof RegExp)return e;const t=QX(e);if(!e||!t)return t;if(Array.isArray(t))return t.map(n=>jy(n));if(typeof t=="object"){const n={};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(r==="titleTemplate"||r[0]==="o"&&r[1]==="n"){n[r]=y(t[r]);continue}n[r]=jy(t[r])}return n}return t}const ZX={hooks:{"entries:resolve":e=>{for(const t of e.entries)t.resolvedInput=jy(t.input)}}},Y5="usehead";function eJ(e){return{install(n){JX&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(Y5,e))}}.install}function tJ(e={}){e.domDelayFn=e.domDelayFn||(n=>vt(()=>setTimeout(()=>n(),0)));const t=KX(e);return t.use(ZX),t.install=eJ(t),t}const mP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gP="__unhead_injection_handler__";function X5(){return gP in mP?mP[gP]():Lt(Y5)||XX()}function n0(e,t={}){const n=t.head||X5();if(n)return n.ssr?n.push(e,t):nJ(n,e,t)}function nJ(e,t,n={}){const r=U(!1),i=U({});Mt(()=>{i.value=r.value?{}:jy(t)});const s=e.push(i.value,n);return He(i,a=>{s.patch(a)}),Jn()&&(yr(()=>{s.dispose()}),Fk(()=>{r.value=!0}),Lk(()=>{r.value=!1})),s}function rJ(e,t){const n=tJ({}),r={unhead:n,install(i){jw.startsWith("3")&&(i.config.globalProperties.$head=n,i.provide("usehead",n))},use(i){n.use(i)},resolveTags(){return n.resolveTags()},headEntries(){return n.headEntries()},headTags(){return n.resolveTags()},push(i,s){return n.push(i,s)},addEntry(i,s){return n.push(i,s)},addHeadObjs(i,s){return n.push(i,s)},addReactiveEntry(i,s){const o=n0(i,s);return typeof o<"u"?o.dispose:()=>{}},removeHeadObjs(){},updateDOM(i,s){s?W5(n,{document:i}):q5(n,{delayFn:o=>setTimeout(()=>o(),50),document:i})},internalHooks:n.hooks,hooks:{"before:dom":[],"resolved:tags":[],"resolved:entries":[]}};return n.addHeadObjs=r.addHeadObjs,n.updateDOM=r.updateDOM,n.hooks.hook("dom:beforeRender",i=>{for(const s of r.hooks["before:dom"])s()===!1&&(i.shouldRender=!1)}),r.addHeadObjs(e),r}const yh=jw.startsWith("2."),iJ=typeof window<"u",vP=(e,t)=>{const n=yh?e.tag:e.type,r=n==="html"?"htmlAttrs":n==="body"?"bodyAttrs":n;if(typeof r!="string"||!(r in t))return;const i=yh?e.data:e,s=(yh?i.attrs:e.props)||{};if(yh&&(i.staticClass&&(s.class=i.staticClass),i.staticStyle&&(s.style=Object.entries(i.staticStyle).map(([o,a])=>`${o}:${a}`).join(";"))),e.children){const o=yh?"text":"children";s.children=Array.isArray(e.children)?e.children[0][o]:e[o]}Array.isArray(t[r])?t[r].push(s):r==="title"?t.title=s.children:t[r]=s},sJ=e=>{const t={title:void 0,htmlAttrs:void 0,bodyAttrs:void 0,base:void 0,meta:[],link:[],style:[],script:[],noscript:[]};for(const n of e)if(typeof n.type=="symbol"&&Array.isArray(n.children))for(const r of n.children)vP(r,t);else vP(n,t);return t},oJ=ee({name:"Head",setup(e,{slots:t}){const n=X5(),r=U({}),i=n.push(r);return iJ&&yr(()=>{i.dispose()}),()=>(Mt(()=>{t.default&&i.patch(sJ(t.default()))}),null)}}),wt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ut=globalThis,Zl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yu="9.1.0";function Pc(){return r0(Ut),Ut}function r0(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Yu,t[Yu]=t[Yu]||{}}function i0(e,t,n=Ut){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Yu]=r[Yu]||{};return i[e]||(i[e]=t())}const aJ="Sentry Logger ",K1=["debug","info","warn","error","log","assert","trace"],Uy={};function Ia(e){if(!("console"in Ut))return e();const t=Ut.console,n={},r=Object.keys(Uy);r.forEach(i=>{const s=Uy[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function lJ(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Zl?K1.forEach(n=>{t[n]=(...r)=>{e&&Ia(()=>{Ut.console[n](`${aJ}[${n}]:`,...r)})}}):K1.forEach(n=>{t[n]=()=>{}}),t}const qe=i0("logger",lJ),J5=50,hc="?",yP=/\(error: (.*)\)/,bP=/captureMessage|captureException/;function Q5(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],o=n.split(` `);for(let a=r;a<o.length;a++){const l=o[a];if(l.length>1024)continue;const u=yP.test(l)?l.replace(yP,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){s.push(d);break}}if(s.length>=J5+i)break}}return cJ(s.slice(i))}}function uJ(e){return Array.isArray(e)?Q5(...e):e}function cJ(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Og(t).function||"")&&t.pop(),t.reverse(),bP.test(Og(t).function||"")&&(t.pop(),bP.test(Og(t).function||"")&&t.pop()),t.slice(0,J5).map(n=>({...n,filename:n.filename||Og(t).filename,function:n.function||hc}))}function Og(e){return e[e.length-1]||{}}const Z_="<anonymous>";function ga(e){try{return!e||typeof e!="function"?Z_:e.name||Z_}catch{return Z_}}function wP(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const qv={},_P={};function eu(e,t){qv[e]=qv[e]||[],qv[e].push(t)}function tu(e,t){if(!_P[e]){_P[e]=!0;try{t()}catch(n){Zl&&qe.error(`Error while instrumenting ${e}`,n)}}}function Zi(e,t){const n=e&&qv[e];if(n)for(const r of n)try{r(t)}catch(i){Zl&&qe.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ga(r)} Error:`,i)}}let eS=null;function Z5(e){const t="error";eu(t,e),tu(t,dJ)}function dJ(){eS=Ut.onerror,Ut.onerror=function(e,t,n,r,i){return Zi("error",{column:r,error:i,line:n,msg:e,url:t}),eS?eS.apply(this,arguments):!1},Ut.onerror.__SENTRY_INSTRUMENTED__=!0}let tS=null;function e3(e){const t="unhandledrejection";eu(t,e),tu(t,fJ)}function fJ(){tS=Ut.onunhandledrejection,Ut.onunhandledrejection=function(e){return Zi("unhandledrejection",e),tS?tS.apply(this,arguments):!0},Ut.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const t3=Object.prototype.toString;function gC(e){switch(t3.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return va(e,Error)}}function jf(e,t){return t3.call(e)===`[object ${t}]`}function n3(e){return jf(e,"ErrorEvent")}function SP(e){return jf(e,"DOMError")}function hJ(e){return jf(e,"DOMException")}function ca(e){return jf(e,"String")}function vC(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function yC(e){return e===null||vC(e)||typeof e!="object"&&typeof e!="function"}function rf(e){return jf(e,"Object")}function s0(e){return typeof Event<"u"&&va(e,Event)}function pJ(e){return typeof Element<"u"&&va(e,Element)}function mJ(e){return jf(e,"RegExp")}function o0(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function gJ(e){return rf(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function va(e,t){try{return e instanceof t}catch{return!1}}function r3(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const bC=Ut,vJ=80;function ya(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let s=0,o=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||vJ;for(;n&&s++<r&&(u=yJ(n,c),!(u==="html"||s>1&&o+i.length*l+u.length>=d));)i.push(u),o+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function yJ(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(bC.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i!=null&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&ca(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Uf(){try{return bC.document.location.href}catch{return""}}function i3(e){if(!bC.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function $d(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xP(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{r3(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function bJ(e,t,n=!1){return ca(e)?mJ(t)?t.test(e):ca(t)?n?e===t:e.includes(t):!1:!1}function wl(e,t=[],n=!1){return t.some(r=>bJ(e,r,n))}function vi(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&s3(i,r);try{e[t]=i}catch{Zl&&qe.log(`Failed to replace method "${t}" in object`,e)}}function Ni(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Zl&&qe.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function s3(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ni(e,"__sentry_original__",t)}catch{}}function wC(e){return e.__sentry_original__}function o3(e){if(gC(e))return{message:e.message,name:e.name,stack:e.stack,...TP(e)};if(s0(e)){const t={type:e.type,target:EP(e.target),currentTarget:EP(e.currentTarget),...TP(e)};return typeof CustomEvent<"u"&&va(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function EP(e){try{return pJ(e)?ya(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function TP(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function wJ(e,t=40){const n=Object.keys(o3(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return $d(r,t);for(let i=n.length;i>0;i--){const s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:$d(s,t)}return""}function Gn(e){return Y1(e,new Map)}function Y1(e,t){if(_J(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))typeof e[i]<"u"&&(r[i]=Y1(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(i=>{r.push(Y1(i,t))}),r}return e}function _J(e){if(!rf(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const a3=1e3;function $m(){return Date.now()/a3}function SJ(){const{performance:e}=Ut;if(!(e!=null&&e.now))return $m;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/a3}const Hr=SJ();let nS;function xJ(){var c;const{performance:e}=Ut;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,o=(c=e.timing)==null?void 0:c.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return s||u?i<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function Bi(){return nS||(nS=xJ()),nS[0]}function Pi(){const e=Ut,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t!=null&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t!=null&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function l3(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function Za(e){const{message:t,event_id:n}=e;if(t)return t;const r=l3(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function X1(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function sf(e,t){const n=l3(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i==null?void 0:i.data,...t.data};n.mechanism.data=s}}function kP(e){if(EJ(e))return!0;try{Ni(e,"__sentry_captured__",!0)}catch{}return!1}function EJ(e){try{return e.__sentry_captured__}catch{}}var Go;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Go||(Go={}));function ba(e){return new Ml(t=>{t(e)})}function Wy(e){return new Ml((t,n)=>{n(e)})}class Ml{constructor(t){this._state=Go.PENDING,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ml((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ml((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Go.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Go.RESOLVED&&n[1](this._value),this._state===Go.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,o)=>{if(this._state===Go.PENDING){if(o0(o)){o.then(r,i);return}this._state=s,this._value=o,this._executeHandlers()}},r=s=>{n(Go.RESOLVED,s)},i=s=>{n(Go.REJECTED,s)};try{t(r,i)}catch(s){i(s)}}}function TJ(e){const t=Hr(),n={sid:Pi(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CJ(n)};return of(n,e),n}function of(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Hr(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Pi()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function kJ(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),of(e,n)}function CJ(e){return Gn({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Dl(){return Pi()}function Hm(){return Pi().substring(16)}function Vm(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Vm(r[i],t[i],n-1));return r}const J1="_sentrySpan";function em(e,t){t?Ni(e,J1,t):delete e[J1]}function qy(e){return e[J1]}const OJ=100;class wo{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Dl(),sampleRand:Math.random()}}clone(){const t=new wo;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,em(t,qy(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&of(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof wo?n.getScopeData():rf(n)?t:void 0,{tags:i,extra:s,user:o,contexts:a,level:l,fingerprint:u=[],propagationContext:c}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,em(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Dl(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var s;const r=typeof n=="number"?n:OJ;if(r<=0)return this;const i={timestamp:$m(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(s=this._client)==null||s.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:qy(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Vm(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Pi();if(!this._client)return qe.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=(r==null?void 0:r.event_id)||Pi();if(!this._client)return qe.warn("No client configured on scope - will not capture message!"),i;const s=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||Pi();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(qe.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function RJ(){return i0("defaultCurrentScope",()=>new wo)}function IJ(){return i0("defaultIsolationScope",()=>new wo)}class AJ{constructor(t,n){let r;t?r=t:r=new wo;let i;n?i=n:i=new wo,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return o0(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function af(){const e=Pc(),t=r0(e);return t.stack=t.stack||new AJ(RJ(),IJ())}function PJ(e){return af().withScope(e)}function MJ(e,t){const n=af();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function CP(e){return af().withScope(()=>e(af().getIsolationScope()))}function DJ(){return{withIsolationScope:CP,withScope:PJ,withSetScope:MJ,withSetIsolationScope:(e,t)=>CP(t),getCurrentScope:()=>af().getScope(),getIsolationScope:()=>af().getIsolationScope()}}function Wf(e){const t=r0(e);return t.acs?t.acs:DJ()}function Tn(){const e=Pc();return Wf(e).getCurrentScope()}function Io(){const e=Pc();return Wf(e).getIsolationScope()}function NJ(){return i0("globalScope",()=>new wo)}function _C(...e){const t=Pc(),n=Wf(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Bt(){return Tn().getClient()}function LJ(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t;return Gn({trace_id:n,span_id:i||Hm(),parent_span_id:r})}const Ii="sentry.source",u3="sentry.sample_rate",pc="sentry.op",An="sentry.origin",Q1="sentry.idle_span_finish_reason",a0="sentry.measurement_unit",l0="sentry.measurement_value",OP="sentry.custom_span_name",SC="sentry.profile_id",jm="sentry.exclusive_time",FJ=0,c3=1,ar=2;function BJ(e){if(e<400&&e>=100)return{code:c3};if(e>=400&&e<500)switch(e){case 401:return{code:ar,message:"unauthenticated"};case 403:return{code:ar,message:"permission_denied"};case 404:return{code:ar,message:"not_found"};case 409:return{code:ar,message:"already_exists"};case 413:return{code:ar,message:"failed_precondition"};case 429:return{code:ar,message:"resource_exhausted"};case 499:return{code:ar,message:"cancelled"};default:return{code:ar,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ar,message:"unimplemented"};case 503:return{code:ar,message:"unavailable"};case 504:return{code:ar,message:"deadline_exceeded"};default:return{code:ar,message:"internal_error"}}return{code:ar,message:"unknown_error"}}function d3(e,t){e.setAttribute("http.response.status_code",t);const n=BJ(t);n.message!=="unknown_error"&&e.setStatus(n)}const f3="_sentryScope",h3="_sentryIsolationScope";function zJ(e,t,n){e&&(Ni(e,h3,n),Ni(e,f3,t))}function Gy(e){return{scope:e[f3],isolationScope:e[h3]}}function mc(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const xC="sentry-",$J=/^sentry-/,HJ=8192;function p3(e){const t=jJ(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.match($J)){const o=i.slice(xC.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function VJ(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${xC}${r}`]=i),n),{});return UJ(t)}function jJ(e){if(!(!e||!ca(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=RP(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):RP(e)}function RP(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function UJ(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=i===0?s:`${t},${s}`;return o.length>HJ?(Zl&&qe.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const m3=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function WJ(e){if(!e)return;const t=e.match(m3);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function qJ(e,t){const n=WJ(e),r=p3(t);if(!(n!=null&&n.traceId))return{traceId:Dl(),sampleRand:Math.random()};const i=GJ(n,r);r&&(r.sample_rand=i.toString());const{traceId:s,parentSpanId:o,parentSampled:a}=n;return{traceId:s,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:i}}function g3(e=Dl(),t=Hm(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function GJ(e,t){const n=mc(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=mc(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const v3=0,y3=1;let IP=!1;function KJ(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:o,origin:a}=Yt(e);return Gn({parent_span_id:s,span_id:t,trace_id:n,data:r,op:i,status:o,origin:a})}function YJ(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Yt(e).parent_span_id,s=Gy(e).scope,o=r?(s==null?void 0:s.getPropagationContext().propagationSpanId)||Hm():t;return Gn({parent_span_id:i,span_id:o,trace_id:n})}function XJ(e){const{traceId:t,spanId:n}=e.spanContext(),r=Mc(e);return g3(t,n,r)}function Xu(e){return typeof e=="number"?AP(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?AP(e.getTime()):Hr()}function AP(e){return e>9999999999?e/1e3:e}function Yt(e){if(QJ(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(JJ(e)){const{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return Gn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:Xu(i),timestamp:Xu(o)||void 0,status:b3(l),op:r[pc],origin:r[An]})}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function JJ(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function QJ(e){return typeof e.getSpanJSON=="function"}function Mc(e){const{traceFlags:t}=e.spanContext();return t===y3}function b3(e){if(!(!e||e.code===FJ))return e.code===c3?"ok":e.message||"unknown_error"}const Ju="_sentryChildSpans",Z1="_sentryRootSpan";function w3(e,t){const n=e[Z1]||e;Ni(t,Z1,n),e[Ju]?e[Ju].add(t):Ni(e,Ju,new Set([t]))}function ZJ(e,t){e[Ju]&&e[Ju].delete(t)}function Gv(e){const t=new Set;function n(r){if(!t.has(r)&&Mc(r)){t.add(r);const i=r[Ju]?Array.from(r[Ju]):[];for(const s of i)n(s)}}return n(e),Array.from(t)}function Vr(e){return e[Z1]||e}function Ar(){const e=Pc(),t=Wf(e);return t.getActiveSpan?t.getActiveSpan():qy(Tn())}function eE(){IP||(Ia(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),IP=!0)}let PP=!1;function eQ(){PP||(PP=!0,Z5(tE),e3(tE))}function tE(){const e=Ar(),t=e&&Vr(e);if(t){const n="internal_error";wt&&qe.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:ar,message:n})}}tE.tag="sentry_tracingErrorCallback";function wa(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=Bt())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const EC="production",_3="_frozenDsc";function Kv(e,t){Ni(e,_3,t)}function S3(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=Gn({environment:n.environment||EC,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function x3(e,t){const n=t.getPropagationContext();return n.dsc||S3(n.traceId,e)}function _a(e){var p;const t=Bt();if(!t)return{};const n=Vr(e),r=Yt(n),i=r.data,s=n.spanContext().traceState,o=(s==null?void 0:s.get("sentry.sample_rate"))??i[u3];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[_3];if(l)return a(l);const u=s==null?void 0:s.get("sentry.dsc"),c=u&&p3(u);if(c)return a(c);const d=S3(e.spanContext().traceId,t),f=i[Ii],h=r.description;return f!=="url"&&h&&(d.transaction=h),wa()&&(d.sampled=String(Mc(n)),d.sample_rand=(s==null?void 0:s.get("sentry.sample_rand"))??((p=Gy(n).scope)==null?void 0:p.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class gc{constructor(t={}){this._traceId=t.traceId||Dl(),this._spanId=t.spanId||Hm()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:v3}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function tQ(e){if(!wt)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Yt(e),{spanId:i}=e.spanContext(),s=Mc(e),o=Vr(e),a=o===e,l=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=Yt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}qe.log(`${l} ${u.join(` `)}`)}function nQ(e){if(!wt)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Yt(e),{spanId:r}=e.spanContext(),s=Vr(e)===e,o=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;qe.log(o)}function rQ(e,t,n){if(!wa(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const s=mc(i);if(s===void 0)return wt&&qe.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!s)return wt&&qe.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,r];const o=n<s;return o||wt&&qe.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,s,r]}const iQ=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function sQ(e){return e==="http"||e==="https"}function u0(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function oQ(e){const t=iQ.exec(e);if(!t){Ia(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",s="",o="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return E3({host:s,pass:i,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function E3(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function aQ(e){if(!Zl)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(qe.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?sQ(r)?t&&isNaN(parseInt(t,10))?(qe.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(qe.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(qe.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function lQ(e){const t=typeof e=="string"?oQ(e):E3(e);if(!(!t||!aQ(t)))return t}function vs(e,t=100,n=1/0){try{return nE("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function T3(e,t=3,n=100*1024){const r=vs(e,t);return fQ(r)>n?T3(e,t-1,n):r}function nE(e,t,n=1/0,r=1/0,i=hQ()){const[s,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=uQ(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return nE("",h,l-1,r,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=o3(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(d>=r){c[h]="[MaxProperties ~]";break}const p=f[h];c[h]=nE(h,p,l-1,r,i),d++}return o(t),c}function uQ(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(r3(t))return"[VueViewModel]";if(gJ(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${ga(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=cQ(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function cQ(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function dQ(e){return~-encodeURI(e).split(/%..|./).length}function fQ(e){return dQ(JSON.stringify(e))}function hQ(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function qf(e,t=[]){return[e,t]}function pQ(e,t){const[n,r]=e;return[n,[...r,t]]}function MP(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function rE(e){const t=r0(Ut);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function mQ(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[rE(r),s]:r.push(typeof s=="string"?rE(s):s)}for(const s of n){const[o,a]=s;if(i(` ${JSON.stringify(o)} `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(vs(a))}i(l)}}return typeof r=="string"?r:gQ(r)}function gQ(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function vQ(e){return[{type:"span"},e]}function yQ(e){const t=typeof e.data=="string"?rE(e.data):e.data;return[Gn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const bQ={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security"};function DP(e){return bQ[e]}function TC(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function k3(e,t,n,r){var s;const i=(s=e.sdkProcessingMetadata)==null?void 0:s.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:u0(r)},...i&&{trace:Gn({...i})}}}function wQ(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function _Q(e,t,n,r){const i=TC(n),s={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:u0(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return qf(s,[o])}function SQ(e,t,n,r){const i=TC(n),s=e.type&&e.type!=="replay_event"?e.type:"event";wQ(e,n==null?void 0:n.sdk);const o=k3(e,i,r,t);return delete e.sdkProcessingMetadata,qf(o,[[{type:s},e]])}function xQ(e,t){function n(c){return!!c.trace_id&&!!c.public_key}const r=_a(e[0]),i=t==null?void 0:t.getDsn(),s=t==null?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:u0(i)}},a=t==null?void 0:t.getOptions().beforeSendSpan,l=a?c=>{const d=Yt(c),f=a(d);return f||(eE(),d)}:Yt,u=[];for(const c of e){const d=l(c);d&&u.push(vQ(d))}return qf(o,u)}function EQ(e,t,n,r=Ar()){const i=r&&Vr(r);i&&(wt&&qe.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[l0]:t,[a0]:n}))}function NP(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[a0],s=r[l0];typeof i=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:i})}),t}const LP=1e3;class kC{constructor(t={}){this._traceId=t.traceId||Dl(),this._spanId=t.spanId||Hm(),this._startTime=t.startTimestamp||Hr(),this._attributes={},this.setAttributes({[An]:"manual",[pc]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?y3:v3}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Xu(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Ii,"custom"),this}end(t){this._endTime||(this._endTime=Xu(t),nQ(this),this._onSpanEnded())}getSpanJSON(){return Gn({data:this._attributes,description:this._name,op:this._attributes[pc],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:b3(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[An],profile_id:this._attributes[SC],exclusive_time:this._attributes[jm],measurements:NP(this._events),is_segment:this._isStandaloneSpan&&Vr(this)===this||void 0,segment_id:this._isStandaloneSpan?Vr(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){wt&&qe.log("[Tracing] Adding an event to span:",t);const i=FP(n)?n:r||Hr(),s=FP(n)?{}:n||{},o={name:t,time:Xu(i),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Bt();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Vr(this)))return;if(this._isStandaloneSpan){this._sampled?kQ(xQ([this],t)):(wt&&qe.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Gy(this).scope||Tn()).captureEvent(r)}_convertSpanToTransaction(){if(!BP(Yt(this)))return;this._name||(wt&&qe.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Gy(this);if(this._sampled!==!0)return;const i=Gv(this).filter(u=>u!==this&&!TQ(u)).map(u=>Yt(u)).filter(BP),s=this._attributes[Ii];delete this._attributes[OP],i.forEach(u=>{delete u.data[OP]});const o={contexts:{trace:KJ(this)},spans:i.length>LP?i.sort((u,c)=>u.start_timestamp-c.start_timestamp).slice(0,LP):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...Gn({dynamicSamplingContext:_a(this)})},...s&&{transaction_info:{source:s}}},a=NP(this._events);return a&&Object.keys(a).length&&(wt&&qe.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function FP(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function BP(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function TQ(e){return e instanceof kC&&e.isStandaloneSpan()}function kQ(e){const t=Bt();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const C3="__SENTRY_SUPPRESS_TRACING__";function vc(e){const t=R3();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=OQ(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?o=>_C(e.scope,o):i!==void 0?o=>O3(i,o):o=>o())(()=>{const o=Tn(),a=IQ(o);return e.onlyIfParent&&!a?new gc:CQ({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function O3(e,t){const n=R3();return n.withActiveSpan?n.withActiveSpan(e,t):_C(r=>(em(r,e||void 0),t(r)))}function CQ({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!wa()){const o=new gc;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,..._a(o)};Kv(o,a)}return o}const i=Io();let s;if(e&&!n)s=RQ(e,r,t),w3(e,s);else if(e){const o=_a(e),{traceId:a,spanId:l}=e.spanContext(),u=Mc(e);s=zP({traceId:a,parentSpanId:l,...t},r,u),Kv(s,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...i.getPropagationContext(),...r.getPropagationContext()};s=zP({traceId:o,parentSpanId:l,...t},r,u),a&&Kv(s,a)}return tQ(s),zJ(s,r,i),s}function OQ(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Xu(e.startTime),delete r.startTime,r}return n}function R3(){const e=Pc();return Wf(e)}function zP(e,t,n){var f;const r=Bt(),i=(r==null?void 0:r.getOptions())||{},{name:s="",attributes:o}=e,a=t.getPropagationContext(),[l,u,c]=t.getScopeData().sdkProcessingMetadata[C3]?[!1]:rQ(i,{name:s,parentSampled:n,attributes:o,parentSampleRate:mc((f=a.dsc)==null?void 0:f.sample_rate)},a.sampleRand),d=new kC({...e,attributes:{[Ii]:"custom",[u3]:u!==void 0&&c?u:void 0,...e.attributes},sampled:l});return!l&&r&&(wt&&qe.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",d),d}function RQ(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[C3]?!1:Mc(e),o=s?new kC({...n,parentSpanId:r,traceId:i,sampled:s}):new gc({traceId:i});w3(e,o);const a=Bt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function IQ(e){const t=qy(e);if(!t)return;const n=Bt();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Vr(t):t}const Yv={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},AQ="heartbeatFailed",PQ="idleTimeout",MQ="finalTimeout",DQ="externalFinish";function I3(e,t={}){const n=new Map;let r=!1,i,s=DQ,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=Yv.idleTimeout,finalTimeout:u=Yv.finalTimeout,childSpanTimeout:c=Yv.childSpanTimeout,beforeSpanEnd:d}=t,f=Bt();if(!f||!wa()){const S=new gc,I={sample_rate:"0",sampled:"false",..._a(S)};return Kv(S,I),S}const h=Tn(),p=Ar(),m=NQ(e);m.end=new Proxy(m.end,{apply(S,I,P){if(d&&d(m),I instanceof gc)return;const[R,...O]=P,M=R||Hr(),E=Xu(M),L=Gv(m).filter(Z=>Z!==m);if(!L.length)return x(E),Reflect.apply(S,I,[E,...O]);const j=L.map(Z=>Yt(Z).timestamp).filter(Z=>!!Z),F=j.length?Math.max(...j):void 0,B=Yt(m).start_timestamp,Y=Math.min(B?B+u/1e3:1/0,Math.max(B||-1/0,Math.min(E,F||1/0)));return x(Y),Reflect.apply(S,I,[Y,...O])}});function g(){i&&(clearTimeout(i),i=void 0)}function v(S){g(),i=setTimeout(()=>{!r&&n.size===0&&o&&(s=PQ,m.end(S))},l)}function w(S){i=setTimeout(()=>{!r&&o&&(s=AQ,m.end(S))},c)}function b(S){g(),n.set(S,!0);const I=Hr();w(I+c/1e3)}function _(S){if(n.has(S)&&n.delete(S),n.size===0){const I=Hr();v(I+l/1e3)}}function x(S){r=!0,n.clear(),a.forEach(E=>E()),em(h,p);const I=Yt(m),{start_timestamp:P}=I;if(!P)return;I.data[Q1]||m.setAttribute(Q1,s),qe.log(`[Tracing] Idle span "${I.op}" finished`);const O=Gv(m).filter(E=>E!==m);let M=0;O.forEach(E=>{E.isRecording()&&(E.setStatus({code:ar,message:"cancelled"}),E.end(S),wt&&qe.log("[Tracing] Cancelling span since span ended early",JSON.stringify(E,void 0,2)));const L=Yt(E),{timestamp:j=0,start_timestamp:F=0}=L,B=F<=S,Y=(u+l)/1e3,Z=j-F<=Y;if(wt){const ne=JSON.stringify(E,void 0,2);B?Z||qe.log("[Tracing] Discarding span since it finished after idle span final timeout",ne):qe.log("[Tracing] Discarding span since it happened after idle span was finished",ne)}(!Z||!B)&&(ZJ(m,E),M++)}),M>0&&m.setAttribute("sentry.idle_span_discarded_spans",M)}return a.push(f.on("spanStart",S=>{if(r||S===m||Yt(S).timestamp)return;Gv(m).includes(S)&&b(S.spanContext().spanId)})),a.push(f.on("spanEnd",S=>{r||_(S.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",S=>{S===m&&(o=!0,v(),n.size&&w())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(m.setStatus({code:ar,message:"deadline_exceeded"}),s=MQ,m.end())},u),m}function NQ(e){const t=vc(e);return em(Tn(),t),wt&&qe.log("[Tracing] Started span is an idle span"),t}function iE(e,t,n,r=0){return new Ml((i,s)=>{const o=e[r];if(t===null||typeof o!="function")i(t);else{const a=o({...t},n);wt&&o.id&&a===null&&qe.log(`Event processor "${o.id}" dropped event`),o0(a)?a.then(l=>iE(e,l,n,r+1).then(i)).then(null,s):iE(e,a,n,r+1).then(i).then(null,s)}})}let Rg,$P,Ig;function LQ(e){const t=Ut._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Ig&&n.length===$P||($P=n.length,Ig=n.reduce((r,i)=>{Rg||(Rg={});const s=Rg[i];if(s)r[s[0]]=s[1];else{const o=e(i);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l==null?void 0:l.filename,c=t[i];if(u&&c){r[u]=c,Rg[i]=[u,c];break}}}return r},{})),Ig}function FQ(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;BQ(e,t),r&&HQ(e,r),VQ(e,n),zQ(e,i),$Q(e,s)}function HP(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:h,span:p}=t;Ag(e,"extra",n),Ag(e,"tags",r),Ag(e,"user",i),Ag(e,"contexts",s),e.sdkProcessingMetadata=Vm(e.sdkProcessingMetadata,a,2),o&&(e.level=o),h&&(e.transactionName=h),p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Ag(e,t,n){e[t]=Vm(e[t],n,1)}function BQ(e,t){const{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,l=Gn(n);Object.keys(l).length&&(e.extra={...l,...e.extra});const u=Gn(r);Object.keys(u).length&&(e.tags={...u,...e.tags});const c=Gn(i);Object.keys(c).length&&(e.user={...c,...e.user});const d=Gn(s);Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function zQ(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function $Q(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function HQ(e,t){e.contexts={trace:YJ(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:_a(t),...e.sdkProcessingMetadata};const n=Vr(t),r=Yt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function VQ(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function A3(e,t,n,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Pi(),timestamp:t.timestamp||$m()},u=n.integrations||e.integrations.map(g=>g.name);jQ(l,e),qQ(l,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&UQ(l,e.stackParser);const c=KQ(r,n.captureContext);n.mechanism&&sf(l,n.mechanism);const d=i?i.getEventProcessors():[],f=NJ().getScopeData();if(s){const g=s.getScopeData();HP(f,g)}if(c){const g=c.getScopeData();HP(f,g)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),FQ(l,f);const p=[...d,...f.eventProcessors];return iE(p,l,n).then(g=>(g&&WQ(g),typeof o=="number"&&o>0?GQ(g,o,a):g))}function jQ(e,t){var l,u;const{environment:n,release:r,dist:i,maxValueLength:s=250}=t;e.environment=e.environment||n||EC,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&(e.message=$d(e.message,s));const o=(u=(l=e.exception)==null?void 0:l.values)==null?void 0:u[0];o!=null&&o.value&&(o.value=$d(o.value,s));const a=e.request;a!=null&&a.url&&(a.url=$d(a.url,s))}function UQ(e,t){var r,i;const n=LQ(t);(i=(r=e.exception)==null?void 0:r.values)==null||i.forEach(s=>{var o,a;(a=(o=s.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function WQ(e){var r,i;const t={};if((i=(r=e.exception)==null?void 0:r.values)==null||i.forEach(s=>{var o,a;(a=(o=s.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([s,o])=>{n.push({type:"sourcemap",code_file:s,debug_id:o})})}function qQ(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function GQ(e,t,n){var i,s;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:vs(o.data,t,n)}}))},...e.user&&{user:vs(e.user,t,n)},...e.contexts&&{contexts:vs(e.contexts,t,n)},...e.extra&&{extra:vs(e.extra,t,n)}};return(i=e.contexts)!=null&&i.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=vs(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:vs(o.data,t,n)}}))),(s=e.contexts)!=null&&s.flags&&r.contexts&&(r.contexts.flags=vs(e.contexts.flags,3,n)),r}function KQ(e,t){if(!t)return e;const n=e?e.clone():new wo;return n.update(t),n}function YQ(e){if(e)return XQ(e)?{captureContext:e}:QQ(e)?{captureContext:e}:e}function XQ(e){return e instanceof wo||typeof e=="function"}const JQ=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function QQ(e){return Object.keys(e).some(t=>JQ.includes(t))}function c0(e,t){return Tn().captureException(e,YQ(t))}function P3(e,t){return Tn().captureEvent(e,t)}function ZQ(e,t){Io().setContext(e,t)}function eZ(){const e=Bt();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function tZ(e){Io().addEventProcessor(e)}function VP(e){const t=Io(),n=Tn(),{userAgent:r}=Ut.navigator||{},i=TJ({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return(s==null?void 0:s.status)==="ok"&&of(s,{status:"exited"}),M3(),t.setSession(i),i}function M3(){const e=Io(),n=Tn().getSession()||e.getSession();n&&kJ(n),D3(),e.setSession()}function D3(){const e=Io(),t=Bt(),n=e.getSession();n&&t&&t.captureSession(n)}function jP(e=!1){if(e){M3();return}D3()}const nZ="7";function rZ(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function iZ(e){return`${rZ(e)}${e.projectId}/envelope/`}function sZ(e,t){const n={sentry_version:nZ};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function oZ(e,t,n){return t||`${iZ(e)}?${sZ(e,n)}`}const UP=[];function aZ(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function lZ(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return aZ(r)}function uZ(e,t){const n={};return t.forEach(r=>{r&&N3(e,r,n)}),n}function WP(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function N3(e,t,n){if(n[t.name]){wt&&qe.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,UP.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),UP.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}wt&&qe.log(`Integration installed: ${t.name}`)}function cZ(e,t,n){const r=[{type:"client_report"},{timestamp:$m(),discarded_events:e}];return qf(t?{dsn:t}:{},[r])}class ws extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}function L3(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function dZ(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:s,data:o,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return Gn({data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:o==null?void 0:o[SC],exclusive_time:o==null?void 0:o[jm],measurements:e.measurements,is_segment:!0})}function fZ(e){const t={type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[SC]:e.profile_id},...e.exclusive_time&&{[jm]:e.exclusive_time}}}},measurements:e.measurements};return Gn(t)}const qP="Not capturing exception because it's already been captured.",GP="Discarded session because of missing or non-string release";class hZ{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=lQ(t.dsn):wt&&qe.warn("No DSN provided, client will not send events."),this._dsn){const n=oZ(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const i=Pi();if(kP(t))return wt&&qe.log(qP),i;const s={event_id:i,...n};return this._process(this.eventFromException(t,s).then(o=>this._captureEvent(o,s,r))),s.event_id}captureMessage(t,n,r,i){const s={event_id:Pi(),...r},o=vC(t)?t:String(t),a=yC(t)?this.eventFromMessage(o,n,s):this.eventFromException(t,s);return this._process(a.then(l=>this._captureEvent(l,s,i))),s.event_id}captureEvent(t,n,r){const i=Pi();if(n!=null&&n.originalException&&kP(n.originalException))return wt&&qe.log(qP),i;const s={event_id:i,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,a||r,l)),s.event_id}captureSession(t){this.sendSession(t),of(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):ba(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];N3(this,t,this._integrations),n||WP(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=SQ(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=pQ(r,yQ(s));const i=this.sendEnvelope(r);i&&i.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const{release:n,environment:r=EC}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){wt&&qe.warn(GP);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){wt&&qe.warn(GP);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=_Q(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;wt&&qe.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(wt&&qe.error("Error while sending envelope:",n),n)):(wt&&qe.error("Transport disabled"),ba({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=uZ(this,t),WP(this,t)}_updateSessionFromEvent(t,n){var l;let r=n.level==="fatal",i=!1;const s=(l=n.exception)==null?void 0:l.values;if(s){i=!0;for(const u of s){const c=u.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(of(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ml(n=>{let r=0;const i=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),n(!0)):(r+=i,t&&r>=t&&(clearInterval(s),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const s=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),A3(s,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:LJ(r),...a.contexts};const l=x3(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Tn(),i=Io()){return wt&&sE(t)&&qe.log(`Captured error event \`${L3(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(s=>s.event_id,s=>{wt&&(s instanceof ws&&s.logLevel==="log"?qe.log(s.message):qe.warn(s))})}_processEvent(t,n,r,i){const s=this.getOptions(),{sampleRate:o}=s,a=F3(t),l=sE(t),u=t.type||"error",c=`before send for type \`${u}\``,d=typeof o>"u"?void 0:mc(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Wy(new ws(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,i).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),new ws("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const m=mZ(this,s,h,n);return pZ(m,c)}).then(h=>{var g;if(h===null){if(this.recordDroppedEvent("before_send",f),a){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new ws(`${c} returned \`null\`, will not send event.`,"log")}const p=r.getSession()||i.getSession();if(l&&p&&this._updateSessionFromEvent(p,h),a){const v=((g=h.sdkProcessingMetadata)==null?void 0:g.spanCountBeforeProcessing)||0,w=h.spans?h.spans.length:0,b=v-w;b>0&&this.recordDroppedEvent("before_send","span",b)}const m=h.transaction_info;if(a&&m&&h.transaction!==t.transaction){const v="custom";h.transaction_info={...m,source:v}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof ws?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new ws(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${h}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,s]=n.split(":");return{reason:i,category:s,quantity:r}})}_flushOutcomes(){wt&&qe.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){wt&&qe.log("No outcomes to send");return}if(!this._dsn){wt&&qe.log("No dsn provided, will not send outcomes");return}wt&&qe.log("Sending outcomes:",t);const n=cZ(t,this._options.tunnel&&u0(this._dsn));this.sendEnvelope(n)}}function pZ(e,t){const n=`${t} must return \`null\` or a valid event.`;if(o0(e))return e.then(r=>{if(!rf(r)&&r!==null)throw new ws(n);return r},r=>{throw new ws(`${t} rejected with ${r}`)});if(!rf(e)&&e!==null)throw new ws(n);return e}function mZ(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;let a=n;if(sE(a)&&i)return i(a,r);if(F3(a)){if(o){const l=o(dZ(a));if(l?a=Vm(n,fZ(l)):eE(),a.spans){const u=[];for(const c of a.spans){const d=o(c);d?u.push(d):(eE(),u.push(c))}a.spans=u}}if(s){if(a.spans){const l=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return s(a,r)}}return a}function sE(e){return e.type===void 0}function F3(e){return e.type==="transaction"}function gZ(e,t){t.debug===!0&&(wt?qe.enable():Ia(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Tn().update(t.initialScope);const r=new e(t);return vZ(r),r.init(),r}function vZ(e){Tn().setClient(e)}function yZ(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return Wy(new ws("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(o){return new Ml((a,l)=>{let u=t.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{ba(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:t,add:i,drain:s}}const bZ=60*1e3;function wZ(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?bZ:r-t}function _Z(e,t){return e[t]||e.all||0}function B3(e,t,n=Date.now()){return _Z(e,t)>n}function z3(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},s=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(s)for(const a of s.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[h]=r+f):i[h]=r+f}else o?i.all=r+wZ(o,r):t===429&&(i.all=r+60*1e3);return i}const SZ=64;function xZ(e,t,n=yZ(e.bufferSize||SZ)){let r={};const i=o=>n.drain(o);function s(o){const a=[];if(MP(o,(d,f)=>{const h=DP(f);B3(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):a.push(d)}),a.length===0)return ba({});const l=qf(o[0],a),u=d=>{MP(l,(f,h)=>{e.recordDroppedEvent(d,DP(h))})},c=()=>t({body:mQ(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&wt&&qe.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=z3(r,d),d),d=>{throw u("network_error"),d});return n.add(c).then(d=>d,d=>{if(d instanceof ws)return wt&&qe.error("Skipped sending event because buffer is full."),u("queue_overflow"),ba({});throw d})}return{send:s,flush:i}}function EZ(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return kZ(e,n)||TZ(e,r)}function TZ(e,t){return t?KP(e)===KP(t):!1}function kZ(e,t){return t?e.includes(t.host):!1}function KP(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function CZ(e){var t;((t=e.user)==null?void 0:t.ip_address)===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function OZ(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function $3(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:Yu})),version:Yu}),e._metadata=i}function H3(e={}){const t=Bt();if(!eZ()||!t)return{};const n=Pc(),r=Wf(n);if(r.getTraceData)return r.getTraceData(e);const i=Tn(),s=e.span||Ar(),o=s?XJ(s):RZ(i),a=s?_a(s):x3(t,i),l=VJ(a);return m3.test(o)?{"sentry-trace":o,baggage:l}:(qe.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function RZ(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return g3(t,r,n)}const IZ=100;function Nl(e,t){const n=Bt(),r=Io();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=IZ}=n.getOptions();if(s<=0)return;const a={timestamp:$m(),...e},l=i?Ia(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}let YP;const AZ="FunctionToString",XP=new WeakMap,PZ=()=>({name:AZ,setupOnce(){YP=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wC(this),n=XP.has(Bt())&&t!==void 0?t:this;return YP.apply(n,e)}}catch{}},setup(e){XP.set(e,!0)}}),MZ=PZ,DZ=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],NZ="InboundFilters",LZ=(e={})=>({name:NZ,processEvent(t,n,r){const i=r.getOptions(),s=BZ(e,i);return zZ(t,s)?null:t}}),FZ=LZ;function BZ(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:DZ],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function zZ(e,t){return t.ignoreInternal&&UZ(e)?(wt&&qe.warn(`Event dropped due to being internal Sentry Error. Event: ${Za(e)}`),!0):$Z(e,t.ignoreErrors)?(wt&&qe.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Za(e)}`),!0):qZ(e)?(wt&&qe.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${Za(e)}`),!0):HZ(e,t.ignoreTransactions)?(wt&&qe.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${Za(e)}`),!0):VZ(e,t.denyUrls)?(wt&&qe.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Za(e)}. Url: ${Ky(e)}`),!0):jZ(e,t.allowUrls)?!1:(wt&&qe.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Za(e)}. Url: ${Ky(e)}`),!0)}function $Z(e,t){return e.type||!t||!t.length?!1:L3(e).some(n=>wl(n,t))}function HZ(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?wl(n,t):!1}function VZ(e,t){if(!(t!=null&&t.length))return!1;const n=Ky(e);return n?wl(n,t):!1}function jZ(e,t){if(!(t!=null&&t.length))return!0;const n=Ky(e);return n?wl(n,t):!0}function UZ(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function WZ(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Ky(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?WZ(t):null}catch{return wt&&qe.error(`Cannot extract url for event ${Za(e)}`),null}}function qZ(e){var t,n;return e.type||!((n=(t=e.exception)==null?void 0:t.values)!=null&&n.length)?!1:!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value)}function GZ(e,t,n=250,r,i,s,o){var l;if(!((l=s.exception)!=null&&l.values)||!o||!va(o.originalException,Error))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=KZ(oE(e,t,i,o.originalException,r,s.exception.values,a,0),n))}function oE(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(va(r[i],Error)){JP(o,a);const u=e(t,r[i]),c=l.length;QP(u,i,c,a),l=oE(e,t,n,r[i],i,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(va(u,Error)){JP(o,a);const d=e(t,u),f=l.length;QP(d,`errors[${c}]`,f,a),l=oE(e,t,n,u,i,[d,...l],d,f)}}),l}function JP(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function QP(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function KZ(e,t){return e.map(n=>(n.value&&(n.value=$d(n.value,t)),n))}function YZ(e){const t="console";eu(t,e),tu(t,XZ)}function XZ(){"console"in Ut&&K1.forEach(function(e){e in Ut.console&&vi(Ut.console,e,function(t){return Uy[e]=t,function(...n){Zi("console",{args:n,level:e});const i=Uy[e];i==null||i.apply(Ut.console,n)}})})}function V3(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const JZ="Dedupe",QZ=()=>{let e;return{name:JZ,processEvent(t){if(t.type)return t;try{if(eee(t,e))return wt&&qe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},ZZ=QZ;function eee(e,t){return t?!!(tee(e,t)||nee(e,t)):!1}function tee(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!U3(e,t)||!j3(e,t))}function nee(e,t){const n=ZP(t),r=ZP(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!U3(e,t)||!j3(e,t))}function j3(e,t){let n=wP(e),r=wP(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function U3(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ZP(e){var t;return((t=e.exception)==null?void 0:t.values)&&e.exception.values[0]}function Qu(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function ree(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const s=wa()&&t(e.fetchData.url);if(e.endTimestamp&&s){const h=e.fetchData.__span;if(!h)return;const p=r[h];p&&(oee(p,e),delete r[h]);return}const{method:o,url:a}=e.fetchData,l=see(a),u=l?Qu(l).host:void 0,c=!!Ar(),d=s&&c?vc({name:`${o} ${a}`,attributes:{url:a,type:"fetch","http.method":o,"http.url":l,"server.address":u,[An]:i,[pc]:"http.client"}}):new gc;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const h=e.args[0],p=e.args[1]||{},m=iee(h,p,wa()&&c?d:void 0);m&&(e.args[1]=p,p.headers=m)}const f=Bt();if(f){const h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,h)}return d}function iee(e,t,n){const r=H3({span:n}),i=r["sentry-trace"],s=r.baggage;if(!i)return;const o=t.headers||(aee(e)?e.headers:void 0);if(o)if(lee(o)){const a=new Headers(o);if(a.set("sentry-trace",i),s){const l=a.get("baggage");if(l){const u=Pg(l);a.set("baggage",u?`${u},${s}`:s)}else a.set("baggage",s)}return a}else if(Array.isArray(o)){const a=[...o.filter(l=>!(Array.isArray(l)&&l[0]==="sentry-trace")).map(l=>{if(Array.isArray(l)&&l[0]==="baggage"&&typeof l[1]=="string"){const[u,c,...d]=l;return[u,Pg(c),...d]}else return l}),["sentry-trace",i]];return s&&a.push(["baggage",s]),a}else{const a="baggage"in o?o.baggage:void 0;let l=[];return Array.isArray(a)?l=a.map(u=>typeof u=="string"?Pg(u):u).filter(u=>u===""):a&&l.push(Pg(a)),s&&l.push(s),{...o,"sentry-trace":i,baggage:l.length>0?l.join(","):void 0}}else return{...r}}function see(e){try{return new URL(e).href}catch{return}}function oee(e,t){var n;if(t.response){d3(e,t.response.status);const r=((n=t.response)==null?void 0:n.headers)&&t.response.headers.get("content-length");if(r){const i=parseInt(r);i>0&&e.setAttribute("http.response_content_length",i)}}else t.error&&e.setStatus({code:ar,message:"internal_error"});e.end()}function Pg(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(xC)).join(",")}function aee(e){return typeof Request<"u"&&va(e,Request)}function lee(e){return typeof Headers<"u"&&va(e,Headers)}function W3(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Yy=Ut;function uee(){return"history"in Yy}function q3(){if(!("fetch"in Yy))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function aE(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function cee(){var n;if(typeof EdgeRuntime=="string")return!0;if(!q3())return!1;if(aE(Yy.fetch))return!0;let e=!1;const t=Yy.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=aE(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Zl&&qe.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function G3(e,t){const n="fetch";eu(n,e),tu(n,()=>K3(void 0,t))}function dee(e){const t="fetch-body-resolved";eu(t,e),tu(t,()=>K3(hee))}function K3(e,t=!1){t&&!cee()||vi(Ut,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:o}=pee(r),a={args:r,fetchData:{method:s,url:o},startTimestamp:Hr()*1e3,virtualError:i};return e||Zi("fetch",{...a}),n.apply(Ut,r).then(async l=>(e?e(l):Zi("fetch",{...a,endTimestamp:Hr()*1e3,response:l}),l),l=>{throw Zi("fetch",{...a,endTimestamp:Hr()*1e3,error:l}),gC(l)&&l.stack===void 0&&(l.stack=i.stack,Ni(l,"framesToPop",1)),l})}})}async function fee(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(o)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function hee(e){let t;try{t=e.clone()}catch{return}fee(t,()=>{Zi("fetch-body-resolved",{endTimestamp:Hr()*1e3,response:e})})}function lE(e,t){return!!e&&typeof e=="object"&&!!e[t]}function eM(e){return typeof e=="string"?e:e?lE(e,"url")?e.url:e.toString?e.toString():"":""}function pee(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:eM(n),method:lE(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:eM(t),method:lE(t,"method")?String(t.method).toUpperCase():"GET"}}function mee(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function gee(){return"npm"}function vee(){return!mee()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function tM(){return typeof window<"u"&&(!vee()||yee())}function yee(){const e=Ut.process;return(e==null?void 0:e.type)==="renderer"}const Xt=Ut;let uE=0;function Y3(){return uE>0}function bee(){uE++,setTimeout(()=>{uE--})}function lf(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(wC(e))return e}catch{return e}const r=function(...i){try{const s=i.map(o=>lf(o,t));return e.apply(this,s)}catch(s){throw bee(),_C(o=>{o.addEventProcessor(a=>(t.mechanism&&(X1(a,void 0),sf(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),c0(s)}),s}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}s3(r,e),Ni(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function CC(e,t){const n=OC(e,t),r={type:Eee(t),value:Tee(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wee(e,t,n,r){const i=Bt(),s=i==null?void 0:i.getOptions().normalizeDepth,o=Iee(t),a={__serialized__:T3(t,s)};if(o)return{exception:{values:[CC(e,o)]},extra:a};const l={exception:{values:[{type:s0(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Oee(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=OC(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function rS(e,t){return{exception:{values:[CC(e,t)]}}}function OC(e,t){const n=t.stacktrace||t.stack||"",r=See(t),i=xee(t);try{return e(n,r,i)}catch{}return[]}const _ee=/Minified React error #\d+;/i;function See(e){return e&&_ee.test(e.message)?1:0}function xee(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function X3(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Eee(e){const t=e==null?void 0:e.name;return!t&&X3(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Tee(e){const t=e==null?void 0:e.message;return X3(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function kee(e,t,n,r){const i=(n==null?void 0:n.syntheticException)||void 0,s=RC(e,t,i,r);return sf(s),s.level="error",n!=null&&n.event_id&&(s.event_id=n.event_id),ba(s)}function Cee(e,t,n="info",r,i){const s=(r==null?void 0:r.syntheticException)||void 0,o=cE(e,t,s,i);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),ba(o)}function RC(e,t,n,r,i){let s;if(n3(t)&&t.error)return rS(e,t.error);if(SP(t)||hJ(t)){const o=t;if("stack"in t)s=rS(e,t);else{const a=o.name||(SP(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=cE(e,l,n,r),X1(s,l)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return gC(t)?rS(e,t):rf(t)||s0(t)?(s=wee(e,t,n,i),sf(s,{synthetic:!0}),s):(s=cE(e,t,n,r),X1(s,`${t}`),sf(s,{synthetic:!0}),s)}function cE(e,t,n,r){const i={};if(r&&n){const s=OC(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]}),sf(i,{synthetic:!0})}if(vC(t)){const{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function Oee(e,{isUnhandledRejection:t}){const n=wJ(e),r=t?"promise rejection":"exception";return n3(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:s0(e)?`Event \`${Ree(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ree(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Iee(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class Aee extends hZ{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=Xt.SENTRY_SDK_SOURCE||gee();$3(n,"browser",["browser"],r),super(n),n.sendClientReports&&Xt.document&&Xt.document.addEventListener("visibilitychange",()=>{Xt.document.visibilityState==="hidden"&&this._flushOutcomes()}),this._options.sendDefaultPii&&(this.on("postprocessEvent",CZ),this.on("beforeSendSession",OZ))}eventFromException(t,n){return kee(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Cee(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}const tm=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Pee=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Gf=(e,t,n,r)=>{let i,s;return o=>{t.value>=0&&(o||r)&&(s=t.value-(i||0),(s||i===void 0)&&(i=t.value,t.delta=s,t.rating=Pee(t.value,n),e(t)))}},Rt=Ut,Mee=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Um=(e=!0)=>{var n,r;const t=(r=(n=Rt.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Wm=()=>{const e=Um();return(e==null?void 0:e.activationStart)||0},Kf=(e,t)=>{var s,o;const n=Um();let r="navigate";return n&&((s=Rt.document)!=null&&s.prerendering||Wm()>0?r="prerender":(o=Rt.document)!=null&&o.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Mee(),navigationType:r}},Dc=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Yf=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=Rt.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};Rt.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},d0=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let ap=-1;const Dee=()=>Rt.document.visibilityState==="hidden"&&!Rt.document.prerendering?0:1/0,Xy=e=>{Rt.document.visibilityState==="hidden"&&ap>-1&&(ap=e.type==="visibilitychange"?e.timeStamp:0,Lee())},Nee=()=>{addEventListener("visibilitychange",Xy,!0),addEventListener("prerenderingchange",Xy,!0)},Lee=()=>{removeEventListener("visibilitychange",Xy,!0),removeEventListener("prerenderingchange",Xy,!0)},f0=()=>(Rt.document&&ap<0&&(ap=Dee(),Nee()),{get firstHiddenTime(){return ap}}),qm=e=>{var t;(t=Rt.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Fee=[1800,3e3],Bee=(e,t={})=>{qm(()=>{const n=f0(),r=Kf("FCP");let i;const o=Dc("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Wm(),0),r.entries.push(l),i(!0)))})});o&&(i=Gf(e,r,Fee,t.reportAllChanges))})},zee=[.1,.25],$ee=(e,t={})=>{Bee(d0(()=>{const n=Kf("CLS",0);let r,i=0,s=[];const o=l=>{l.forEach(u=>{if(!u.hadRecentInput){const c=s[0],d=s[s.length-1];i&&c&&d&&u.startTime-d.startTime<1e3&&u.startTime-c.startTime<5e3?(i+=u.value,s.push(u)):(i=u.value,s=[u])}}),i>n.value&&(n.value=i,n.entries=s,r())},a=Dc("layout-shift",o);a&&(r=Gf(e,n,zee,t.reportAllChanges),Yf(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},Hee=[100,300],Vee=(e,t={})=>{qm(()=>{const n=f0(),r=Kf("FID");let i;const s=l=>{l.startTime<n.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),i(!0))},o=l=>{l.forEach(s)},a=Dc("first-input",o);i=Gf(e,r,Hee,t.reportAllChanges),a&&Yf(d0(()=>{o(a.takeRecords()),a.disconnect()}))})};let J3=0,iS=1/0,Mg=0;const jee=e=>{e.forEach(t=>{t.interactionId&&(iS=Math.min(iS,t.interactionId),Mg=Math.max(Mg,t.interactionId),J3=Mg?(Mg-iS)/7+1:0)})};let dE;const Uee=()=>dE?J3:performance.interactionCount||0,Wee=()=>{"interactionCount"in performance||dE||(dE=Dc("event",jee,{type:"event",buffered:!0,durationThreshold:0}))},Ko=[],sS=new Map,qee=40;let Gee=0;const Kee=()=>Uee()-Gee,Yee=()=>{const e=Math.min(Ko.length-1,Math.floor(Kee()/50));return Ko[e]},oS=10,Xee=[],Jee=e=>{var r;if(Xee.forEach(i=>i(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=Ko[Ko.length-1],n=sS.get(e.interactionId);if(n||Ko.length<oS||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===((r=n.entries[0])==null?void 0:r.startTime)&&n.entries.push(e);else{const i={id:e.interactionId,latency:e.duration,entries:[e]};sS.set(i.id,i),Ko.push(i)}Ko.sort((i,s)=>s.latency-i.latency),Ko.length>oS&&Ko.splice(oS).forEach(i=>sS.delete(i.id))}},Q3=e=>{var r;const t=Rt.requestIdleCallback||Rt.setTimeout;let n=-1;return e=d0(e),((r=Rt.document)==null?void 0:r.visibilityState)==="hidden"?e():(n=t(e),Yf(e)),n},Qee=[200,500],Zee=(e,t={})=>{"PerformanceEventTiming"in Rt&&"interactionId"in PerformanceEventTiming.prototype&&qm(()=>{Wee();const n=Kf("INP");let r;const i=o=>{Q3(()=>{o.forEach(Jee);const a=Yee();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},s=Dc("event",i,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:qee});r=Gf(e,n,Qee,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Yf(()=>{i(s.takeRecords()),r(!0)}))})},ete=[2500,4e3],nM={},tte=(e,t={})=>{qm(()=>{const n=f0(),r=Kf("LCP");let i;const s=a=>{t.reportAllChanges||(a=a.slice(-1)),a.forEach(l=>{l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Wm(),0),r.entries=[l],i())})},o=Dc("largest-contentful-paint",s);if(o){i=Gf(e,r,ete,t.reportAllChanges);const a=d0(()=>{nM[r.id]||(s(o.takeRecords()),o.disconnect(),nM[r.id]=!0,i(!0))});["keydown","click"].forEach(l=>{Rt.document&&addEventListener(l,()=>Q3(a),{once:!0,capture:!0})}),Yf(a)}})},nte=[800,1800],fE=e=>{var t,n;(t=Rt.document)!=null&&t.prerendering?qm(()=>fE(e)):((n=Rt.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>fE(e),!0):setTimeout(e,0)},rte=(e,t={})=>{const n=Kf("TTFB"),r=Gf(e,n,nte,t.reportAllChanges);fE(()=>{const i=Um();i&&(n.value=Math.max(i.responseStart-Wm(),0),n.entries=[i],r(!0))})},lp={},Jy={};let Z3,e$,t$,n$,r$;function IC(e,t=!1){return Gm("cls",e,ste,Z3,t)}function i$(e,t=!1){return Gm("lcp",e,ate,t$,t)}function s$(e){return Gm("fid",e,ote,e$)}function ite(e){return Gm("ttfb",e,lte,n$)}function o$(e){return Gm("inp",e,ute,r$)}function uf(e,t){return a$(e,t),Jy[e]||(cte(e),Jy[e]=!0),l$(e,t)}function Xf(e,t){const n=lp[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(i){tm&&qe.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ga(r)} Error:`,i)}}function ste(){return $ee(e=>{Xf("cls",{metric:e}),Z3=e},{reportAllChanges:!0})}function ote(){return Vee(e=>{Xf("fid",{metric:e}),e$=e})}function ate(){return tte(e=>{Xf("lcp",{metric:e}),t$=e},{reportAllChanges:!0})}function lte(){return rte(e=>{Xf("ttfb",{metric:e}),n$=e})}function ute(){return Zee(e=>{Xf("inp",{metric:e}),r$=e})}function Gm(e,t,n,r,i=!1){a$(e,t);let s;return Jy[e]||(s=n(),Jy[e]=!0),r&&t({metric:r}),l$(e,t,i?s:void 0)}function cte(e){const t={};e==="event"&&(t.durationThreshold=0),Dc(e,n=>{Xf(e,{entries:n})},t)}function a$(e,t){lp[e]=lp[e]||[],lp[e].push(t)}function l$(e,t,n){return()=>{n&&n();const r=lp[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function dte(e){return"duration"in e}function aS(e){return typeof e=="number"&&isFinite(e)}function Sa(e,t,n,{...r}){const i=Yt(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),O3(e,()=>{const s=vc({startTime:t,...r});return s&&s.end(n),s})}function u$(e){var g;const t=Bt();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:s}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay"),c=u==null?void 0:u.getReplayId(),d=Tn(),f=d.getUser(),h=f!==void 0?f.email||f.id||f.ip_address:void 0;let p;try{p=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:h||void 0,profile_id:p||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(g=Rt.navigator)==null?void 0:g.userAgent,"client.address":l?"{{auto}}":void 0,...i};return vc({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function AC(){return Rt.addEventListener&&Rt.performance}function Hn(e){return e/1e3}function c$(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function fte(){let e=0,t,n;if(!pte())return;let r=!1;function i(){r||(r=!0,n&&hte(e,t,n),s())}const s=IC(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);Yf(()=>{i()}),setTimeout(()=>{const o=Bt();if(!o)return;const a=o.on("startNavigationSpan",()=>{i(),a==null||a()}),l=Ar();if(l){const u=Vr(l);Yt(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function hte(e,t,n){var l;tm&&qe.log(`Sending CLS span (${e})`);const r=Hn((Bi()||0)+((t==null?void 0:t.startTime)||0)),i=Tn().getScopeData().transactionName,s=t?ya((l=t.sources[0])==null?void 0:l.node):"Layout shift",o=Gn({[An]:"auto.http.browser.cls",[pc]:"ui.webvital.cls",[jm]:(t==null?void 0:t.duration)||0,"sentry.pageload.span_id":n}),a=u$({name:s,transaction:i,attributes:o,startTime:r});a&&(a.addEvent("cls",{[a0]:"",[l0]:e}),a.end(r))}function pte(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const mte=2147483647;let rM=0,Sr={},di,wd;function gte({recordClsStandaloneSpans:e}){const t=AC();if(t&&Bi()){t.mark&&Rt.performance.mark("sentry-tracing-init");const n=Ste(),r=_te(),i=xte(),s=e?fte():wte();return()=>{n(),r(),i(),s==null||s()}}return()=>{}}function vte(){uf("longtask",({entries:e})=>{const t=Ar();if(!t)return;const{op:n,start_timestamp:r}=Yt(t);for(const i of e){const s=Hn(Bi()+i.startTime),o=Hn(i.duration);n==="navigation"&&r&&s<r||Sa(t,s,s+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[An]:"auto.ui.browser.metrics"}})}})}function yte(){new PerformanceObserver(t=>{const n=Ar();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Hn(Bi()+r.startTime),{start_timestamp:s,op:o}=Yt(n);if(o==="navigation"&&s&&i<s)continue;const a=Hn(r.duration),l={[An]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:h,sourceCharPosition:p}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),h&&(l["code.function"]=h),p!==-1&&(l["browser.script.source_char_position"]=p),Sa(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function bte(){uf("event",({entries:e})=>{const t=Ar();if(t){for(const n of e)if(n.name==="click"){const r=Hn(Bi()+n.startTime),i=Hn(n.duration),s={name:ya(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[An]:"auto.ui.browser.metrics"}},o=i3(n.target);o&&(s.attributes["ui.component_name"]=o),Sa(t,r,r+i,s)}}})}function wte(){return IC(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Sr.cls={value:e.value,unit:""},wd=t)},!0)}function _te(){return i$(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Sr.lcp={value:e.value,unit:"millisecond"},di=t)},!0)}function Ste(){return s$(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Hn(Bi()),r=Hn(t.startTime);Sr.fid={value:e.value,unit:"millisecond"},Sr["mark.fid"]={value:n+r,unit:"second"}})}function xte(){return ite(({metric:e})=>{e.entries[e.entries.length-1]&&(Sr.ttfb={value:e.value,unit:"millisecond"})})}function Ete(e,t){const n=AC(),r=Bi();if(!(n!=null&&n.getEntries)||!r)return;const i=Hn(r),s=n.getEntries(),{op:o,start_timestamp:a}=Yt(e);if(s.slice(rM).forEach(l=>{const u=Hn(l.startTime),c=Hn(Math.max(0,l.duration));if(!(o==="navigation"&&a&&i+u<a))switch(l.entryType){case"navigation":{kte(e,l,i);break}case"mark":case"paint":case"measure":{Tte(e,l,u,c,i);const d=f0(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(Sr.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(Sr.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{Rte(e,l,l.name,u,c,i);break}}}),rM=Math.max(s.length-1,0),Ite(e),o==="pageload"){Pte(Sr);const l=Sr["mark.fid"];l&&Sr.fid&&(Sa(e,l.value,l.value+Hn(Sr.fid.value),{name:"first input delay",op:"ui.action",attributes:{[An]:"auto.ui.browser.metrics"}}),delete Sr["mark.fid"]),(!("fcp"in Sr)||!t.recordClsOnPageloadSpan)&&delete Sr.cls,Object.entries(Sr).forEach(([u,c])=>{EQ(u,c.value,c.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",Wm()),Ate(e)}di=void 0,wd=void 0,Sr={}}function Tte(e,t,n,r,i){const s=Um(!1),o=Hn(s?s.requestStart:0),a=i+Math.max(n,o),l=i+n,u=l+r,c={[An]:"auto.resource.browser.metrics"};return a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),Sa(e,a,u,{name:t.name,op:t.entryType,attributes:c}),a}function kte(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Dg(e,t,r,n)}),Dg(e,t,"secureConnection",n,"TLS/SSL"),Dg(e,t,"fetch",n,"cache"),Dg(e,t,"domainLookup",n,"DNS"),Ote(e,t,n)}function Dg(e,t,n,r,i=n){const s=Cte(n),o=t[s],a=t[`${n}Start`];!a||!o||Sa(e,r+Hn(a),r+Hn(o),{op:`browser.${i}`,name:t.name,attributes:{[An]:"auto.ui.browser.metrics"}})}function Cte(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Ote(e,t,n){const r=n+Hn(t.requestStart),i=n+Hn(t.responseEnd),s=n+Hn(t.responseStart);t.responseEnd&&(Sa(e,r,i,{op:"browser.request",name:t.name,attributes:{[An]:"auto.ui.browser.metrics"}}),Sa(e,s,i,{op:"browser.response",name:t.name,attributes:{[An]:"auto.ui.browser.metrics"}}))}function Rte(e,t,n,r,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Qu(n),a={[An]:"auto.resource.browser.metrics"};lS(a,t,"transferSize","http.response_transfer_size"),lS(a,t,"encodedBodySize","http.response_content_length"),lS(a,t,"decodedBodySize","http.decoded_response_content_length");const l=t.deliveryType;l!=null&&(a["http.response_delivery_type"]=l);const u=t.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(Rt.location.origin);const{name:c,version:d}=c$(t.nextHopProtocol);a["network.protocol.name"]=c,a["network.protocol.version"]=d;const f=s+r,h=f+i;Sa(e,f,h,{name:n.replace(Rt.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function Ite(e){const t=Rt.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),aS(n.rtt)&&(Sr["connection.rtt"]={value:n.rtt,unit:"millisecond"})),aS(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),aS(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Ate(e){di&&(di.element&&e.setAttribute("lcp.element",ya(di.element)),di.id&&e.setAttribute("lcp.id",di.id),di.url&&e.setAttribute("lcp.url",di.url.trim().slice(0,200)),di.loadTime!=null&&e.setAttribute("lcp.loadTime",di.loadTime),di.renderTime!=null&&e.setAttribute("lcp.renderTime",di.renderTime),e.setAttribute("lcp.size",di.size)),wd!=null&&wd.sources&&wd.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,ya(t.node)))}function lS(e,t,n,r){const i=t[n];i!=null&&i<mte&&(e[r]=i)}function Pte(e){const t=Um(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Mte=1e3;let iM,hE,pE;function d$(e){const t="dom";eu(t,e),tu(t,Dte)}function Dte(){if(!Rt.document)return;const e=Zi.bind(null,"dom"),t=sM(e,!0);Rt.document.addEventListener("click",t,!1),Rt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var s,o;const i=(s=Rt[n])==null?void 0:s.prototype;(o=i==null?void 0:i.hasOwnProperty)!=null&&o.call(i,"addEventListener")&&(vi(i,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const h=sM(e);f.handler=h,a.call(this,l,h,c)}f.refCount++}catch{}return a.call(this,l,u,c)}}),vi(i,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(a.call(this,l,f.handler,c),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function Nte(e){if(e.type!==hE)return!1;try{if(!e.target||e.target._sentryId!==pE)return!1}catch{}return!0}function Lte(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function sM(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Fte(n);if(Lte(n.type,r))return;Ni(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ni(r,"_sentryId",Pi());const i=n.type==="keypress"?"input":n.type;Nte(n)||(e({event:n,name:i,global:t}),hE=n.type,pE=r?r._sentryId:void 0),clearTimeout(iM),iM=Rt.setTimeout(()=>{pE=void 0,hE=void 0},Mte)}}function Fte(e){try{return e.target}catch{return null}}let Ng;function h0(e){const t="history";eu(t,e),tu(t,Bte)}function Bte(){if(Rt.addEventListener("popstate",()=>{const t=Rt.location.href,n=Ng;if(Ng=t,n===t)return;Zi("history",{from:n,to:t})}),!uee())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Ng,s=String(r);if(Ng=s,i===s)return;Zi("history",{from:i,to:s})}return t.apply(this,n)}}vi(Rt.history,"pushState",e),vi(Rt.history,"replaceState",e)}const Xv={};function f$(e){const t=Xv[e];if(t)return t;let n=Rt[e];if(aE(n))return Xv[e]=n.bind(Rt);const r=Rt.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s!=null&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){tm&&qe.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Xv[e]=n.bind(Rt))}function oM(e){Xv[e]=void 0}function cf(...e){return f$("setTimeout")(...e)}const Du="__sentry_xhr_v3__";function h$(e){const t="xhr";eu(t,e),tu(t,zte)}function zte(){if(!Rt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,s=Hr()*1e3,o=ca(r[0])?r[0].toUpperCase():void 0,a=$te(r[1]);if(!o||!a)return t.apply(n,r);n[Du]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[Du];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:Hr()*1e3,startTimestamp:s,xhr:n,virtualError:i};Zi("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,h]=d,p=c[Du];return p&&ca(f)&&ca(h)&&(p.request_headers[f.toLowerCase()]=h),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Du];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:Hr()*1e3,xhr:n};return Zi("xhr",s),t.apply(n,r)}})}function $te(e){if(ca(e))return e;try{return e.toString()}catch{}}function p$(e){return new URLSearchParams(e).toString()}function m$(e,t=qe){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[p$(e)];if(!e)return[void 0]}catch(n){return tm&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return tm&&t.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function g$(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const uS=[],Jv=new Map;function Hte(){if(AC()&&Bi()){const t=Vte();return()=>{t()}}return()=>{}}const aM={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Vte(){return o$(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(p=>p.duration===e.value&&aM[p.name]);if(!t)return;const{interactionId:n}=t,r=aM[t.name],i=Hn(Bi()+t.startTime),s=Hn(e.value),o=Ar(),a=o?Vr(o):void 0,u=(n!=null?Jv.get(n):void 0)||a,c=u?Yt(u).description:Tn().getScopeData().transactionName,d=ya(t.target),f=Gn({[An]:"auto.http.browser.inp",[pc]:`ui.interaction.${r}`,[jm]:t.duration}),h=u$({name:d,transaction:c,attributes:f,startTime:i});h&&(h.addEvent("inp",{[a0]:"millisecond",[l0]:e.value}),h.end(i+s))})}function jte(){const e=({entries:t})=>{const n=Ar(),r=n&&Vr(n);t.forEach(i=>{if(!dte(i)||!r)return;const s=i.interactionId;if(s!=null&&!Jv.has(s)){if(uS.length>10){const o=uS.shift();Jv.delete(o)}uS.push(s),Jv.set(s,r)}})};uf("event",e),uf("first-input",e)}function Ute(e,t=f$("fetch")){let n=0,r=0;function i(s){const o=s.body.length;n+=o,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return oM("fetch"),Wy("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return oM("fetch"),n-=o,r--,Wy(l)}}return xZ(e,i)}const Wte=30,qte=50;function mE(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?hc:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const Gte=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Kte=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yte=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xte=e=>{const t=Gte.exec(e);if(t){const[,r,i,s]=t;return mE(r,hc,+i,+s)}const n=Kte.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Yte.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[i,s]=v$(n[1]||hc,n[2]);return mE(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Jte=[Wte,Xte],Qte=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Zte=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ene=e=>{const t=Qte.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=Zte.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],i=t[1]||hc;return[i,r]=v$(i,r),mE(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},tne=[qte,ene],nne=[Jte,tne],rne=Q5(...nne),v$=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:hc,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},_o=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Lg=1024,ine="Breadcrumbs",sne=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ine,setup(n){t.console&&YZ(une(n)),t.dom&&d$(lne(n,t.dom)),t.xhr&&h$(cne(n)),t.fetch&&G3(dne(n)),t.history&&h0(fne(n)),t.sentry&&n.on("beforeSendEvent",ane(n))}}},one=sne;function ane(e){return function(n){Bt()===e&&Nl({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Za(n)},{event:n})}}function lne(e,t){return function(r){if(Bt()!==e)return;let i,s,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Lg&&(_o&&qe.warn(`\`dom.maxStringLength\` cannot exceed ${Lg}, but a value of ${a} was configured. Sentry will use ${Lg} instead.`),a=Lg),typeof o=="string"&&(o=[o]);try{const u=r.event,c=hne(u)?u.target:u;i=ya(c,{keyAttrs:o,maxStringLength:a}),s=i3(c)}catch{i="<unknown>"}if(i.length===0)return;const l={category:`ui.${r.name}`,message:i};s&&(l.data={"ui.component_name":s}),Nl(l,{event:r.event,name:r.name,global:r.global})}}function une(e){return function(n){if(Bt()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:V3(n.level),message:xP(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${xP(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Nl(r,{input:n.args,level:n.level})}}function cne(e){return function(n){if(Bt()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Du];if(!r||!i||!s)return;const{method:o,url:a,status_code:l,body:u}=s,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},f={category:"xhr",data:c,type:"http",level:W3(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Nl(f,d)}}function dne(e){return function(n){if(Bt()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const s=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:s,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Nl(a,o)}else{const s=n.response,o={...n.fetchData,status_code:s==null?void 0:s.status};n.fetchData.request_body_size,n.fetchData.response_body_size,s==null||s.status;const a={input:n.args,response:s,startTimestamp:r,endTimestamp:i},l={category:"fetch",data:o,type:"http",level:W3(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Nl(l,a)}}}function fne(e){return function(n){if(Bt()!==e)return;let r=n.from,i=n.to;const s=Qu(Xt.location.href);let o=r?Qu(r):void 0;const a=Qu(i);o!=null&&o.path||(o=s),s.protocol===a.protocol&&s.host===a.host&&(i=a.relative),s.protocol===o.protocol&&s.host===o.host&&(r=o.relative),Nl({category:"navigation",data:{from:r,to:i}})}}function hne(e){return!!e&&!!e.target}const pne=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],mne="BrowserApiErrors",gne=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:mne,setupOnce(){t.setTimeout&&vi(Xt,"setTimeout",lM),t.setInterval&&vi(Xt,"setInterval",lM),t.requestAnimationFrame&&vi(Xt,"requestAnimationFrame",yne),t.XMLHttpRequest&&"XMLHttpRequest"in Xt&&vi(XMLHttpRequest.prototype,"send",bne);const n=t.eventTarget;n&&(Array.isArray(n)?n:pne).forEach(wne)}}},vne=gne;function lM(e){return function(...t){const n=t[0];return t[0]=lf(n,{mechanism:{data:{function:ga(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function yne(e){return function(t){return e.apply(this,[lf(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ga(e)},handled:!1,type:"instrument"}})])}}function bne(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&vi(n,i,function(s){const o={mechanism:{data:{function:i,handler:ga(s)},handled:!1,type:"instrument"}},a=wC(s);return a&&(o.mechanism.data.handler=ga(a)),lf(s,o)})}),e.apply(this,t)}}function wne(e){var r,i;const n=(r=Xt[e])==null?void 0:r.prototype;(i=n==null?void 0:n.hasOwnProperty)!=null&&i.call(n,"addEventListener")&&(vi(n,"addEventListener",function(s){return function(o,a,l){try{_ne(a)&&(a.handleEvent=lf(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ga(a),target:e},handled:!1,type:"instrument"}}))}catch{}return s.apply(this,[o,lf(a,{mechanism:{data:{function:"addEventListener",handler:ga(a),target:e},handled:!1,type:"instrument"}}),l])}}),vi(n,"removeEventListener",function(s){return function(o,a,l){try{const u=a.__sentry_wrapped__;u&&s.call(this,o,u,l)}catch{}return s.call(this,o,a,l)}}))}function _ne(e){return typeof e.handleEvent=="function"}const Sne=()=>({name:"BrowserSession",setupOnce(){if(typeof Xt.document>"u"){_o&&qe.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}VP({ignoreDuration:!0}),jP(),h0(({from:e,to:t})=>{e!==void 0&&e!==t&&(VP({ignoreDuration:!0}),jP())})}}),xne="GlobalHandlers",Ene=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:xne,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(kne(n),uM("onerror")),t.onunhandledrejection&&(Cne(n),uM("onunhandledrejection"))}}},Tne=Ene;function kne(e){Z5(t=>{const{stackParser:n,attachStacktrace:r}=y$();if(Bt()!==e||Y3())return;const{msg:i,url:s,line:o,column:a,error:l}=t,u=Ine(RC(n,l||i,void 0,r,!1),s,o,a);u.level="error",P3(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function Cne(e){e3(t=>{const{stackParser:n,attachStacktrace:r}=y$();if(Bt()!==e||Y3())return;const i=One(t),s=yC(i)?Rne(i):RC(n,i,void 0,r,!0);s.level="error",P3(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function One(e){if(yC(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Rne(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ine(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=ca(t)&&t.length>0?t:Uf();return l.length===0&&l.push({colno:u,filename:d,function:hc,in_app:!0,lineno:c}),e}function uM(e){_o&&qe.log(`Global Handler attached: ${e}`)}function y$(){const e=Bt();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const Ane=()=>({name:"HttpContext",preprocessEvent(e){var o,a;if(!Xt.navigator&&!Xt.location&&!Xt.document)return;const t=((o=e.request)==null?void 0:o.url)||Uf(),{referrer:n}=Xt.document||{},{userAgent:r}=Xt.navigator||{},i={...(a=e.request)==null?void 0:a.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:i};e.request=s}}),Pne="cause",Mne=5,Dne="LinkedErrors",Nne=(e={})=>{const t=e.limit||Mne,n=e.key||Pne;return{name:Dne,preprocessEvent(r,i,s){const o=s.getOptions();GZ(CC,o.stackParser,o.maxValueLength,n,t,r,i)}}},Lne=Nne;function b$(e){return[FZ(),MZ(),vne(),one(),Tne(),Lne(),ZZ(),Ane(),Sne()]}function Fne(e={}){var n;return{...{defaultIntegrations:b$(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(n=Xt.SENTRY_RELEASE)==null?void 0:n.id,sendClientReports:!0},...Bne(e)}}function Bne(e){const t={};for(const n of Object.getOwnPropertyNames(e)){const r=n;e[r]!==void 0&&(t[r]=e[r])}return t}function zne(){var l;const e=typeof Xt.window<"u"&&Xt;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=(l=n==null?void 0:n.runtime)==null?void 0:l.id,i=Uf()||"",s=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&Xt===Xt.top&&s.some(u=>i.startsWith(`${u}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function $ne(e={}){const t=Fne(e);if(!t.skipBrowserExtensionCheck&&zne()){_o&&Ia(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}_o&&!q3()&&qe.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...t,stackParser:uJ(t.stackParser||rne),integrations:lZ(t),transport:t.transport||Ute};return gZ(Aee,n)}const yn=Ut,PC="sentryReplaySession",Hne="replay_event",MC="Unable to send Replay",Vne=3e5,jne=9e5,Une=5e3,Wne=5500,qne=6e4,Gne=5e3,Kne=3,cM=15e4,Fg=5e3,Yne=3e3,Xne=300,DC=2e7,Jne=4999,Qne=15e3,dM=36e5;var Qn;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Qn||(Qn={}));function Zne(e){return e.nodeType===e.ELEMENT_NODE}function up(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function cp(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ere(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function tre(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Qy(e){try{const t=e.rules||e.cssRules;return t?ere(Array.from(t,w$).join("")):null}catch{return null}}function nre(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],s=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function w$(e){let t;if(ire(e))try{t=Qy(e.styleSheet)||tre(e)}catch{}else if(sre(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=nre(e)),r&&(n=rre(n)),r||i)return n}return t||e.cssText}function rre(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ire(e){return"styleSheet"in e}function sre(e){return"selectorText"in e}let _$=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ore(){return new _$}function p0({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function nm({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function df(e){return e.toLowerCase()}function gE(e){return e.toUpperCase()}const fM="__rrweb_original__";function are(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const s=t.getImageData,o=fM in s?s[fM]:s;if(new Uint32Array(o.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function NC(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?df(t):null}function Zy(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function S$(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(r);return(i==null?void 0:i[1])??null}const hM={};function x$(e){const t=hM[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return hM[e]=r.bind(window)}function vE(...e){return x$("setTimeout")(...e)}function E$(...e){return x$("clearTimeout")(...e)}function T$(e){try{return e.contentDocument}catch{}}let lre=1;const ure=new RegExp("[^a-z0-9-_:]"),rm=-2;function LC(){return lre++}function cre(e){if(e instanceof HTMLFormElement)return"form";const t=df(e.tagName);return ure.test(t)?"div":t}function dre(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let jc,pM;const fre=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hre=/^(?:[a-z+]+:)?\/\//i,pre=/^www\..*/i,mre=/^(data:)([^,]*),(.*)/i;function eb(e,t){return(e||"").replace(fre,(n,r,i,s,o,a)=>{const l=i||o||a,u=r||s||"";if(!l)return n;if(hre.test(l)||pre.test(l))return`url(${u}${l}${u})`;if(mre.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${dre(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const gre=/^[^ \t\n\r\u000c]+/,vre=/^[, \t\n\r\u000c]+/;function yre(e,t){if(t.trim()==="")return t;let n=0;function r(s){let o;const a=s.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const i=[];for(;r(vre),!(n>=t.length);){let s=r(gre);if(s.slice(-1)===",")s=_d(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=_d(e,s);let a=!1;for(;;){const l=t.charAt(n);if(l===""){i.push((s+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,i.push((s+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return i.join(", ")}const mM=new WeakMap;function _d(e,t){return!t||t.trim()===""?t:m0(e,t)}function bre(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function m0(e,t){let n=mM.get(e);if(n||(n=e.createElement("a"),mM.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function k$(e,t,n,r,i,s){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?_d(e,r):n==="srcset"?yre(e,r):n==="style"?eb(r,m0(e)):t==="object"&&n==="data"?_d(e,r):typeof s=="function"?s(n,r,i):r)}function C$(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function wre(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const s=e.classList[i];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function _re(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Nu(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Nu(e.parentNode,t,n,r+1)}function Sd(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(_re(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function ff(e,t,n,r,i,s){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(s){if(l=Nu(o,Sd(r,i)),l<0)return!0;a=Nu(o,Sd(t,n),l>=0?l:1/0)}else{if(a=Nu(o,Sd(t,n)),a<0)return!1;l=Nu(o,Sd(r,i),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!s}catch{}return!!s}function Sre(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=vE(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{E$(a),i=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return vE(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function xre(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const s=vE(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{E$(s),r=!0,t()})}function Ere(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:v={},inlineImages:w,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:x=!1}=t,S=Tre(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Qn.Document,childNodes:[],compatMode:e.compatMode}:{type:Qn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Qn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return Cre(e,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:l,maskInputOptions:p,maskInputFn:g,dataURLOptions:v,inlineImages:w,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:x,rootId:S,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return kre(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:S});case e.CDATA_SECTION_NODE:return{type:Qn.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:Qn.Comment,textContent:e.textContent||"",rootId:S};default:return!1}}function Tre(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function kre(e,t){var v;const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,p=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||(v=e.parentNode.sheet)!=null&&v.cssRules&&(f=Qy(e.parentNode.sheet))}catch(w){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${w}`,e)}f=eb(f,m0(t.doc))}p&&(f="SCRIPT_PLACEHOLDER");const g=ff(e,r,s,i,o,n);if(!h&&!p&&!m&&f&&g&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||g)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const w=p0({type:null,tagName:d,maskInputOptions:l});f=nm({isMasked:ff(e,r,s,i,o,w),element:e,value:f,maskInputFn:u})}return{type:Qn.Text,textContent:f||"",isStyle:h,rootId:c}}function Cre(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m,maskAllText:g,maskTextClass:v,unmaskTextClass:w,maskTextSelector:b,unmaskTextSelector:_}=t,x=wre(e,r,i,s),S=cre(e);let I={};const P=e.attributes.length;for(let O=0;O<P;O++){const M=e.attributes[O];M.name&&!C$(S,M.name,M.value)&&(I[M.name]=k$(n,S,df(M.name),M.value,e,l))}if(S==="link"&&o){const O=Array.from(n.styleSheets).find(E=>E.href===e.href);let M=null;O&&(M=Qy(O)),M&&(I.rel=null,I.href=null,I.crossorigin=null,I._cssText=eb(M,O.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const O=Qy(e.sheet);O&&(I._cssText=eb(O,m0(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const O=e,M=NC(O),E=Zy(O,gE(S),M),L=O.checked;if(M!=="submit"&&M!=="button"&&E){const j=ff(O,v,b,w,_,p0({type:M,tagName:gE(S),maskInputOptions:a}));I.value=nm({isMasked:j,element:O,value:E,maskInputFn:u})}L&&(I.checked=L)}if(S==="option"&&(e.selected&&!a.select?I.selected=!0:delete I.selected),S==="canvas"&&f){if(e.__context==="2d")are(e)||(I.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const O=e.toDataURL(c.type,c.quality),M=n.createElement("canvas");M.width=e.width,M.height=e.height;const E=M.toDataURL(c.type,c.quality);O!==E&&(I.rr_dataURL=O)}}if(S==="img"&&d){jc||(jc=n.createElement("canvas"),pM=jc.getContext("2d"));const O=e,M=O.currentSrc||O.getAttribute("src")||"<unknown-src>",E=O.crossOrigin,L=()=>{O.removeEventListener("load",L);try{jc.width=O.naturalWidth,jc.height=O.naturalHeight,pM.drawImage(O,0,0),I.rr_dataURL=jc.toDataURL(c.type,c.quality)}catch(j){if(O.crossOrigin!=="anonymous"){O.crossOrigin="anonymous",O.complete&&O.naturalWidth!==0?L():O.addEventListener("load",L);return}else console.warn(`Cannot inline img src=${M}! Error: ${j}`)}O.crossOrigin==="anonymous"&&(E?I.crossOrigin=E:O.removeAttribute("crossorigin"))};O.complete&&O.naturalWidth!==0?L():O.addEventListener("load",L)}if((S==="audio"||S==="video")&&(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop)),x){const{width:O,height:M}=e.getBoundingClientRect();I={class:I.class,rr_width:`${O}px`,rr_height:`${M}px`}}S==="iframe"&&!h(I.src)&&(!x&&!T$(e)&&(I.rr_src=I.src),delete I.src);let R;try{customElements.get(S)&&(R=!0)}catch{}return{type:Qn.Element,tagName:S,attributes:I,childNodes:[],isSVG:bre(e)||void 0,needBlock:x,rootId:m,isCustom:R}}function mn(e){return e==null?"":e.toLowerCase()}function Ore(e,t){if(t.comment&&e.type===Qn.Comment)return!0;if(e.type===Qn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&S$(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(mn(e.attributes.name).match(/^msapplication-tile(image|color)$/)||mn(e.attributes.name)==="application-name"||mn(e.attributes.rel)==="icon"||mn(e.attributes.rel)==="apple-touch-icon"||mn(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&mn(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(mn(e.attributes.property).match(/^(og|twitter|fb):/)||mn(e.attributes.name).match(/^(og|twitter):/)||mn(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(mn(e.attributes.name)==="robots"||mn(e.attributes.name)==="googlebot"||mn(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(mn(e.attributes.name)==="author"||mn(e.attributes.name)==="generator"||mn(e.attributes.name)==="framework"||mn(e.attributes.name)==="publisher"||mn(e.attributes.name)==="progid"||mn(e.attributes.property).match(/^article:/)||mn(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(mn(e.attributes.name)==="google-site-verification"||mn(e.attributes.name)==="yandex-verification"||mn(e.attributes.name)==="csrf-token"||mn(e.attributes.name)==="p:domain_verify"||mn(e.attributes.name)==="verify-v1"||mn(e.attributes.name)==="verification"||mn(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function xd(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:w,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:P=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:E=!1}=t;let{preserveWhiteSpace:L=!0}=t;const j=Ere(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,dataURLOptions:b,inlineImages:_,recordCanvas:x,keepIframeSrcFn:M,newlyAddedElement:E});if(!j)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):Ore(j,w)||!L&&j.type===Qn.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?F=rm:F=LC();const B=Object.assign(j,{id:F});if(r.add(e,B),F===rm)return null;S&&S(e);let Y=!f;if(B.type===Qn.Element){Y=Y&&!B.needBlock,delete B.needBlock;const Z=e.shadowRoot;Z&&cp(Z)&&(B.isShadowHost=!0)}if((B.type===Qn.Document||B.type===Qn.Element)&&Y){w.headWhitespace&&B.type===Qn.Element&&B.tagName==="head"&&(L=!1);const Z={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:w,dataURLOptions:b,inlineImages:_,recordCanvas:x,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:M};for(const ne of Array.from(e.childNodes)){const oe=xd(ne,Z);oe&&B.childNodes.push(oe)}if(Zne(e)&&e.shadowRoot)for(const ne of Array.from(e.shadowRoot.childNodes)){const oe=xd(ne,Z);oe&&(cp(e.shadowRoot)&&(oe.isShadow=!0),B.childNodes.push(oe))}}return e.parentNode&&up(e.parentNode)&&cp(e.parentNode)&&(B.isShadow=!0),B.type===Qn.Element&&B.tagName==="iframe"&&Sre(e,()=>{const Z=T$(e);if(Z&&I){const ne=xd(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:w,dataURLOptions:b,inlineImages:_,recordCanvas:x,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:M});ne&&I(e,ne)}},P),B.type===Qn.Element&&B.tagName==="link"&&typeof B.attributes.rel=="string"&&(B.attributes.rel==="stylesheet"||B.attributes.rel==="preload"&&typeof B.attributes.href=="string"&&S$(B.attributes.href)==="css")&&xre(e,()=>{if(R){const Z=xd(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:w,dataURLOptions:b,inlineImages:_,recordCanvas:x,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:M});Z&&R(e,Z)}},O),B}function Rre(e,t){const{mirror:n=new _$,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOM:w=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:I,onStylesheetLoad:P,stylesheetLoadTimeout:R,keepIframeSrcFn:O=()=>!1}=t;return xd(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:b,inlineImages:f,recordCanvas:h,preserveWhiteSpace:_,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:I,onStylesheetLoad:P,stylesheetLoadTimeout:R,keepIframeSrcFn:O,newlyAddedElement:!1})}function Zr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const id=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let gM={map:{},getId(){return console.error(id),-1},getNode(){return console.error(id),null},removeNodeFromMap(){console.error(id)},has(){return console.error(id),!1},reset(){console.error(id)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(gM=new Proxy(gM,{get(e,t,n){return t==="map"&&console.error(id),Reflect.get(e,t,n)}}));function im(e,t,n={}){let r=null,i=0;return function(...s){const o=Date.now();!i&&n.leading===!1&&(i=o);const a=t-(o-i),l=this;a<=0||a>t?(r&&(Lre(r),r=null),i=o,e.apply(l,s)):!r&&n.trailing!==!1&&(r=g0(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(l,s)},a))}}function O$(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(o){g0(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>O$(e,t,s||{},!0)}function FC(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let tb=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(tb=()=>new Date().getTime());function R$(e){var n,r,i,s,o,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((i=t==null?void 0:t.body)==null?void 0:i.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(s=t==null?void 0:t.body)==null?void 0:s.parentElement)==null?void 0:o.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function I$(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A$(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function P$(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ki(e,t,n,r,i){if(!e)return!1;const s=P$(e);if(!s)return!1;const o=Sd(t,n);if(!i){const u=r&&s.matches(r);return o(s)&&!u}const a=Nu(s,o);let l=-1;return a<0?!1:(r&&(l=Nu(s,Sd(null,r))),a>-1&&l<0?!0:a<l)}function Ire(e,t){return t.getId(e)!==-1}function cS(e,t){return t.getId(e)===rm}function M$(e,t){if(up(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?M$(e.parentNode,t):!0:!0}function yE(e){return!!e.changedTouches}function Are(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function D$(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function N$(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function bE(e){return!!(e!=null&&e.shadowRoot)}let Pre=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function L$(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Mre(e){let t=e,n;for(;n=L$(t);)t=n;return t}function Dre(e){const t=e.ownerDocument;if(!t)return!1;const n=Mre(e);return t.contains(n)}function F$(e){const t=e.ownerDocument;return t?t.contains(e)||Dre(e):!1}const vM={};function BC(e){const t=vM[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return vM[e]=r.bind(window)}function Nre(...e){return BC("requestAnimationFrame")(...e)}function g0(...e){return BC("setTimeout")(...e)}function Lre(...e){return BC("clearTimeout")(...e)}var kt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(kt||{}),yt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(yt||{}),Kr=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Kr||{}),jo=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(jo||{}),yM;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(yM||(yM={}));var bM;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(bM||(bM={}));function zC(e){try{return e.contentDocument}catch{}}function Fre(e){try{return e.contentWindow}catch{}}function wM(e){return"__ln"in e}let Bre=class{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&wM(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&wM(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}};const _M=(e,t)=>`${e}@${t}`;let zre=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Bre,i=l=>{let u=l,c=rm;for(;c===rm;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},s=l=>{if(!l.parentNode||!F$(l))return;const u=up(l.parentNode)?this.mirror.getId(L$(l)):this.mirror.getId(l.parentNode),c=i(l);if(u===-1||c===-1)return r.addNode(l);const d=xd(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{D$(f,this.mirror)&&!ki(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),N$(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),bE(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{ki(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)SM(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||s(l);for(const l of this.addedSet)!xM(this.droppedSet,l)&&!SM(this.removes,l,this.mirror)||xM(this.movedSet,l)?s(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(i(c.value)===-1)continue;if(d!==-1){l=c;break}else{const h=c.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),s(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!cS(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ki(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:ff(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,P$(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const o=NC(n),a=n.tagName;i=Zy(n,a,o);const l=p0({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=ff(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);i=nm({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(ki(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!zC(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!C$(n.tagName,r)&&(s.attributes[r]=k$(this.doc,df(n.tagName),df(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=l:s.styleDiff[a]=[l,u]:s._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(ki(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=up(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ki(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||cS(n,this.mirror)||!Ire(n,this.mirror)||(this.addedSet.has(n)?(wE(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||M$(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[_M(r,i)]?wE(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:up(t.target)&&cp(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(cS(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[_M(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ki(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),bE(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function wE(e,t){e.delete(t),t.childNodes.forEach(n=>wE(e,n))}function SM(e,t,n){return e.length===0?!1:$re(e,t,n)}function $re(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(s=>s.id===i))return!0;r=r.parentNode}return!1}function xM(e,t){return e.size===0?!1:B$(e,t)}function B$(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:B$(e,n):!1}let dp;function Hre(e){dp=e}function Vre(){dp=void 0}const Ht=e=>dp?(...n)=>{try{return e(...n)}catch(r){if(dp&&dp(r)===!0)return()=>{};throw r}}:e,Ed=[];function Km(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function z$(e,t){var o,a;const n=new zre;Ed.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=(a=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:a.call(o,"MutationObserver");i&&window[i]&&(r=window[i]);const s=new r(Ht(l=>{e.onMutation&&e.onMutation(l)===!1||n.processMutations.bind(n)(l)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function jre({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=im(Ht(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),s),u=Ht(im(Ht(d=>{const f=Km(d),{clientX:h,clientY:p}=yE(d)?d.changedTouches[0]:d;a||(a=tb()),o.push({x:h,y:p,id:r.getId(f),timeOffset:tb()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?yt.Drag:d instanceof MouseEvent?yt.MouseMove:yt.TouchMove)}),i,{trailing:!1})),c=[Zr("mousemove",u,n),Zr("touchmove",u,n),Zr("drag",u,n)];return Ht(()=>{c.forEach(d=>d())})}function Ure({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const h=Km(f);if(ki(h,r,i,s,!0))return;let p=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":p=jo.Mouse;break;case"touch":p=jo.Touch;break;case"pen":p=jo.Pen;break}p===jo.Touch?Kr[d]===Kr.MouseDown?m="TouchStart":Kr[d]===Kr.MouseUp&&(m="TouchEnd"):jo.Pen}else yE(f)&&(p=jo.Touch);p!==null?(u=p,(m.startsWith("Touch")&&p===jo.Touch||m.startsWith("Mouse")&&p===jo.Mouse)&&(p=null)):Kr[d]===Kr.Click&&(p=u,u=null);const g=yE(f)?f.changedTouches[0]:f;if(!g)return;const v=n.getId(h),{clientX:w,clientY:b}=g;Ht(e)({type:Kr[m],id:v,x:w,y:b,...p!==null&&{pointerType:p}})};return Object.keys(Kr).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=df(d);const h=c(d);if(window.PointerEvent)switch(Kr[d]){case Kr.MouseDown:case Kr.MouseUp:f=f.replace("mouse","pointer");break;case Kr.TouchStart:case Kr.TouchEnd:return}l.push(Zr(f,h,t))}),Ht(()=>{l.forEach(d=>d())})}function $$({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){const a=Ht(im(Ht(l=>{const u=Km(l);if(!u||ki(u,r,i,s,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=R$(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return Zr("scroll",a,t)}function Wre({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=Ht(im(Ht(()=>{const s=I$(),o=A$();(n!==s||r!==o)&&(e({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return Zr("resize",i,t)}const qre=["INPUT","TEXTAREA","SELECT"],EM=new WeakMap;function Gre({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m}){function g(I){let P=Km(I);const R=I.isTrusted,O=P&&gE(P.tagName);if(O==="OPTION"&&(P=P.parentElement),!P||!O||qre.indexOf(O)<0||ki(P,r,i,s,!0))return;const M=P;if(M.classList.contains(o)||a&&M.matches(a))return;const E=NC(P);let L=Zy(M,O,E),j=!1;const F=p0({maskInputOptions:l,tagName:O,type:E}),B=ff(P,f,p,h,m,F);(E==="radio"||E==="checkbox")&&(j=P.checked),L=nm({isMasked:B,element:P,value:L,maskInputFn:u}),v(P,d?{text:L,isChecked:j,userTriggered:R}:{text:L,isChecked:j});const Y=P.name;E==="radio"&&Y&&j&&t.querySelectorAll(`input[type="radio"][name="${Y}"]`).forEach(Z=>{if(Z!==P){const ne=nm({isMasked:B,element:Z,value:Zy(Z,O,E),maskInputFn:u});v(Z,d?{text:ne,isChecked:!j,userTriggered:!1}:{text:ne,isChecked:!j})}})}function v(I,P){const R=EM.get(I);if(!R||R.text!==P.text||R.isChecked!==P.isChecked){EM.set(I,P);const O=n.getId(I);Ht(e)({...P,id:O})}}const b=(c.input==="last"?["change"]:["input","change"]).map(I=>Zr(I,Ht(g),t)),_=t.defaultView;if(!_)return()=>{b.forEach(I=>I())};const x=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),S=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return x&&x.set&&b.push(...S.map(I=>O$(I[0],I[1],{set(){Ht(g)({target:this,isTrusted:!1})}},!1,_))),Ht(()=>{b.forEach(I=>I())})}function nb(e){const t=[];function n(r,i){if(Bg("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Bg("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Bg("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Bg("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(e,t)}function el(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Kre({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Ht((c,d,f)=>{const[h,p]=f,{id:m,styleId:g}=el(d,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:h,index:p}]}),c.apply(d,f)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ht((c,d,f)=>{const[h]=f,{id:p,styleId:m}=el(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,removes:[{index:h}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Ht((c,d,f)=>{const[h]=f,{id:p,styleId:m}=el(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replace:h}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Ht((c,d,f)=>{const[h]=f,{id:p,styleId:m}=el(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replaceSync:h}),c.apply(d,f)})}));const l={};zg("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(zg("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),zg("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),zg("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:Ht((f,h,p)=>{const[m,g]=p,{id:v,styleId:w}=el(h.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||w&&w!==-1)&&e({id:v,styleId:w,adds:[{rule:m,index:[...nb(h),g||0]}]}),f.apply(h,p)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:Ht((f,h,p)=>{const[m]=p,{id:g,styleId:v}=el(h.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...nb(h),m]}]}),f.apply(h,p)})})}),Ht(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function H$({mirror:e,stylesheetManager:t},n){var o,a,l;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?(o=n.defaultView)==null?void 0:o.Document:(l=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:l.ShadowRoot,s=i!=null&&i.prototype?Object.getOwnPropertyDescriptor(i==null?void 0:i.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var u;return(u=s.get)==null?void 0:u.call(this)},set(u){var d;const c=(d=s.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return c}}),Ht(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function Yre({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ht((a,l,u)=>{var m;const[c,d,f]=u;if(n.has(c))return s.apply(l,[c,d,f]);const{id:h,styleId:p}=el((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:c,value:d,priority:f},index:nb(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Ht((a,l,u)=>{var h;const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=el((h=l.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:nb(l.parentRule)}),a.apply(l,u)})}),Ht(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Xre({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){const a=Ht(u=>im(Ht(c=>{const d=Km(c);if(!d||ki(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:m}=d;e({type:u,id:i.getId(d),currentTime:f,volume:h,muted:p,playbackRate:m})}),s.media||500)),l=[Zr("play",a(0),o),Zr("pause",a(1),o),Zr("seeked",a(2),o),Zr("volumechange",a(3),o),Zr("ratechange",a(4),o)];return Ht(()=>{l.forEach(u=>u())})}function Jre({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(l,u,c){const d=new s(l,u,c);return i.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=FC(t.fonts,"add",function(a){return function(l){return g0(Ht(()=>{const u=i.get(l);u&&(e(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=s}),r.push(o),Ht(()=>{r.forEach(a=>a())})}function Qre(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=e;let a=!0;const l=Ht(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const h=u.getRangeAt(f),{startContainer:p,startOffset:m,endContainer:g,endOffset:v}=h;ki(p,r,i,s,!0)||ki(g,r,i,s,!0)||c.push({start:n.getId(p),startOffset:m,end:n.getId(g),endOffset:v})}o({ranges:c})});return l(),Zr("selectionchange",l)}function Zre({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:FC(n.customElements,"define",function(i){return function(s,o,a){try{t({define:{name:s}})}catch{}return i.apply(this,[s,o,a])}})}function eie(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=z$(e,e.doc));const i=jre(e),s=Ure(e),o=$$(e),a=Wre(e,{win:n}),l=Gre(e),u=Xre(e);let c=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(c=Kre(e,{win:n}),d=H$(e,e.doc),f=Yre(e,{win:n}),e.collectFonts&&(h=Jre(e)));const p=Qre(e),m=Zre(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,n,v.options));return Ht(()=>{Ed.forEach(v=>v.reset()),r==null||r.disconnect(),i(),s(),o(),a(),l(),u(),c(),d(),f(),h(),p(),m(),g.forEach(v=>v())})}function Bg(e){return typeof window[e]<"u"}function zg(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}let _E=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const s=r||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=i.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};class tie{constructor(){this.crossOriginIframeMirror=new _E(LC),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}let nie=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new _E(LC),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new _E(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)==null||i.call(this,t);const r=zC(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case kt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:kt.IncrementalSnapshot,data:{source:yt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case kt.Meta:case kt.Load:case kt.DomContentLoaded:return!1;case kt.Plugin:return n;case kt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case kt.IncrementalSnapshot:switch(n.data.source){case yt.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),n.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case yt.Drag:case yt.TouchMove:case yt.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case yt.ViewportResize:return!1;case yt.MediaInteraction:case yt.MouseInteraction:case yt.Scroll:case yt.CanvasMutation:case yt.Input:return this.replaceIds(n.data,t,["id"]),n;case yt.StyleSheetRule:case yt.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case yt.Font:return n;case yt.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),n;case yt.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Qn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}};class rie{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}let iie=class{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!cp(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=z$({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push($$({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),g0(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(H$({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=zC(t),r=Fre(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(FC(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s);return this.shadowRoot&&F$(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}};class TM{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}let sie=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Pre,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(a,l)=>({rule:w$(a),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},oie=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,Nre(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}},Pn,rb;var BF;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((BF=e.contentWindow)==null?void 0:BF.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fs=ore();function da(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:v,maskAttributeFn:w,maskInputFn:b,maskTextFn:_,maxCanvasSize:x=null,packFn:S,sampling:I={},dataURLOptions:P={},mousemoveWait:R,recordDOM:O=!0,recordCanvas:M=!1,recordCrossOriginIframes:E=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:F=!1,inlineImages:B=!1,plugins:Y,keepIframeSrcFn:Z=()=>!1,ignoreCSSAttributes:ne=new Set([]),errorHandler:oe,onMutation:le,getCanvasManager:Ee}=e;Hre(oe);const xe=E?window.parent===window:!0;let Me=!1;if(!xe)try{window.parent.document&&(Me=!1)}catch{Me=!0}if(xe&&!t)throw new Error("emit function is required");if(!xe&&!Me)return()=>{};R!==void 0&&I.mousemove===void 0&&(I.mousemove=R),fs.reset();const Ve=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},Ue=v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:v==="all",headMetaDescKeywords:v==="all"}:v||{};Are();let me,_e=0;const Te=ue=>{for(const he of Y||[])he.eventProcessor&&(ue=he.eventProcessor(ue));return S&&!Me&&(ue=S(ue)),ue};Pn=(ue,he)=>{var de;const Se=ue;if(Se.timestamp=tb(),(de=Ed[0])!=null&&de.isFrozen()&&Se.type!==kt.FullSnapshot&&!(Se.type===kt.IncrementalSnapshot&&Se.data.source===yt.Mutation)&&Ed.forEach(Pe=>Pe.unfreeze()),xe)t==null||t(Te(Se),he);else if(Me){const Pe={type:"rrweb",event:Te(Se),origin:window.location.origin,isCheckout:he};window.parent.postMessage(Pe,"*")}if(Se.type===kt.FullSnapshot)me=Se,_e=0;else if(Se.type===kt.IncrementalSnapshot){if(Se.data.source===yt.Mutation&&Se.data.isAttachIframe)return;_e++;const Pe=r&&_e>=r,Ce=n&&me&&Se.timestamp-me.timestamp>n;(Pe||Ce)&&ie(!0)}};const Ie=ue=>{Pn({type:kt.IncrementalSnapshot,data:{source:yt.Mutation,...ue}})},Ae=ue=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.Scroll,...ue}}),Q=ue=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.CanvasMutation,...ue}}),J=ue=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.AdoptedStyleSheet,...ue}}),ae=new sie({mutationCb:Ie,adoptedStyleSheetCb:J}),we=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new tie:new nie({mirror:fs,mutationCb:Ie,stylesheetManager:ae,recordCrossOriginIframes:E,wrappedEmit:Pn});for(const ue of Y||[])ue.getMirror&&ue.getMirror({nodeMirror:fs,crossOriginIframeMirror:we.crossOriginIframeMirror,crossOriginIframeStyleMirror:we.crossOriginIframeStyleMirror});const be=new oie,T=lie(Ee,{mirror:fs,win:window,mutationCb:ue=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.CanvasMutation,...ue}}),recordCanvas:M,blockClass:i,blockSelector:s,unblockSelector:o,maxCanvasSize:x,sampling:I.canvas,dataURLOptions:P,errorHandler:oe}),V=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new rie:new iie({mutationCb:Ie,scrollCb:Ae,bypassOptions:{onMutation:le,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:Ve,dataURLOptions:P,maskAttributeFn:w,maskTextFn:_,maskInputFn:b,recordCanvas:M,inlineImages:B,sampling:I,slimDOMOptions:Ue,iframeManager:we,stylesheetManager:ae,canvasManager:T,keepIframeSrcFn:Z,processedNodeManager:be},mirror:fs}),ie=(ue=!1)=>{if(!O)return;Pn({type:kt.Meta,data:{href:window.location.href,width:A$(),height:I$()}},ue),ae.reset(),V.init(),Ed.forEach(Se=>Se.lock());const he=Rre(document,{mirror:fs,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:Ve,maskAttributeFn:w,maskInputFn:b,maskTextFn:_,slimDOM:Ue,dataURLOptions:P,recordCanvas:M,inlineImages:B,onSerialize:Se=>{D$(Se,fs)&&we.addIframe(Se),N$(Se,fs)&&ae.trackLinkElement(Se),bE(Se)&&V.addShadowRoot(Se.shadowRoot,document)},onIframeLoad:(Se,de)=>{we.attachIframe(Se,de),Se.contentWindow&&T.addWindow(Se.contentWindow),V.observeAttachShadow(Se)},onStylesheetLoad:(Se,de)=>{ae.attachLinkElement(Se,de)},keepIframeSrcFn:Z});if(!he)return console.warn("Failed to snapshot the document");Pn({type:kt.FullSnapshot,data:{node:he,initialOffset:R$(window)}}),Ed.forEach(Se=>Se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ae.adoptStyleSheets(document.adoptedStyleSheets,fs.getId(document))};rb=ie;try{const ue=[],he=de=>{var Pe;return Ht(eie)({onMutation:le,mutationCb:Ie,mousemoveCb:(Ce,re)=>Pn({type:kt.IncrementalSnapshot,data:{source:re,positions:Ce}}),mouseInteractionCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.MouseInteraction,...Ce}}),scrollCb:Ae,viewportResizeCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.ViewportResize,...Ce}}),inputCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.Input,...Ce}}),mediaInteractionCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.MediaInteraction,...Ce}}),styleSheetRuleCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.StyleSheetRule,...Ce}}),styleDeclarationCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.StyleDeclaration,...Ce}}),canvasMutationCb:Q,fontCb:Ce=>Pn({type:kt.IncrementalSnapshot,data:{source:yt.Font,...Ce}}),selectionCb:Ce=>{Pn({type:kt.IncrementalSnapshot,data:{source:yt.Selection,...Ce}})},customElementCb:Ce=>{Pn({type:kt.IncrementalSnapshot,data:{source:yt.CustomElement,...Ce}})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:Ve,inlineStylesheet:p,sampling:I,recordDOM:O,recordCanvas:M,inlineImages:B,userTriggeredOnInput:j,collectFonts:F,doc:de,maskAttributeFn:w,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:Z,blockSelector:s,unblockSelector:o,slimDOMOptions:Ue,dataURLOptions:P,mirror:fs,iframeManager:we,stylesheetManager:ae,shadowDomManager:V,processedNodeManager:be,canvasManager:T,ignoreCSSAttributes:ne,plugins:((Pe=Y==null?void 0:Y.filter(Ce=>Ce.observer))==null?void 0:Pe.map(Ce=>({observer:Ce.observer,options:Ce.options,callback:re=>Pn({type:kt.Plugin,data:{plugin:Ce.name,payload:re}})})))||[]},{})};we.addLoadListener(de=>{try{ue.push(he(de.contentDocument))}catch(Pe){console.warn(Pe)}});const Se=()=>{ie(),ue.push(he(document))};return document.readyState==="interactive"||document.readyState==="complete"?Se():(ue.push(Zr("DOMContentLoaded",()=>{Pn({type:kt.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&Se()})),ue.push(Zr("load",()=>{Pn({type:kt.Load,data:{}}),L==="load"&&Se()},window))),()=>{ue.forEach(de=>de()),be.destroy(),rb=void 0,Vre()}}catch(ue){console.warn(ue)}}function aie(e){if(!rb)throw new Error("please take full snapshot after start recording");rb(e)}da.mirror=fs;da.takeFullSnapshot=aie;function lie(e,t){try{return e?e(t):new TM}catch{return console.warn("Unable to initialize CanvasManager"),new TM}}const uie=3,cie=5;function $C(e){return e>9999999999?e:e*1e3}function dS(e){return e>9999999999?e/1e3:e}function Ym(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:kt.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:vs(t,10,1e3)}}),t.category==="console")))}const die="button,a";function V$(e){return e.closest(die)||e}function j$(e){const t=U$(e);return!t||!(t instanceof Element)?t:V$(t)}function U$(e){return fie(e)?e.target:e}function fie(e){return typeof e=="object"&&!!e&&"target"in e}let tl;function hie(e){return tl||(tl=[],pie()),tl.push(e),()=>{const t=tl?tl.indexOf(e):-1;t>-1&&tl.splice(t,1)}}function pie(){vi(yn,"open",function(e){return function(...t){if(tl)try{tl.forEach(n=>n())}catch{}return e.apply(yn,t)}})}const mie=new Set([yt.Mutation,yt.StyleSheetRule,yt.StyleDeclaration,yt.AdoptedStyleSheet,yt.CanvasMutation,yt.Selection,yt.MediaInteraction]);function gie(e,t,n){e.handleClick(t,n)}class vie{constructor(t,n,r=Ym){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=hie(()=>{this._lastMutation=kM()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(bie(n,this._ignoreSelector)||!wie(t))return;const r={timestamp:dS(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=dS(t)}registerScroll(t=Date.now()){this._lastScroll=dS(t)}registerClick(t){const n=V$(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=kM();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!i,{clickCount:o,clickBreadcrumb:a}=t;if(s){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:yn.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:yn.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=cf(()=>this._checkClicks(),1e3)}}const yie=["A","BUTTON","INPUT"];function bie(e,t){return!!(!yie.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function wie(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function kM(){return Date.now()/1e3}function _ie(e,t){try{if(!Sie(t))return;const{source:n}=t.data;if(mie.has(n)&&e.registerMutation(t.timestamp),n===yt.Scroll&&e.registerScroll(t.timestamp),xie(t)){const{type:r,id:i}=t.data,s=da.mirror.getNode(i);s instanceof HTMLElement&&r===Kr.Click&&e.registerClick(s)}}catch{}}function Sie(e){return e.type===uie}function xie(e){return e.data.source===yt.MouseInteraction}function ao(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ib;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(ib||(ib={}));const Eie=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Tie(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Eie.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const kie=e=>t=>{if(!e.isEnabled())return;const n=Cie(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&gie(e.clickDetector,n,j$(t.event)),Ym(e,n)};function W$(e,t){const n=da.mirror.getId(e),r=n&&da.mirror.getNode(n),i=r&&da.mirror.getMeta(r),s=i&&Rie(i)?i:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(o=>o.type===ib.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Tie(s.attributes)}}:{}}}function Cie(e){const{target:t,message:n}=Oie(e);return ao({category:`ui.${e.name}`,...W$(t,n)})}function Oie(e){const t=e.name==="click";let n,r=null;try{r=t?j$(e.event):U$(e.event),n=ya(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function Rie(e){return e.type===ib.Element}function Iie(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Aie(t);n&&Ym(e,n)}function Aie(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:o}=e;if(!o||Pie(o)||!s)return null;const a=t||r||i,l=s.length===1;if(!a&&l)return null;const u=ya(o,{maxStringLength:200})||"<unknown>",c=W$(o,u);return ao({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}function Pie(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Mie={resource:Bie,paint:Lie,navigation:Fie};function $g(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Die(e){return e.map(Nie).filter(Boolean)}function Nie(e){const t=Mie[e.entryType];return t?t(e):null}function hf(e){return((Bi()||yn.performance.timeOrigin)+e)/1e3}function Lie(e){const{duration:t,entryType:n,name:r,startTime:i}=e,s=hf(i);return{type:n,name:r,start:s,end:s+t,data:void 0}}function Fie(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:p,type:m}=e;return i===0?null:{type:`${t}.${m}`,start:hf(h),end:hf(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:s,redirectCount:f}}}function Bie(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:hf(s),end:hf(i),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function zie(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return v0(e,"largest-contentful-paint",n)}function $ie(e){return e.sources!==void 0}function Hie(e){const t=[],n=[];for(const r of e.entries)if($ie(r)){const i=[];for(const s of r.sources)if(s.node){n.push(s.node);const o=da.mirror.getId(s.node);o&&i.push(o)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return v0(e,"cumulative-layout-shift",n,t)}function Vie(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return v0(e,"first-input-delay",n)}function jie(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return v0(e,"interaction-to-next-paint",n)}function v0(e,t,n,r){const i=e.value,s=e.rating,o=hf(i);return{type:"web-vital",name:t,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:n?n.map(a=>da.mirror.getId(a)):void 0,attributions:r}}}function Uie(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(uf(i,n))}),r.push(i$($g(zie,e)),IC($g(Hie,e)),s$($g(Vie,e)),o$($g(jie,e))),()=>{r.forEach(i=>i())}}const pt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Wie='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new 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,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort((function(t,n){return p[n.s]-p[t.s]||t.f-n.f}));s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function qie(){const e=new Blob([Wie]);return URL.createObjectURL(e)}const CM=["info","warn","error","log"],Qv="[Replay] ";function fS(e,t="info"){Nl({category:"console",data:{logger:"replay"},level:t,message:`${Qv}${e}`},{level:t})}function Gie(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return pt?(CM.forEach(r=>{n[r]=(...i)=>{qe[r](Qv,...i),t&&fS(i.join(""),V3(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),qe.error(Qv,r),e?c0(r):t&&fS(r,"error")},n.infoTick=(...r)=>{qe.info(Qv,...r),t&&setTimeout(()=>fS(r[0]),0)}):CM.forEach(r=>{n[r]=()=>{}}),n}const mt=Gie();class HC extends Error{constructor(){super(`Event buffer exceeded maximum size of ${DC}.`)}}class q${constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>DC)throw new HC;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?$C(t):null}}class Kie{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){pt&&mt.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,s)=>{const o=({data:a})=>{const l=a;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){pt&&mt.error("Error in compression worker: ",l.response),s(new Error("Error in compression worker"));return}i(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class Yie{constructor(t){this._worker=new Kie(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=$C(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>DC?Promise.reject(new HC):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{pt&&mt.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Xie{constructor(t){this._fallback=new q$,this._compression=new Yie(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){pt&&mt.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const s of t)i.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(s){pt&&mt.exception(s,"Failed to add events when switching buffers.")}}}function Jie({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Qie(t);if(n)return n}return pt&&mt.info("Using simple buffer"),new q$}function Qie(e){try{const t=e||Zie();if(!t)return;pt&&mt.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Xie(n)}catch(t){pt&&mt.exception(t,"Failed to create compression worker")}}function Zie(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?qie():""}function VC(){try{return"sessionStorage"in yn&&!!yn.sessionStorage}catch{return!1}}function ese(e){tse(),e.session=void 0}function tse(){if(VC())try{yn.sessionStorage.removeItem(PC)}catch{}}function G$(e){return e===void 0?!1:Math.random()<e}function K$(e){const t=Date.now(),n=e.id||Pi(),r=e.started||t,i=e.lastActivity||t,s=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:s,sampled:o,previousSessionId:a}}function jC(e){if(VC())try{yn.sessionStorage.setItem(PC,JSON.stringify(e))}catch{}}function nse(e,t){return G$(e)?"session":t?"buffer":!1}function OM({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=nse(e,t),s=K$({sampled:i,previousSessionId:r});return n&&jC(s),s}function rse(){if(!VC())return null;try{const e=yn.sessionStorage.getItem(PC);if(!e)return null;const t=JSON.parse(e);return pt&&mt.infoTick("Loading existing session"),K$(t)}catch{return null}}function SE(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Y$(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return SE(e.started,t,r)||SE(e.lastActivity,n,r)}function X$(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Y$(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function hS({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&rse();return i?X$(i,{sessionIdleExpire:e,maxReplayDuration:t})?(pt&&mt.infoTick("Session in sessionStorage is expired, creating new one..."),OM(r,{previousSessionId:i.id})):i:(pt&&mt.infoTick("Creating new session"),OM(r,{previousSessionId:n}))}function ise(e){return e.type===kt.Custom}function UC(e,t,n){return Q$(e,t)?(J$(e,t,n),!0):!1}function sse(e,t,n){return Q$(e,t)?J$(e,t,n):Promise.resolve(null)}async function J$(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),o=ose(t,s.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(s){const o=s&&s instanceof HC,a=o?"addEventSizeExceeded":"addEvent";if(o&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a});const l=Bt();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function Q$(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=$C(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(pt&&mt.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function ose(e,t){try{if(typeof t=="function"&&ise(e))return t(e)}catch(n){return pt&&mt.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function WC(e){return!e.type}function xE(e){return e.type==="transaction"}function ase(e){return e.type==="replay_event"}function RM(e){return e.type==="feedback"}function lse(e){return(t,n)=>{if(!e.isEnabled()||!WC(t)&&!xE(t))return;const r=n==null?void 0:n.statusCode;if(!(!r||r<200||r>=300)){if(xE(t)){use(e,t);return}cse(e,t)}}}function use(e,t){var r,i;const n=e.getContext();(i=(r=t.contexts)==null?void 0:r.trace)!=null&&i.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function cse(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||cf(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function dse(e){return t=>{!e.isEnabled()||!WC(t)||fse(e,t)}}function fse(e,t){var r,i,s;const n=(s=(i=(r=t.exception)==null?void 0:r.values)==null?void 0:i[0])==null?void 0:s.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const o=ao({category:"replay.hydrate-error",data:{url:Uf()}});Ym(e,o)}}function hse(e){const t=Bt();t&&t.on("beforeAddBreadcrumb",n=>pse(e,n))}function pse(e,t){if(!e.isEnabled()||!Z$(t))return;const n=mse(t);n&&Ym(e,n)}function mse(e){return!Z$(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?gse(e):ao(e)}function gse(e){var i;const t=(i=e.data)==null?void 0:i.arguments;if(!Array.isArray(t)||t.length===0)return ao(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Fg?(n=!0,`${s.slice(0,Fg)}…`):s;if(typeof s=="object")try{const o=vs(s,7);return JSON.stringify(o).length>Fg?(n=!0,`${JSON.stringify(o,null,2).slice(0,Fg)}…`):o}catch{}return s});return ao({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Z$(e){return!!e.category}function vse(e,t){var n;return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!((n=t.originalException)!=null&&n.__rrweb__)}function eH(){const e=Tn().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ar();if(t){const n=_a(t);delete n.replay_id}}function yse(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:kt.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function bse(e,t){return e.recordingMode!=="buffer"||t.message===MC||!t.exception||t.type?!1:G$(e.getOptions().errorSampleRate)}function wse(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:ase(t)?(delete t.breadcrumbs,t):!WC(t)&&!xE(t)&&!RM(t)?t:e.checkAndHandleExpiredSession()?RM(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),yse(e,t),t):vse(t,n)&&!e.getOptions()._experiments.captureExceptions?(pt&&mt.log("Ignoring error from rrweb internals",t),null):((bse(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(eH(),t),{id:"Replay"})}function y0(e,t){return t.map(({type:n,start:r,end:i,name:s,data:o})=>{const a=e.throttledAddEvent({type:kt.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function _se(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Sse(e){return t=>{if(!e.isEnabled())return;const n=_se(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(y0(e,[n]),!1)))}}function xse(e,t){return pt&&e.getOptions()._experiments.traceInternals?!1:EZ(t,Bt())}function tH(e,t){e.isEnabled()&&t!==null&&(xse(e,t.name)||e.addUpdate(()=>(y0(e,[t]),!0)))}function b0(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=p$(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function nH(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function sb(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function rH(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:Gn({method:s,statusCode:o,request:a,response:l})}}function sm(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function _l(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:s}=Ese(n);return r.body=i,s!=null&&s.length&&(r._meta={warnings:s}),r}function EE(e,t){return Object.entries(e).reduce((n,[r,i])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=i),n},{})}function Ese(e){if(!e||typeof e!="string")return{body:e};const t=e.length>cM,n=Tse(e);if(t){const r=e.slice(0,cM);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Tse(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ob(e,t){const n=kse(e);return wl(n,t)}function kse(e,t=yn.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(yn.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function Cse(e,t,n){try{const r=await Rse(e,t,n),i=rH("resource.fetch",r);tH(n.replay,i)}catch(r){pt&&mt.exception(r,"Failed to capture fetch breadcrumb")}}function Ose(e,t){const{input:n,response:r}=t,i=n?g$(n):void 0,s=b0(i),o=r?nH(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}async function Rse(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=ob(o,n.networkDetailAllowUrls)&&!ob(o,n.networkDetailDenyUrls),f=d?Ise(n,t.input,u):sm(u),h=await Ase(d,n,t.response,c);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:l,request:f,response:h}}function Ise({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?Dse(n,t):{};if(!e)return _l(i,r,void 0);const s=g$(n),[o,a]=m$(s,mt),l=_l(i,r,o);return a?sb(l,a):l}async function Ase(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return sm(i);const s=r?iH(r.headers,n):{};if(!r||!t&&i!==void 0)return _l(s,i,void 0);const[o,a]=await Mse(r),l=Pse(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return a?sb(l,a):l}function Pse(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const s=e!=null&&e.length&&n===void 0?b0(e):n;return r?t?_l(i,s,e):_l(i,s,void 0):sm(s)}catch(s){return pt&&mt.exception(s,"Failed to serialize response body"),_l(i,n,void 0)}}async function Mse(e){const t=Nse(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Lse(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(pt&&mt.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(pt&&mt.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function iH(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Dse(e,t){return e.length===1&&typeof e[0]!="string"?IM(e[0],t):e.length===2?IM(e[1],t):{}}function IM(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?iH(n,t):Array.isArray(n)?{}:EE(n,t):{}}function Nse(e){try{return e.clone()}catch(t){pt&&mt.exception(t,"Failed to clone response body")}}function Lse(e){return new Promise((t,n)=>{const r=cf(()=>n(new Error("Timeout while trying to read response body")),500);Fse(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function Fse(e){return await e.text()}async function Bse(e,t,n){try{const r=$se(e,t,n),i=rH("resource.xhr",r);tH(n.replay,i)}catch(r){pt&&mt.exception(r,"Failed to capture xhr breadcrumb")}}function zse(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=b0(r),s=n.getResponseHeader("content-length")?nH(n.getResponseHeader("content-length")):Use(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}function $se(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!ob(l,n.networkDetailAllowUrls)||ob(l,n.networkDetailDenyUrls)){const S=sm(d),I=sm(f);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:S,response:I}}const h=a[Du],p=h?EE(h.request_headers,n.networkRequestHeaders):{},m=EE(Hse(a),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?m$(o,mt):[void 0],[w,b]=n.networkCaptureBodies?Vse(a):[void 0],_=_l(p,d,g),x=_l(m,f,w);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:v?sb(_,v):_,response:b?sb(x,b):x}}function Hse(e){const t=e.getAllResponseHeaders();return t?t.split(`\r `).reduce((n,r)=>{const[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}function Vse(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return jse(e.response,e.responseType)}catch(n){t.push(n)}return pt&&mt.warn("Failed to get xhr response body",...t),[void 0]}function jse(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return pt&&mt.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return pt&&mt.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Use(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return b0(n)}catch{return}}function Wse(e){const t=Bt();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(l,u)=>qse(a,l,u))}catch{}}function qse(e,t,n){if(t.data)try{Gse(t)&&Yse(n)&&(zse(t,n),Bse(t,n,e)),Kse(t)&&Xse(n)&&(Ose(t,n),Cse(t,n,e))}catch(r){pt&&mt.exception(r,"Error when enriching network breadcrumb")}}function Gse(e){return e.category==="xhr"}function Kse(e){return e.category==="fetch"}function Yse(e){return e==null?void 0:e.xhr}function Xse(e){return e==null?void 0:e.response}function Jse(e,{autoFlushOnFeedback:t}){const n=Bt();d$(kie(e)),h0(Sse(e)),hse(e),Wse(e);const r=wse(e);tZ(r),n&&(n.on("beforeSendEvent",dse(e)),n.on("afterSendEvent",lse(e)),n.on("createDsc",i=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(i.replay_id=s)}),n.on("spanStart",i=>{e.lastActiveSpan=i}),n.on("spanEnd",i=>{e.lastActiveSpan=i}),n.on("beforeSendFeedback",async(i,s)=>{var a;const o=e.getSessionId();s!=null&&s.includeReplay&&e.isEnabled()&&o&&((a=i.contexts)!=null&&a.feedback)&&(i.contexts.feedback.source==="api"&&t&&await e.flush(),i.contexts.feedback.replay_id=o)}),t&&n.on("openFeedbackWidget",async()=>{await e.flush()}))}async function Qse(e){try{return Promise.all(y0(e,[Zse(yn.performance.memory)]))}catch{return[]}}function Zse(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function eoe(e,t,n){let r,i,s;const o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}function u(){return i!==void 0||s!==void 0?a():r}function c(){return i&&clearTimeout(i),i=cf(a,t),o&&s===void 0&&(s=cf(a,o)),r}return c.cancel=l,c.flush=u,c}const Hi=Ut.navigator;function toe(){return/iPhone|iPad|iPod/i.test((Hi==null?void 0:Hi.userAgent)??"")||/Macintosh/i.test((Hi==null?void 0:Hi.userAgent)??"")&&(Hi!=null&&Hi.maxTouchPoints)&&(Hi==null?void 0:Hi.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function noe(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){pt&&mt.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&_ie(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!UC(e,n,i))return!0;if(!i)return!1;const s=e.session;if(ioe(e,i),e.recordingMode==="buffer"&&s&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(pt&&mt.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),s.started=o,e.getOptions().stickySession&&jC(s))}return s!=null&&s.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function roe(e){const t=e.getOptions();return{type:kt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ioe(e,t){!t||!e.session||e.session.segmentId!==0||UC(e,roe(e),!1)}function soe(e,t,n,r){return qf(k3(e,TC(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function ooe({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function aoe({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:i};e.emit("preprocessEvent",r,s);const o=await A3(e.getOptions(),r,s,t,e,Io());if(!o)return null;e.emit("postprocessEvent",o,s),o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u}=(a==null?void 0:a.sdk)||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function loe({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:s}){const o=ooe({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=Bt(),f=Tn(),h=d==null?void 0:d.getTransport(),p=d==null?void 0:d.getDsn();if(!d||!h||!p||!s.sampled)return ba({});const m={type:Hne,replay_start_timestamp:c/1e3,timestamp:i/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await aoe({scope:f,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay"),pt&&mt.info("An event processor returned `null`, will not send event."),ba({});delete g.sdkProcessingMetadata;const v=soe(g,o,p,d.getOptions().tunnel);let w;try{w=await h.send(v)}catch(_){const x=new Error(MC);try{x.cause=_}catch{}throw x}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new sH(w.statusCode);const b=z3({},w);if(B3(b,"replay"))throw new qC(b);return w}class sH extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class qC extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function oH(e,t={count:0,interval:Gne}){const{recordingData:n,onError:r}=e;if(n.length)try{return await loe(e),!0}catch(i){if(i instanceof sH||i instanceof qC)throw i;if(ZQ("Replays",{_retryCount:t.count}),r&&r(i),t.count>=Kne){const s=new Error(`${MC} - max retries exceeded`);try{s.cause=i}catch{}throw s}return t.interval*=++t.count,new Promise((s,o)=>{cf(async()=>{try{await oH(e,t),s(!0)}catch(a){o(a)}},t.interval)})}}const aH="__THROTTLED",uoe="__SKIPPED";function coe(e,t,n){const r=new Map,i=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},s=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(i(l),s()>=t){const c=o;return o=!0,c?uoe:aH}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class doe{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Vne,sessionIdleExpire:jne},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=eoe(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=coe((o,a)=>sse(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),s=r?{threshold:Math.min(Yne,r),timeout:r,scrollTimeout:Xne,ignoreSelector:i?i.join(","):""}:void 0;if(s&&(this.clickDetector=new vie(this,s)),pt){const o=t._experiments;mt.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{yn.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=ao({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=ao({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{Iie(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){pt&&mt.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){pt&&mt.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",pt&&mt.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){pt&&mt.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){pt&&mt.info("Buffering is in progress, call `flush()` to save the replay");return}pt&&mt.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=hS({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){pt&&mt.info("Buffering is in progress, call `flush()` to save the replay");return}pt&&mt.infoTick("Starting replay in buffer mode");const t=hS({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=da({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:qne}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:noe(this),...toe(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1;try{pt&&mt.info(`Stopping Replay${n?` triggered by ${n}`:""}`),eH(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,ese(this)}catch(i){this.handleException(i)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),pt&&mt.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),pt&&mt.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();pt&&mt.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){var t;return(t=this.session)==null?void 0:t.id}checkAndHandleExpiredSession(){if(this._lastActivity&&SE(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${yn.location.pathname}${yn.location.hash}${yn.location.search}`,n=`${yn.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===aH){const i=ao({category:"replay.throttled"});this.addUpdate(()=>!UC(this,{type:cie,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ar(),n=t&&Vr(t),i=(n&&Yt(n).data||{})[Ii];if(!(!n||!i||!["route","custom"].includes(i)))return Yt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Jie({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=hS({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return X$(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{yn.document.addEventListener("visibilitychange",this._handleVisibilityChange),yn.addEventListener("blur",this._handleWindowBlur),yn.addEventListener("focus",this._handleWindowFocus),yn.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Jse(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Uie(this)}_removeListeners(){try{yn.document.removeEventListener("visibilitychange",this._handleVisibilityChange),yn.removeEventListener("blur",this._handleWindowBlur),yn.removeEventListener("focus",this._handleWindowFocus),yn.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||Y$(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){pt&&mt.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:kt.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Die(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(y0(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){pt&&mt.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await Qse(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const i=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await oH({replayId:t,recordingData:o,segmentId:s,eventContext:i,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const i=Bt();if(i){const s=r instanceof qC?"ratelimit_backoff":"send_error";i.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){pt&&mt.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const s=i<this._options.minReplayDuration,o=i>this._options.maxReplayDuration+5e3;if(s||o){pt&&mt.info(`Session duration (${Math.floor(i/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&pt&&mt.info("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&jC(this.session)}_onMutationHandler(t){const n=t.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){const o=ao({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function bh(e,t){return[...e,...t].join(",")}function foe({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const s=["base","iframe[srcdoc]:not([src])"],o=bh(e,[".sentry-mask","[data-sentry-mask]"]),a=bh(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:bh(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:bh(r,[]),ignoreSelector:bh(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function hoe({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?s:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s}const AM='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',poe=["content-length","content-type","accept"];let PM=!1;const moe=e=>new goe(e);class goe{constructor({flushMinDelay:t=Une,flushMaxDelay:n=Wne,minReplayDuration:r=Jne,maxReplayDuration:i=dM,stickySession:s=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:v=[],networkCaptureBodies:w=!0,networkRequestHeaders:b=[],networkResponseHeaders:_=[],mask:x=[],maskAttributes:S=["title","placeholder"],unmask:I=[],block:P=[],unblock:R=[],ignore:O=[],maskFn:M,beforeAddRecordingEvent:E,beforeErrorSampling:L,onError:j}={}){this.name="Replay";const F=foe({mask:x,unmask:I,block:P,unblock:R,ignore:O});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:M,maskInputFn:M,maskAttributeFn:(B,Y,Z)=>hoe({maskAttributes:S,maskAllText:u,privacyOptions:F,key:B,value:Y,el:Z}),...F,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:B=>{try{B.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Qne),maxReplayDuration:Math.min(i,dM),stickySession:s,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:v,networkCaptureBodies:w,networkRequestHeaders:MM(b),networkResponseHeaders:MM(_),beforeAddRecordingEvent:E,beforeErrorSampling:L,onError:j,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${AM}`:AM),this._isInitialized&&tM())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return PM}set _isInitialized(t){PM=t}afterAllSetup(t){!tM()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=voe(this._initialOptions,t);this._replay=new doe({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function voe(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Gn(e)},i=mc(n.replaysSessionSampleRate),s=mc(n.replaysOnErrorSampleRate);return i==null&&s==null&&Ia(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}function MM(e){return[...poe,...e.map(t=>t.toLowerCase())]}const DM=new WeakMap,pS=new Map,Zv={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function yoe(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:a}={traceFetch:Zv.traceFetch,traceXHR:Zv.traceXHR,trackFetchStreamPerformance:Zv.trackFetchStreamPerformance,...t},l=typeof s=="function"?s:d=>!0,u=d=>_oe(d,a),c={};n&&(e.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(f=>{if(f.op==="http.client"){const h=pS.get(f.span_id);h&&(f.timestamp=h/1e3,pS.delete(f.span_id))}}),d)),i&&dee(d=>{if(d.response){const f=DM.get(d.response);f&&d.endTimestamp&&pS.set(f,d.endTimestamp)}}),G3(d=>{const f=ree(d,l,u,c);if(d.response&&d.fetchData.__span&&DM.set(d.response,d.fetchData.__span),f){const h=lH(d.fetchData.url),p=h?Qu(h).host:void 0;f.setAttributes({"http.url":h,"server.address":p})}o&&f&&NM(f)})),r&&h$(d=>{const f=Soe(d,l,u,c);o&&f&&NM(f)})}function boe(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function NM(e){const{url:t}=Yt(e).data;if(!t||typeof t!="string")return;const n=uf("resource",({entries:r})=>{r.forEach(i=>{boe(i)&&i.name.endsWith(t)&&(woe(i).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function qs(e=0){return((Bi()||performance.timeOrigin)+e)/1e3}function woe(e){const{name:t,version:n}=c$(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Bi()?[...r,["http.request.redirect_start",qs(e.redirectStart)],["http.request.fetch_start",qs(e.fetchStart)],["http.request.domain_lookup_start",qs(e.domainLookupStart)],["http.request.domain_lookup_end",qs(e.domainLookupEnd)],["http.request.connect_start",qs(e.connectStart)],["http.request.secure_connection_start",qs(e.secureConnectionStart)],["http.request.connection_end",qs(e.connectEnd)],["http.request.request_start",qs(e.requestStart)],["http.request.response_start",qs(e.responseStart)],["http.request.response_end",qs(e.responseEnd)]]:r}function _oe(e,t){const n=Uf();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const s=r.origin===i;return t?wl(r.toString(),t)||s&&wl(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?wl(e,t):r}}function Soe(e,t,n,r){const i=e.xhr,s=i==null?void 0:i[Du];if(!i||i.__sentry_own_request__||!s)return;const o=wa()&&t(s.url);if(e.endTimestamp&&o){const f=i.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&s.status_code!==void 0&&(d3(h,s.status_code),h.end(),delete r[f]);return}const a=lH(s.url),l=a?Qu(a).host:void 0,u=!!Ar(),c=o&&u?vc({name:`${s.method} ${s.url}`,attributes:{type:"xhr","http.method":s.method,"http.url":a,url:s.url,"server.address":l,[An]:"auto.http.browser",[pc]:"http.client"}}):new gc;i.__sentry_xhr_span_id__=c.spanContext().spanId,r[i.__sentry_xhr_span_id__]=c,n(s.url)&&xoe(i,wa()&&u?c:void 0);const d=Bt();return d&&d.emit("beforeOutgoingRequestSpan",c,e),c}function xoe(e,t){const{"sentry-trace":n,baggage:r}=H3({span:t});n&&Eoe(e,n,r)}function Eoe(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function lH(e){try{return new URL(e,Xt.location.origin).href}catch{return}}function Toe(){Xt.document?Xt.document.addEventListener("visibilitychange",()=>{const e=Ar();if(!e)return;const t=Vr(e);if(Xt.document.hidden&&t){const n="cancelled",{op:r,status:i}=Yt(t);_o&&qe.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:ar,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):_o&&qe.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const koe="BrowserTracing",Coe={...Yv,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Zv},LM=(e={})=>{const t=Xt.document;eQ();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:l,finalTimeout:u,childSpanTimeout:c,markBackgroundSpan:d,traceFetch:f,traceXHR:h,trackFetchStreamPerformance:p,shouldCreateSpanForRequest:m,enableHTTPTimings:g,instrumentPageLoad:v,instrumentNavigation:w}={...Coe,...e},b=gte({recordClsStandaloneSpans:o||!1});n&&Hte(),i&&Ut.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?yte():r&&vte(),s&&bte();const _={name:void 0,source:void 0};function x(S,I){const P=I.op==="pageload",R=a?a(I):I,O=R.attributes||{};I.name!==R.name&&(O[Ii]="custom",R.attributes=O),_.name=R.name,_.source=O[Ii];const M=I3(R,{idleTimeout:l,finalTimeout:u,childSpanTimeout:c,disableAutoFinish:P,beforeSpanEnd:L=>{b(),Ete(L,{recordClsOnPageloadSpan:!o}),BM(S,void 0);const j=Tn(),F=j.getPropagationContext();j.setPropagationContext({...F,traceId:M.spanContext().traceId,sampled:Mc(M),dsc:_a(L)})}});BM(S,M);function E(){t&&["interactive","complete"].includes(t.readyState)&&S.emit("idleSpanEnableAutoFinish",M)}P&&t&&(t.addEventListener("readystatechange",()=>{E()}),E())}return{name:koe,afterAllSetup(S){let I=Uf();function P(){const R=w0(S);R&&!Yt(R).timestamp&&(_o&&qe.log(`[Tracing] Finishing current active span with op: ${Yt(R).op}`),R.end())}if(S.on("startNavigationSpan",R=>{Bt()===S&&(P(),Io().setPropagationContext({traceId:Dl(),sampleRand:Math.random()}),Tn().setPropagationContext({traceId:Dl(),sampleRand:Math.random()}),x(S,{op:"navigation",...R}))}),S.on("startPageLoadSpan",(R,O={})=>{if(Bt()!==S)return;P();const M=O.sentryTrace||FM("sentry-trace"),E=O.baggage||FM("baggage"),L=qJ(M,E);Tn().setPropagationContext(L),x(S,{op:"pageload",...R})}),Xt.location){if(v){const R=Bi();Ooe(S,{name:Xt.location.pathname,startTime:R?R/1e3:void 0,attributes:{[Ii]:"url",[An]:"auto.pageload.browser"}})}w&&h0(({to:R,from:O})=>{if(O===void 0&&(I==null?void 0:I.indexOf(R))!==-1){I=void 0;return}O!==R&&(I=void 0,uH(S,{name:Xt.location.pathname,attributes:{[Ii]:"url",[An]:"auto.navigation.browser"}}))})}d&&Toe(),s&&Roe(S,l,u,c,_),n&&jte(),yoe(S,{traceFetch:f,traceXHR:h,trackFetchStreamPerformance:p,tracePropagationTargets:S.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:g})}}};function Ooe(e,t,n){return e.emit("startPageLoadSpan",t,n),Tn().setTransactionName(t.name),w0(e)}function uH(e,t){return e.emit("startNavigationSpan",t),Tn().setTransactionName(t.name),w0(e)}function FM(e){const t=Xt.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function Roe(e,t,n,r,i){const s=Xt.document;let o;const a=()=>{const l="ui.action.click",u=w0(e);if(u){const c=Yt(u).op;if(["navigation","pageload"].includes(c)){_o&&qe.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(Q1,"interactionInterrupted"),o.end(),o=void 0),!i.name){_o&&qe.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=I3({name:i.name,op:l,attributes:{[Ii]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{once:!1,capture:!0})}const cH="_sentry_idleSpan";function w0(e){return e[cH]}function BM(e,t){Ni(e,cH,t)}const dH=["activate","mount"],fH=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ioe=/(?:^|[-_])(\w)/g,Aoe=e=>e.replace(Ioe,t=>t.toUpperCase()).replace(/[-_]/g,""),Poe="<Root>",mS="<Anonymous>",Moe=(e,t)=>e.repeat(t),fp=(e,t)=>{if(!e)return mS;if(e.$root===e)return Poe;if(!e.$options)return mS;const n=e.$options;let r=n.name||n._componentTag||n.__name;const i=n.__file;if(!r&&i){const s=i.match(/([^/\\]+)\.vue$/);s&&(r=s[1])}return(r?`<${Aoe(r)}>`:mS)+(i&&t!==!1?` at ${i}`:"")},Doe=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const i=t[t.length-1];if(i.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[i,n],n=0)}t.push(e),e=e.$parent}return` found in ${t.map((i,s)=>`${(s===0?"---> ":Moe(" ",5+s*2))+(Array.isArray(i)?`${fp(i[0])}... (${i[1]} recursive calls)`:fp(i))}`).join(` `)}`}return` (found in ${fp(e)})`},Noe=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,i,s)=>{var u;const o=fp(i,!1),a=i?Doe(i):"",l={componentName:o,lifecycleHook:s,trace:a};if(t.attachProps&&i&&((u=i.$options)!=null&&u.propsData?l.propsData=i.$options.propsData:i.$props&&(l.propsData=i.$props)),setTimeout(()=>{c0(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,i,s);else throw r}},zM="ui.vue",Loe={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Foe(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{var r;(r=e.$root)!=null&&r.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.end(t),e.$root.$_sentryRootSpan=void 0)},n)}function Boe(e,t){function n(i){return i.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(i=>n(t)===n(i))}const zoe=(e={})=>{const t=(e.hooks||[]).concat(dH).filter((r,i,s)=>s.indexOf(r)===i),n={};for(const r of t){const i=Loe[r];if(!i){fH&&qe.warn(`Unknown hook: ${r}`);continue}for(const s of i)n[s]=function(){var u;const o=this.$root===this;o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||vc({name:"Application Render",op:`${zM}.render`,attributes:{[An]:"auto.ui.vue"},onlyIfParent:!0}));const a=fp(this,!1),l=Array.isArray(e.trackComponents)?Boe(e.trackComponents,a):e.trackComponents;if(!(!o&&!l))if(this.$_sentrySpans=this.$_sentrySpans||{},s==i[0]){if(((u=this.$root)==null?void 0:u.$_sentryRootSpan)||Ar()){const d=this.$_sentrySpans[r];d&&d.end(),this.$_sentrySpans[r]=vc({name:`Vue ${a}`,op:`${zM}.${r}`,attributes:{[An]:"auto.ui.vue"},onlyIfParent:!0})}}else{const c=this.$_sentrySpans[r];if(!c)return;c.end(),Foe(this,Hr(),e.timeout||2e3)}}}return n},$oe=Ut,Hoe={Vue:$oe.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:dH,timeout:2e3,trackComponents:!1}},Voe="Vue",joe=(e={})=>({name:Voe,setup(t){const n={...Hoe,...t.getOptions(),...e};if(!n.Vue&&!n.app){Ia(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(i=>$M(i,n)):n.Vue&&$M(n.Vue,n)}}),$M=(e,t)=>{var n;fH&&((n=e._instance)==null?void 0:n.isMounted)===!0&&Ia(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&Noe(e,t),wa(t)&&e.mixin(zoe(t.tracingOptions))};function Uoe(e={}){const t={defaultIntegrations:[...b$(),joe()],...e};return $3(t,"vue"),$ne(t)}function Woe(e,t,n){let r=!0;e.onError(i=>c0(i,{mechanism:{handled:!1}})),e.beforeEach((i,s,o)=>{const a=s.name==null&&s.matched.length===0||s.name===void 0&&r;r&&(r=!1);const l={[An]:"auto.navigation.vue"};for(const d of Object.keys(i.params))l[`params.${d}`]=i.params[d];for(const d of Object.keys(i.query)){const f=i.query[d];f&&(l[`query.${d}`]=f)}let u=i.path,c="url";if(i.name&&t.routeLabel!=="path")u=i.name.toString(),c="custom";else if(i.matched.length>0){const d=i.matched.length-1;u=i.matched[d].path,c="route"}if(Tn().setTransactionName(u),t.instrumentPageLoad&&a){const d=qoe();d&&(Yt(d).data[Ii]!=="custom"&&(d.updateName(u),d.setAttribute(Ii,c)),d.setAttributes({...l,[An]:"auto.pageload.vue"}))}t.instrumentNavigation&&!a&&(l[Ii]=c,l[An]="auto.navigation.vue",n({name:u,op:"navigation",attributes:l})),o&&o()})}function qoe(){const e=Ar(),t=e&&Vr(e);if(!t)return;const n=Yt(t).op;return n==="navigation"||n==="pageload"?t:void 0}function Goe(e={}){if(!e.router)return LM(e);const t=LM({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:i=!0,routeLabel:s="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),Woe(n,{routeLabel:s,instrumentNavigation:r,instrumentPageLoad:i},l=>{uH(o,l)})}}}const Koe=1,Yoe=1e4,ta={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let gS=0;function Xoe(){return gS=(gS+1)%Number.MAX_VALUE,gS.toString()}const vS=new Map;function HM(e){if(vS.has(e))return;const t=setTimeout(()=>{vS.delete(e),hp({type:ta.REMOVE_TOAST,toastId:e})},Yoe);vS.set(e,t)}const hs=U({toasts:[]});function hp(e){switch(e.type){case ta.ADD_TOAST:hs.value.toasts=[e.toast,...hs.value.toasts].slice(0,Koe);break;case ta.UPDATE_TOAST:hs.value.toasts=hs.value.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t);break;case ta.DISMISS_TOAST:{const{toastId:t}=e;t?HM(t):hs.value.toasts.forEach(n=>{HM(n.id)}),hs.value.toasts=hs.value.toasts.map(n=>n.id===t||t===void 0?{...n,open:!1}:n);break}case ta.REMOVE_TOAST:e.toastId===void 0?hs.value.toasts=[]:hs.value.toasts=hs.value.toasts.filter(t=>t.id!==e.toastId);break}}function $s(){return{toasts:te(()=>hs.value.toasts),toast:Joe,dismiss:e=>hp({type:ta.DISMISS_TOAST,toastId:e})}}function Joe(e){const t=Xoe(),n=i=>hp({type:ta.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>hp({type:ta.DISMISS_TOAST,toastId:t});return hp({type:ta.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}const Qoe=["top","right","bottom","left"],Ll=Math.min,Oi=Math.max,ab=Math.round,Hg=Math.floor,po=e=>({x:e,y:e}),Zoe={left:"right",right:"left",bottom:"top",top:"bottom"},eae={start:"end",end:"start"};function TE(e,t,n){return Oi(e,Ll(t,n))}function xa(e,t){return typeof e=="function"?e(t):e}function Ea(e){return e.split("-")[0]}function Jf(e){return e.split("-")[1]}function GC(e){return e==="x"?"y":"x"}function KC(e){return e==="y"?"height":"width"}function Fl(e){return["top","bottom"].includes(Ea(e))?"y":"x"}function YC(e){return GC(Fl(e))}function tae(e,t,n){n===void 0&&(n=!1);const r=Jf(e),i=YC(e),s=KC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=lb(o)),[o,lb(o)]}function nae(e){const t=lb(e);return[kE(e),t,kE(t)]}function kE(e){return e.replace(/start|end/g,t=>eae[t])}function rae(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function iae(e,t,n,r){const i=Jf(e);let s=rae(Ea(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(kE)))),s}function lb(e){return e.replace(/left|right|bottom|top/g,t=>Zoe[t])}function sae(e){return{top:0,right:0,bottom:0,left:0,...e}}function hH(e){return typeof e!="number"?sae(e):{top:e,right:e,bottom:e,left:e}}function ub(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function VM(e,t,n){let{reference:r,floating:i}=e;const s=Fl(t),o=YC(t),a=KC(o),l=Ea(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Jf(t)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}const oae=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=VM(u,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:w,y:b,data:_,reset:x}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=w??c,d=b??d,h={...h,[g]:{...h[g],..._}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=VM(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function om(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xa(t,e),p=hH(h),g=a[f?d==="floating"?"reference":"floating":d],v=ub(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),_=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},x=ub(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(v.top-x.top+p.top)/_.y,bottom:(x.bottom-v.bottom+p.bottom)/_.y,left:(v.left-x.left+p.left)/_.x,right:(x.right-v.right+p.right)/_.x}}const aae=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=xa(e,t)||{};if(u==null)return{};const d=hH(c),f={x:n,y:r},h=YC(i),p=KC(h),m=await o.getDimensions(u),g=h==="y",v=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",_=s.reference[p]+s.reference[h]-f[h]-s.floating[p],x=f[h]-s.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let I=S?S[b]:0;(!I||!await(o.isElement==null?void 0:o.isElement(S)))&&(I=a.floating[b]||s.floating[p]);const P=_/2-x/2,R=I/2-m[p]/2-1,O=Ll(d[v],R),M=Ll(d[w],R),E=O,L=I-m[p]-M,j=I/2-m[p]/2+P,F=TE(E,j,L),B=!l.arrow&&Jf(i)!=null&&j!==F&&s.reference[p]/2-(j<E?O:M)-m[p]/2<0,Y=B?j<E?j-E:j-L:0;return{[h]:f[h]+Y,data:{[h]:F,centerOffset:j-F-Y,...B&&{alignmentOffset:Y}},reset:B}}}),lae=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=xa(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Ea(i),w=Fl(a),b=Ea(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(b||!m?[lb(a)]:nae(a)),S=p!=="none";!f&&S&&x.push(...iae(a,m,p,_));const I=[a,...x],P=await om(t,g),R=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&R.push(P[v]),d){const j=tae(i,o,_);R.push(P[j[0]],P[j[1]])}if(O=[...O,{placement:i,overflows:R}],!R.every(j=>j<=0)){var M,E;const j=(((M=s.flip)==null?void 0:M.index)||0)+1,F=I[j];if(F)return{data:{index:j,overflows:O},reset:{placement:F}};let B=(E=O.filter(Y=>Y.overflows[0]<=0).sort((Y,Z)=>Y.overflows[1]-Z.overflows[1])[0])==null?void 0:E.placement;if(!B)switch(h){case"bestFit":{var L;const Y=(L=O.filter(Z=>{if(S){const ne=Fl(Z.placement);return ne===w||ne==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ne=>ne>0).reduce((ne,oe)=>ne+oe,0)]).sort((Z,ne)=>Z[1]-ne[1])[0])==null?void 0:L[0];Y&&(B=Y);break}case"initialPlacement":B=a;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function jM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UM(e){return Qoe.some(t=>e[t]>=0)}const uae=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xa(e,t);switch(r){case"referenceHidden":{const s=await om(t,{...i,elementContext:"reference"}),o=jM(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:UM(o)}}}case"escaped":{const s=await om(t,{...i,altBoundary:!0}),o=jM(s,n.floating);return{data:{escapedOffsets:o,escaped:UM(o)}}}default:return{}}}}};async function cae(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ea(n),a=Jf(n),l=Fl(n)==="y",u=["left","top"].includes(o)?-1:1,c=s&&l?-1:1,d=xa(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const dae=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await cae(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},fae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:v,y:w}=g;return{x:v,y:w}}},...l}=xa(e,t),u={x:n,y:r},c=await om(t,l),d=Fl(Ea(i)),f=GC(d);let h=u[f],p=u[d];if(s){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+c[g],b=h-c[v];h=TE(w,h,b)}if(o){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+c[g],b=p-c[v];p=TE(w,p,b)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:s,[d]:o}}}}}},hae=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=xa(e,t),c={x:n,y:r},d=Fl(i),f=GC(d);let h=c[f],p=c[d];const m=xa(a,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=f==="y"?"height":"width",_=s.reference[f]-s.floating[b]+g.mainAxis,x=s.reference[f]+s.reference[b]-g.mainAxis;h<_?h=_:h>x&&(h=x)}if(u){var v,w;const b=f==="y"?"width":"height",_=["top","left"].includes(Ea(i)),x=s.reference[d]-s.floating[b]+(_&&((v=o.offset)==null?void 0:v[d])||0)+(_?0:g.crossAxis),S=s.reference[d]+s.reference[b]+(_?0:((w=o.offset)==null?void 0:w[d])||0)-(_?g.crossAxis:0);p<x?p=x:p>S&&(p=S)}return{[f]:h,[d]:p}}}},pae=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=xa(e,t),c=await om(t,u),d=Ea(i),f=Jf(i),h=Fl(i)==="y",{width:p,height:m}=s.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");const w=m-c.top-c.bottom,b=p-c.left-c.right,_=Ll(m-c[g],w),x=Ll(p-c[v],b),S=!t.middlewareData.shift;let I=_,P=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=w),S&&!f){const O=Oi(c.left,0),M=Oi(c.right,0),E=Oi(c.top,0),L=Oi(c.bottom,0);h?P=p-2*(O!==0||M!==0?O+M:Oi(c.left,c.right)):I=m-2*(E!==0||L!==0?E+L:Oi(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:I});const R=await o.getDimensions(a.floating);return p!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function _0(){return typeof window<"u"}function Nc(e){return XC(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ao(e){var t;return(t=(XC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XC(e){return _0()?e instanceof Node||e instanceof Mi(e).Node:!1}function Ms(e){return _0()?e instanceof Element||e instanceof Mi(e).Element:!1}function So(e){return _0()?e instanceof HTMLElement||e instanceof Mi(e).HTMLElement:!1}function WM(e){return!_0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot}function Xm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ds(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function mae(e){return["table","td","th"].includes(Nc(e))}function S0(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function JC(e){const t=QC(),n=Ms(e)?Ds(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function gae(e){let t=Bl(e);for(;So(t)&&!pf(t);){if(JC(t))return t;if(S0(t))return null;t=Bl(t)}return null}function QC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pf(e){return["html","body","#document"].includes(Nc(e))}function Ds(e){return Mi(e).getComputedStyle(e)}function x0(e){return Ms(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bl(e){if(Nc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WM(e)&&e.host||Ao(e);return WM(t)?t.host:t}function pH(e){const t=Bl(e);return pf(t)?e.ownerDocument?e.ownerDocument.body:e.body:So(t)&&Xm(t)?t:pH(t)}function am(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=pH(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Mi(i);if(s){const a=CE(o);return t.concat(o,o.visualViewport||[],Xm(i)?i:[],a&&n?am(a):[])}return t.concat(i,am(i,[],n))}function CE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mH(e){const t=Ds(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=So(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=ab(n)!==s||ab(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function ZC(e){return Ms(e)?e:e.contextElement}function Hd(e){const t=ZC(e);if(!So(t))return po(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=mH(t);let o=(s?ab(n.width):n.width)/r,a=(s?ab(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const vae=po(0);function gH(e){const t=Mi(e);return!QC()||!t.visualViewport?vae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mi(e)?!1:t}function yc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=ZC(e);let o=po(1);t&&(r?Ms(r)&&(o=Hd(r)):o=Hd(e));const a=yae(s,n,r)?gH(s):po(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=Mi(s),h=r&&Ms(r)?Mi(r):r;let p=f,m=CE(p);for(;m&&r&&h!==p;){const g=Hd(m),v=m.getBoundingClientRect(),w=Ds(m),b=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,_=v.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,d*=g.y,l+=b,u+=_,p=Mi(m),m=CE(p)}}return ub({width:c,height:d,x:l,y:u})}function eO(e,t){const n=x0(e).scrollLeft;return t?t.left+n:yc(Ao(e)).left+n}function vH(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:eO(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function bae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Ao(r),a=t?S0(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=po(1);const c=po(0),d=So(r);if((d||!d&&!s)&&((Nc(r)!=="body"||Xm(o))&&(l=x0(r)),So(r))){const h=yc(r);u=Hd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=o&&!d&&!s?vH(o,l,!0):po(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function wae(e){return Array.from(e.getClientRects())}function _ae(e){const t=Ao(e),n=x0(e),r=e.ownerDocument.body,i=Oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+eO(e);const a=-n.scrollTop;return Ds(r).direction==="rtl"&&(o+=Oi(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function Sae(e,t){const n=Mi(e),r=Ao(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=QC();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function xae(e,t){const n=yc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=So(e)?Hd(e):po(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function qM(e,t,n){let r;if(t==="viewport")r=Sae(e,n);else if(t==="document")r=_ae(Ao(e));else if(Ms(t))r=xae(t,n);else{const i=gH(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ub(r)}function yH(e,t){const n=Bl(e);return n===t||!Ms(n)||pf(n)?!1:Ds(n).position==="fixed"||yH(n,t)}function Eae(e,t){const n=t.get(e);if(n)return n;let r=am(e,[],!1).filter(a=>Ms(a)&&Nc(a)!=="body"),i=null;const s=Ds(e).position==="fixed";let o=s?Bl(e):e;for(;Ms(o)&&!pf(o);){const a=Ds(o),l=JC(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Xm(o)&&!l&&yH(e,o))?r=r.filter(c=>c!==o):i=a,o=Bl(o)}return t.set(e,r),r}function Tae(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?S0(t)?[]:Eae(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=qM(t,c,i);return u.top=Oi(d.top,u.top),u.right=Ll(d.right,u.right),u.bottom=Ll(d.bottom,u.bottom),u.left=Oi(d.left,u.left),u},qM(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kae(e){const{width:t,height:n}=mH(e);return{width:t,height:n}}function Cae(e,t,n){const r=So(t),i=Ao(t),s=n==="fixed",o=yc(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=po(0);if(r||!r&&!s)if((Nc(t)!=="body"||Xm(i))&&(a=x0(t)),r){const f=yc(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=eO(i));const u=i&&!r&&!s?vH(i,a):po(0),c=o.left+a.scrollLeft-l.x-u.x,d=o.top+a.scrollTop-l.y-u.y;return{x:c,y:d,width:o.width,height:o.height}}function yS(e){return Ds(e).position==="static"}function GM(e,t){if(!So(e)||Ds(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ao(e)===n&&(n=n.ownerDocument.body),n}function bH(e,t){const n=Mi(e);if(S0(e))return n;if(!So(e)){let i=Bl(e);for(;i&&!pf(i);){if(Ms(i)&&!yS(i))return i;i=Bl(i)}return n}let r=GM(e,t);for(;r&&mae(r)&&yS(r);)r=GM(r,t);return r&&pf(r)&&yS(r)&&!JC(r)?n:r||gae(e)||n}const Oae=async function(e){const t=this.getOffsetParent||bH,n=this.getDimensions,r=await n(e.floating);return{reference:Cae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rae(e){return Ds(e).direction==="rtl"}const Iae={convertOffsetParentRelativeRectToViewportRelativeRect:bae,getDocumentElement:Ao,getClippingRect:Tae,getOffsetParent:bH,getElementRects:Oae,getClientRects:wae,getDimensions:kae,getScale:Hd,isElement:Ms,isRTL:Rae};function wH(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Aae(e,t){let n=null,r;const i=Ao(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const p=Hg(d),m=Hg(i.clientWidth-(c+f)),g=Hg(i.clientHeight-(d+h)),v=Hg(c),b={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:Oi(0,Ll(1,l))||1};let _=!0;function x(S){const I=S[0].intersectionRatio;if(I!==l){if(!_)return o();I?o(!1,I):r=setTimeout(()=>{o(!1,1e-7)},1e3)}I===1&&!wH(u,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(e)}return o(!0),s}function Pae(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ZC(e),c=i||s?[...u?am(u):[],...am(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?Aae(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?yc(e):null;l&&g();function g(){const v=yc(e);m&&!wH(m,v)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;c.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Mae=dae,Dae=fae,KM=lae,Nae=pae,Lae=uae,Fae=aae,Bae=hae,zae=(e,t,n)=>{const r=new Map,i={platform:Iae,...n},s={...i.platform,_c:r};return oae(e,t,{...i,platform:s})};function $ae(e){return e!=null&&typeof e=="object"&&"$el"in e}function OE(e){if($ae(e)){const t=e.$el;return XC(t)&&Nc(t)==="#comment"?null:t}return e}function sd(e){return typeof e=="function"?e():y(e)}function Hae(e){return{name:"arrow",options:e,fn(t){const n=OE(sd(e.element));return n==null?{}:Fae({element:n,padding:e.padding}).fn(t)}}}function _H(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YM(e,t){const n=_H(e);return Math.round(t*n)/n}function Vae(e,t,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=te(()=>{var I;return(I=sd(n.open))!=null?I:!0}),s=te(()=>sd(n.middleware)),o=te(()=>{var I;return(I=sd(n.placement))!=null?I:"bottom"}),a=te(()=>{var I;return(I=sd(n.strategy))!=null?I:"absolute"}),l=te(()=>{var I;return(I=sd(n.transform))!=null?I:!0}),u=te(()=>OE(e.value)),c=te(()=>OE(t.value)),d=U(0),f=U(0),h=U(a.value),p=U(o.value),m=ho({}),g=U(!1),v=te(()=>{const I={position:h.value,left:"0",top:"0"};if(!c.value)return I;const P=YM(c.value,d.value),R=YM(c.value,f.value);return l.value?{...I,transform:"translate("+P+"px, "+R+"px)",..._H(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:P+"px",top:R+"px"}});let w;function b(){if(u.value==null||c.value==null)return;const I=i.value;zae(u.value,c.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(P=>{d.value=P.x,f.value=P.y,h.value=P.strategy,p.value=P.placement,m.value=P.middlewareData,g.value=I!==!1})}function _(){typeof w=="function"&&(w(),w=void 0)}function x(){if(_(),r===void 0){b();return}if(u.value!=null&&c.value!=null){w=r(u.value,c.value,b);return}}function S(){i.value||(g.value=!1)}return He([s,o,a,i],b,{flush:"sync"}),He([u,c],x,{flush:"sync"}),He(i,S,{flush:"sync"}),Yl()&&Xl(_),{x:Hc(d),y:Hc(f),strategy:Hc(h),placement:Hc(p),middlewareData:Hc(m),isPositioned:Hc(g),floatingStyles:v,update:b}}function rn(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,r=Symbol(n);return[i=>{const s=Lt(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Yn(r,i),i)]}function SH(e,t,n){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function cb(e,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(t,e))}function ey(e){return e==null}function jae(e,t){var n;const r=ho();return Mt(()=>{r.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Lf(r)}function Qf(e){return Yl()?(Xl(e),!0):!1}function Uae(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const r=()=>t(n);return Qf(r),{off:r}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(r=>r(...n)))}}function Wae(e){let t=!1,n;const r=Pm(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function xH(e){let t=0,n,r;const i=()=>{t-=1,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(t+=1,n||(r=Pm(!0),n=r.run(()=>e(...s))),Qf(i),n)}function Sl(e){return typeof e=="function"?e():y(e)}const Po=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qae=e=>typeof e<"u",Gae=Object.prototype.toString,Kae=e=>Gae.call(e)==="[object Object]",EH=()=>{},XM=Yae();function Yae(){var e,t;return Po&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Xae(e){return Jn()}function TH(e,t=1e4){return Dk((n,r)=>{let i=Sl(e),s;const o=()=>setTimeout(()=>{i=Sl(e),r()},Sl(t));return Qf(()=>{clearTimeout(s)}),{get(){return n(),i},set(a){i=a,r(),clearTimeout(s),s=o()}}})}function Jae(e,t){Xae()&&yr(e,t)}function tO(e,t,n={}){const{immediate:r=!0}=n,i=U(!1);let s=null;function o(){s&&(clearTimeout(s),s=null)}function a(){i.value=!1,o()}function l(...u){o(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,e(...u)},Sl(t))}return r&&(i.value=!0,Po&&l()),Qf(a),{isPending:Lf(i),start:l,stop:a}}function Qae(e=1e3,t={}){const{controls:n=!1,callback:r}=t,i=tO(r??EH,e,t),s=te(()=>!i.isPending.value);return n?{ready:s,...i}:s}function Ns(e){var t;const n=Sl(e);return(t=n==null?void 0:n.$el)!=null?t:n}const E0=Po?window:void 0;function zl(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=E0):[t,n,r,i]=e,!t)return EH;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],o=()=>{s.forEach(c=>c()),s.length=0},a=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=He(()=>[Ns(t),Sl(i)],([c,d])=>{if(o(),!c)return;const f=Kae(d)?{...d}:d;s.push(...n.flatMap(h=>r.map(p=>a(c,h,p,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return Qf(u),u}function Zae(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nO(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=E0,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=r,l=Zae(t);return zl(i,s,u=>{u.repeat&&Sl(a)||l(u)&&n(u)},o)}function kH(){const e=U(!1),t=Jn();return t&&nt(()=>{e.value=!0},t),e}function CH(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:i=E0}=t,s=U(!1),o=r?1e3/r:null;let a=0,l=null;function u(f){if(!s.value||!i)return;a||(a=f);const h=f-a;if(o&&h<o){l=i.requestAnimationFrame(u);return}a=f,e({delta:h,timestamp:f}),l=i.requestAnimationFrame(u)}function c(){!s.value&&i&&(s.value=!0,a=0,l=i.requestAnimationFrame(u))}function d(){s.value=!1,l!=null&&i&&(i.cancelAnimationFrame(l),l=null)}return n&&c(),Qf(d),{isActive:Lf(s),pause:d,resume:c}}function ele(e){return JSON.parse(JSON.stringify(e))}function ri(e,t,n,r={}){var i,s,o;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:f}=r,h=Jn(),p=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((o=(s=h==null?void 0:h.proxy)==null?void 0:s.$emit)==null?void 0:o.bind(h==null?void 0:h.proxy));let m=u;t||(t="modelValue"),m=m||`update:${t.toString()}`;const g=b=>a?typeof a=="function"?a(b):ele(b):b,v=()=>qae(e[t])?g(e[t]):d,w=b=>{f?f(b)&&p(m,b):p(m,b)};if(l){const b=v(),_=U(b);let x=!1;return He(()=>e[t],S=>{x||(x=!0,_.value=g(S),vt(()=>x=!1))}),He(_,S=>{!x&&(S!==e[t]||c)&&w(S)},{deep:c}),_}else return te({get(){return v()},set(b){w(b)}})}function T0(e){return e?e.flatMap(t=>t.type===je?T0(t.children):[t]):[]}function ir(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const tle=["INPUT","TEXTAREA"];function nle(e,t,n,r={}){if(!t||r.enableIgnoredElement&&tle.includes(t.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:o=[],loop:a=!0,dir:l="ltr",preventScroll:u=!0,focus:c=!1}=r,[d,f,h,p,m,g]=[e.key==="ArrowRight",e.key==="ArrowLeft",e.key==="ArrowUp",e.key==="ArrowDown",e.key==="Home",e.key==="End"],v=h||p,w=d||f;if(!m&&!g&&(!v&&!w||i==="vertical"&&w||i==="horizontal"&&v))return null;const b=n?Array.from(n.querySelectorAll(s)):o;if(!b.length)return null;u&&e.preventDefault();let _=null;return w||v?_=OH(b,t,{goForward:v?p:l==="ltr"?d:f,loop:a}):m?_=b.at(0)||null:g&&(_=b.at(-1)||null),c&&(_==null||_.focus()),_}function OH(e,t,n,r=e.length){if(--r===0)return null;const i=e.indexOf(t),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=e.length))return null;const o=(s+e.length)%e.length,a=e[o];return a?a.hasAttribute("disabled")&&a.getAttribute("disabled")!=="false"?OH(e,a,n,r):a:null}function bS(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function RE(e,t,n=".",r){if(!bS(t))return RE(e,{},n);const i=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const o=e[s];o!=null&&(Array.isArray(o)&&Array.isArray(i[s])?i[s]=[...o,...i[s]]:bS(o)&&bS(i[s])?i[s]=RE(o,i[s],(n?`${n}.`:"")+s.toString()):i[s]=o)}return i}function rle(e){return(...t)=>t.reduce((n,r)=>RE(n,r,""),{})}const ile=rle(),[k0,a5e]=rn("ConfigProvider");let sle="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ole=(e=21)=>{let t="",n=e;for(;n--;)t+=sle[Math.random()*64|0];return t};const ale=xH(()=>{const e=U(new Map),t=U(),n=te(()=>{for(const o of e.value.values())if(o)return!0;return!1}),r=k0({scrollBody:U(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",XM&&(i==null||i()),t.value=void 0};return He(n,(o,a)=>{var l;if(!Po)return;if(!o){a&&s();return}t.value===void 0&&(t.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,c={padding:u,margin:0},d=(l=r.scrollBody)!=null&&l.value?typeof r.scrollBody.value=="object"?ile({padding:r.scrollBody.value.padding===!0?u:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?u:r.scrollBody.value.margin},c):c:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=typeof d.padding=="number"?`${d.padding}px`:String(d.padding),document.body.style.marginRight=typeof d.margin=="number"?`${d.margin}px`:String(d.margin),document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),XM&&(i=zl(document,"touchmove",f=>lle(f),{passive:!1})),vt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function rO(e){const t=ole(6),n=ale();n.value.set(t,e??!1);const r=te({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return Jae(()=>{n.value.delete(t)}),r}function RH(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:RH(n)}}function lle(e){const t=e||window.event,n=t.target;return n instanceof Element&&RH(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const ule="data-radix-vue-collection-item";function Zf(e,t=ule){const n=Symbol();return{createCollection:r=>{const i=U([]);function s(){const o=Ns(r);return o?i.value=Array.from(o.querySelectorAll(`[${t}]:not([data-disabled])`)):i.value=[]}return MB(()=>{i.value=[]}),nt(s),DB(s),He(()=>r==null?void 0:r.value,s,{immediate:!0}),Yn(n,i),i},injectCollection:()=>Lt(n,U([]))}}function nu(e){const t=k0({dir:U("ltr")});return te(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}function Lc(e){const t=Jn(),n=t==null?void 0:t.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{r[Xh(xi(i))]=(...s)=>e(i,...s)}),r}let wS=0;function IH(){Mt(e=>{if(!Po)return;const t=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??JM()),document.body.insertAdjacentElement("beforeend",t[1]??JM()),wS++,e(()=>{wS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),wS--})})}function JM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Jm(e){return te(()=>{var t;return Sl(e)?!!((t=Ns(e))!=null&&t.closest("form")):!0})}function ai(e){const t=Jn(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,s)=>{const o=(t==null?void 0:t.type.props[s]).default;return o!==void 0&&(i[s]=o),i},{}),r=hB(e);return te(()=>{const i={},s=(t==null?void 0:t.vnode.props)??{};return Object.keys(s).forEach(o=>{i[xi(o)]=s[o]}),Object.keys({...n,...i}).reduce((o,a)=>(r.value[a]!==void 0&&(o[a]=r.value[a]),o),{})})}function hn(e,t){const n=ai(e),r=t?Lc(t):{};return te(()=>({...n.value,...r}))}function Ge(){const e=Jn(),t=U(),n=te(()=>{var o,a;return["#text","#comment"].includes((o=t.value)==null?void 0:o.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:Ns(t)}),r=Object.assign({},e.exposed),i={};for(const o in e.props)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>e.props[o]});if(Object.keys(r).length>0)for(const o in r)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>r[o]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function s(o){t.value=o,o&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),e.exposed=i)}return{forwardRef:s,currentRef:t,currentElement:n}}function cle(e,t){const n=TH(!1,300),r=U(null),i=Uae();function s(){r.value=null,n.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=dle(c,u.getBoundingClientRect()),f=fle(c,d),h=hle(l.getBoundingClientRect()),p=mle([...f,...h]);r.value=p,n.value=!0}return Mt(a=>{if(e.value&&t.value){const l=c=>o(c,t.value),u=c=>o(c,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",u),a(()=>{var c,d;(c=e.value)==null||c.removeEventListener("pointerleave",l),(d=t.value)==null||d.removeEventListener("pointerleave",u)})}}),Mt(a=>{var l;if(r.value){const u=c=>{var d,f;if(!r.value)return;const h=c.target,p={x:c.clientX,y:c.clientY},m=((d=e.value)==null?void 0:d.contains(h))||((f=t.value)==null?void 0:f.contains(h)),g=!ple(p,r.value),v=!!h.closest("[data-grace-area-trigger]");m?s():(g||v)&&(s(),i.trigger())};(l=e.value)==null||l.ownerDocument.addEventListener("pointermove",u),a(()=>{var c;return(c=e.value)==null?void 0:c.ownerDocument.removeEventListener("pointermove",u)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function dle(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fle(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 hle(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ple(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,l=t[s].y,u=t[o].x,c=t[o].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(i=!i)}return i}function mle(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),gle(t)}function gle(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}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 vle=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uc=new WeakMap,Vg=new WeakMap,jg={},_S=0,AH=function(e){return e&&(e.host||AH(e.parentNode))},yle=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AH(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ble=function(e,t,n,r){var i=yle(t,Array.isArray(e)?e:[e]);jg[n]||(jg[n]=new WeakMap);var s=jg[n],o=[],a=new Set,l=new Set(i),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(Uc.get(f)||0)+1,g=(s.get(f)||0)+1;Uc.set(f,m),s.set(f,g),o.push(f),m===1&&p&&Vg.set(f,!0),g===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),a.clear(),_S++,function(){o.forEach(function(d){var f=Uc.get(d)-1,h=s.get(d)-1;Uc.set(d,f),s.set(d,h),f||(Vg.has(d)||d.removeAttribute(r),Vg.delete(d)),h||d.removeAttribute(n)}),_S--,_S||(Uc=new WeakMap,Uc=new WeakMap,Vg=new WeakMap,jg={})}},wle=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=vle(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ble(r,i,n,"aria-hidden")):function(){return null}};function iO(e){let t;He(()=>Ns(e),n=>{n?t=wle(n):t&&t()}),On(()=>{t&&t()})}function xo(e,t="radix"){return k0({useId:void 0}),`${t}-${RB()}`}function PH(e){const t=U(),n=te(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),r=te(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return nt(()=>{const i=Ns(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=i.offsetWidth,u=i.offsetHeight;t.value={width:l,height:u}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else t.value=void 0}),{width:n,height:r}}function _le(e,t){const n=U(e);function r(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const Sle="data-item-text";function sO(e){const t=TH("",1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(!(e!=null&&e.value)&&!r)return;t.value=t.value+n;const i=(e==null?void 0:e.value)??r,s=ir(),o=i.map(d=>{var f;return{ref:d,textValue:((f=(d.querySelector(`[${Sle}]`)??d).textContent)==null?void 0:f.trim())??""}}),a=o.find(d=>d.ref===s),l=o.map(d=>d.textValue),u=Ele(l,t.value,a==null?void 0:a.textValue),c=o.find(d=>d.textValue===u);return c&&c.ref.focus(),c==null?void 0:c.ref},resetTypeahead:()=>{t.value=""}}}function xle(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ele(e,t,n){const r=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=xle(e,Math.max(i,0));r.length===1&&(s=s.filter(a=>a!==n));const o=s.find(a=>a.toLowerCase().startsWith(r.toLowerCase()));return o!==n?o:void 0}const oO=ee({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=T0(n.default()),o=s.findIndex(c=>c.type!==er);if(o===-1)return s;const a=s[o];(r=a.props)==null||delete r.ref;const l=a.props?Fe(t,a.props):t;t.class&&(i=a.props)!=null&&i.class&&delete a.props.class;const u=yo(a,l);for(const c in l)c.startsWith("on")&&(u.props||(u.props={}),u.props[c]=l[c]);return s.length===1?u:(s[o]=u,s)}}}),at=ee({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const r=e.asChild?"template":e.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>We(r,t):r!=="template"?()=>We(e.as,t,{default:n.default}):()=>We(oO,t,{default:n.default})}});function MH(){const e=U(),t=te(()=>{var n,r;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(r=e.value)==null?void 0:r.$el.nextElementSibling:Ns(e)});return{primitiveElement:e,currentElement:t}}function Tle(e,t){var n;const r=U({}),i=U("none"),s=U(e),o=e.value?"mounted":"unmounted";let a;const l=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??E0,{state:u,dispatch:c}=_le(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),d=g=>{var v;if(Po){const w=new CustomEvent(g,{bubbles:!1,cancelable:!1});(v=t.value)==null||v.dispatchEvent(w)}};He(e,async(g,v)=>{var w;const b=v!==g;if(await vt(),b){const _=i.value,x=Ug(t.value);g?(c("MOUNT"),d("enter"),x==="none"&&d("after-enter")):x==="none"||((w=r.value)==null?void 0:w.display)==="none"?(c("UNMOUNT"),d("leave"),d("after-leave")):v&&_!==x?(c("ANIMATION_OUT"),d("leave")):(c("UNMOUNT"),d("after-leave"))}},{immediate:!0});const f=g=>{const v=Ug(t.value),w=v.includes(g.animationName),b=u.value==="mounted"?"enter":"leave";if(g.target===t.value&&w&&(d(`after-${b}`),c("ANIMATION_END"),!s.value)){const _=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",a=l==null?void 0:l.setTimeout(()=>{var x;((x=t.value)==null?void 0:x.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=_)})}g.target===t.value&&v==="none"&&c("ANIMATION_END")},h=g=>{g.target===t.value&&(i.value=Ug(t.value))},p=He(t,(g,v)=>{g?(r.value=getComputedStyle(g),g.addEventListener("animationstart",h),g.addEventListener("animationcancel",f),g.addEventListener("animationend",f)):(c("ANIMATION_END"),a!==void 0&&(l==null||l.clearTimeout(a)),v==null||v.removeEventListener("animationstart",h),v==null||v.removeEventListener("animationcancel",f),v==null||v.removeEventListener("animationend",f))},{immediate:!0}),m=He(u,()=>{const g=Ug(t.value);i.value=u.value==="mounted"?g:"none"});return On(()=>{p(),m()}),{isPresent:te(()=>["mounted","unmountSuspended"].includes(u.value))}}function Ug(e){return e&&getComputedStyle(e).animationName||"none"}const ru=ee({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;const{present:i,forceMount:s}=fn(e),o=U(),{isPresent:a}=Tle(i,o);n({present:a});let l=t.default({present:a});l=T0(l||[]);const u=Jn();if(l&&(l==null?void 0:l.length)>1){const c=(r=u==null?void 0:u.parent)!=null&&r.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(` `)].join(` `))}return()=>s.value||i.value||a.value?We(t.default({present:a})[0],{ref:c=>{const d=Ns(c);return typeof(d==null?void 0:d.hasAttribute)>"u"||(d!=null&&d.hasAttribute("data-radix-popper-content-wrapper")?o.value=d.firstElementChild:o.value=d),d}}):null}});function DH({type:e,defaultValue:t,modelValue:n}){const r=n||t;if(ey(e)&&ey(n)&&ey(t))throw new Error("Either the `type` or the `value` or `default-value` prop must be defined.");if(n!==void 0&&t!==void 0&&typeof n!=typeof t)throw new Error(`Invalid prop \`value\` of value \`${n}\` supplied, should be the same type as the \`defaultValue\` prop, which is \`${t}\`. The \`value\` prop must be: ${e==="single"?"- a string":e==="multiple"?"- an array of strings":`- a string - an array of strings`} - \`undefined\``);const i=n!==void 0||t!==void 0;if(e&&i){const s=Array.isArray(n)||Array.isArray(t),o=n!==void 0?"modelValue":"defaultValue",a=o==="modelValue"?typeof n:typeof t;if(e==="single"&&s)return console.error(`Invalid prop \`${o}\` of type ${a} supplied with type \`single\`. The \`modelValue\` prop must be a string or \`undefined\`. You can remove the \`type\` prop to let the component infer the type from the ${o} prop.`),"multiple";if(e==="multiple"&&!s)return console.error(`Invalid prop \`${o}\` of type ${a} supplied with type \`multiple\`. The \`modelValue\` prop must be an array of strings or \`undefined\`. You can remove the \`type\` prop to let the component infer the type from the ${o} prop.`),"single"}return i?Array.isArray(r)?"multiple":"single":e}function kle({type:e,defaultValue:t,modelValue:n}){return e||DH({type:e,defaultValue:t,modelValue:n})}function Cle({type:e,defaultValue:t}){return t!==void 0?t:e==="single"?void 0:[]}function Ole(e,t){const n=U(kle(e)),r=ri(e,"modelValue",t,{defaultValue:Cle(e),passive:e.modelValue===void 0,deep:!0});He(()=>[e.type,e.modelValue,e.defaultValue],()=>{const o=DH(e);n.value!==o&&(n.value=o)},{immediate:!0});function i(o){if(n.value==="single")r.value=o===r.value?void 0:o;else{const a=[...r.value||[]];if(a.includes(o)){const l=a.findIndex(u=>u===o);a.splice(l,1)}else a.push(o);r.value=a}}const s=te(()=>n.value==="single");return{modelValue:r,type:n,changeModelValue:i,isSingle:s}}const[Mo,Rle]=rn("DialogRoot"),NH=ee({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=ri(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=U(),s=U(),{modal:o}=fn(n);return Rle({open:r,modal:o,openModal:()=>{r.value=!0},onOpenChange:a=>{r.value=a},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:s}),(a,l)=>ce(a.$slots,"default",{open:y(r)})}}),Ile=ee({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Mo(),{forwardRef:r,currentElement:i}=Ge();return n.contentId||(n.contentId=xo(void 0,"radix-vue-dialog-content")),nt(()=>{n.triggerElement.value=i.value}),(s,o)=>(k(),X(y(at),Fe(t,{ref:y(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":y(n).open.value||!1,"aria-controls":y(n).open.value?y(n).contentId:void 0,"data-state":y(n).open.value?"open":"closed",onClick:y(n).onOpenToggle}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Qm=ee({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=kH();return(n,r)=>y(t)||n.forceMount?(k(),X(Ff,{key:0,to:n.to,disabled:n.disabled},[ce(n.$slots,"default")],8,["to","disabled"])):fe("",!0)}}),Ale=ee({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Qm),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),Ple="dismissableLayer.pointerDownOutside",Mle="dismissableLayer.focusOutside";function LH(e,t){const n=t.closest("[data-dismissable-layer]"),r=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||i.indexOf(r)<i.indexOf(n))}function Dle(e,t){var n;const r=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=U(!1),s=U(()=>{});return Mt(o=>{if(!Po)return;const a=async u=>{const c=u.target;if(t!=null&&t.value){if(LH(t.value,c)){i.value=!1;return}if(u.target&&!i.value){let d=function(){SH(Ple,e,f)};const f={originalEvent:u};u.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=d,r.addEventListener("click",s.value,{once:!0})):d()}else r.removeEventListener("click",s.value);i.value=!1}},l=window.setTimeout(()=>{r.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),r.removeEventListener("pointerdown",a),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>i.value=!0}}function Nle(e,t){var n;const r=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=U(!1);return Mt(s=>{if(!Po)return;const o=async a=>{t!=null&&t.value&&(await vt(),!(!t.value||LH(t.value,a.target))&&a.target&&!i.value&&SH(Mle,e,{originalEvent:a}))};r.addEventListener("focusin",o),s(()=>r.removeEventListener("focusin",o))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const ms=Ca({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C0=ee({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,r=t,{forwardRef:i,currentElement:s}=Ge(),o=te(()=>{var p;return((p=s.value)==null?void 0:p.ownerDocument)??globalThis.document}),a=te(()=>ms.layersRoot),l=te(()=>s.value?Array.from(a.value).indexOf(s.value):-1),u=te(()=>ms.layersWithOutsidePointerEventsDisabled.size>0),c=te(()=>{const p=Array.from(a.value),[m]=[...ms.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(m);return l.value>=g}),d=Dle(async p=>{const m=[...ms.branches].some(g=>g==null?void 0:g.contains(p.target));!c.value||m||(r("pointerDownOutside",p),r("interactOutside",p),await vt(),p.defaultPrevented||r("dismiss"))},s),f=Nle(p=>{[...ms.branches].some(m=>m==null?void 0:m.contains(p.target))||(r("focusOutside",p),r("interactOutside",p),p.defaultPrevented||r("dismiss"))},s);nO("Escape",p=>{l.value===a.value.size-1&&(r("escapeKeyDown",p),p.defaultPrevented||r("dismiss"))});let h;return Mt(p=>{s.value&&(n.disableOutsidePointerEvents&&(ms.layersWithOutsidePointerEventsDisabled.size===0&&(h=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ms.layersWithOutsidePointerEventsDisabled.add(s.value)),a.value.add(s.value),p(()=>{n.disableOutsidePointerEvents&&ms.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=h)}))}),Mt(p=>{p(()=>{s.value&&(a.value.delete(s.value),ms.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(p,m)=>(k(),X(y(at),{ref:y(i),"as-child":p.asChild,as:p.as,"data-dismissable-layer":"",style:xn({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:y(f).onFocusCapture,onBlurCapture:y(f).onBlurCapture,onPointerdownCapture:y(d).onPointerDownCapture},{default:H(()=>[ce(p.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Lle=ee({__name:"DismissableLayerBranch",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:r}=Ge();return nt(()=>{ms.branches.add(r.value)}),On(()=>{ms.branches.delete(r.value)}),(i,s)=>(k(),X(y(at),Fe({ref:y(n)},t),{default:H(()=>[ce(i.$slots,"default")]),_:3},16))}}),SS="focusScope.autoFocusOnMount",xS="focusScope.autoFocusOnUnmount",QM={bubbles:!1,cancelable:!0};function ty(e,{select:t=!1}={}){const n=ir();for(const r of e)if(ja(r,{select:t}),ir()!==n)return!0}function Fle(e){const t=aO(e),n=ZM(t,e),r=ZM(t.reverse(),e);return[n,r]}function aO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ZM(e,t){for(const n of e)if(!Ble(n,{upTo:t}))return n}function Ble(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zle(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const n=ir();e.focus({preventScroll:!0}),e!==n&&zle(e)&&t&&e.select()}}const $le=Wae(()=>U([]));function Hle(){const e=$le();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=eD(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=eD(e.value,t),(n=e.value[0])==null||n.resume()}}}function eD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vle(e){return e.filter(t=>t.tagName!=="A")}const lO=ee({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,r=t,{currentRef:i,currentElement:s}=Ge(),o=U(null),a=Hle(),l=Ca({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Mt(c=>{if(!Po)return;const d=s.value;if(!n.trapped)return;function f(g){if(l.paused||!d)return;const v=g.target;d.contains(v)?o.value=v:ja(o.value,{select:!0})}function h(g){if(l.paused||!d)return;const v=g.relatedTarget;v!==null&&(d.contains(v)||ja(o.value,{select:!0}))}function p(g){d.contains(o.value)||ja(d)}document.addEventListener("focusin",f),document.addEventListener("focusout",h);const m=new MutationObserver(p);d&&m.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),m.disconnect()})}),Mt(async c=>{const d=s.value;if(await vt(),!d)return;a.add(l);const f=ir();if(!d.contains(f)){const h=new CustomEvent(SS,QM);d.addEventListener(SS,p=>r("mountAutoFocus",p)),d.dispatchEvent(h),h.defaultPrevented||(ty(Vle(aO(d)),{select:!0}),ir()===f&&ja(d))}c(()=>{d.removeEventListener(SS,m=>r("mountAutoFocus",m));const h=new CustomEvent(xS,QM),p=m=>{r("unmountAutoFocus",m)};d.addEventListener(xS,p),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||ja(f??document.body,{select:!0}),d.removeEventListener(xS,p),a.remove(l)},0)})});function u(c){if(!n.loop&&!n.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=ir();if(d&&f){const h=c.currentTarget,[p,m]=Fle(h);p&&m?!c.shiftKey&&f===m?(c.preventDefault(),n.loop&&ja(p,{select:!0})):c.shiftKey&&f===p&&(c.preventDefault(),n.loop&&ja(m,{select:!0})):f===h&&c.preventDefault()}}return(c,d)=>(k(),X(y(at),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:H(()=>[ce(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),jle="menu.itemSelect",IE=["Enter"," "],Ule=["ArrowDown","PageUp","Home"],FH=["ArrowUp","PageDown","End"],Wle=[...Ule,...FH];[...IE],[...IE];function BH(e){return e?"open":"closed"}function AE(e){const t=ir();for(const n of e)if(n===t||(n.focus(),ir()!==t))return}function qle(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,l=t[s].y,u=t[o].x,c=t[o].y;l>r!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(i=!i)}return i}function Gle(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qle(n,t)}function PE(e){return e.pointerType==="mouse"}const zH=ee({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=Mo(),{forwardRef:s,currentElement:o}=Ge();return i.titleId||(i.titleId=xo(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=xo(void 0,"radix-vue-dialog-description")),nt(()=>{i.contentElement=o,ir()!==document.body&&(i.triggerElement.value=ir())}),(a,l)=>(k(),X(y(lO),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>r("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>r("closeAutoFocus",u))},{default:H(()=>[$(y(C0),Fe({id:y(i).contentId,ref:y(s),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":y(i).descriptionId,"aria-labelledby":y(i).titleId,"data-state":y(BH)(y(i).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>y(i).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>r("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>r("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>r("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>r("pointerDownOutside",u))}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Kle=ee({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=Mo(),s=Lc(r),{forwardRef:o,currentElement:a}=Ge();return iO(a),(l,u)=>(k(),X(zH,Fe({...n,...y(s)},{ref:y(o),"trap-focus":y(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{var d;c.defaultPrevented||(c.preventDefault(),(d=y(i).triggerElement.value)==null||d.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:H(()=>[ce(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Yle=ee({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=Lc(t);Ge();const i=Mo(),s=U(!1),o=U(!1);return(a,l)=>(k(),X(zH,Fe({...n,...y(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{var c;u.defaultPrevented||(s.value||(c=y(i).triggerElement.value)==null||c.focus(),u.preventDefault()),s.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{var c;u.defaultPrevented||(s.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const d=u.target;(c=y(i).triggerElement.value)!=null&&c.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16))}}),$H=ee({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=Mo(),s=Lc(r),{forwardRef:o}=Ge();return(a,l)=>(k(),X(y(ru),{present:a.forceMount||y(i).open.value},{default:H(()=>[y(i).modal.value?(k(),X(Kle,Fe({key:0,ref:y(o)},{...n,...y(s),...a.$attrs}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16)):(k(),X(Yle,Fe({key:1,ref:y(o)},{...n,...y(s),...a.$attrs}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Xle=ee({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=Mo();return rO(!0),Ge(),(n,r)=>(k(),X(y(at),{as:n.as,"as-child":n.asChild,"data-state":y(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:H(()=>[ce(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),HH=ee({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=Mo(),{forwardRef:n}=Ge();return(r,i)=>{var s;return(s=y(t))!=null&&s.modal.value?(k(),X(y(ru),{key:0,present:r.forceMount||y(t).open.value},{default:H(()=>[$(Xle,Fe(r.$attrs,{ref:y(n),as:r.as,"as-child":r.asChild}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):fe("",!0)}}}),uO=ee({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;Ge();const n=Mo();return(r,i)=>(k(),X(y(at),Fe(t,{type:r.as==="button"?"button":void 0,onClick:i[0]||(i[0]=s=>y(n).onOpenChange(!1))}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["type"]))}}),VH=ee({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e,n=Mo();return Ge(),(r,i)=>(k(),X(y(at),Fe(t,{id:y(n).titleId}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["id"]))}}),jH=ee({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;Ge();const n=Mo();return(r,i)=>(k(),X(y(at),Fe(t,{id:y(n).descriptionId}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["id"]))}}),Jle=ee({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=hn(e,t);return Ge(),(r,i)=>(k(),X(y(NH),Fe(y(n),{modal:!0}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16))}}),Qle=ee({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Qm),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),[Zle,eue]=rn("AlertDialogContent"),tue=ee({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=Lc(t);Ge();const i=U();return eue({onCancelElementChange:s=>{i.value=s}}),(s,o)=>(k(),X(y($H),Fe({...n,...y(r)},{role:"alertdialog",onPointerDownOutside:o[0]||(o[0]=lt(()=>{},["prevent"])),onInteractOutside:o[1]||(o[1]=lt(()=>{},["prevent"])),onOpenAutoFocus:o[2]||(o[2]=()=>{vt(()=>{var a;(a=i.value)==null||a.focus({preventScroll:!0})})})}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),nue=ee({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(HH),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),rue=ee({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Zle(),{forwardRef:r,currentElement:i}=Ge();return nt(()=>{n.onCancelElementChange(i.value)}),(s,o)=>(k(),X(y(uO),Fe(t,{ref:y(r)}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),iue=ee({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(VH),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),sue=ee({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(jH),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),oue=ee({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(uO),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}});function db(e){return e==="indeterminate"}function UH(e){return db(e)?"indeterminate":e?"checked":"unchecked"}const aue=["value","checked","name","disabled","required"],[lue,uue]=rn("CheckboxRoot"),cue=ee({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,{disabled:i}=fn(n),s=ri(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0}),{forwardRef:o,currentElement:a}=Ge(),l=Jm(a),u=te(()=>{var c;return n.id&&a.value?(c=document.querySelector(`[for="${n.id}"]`))==null?void 0:c.innerText:void 0});return uue({disabled:i,state:s}),(c,d)=>(k(),W(je,null,[$(y(at),Fe(c.$attrs,{id:c.id,ref:y(o),role:"checkbox","as-child":n.asChild,as:c.as,type:c.as==="button"?"button":void 0,"aria-checked":y(db)(y(s))?"mixed":y(s),"aria-required":n.required,"aria-label":c.$attrs["aria-label"]||u.value,"data-state":y(UH)(y(s)),"data-disabled":y(i)?"":void 0,disabled:y(i),onKeydown:fi(lt(()=>{},["prevent"]),["enter"]),onClick:d[0]||(d[0]=f=>s.value=y(db)(y(s))?!0:!y(s))}),{default:H(()=>[ce(c.$slots,"default",{checked:y(s)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),y(l)?(k(),W("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:c.value,checked:!!y(s),name:n.name,disabled:n.disabled,required:n.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,aue)):fe("",!0)],64))}}),due=ee({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(e){const{forwardRef:t}=Ge(),n=lue();return(r,i)=>(k(),X(y(ru),{present:r.forceMount||y(db)(y(n).state.value)||y(n).state.value===!0},{default:H(()=>[$(y(at),Fe({ref:y(t),"data-state":y(UH)(y(n).state.value),"data-disabled":y(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[WH,fue]=rn("PopperRoot"),cO=ee({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=U();return fue({anchor:t,onAnchorChange:n=>t.value=n}),(n,r)=>ce(n.$slots,"default")}}),dO=ee({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:r}=Ge(),i=WH();return Mt(()=>{i.onAnchorChange(t.element??r.value)}),(s,o)=>(k(),X(y(at),{ref:y(n),as:s.as,"as-child":s.asChild},{default:H(()=>[ce(s.$slots,"default")]),_:3},8,["as","as-child"]))}});function hue(e){return e!==null}function pue(e){return{name:"transformOrigin",options:e,fn(t){var n,r,i;const{placement:s,rects:o,middlewareData:a}=t,l=((n=a.arrow)==null?void 0:n.centerOffset)!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,f]=ME(s),h={start:"0%",center:"50%",end:"100%"}[f],p=(((r=a.arrow)==null?void 0:r.x)??0)+u/2,m=(((i=a.arrow)==null?void 0:i.y)??0)+c/2;let g="",v="";return d==="bottom"?(g=l?h:`${p}px`,v=`${-c}px`):d==="top"?(g=l?h:`${p}px`,v=`${o.floating.height+c}px`):d==="right"?(g=`${-c}px`,v=l?h:`${m}px`):d==="left"&&(g=`${o.floating.width+c}px`,v=l?h:`${m}px`),{data:{x:g,y:v}}}}}function ME(e){const[t,n="center"]=e.split("-");return[t,n]}const qH={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[l5e,mue]=rn("PopperContent"),fO=ee({inheritAttrs:!1,__name:"PopperContent",props:jB({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...qH}),emits:["placed"],setup(e,{emit:t}){const n=e,r=t,i=WH(),{forwardRef:s,currentElement:o}=Ge(),a=U(),l=U(),{width:u,height:c}=PH(l),d=te(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=te(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),h=te(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=te(()=>({padding:f.value,boundary:h.value.filter(hue),altBoundary:h.value.length>0})),m=jae(()=>[Mae({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&KM({...p.value}),n.avoidCollisions&&Dae({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Bae():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&KM({...p.value}),Nae({...p.value,apply:({elements:O,rects:M,availableWidth:E,availableHeight:L})=>{const{width:j,height:F}=M.reference,B=O.floating.style;B.setProperty("--radix-popper-available-width",`${E}px`),B.setProperty("--radix-popper-available-height",`${L}px`),B.setProperty("--radix-popper-anchor-width",`${j}px`),B.setProperty("--radix-popper-anchor-height",`${F}px`)}}),l.value&&Hae({element:l.value,padding:n.arrowPadding}),pue({arrowWidth:u.value,arrowHeight:c.value}),n.hideWhenDetached&&Lae({strategy:"referenceHidden",...p.value})]),{floatingStyles:g,placement:v,isPositioned:w,middlewareData:b}=Vae(i.anchor,a,{strategy:"fixed",placement:d,whileElementsMounted:(...O)=>Pae(...O,{animationFrame:n.updatePositionStrategy==="always"}),middleware:m}),_=te(()=>ME(v.value)[0]),x=te(()=>ME(v.value)[1]);_9(()=>{w.value&&r("placed")});const S=te(()=>{var O;return((O=b.value.arrow)==null?void 0:O.centerOffset)!==0}),I=U("");Mt(()=>{o.value&&(I.value=window.getComputedStyle(o.value).zIndex)});const P=te(()=>{var O;return((O=b.value.arrow)==null?void 0:O.x)??0}),R=te(()=>{var O;return((O=b.value.arrow)==null?void 0:O.y)??0});return mue({placedSide:_,onArrowChange:O=>l.value=O,arrowX:P,arrowY:R,shouldHideArrow:S}),(O,M)=>{var E,L,j;return k(),W("div",{ref_key:"floatingRef",ref:a,"data-radix-popper-content-wrapper":"",style:xn({...y(g),transform:y(w)?y(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:I.value,"--radix-popper-transform-origin":[(E=y(b).transformOrigin)==null?void 0:E.x,(L=y(b).transformOrigin)==null?void 0:L.y].join(" "),...((j=y(b).hide)==null?void 0:j.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[$(y(at),Fe({ref:y(s)},O.$attrs,{"as-child":n.asChild,as:O.as,"data-side":_.value,"data-align":x.value,style:{animation:y(w)?void 0:"none"}}),{default:H(()=>[ce(O.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),O0=ee({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return Ge(),(t,n)=>(k(),X(y(at),{as:t.as,"as-child":t.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:H(()=>[ce(t.$slots,"default")]),_:3},8,["as","as-child"]))}}),gue="data-radix-vue-collection-item",[hO,vue]=rn("CollectionProvider");function GH(e=gue){const t=U(new Map),n=U(),r=vue({collectionRef:n,itemMap:t,attrName:e}),{getItems:i}=mO(r),s=te(()=>Array.from(r.itemMap.value.values())),o=te(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:o}}const KH=ee({name:"CollectionSlot",setup(e,{slots:t}){const n=hO(),{primitiveElement:r,currentElement:i}=MH();return He(i,()=>{n.collectionRef.value=i.value}),()=>We(oO,{ref:r},t)}}),pO=ee({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){const r=hO(),{primitiveElement:i,currentElement:s}=MH();return Mt(o=>{if(s.value){const a=Mm(s.value);r.itemMap.value.set(a,{ref:s.value,value:e.value}),o(()=>r.itemMap.value.delete(a))}}),()=>We(oO,{...n,[r.attrName]:"",ref:i},t)}});function mO(e){const t=e??hO();return{getItems:()=>{const n=t.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${t.attrName}]`));return Array.from(t.itemMap.value.values()).sort((i,s)=>r.indexOf(i.ref)-r.indexOf(s.ref))}}}function yue(e){const t=k0({nonce:U()});return te(()=>{var n;return(e==null?void 0:e.value)||((n=t.nonce)==null?void 0:n.value)})}const YH=ee({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(dO),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}});function bue(){const e=U(!1);return nt(()=>{zl("keydown",()=>{e.value=!0},{capture:!0,passive:!0}),zl(["pointerdown","pointermove"],()=>{e.value=!1},{capture:!0,passive:!0})}),e}const wue=xH(bue),[R0,_ue]=rn(["MenuRoot","MenuSub"],"MenuContext"),[gO,Sue]=rn("MenuRoot"),XH=ee({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,{modal:i,dir:s}=fn(n),o=nu(s),a=ri(n,"open",r),l=U(),u=wue();return _ue({open:a,onOpenChange:c=>{a.value=c},content:l,onContentChange:c=>{l.value=c}}),Sue({onClose:()=>{a.value=!1},isUsingKeyboardRef:u,dir:o,modal:i}),(c,d)=>(k(),X(y(cO),null,{default:H(()=>[ce(c.$slots,"default")]),_:3}))}}),xue="rovingFocusGroup.onEntryFocus",Eue={bubbles:!1,cancelable:!0},Tue={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kue(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Cue(e,t,n){const r=kue(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Tue[r]}function JH(e,t=!1){const n=ir();for(const r of e)if(r===n||(r.focus({preventScroll:t}),ir()!==n))return}function Oue(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const[Rue,Iue]=rn("RovingFocusGroup"),vO=ee({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:n}){const r=e,i=n,{loop:s,orientation:o,dir:a}=fn(r),l=nu(a),u=ri(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),c=U(!1),d=U(!1),f=U(0),{getItems:h}=GH();function p(g){const v=!d.value;if(g.currentTarget&&g.target===g.currentTarget&&v&&!c.value){const w=new CustomEvent(xue,Eue);if(g.currentTarget.dispatchEvent(w),i("entryFocus",w),!w.defaultPrevented){const b=h().map(I=>I.ref).filter(I=>I.dataset.disabled!==""),_=b.find(I=>I.getAttribute("data-active")==="true"),x=b.find(I=>I.id===u.value),S=[_,x,...b].filter(Boolean);JH(S,r.preventScrollOnEntryFocus)}}d.value=!1}function m(){setTimeout(()=>{d.value=!1},1)}return t({getItems:h}),Iue({loop:s,dir:l,orientation:o,currentTabStopId:u,onItemFocus:g=>{u.value=g},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,v)=>(k(),X(y(KH),null,{default:H(()=>[$(y(at),{tabindex:c.value||f.value===0?-1:0,"data-orientation":y(o),as:g.as,"as-child":g.asChild,dir:y(l),style:{outline:"none"},onMousedown:v[0]||(v[0]=w=>d.value=!0),onMouseup:m,onFocus:p,onBlur:v[1]||(v[1]=w=>c.value=!1)},{default:H(()=>[ce(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),QH=ee({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=e,n=Rue(),r=te(()=>t.tabStopId||xo()),i=te(()=>n.currentTabStopId.value===r.value),{getItems:s}=mO();nt(()=>{t.focusable&&n.onFocusableItemAdd()}),On(()=>{t.focusable&&n.onFocusableItemRemove()});function o(a){if(a.key==="Tab"&&a.shiftKey){n.onItemShiftTab();return}if(a.target!==a.currentTarget)return;const l=Cue(a,n.orientation.value,n.dir.value);if(l!==void 0){if(a.metaKey||a.ctrlKey||a.altKey||!t.allowShiftKey&&a.shiftKey)return;a.preventDefault();let u=[...s().map(c=>c.ref).filter(c=>c.dataset.disabled!=="")];if(l==="last")u.reverse();else if(l==="prev"||l==="next"){l==="prev"&&u.reverse();const c=u.indexOf(a.currentTarget);u=n.loop.value?Oue(u,c+1):u.slice(c+1)}vt(()=>JH(u))}}return(a,l)=>(k(),X(y(pO),null,{default:H(()=>[$(y(at),{tabindex:i.value?0:-1,"data-orientation":y(n).orientation.value,"data-active":a.active,"data-disabled":a.focusable?void 0:"",as:a.as,"as-child":a.asChild,onMousedown:l[0]||(l[0]=u=>{a.focusable?y(n).onItemFocus(r.value):u.preventDefault()}),onFocus:l[1]||(l[1]=u=>y(n).onItemFocus(r.value)),onKeydown:o},{default:H(()=>[ce(a.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ZH,Aue]=rn("MenuContent"),eV=ee({__name:"MenuContentImpl",props:jB({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...qH}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(e,{emit:t}){const n=e,r=t,i=R0(),s=gO(),{trapFocus:o,disableOutsidePointerEvents:a,loop:l}=fn(n);IH(),rO(a.value);const u=U(""),c=U(0),d=U(0),f=U(null),h=U("right"),p=U(0),m=U(null),{createCollection:g}=Zf(),{forwardRef:v,currentElement:w}=Ge(),b=g(w);He(w,O=>{i.onContentChange(O)});const{handleTypeaheadSearch:_}=sO(b);On(()=>{window.clearTimeout(c.value)});function x(O){var M,E;return h.value===((M=f.value)==null?void 0:M.side)&&Gle(O,(E=f.value)==null?void 0:E.area)}async function S(O){var M;r("openAutoFocus",O),!O.defaultPrevented&&(O.preventDefault(),(M=w.value)==null||M.focus({preventScroll:!0}))}function I(O){if(O.defaultPrevented)return;const M=O.target.closest("[data-radix-menu-content]")===O.currentTarget,E=O.ctrlKey||O.altKey||O.metaKey,L=O.key.length===1,j=nle(O,ir(),w.value,{loop:l.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(j)return j==null?void 0:j.focus();if(O.code==="Space"||(M&&(O.key==="Tab"&&O.preventDefault(),!E&&L&&_(O.key)),O.target!==w.value)||!Wle.includes(O.key))return;O.preventDefault();const F=b.value;FH.includes(O.key)&&F.reverse(),AE(F)}function P(O){var M,E;(E=(M=O==null?void 0:O.currentTarget)==null?void 0:M.contains)!=null&&E.call(M,O.target)||(window.clearTimeout(c.value),u.value="")}function R(O){var M;if(!PE(O))return;const E=O.target,L=p.value!==O.clientX;if((M=O==null?void 0:O.currentTarget)!=null&&M.contains(E)&&L){const j=O.clientX>p.value?"right":"left";h.value=j,p.value=O.clientX}}return Aue({onItemEnter:O=>!!x(O),onItemLeave:O=>{var M;x(O)||((M=w.value)==null||M.focus(),m.value=null)},onTriggerLeave:O=>!!x(O),searchRef:u,pointerGraceTimerRef:d,onPointerGraceIntentChange:O=>{f.value=O}}),(O,M)=>(k(),X(y(lO),{"as-child":"",trapped:y(o),onMountAutoFocus:S,onUnmountAutoFocus:M[7]||(M[7]=E=>r("closeAutoFocus",E))},{default:H(()=>[$(y(C0),{"as-child":"","disable-outside-pointer-events":y(a),onEscapeKeyDown:M[2]||(M[2]=E=>r("escapeKeyDown",E)),onPointerDownOutside:M[3]||(M[3]=E=>r("pointerDownOutside",E)),onFocusOutside:M[4]||(M[4]=E=>r("focusOutside",E)),onInteractOutside:M[5]||(M[5]=E=>r("interactOutside",E)),onDismiss:M[6]||(M[6]=E=>r("dismiss"))},{default:H(()=>[$(y(vO),{"current-tab-stop-id":m.value,"onUpdate:currentTabStopId":M[0]||(M[0]=E=>m.value=E),"as-child":"",orientation:"vertical",dir:y(s).dir.value,loop:y(l),onEntryFocus:M[1]||(M[1]=E=>{r("entryFocus",E),y(s).isUsingKeyboardRef.value||E.preventDefault()})},{default:H(()=>[$(y(fO),{ref:y(v),role:"menu",as:O.as,"as-child":O.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":y(BH)(y(i).open.value),dir:y(s).dir.value,side:O.side,"side-offset":O.sideOffset,align:O.align,"align-offset":O.alignOffset,"avoid-collisions":O.avoidCollisions,"collision-boundary":O.collisionBoundary,"collision-padding":O.collisionPadding,"arrow-padding":O.arrowPadding,"prioritize-position":O.prioritizePosition,sticky:O.sticky,"hide-when-detached":O.hideWhenDetached,onKeydown:I,onBlur:P,onPointermove:R},{default:H(()=>[ce(O.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Pue=ee({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,n=ZH(),{forwardRef:r}=Ge(),i=U(!1);async function s(a){if(!a.defaultPrevented&&PE(a)){if(t.disabled)n.onItemLeave(a);else if(!n.onItemEnter(a)){const l=a.currentTarget;l==null||l.focus({preventScroll:!0})}}}async function o(a){await vt(),!a.defaultPrevented&&PE(a)&&n.onItemLeave(a)}return(a,l)=>(k(),X(y(pO),{value:{textValue:a.textValue}},{default:H(()=>[$(y(at),Fe({ref:y(r),role:"menuitem",tabindex:"-1"},a.$attrs,{as:a.as,"as-child":a.asChild,"data-radix-vue-collection-item":"","aria-disabled":a.disabled||void 0,"data-disabled":a.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:s,onPointerleave:o,onFocus:l[0]||(l[0]=async u=>{await vt(),!(u.defaultPrevented||a.disabled)&&(i.value=!0)}),onBlur:l[1]||(l[1]=async u=>{await vt(),!u.defaultPrevented&&(i.value=!1)})}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),tV=ee({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,{forwardRef:i,currentElement:s}=Ge(),o=gO(),a=ZH(),l=U(!1);async function u(){const c=s.value;if(!n.disabled&&c){const d=new CustomEvent(jle,{bubbles:!0,cancelable:!0});r("select",d),await vt(),d.defaultPrevented?l.value=!1:o.onClose()}}return(c,d)=>(k(),X(Pue,Fe(n,{ref:y(i),onClick:u,onPointerdown:d[0]||(d[0]=()=>{l.value=!0}),onPointerup:d[1]||(d[1]=async f=>{var h;await vt(),!f.defaultPrevented&&(l.value||(h=f.currentTarget)==null||h.click())}),onKeydown:d[2]||(d[2]=async f=>{const h=y(a).searchRef.value!=="";c.disabled||h&&f.key===" "||y(IE).includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}),{default:H(()=>[ce(c.$slots,"default")]),_:3},16))}}),Mue=ee({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=hn(n,r),s=R0(),{forwardRef:o,currentElement:a}=Ge();return iO(a),(l,u)=>(k(),X(eV,Fe(y(i),{ref:y(o),"trap-focus":y(s).open.value,"disable-outside-pointer-events":y(s).open.value,"disable-outside-scroll":!0,onDismiss:u[0]||(u[0]=c=>y(s).onOpenChange(!1)),onFocusOutside:u[1]||(u[1]=lt(c=>r("focusOutside",c),["prevent"]))}),{default:H(()=>[ce(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),Due=ee({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=hn(e,t),r=R0();return(i,s)=>(k(),X(eV,Fe(y(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:s[0]||(s[0]=o=>y(r).onOpenChange(!1))}),{default:H(()=>[ce(i.$slots,"default")]),_:3},16))}}),nV=ee({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=hn(e,t),r=R0(),i=gO();return(s,o)=>(k(),X(y(ru),{present:s.forceMount||y(r).open.value},{default:H(()=>[y(i).modal.value?(k(),X(Mue,Pt(Fe({key:0},{...s.$attrs,...y(n)})),{default:H(()=>[ce(s.$slots,"default")]),_:3},16)):(k(),X(Due,Pt(Fe({key:1},{...s.$attrs,...y(n)})),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),rV=ee({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Qm),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),iV=ee({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(at),Fe(t,{role:"separator","aria-orientation":"horizontal"}),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),[sV,Nue]=rn("ContextMenuRoot"),Lue=ee({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t,{dir:i,modal:s}=fn(n);Ge();const o=nu(i),a=U(!1);return Nue({open:a,onOpenChange:l=>{a.value=l},dir:o,modal:s}),He(a,l=>{r("update:open",l)}),(l,u)=>(k(),X(y(XH),{open:a.value,"onUpdate:open":u[0]||(u[0]=c=>a.value=c),dir:y(o),modal:y(s)},{default:H(()=>[ce(l.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function tD(e){return e.pointerType!=="mouse"}const Fue=ee({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=e,{disabled:n}=fn(t),{forwardRef:r}=Ge(),i=sV(),s=U({x:0,y:0}),o=te(()=>({getBoundingClientRect:()=>({width:0,height:0,left:s.value.x,right:s.value.x,top:s.value.y,bottom:s.value.y,...s.value})})),a=U(0);function l(){window.clearTimeout(a.value)}function u(h){s.value={x:h.clientX,y:h.clientY},i.onOpenChange(!0)}async function c(h){n.value||(await vt(),h.defaultPrevented||(l(),u(h),h.preventDefault()))}async function d(h){n.value||(await vt(),tD(h)&&!h.defaultPrevented&&(l(),a.value=window.setTimeout(()=>u(h),700)))}async function f(h){n.value||(await vt(),tD(h)&&!h.defaultPrevented&&l())}return(h,p)=>(k(),W(je,null,[$(y(YH),{as:"template",element:o.value},null,8,["element"]),$(y(at),Fe({ref:y(r),as:h.as,"as-child":h.asChild,"data-state":y(i).open.value?"open":"closed","data-disabled":y(n)?"":void 0,style:{WebkitTouchCallout:"none"}},h.$attrs,{onContextmenu:c,onPointerdown:d,onPointermove:f,onPointercancel:f,onPointerup:f}),{default:H(()=>[ce(h.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),Bue=ee({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(rV),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),zue=ee({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=hn(e,t);Ge();const r=sV(),i=U(!1);return(s,o)=>(k(),X(y(nV),Fe(y(n),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:o[0]||(o[0]=a=>{!a.defaultPrevented&&i.value&&a.preventDefault(),i.value=!1}),onInteractOutside:o[1]||(o[1]=a=>{!a.defaultPrevented&&!y(r).modal.value&&(i.value=!0)})}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),$ue=ee({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=Lc(t);return Ge(),(i,s)=>(k(),X(y(tV),Pt(Ft({...n,...y(r)})),{default:H(()=>[ce(i.$slots,"default")]),_:3},16))}}),Hue=ee({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(iV),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),[oV,Vue]=rn("DropdownMenuRoot"),jue=ee({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t;Ge();const i=ri(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=U(),{modal:o,dir:a}=fn(n),l=nu(a);return Vue({open:i,onOpenChange:u=>{i.value=u},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:o,dir:l}),(u,c)=>(k(),X(y(XH),{open:y(i),"onUpdate:open":c[0]||(c[0]=d=>Jt(i)?i.value=d:null),dir:y(l),modal:y(o)},{default:H(()=>[ce(u.$slots,"default",{open:y(i)})]),_:3},8,["open","dir","modal"]))}}),Uue=ee({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=oV(),{forwardRef:r,currentElement:i}=Ge();return nt(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=xo(void 0,"radix-vue-dropdown-menu-trigger")),(s,o)=>(k(),X(y(YH),{"as-child":""},{default:H(()=>[$(y(at),{id:y(n).triggerId,ref:y(r),type:s.as==="button"?"button":void 0,"as-child":t.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":y(n).open.value,"aria-controls":y(n).open.value?y(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":y(n).open.value?"open":"closed",onClick:o[0]||(o[0]=async a=>{var l;!s.disabled&&a.button===0&&a.ctrlKey===!1&&((l=y(n))==null||l.onOpenToggle(),await vt(),y(n).open.value&&a.preventDefault())}),onKeydown:o[1]||(o[1]=fi(a=>{s.disabled||(["Enter"," "].includes(a.key)&&y(n).onOpenToggle(),a.key==="ArrowDown"&&y(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())},["enter","space","arrow-down"]))},{default:H(()=>[ce(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),Wue=ee({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(rV),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),que=ee({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=hn(e,t);Ge();const r=oV(),i=U(!1);function s(o){o.defaultPrevented||(i.value||setTimeout(()=>{var a;(a=r.triggerElement.value)==null||a.focus()},0),i.value=!1,o.preventDefault())}return r.contentId||(r.contentId=xo(void 0,"radix-vue-dropdown-menu-content")),(o,a)=>{var l;return k(),X(y(nV),Fe(y(n),{id:y(r).contentId,"aria-labelledby":(l=y(r))==null?void 0:l.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:s,onInteractOutside:a[0]||(a[0]=u=>{var c;if(u.defaultPrevented)return;const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,h=d.button===2||f;(!y(r).modal.value||h)&&(i.value=!0),(c=y(r).triggerElement.value)!=null&&c.contains(u.target)&&u.preventDefault()})}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),Gue=ee({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(e,{emit:t}){const n=e,r=Lc(t);return Ge(),(i,s)=>(k(),X(y(tV),Pt(Ft({...n,...y(r)})),{default:H(()=>[ce(i.$slots,"default")]),_:3},16))}}),Kue=ee({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(iV),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),[Yue,Xue]=rn("RadioGroupRoot"),Jue=ee({__name:"RadioGroupRoot",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean,default:!1},name:{},required:{type:Boolean,default:!1},orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,{forwardRef:i}=Ge(),s=ri(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{disabled:o,loop:a,orientation:l,name:u,required:c,dir:d}=fn(n),f=nu(d);return Xue({modelValue:s,changeModelValue:h=>{s.value=h},disabled:o,loop:a,orientation:l,name:u==null?void 0:u.value,required:c}),(h,p)=>(k(),X(y(vO),{"as-child":"",orientation:y(l),dir:y(f),loop:y(a)},{default:H(()=>[$(y(at),{ref:y(i),role:"radiogroup","data-disabled":y(o)?"":void 0,"as-child":h.asChild,as:h.as,required:y(c),"aria-orientation":y(l),"aria-required":y(c),dir:y(f),name:y(u)},{default:H(()=>[ce(h.$slots,"default",{modelValue:y(s)})]),_:3},8,["data-disabled","as-child","as","required","aria-orientation","aria-required","dir","name"])]),_:3},8,["orientation","dir","loop"]))}}),Que=["value","checked","name","disabled","required"],Zue=ee({__name:"Radio",props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},checked:{type:Boolean,default:void 0},name:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(e,{emit:t}){const n=e,r=ri(n,"checked",t,{passive:n.checked===void 0}),{value:i}=fn(n),{forwardRef:s,currentElement:o}=Ge(),a=Jm(o),l=te(()=>{var c;return n.id&&o.value?((c=document.querySelector(`[for="${n.id}"]`))==null?void 0:c.innerText)??n.value:void 0});function u(c){r.value=!0,a.value&&c.stopPropagation()}return(c,d)=>(k(),X(y(at),Fe(c.$attrs,{id:c.id,ref:y(s),role:"radio",type:c.as==="button"?"button":void 0,as:c.as,"aria-checked":y(r),"aria-label":l.value,"as-child":c.asChild,disabled:c.disabled?"":void 0,"data-state":y(r)?"checked":"unchecked","data-disabled":c.disabled?"":void 0,value:y(i),required:c.required,name:c.name,onClick:lt(u,["stop"])}),{default:H(()=>[ce(c.$slots,"default",{checked:y(r)}),y(a)?(k(),W("input",{key:0,type:"radio",tabindex:"-1","aria-hidden":"true",value:y(i),checked:!!y(r),name:c.name,disabled:c.disabled,required:c.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Que)):fe("",!0)]),_:3},16,["id","type","as","aria-checked","aria-label","as-child","disabled","data-state","data-disabled","value","required","name"]))}}),[ece,tce]=rn("RadioGroupItem"),nce=ee({inheritAttrs:!1,__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},name:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,{forwardRef:n,currentElement:r}=Ge(),i=Yue(),s=te(()=>i.disabled.value||t.disabled),o=te(()=>i.required.value||t.required),a=te(()=>{var d;return((d=i.modelValue)==null?void 0:d.value)===t.value});tce({disabled:s,checked:a});const l=U(!1),u=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];zl("keydown",d=>{u.includes(d.key)&&(l.value=!0)}),zl("keyup",()=>{l.value=!1});function c(){setTimeout(()=>{var d;l.value&&((d=r.value)==null||d.click())},0)}return(d,f)=>(k(),X(y(QH),{checked:a.value,disabled:s.value,"as-child":"",focusable:!s.value,active:a.value},{default:H(()=>[$(Zue,Fe({...d.$attrs,...t},{ref:y(n),checked:a.value,required:o.value,disabled:s.value,"onUpdate:checked":f[0]||(f[0]=h=>y(i).changeModelValue(d.value)),onKeydown:f[1]||(f[1]=fi(lt(()=>{},["prevent"]),["enter"])),onFocus:c}),{default:H(()=>[ce(d.$slots,"default")]),_:3},16,["checked","required","disabled"])]),_:3},8,["checked","disabled","focusable","active"]))}}),rce=ee({__name:"RadioGroupIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(e){const{forwardRef:t}=Ge(),n=ece();return(r,i)=>(k(),X(y(ru),{present:r.forceMount||y(n).checked.value},{default:H(()=>[$(y(at),Fe({ref:y(t),"data-state":y(n).checked.value?"checked":"unchecked","data-disabled":y(n).disabled.value?"":void 0,"as-child":r.asChild,as:r.as},r.$attrs),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),ice=["default-value"],sce=ee({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(e){const t=e,{value:n}=fn(t),r=U();return(i,s)=>(k(),X(y(O0),{"as-child":""},{default:H(()=>[At(A("select",Fe({ref_key:"selectElement",ref:r},t,{"onUpdate:modelValue":s[0]||(s[0]=o=>Jt(n)?n.value=o:null),"default-value":y(n)}),[ce(i.$slots,"default")],16,ice),[[g7,y(n)]])]),_:3}))}}),oce={key:0,value:""},[Fc,aV]=rn("SelectRoot"),[ace,lce]=rn("SelectRoot"),uce=ee({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,r=t,i=ri(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),s=ri(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=U(),a=U(),l=U({x:0,y:0}),u=U(!1),{required:c,disabled:d,dir:f}=fn(n),h=nu(f);aV({triggerElement:o,onTriggerChange:v=>{o.value=v},valueElement:a,onValueElementChange:v=>{a.value=v},valueElementHasChildren:u,onValueElementHasChildrenChange:v=>{u.value=v},contentId:"",modelValue:i,onValueChange:v=>{i.value=v},open:s,required:c,onOpenChange:v=>{s.value=v},dir:h,triggerPointerDownPosRef:l,disabled:d});const p=Jm(o),m=U(new Set),g=te(()=>Array.from(m.value).map(v=>{var w;return(w=v.props)==null?void 0:w.value}).join(";"));return lce({onNativeOptionAdd:v=>{m.value.add(v)},onNativeOptionRemove:v=>{m.value.delete(v)}}),(v,w)=>(k(),X(y(cO),null,{default:H(()=>[ce(v.$slots,"default",{modelValue:y(i),open:y(s)}),y(p)?(k(),X(sce,Fe({key:g.value},v.$attrs,{"aria-hidden":"true",tabindex:"-1",required:y(c),name:v.name,autocomplete:v.autocomplete,disabled:y(d),value:y(i),onChange:w[0]||(w[0]=b=>i.value=b.target.value)}),{default:H(()=>[y(i)===void 0?(k(),W("option",oce)):fe("",!0),(k(!0),W(je,null,Ot(Array.from(m.value),b=>(k(),X(Rr(b),Fe({ref_for:!0},b.props,{key:b.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):fe("",!0)]),_:3}))}}),cce=[" ","Enter","ArrowUp","ArrowDown"],dce=[" ","Enter"],gs=10;function lV(e){return e===""||ey(e)}const fce=ee({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Fc(),r=te(()=>{var h;return((h=n.disabled)==null?void 0:h.value)||t.disabled}),{forwardRef:i,currentElement:s}=Ge();n.contentId||(n.contentId=xo(void 0,"radix-vue-select-content")),nt(()=>{n.triggerElement=s});const{injectCollection:o}=Zf(),a=o(),{search:l,handleTypeaheadSearch:u,resetTypeahead:c}=sO(a);function d(){r.value||(n.onOpenChange(!0),c())}function f(h){d(),n.triggerPointerDownPosRef.value={x:Math.round(h.pageX),y:Math.round(h.pageY)}}return(h,p)=>(k(),X(y(dO),{"as-child":""},{default:H(()=>{var m,g,v,w;return[$(y(at),{ref:y(i),role:"combobox",type:h.as==="button"?"button":void 0,"aria-controls":y(n).contentId,"aria-expanded":y(n).open.value||!1,"aria-required":(m=y(n).required)==null?void 0:m.value,"aria-autocomplete":"none",disabled:r.value,dir:(g=y(n))==null?void 0:g.dir.value,"data-state":(v=y(n))!=null&&v.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":y(lV)((w=y(n).modelValue)==null?void 0:w.value)?"":void 0,"as-child":h.asChild,as:h.as,onClick:p[0]||(p[0]=b=>{var _;(_=b==null?void 0:b.currentTarget)==null||_.focus()}),onPointerdown:p[1]||(p[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const _=b.target;_.hasPointerCapture(b.pointerId)&&_.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(f(b),b.preventDefault())}),onPointerup:p[2]||(p[2]=lt(b=>{b.pointerType==="touch"&&f(b)},["prevent"])),onKeydown:p[3]||(p[3]=b=>{const _=y(l)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&_&&b.key===" "||(y(u)(b.key),y(cce).includes(b.key)&&(d(),b.preventDefault()))})},{default:H(()=>[ce(h.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),hce=ee({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Qm),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),[yO,pce]=rn("SelectItemAlignedPosition"),mce=ee({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(e,{emit:t}){const n=e,r=t,{injectCollection:i}=Zf(),s=Fc(),o=Bc(),a=i(),l=U(!1),u=U(!0),c=U(),{forwardRef:d,currentElement:f}=Ge(),{viewport:h,selectedItem:p,selectedItemText:m,focusSelectedItem:g}=o;function v(){if(s.triggerElement.value&&s.valueElement.value&&c.value&&f.value&&h!=null&&h.value&&p!=null&&p.value&&m!=null&&m.value){const _=s.triggerElement.value.getBoundingClientRect(),x=f.value.getBoundingClientRect(),S=s.valueElement.value.getBoundingClientRect(),I=m.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const me=I.left-x.left,_e=S.left-me,Te=_.left-_e,Ie=_.width+Te,Ae=Math.max(Ie,x.width),Q=window.innerWidth-gs,J=cb(_e,gs,Math.max(gs,Q-Ae));c.value.style.minWidth=`${Ie}px`,c.value.style.left=`${J}px`}else{const me=x.right-I.right,_e=window.innerWidth-S.right-me,Te=window.innerWidth-_.right-_e,Ie=_.width+Te,Ae=Math.max(Ie,x.width),Q=window.innerWidth-gs,J=cb(_e,gs,Math.max(gs,Q-Ae));c.value.style.minWidth=`${Ie}px`,c.value.style.right=`${J}px`}const P=a.value,R=window.innerHeight-gs*2,O=h.value.scrollHeight,M=window.getComputedStyle(f.value),E=Number.parseInt(M.borderTopWidth,10),L=Number.parseInt(M.paddingTop,10),j=Number.parseInt(M.borderBottomWidth,10),F=Number.parseInt(M.paddingBottom,10),B=E+L+O+F+j,Y=Math.min(p.value.offsetHeight*5,B),Z=window.getComputedStyle(h.value),ne=Number.parseInt(Z.paddingTop,10),oe=Number.parseInt(Z.paddingBottom,10),le=_.top+_.height/2-gs,Ee=R-le,xe=p.value.offsetHeight/2,Me=p.value.offsetTop+xe,Ve=E+L+Me,Ue=B-Ve;if(Ve<=le){const me=p.value===P[P.length-1];c.value.style.bottom="0px";const _e=f.value.clientHeight-h.value.offsetTop-h.value.offsetHeight,Te=Math.max(Ee,xe+(me?oe:0)+_e+j),Ie=Ve+Te;c.value.style.height=`${Ie}px`}else{const me=p.value===P[0];c.value.style.top="0px";const _e=Math.max(le,E+h.value.offsetTop+(me?ne:0)+xe)+Ue;c.value.style.height=`${_e}px`,h.value.scrollTop=Ve-le+h.value.offsetTop}c.value.style.margin=`${gs}px 0`,c.value.style.minHeight=`${Y}px`,c.value.style.maxHeight=`${R}px`,r("placed"),requestAnimationFrame(()=>l.value=!0)}}const w=U("");nt(async()=>{await vt(),v(),f.value&&(w.value=window.getComputedStyle(f.value).zIndex)});function b(_){_&&u.value===!0&&(v(),g==null||g(),u.value=!1)}return pce({contentWrapper:c,shouldExpandOnScrollRef:l,onScrollButtonChange:b}),(_,x)=>(k(),W("div",{ref_key:"contentWrapperElement",ref:c,style:xn({display:"flex",flexDirection:"column",position:"fixed",zIndex:w.value})},[$(y(at),Fe({ref:y(d),style:{boxSizing:"border-box",maxHeight:"100%"}},{..._.$attrs,...n}),{default:H(()=>[ce(_.$slots,"default")]),_:3},16)],4))}}),gce=ee({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:gs},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=ai(e);return(n,r)=>(k(),X(y(fO),Fe(y(t),{style:{boxSizing:"border-box","--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)"}}),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),eh={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Bc,vce]=rn("SelectContent"),yce=ee({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,i=Fc();IH(),rO(n.bodyLock);const{createCollection:s}=Zf(),o=U();iO(o);const a=s(o),{search:l,handleTypeaheadSearch:u}=sO(a),c=U(),d=U(),f=U(),h=U(!1),p=U(!1);function m(){d.value&&o.value&&AE([d.value,o.value])}He(h,()=>{m()});const{onOpenChange:g,triggerPointerDownPosRef:v}=i;Mt(x=>{if(!o.value)return;let S={x:0,y:0};const I=R=>{var O,M;S={x:Math.abs(Math.round(R.pageX)-(((O=v.value)==null?void 0:O.x)??0)),y:Math.abs(Math.round(R.pageY)-(((M=v.value)==null?void 0:M.y)??0))}},P=R=>{var O;R.pointerType!=="touch"&&(S.x<=10&&S.y<=10?R.preventDefault():(O=o.value)!=null&&O.contains(R.target)||g(!1),document.removeEventListener("pointermove",I),v.value=null)};v.value!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",P,{capture:!0,once:!0})),x(()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",P,{capture:!0})})});function w(x){const S=x.ctrlKey||x.altKey||x.metaKey;if(x.key==="Tab"&&x.preventDefault(),!S&&x.key.length===1&&u(x.key),["ArrowUp","ArrowDown","Home","End"].includes(x.key)){let I=a.value;if(["ArrowUp","End"].includes(x.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(x.key)){const P=x.target,R=I.indexOf(P);I=I.slice(R+1)}setTimeout(()=>AE(I)),x.preventDefault()}}const b=te(()=>n.position==="popper"?n:{}),_=ai(b.value);return vce({content:o,viewport:c,onViewportChange:x=>{c.value=x},itemRefCallback:(x,S,I)=>{var P,R;const O=!p.value&&!I;(((P=i.modelValue)==null?void 0:P.value)!==void 0&&((R=i.modelValue)==null?void 0:R.value)===S||O)&&(d.value=x,O&&(p.value=!0))},selectedItem:d,selectedItemText:f,onItemLeave:()=>{var x;(x=o.value)==null||x.focus()},itemTextRefCallback:(x,S,I)=>{var P,R;const O=!p.value&&!I;(((P=i.modelValue)==null?void 0:P.value)!==void 0&&((R=i.modelValue)==null?void 0:R.value)===S||O)&&(f.value=x)},focusSelectedItem:m,position:n.position,isPositioned:h,searchRef:l}),(x,S)=>(k(),X(y(lO),{"as-child":"",onMountAutoFocus:S[6]||(S[6]=lt(()=>{},["prevent"])),onUnmountAutoFocus:S[7]||(S[7]=I=>{var P;r("closeAutoFocus",I),!I.defaultPrevented&&((P=y(i).triggerElement.value)==null||P.focus({preventScroll:!0}),I.preventDefault())})},{default:H(()=>[$(y(C0),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:S[2]||(S[2]=lt(()=>{},["prevent"])),onDismiss:S[3]||(S[3]=I=>y(i).onOpenChange(!1)),onEscapeKeyDown:S[4]||(S[4]=I=>r("escapeKeyDown",I)),onPointerDownOutside:S[5]||(S[5]=I=>r("pointerDownOutside",I))},{default:H(()=>[(k(),X(Rr(x.position==="popper"?gce:mce),Fe({...x.$attrs,...y(_)},{id:y(i).contentId,ref:I=>{o.value=y(Ns)(I)},role:"listbox","data-state":y(i).open.value?"open":"closed",dir:y(i).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:S[0]||(S[0]=lt(()=>{},["prevent"])),onPlaced:S[1]||(S[1]=I=>h.value=!0),onKeydown:w}),{default:H(()=>[ce(x.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),bce=ee({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(e){return aV(e.context),(t,n)=>ce(t.$slots,"default")}}),wce={key:1},_ce=ee({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=hn(n,t),i=Fc(),s=U();nt(()=>{s.value=new DocumentFragment});const o=U(),a=te(()=>n.forceMount||i.open.value);return(l,u)=>{var c;return a.value?(k(),X(y(ru),{key:0,ref_key:"presenceRef",ref:o,present:!0},{default:H(()=>[$(yce,Pt(Ft({...y(r),...l.$attrs})),{default:H(()=>[ce(l.$slots,"default")]),_:3},16)]),_:3},512)):!((c=o.value)!=null&&c.present)&&s.value?(k(),W("div",wce,[(k(),X(Ff,{to:s.value},[$(bce,{context:y(i)},{default:H(()=>[ce(l.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):fe("",!0)}}}),[uV,Sce]=rn("SelectItem"),xce=ee({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{disabled:n}=fn(t),r=Fc(),i=Bc(eh),{forwardRef:s,currentElement:o}=Ge(),a=te(()=>{var m;return((m=r.modelValue)==null?void 0:m.value)===t.value}),l=U(!1),u=U(t.textValue??""),c=xo(void 0,"radix-vue-select-item-text");async function d(m){await vt(),!(m!=null&&m.defaultPrevented)&&(n.value||(r.onValueChange(t.value),r.onOpenChange(!1)))}async function f(m){var g;await vt(),!m.defaultPrevented&&(n.value?(g=i.onItemLeave)==null||g.call(i):m.currentTarget.focus({preventScroll:!0}))}async function h(m){var g;await vt(),!m.defaultPrevented&&m.currentTarget===ir()&&((g=i.onItemLeave)==null||g.call(i))}async function p(m){var g;await vt(),!(m.defaultPrevented||((g=i.searchRef)==null?void 0:g.value)!==""&&m.key===" ")&&(dce.includes(m.key)&&d(),m.key===" "&&m.preventDefault())}if(t.value==="")throw new Error("A <SelectItem /> 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 nt(()=>{o.value&&i.itemRefCallback(o.value,t.value,t.disabled)}),Sce({value:t.value,disabled:n,textId:c,isSelected:a,onItemTextChange:m=>{u.value=((u.value||(m==null?void 0:m.textContent))??"").trim()}}),(m,g)=>(k(),X(y(at),{ref:y(s),role:"option","data-radix-vue-collection-item":"","aria-labelledby":y(c),"data-highlighted":l.value?"":void 0,"aria-selected":a.value,"data-state":a.value?"checked":"unchecked","aria-disabled":y(n)||void 0,"data-disabled":y(n)?"":void 0,tabindex:y(n)?void 0:-1,as:m.as,"as-child":m.asChild,onFocus:g[0]||(g[0]=v=>l.value=!0),onBlur:g[1]||(g[1]=v=>l.value=!1),onPointerup:d,onPointerdown:g[2]||(g[2]=v=>{v.currentTarget.focus({preventScroll:!0})}),onTouchend:g[3]||(g[3]=lt(()=>{},["prevent","stop"])),onPointermove:f,onPointerleave:h,onKeydown:p},{default:H(()=>[ce(m.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),Ece=ee({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=e,n=uV();return(r,i)=>y(n).isSelected.value?(k(),X(y(at),Fe({key:0,"aria-hidden":"true"},t),{default:H(()=>[ce(r.$slots,"default")]),_:3},16)):fe("",!0)}}),[u5e,Tce]=rn("SelectGroup"),kce=ee({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,n=xo(void 0,"radix-vue-select-group");return Tce({id:n}),(r,i)=>(k(),X(y(at),Fe({role:"group"},t,{"aria-labelledby":y(n)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),Cce=ee({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=e,n=Fc(),r=Bc(eh),i=ace(),s=uV(),{forwardRef:o,currentElement:a}=Ge(),l=te(()=>{var u;return We("option",{key:s.value,value:s.value,disabled:s.disabled.value,textContent:(u=a.value)==null?void 0:u.textContent})});return nt(()=>{a.value&&(s.onItemTextChange(a.value),r.itemTextRefCallback(a.value,s.value,s.disabled.value),i.onNativeOptionAdd(l.value))}),yr(()=>{i.onNativeOptionRemove(l.value)}),(u,c)=>(k(),W(je,null,[$(y(at),Fe({id:y(s).textId,ref:y(o)},{...t,...u.$attrs},{"data-item-text":""}),{default:H(()=>[ce(u.$slots,"default")]),_:3},16,["id"]),y(s).isSelected.value&&y(n).valueElement.value&&!y(n).valueElementHasChildren.value?(k(),X(Ff,{key:0,to:y(n).valueElement.value},[ce(u.$slots,"default")],8,["to"])):fe("",!0)],64))}}),Oce=ee({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{nonce:n}=fn(t),r=yue(n),i=Bc(eh),s=i.position==="item-aligned"?yO():void 0,{forwardRef:o,currentElement:a}=Ge();nt(()=>{i==null||i.onViewportChange(a.value)});const l=U(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:h}=s??{};if(f!=null&&f.value&&h!=null&&h.value){const p=Math.abs(l.value-d.scrollTop);if(p>0){const m=window.innerHeight-gs*2,g=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),w=Math.max(g,v);if(w<m){const b=w+p,_=Math.min(m,b),x=b-_;h.value.style.height=`${_}px`,h.value.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(k(),W(je,null,[$(y(at),Fe({ref:y(o),"data-radix-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:H(()=>[ce(c.$slots,"default")]),_:3},16),$(y(at),{as:"style",nonce:y(r)},{default:H(()=>[Ye(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),cV=ee({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const n=t,{injectCollection:r}=Zf(),i=r(),s=Bc(eh),o=U(null);function a(){o.value!==null&&(window.clearInterval(o.value),o.value=null)}Mt(()=>{const c=i.value.find(d=>d===ir());c==null||c.scrollIntoView({block:"nearest"})});function l(){o.value===null&&(o.value=window.setInterval(()=>{n("autoScroll")},50))}function u(){var c;(c=s.onItemLeave)==null||c.call(s),o.value===null&&(o.value=window.setInterval(()=>{n("autoScroll")},50))}return yr(()=>a()),(c,d)=>{var f;return k(),X(y(at),Fe({"aria-hidden":"true",style:{flexShrink:0}},(f=c.$parent)==null?void 0:f.$props,{onPointerdown:l,onPointermove:u,onPointerleave:d[0]||(d[0]=()=>{a()})}),{default:H(()=>[ce(c.$slots,"default")]),_:3},16)}}}),Rce=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(e){const t=Bc(eh),n=t.position==="item-aligned"?yO():void 0,{forwardRef:r,currentElement:i}=Ge(),s=U(!1);return Mt(o=>{var a,l;if((a=t.viewport)!=null&&a.value&&(l=t.isPositioned)!=null&&l.value){let u=function(){s.value=c.scrollTop>0};const c=t.viewport.value;u(),c.addEventListener("scroll",u),o(()=>c.removeEventListener("scroll",u))}}),He(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(o,a)=>s.value?(k(),X(cV,{key:0,ref:y(r),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=y(t);l!=null&&l.value&&u!=null&&u.value&&(l.value.scrollTop=l.value.scrollTop-u.value.offsetHeight)})},{default:H(()=>[ce(o.$slots,"default")]),_:3},512)):fe("",!0)}}),Ice=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(e){const t=Bc(eh),n=t.position==="item-aligned"?yO():void 0,{forwardRef:r,currentElement:i}=Ge(),s=U(!1);return Mt(o=>{var a,l;if((a=t.viewport)!=null&&a.value&&(l=t.isPositioned)!=null&&l.value){let u=function(){const d=c.scrollHeight-c.clientHeight;s.value=Math.ceil(c.scrollTop)<d};const c=t.viewport.value;u(),c.addEventListener("scroll",u),o(()=>c.removeEventListener("scroll",u))}}),He(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(o,a)=>s.value?(k(),X(cV,{key:0,ref:y(r),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=y(t);l!=null&&l.value&&u!=null&&u.value&&(l.value.scrollTop=l.value.scrollTop+u.value.offsetHeight)})},{default:H(()=>[ce(o.$slots,"default")]),_:3},512)):fe("",!0)}}),Ace=ee({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(e){const{forwardRef:t,currentElement:n}=Ge(),r=Fc(),i=HB();return PB(()=>{var s;const o=!!T0((s=i==null?void 0:i.default)==null?void 0:s.call(i)).length;r.onValueElementHasChildrenChange(o)}),nt(()=>{r.valueElement=n}),(s,o)=>(k(),X(y(at),{ref:y(t),as:s.as,"as-child":s.asChild,style:{pointerEvents:"none"}},{default:H(()=>{var a;return[y(lV)((a=y(r).modelValue)==null?void 0:a.value)?(k(),W(je,{key:0},[Ye(ye(s.placeholder),1)],64)):ce(s.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),Pce=ee({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return(t,n)=>(k(),X(y(at),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:H(()=>[ce(t.$slots,"default",{},()=>[Ye("▼")])]),_:3},8,["as","as-child"]))}});function Mce(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,s)=>i-s)}function dV(e,t,n){const r=100/(n-t)*(e-t);return cb(r,0,100)}function Dce(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Nce(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function Lce(e,t,n){const r=e/2,i=bO([0,50],[0,r]);return(r-i(t)*n)*n}function Fce(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Bce(e,t){if(t>0){const n=Fce(e);return Math.min(...n)>=t}return!0}function bO(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 zce(e){return(String(e).split(".")[1]||"").length}function $ce(e,t){const n=10**t;return Math.round(e*n)/n}const fV=["PageUp","PageDown"],hV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pV={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},[mV,gV]=rn(["SliderVertical","SliderHorizontal"]),vV=ee({__name:"SliderImpl",props:{asChild:{type:Boolean},as:{default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const n=e,r=t,i=I0();return(s,o)=>(k(),X(y(at),Fe({"data-slider-impl":""},n,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(r("homeKeyDown",a),a.preventDefault()):a.key==="End"?(r("endKeyDown",a),a.preventDefault()):y(fV).concat(y(hV)).includes(a.key)&&(r("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),y(i).thumbElements.value.includes(l)?l.focus():r("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&r("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),r("slideEnd",a))})}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),Hce=ee({__name:"SliderHorizontal",props:{dir:{},min:{},max:{},inverted:{type:Boolean}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const n=e,r=t,{max:i,min:s,dir:o,inverted:a}=fn(n),{forwardRef:l,currentElement:u}=Ge(),c=U(),d=te(()=>(o==null?void 0:o.value)==="ltr"&&!a.value||(o==null?void 0:o.value)!=="ltr"&&a.value);function f(h){const p=c.value||u.value.getBoundingClientRect(),m=[0,p.width],g=d.value?[s.value,i.value]:[i.value,s.value],v=bO(m,g);return c.value=p,v(h-p.left)}return gV({startEdge:d.value?"left":"right",endEdge:d.value?"right":"left",direction:d.value?1:-1,size:"width"}),(h,p)=>(k(),X(vV,{ref:y(l),dir:y(o),"data-orientation":"horizontal",style:{"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:p[0]||(p[0]=m=>{const g=f(m.clientX);r("slideStart",g)}),onSlideMove:p[1]||(p[1]=m=>{const g=f(m.clientX);r("slideMove",g)}),onSlideEnd:p[2]||(p[2]=()=>{c.value=void 0,r("slideEnd")}),onStepKeyDown:p[3]||(p[3]=m=>{const g=d.value?"from-left":"from-right",v=y(pV)[g].includes(m.key);r("stepKeyDown",m,v?-1:1)}),onEndKeyDown:p[4]||(p[4]=m=>r("endKeyDown",m)),onHomeKeyDown:p[5]||(p[5]=m=>r("homeKeyDown",m))},{default:H(()=>[ce(h.$slots,"default")]),_:3},8,["dir"]))}}),Vce=ee({__name:"SliderVertical",props:{min:{},max:{},inverted:{type:Boolean}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const n=e,r=t,{max:i,min:s,inverted:o}=fn(n),{forwardRef:a,currentElement:l}=Ge(),u=U(),c=te(()=>!o.value);function d(f){const h=u.value||l.value.getBoundingClientRect(),p=[0,h.height],m=c.value?[i.value,s.value]:[s.value,i.value],g=bO(p,m);return u.value=h,g(f-h.top)}return gV({startEdge:c.value?"bottom":"top",endEdge:c.value?"top":"bottom",size:"height",direction:c.value?1:-1}),(f,h)=>(k(),X(vV,{ref:y(a),"data-orientation":"vertical",style:{"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h[0]||(h[0]=p=>{const m=d(p.clientY);r("slideStart",m)}),onSlideMove:h[1]||(h[1]=p=>{const m=d(p.clientY);r("slideMove",m)}),onSlideEnd:h[2]||(h[2]=()=>{u.value=void 0,r("slideEnd")}),onStepKeyDown:h[3]||(h[3]=p=>{const m=c.value?"from-bottom":"from-top",g=y(pV)[m].includes(p.key);r("stepKeyDown",p,g?-1:1)}),onEndKeyDown:h[4]||(h[4]=p=>r("endKeyDown",p)),onHomeKeyDown:h[5]||(h[5]=p=>r("homeKeyDown",p))},{default:H(()=>[ce(f.$slots,"default")]),_:3},512))}}),jce=["value","name","disabled","step"],[I0,Uce]=rn("SliderRoot"),Wce=ee({inheritAttrs:!1,__name:"SliderRoot",props:{name:{},defaultValue:{default:()=>[0]},modelValue:{},disabled:{type:Boolean,default:!1},orientation:{default:"horizontal"},dir:{},inverted:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},minStepsBetweenThumbs:{default:0},asChild:{type:Boolean},as:{}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const n=e,r=t,{min:i,max:s,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:u,dir:c}=fn(n),d=nu(c),{forwardRef:f,currentElement:h}=Ge(),p=Jm(h);GH();const m=ri(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),g=U(0),v=U(m.value);function w(I){const P=Nce(m.value,I);x(I,P)}function b(I){x(I,g.value)}function _(){const I=v.value[g.value];m.value[g.value]!==I&&r("valueCommit",$t(m.value))}function x(I,P,{commit:R}={commit:!1}){var O;const M=zce(o.value),E=$ce(Math.round((I-i.value)/o.value)*o.value+i.value,M),L=cb(E,i.value,s.value),j=Mce(m.value,L,P);if(Bce(j,a.value*o.value)){g.value=j.indexOf(L);const F=String(j)!==String(m.value);F&&R&&r("valueCommit",j),F&&((O=S.value[g.value])==null||O.focus(),m.value=j)}}const S=U([]);return Uce({modelValue:m,valueIndexToChangeRef:g,thumbElements:S,orientation:l,min:i,max:s,disabled:u}),(I,P)=>(k(),W(je,null,[$(y(KH),null,{default:H(()=>[(k(),X(Rr(y(l)==="horizontal"?Hce:Vce),Fe(I.$attrs,{ref:y(f),"as-child":I.asChild,as:I.as,min:y(i),max:y(s),dir:y(d),inverted:I.inverted,"aria-disabled":y(u),"data-disabled":y(u)?"":void 0,onPointerdown:P[0]||(P[0]=()=>{y(u)||(v.value=y(m))}),onSlideStart:P[1]||(P[1]=R=>!y(u)&&w(R)),onSlideMove:P[2]||(P[2]=R=>!y(u)&&b(R)),onSlideEnd:P[3]||(P[3]=R=>!y(u)&&_()),onHomeKeyDown:P[4]||(P[4]=R=>!y(u)&&x(y(i),0,{commit:!0})),onEndKeyDown:P[5]||(P[5]=R=>!y(u)&&x(y(s),y(m).length-1,{commit:!0})),onStepKeyDown:P[6]||(P[6]=(R,O)=>{if(!y(u)){const M=y(fV).includes(R.key)||R.shiftKey&&y(hV).includes(R.key)?10:1,E=g.value,L=y(m)[E],j=y(o)*M*O;x(L+j,E,{commit:!0})}})}),{default:H(()=>[ce(I.$slots,"default",{modelValue:y(m)})]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}),y(p)?(k(!0),W(je,{key:0},Ot(y(m),(R,O)=>(k(),W("input",{key:O,value:R,type:"number",style:{display:"none"},name:I.name?I.name+(y(m).length>1?"[]":""):void 0,disabled:y(u),step:y(o)},null,8,jce))),128)):fe("",!0)],64))}}),qce=ee({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,n=I0(),r=mV(),{forwardRef:i,currentElement:s}=Ge(),o=te(()=>{var h,p;return(p=(h=n.modelValue)==null?void 0:h.value)==null?void 0:p[t.index]}),a=te(()=>o.value===void 0?0:dV(o.value,n.min.value??0,n.max.value??100)),l=te(()=>{var h,p;return Dce(t.index,((p=(h=n.modelValue)==null?void 0:h.value)==null?void 0:p.length)??0)}),u=PH(s),c=te(()=>u[r.size].value),d=te(()=>c.value?Lce(c.value,a.value,r.direction):0),f=kH();return nt(()=>{n.thumbElements.value.push(s.value)}),On(()=>{const h=n.thumbElements.value.findIndex(p=>p===s.value)??-1;n.thumbElements.value.splice(h,1)}),(h,p)=>(k(),X(y(pO),null,{default:H(()=>[$(y(at),Fe(h.$attrs,{ref:y(i),role:"slider","data-radix-vue-collection-item":"",tabindex:y(n).disabled.value?void 0:0,"aria-label":h.$attrs["aria-label"]||l.value,"data-disabled":y(n).disabled.value?"":void 0,"data-orientation":y(n).orientation.value,"aria-valuenow":o.value,"aria-valuemin":y(n).min.value,"aria-valuemax":y(n).max.value,"aria-orientation":y(n).orientation.value,"as-child":h.asChild,as:h.as,style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[y(r).startEdge]:`calc(${a.value}% + ${d.value}px)`,display:!y(f)&&o.value===void 0?"none":void 0},onFocus:p[0]||(p[0]=()=>{y(n).valueIndexToChangeRef.value=h.index})}),{default:H(()=>[ce(h.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),Gce=ee({__name:"SliderThumb",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e,{getItems:n}=mO(),{forwardRef:r,currentElement:i}=Ge(),s=te(()=>i.value?n().findIndex(o=>o.ref===i.value):-1);return(o,a)=>(k(),X(qce,Fe({ref:y(r)},t,{index:s.value}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["index"]))}}),Kce=ee({__name:"SliderTrack",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=I0();return Ge(),(n,r)=>(k(),X(y(at),{"as-child":n.asChild,as:n.as,"data-disabled":y(t).disabled.value?"":void 0,"data-orientation":y(t).orientation.value},{default:H(()=>[ce(n.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),Yce=ee({__name:"SliderRange",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=I0(),n=mV();Ge();const r=te(()=>{var o,a;return(a=(o=t.modelValue)==null?void 0:o.value)==null?void 0:a.map(l=>dV(l,t.min.value,t.max.value))}),i=te(()=>t.modelValue.value.length>1?Math.min(...r.value):0),s=te(()=>100-Math.max(...r.value));return(o,a)=>(k(),X(y(at),{"data-disabled":y(t).disabled.value?"":void 0,"data-orientation":y(t).orientation.value,"as-child":o.asChild,as:o.as,style:xn({[y(n).startEdge]:`${i.value}%`,[y(n).endEdge]:`${s.value}%`})},{default:H(()=>[ce(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}});function Xce(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Xce();const Jce=["name","disabled","required","value","checked","data-state","data-disabled"],[Qce,Zce]=rn("SwitchRoot"),ede=ee({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,{disabled:i}=fn(n),s=ri(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0});function o(){i.value||(s.value=!s.value)}const{forwardRef:a,currentElement:l}=Ge(),u=Jm(l),c=te(()=>{var d;return n.id&&l.value?(d=document.querySelector(`[for="${n.id}"]`))==null?void 0:d.innerText:void 0});return Zce({checked:s,toggleCheck:o,disabled:i}),(d,f)=>(k(),W(je,null,[$(y(at),Fe(d.$attrs,{id:d.id,ref:y(a),role:"switch",type:d.as==="button"?"button":void 0,value:d.value,"aria-label":d.$attrs["aria-label"]||c.value,"aria-checked":y(s),"aria-required":d.required,"data-state":y(s)?"checked":"unchecked","data-disabled":y(i)?"":void 0,"as-child":d.asChild,as:d.as,disabled:y(i),onClick:o,onKeydown:fi(lt(o,["prevent"]),["enter"])}),{default:H(()=>[ce(d.$slots,"default",{checked:y(s)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),y(u)?(k(),W("input",{key:0,type:"checkbox",name:d.name,tabindex:"-1","aria-hidden":"true",disabled:y(i),required:d.required,value:d.value,checked:!!y(s),"data-state":y(s)?"checked":"unchecked","data-disabled":y(i)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Jce)):fe("",!0)],64))}}),tde=ee({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){const t=Qce();return Ge(),(n,r)=>{var i;return k(),X(y(at),{"data-state":(i=y(t).checked)!=null&&i.value?"checked":"unchecked","data-disabled":y(t).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:H(()=>[ce(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[A0,nde]=rn("ToastProvider"),rde=ee({inheritAttrs:!1,__name:"ToastProvider",props:{label:{default:"Notification"},duration:{default:5e3},swipeDirection:{default:"right"},swipeThreshold:{default:50}},setup(e){const t=e,{label:n,duration:r,swipeDirection:i,swipeThreshold:s}=fn(t),o=U(),a=U(0),l=U(!1),u=U(!1);if(t.label&&typeof t.label=="string"&&!t.label.trim()){const c="Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.";throw new Error(c)}return nde({label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:a,viewport:o,onViewportChange(c){o.value=c},onToastAdd(){a.value++},onToastRemove(){a.value--},isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:u}),(c,d)=>ce(c.$slots,"default")}}),ide="toast.swipeStart",sde="toast.swipeMove",ode="toast.swipeCancel",ade="toast.swipeEnd",DE="toast.viewportPause",NE="toast.viewportResume";function Wg(e,t,n){const r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function nD(e,t,n=0){const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n}function lde(e){return e.nodeType===e.ELEMENT_NODE}function yV(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),lde(n)){const r=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!r)if(i){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...yV(n))}}),t}const ude=ee({__name:"ToastAnnounce",setup(e){const t=A0(),n=Qae(1e3),r=U(!1);return CH(()=>{r.value=!0}),(i,s)=>y(n)||r.value?(k(),X(y(O0),{key:0},{default:H(()=>[Ye(ye(y(t).label.value)+" ",1),ce(i.$slots,"default")]),_:3})):fe("",!0)}}),[cde,dde]=rn("ToastRoot"),fde=ee({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{},open:{type:Boolean,default:!1},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(e,{emit:t}){const n=e,r=t,{forwardRef:i,currentElement:s}=Ge(),o=A0(),a=U(null),l=U(null),u=te(()=>typeof n.duration=="number"?n.duration:o.duration.value),c=U(0),d=U(u.value),f=U(0),h=U(u.value),p=CH(()=>{const w=new Date().getTime()-c.value;h.value=Math.max(d.value-w,0)},{fpsLimit:60});function m(w){w<=0||w===Number.POSITIVE_INFINITY||Po&&(window.clearTimeout(f.value),c.value=new Date().getTime(),f.value=window.setTimeout(g,w))}function g(){var w,b;(w=s.value)!=null&&w.contains(ir())&&((b=o.viewport.value)==null||b.focus()),o.isClosePausedRef.value=!1,r("close")}const v=te(()=>s.value?yV(s.value):null);if(n.type&&!["foreground","background"].includes(n.type)){const w="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(w)}return Mt(w=>{const b=o.viewport.value;if(b){const _=()=>{m(d.value),p.resume(),r("resume")},x=()=>{const S=new Date().getTime()-c.value;d.value=d.value-S,window.clearTimeout(f.value),p.pause(),r("pause")};return b.addEventListener(DE,x),b.addEventListener(NE,_),()=>{b.removeEventListener(DE,x),b.removeEventListener(NE,_)}}}),He(()=>[n.open,u.value],()=>{d.value=u.value,n.open&&!o.isClosePausedRef.value&&m(u.value)},{immediate:!0}),nO("Escape",w=>{r("escapeKeyDown",w),w.defaultPrevented||(o.isFocusedToastEscapeKeyDownRef.value=!0,g())}),nt(()=>{o.onToastAdd()}),On(()=>{o.onToastRemove()}),dde({onClose:g}),(w,b)=>(k(),W(je,null,[v.value?(k(),X(ude,{key:0,role:"alert","aria-live":w.type==="foreground"?"assertive":"polite","aria-atomic":"true"},{default:H(()=>[Ye(ye(v.value),1)]),_:1},8,["aria-live"])):fe("",!0),y(o).viewport.value?(k(),X(Ff,{key:1,to:y(o).viewport.value},[$(y(at),Fe({ref:y(i),role:"alert","aria-live":"off","aria-atomic":"true",tabindex:"0","data-radix-vue-collection-item":""},w.$attrs,{as:w.as,"as-child":w.asChild,"data-state":w.open?"open":"closed","data-swipe-direction":y(o).swipeDirection.value,style:{userSelect:"none",touchAction:"none"},onPointerdown:b[0]||(b[0]=lt(_=>{a.value={x:_.clientX,y:_.clientY}},["left"])),onPointermove:b[1]||(b[1]=_=>{if(!a.value)return;const x=_.clientX-a.value.x,S=_.clientY-a.value.y,I=!!l.value,P=["left","right"].includes(y(o).swipeDirection.value),R=["left","up"].includes(y(o).swipeDirection.value)?Math.min:Math.max,O=P?R(0,x):0,M=P?0:R(0,S),E=_.pointerType==="touch"?10:2,L={x:O,y:M},j={originalEvent:_,delta:L};I?(l.value=L,y(Wg)(y(sde),F=>r("swipeMove",F),j)):y(nD)(L,y(o).swipeDirection.value,E)?(l.value=L,y(Wg)(y(ide),F=>r("swipeStart",F),j),_.target.setPointerCapture(_.pointerId)):(Math.abs(x)>E||Math.abs(S)>E)&&(a.value=null)}),onPointerup:b[2]||(b[2]=_=>{const x=l.value,S=_.target;if(S.hasPointerCapture(_.pointerId)&&S.releasePointerCapture(_.pointerId),l.value=null,a.value=null,x){const I=_.currentTarget,P={originalEvent:_,delta:x};y(nD)(x,y(o).swipeDirection.value,y(o).swipeThreshold.value)?y(Wg)(y(ade),R=>r("swipeEnd",R),P):y(Wg)(y(ode),R=>r("swipeCancel",R),P),I==null||I.addEventListener("click",R=>R.preventDefault(),{once:!0})}})}),{default:H(()=>[ce(w.$slots,"default",{remaining:h.value,duration:u.value})]),_:3},16,["as","as-child","data-state","data-swipe-direction"])],8,["to"])):fe("",!0)],64))}}),hde=ee({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,default:!0},forceMount:{type:Boolean},type:{default:"foreground"},open:{type:Boolean,default:void 0},duration:{},asChild:{type:Boolean},as:{default:"li"}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{emit:t}){const n=e,r=t,{forwardRef:i}=Ge(),s=ri(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return(o,a)=>(k(),X(y(ru),{present:o.forceMount||y(s)},{default:H(()=>[$(fde,Fe({ref:y(i),open:y(s),type:o.type,as:o.as,"as-child":o.asChild,duration:o.duration},o.$attrs,{onClose:a[0]||(a[0]=l=>s.value=!1),onPause:a[1]||(a[1]=l=>r("pause")),onResume:a[2]||(a[2]=l=>r("resume")),onEscapeKeyDown:a[3]||(a[3]=l=>r("escapeKeyDown",l)),onSwipeStart:a[4]||(a[4]=l=>{r("swipeStart",l),l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:a[5]||(a[5]=l=>{const{x:u,y:c}=l.detail.delta,d=l.currentTarget;d.setAttribute("data-swipe","move"),d.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:a[6]||(a[6]=l=>{const u=l.currentTarget;u.setAttribute("data-swipe","cancel"),u.style.removeProperty("--radix-toast-swipe-move-x"),u.style.removeProperty("--radix-toast-swipe-move-y"),u.style.removeProperty("--radix-toast-swipe-end-x"),u.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:a[7]||(a[7]=l=>{const{x:u,y:c}=l.detail.delta,d=l.currentTarget;d.setAttribute("data-swipe","end"),d.style.removeProperty("--radix-toast-swipe-move-x"),d.style.removeProperty("--radix-toast-swipe-move-y"),d.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),s.value=!1})}),{default:H(({remaining:l,duration:u})=>[ce(o.$slots,"default",{remaining:l,duration:u,open:y(s)})]),_:3},16,["open","type","as","as-child","duration"])]),_:3},8,["present"]))}}),pde=ee({__name:"ToastAnnounceExclude",props:{altText:{},asChild:{type:Boolean},as:{}},setup(e){return(t,n)=>(k(),X(y(at),{as:t.as,"as-child":t.asChild,"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":t.altText||void 0},{default:H(()=>[ce(t.$slots,"default")]),_:3},8,["as","as-child","data-radix-toast-announce-alt"]))}}),mde=ee({__name:"ToastClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=cde(),{forwardRef:r}=Ge();return(i,s)=>(k(),X(pde,{"as-child":""},{default:H(()=>[$(y(at),Fe(t,{ref:y(r),type:i.as==="button"?"button":void 0,onClick:s[0]||(s[0]=o=>y(n).onClose())}),{default:H(()=>[ce(i.$slots,"default")]),_:3},16,["type"])]),_:3}))}}),rD=ee({__name:"FocusProxy",emits:["focusFromOutsideViewport"],setup(e,{emit:t}){const n=t,r=A0();return(i,s)=>(k(),X(y(O0),{"aria-hidden":"true",tabindex:"0",style:{position:"fixed"},onFocus:s[0]||(s[0]=o=>{var a;const l=o.relatedTarget;!((a=y(r).viewport.value)!=null&&a.contains(l))&&n("focusFromOutsideViewport")})},{default:H(()=>[ce(i.$slots,"default")]),_:3}))}}),gde=ee({inheritAttrs:!1,__name:"ToastViewport",props:{hotkey:{default:()=>["F8"]},label:{type:[String,Function],default:"Notifications ({hotkey})"},asChild:{type:Boolean},as:{default:"ol"}},setup(e){const t=e,{hotkey:n,label:r}=fn(t),{forwardRef:i,currentElement:s}=Ge(),{createCollection:o}=Zf(),a=o(s),l=A0(),u=te(()=>l.toastCount.value>0),c=U(),d=U(),f=te(()=>n.value.join("+").replace(/Key/g,"").replace(/Digit/g,""));nO(n.value,()=>{s.value.focus()}),nt(()=>{l.onViewportChange(s.value)}),Mt(p=>{const m=s.value;if(u.value&&m){const g=()=>{if(!l.isClosePausedRef.value){const x=new CustomEvent(DE);m.dispatchEvent(x),l.isClosePausedRef.value=!0}},v=()=>{if(l.isClosePausedRef.value){const x=new CustomEvent(NE);m.dispatchEvent(x),l.isClosePausedRef.value=!1}},w=x=>{!m.contains(x.relatedTarget)&&v()},b=()=>{m.contains(ir())||v()},_=x=>{var S,I,P;const R=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!R){const O=ir(),M=x.shiftKey;if(x.target===m&&M){(S=c.value)==null||S.focus();return}const E=h({tabbingDirection:M?"backwards":"forwards"}),L=E.findIndex(j=>j===O);ty(E.slice(L+1))?x.preventDefault():M?(I=c.value)==null||I.focus():(P=d.value)==null||P.focus()}};m.addEventListener("focusin",g),m.addEventListener("focusout",w),m.addEventListener("pointermove",g),m.addEventListener("pointerleave",b),m.addEventListener("keydown",_),window.addEventListener("blur",g),window.addEventListener("focus",v),p(()=>{m.removeEventListener("focusin",g),m.removeEventListener("focusout",w),m.removeEventListener("pointermove",g),m.removeEventListener("pointerleave",b),m.removeEventListener("keydown",_),window.removeEventListener("blur",g),window.removeEventListener("focus",v)})}});function h({tabbingDirection:p}){const m=a.value.map(g=>{const v=[g,...aO(g)];return p==="forwards"?v:v.reverse()});return(p==="forwards"?m.reverse():m).flat()}return(p,m)=>(k(),X(y(Lle),{role:"region","aria-label":typeof y(r)=="string"?y(r).replace("{hotkey}",f.value):y(r)(f.value),tabindex:"-1",style:xn({pointerEvents:u.value?void 0:"none"})},{default:H(()=>[u.value?(k(),X(rD,{key:0,ref:g=>{c.value=y(Ns)(g)},onFocusFromOutsideViewport:m[0]||(m[0]=()=>{const g=h({tabbingDirection:"forwards"});y(ty)(g)})},null,512)):fe("",!0),$(y(at),Fe({ref:y(i),tabindex:"-1",as:p.as,"as-child":p.asChild},p.$attrs),{default:H(()=>[ce(p.$slots,"default")]),_:3},16,["as","as-child"]),u.value?(k(),X(rD,{key:1,ref:g=>{d.value=y(Ns)(g)},onFocusFromOutsideViewport:m[1]||(m[1]=()=>{const g=h({tabbingDirection:"backwards"});y(ty)(g)})},null,512)):fe("",!0)]),_:3},8,["aria-label","style"]))}}),vde=ee({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(at),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),yde=ee({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return Ge(),(n,r)=>(k(),X(y(at),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),bde=ee({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},emits:["update:pressed"],setup(e,{emit:t}){const n=e,r=t;Ge();const i=ri(n,"pressed",r,{defaultValue:n.defaultValue,passive:n.pressed===void 0});function s(){i.value=!i.value}const o=te(()=>i.value?"on":"off");return(a,l)=>(k(),X(y(at),{type:a.as==="button"?"button":void 0,"as-child":n.asChild,as:a.as,"aria-pressed":y(i),"data-state":o.value,"data-disabled":a.disabled?"":void 0,disabled:a.disabled,onClick:s},{default:H(()=>[ce(a.$slots,"default",{pressed:y(i)})]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),[wde,_de]=rn("ToggleGroupRoot"),Sde=ee({__name:"ToggleGroupRoot",props:{rovingFocus:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},orientation:{},dir:{},loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,{loop:i,rovingFocus:s,disabled:o,dir:a}=fn(n),l=nu(a),{forwardRef:u}=Ge(),{modelValue:c,changeModelValue:d,isSingle:f}=Ole(n,r);return _de({isSingle:f,modelValue:c,changeModelValue:d,dir:l,orientation:n.orientation,loop:i,rovingFocus:s,disabled:o}),(h,p)=>(k(),X(Rr(y(s)?y(vO):y(at)),{"as-child":"",orientation:y(s)?h.orientation:void 0,dir:y(l),loop:y(s)?y(i):void 0},{default:H(()=>[$(y(at),{ref:y(u),role:"group","as-child":h.asChild,as:h.as},{default:H(()=>[ce(h.$slots,"default",{modelValue:y(c)})]),_:3},8,["as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),xde=ee({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=wde(),r=te(()=>{var a;return((a=n.disabled)==null?void 0:a.value)||t.disabled}),i=te(()=>{var a;return(a=n.modelValue.value)==null?void 0:a.includes(t.value)}),s=te(()=>{var a;return n.isSingle.value?n.modelValue.value===t.value:(a=n.modelValue.value)==null?void 0:a.includes(t.value)}),{forwardRef:o}=Ge();return(a,l)=>(k(),X(Rr(y(n).rovingFocus.value?y(QH):y(at)),{"as-child":"",focusable:!r.value,active:i.value},{default:H(()=>[$(y(bde),Fe(t,{ref:y(o),disabled:r.value,pressed:s.value,"onUpdate:pressed":l[0]||(l[0]=u=>y(n).changeModelValue(a.value))}),{default:H(()=>[ce(a.$slots,"default")]),_:3},16,["disabled","pressed"])]),_:3},8,["focusable","active"]))}}),bV="tooltip.open",[wO,Ede]=rn("TooltipProvider"),Tde=ee({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,disableClosingTrigger:s,ignoreNonKeyboardFocus:o,disabled:a}=fn(t);Ge();const l=U(!0),u=U(!1),{start:c,stop:d}=tO(()=>{l.value=!0},r,{immediate:!1});return Ede({isOpenDelayed:l,delayDuration:n,onOpen(){d(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:i,disableClosingTrigger:s,disabled:a,ignoreNonKeyboardFocus:o}),(f,h)=>ce(f.$slots,"default")}}),[P0,kde]=rn("TooltipRoot"),Cde=ee({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=t;Ge();const i=wO(),s=te(()=>n.disableHoverableContent??i.disableHoverableContent.value),o=te(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),a=te(()=>n.disabled??i.disabled.value),l=te(()=>n.delayDuration??i.delayDuration.value),u=te(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),c=ri(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});He(c,b=>{i.onClose&&(b?(i.onOpen(),document.dispatchEvent(new CustomEvent(bV))):i.onClose())});const d=U(!1),f=U(),h=te(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:p,stop:m}=tO(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function g(){m(),d.value=!1,c.value=!0}function v(){m(),c.value=!1}function w(){p()}return kde({contentId:"",open:c,stateAttribute:h,trigger:f,onTriggerChange(b){f.value=b},onTriggerEnter(){i.isOpenDelayed.value?w():g()},onTriggerLeave(){s.value?v():m()},onOpen:g,onClose:v,disableHoverableContent:s,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,_)=>(k(),X(y(cO),null,{default:H(()=>[ce(b.$slots,"default",{open:y(c)})]),_:3}))}}),Ode=ee({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=P0(),r=wO();n.contentId||(n.contentId=xo(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:s}=Ge(),o=U(!1),a=U(!1),l=te(()=>n.disabled.value?{}:{click:m,focus:h,pointermove:d,pointerleave:f,pointerdown:c,blur:p});nt(()=>{n.onTriggerChange(s.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(g){g.pointerType!=="touch"&&!a.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),a.value=!0)}function f(){n.onTriggerLeave(),a.value=!1}function h(g){var v,w;o.value||n.ignoreNonKeyboardFocus.value&&!((w=(v=g.target).matches)!=null&&w.call(v,":focus-visible"))||n.onOpen()}function p(){n.onClose()}function m(){n.disableClosingTrigger.value||n.onClose()}return(g,v)=>(k(),X(y(dO),{"as-child":""},{default:H(()=>[$(y(at),Fe({ref:y(i),"aria-describedby":y(n).open.value?y(n).contentId:void 0,"data-state":y(n).stateAttribute.value,as:g.as,"as-child":t.asChild,"data-grace-area-trigger":""},Z8(l.value)),{default:H(()=>[ce(g.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),wV=ee({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,i=P0(),{forwardRef:s}=Ge(),o=HB(),a=te(()=>{var c;return(c=o.default)==null?void 0:c.call(o)}),l=te(()=>{var c;if(n.ariaLabel)return n.ariaLabel;let d="";function f(h){typeof h.children=="string"&&h.type!==er?d+=h.children:Array.isArray(h.children)&&h.children.forEach(p=>f(p))}return(c=a.value)==null||c.forEach(h=>f(h)),d}),u=te(()=>{const{ariaLabel:c,...d}=n;return d});return nt(()=>{zl(window,"scroll",c=>{const d=c.target;d!=null&&d.contains(i.trigger.value)&&i.onClose()}),zl(window,bV,i.onClose)}),(c,d)=>(k(),X(y(C0),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=f=>r("escapeKeyDown",f)),onPointerDownOutside:d[1]||(d[1]=f=>{var h;y(i).disableClosingTrigger.value&&(h=y(i).trigger.value)!=null&&h.contains(f.target)&&f.preventDefault(),r("pointerDownOutside",f)}),onFocusOutside:d[2]||(d[2]=lt(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=f=>y(i).onClose())},{default:H(()=>[$(y(fO),Fe({ref:y(s),"data-state":y(i).stateAttribute.value},{...c.$attrs,...u.value},{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)"}}),{default:H(()=>[ce(c.$slots,"default"),$(y(O0),{id:y(i).contentId,role:"tooltip"},{default:H(()=>[Ye(ye(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Rde=ee({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=ai(e),{forwardRef:n,currentElement:r}=Ge(),{trigger:i,onClose:s}=P0(),o=wO(),{isPointerInTransit:a,onPointerExit:l}=cle(i,r);return o.isPointerInTransitRef=a,l(()=>{s()}),(u,c)=>(k(),X(wV,Fe({ref:y(n)},y(t)),{default:H(()=>[ce(u.$slots,"default")]),_:3},16))}}),Ide=ee({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,i=P0(),s=hn(n,r),{forwardRef:o}=Ge();return(a,l)=>(k(),X(y(ru),{present:a.forceMount||y(i).open.value},{default:H(()=>[(k(),X(Rr(y(i).disableHoverableContent.value?wV:Rde),Fe({ref:y(o)},y(s)),{default:H(()=>[ce(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ade=ee({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Qm),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}});function _V(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_V(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function SV(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_V(e))&&(r&&(r+=" "),r+=t);return r}const _O="-",Pde=e=>{const t=Dde(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(_O);return a[0]===""&&a.length!==1&&a.shift(),xV(a,t)||Mde(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},xV=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?xV(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(_O);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},iD=/^\[(.+)\]$/,Mde=e=>{if(iD.test(e)){const t=iD.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Dde=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Lde(Object.entries(e.classGroups),n).forEach(([s,o])=>{LE(o,r,s,t)}),r},LE=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:sD(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Nde(i)){LE(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{LE(o,sD(t,s),n,r)})})},sD=(e,t)=>{let n=e;return t.split(_O).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Nde=e=>e.isThemeGetter,Lde=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,Fde=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},EV="!",Bde=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let g=0;g<a.length;g++){let v=a[g];if(u===0){if(v===i&&(r||a.slice(g,g+s)===t)){l.push(a.slice(c,g)),c=g+s;continue}if(v==="/"){d=g;continue}}v==="["?u++:v==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(EV),p=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},zde=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},$de=e=>({cache:Fde(e.cacheSize),parseClassName:Bde(e),...Pde(e)}),Hde=/\s+/,Vde=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(Hde);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let p=!!h,m=r(p?f.substring(0,h):f);if(!m){if(!p){a=u+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=u+(a.length>0?" "+a:a);continue}p=!1}const g=zde(c).join(":"),v=d?g+EV:g,w=v+m;if(s.includes(w))continue;s.push(w);const b=i(m,p);for(let _=0;_<b.length;++_){const x=b[_];s.push(v+x)}a=u+(a.length>0?" "+a:a)}return a};function jde(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=TV(t))&&(r&&(r+=" "),r+=n);return r}const TV=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=TV(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ude(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=$de(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=Vde(l,n);return i(l,c),c}return function(){return s(jde.apply(null,arguments))}}const _n=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kV=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wde=/^\d+\/\d+$/,qde=new Set(["px","full","screen"]),Gde=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kde=/\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$/,Yde=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Xde=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jde=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>Vd(e)||qde.has(e)||Wde.test(e),La=e=>th(e,"length",sfe),Vd=e=>!!e&&!Number.isNaN(Number(e)),ES=e=>th(e,"number",Vd),wh=e=>!!e&&Number.isInteger(Number(e)),Qde=e=>e.endsWith("%")&&Vd(e.slice(0,-1)),xt=e=>kV.test(e),Fa=e=>Gde.test(e),Zde=new Set(["length","size","percentage"]),efe=e=>th(e,Zde,CV),tfe=e=>th(e,"position",CV),nfe=new Set(["image","url"]),rfe=e=>th(e,nfe,afe),ife=e=>th(e,"",ofe),_h=()=>!0,th=(e,t,n)=>{const r=kV.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},sfe=e=>Kde.test(e)&&!Yde.test(e),CV=()=>!1,ofe=e=>Xde.test(e),afe=e=>Jde.test(e),lfe=()=>{const e=_n("colors"),t=_n("spacing"),n=_n("blur"),r=_n("brightness"),i=_n("borderColor"),s=_n("borderRadius"),o=_n("borderSpacing"),a=_n("borderWidth"),l=_n("contrast"),u=_n("grayscale"),c=_n("hueRotate"),d=_n("invert"),f=_n("gap"),h=_n("gradientColorStops"),p=_n("gradientColorStopPositions"),m=_n("inset"),g=_n("margin"),v=_n("opacity"),w=_n("padding"),b=_n("saturate"),_=_n("scale"),x=_n("sepia"),S=_n("skew"),I=_n("space"),P=_n("translate"),R=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",xt,t],E=()=>[xt,t],L=()=>["",Lo,La],j=()=>["auto",Vd,xt],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",xt],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[Vd,xt];return{cacheSize:500,separator:":",theme:{colors:[_h],spacing:[Lo,La],blur:["none","",Fa,xt],brightness:le(),borderColor:[e],borderRadius:["none","","full",Fa,xt],borderSpacing:E(),borderWidth:L(),contrast:le(),grayscale:ne(),hueRotate:le(),invert:ne(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Qde,La],inset:M(),margin:M(),opacity:le(),padding:E(),saturate:le(),scale:le(),sepia:ne(),skew:le(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",xt]}],container:["container"],columns:[{columns:[Fa]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"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"],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:[...F(),xt]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wh,xt]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xt]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",wh,xt]}],"grid-cols":[{"grid-cols":[_h]}],"col-start-end":[{col:["auto",{span:["full",wh,xt]},xt]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[_h]}],"row-start-end":[{row:["auto",{span:[wh,xt]},xt]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xt,t]}],"min-w":[{"min-w":[xt,t,"min","max","fit"]}],"max-w":[{"max-w":[xt,t,"none","full","min","max","fit","prose",{screen:[Fa]},Fa]}],h:[{h:[xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fa,La]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ES]}],"font-family":[{font:[_h]}],"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:["tighter","tight","normal","wide","wider","widest",xt]}],"line-clamp":[{"line-clamp":["none",Vd,ES]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Lo,xt]}],"list-image":[{"list-image":["none",xt]}],"list-style-type":[{list:["none","disc","decimal",xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Lo,La]}],"underline-offset":[{"underline-offset":["auto",Lo,xt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),tfe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",efe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rfe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Lo,xt]}],"outline-w":[{outline:[Lo,La]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Lo,La]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fa,ife]}],"shadow-color":[{shadow:[_h]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fa,xt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xt]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",xt]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[wh,xt]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Lo,La,ES]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},ufe=Ude(lfe);function st(...e){return ufe(SV(e))}function pp(e,t){t.value=typeof e=="function"?e(t.value):e}const cfe=ee({__name:"Toast",props:{class:{},variant:{},onOpenChange:{type:Function},defaultOpen:{type:Boolean},forceMount:{type:Boolean},type:{},open:{type:Boolean},duration:{},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(hde),Fe(y(s),{class:y(st)(y(Cfe)({variant:o.variant}),n.class),"onUpdate:open":o.onOpenChange}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class","onUpdate:open"]))}}),dfe=ee({__name:"ToastViewport",props:{hotkey:{},label:{type:[String,Function]},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(gde),Fe(n.value,{class:y(st)("fixed top-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:right-0 sm:flex-col md:max-w-[420px]",t.class)}),null,16,["class"]))}});/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ffe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var qg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hfe=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:r,iconNode:i,name:s,class:o,...a},{slots:l})=>We("svg",{...qg,width:e||qg.width,height:e||qg.height,stroke:r||qg.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${ffe(s??"icon")}`],...a},[...i.map(u=>We(...u)),...l.default?[l.default()]:[]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const In=(e,t)=>(n,{slots:r})=>We(hfe,{...n,iconNode:t,name:e},r);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pfe=In("AlignCenterHorizontalIcon",[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SO=In("AlignCenterIcon",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mfe=In("AlignEndHorizontalIcon",[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xO=In("AlignLeftIcon",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OV=In("AlignRightIcon",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gfe=In("AlignStartHorizontalIcon",[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ss=In("ArrowDownIcon",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xs=In("ArrowUpIcon",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ny=In("BoldIcon",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RV=In("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const IV=In("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vfe=In("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yfe=In("ChevronUpIcon",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bfe=In("CircleArrowRightIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wfe=In("CircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ry=In("ItalicIcon",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oD=In("Link2OffIcon",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aD=In("Link2Icon",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fb=In("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _fe=In("LockKeyholeIcon",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lD=In("PaintbrushIcon",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sfe=In("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xfe=In("UnderlineIcon",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/** * @license lucide-vue-next v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const EO=In("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Efe=ee({__name:"ToastClose",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(mde),Fe(n.value,{class:y(st)("absolute right-2 top-2 rounded-md p-1 text-slate-950/50 opacity-0 transition-opacity hover:text-slate-950 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:text-slate-50/50 dark:hover:text-slate-50",t.class)}),{default:H(()=>[$(y(EO),{class:"h-4 w-4"})]),_:1},16,["class"]))}}),Tfe=ee({__name:"ToastTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(vde),Fe(n.value,{class:y(st)("text-sm font-semibold",t.class)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),uD=ee({__name:"ToastDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(yde),Fe({class:y(st)("text-sm opacity-90",t.class)},n.value),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),kfe=ee({__name:"ToastProvider",props:{label:{},duration:{},swipeDirection:{},swipeThreshold:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(rde),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),cD=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dD=SV,M0=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return dD(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=cD(c)||cD(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...a}[m]):{...s,...a}[m]===g})?[...u,d,f]:u},[]);return dD(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Cfe=M0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border border-slate-200 p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[--radix-toast-swipe-end-x] data-[swipe=move]:translate-x-[--radix-toast-swipe-move-x] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-slate-800",{variants:{variant:{default:"border bg-white text-slate-950 dark:bg-slate-950 dark:text-slate-50",destructive:"destructive group border-red-500 bg-red-500 text-slate-50 dark:border-red-900 dark:bg-red-900 dark:text-slate-50",success:"border bg-white text-primary-500 border-primary-500"}},defaultVariants:{variant:"default"}}),Ofe={class:"grid gap-1"},Rfe=ee({__name:"Toaster",setup(e){const{toasts:t}=$s();return(n,r)=>(k(),X(y(kfe),{duration:1e3},{default:H(()=>[(k(!0),W(je,null,Ot(y(t),i=>(k(),X(y(cfe),{key:i.id,variant:i.variant,"on-open-change":i.onOpenChange},{default:H(()=>[A("div",Ofe,[i.title?(k(),X(y(Tfe),{key:0},{default:H(()=>[Ye(ye(i.title),1)]),_:2},1024)):fe("",!0),i.description?(k(),W(je,{key:1},[cc(i.description)?(k(),X(y(uD),{key:0},{default:H(()=>[(k(),X(Rr(i.description)))]),_:2},1024)):(k(),X(y(uD),{key:1},{default:H(()=>[Ye(ye(i.description),1)]),_:2},1024))],64)):fe("",!0),$(y(Efe))]),(k(),X(Rr(i.action)))]),_:2},1032,["variant","on-open-change"]))),128)),$(y(dfe))]),_:1}))}}),fD=ee({__name:"App",setup(e){return(t,n)=>{const r=En("RouterView");return k(),W(je,null,[$(r),$(Rfe)],64)}}});/*! * shared v9.10.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */const hD=typeof window<"u",iu=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Ife=(e,t,n)=>Afe({l:e,k:t,s:n}),Afe=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Fr=e=>typeof e=="number"&&isFinite(e),Pfe=e=>PV(e)==="[object Date]",hb=e=>PV(e)==="[object RegExp]",D0=e=>Kt(e)&&Object.keys(e).length===0,jr=Object.assign;let pD;const TO=()=>pD||(pD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mD(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const Mfe=Object.prototype.hasOwnProperty;function pb(e,t){return Mfe.call(e,t)}const nr=Array.isArray,Nn=e=>typeof e=="function",tt=e=>typeof e=="string",zn=e=>typeof e=="boolean",nn=e=>e!==null&&typeof e=="object",Dfe=e=>nn(e)&&Nn(e.then)&&Nn(e.catch),AV=Object.prototype.toString,PV=e=>AV.call(e),Kt=e=>{if(!nn(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},Nfe=e=>e==null?"":nr(e)||Kt(e)&&e.toString===AV?JSON.stringify(e,null,2):String(e);function Lfe(e,t=""){return e.reduce((n,r,i)=>i===0?n+r:n+t+r,"")}function kO(e){let t=e;return()=>++t}function Ffe(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Gg=e=>!nn(e)||nr(e);function iy(e,t){if(Gg(e)||Gg(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:i}=n.pop();Object.keys(r).forEach(s=>{Gg(r[s])||Gg(i[s])?i[s]=r[s]:n.push({src:r[s],des:i[s]})})}}/*! * message-compiler v9.10.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */const Bfe=/\{([0-9a-zA-Z]+)\}/g;function zfe(e,...t){return t.length===1&&$fe(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Bfe,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const $fe=e=>e!==null&&typeof e=="object",wr={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},Hfe={[wr.EXPECTED_TOKEN]:"Expected token: '{0}'",[wr.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[wr.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[wr.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[wr.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[wr.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[wr.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[wr.EMPTY_PLACEHOLDER]:"Empty placeholder",[wr.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[wr.INVALID_LINKED_FORMAT]:"Invalid linked format",[wr.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[wr.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[wr.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[wr.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[wr.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[wr.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function MV(e,t,n={}){const{domain:r,messages:i,args:s}=n,o=zfe((i||Hfe)[e]||"",...s||[]),a=new SyntaxError(String(o));return a.code=e,a.domain=r,a}/*! * core-base v9.10.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */function Vfe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(TO().__INTLIFY_PROD_DEVTOOLS__=!1)}const su=[];su[0]={w:[0],i:[3,0],"[":[4],o:[7]};su[1]={w:[1],".":[2],"[":[4],o:[7]};su[2]={w:[2],i:[3,0],0:[3,0]};su[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};su[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};su[5]={"'":[4,0],o:8,l:[5,0]};su[6]={'"':[4,0],o:8,l:[6,0]};const jfe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Ufe(e){return jfe.test(e)}function Wfe(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function qfe(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Gfe(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Ufe(t)?Wfe(t):"*"+t}function Kfe(e){const t=[];let n=-1,r=0,i=0,s,o,a,l,u,c,d;const f=[];f[0]=()=>{o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=Gfe(o),o===!1))return!1;f[1]()}};function h(){const p=e[n+1];if(r===5&&p==="'"||r===6&&p==='"')return n++,a="\\"+p,f[0](),!0}for(;r!==null;)if(n++,s=e[n],!(s==="\\"&&h())){if(l=qfe(s),d=su[r],u=d[l]||d.l||8,u===8||(r=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(a=s,c()===!1))))return;if(r===7)return t}}const gD=new Map;function Yfe(e,t){return nn(e)?e[t]:null}function Xfe(e,t){if(!nn(e))return null;let n=gD.get(t);if(n||(n=Kfe(t),n&&gD.set(t,n)),!n)return null;const r=n.length;let i=e,s=0;for(;s<r;){const o=i[n[s]];if(o===void 0||Nn(i))return null;i=o,s++}return i}const Jfe=e=>e,Qfe=e=>"",Zfe="text",ehe=e=>e.length===0?"":Lfe(e),the=Nfe;function vD(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function nhe(e){const t=Fr(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Fr(e.named.count)||Fr(e.named.n))?Fr(e.named.count)?e.named.count:Fr(e.named.n)?e.named.n:t:t}function rhe(e,t){t.count||(t.count=e),t.n||(t.n=e)}function ihe(e={}){const t=e.locale,n=nhe(e),r=nn(e.pluralRules)&&tt(t)&&Nn(e.pluralRules[t])?e.pluralRules[t]:vD,i=nn(e.pluralRules)&&tt(t)&&Nn(e.pluralRules[t])?vD:void 0,s=v=>v[r(n,v.length,i)],o=e.list||[],a=v=>o[v],l=e.named||{};Fr(e.pluralIndex)&&rhe(n,l);const u=v=>l[v];function c(v){const w=Nn(e.messages)?e.messages(v):nn(e.messages)?e.messages[v]:!1;return w||(e.parent?e.parent.message(v):Qfe)}const d=v=>e.modifiers?e.modifiers[v]:Jfe,f=Kt(e.processor)&&Nn(e.processor.normalize)?e.processor.normalize:ehe,h=Kt(e.processor)&&Nn(e.processor.interpolate)?e.processor.interpolate:the,p=Kt(e.processor)&&tt(e.processor.type)?e.processor.type:Zfe,g={list:a,named:u,plural:s,linked:(v,...w)=>{const[b,_]=w;let x="text",S="";w.length===1?nn(b)?(S=b.modifier||S,x=b.type||x):tt(b)&&(S=b||S):w.length===2&&(tt(b)&&(S=b||S),tt(_)&&(x=_||x));const I=c(v)(g),P=x==="vnode"&&nr(I)&&S?I[0]:I;return S?d(S)(P,x):P},message:c,type:p,interpolate:h,normalize:f,values:jr({},o,l)};return g}let lm=null;function she(e){lm=e}function ohe(e,t,n){lm&&lm.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const ahe=lhe("function:translate");function lhe(e){return t=>lm&&lm.emit(e,t)}const uhe={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},DV=wr.__EXTEND_POINT__,yu=kO(DV),lo={INVALID_ARGUMENT:DV,INVALID_DATE_ARGUMENT:yu(),INVALID_ISO_DATE_ARGUMENT:yu(),NOT_SUPPORT_NON_STRING_MESSAGE:yu(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:yu(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:yu(),NOT_SUPPORT_LOCALE_TYPE:yu(),__EXTEND_POINT__:yu()};function na(e){return MV(e,null,void 0)}function CO(e,t){return t.locale!=null?yD(t.locale):yD(e.locale)}let TS;function yD(e){if(tt(e))return e;if(Nn(e)){if(e.resolvedOnce&&TS!=null)return TS;if(e.constructor.name==="Function"){const t=e();if(Dfe(t))throw na(lo.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return TS=t}else throw na(lo.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw na(lo.NOT_SUPPORT_LOCALE_TYPE)}function che(e,t,n){return[...new Set([n,...nr(t)?t:nn(t)?Object.keys(t):tt(t)?[t]:[n]])]}function NV(e,t,n){const r=tt(n)?n:mb,i=e;i.__localeChainCache||(i.__localeChainCache=new Map);let s=i.__localeChainCache.get(r);if(!s){s=[];let o=[n];for(;nr(o);)o=bD(s,o,t);const a=nr(t)||!Kt(t)?t:t.default?t.default:null;o=tt(a)?[a]:a,nr(o)&&bD(s,o,!1),i.__localeChainCache.set(r,s)}return s}function bD(e,t,n){let r=!0;for(let i=0;i<t.length&&zn(r);i++){const s=t[i];tt(s)&&(r=dhe(e,t[i],n))}return r}function dhe(e,t,n){let r;const i=t.split("-");do{const s=i.join("-");r=fhe(e,s,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function fhe(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(nr(n)||Kt(n))&&n[i]&&(r=n[i])}return r}const hhe="9.10.2",N0=-1,mb="en-US",wD="",_D=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function phe(){return{upper:(e,t)=>t==="text"&&tt(e)?e.toUpperCase():t==="vnode"&&nn(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&tt(e)?e.toLowerCase():t==="vnode"&&nn(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&tt(e)?_D(e):t==="vnode"&&nn(e)&&"__v_isVNode"in e?_D(e.children):e}}let mhe,LV;function ghe(e){LV=e}let FV;function vhe(e){FV=e}let BV=null;const yhe=e=>{BV=e},bhe=()=>BV;let zV=null;const SD=e=>{zV=e},whe=()=>zV;let xD=0;function _he(e={}){const t=Nn(e.onWarn)?e.onWarn:Ffe,n=tt(e.version)?e.version:hhe,r=tt(e.locale)||Nn(e.locale)?e.locale:mb,i=Nn(r)?mb:r,s=nr(e.fallbackLocale)||Kt(e.fallbackLocale)||tt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=Kt(e.messages)?e.messages:{[i]:{}},a=Kt(e.datetimeFormats)?e.datetimeFormats:{[i]:{}},l=Kt(e.numberFormats)?e.numberFormats:{[i]:{}},u=jr({},e.modifiers||{},phe()),c=e.pluralRules||{},d=Nn(e.missing)?e.missing:null,f=zn(e.missingWarn)||hb(e.missingWarn)?e.missingWarn:!0,h=zn(e.fallbackWarn)||hb(e.fallbackWarn)?e.fallbackWarn:!0,p=!!e.fallbackFormat,m=!!e.unresolving,g=Nn(e.postTranslation)?e.postTranslation:null,v=Kt(e.processor)?e.processor:null,w=zn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter,_=Nn(e.messageCompiler)?e.messageCompiler:mhe,x=Nn(e.messageResolver)?e.messageResolver:LV||Yfe,S=Nn(e.localeFallbacker)?e.localeFallbacker:FV||che,I=nn(e.fallbackContext)?e.fallbackContext:void 0,P=e,R=nn(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,O=nn(P.__numberFormatters)?P.__numberFormatters:new Map,M=nn(P.__meta)?P.__meta:{};xD++;const E={version:n,cid:xD,locale:r,fallbackLocale:s,messages:o,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:p,unresolving:m,postTranslation:g,processor:v,warnHtmlMessage:w,escapeParameter:b,messageCompiler:_,messageResolver:x,localeFallbacker:S,fallbackContext:I,onWarn:t,__meta:M};return E.datetimeFormats=a,E.numberFormats=l,E.__datetimeFormatters=R,E.__numberFormatters=O,__INTLIFY_PROD_DEVTOOLS__&&ohe(E,n,M),E}function OO(e,t,n,r,i){const{missing:s,onWarn:o}=e;if(s!==null){const a=s(e,n,t,i);return tt(a)?a:t}else return t}function Sh(e,t,n){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const mf=e=>nn(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e),ED=()=>"",Gi=e=>Nn(e);function TD(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:s,fallbackLocale:o,messages:a}=e,[l,u]=FE(...t),c=zn(u.missingWarn)?u.missingWarn:e.missingWarn,d=zn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=zn(u.escapeParameter)?u.escapeParameter:e.escapeParameter,h=!!u.resolvedMessage,p=tt(u.default)||zn(u.default)?zn(u.default)?s?l:()=>l:u.default:n?s?l:()=>l:"",m=n||p!=="",g=CO(e,u);f&&She(u);let[v,w,b]=h?[l,g,a[g]||{}]:$V(e,l,g,o,d,c),_=v,x=l;if(!h&&!(tt(_)||mf(_)||Gi(_))&&m&&(_=p,x=_),!h&&(!(tt(_)||mf(_)||Gi(_))||!tt(w)))return i?N0:l;let S=!1;const I=()=>{S=!0},P=Gi(_)?_:HV(e,l,w,_,x,I);if(S)return _;const R=The(e,w,b,u),O=ihe(R),M=xhe(e,P,O),E=r?r(M,l):M;if(__INTLIFY_PROD_DEVTOOLS__){const L={timestamp:Date.now(),key:tt(l)?l:Gi(_)?_.key:"",locale:w||(Gi(_)?_.locale:""),format:tt(_)?_:Gi(_)?_.source:"",message:E};L.meta=jr({},e.__meta,bhe()||{}),ahe(L)}return E}function She(e){nr(e.list)?e.list=e.list.map(t=>tt(t)?mD(t):t):nn(e.named)&&Object.keys(e.named).forEach(t=>{tt(e.named[t])&&(e.named[t]=mD(e.named[t]))})}function $V(e,t,n,r,i,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:u}=e,c=u(e,r,n);let d={},f,h=null;const p="translate";for(let m=0;m<c.length&&(f=c[m],d=o[f]||{},(h=l(d,t))===null&&(h=d[t]),!(tt(h)||mf(h)||Gi(h)));m++){const g=OO(e,t,f,s,p);g!==t&&(h=g)}return[h,f,d]}function HV(e,t,n,r,i,s){const{messageCompiler:o,warnHtmlMessage:a}=e;if(Gi(r)){const u=r;return u.locale=u.locale||n,u.key=u.key||t,u}if(o==null){const u=()=>r;return u.locale=n,u.key=t,u}const l=o(r,Ehe(e,n,i,r,a,s));return l.locale=n,l.key=t,l.source=r,l}function xhe(e,t,n){return t(n)}function FE(...e){const[t,n,r]=e,i={};if(!tt(t)&&!Fr(t)&&!Gi(t)&&!mf(t))throw na(lo.INVALID_ARGUMENT);const s=Fr(t)?String(t):(Gi(t),t);return Fr(n)?i.plural=n:tt(n)?i.default=n:Kt(n)&&!D0(n)?i.named=n:nr(n)&&(i.list=n),Fr(r)?i.plural=r:tt(r)?i.default=r:Kt(r)&&jr(i,r),[s,i]}function Ehe(e,t,n,r,i,s){return{locale:t,key:n,warnHtmlMessage:i,onError:o=>{throw s&&s(o),o},onCacheKey:o=>Ife(t,n,o)}}function The(e,t,n,r){const{modifiers:i,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:i,pluralRules:s,messages:h=>{let p=o(n,h);if(p==null&&c){const[,,m]=$V(c,h,t,a,l,u);p=o(m,h)}if(tt(p)||mf(p)){let m=!1;const v=HV(e,h,t,p,h,()=>{m=!0});return m?ED:v}else return Gi(p)?p:ED}};return e.processor&&(f.processor=e.processor),r.list&&(f.list=r.list),r.named&&(f.named=r.named),Fr(r.plural)&&(f.pluralIndex=r.plural),f}function kD(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:o}=e,{__datetimeFormatters:a}=e,[l,u,c,d]=BE(...t),f=zn(c.missingWarn)?c.missingWarn:e.missingWarn;zn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const h=!!c.part,p=CO(e,c),m=o(e,i,p);if(!tt(l)||l==="")return new Intl.DateTimeFormat(p,d).format(u);let g={},v,w=null;const b="datetime format";for(let S=0;S<m.length&&(v=m[S],g=n[v]||{},w=g[l],!Kt(w));S++)OO(e,l,v,f,b);if(!Kt(w)||!tt(v))return r?N0:l;let _=`${v}__${l}`;D0(d)||(_=`${_}__${JSON.stringify(d)}`);let x=a.get(_);return x||(x=new Intl.DateTimeFormat(v,jr({},w,d)),a.set(_,x)),h?x.formatToParts(u):x.format(u)}const VV=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function BE(...e){const[t,n,r,i]=e,s={};let o={},a;if(tt(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw na(lo.INVALID_ISO_DATE_ARGUMENT);const u=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();a=new Date(u);try{a.toISOString()}catch{throw na(lo.INVALID_ISO_DATE_ARGUMENT)}}else if(Pfe(t)){if(isNaN(t.getTime()))throw na(lo.INVALID_DATE_ARGUMENT);a=t}else if(Fr(t))a=t;else throw na(lo.INVALID_ARGUMENT);return tt(n)?s.key=n:Kt(n)&&Object.keys(n).forEach(l=>{VV.includes(l)?o[l]=n[l]:s[l]=n[l]}),tt(r)?s.locale=r:Kt(r)&&(o=r),Kt(i)&&(o=i),[s.key||"",a,s,o]}function CD(e,t,n){const r=e;for(const i in n){const s=`${t}__${i}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function OD(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:o}=e,{__numberFormatters:a}=e,[l,u,c,d]=zE(...t),f=zn(c.missingWarn)?c.missingWarn:e.missingWarn;zn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const h=!!c.part,p=CO(e,c),m=o(e,i,p);if(!tt(l)||l==="")return new Intl.NumberFormat(p,d).format(u);let g={},v,w=null;const b="number format";for(let S=0;S<m.length&&(v=m[S],g=n[v]||{},w=g[l],!Kt(w));S++)OO(e,l,v,f,b);if(!Kt(w)||!tt(v))return r?N0:l;let _=`${v}__${l}`;D0(d)||(_=`${_}__${JSON.stringify(d)}`);let x=a.get(_);return x||(x=new Intl.NumberFormat(v,jr({},w,d)),a.set(_,x)),h?x.formatToParts(u):x.format(u)}const jV=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function zE(...e){const[t,n,r,i]=e,s={};let o={};if(!Fr(t))throw na(lo.INVALID_ARGUMENT);const a=t;return tt(n)?s.key=n:Kt(n)&&Object.keys(n).forEach(l=>{jV.includes(l)?o[l]=n[l]:s[l]=n[l]}),tt(r)?s.locale=r:Kt(r)&&(o=r),Kt(i)&&(o=i),[s.key||"",a,s,o]}function RD(e,t,n){const r=e;for(const i in n){const s=`${t}__${i}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}Vfe();/*! * vue-i18n v9.10.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */const khe="9.10.2";function Che(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(TO().__INTLIFY_PROD_DEVTOOLS__=!1)}const UV=uhe.__EXTEND_POINT__,Fo=kO(UV);Fo(),Fo(),Fo(),Fo(),Fo(),Fo(),Fo(),Fo(),Fo();const WV=lo.__EXTEND_POINT__,ui=kO(WV),Ta={UNEXPECTED_RETURN_TYPE:WV,INVALID_ARGUMENT:ui(),MUST_BE_CALL_SETUP_TOP:ui(),NOT_INSTALLED:ui(),NOT_AVAILABLE_IN_LEGACY_MODE:ui(),REQUIRED_VALUE:ui(),INVALID_VALUE:ui(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ui(),NOT_INSTALLED_WITH_PROVIDE:ui(),UNEXPECTED_ERROR:ui(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ui(),BRIDGE_SUPPORT_VUE_2_ONLY:ui(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ui(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ui(),__EXTEND_POINT__:ui()};function $l(e,...t){return MV(e,null,void 0)}const $E=iu("__translateVNode"),HE=iu("__datetimeParts"),VE=iu("__numberParts"),Ohe=iu("__setPluralRules"),Rhe=iu("__injectWithOption"),jE=iu("__dispose");function um(e){if(!nn(e))return e;for(const t in e)if(pb(e,t))if(!t.includes("."))nn(e[t])&&um(e[t]);else{const n=t.split("."),r=n.length-1;let i=e,s=!1;for(let o=0;o<r;o++){if(n[o]in i||(i[n[o]]={}),!nn(i[n[o]])){s=!0;break}i=i[n[o]]}s||(i[n[r]]=e[t],delete e[t]),nn(i[n[r]])&&um(i[n[r]])}return e}function qV(e,t){const{messages:n,__i18n:r,messageResolver:i,flatJson:s}=t,o=Kt(n)?n:nr(r)?{}:{[e]:{}};if(nr(r)&&r.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(o[l]=o[l]||{},iy(u,o[l])):iy(u,o)}else tt(a)&&iy(JSON.parse(a),o)}),i==null&&s)for(const a in o)pb(o,a)&&um(o[a]);return o}function GV(e){return e.type}function Ihe(e,t,n){let r=nn(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=qV(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(nn(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(nn(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function ID(e){return $(Lm,null,e,0)}const AD="__INTLIFY_META__",PD=()=>[],Ahe=()=>!1;let MD=0;function DD(e){return(t,n,r,i)=>e(n,r,Jn()||void 0,i)}const Phe=()=>{const e=Jn();let t=null;return e&&(t=GV(e)[AD])?{[AD]:t}:null};function KV(e={},t){const{__root:n,__injectWithOption:r}=e,i=n===void 0,s=e.flatJson,o=hD?U:ho,a=!!e.translateExistCompatible;let l=zn(e.inheritLocale)?e.inheritLocale:!0;const u=o(n&&l?n.locale.value:tt(e.locale)?e.locale:mb),c=o(n&&l?n.fallbackLocale.value:tt(e.fallbackLocale)||nr(e.fallbackLocale)||Kt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),d=o(qV(u.value,e)),f=o(Kt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=o(Kt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let p=n?n.missingWarn:zn(e.missingWarn)||hb(e.missingWarn)?e.missingWarn:!0,m=n?n.fallbackWarn:zn(e.fallbackWarn)||hb(e.fallbackWarn)?e.fallbackWarn:!0,g=n?n.fallbackRoot:zn(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,w=Nn(e.missing)?e.missing:null,b=Nn(e.missing)?DD(e.missing):null,_=Nn(e.postTranslation)?e.postTranslation:null,x=n?n.warnHtmlMessage:zn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const I=n?n.modifiers:Kt(e.modifiers)?e.modifiers:{};let P=e.pluralRules||n&&n.pluralRules,R;R=(()=>{i&&SD(null);const re={version:khe,locale:u.value,fallbackLocale:c.value,messages:d.value,modifiers:I,pluralRules:P,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:m,fallbackFormat:v,unresolving:!0,postTranslation:_===null?void 0:_,warnHtmlMessage:x,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};re.datetimeFormats=f.value,re.numberFormats=h.value,re.__datetimeFormatters=Kt(R)?R.__datetimeFormatters:void 0,re.__numberFormatters=Kt(R)?R.__numberFormatters:void 0;const pe=_he(re);return i&&SD(pe),pe})(),Sh(R,u.value,c.value);function M(){return[u.value,c.value,d.value,f.value,h.value]}const E=te({get:()=>u.value,set:re=>{u.value=re,R.locale=u.value}}),L=te({get:()=>c.value,set:re=>{c.value=re,R.fallbackLocale=c.value,Sh(R,u.value,re)}}),j=te(()=>d.value),F=te(()=>f.value),B=te(()=>h.value);function Y(){return Nn(_)?_:null}function Z(re){_=re,R.postTranslation=re}function ne(){return w}function oe(re){re!==null&&(b=DD(re)),w=re,R.missing=b}const le=(re,pe,De,N,D,q)=>{M();let C;try{__INTLIFY_PROD_DEVTOOLS__,i||(R.fallbackContext=n?whe():void 0),C=re(R)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(R.fallbackContext=void 0)}if(De!=="translate exists"&&Fr(C)&&C===N0||De==="translate exists"&&!C){const[G,K]=pe();return n&&g?N(n):D(G)}else{if(q(C))return C;throw $l(Ta.UNEXPECTED_RETURN_TYPE)}};function Ee(...re){return le(pe=>Reflect.apply(TD,null,[pe,...re]),()=>FE(...re),"translate",pe=>Reflect.apply(pe.t,pe,[...re]),pe=>pe,pe=>tt(pe))}function xe(...re){const[pe,De,N]=re;if(N&&!nn(N))throw $l(Ta.INVALID_ARGUMENT);return Ee(pe,De,jr({resolvedMessage:!0},N||{}))}function Me(...re){return le(pe=>Reflect.apply(kD,null,[pe,...re]),()=>BE(...re),"datetime format",pe=>Reflect.apply(pe.d,pe,[...re]),()=>wD,pe=>tt(pe))}function Ve(...re){return le(pe=>Reflect.apply(OD,null,[pe,...re]),()=>zE(...re),"number format",pe=>Reflect.apply(pe.n,pe,[...re]),()=>wD,pe=>tt(pe))}function Ue(re){return re.map(pe=>tt(pe)||Fr(pe)||zn(pe)?ID(String(pe)):pe)}const _e={normalize:Ue,interpolate:re=>re,type:"vnode"};function Te(...re){return le(pe=>{let De;const N=pe;try{N.processor=_e,De=Reflect.apply(TD,null,[N,...re])}finally{N.processor=null}return De},()=>FE(...re),"translate",pe=>pe[$E](...re),pe=>[ID(pe)],pe=>nr(pe))}function Ie(...re){return le(pe=>Reflect.apply(OD,null,[pe,...re]),()=>zE(...re),"number format",pe=>pe[VE](...re),PD,pe=>tt(pe)||nr(pe))}function Ae(...re){return le(pe=>Reflect.apply(kD,null,[pe,...re]),()=>BE(...re),"datetime format",pe=>pe[HE](...re),PD,pe=>tt(pe)||nr(pe))}function Q(re){P=re,R.pluralRules=P}function J(re,pe){return le(()=>{if(!re)return!1;const De=tt(pe)?pe:u.value,N=be(De),D=R.messageResolver(N,re);return a?D!=null:mf(D)||Gi(D)||tt(D)},()=>[re],"translate exists",De=>Reflect.apply(De.te,De,[re,pe]),Ahe,De=>zn(De))}function ae(re){let pe=null;const De=NV(R,c.value,u.value);for(let N=0;N<De.length;N++){const D=d.value[De[N]]||{},q=R.messageResolver(D,re);if(q!=null){pe=q;break}}return pe}function we(re){const pe=ae(re);return pe??(n?n.tm(re)||{}:{})}function be(re){return d.value[re]||{}}function T(re,pe){if(s){const De={[re]:pe};for(const N in De)pb(De,N)&&um(De[N]);pe=De[re]}d.value[re]=pe,R.messages=d.value}function V(re,pe){d.value[re]=d.value[re]||{};const De={[re]:pe};if(s)for(const N in De)pb(De,N)&&um(De[N]);pe=De[re],iy(pe,d.value[re]),R.messages=d.value}function ie(re){return f.value[re]||{}}function ue(re,pe){f.value[re]=pe,R.datetimeFormats=f.value,CD(R,re,pe)}function he(re,pe){f.value[re]=jr(f.value[re]||{},pe),R.datetimeFormats=f.value,CD(R,re,pe)}function Se(re){return h.value[re]||{}}function de(re,pe){h.value[re]=pe,R.numberFormats=h.value,RD(R,re,pe)}function Pe(re,pe){h.value[re]=jr(h.value[re]||{},pe),R.numberFormats=h.value,RD(R,re,pe)}MD++,n&&hD&&(He(n.locale,re=>{l&&(u.value=re,R.locale=re,Sh(R,u.value,c.value))}),He(n.fallbackLocale,re=>{l&&(c.value=re,R.fallbackLocale=re,Sh(R,u.value,c.value))}));const Ce={id:MD,locale:E,fallbackLocale:L,get inheritLocale(){return l},set inheritLocale(re){l=re,re&&n&&(u.value=n.locale.value,c.value=n.fallbackLocale.value,Sh(R,u.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:j,get modifiers(){return I},get pluralRules(){return P||{}},get isGlobal(){return i},get missingWarn(){return p},set missingWarn(re){p=re,R.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(re){m=re,R.fallbackWarn=m},get fallbackRoot(){return g},set fallbackRoot(re){g=re},get fallbackFormat(){return v},set fallbackFormat(re){v=re,R.fallbackFormat=v},get warnHtmlMessage(){return x},set warnHtmlMessage(re){x=re,R.warnHtmlMessage=re},get escapeParameter(){return S},set escapeParameter(re){S=re,R.escapeParameter=re},t:Ee,getLocaleMessage:be,setLocaleMessage:T,mergeLocaleMessage:V,getPostTranslationHandler:Y,setPostTranslationHandler:Z,getMissingHandler:ne,setMissingHandler:oe,[Ohe]:Q};return Ce.datetimeFormats=F,Ce.numberFormats=B,Ce.rt=xe,Ce.te=J,Ce.tm=we,Ce.d=Me,Ce.n=Ve,Ce.getDateTimeFormat=ie,Ce.setDateTimeFormat=ue,Ce.mergeDateTimeFormat=he,Ce.getNumberFormat=Se,Ce.setNumberFormat=de,Ce.mergeNumberFormat=Pe,Ce[Rhe]=r,Ce[$E]=Te,Ce[HE]=Ae,Ce[VE]=Ie,Ce}const RO={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Mhe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,i)=>[...r,...i.type===je?i.children:[i]],[]):t.reduce((n,r)=>{const i=e[r];return i&&(n[r]=i()),n},{})}function YV(e){return je}jr({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Fr(e)||!isNaN(e)}},RO);function Dhe(e){return nr(e)&&!tt(e[0])}function XV(e,t,n,r){const{slots:i,attrs:s}=t;return()=>{const o={part:!0};let a={};e.locale&&(o.locale=e.locale),tt(e.format)?o.key=e.format:nn(e.format)&&(tt(e.format.key)&&(o.key=e.format.key),a=Object.keys(e.format).reduce((f,h)=>n.includes(h)?jr({},f,{[h]:e.format[h]}):f,{}));const l=r(e.value,o,a);let u=[o.key];nr(l)?u=l.map((f,h)=>{const p=i[f.type],m=p?p({[f.type]:f.value,index:h,parts:l}):[f.value];return Dhe(m)&&(m[0].key=`${f.type}-${h}`),m}):tt(l)&&(u=[l]);const c=jr({},s),d=tt(e.tag)||nn(e.tag)?e.tag:YV();return We(d,c,u)}}jr({value:{type:Number,required:!0},format:{type:[String,Object]}},RO);jr({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},RO);const Nhe=iu("global-vue-i18n");function Lhe(e={},t){const n=zn(e.globalInjection)?e.globalInjection:!0,r=!0,i=new Map,[s,o]=Fhe(e),a=iu("");function l(d){return i.get(d)||null}function u(d,f){i.set(d,f)}function c(d){i.delete(d)}{const d={get mode(){return"composition"},get allowComposition(){return r},async install(f,...h){if(f.__VUE_I18N_SYMBOL__=a,f.provide(f.__VUE_I18N_SYMBOL__,d),Kt(h[0])){const g=h[0];d.__composerExtend=g.__composerExtend,d.__vueI18nExtend=g.__vueI18nExtend}let p=null;n&&(p=Whe(f,d.global));const m=f.unmount;f.unmount=()=>{p&&p(),d.dispose(),m()}},get global(){return o},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:u,__deleteInstance:c};return d}}function ls(e={}){const t=Jn();if(t==null)throw $l(Ta.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw $l(Ta.NOT_INSTALLED);const n=Bhe(t),r=$he(n),i=GV(t),s=zhe(e,i);if(s==="global")return Ihe(r,e,i),r;if(s==="parent"){let l=Hhe(n,t,e.__useComponent);return l==null&&(l=r),l}const o=n;let a=o.__getInstance(t);if(a==null){const l=jr({},e);"__i18n"in i&&(l.__i18n=i.__i18n),r&&(l.__root=r),a=KV(l),o.__composerExtend&&(a[jE]=o.__composerExtend(a)),jhe(o,t,a),o.__setInstance(t,a)}return a}function Fhe(e,t,n){const r=Pm();{const i=r.run(()=>KV(e));if(i==null)throw $l(Ta.UNEXPECTED_ERROR);return[r,i]}}function Bhe(e){{const t=Lt(e.isCE?Nhe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw $l(e.isCE?Ta.NOT_INSTALLED_WITH_PROVIDE:Ta.UNEXPECTED_ERROR);return t}}function zhe(e,t){return D0(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function $he(e){return e.mode==="composition"?e.global:e.global.__composer}function Hhe(e,t,n=!1){let r=null;const i=t.root;let s=Vhe(t,n);for(;s!=null;){const o=e;if(e.mode==="composition"&&(r=o.__getInstance(s)),r!=null||i===s)break;s=s.parent}return r}function Vhe(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function jhe(e,t,n){nt(()=>{},t),On(()=>{const r=n;e.__deleteInstance(t);const i=r[jE];i&&(i(),delete r[jE])},t)}const Uhe=["locale","fallbackLocale","availableLocales"],ND=["t","rt","d","n","tm","te"];function Whe(e,t){const n=Object.create(null);return Uhe.forEach(i=>{const s=Object.getOwnPropertyDescriptor(t,i);if(!s)throw $l(Ta.UNEXPECTED_ERROR);const o=Jt(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,o)}),e.config.globalProperties.$i18n=n,ND.forEach(i=>{const s=Object.getOwnPropertyDescriptor(t,i);if(!s||!s.value)throw $l(Ta.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,s)}),()=>{delete e.config.globalProperties.$i18n,ND.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}Che();ghe(Xfe);vhe(NV);if(__INTLIFY_PROD_DEVTOOLS__){const e=TO();e.__INTLIFY__=!0,she(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qhe={title:e=>{const{normalize:t}=e;return t(["OVR Tracking"])},nav:{allLinks:e=>{const{normalize:t}=e;return t(["All Links"])},activeLinks:e=>{const{normalize:t}=e;return t(["Active Links"])},disabledLinks:e=>{const{normalize:t}=e;return t(["Disabled Links"])},links:e=>{const{normalize:t}=e;return t(["Viewing Room Links"])},login:e=>{const{normalize:t}=e;return t(["Sign In"])},logout:e=>{const{normalize:t}=e;return t(["Sign Out"])},createOvr:e=>{const{normalize:t}=e;return t(["Create New OVR"])}},models:{link:e=>{const{normalize:t}=e;return t(["Link"])},links:e=>{const{normalize:t}=e;return t(["Links"])}},actions:{login:e=>{const{normalize:t}=e;return t(["Sign In"])},logout:e=>{const{normalize:t}=e;return t(["Sign Out"])},create:e=>{const{normalize:t}=e;return t(["Create"])},view:e=>{const{normalize:t}=e;return t(["View"])},edit:e=>{const{normalize:t}=e;return t(["Edit"])},delete:e=>{const{normalize:t}=e;return t(["Delete"])},update:e=>{const{normalize:t}=e;return t(["Update"])},confirm:e=>{const{normalize:t}=e;return t(["Confirm"])},cancel:e=>{const{normalize:t}=e;return t(["Cancel"])},crop:e=>{const{normalize:t}=e;return t(["Crop"])},save:e=>{const{normalize:t}=e;return t(["Save"])},copy:e=>{const{normalize:t}=e;return t(["Copy"])},copyLink:e=>{const{normalize:t}=e;return t(["Copy Link"])},search:e=>{const{normalize:t}=e;return t(["Search"])},previous:e=>{const{normalize:t}=e;return t(["Previous"])},next:e=>{const{normalize:t}=e;return t(["Next"])},remove:e=>{const{normalize:t}=e;return t(["Remove"])},preview:e=>{const{normalize:t}=e;return t(["Preview"])},back:e=>{const{normalize:t}=e;return t(["Back"])},previewLink:e=>{const{normalize:t}=e;return t(["Preview"])},editSettings:e=>{const{normalize:t}=e;return t(["Edit Settings"])},createLink:e=>{const{normalize:t}=e;return t(["Create Link"])},disableLink:e=>{const{normalize:t}=e;return t(["Disable Link"])},enableLink:e=>{const{normalize:t}=e;return t(["Enable Link"])},deleteLink:e=>{const{normalize:t}=e;return t(["Delete Link"])},reenableLink:e=>{const{normalize:t}=e;return t(["Re-enable Link"])},publish:e=>{const{normalize:t}=e;return t(["Publish"])},publicRoom:e=>{const{normalize:t}=e;return t(["Public Viewing Room"])},privateRoom:e=>{const{normalize:t}=e;return t(["Private Viewing Room"])},createRoom:e=>{const{normalize:t}=e;return t(["Create Online Viewing Room"])},createOVR:e=>{const{normalize:t}=e;return t(["Create an OVR"])},share:e=>{const{normalize:t}=e;return t(["Share"])},saveStyles:e=>{const{normalize:t}=e;return t(["Save Styles"])},displayBanner:e=>{const{normalize:t}=e;return t(["Display Banner"])},dragOrClick:e=>{const{normalize:t}=e;return t(["Drag or click to browse"])}},messages:{noModel:e=>{const{normalize:t,interpolate:n,named:r}=e;return t(["There are currently no ",n(r("model"))])},na:e=>{const{normalize:t}=e;return t(["N/A"])},newLink:e=>{const{normalize:t}=e;return t(["New Link"])},wait:e=>{const{normalize:t}=e;return t(["Please wait..."])},disabled:e=>{const{normalize:t}=e;return t(["Disabled"])},settings:e=>{const{normalize:t}=e;return t(["Settings"])},noResultsFound:e=>{const{normalize:t}=e;return t(["No results found"])},deletelink:e=>{const{normalize:t}=e;return t(["Delete this link?"])},confirmDeleteLink:e=>{const{normalize:t}=e;return t(["Your link will no longer be viewable and all tracking data will be deleted."])},linkDisabled:e=>{const{normalize:t}=e;return t(["Link disabled"])},linkEnabled:e=>{const{normalize:t}=e;return t(["Link enabled"])},linkDeleted:e=>{const{normalize:t}=e;return t(["Link deleted"])},linkCreated:e=>{const{normalize:t}=e;return t(["Link created"])},linkSaved:e=>{const{normalize:t}=e;return t(["Link saved"])},linkCopied:e=>{const{normalize:t}=e;return t(["Link Copied!"])},linkPublished:e=>{const{normalize:t}=e;return t(["Link published"])},roomNotFound:e=>{const{normalize:t}=e;return t(["Viewing room not found"])},roomDisabledByOwner:e=>{const{normalize:t}=e;return t(["Check the URL and try again, the owner may have deleted or disabled this link."])},errorSavingOvr:e=>{const{normalize:t}=e;return t(["An error occurred while saving this OVR"])},captionsApplySuccess:e=>{const{normalize:t}=e;return t(["Captions applied"])},unsavedChanges:e=>{const{normalize:t}=e;return t(["Changes you made may not be saved."])},errorPublishingOVR:e=>{const{normalize:t}=e;return t(["An error occurred when trying to publish the OVR"])},stylesSaved:e=>{const{normalize:t}=e;return t(["Style settings saved"])},errorSavingStyles:e=>{const{normalize:t}=e;return t(["An error occurred when saving OVR styles"])},ovrLinkNotFound:e=>{const{normalize:t}=e;return t(["This OVR link could not be found"])}},forms:{login:{email:e=>{const{normalize:t}=e;return t(["Email"])},emailPlaceholder:e=>{const{normalize:t}=e;return t(["Email"])},password:e=>{const{normalize:t}=e;return t(["Password"])},passwordPlaceholder:e=>{const{normalize:t}=e;return t(["Password"])},showPassword:e=>{const{normalize:t}=e;return t(["Show password"])}},newLink:{linkName:e=>{const{normalize:t}=e;return t(["Link Name"])},linkNamePlaceholder:e=>{const{normalize:t}=e;return t(["Enter viewing room name"])},url:e=>{const{normalize:t}=e;return t(["URL"])},urlPlaceholder:e=>{const{normalize:t}=e;return t(["Enter viewing room URL"])},artworkAlignment:e=>{const{normalize:t}=e;return t(["Artwork Alignment"])},displaySettings:e=>{const{normalize:t}=e;return t(["Display Settings"])},publicRoomSettings:e=>{const{normalize:t}=e;return t(["Public Room Settings"])},showPrice:e=>{const{normalize:t}=e;return t(["Show Prices"])},showPricesWhenSold:e=>{const{normalize:t}=e;return t(["Show price when artwork is sold"])},showVAT:e=>{const{normalize:t}=e;return t(["Show VAT Status"])},showDocs:e=>{const{normalize:t}=e;return t(["Show Documents"])},showStatus:e=>{const{normalize:t}=e;return t(["Display Status"])},provenance:e=>{const{normalize:t}=e;return t(["Show Provenance"])},history:e=>{const{normalize:t}=e;return t(["Show History"])},installation:e=>{const{normalize:t}=e;return t(["Display Installation Views"])},askEmail:e=>{const{normalize:t}=e;return t(["Ask for email on entry"])},collectPersonalInfo:e=>{const{normalize:t}=e;return t(["Collect Personal Information"])},collectPersonalInfoDetail:e=>{const{normalize:t}=e;return t(["Ask for name and phone number on an inquiry."])},createContact:e=>{const{normalize:t}=e;return t(["Create Contact when on email entry"])}}},components:{LinkActivityDialog:{stats:{totalVisits:e=>{const{normalize:t}=e;return t(["Total visits"])},totalVisitLength:e=>{const{normalize:t}=e;return t(["Total visit length"])},totalArtworkViews:e=>{const{normalize:t}=e;return t(["Artwork views"])},totalDocViews:e=>{const{normalize:t}=e;return t(["Document views"])}},tabs:{activity:e=>{const{normalize:t}=e;return t(["Activity"])},artworkViews:e=>{const{normalize:t}=e;return t(["Artwork Views"])},docViews:e=>{const{normalize:t}=e;return t(["Document Views"])}},createdFrom:e=>{const{normalize:t,interpolate:n,named:r}=e;return t(["Created from ",n(r("source"))])},noName:e=>{const{normalize:t}=e;return t(["(no name)"])}},RoomTypePicker:{publicDescription:e=>{const{normalize:t}=e;return t(["Public viewing room for visitors to view and inquire artworks"])},privateDescription:e=>{const{normalize:t}=e;return t(["An exclusive online viewing room for clients"])}},Cropper:{title:e=>{const{normalize:t}=e;return t(["Crop Image"])},helpText:e=>{const{normalize:t}=e;return t(["Use the handles below to obtain your desired cropped image"])}},SaveSettingsDialog:{title:e=>{const{normalize:t}=e;return t(["Save current style settings as default?"])},description:e=>{const{normalize:t}=e;return t(["Save your current artwork settings, header, text formatting, layout and background styles as the default for any future viewing rooms you create."])},confirm:e=>{const{normalize:t}=e;return t(["Save as Default"])},cancel:e=>{const{normalize:t}=e;return t(["Cancel"])}}},pages:{home:{title:e=>{const{normalize:t}=e;return t(["Home"])}},callback:{title:e=>{const{normalize:t}=e;return t(["Signing In"])}},allViewingRoomLinks:{title:e=>{const{normalize:t}=e;return t(["All Viewing Room Links"])}},activeViewingRoomLinks:{title:e=>{const{normalize:t}=e;return t(["Active Viewing Room Links"])}},disabledViewingRoomLinks:{title:e=>{const{normalize:t}=e;return t(["Disabled Viewing Room Links"])}},itemsCreate:{title:e=>{const{normalize:t}=e;return t(["Create Item"])}},login:{title:e=>{const{normalize:t}=e;return t(["Sign In"])}},logout:{title:e=>{const{normalize:t}=e;return t(["Sign Out"])},confirm:e=>{const{normalize:t}=e;return t(["Are you sure you want to sign out?"])}},notFound:{title:e=>{const{normalize:t}=e;return t(["Page Not Found"])},message:e=>{const{normalize:t}=e;return t(["The page you are looking for does not exist."])}}},tables:{LinkTable:{headers:{list_name:e=>{const{normalize:t}=e;return t(["List"])},last_visited_at:e=>{const{normalize:t}=e;return t(["Last visited"])},title:e=>{const{normalize:t}=e;return t(["Link Name"])},user_full_name:e=>{const{normalize:t}=e;return t(["Creator"])},visits_count:e=>{const{normalize:t}=e;return t(["Visits"])}}},ListLinkTable:{headers:{title:e=>{const{normalize:t}=e;return t(["Link Name"])},link_created_at:e=>{const{normalize:t}=e;return t(["Date Created"])},user_full_name:e=>{const{normalize:t}=e;return t(["Creator"])},visits_count:e=>{const{normalize:t}=e;return t(["Visits"])}}},LinkActivityTable:{headers:{contact_full_name:e=>{const{normalize:t}=e;return t(["Device"])},visit_length:e=>{const{normalize:t}=e;return t(["Visit Length"])},viewed_images:e=>{const{normalize:t}=e;return t(["Viewed Images"])},viewed_docs:e=>{const{normalize:t}=e;return t(["Viewed Docs"])},session_location:e=>{const{normalize:t}=e;return t(["Location"])}}},shared:{footers:{pageNumberAndCount:e=>{const{normalize:t,interpolate:n,named:r}=e;return t([n(r("pageNumber"))," / ",n(r("pageCount"))])}}}},misc:{left:e=>{const{normalize:t}=e;return t(["Left"])},center:e=>{const{normalize:t}=e;return t(["Center"])},bottom:e=>{const{normalize:t}=e;return t(["Bottom"])},top:e=>{const{normalize:t}=e;return t(["Top"])},hidden:e=>{const{normalize:t}=e;return t(["Hidden"])},viewingRoomLinks:e=>{const{normalize:t}=e;return t(["Viewing Room Links"])}}},L0=Lhe({legacy:!1,globalInjection:!0,locale:"en",fallbackLocale:"en",messages:{en:qhe}});/*! * vue-router v4.5.0 * (c) 2024 Eduardo San Martin Morote * @license MIT */const od=typeof document<"u";function JV(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ghe(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&JV(e.default)}const Zt=Object.assign;function kS(e,t){const n={};for(const r in t){const i=t[r];n[r]=Ls(i)?i.map(e):e(i)}return n}const mp=()=>{},Ls=Array.isArray,QV=/#/g,Khe=/&/g,Yhe=/\//g,Xhe=/=/g,Jhe=/\?/g,ZV=/\+/g,Qhe=/%5B/g,Zhe=/%5D/g,ej=/%5E/g,epe=/%60/g,tj=/%7B/g,tpe=/%7C/g,nj=/%7D/g,npe=/%20/g;function IO(e){return encodeURI(""+e).replace(tpe,"|").replace(Qhe,"[").replace(Zhe,"]")}function rpe(e){return IO(e).replace(tj,"{").replace(nj,"}").replace(ej,"^")}function UE(e){return IO(e).replace(ZV,"%2B").replace(npe,"+").replace(QV,"%23").replace(Khe,"%26").replace(epe,"`").replace(tj,"{").replace(nj,"}").replace(ej,"^")}function ipe(e){return UE(e).replace(Xhe,"%3D")}function spe(e){return IO(e).replace(QV,"%23").replace(Jhe,"%3F")}function ope(e){return e==null?"":spe(e).replace(Yhe,"%2F")}function cm(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const ape=/\/$/,lpe=e=>e.replace(ape,"");function CS(e,t,n="/"){let r,i={},s="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),i=e(s)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=fpe(r??t,n),{fullPath:r+(s&&"?")+s+o,path:r,query:i,hash:cm(o)}}function upe(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function LD(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function cpe(e,t,n){const r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&gf(t.matched[r],n.matched[i])&&rj(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function gf(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rj(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!dpe(e[n],t[n]))return!1;return!0}function dpe(e,t){return Ls(e)?FD(e,t):Ls(t)?FD(t,e):e===t}function FD(e,t){return Ls(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function fpe(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),i=r[r.length-1];(i===".."||i===".")&&r.push("");let s=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(o).join("/")}const Ba={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var dm;(function(e){e.pop="pop",e.push="push"})(dm||(dm={}));var gp;(function(e){e.back="back",e.forward="forward",e.unknown=""})(gp||(gp={}));function hpe(e){if(!e)if(od){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),lpe(e)}const ppe=/^[^#]+#/;function mpe(e,t){return e.replace(ppe,"#")+t}function gpe(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const F0=()=>({left:window.scrollX,top:window.scrollY});function vpe(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=gpe(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function BD(e,t){return(history.state?history.state.position-t:-1)+e}const WE=new Map;function ype(e,t){WE.set(e,t)}function bpe(e){const t=WE.get(e);return WE.delete(e),t}let wpe=()=>location.protocol+"//"+location.host;function ij(e,t){const{pathname:n,search:r,hash:i}=t,s=e.indexOf("#");if(s>-1){let a=i.includes(e.slice(s))?e.slice(s).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),LD(l,"")}return LD(n,e)+r+i}function _pe(e,t,n,r){let i=[],s=[],o=null;const a=({state:f})=>{const h=ij(e,location),p=n.value,m=t.value;let g=0;if(f){if(n.value=h,t.value=f,o&&o===p){o=null;return}g=m?f.position-m.position:0}else r(h);i.forEach(v=>{v(n.value,p,{delta:g,type:dm.pop,direction:g?g>0?gp.forward:gp.back:gp.unknown})})};function l(){o=n.value}function u(f){i.push(f);const h=()=>{const p=i.indexOf(f);p>-1&&i.splice(p,1)};return s.push(h),h}function c(){const{history:f}=window;f.state&&f.replaceState(Zt({},f.state,{scroll:F0()}),"")}function d(){for(const f of s)f();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function zD(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?F0():null}}function Spe(e){const{history:t,location:n}=window,r={value:ij(e,n)},i={value:t.state};i.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:wpe()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),i.value=u}catch(h){console.error(h),n[c?"replace":"assign"](f)}}function o(l,u){const c=Zt({},t.state,zD(i.value.back,l,i.value.forward,!0),u,{position:i.value.position});s(l,c,!0),r.value=l}function a(l,u){const c=Zt({},i.value,t.state,{forward:l,scroll:F0()});s(c.current,c,!0);const d=Zt({},zD(r.value,l,null),{position:c.position+1},u);s(l,d,!1),r.value=l}return{location:r,state:i,push:a,replace:o}}function xpe(e){e=hpe(e);const t=Spe(e),n=_pe(e,t.state,t.location,t.replace);function r(s,o=!0){o||n.pauseListeners(),history.go(s)}const i=Zt({location:"",base:e,go:r,createHref:mpe.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Epe(e){return typeof e=="string"||e&&typeof e=="object"}function sj(e){return typeof e=="string"||typeof e=="symbol"}const oj=Symbol("");var $D;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})($D||($D={}));function vf(e,t){return Zt(new Error,{type:e,[oj]:!0},t)}function Bo(e,t){return e instanceof Error&&oj in e&&(t==null||!!(e.type&t))}const HD="[^/]+?",Tpe={sensitive:!1,strict:!1,start:!0,end:!0},kpe=/[.+*?^${}()[\]/\\]/g;function Cpe(e,t){const n=Zt({},Tpe,t),r=[];let i=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(i+="/");for(let d=0;d<u.length;d++){const f=u[d];let h=40+(n.sensitive?.25:0);if(f.type===0)d||(i+="/"),i+=f.value.replace(kpe,"\\$&"),h+=40;else if(f.type===1){const{value:p,repeatable:m,optional:g,regexp:v}=f;s.push({name:p,repeatable:m,optional:g});const w=v||HD;if(w!==HD){h+=10;try{new RegExp(`(${w})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${p}" (${w}): `+_.message)}}let b=m?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(b=g&&u.length<2?`(?:/${b})`:"/"+b),g&&(b+="?"),i+=b,h+=20,g&&(h+=-8),m&&(h+=-20),w===".*"&&(h+=-50)}c.push(h)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&!i.endsWith("/")&&(i+="(?:/|$)");const o=new RegExp(i,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const h=c[f]||"",p=s[f-1];d[p.name]=h&&p.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of f)if(h.type===0)c+=h.value;else if(h.type===1){const{value:p,repeatable:m,optional:g}=h,v=p in u?u[p]:"";if(Ls(v)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const w=Ls(v)?v.join("/"):v;if(!w)if(g)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);c+=w}}return c||"/"}return{re:o,score:r,keys:s,parse:a,stringify:l}}function Ope(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function aj(e,t){let n=0;const r=e.score,i=t.score;for(;n<r.length&&n<i.length;){const s=Ope(r[n],i[n]);if(s)return s;n++}if(Math.abs(i.length-r.length)===1){if(VD(r))return 1;if(VD(i))return-1}return i.length-r.length}function VD(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Rpe={type:0,value:""},Ipe=/[a-zA-Z0-9_]/;function Ape(e){if(!e)return[[]];if(e==="/")return[[Rpe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,r=n;const i=[];let s;function o(){s&&i.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),o()):l===":"?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:Ipe.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),i}function Ppe(e,t,n){const r=Cpe(Ape(e.path),n),i=Zt(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function Mpe(e,t){const n=[],r=new Map;t=qD({strict:!1,end:!0,sensitive:!1},t);function i(d){return r.get(d)}function s(d,f,h){const p=!h,m=UD(d);m.aliasOf=h&&h.record;const g=qD(t,d),v=[m];if("alias"in d){const _=typeof d.alias=="string"?[d.alias]:d.alias;for(const x of _)v.push(UD(Zt({},m,{components:h?h.record.components:m.components,path:x,aliasOf:h?h.record:m})))}let w,b;for(const _ of v){const{path:x}=_;if(f&&x[0]!=="/"){const S=f.record.path,I=S[S.length-1]==="/"?"":"/";_.path=f.record.path+(x&&I+x)}if(w=Ppe(_,f,g),h?h.alias.push(w):(b=b||w,b!==w&&b.alias.push(w),p&&d.name&&!WD(w)&&o(d.name)),lj(w)&&l(w),m.children){const S=m.children;for(let I=0;I<S.length;I++)s(S[I],w,h&&h.children[I])}h=h||w}return b?()=>{o(b)}:mp}function o(d){if(sj(d)){const f=r.get(d);f&&(r.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=Lpe(d,n);n.splice(f,0,d),d.record.name&&!WD(d)&&r.set(d.record.name,d)}function u(d,f){let h,p={},m,g;if("name"in d&&d.name){if(h=r.get(d.name),!h)throw vf(1,{location:d});g=h.record.name,p=Zt(jD(f.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),d.params&&jD(d.params,h.keys.map(b=>b.name))),m=h.stringify(p)}else if(d.path!=null)m=d.path,h=n.find(b=>b.re.test(m)),h&&(p=h.parse(m),g=h.record.name);else{if(h=f.name?r.get(f.name):n.find(b=>b.re.test(f.path)),!h)throw vf(1,{location:d,currentLocation:f});g=h.record.name,p=Zt({},f.params,d.params),m=h.stringify(p)}const v=[];let w=h;for(;w;)v.unshift(w.record),w=w.parent;return{name:g,path:m,params:p,matched:v,meta:Npe(v)}}e.forEach(d=>s(d));function c(){n.length=0,r.clear()}return{addRoute:s,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:i}}function jD(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function UD(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Dpe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Dpe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function WD(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Npe(e){return e.reduce((t,n)=>Zt(t,n.meta),{})}function qD(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Lpe(e,t){let n=0,r=t.length;for(;n!==r;){const s=n+r>>1;aj(e,t[s])<0?r=s:n=s+1}const i=Fpe(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Fpe(e){let t=e;for(;t=t.parent;)if(lj(t)&&aj(e,t)===0)return t}function lj({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Bpe(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<r.length;++i){const s=r[i].replace(ZV," "),o=s.indexOf("="),a=cm(o<0?s:s.slice(0,o)),l=o<0?null:cm(s.slice(o+1));if(a in t){let u=t[a];Ls(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function GD(e){let t="";for(let n in e){const r=e[n];if(n=ipe(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Ls(r)?r.map(s=>s&&UE(s)):[r&&UE(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function zpe(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ls(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return t}const uj=Symbol(""),KD=Symbol(""),B0=Symbol(""),AO=Symbol(""),qE=Symbol("");function xh(){let e=[];function t(r){return e.push(r),()=>{const i=e.indexOf(r);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $pe(e,t,n){const r=()=>{e[t].delete(n)};On(r),Fk(r),Lk(()=>{e[t].add(n)}),e[t].add(n)}function Zm(e){const t=Lt(uj,{}).value;t&&$pe(t,"leaveGuards",e)}function nl(e,t,n,r,i,s=o=>o()){const o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(vf(4,{from:n,to:t})):f instanceof Error?l(f):Epe(f)?l(vf(2,{from:t,to:f})):(o&&r.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),a())},c=s(()=>e.call(r&&r.instances[i],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function OS(e,t,n,r,i=s=>s()){const s=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(JV(l)){const c=(l.__vccOpts||l)[t];c&&s.push(nl(c,n,r,o,a,i))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=Ghe(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&nl(h,n,r,o,a,i)()}))}}return s}function YD(e){const t=Lt(B0),n=Lt(AO),r=te(()=>{const l=y(e.to);return t.resolve(l)}),i=te(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(gf.bind(null,c));if(f>-1)return f;const h=XD(l[u-2]);return u>1&&XD(c)===h&&d[d.length-1].path!==h?d.findIndex(gf.bind(null,l[u-2])):f}),s=te(()=>i.value>-1&&Wpe(n.params,r.value.params)),o=te(()=>i.value>-1&&i.value===n.matched.length-1&&rj(n.params,r.value.params));function a(l={}){if(Upe(l)){const u=t[y(e.replace)?"replace":"push"](y(e.to)).catch(mp);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:te(()=>r.value.href),isActive:s,isExactActive:o,navigate:a}}function Hpe(e){return e.length===1?e[0]:e}const Vpe=ee({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:YD,setup(e,{slots:t}){const n=Ca(YD(e)),{options:r}=Lt(B0),i=te(()=>({[JD(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[JD(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&Hpe(t.default(n));return e.custom?s:We("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},s)}}}),jpe=Vpe;function Upe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Wpe(e,t){for(const n in t){const r=t[n],i=e[n];if(typeof r=="string"){if(r!==i)return!1}else if(!Ls(i)||i.length!==r.length||r.some((s,o)=>s!==i[o]))return!1}return!0}function XD(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const JD=(e,t,n)=>e??t??n,qpe=ee({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Lt(qE),i=te(()=>e.route||r.value),s=Lt(KD,0),o=te(()=>{let u=y(s);const{matched:c}=i.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=te(()=>i.value.matched[o.value]);Yn(KD,te(()=>o.value+1)),Yn(uj,a),Yn(qE,i);const l=U();return He(()=>[l.value,a.value,e.name],([u,c,d],[f,h,p])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!gf(c,h)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=i.value,c=e.name,d=a.value,f=d&&d.components[c];if(!f)return QD(n.default,{Component:f,route:u});const h=d.props[c],p=h?h===!0?u.params:typeof h=="function"?h(u):h:null,g=We(f,Zt({},p,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return QD(n.default,{Component:g,route:u})||g}}});function QD(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Gpe=qpe;function Kpe(e){const t=Mpe(e.routes,e),n=e.parseQuery||Bpe,r=e.stringifyQuery||GD,i=e.history,s=xh(),o=xh(),a=xh(),l=ho(Ba);let u=Ba;od&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=kS.bind(null,me=>""+me),d=kS.bind(null,ope),f=kS.bind(null,cm);function h(me,_e){let Te,Ie;return sj(me)?(Te=t.getRecordMatcher(me),Ie=_e):Ie=me,t.addRoute(Ie,Te)}function p(me){const _e=t.getRecordMatcher(me);_e&&t.removeRoute(_e)}function m(){return t.getRoutes().map(me=>me.record)}function g(me){return!!t.getRecordMatcher(me)}function v(me,_e){if(_e=Zt({},_e||l.value),typeof me=="string"){const ae=CS(n,me,_e.path),we=t.resolve({path:ae.path},_e),be=i.createHref(ae.fullPath);return Zt(ae,we,{params:f(we.params),hash:cm(ae.hash),redirectedFrom:void 0,href:be})}let Te;if(me.path!=null)Te=Zt({},me,{path:CS(n,me.path,_e.path).path});else{const ae=Zt({},me.params);for(const we in ae)ae[we]==null&&delete ae[we];Te=Zt({},me,{params:d(ae)}),_e.params=d(_e.params)}const Ie=t.resolve(Te,_e),Ae=me.hash||"";Ie.params=c(f(Ie.params));const Q=upe(r,Zt({},me,{hash:rpe(Ae),path:Ie.path})),J=i.createHref(Q);return Zt({fullPath:Q,hash:Ae,query:r===GD?zpe(me.query):me.query||{}},Ie,{redirectedFrom:void 0,href:J})}function w(me){return typeof me=="string"?CS(n,me,l.value.path):Zt({},me)}function b(me,_e){if(u!==me)return vf(8,{from:_e,to:me})}function _(me){return I(me)}function x(me){return _(Zt(w(me),{replace:!0}))}function S(me){const _e=me.matched[me.matched.length-1];if(_e&&_e.redirect){const{redirect:Te}=_e;let Ie=typeof Te=="function"?Te(me):Te;return typeof Ie=="string"&&(Ie=Ie.includes("?")||Ie.includes("#")?Ie=w(Ie):{path:Ie},Ie.params={}),Zt({query:me.query,hash:me.hash,params:Ie.path!=null?{}:me.params},Ie)}}function I(me,_e){const Te=u=v(me),Ie=l.value,Ae=me.state,Q=me.force,J=me.replace===!0,ae=S(Te);if(ae)return I(Zt(w(ae),{state:typeof ae=="object"?Zt({},Ae,ae.state):Ae,force:Q,replace:J}),_e||Te);const we=Te;we.redirectedFrom=_e;let be;return!Q&&cpe(r,Ie,Te)&&(be=vf(16,{to:we,from:Ie}),le(Ie,Ie,!0,!1)),(be?Promise.resolve(be):O(we,Ie)).catch(T=>Bo(T)?Bo(T,2)?T:oe(T):Z(T,we,Ie)).then(T=>{if(T){if(Bo(T,2))return I(Zt({replace:J},w(T.to),{state:typeof T.to=="object"?Zt({},Ae,T.to.state):Ae,force:Q}),_e||we)}else T=E(we,Ie,!0,J,Ae);return M(we,Ie,T),T})}function P(me,_e){const Te=b(me,_e);return Te?Promise.reject(Te):Promise.resolve()}function R(me){const _e=Me.values().next().value;return _e&&typeof _e.runWithContext=="function"?_e.runWithContext(me):me()}function O(me,_e){let Te;const[Ie,Ae,Q]=Ype(me,_e);Te=OS(Ie.reverse(),"beforeRouteLeave",me,_e);for(const ae of Ie)ae.leaveGuards.forEach(we=>{Te.push(nl(we,me,_e))});const J=P.bind(null,me,_e);return Te.push(J),Ue(Te).then(()=>{Te=[];for(const ae of s.list())Te.push(nl(ae,me,_e));return Te.push(J),Ue(Te)}).then(()=>{Te=OS(Ae,"beforeRouteUpdate",me,_e);for(const ae of Ae)ae.updateGuards.forEach(we=>{Te.push(nl(we,me,_e))});return Te.push(J),Ue(Te)}).then(()=>{Te=[];for(const ae of Q)if(ae.beforeEnter)if(Ls(ae.beforeEnter))for(const we of ae.beforeEnter)Te.push(nl(we,me,_e));else Te.push(nl(ae.beforeEnter,me,_e));return Te.push(J),Ue(Te)}).then(()=>(me.matched.forEach(ae=>ae.enterCallbacks={}),Te=OS(Q,"beforeRouteEnter",me,_e,R),Te.push(J),Ue(Te))).then(()=>{Te=[];for(const ae of o.list())Te.push(nl(ae,me,_e));return Te.push(J),Ue(Te)}).catch(ae=>Bo(ae,8)?ae:Promise.reject(ae))}function M(me,_e,Te){a.list().forEach(Ie=>R(()=>Ie(me,_e,Te)))}function E(me,_e,Te,Ie,Ae){const Q=b(me,_e);if(Q)return Q;const J=_e===Ba,ae=od?history.state:{};Te&&(Ie||J?i.replace(me.fullPath,Zt({scroll:J&&ae&&ae.scroll},Ae)):i.push(me.fullPath,Ae)),l.value=me,le(me,_e,Te,J),oe()}let L;function j(){L||(L=i.listen((me,_e,Te)=>{if(!Ve.listening)return;const Ie=v(me),Ae=S(Ie);if(Ae){I(Zt(Ae,{replace:!0,force:!0}),Ie).catch(mp);return}u=Ie;const Q=l.value;od&&ype(BD(Q.fullPath,Te.delta),F0()),O(Ie,Q).catch(J=>Bo(J,12)?J:Bo(J,2)?(I(Zt(w(J.to),{force:!0}),Ie).then(ae=>{Bo(ae,20)&&!Te.delta&&Te.type===dm.pop&&i.go(-1,!1)}).catch(mp),Promise.reject()):(Te.delta&&i.go(-Te.delta,!1),Z(J,Ie,Q))).then(J=>{J=J||E(Ie,Q,!1),J&&(Te.delta&&!Bo(J,8)?i.go(-Te.delta,!1):Te.type===dm.pop&&Bo(J,20)&&i.go(-1,!1)),M(Ie,Q,J)}).catch(mp)}))}let F=xh(),B=xh(),Y;function Z(me,_e,Te){oe(me);const Ie=B.list();return Ie.length?Ie.forEach(Ae=>Ae(me,_e,Te)):console.error(me),Promise.reject(me)}function ne(){return Y&&l.value!==Ba?Promise.resolve():new Promise((me,_e)=>{F.add([me,_e])})}function oe(me){return Y||(Y=!me,j(),F.list().forEach(([_e,Te])=>me?Te(me):_e()),F.reset()),me}function le(me,_e,Te,Ie){const{scrollBehavior:Ae}=e;if(!od||!Ae)return Promise.resolve();const Q=!Te&&bpe(BD(me.fullPath,0))||(Ie||!Te)&&history.state&&history.state.scroll||null;return vt().then(()=>Ae(me,_e,Q)).then(J=>J&&vpe(J)).catch(J=>Z(J,me,_e))}const Ee=me=>i.go(me);let xe;const Me=new Set,Ve={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:m,resolve:v,options:e,push:_,replace:x,go:Ee,back:()=>Ee(-1),forward:()=>Ee(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:B.add,isReady:ne,install(me){const _e=this;me.component("RouterLink",jpe),me.component("RouterView",Gpe),me.config.globalProperties.$router=_e,Object.defineProperty(me.config.globalProperties,"$route",{enumerable:!0,get:()=>y(l)}),od&&!xe&&l.value===Ba&&(xe=!0,_(i.location).catch(Ae=>{}));const Te={};for(const Ae in Ba)Object.defineProperty(Te,Ae,{get:()=>l.value[Ae],enumerable:!0});me.provide(B0,_e),me.provide(AO,cB(Te)),me.provide(qE,l);const Ie=me.unmount;Me.add(me),me.unmount=function(){Me.delete(me),Me.size<1&&(u=Ba,L&&L(),L=null,l.value=Ba,xe=!1,Y=!1),Ie()}}};function Ue(me){return me.reduce((_e,Te)=>_e.then(()=>R(Te)),Promise.resolve())}return Ve}function Ype(e,t){const n=[],r=[],i=[],s=Math.max(t.matched.length,e.matched.length);for(let o=0;o<s;o++){const a=t.matched[o];a&&(e.matched.find(u=>gf(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>gf(u,l))||i.push(l))}return[n,r,i]}function Aa(){return Lt(B0)}function Ir(e){return Lt(AO)}var Wn;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Wn||(Wn={}));function Xpe(e){return e.nodeType===e.ELEMENT_NODE}function vp(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function yp(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Jpe(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Qpe(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function gb(e){try{const t=e.rules||e.cssRules;return t?Jpe(Array.from(t,cj).join("")):null}catch{return null}}function cj(e){let t;if(eme(e))try{t=gb(e.styleSheet)||Qpe(e)}catch{}else if(tme(e)&&e.selectorText.includes(":"))return Zpe(e.cssText);return t||e.cssText}function Zpe(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function eme(e){return"styleSheet"in e}function tme(e){return"selectorText"in e}class dj{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nme(){return new dj}function PO({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:s}){let o=i||"";const a=r&&bc(r);return(t[n.toLowerCase()]||a&&t[a])&&(s?o=s(o,e):o="*".repeat(o.length)),o}function bc(e){return e.toLowerCase()}const ZD="__rrweb_original__";function rme(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const s=t.getImageData,o=ZD in s?s[ZD]:s;if(new Uint32Array(o.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function MO(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?bc(t):null}function fj(e,t){var n;let r;try{r=new URL(e,t??window.location.href)}catch{return null}const i=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(i);return(n=s==null?void 0:s[1])!==null&&n!==void 0?n:null}let ime=1;const sme=new RegExp("[^a-z0-9-_:]"),fm=-2;function hj(){return ime++}function ome(e){if(e instanceof HTMLFormElement)return"form";const t=bc(e.tagName);return sme.test(t)?"div":t}function ame(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Wc,eN;const lme=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ume=/^(?:[a-z+]+:)?\/\//i,cme=/^www\..*/i,dme=/^(data:)([^,]*),(.*)/i;function vb(e,t){return(e||"").replace(lme,(n,r,i,s,o,a)=>{const l=i||o||a,u=r||s||"";if(!l)return n;if(ume.test(l)||cme.test(l))return`url(${u}${l}${u})`;if(dme.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${ame(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const fme=/^[^ \t\n\r\u000c]+/,hme=/^[, \t\n\r\u000c]+/;function pme(e,t){if(t.trim()==="")return t;let n=0;function r(s){let o;const a=s.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const i=[];for(;r(hme),!(n>=t.length);){let s=r(fme);if(s.slice(-1)===",")s=Td(e,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Td(e,s);let a=!1;for(;;){const l=t.charAt(n);if(l===""){i.push((s+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,i.push((s+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return i.join(", ")}function Td(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function mme(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function DO(){const e=document.createElement("a");return e.href="",e.href}function pj(e,t,n,r){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Td(e,r):n==="srcset"?pme(e,r):n==="style"?vb(r,DO()):t==="object"&&n==="data"?Td(e,r):r)}function mj(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function gme(e,t,n){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function yb(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?yb(e.parentNode,t,n):!1;for(let r=e.classList.length;r--;){const i=e.classList[r];if(t.test(i))return!0}return n?yb(e.parentNode,t,n):!1}function gj(e,t,n,r){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(typeof t=="string"){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(yb(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function vme(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=setTimeout(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),i=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function yme(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const s=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(s),r=!0,t()})}function bme(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:d={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,g=wme(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Wn.Document,childNodes:[],compatMode:e.compatMode}:{type:Wn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Wn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Sme(e,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:d,inlineImages:f,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case e.TEXT_NODE:return _me(e,{needsMask:o,maskTextFn:u,rootId:g});case e.CDATA_SECTION_NODE:return{type:Wn.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Wn.Comment,textContent:e.textContent||"",rootId:g};default:return!1}}function wme(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function _me(e,t){var n;const{needsMask:r,maskTextFn:i,rootId:s}=t,o=e.parentNode&&e.parentNode.tagName;let a=e.textContent;const l=o==="STYLE"?!0:void 0,u=o==="SCRIPT"?!0:void 0;if(l&&a){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(a=gb(e.parentNode.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}a=vb(a,DO())}return u&&(a="SCRIPT_PLACEHOLDER"),!l&&!u&&a&&r&&(a=i?i(a,e.parentElement):a.replace(/[\S]/g,"*")),{type:Wn.Text,textContent:a||"",isStyle:l,rootId:s}}function Sme(e,t){const{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:h}=t,p=gme(e,r,i),m=ome(e);let g={};const v=e.attributes.length;for(let b=0;b<v;b++){const _=e.attributes[b];mj(m,_.name,_.value)||(g[_.name]=pj(n,m,bc(_.name),_.value))}if(m==="link"&&s){const b=Array.from(n.styleSheets).find(x=>x.href===e.href);let _=null;b&&(_=gb(b)),_&&(delete g.rel,delete g.href,g._cssText=vb(_,b.href))}if(m==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const b=gb(e.sheet);b&&(g._cssText=vb(b,DO()))}if(m==="input"||m==="textarea"||m==="select"){const b=e.value,_=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=PO({element:e,type:MO(e),tagName:m,value:b,maskInputOptions:o,maskInputFn:a}):_&&(g.checked=_)}if(m==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),m==="canvas"&&c){if(e.__context==="2d")rme(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const b=e.toDataURL(l.type,l.quality),_=document.createElement("canvas");_.width=e.width,_.height=e.height;const x=_.toDataURL(l.type,l.quality);b!==x&&(g.rr_dataURL=b)}}if(m==="img"&&u){Wc||(Wc=n.createElement("canvas"),eN=Wc.getContext("2d"));const b=e,_=b.crossOrigin;b.crossOrigin="anonymous";const x=()=>{b.removeEventListener("load",x);try{Wc.width=b.naturalWidth,Wc.height=b.naturalHeight,eN.drawImage(b,0,0),g.rr_dataURL=Wc.toDataURL(l.type,l.quality)}catch(S){console.warn(`Cannot inline img src=${b.currentSrc}! Error: ${S}`)}_?g.crossOrigin=_:b.removeAttribute("crossorigin")};b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x)}if(m==="audio"||m==="video"){const b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(f||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),p){const{width:b,height:_}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${_}px`}}m==="iframe"&&!d(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch{}return{type:Wn.Element,tagName:m,attributes:g,childNodes:[],isSVG:mme(e)||void 0,needBlock:p,rootId:h,isCustom:w}}function gn(e){return e==null?"":e.toLowerCase()}function xme(e,t){if(t.comment&&e.type===Wn.Comment)return!0;if(e.type===Wn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fj(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(gn(e.attributes.name).match(/^msapplication-tile(image|color)$/)||gn(e.attributes.name)==="application-name"||gn(e.attributes.rel)==="icon"||gn(e.attributes.rel)==="apple-touch-icon"||gn(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&gn(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(gn(e.attributes.property).match(/^(og|twitter|fb):/)||gn(e.attributes.name).match(/^(og|twitter):/)||gn(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(gn(e.attributes.name)==="robots"||gn(e.attributes.name)==="googlebot"||gn(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(gn(e.attributes.name)==="author"||gn(e.attributes.name)==="generator"||gn(e.attributes.name)==="framework"||gn(e.attributes.name)==="publisher"||gn(e.attributes.name)==="progid"||gn(e.attributes.property).match(/^article:/)||gn(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(gn(e.attributes.name)==="google-site-verification"||gn(e.attributes.name)==="yandex-verification"||gn(e.attributes.name)==="csrf-token"||gn(e.attributes.name)==="p:domain_verify"||gn(e.attributes.name)==="verify-v1"||gn(e.attributes.name)==="verification"||gn(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function kd(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:d,maskInputFn:f,slimDOMOptions:h,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:I=!1}=t;let{needsMask:P}=t,{preserveWhiteSpace:R=!0}=t;!P&&e.childNodes&&(P=gj(e,o,a,P===void 0));const O=bme(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:P,inlineStylesheet:u,maskInputOptions:c,maskTextFn:d,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:I});if(!O)return console.warn(e,"not serialized"),null;let M;r.hasNode(e)?M=r.getId(e):xme(O,h)||!R&&O.type===Wn.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?M=fm:M=hj();const E=Object.assign(O,{id:M});if(r.add(e,E),M===fm)return null;v&&v(e);let L=!l;if(E.type===Wn.Element){L=L&&!E.needBlock,delete E.needBlock;const j=e.shadowRoot;j&&yp(j)&&(E.isShadowHost=!0)}if((E.type===Wn.Document||E.type===Wn.Element)&&L){h.headWhitespace&&E.type===Wn.Element&&E.tagName==="head"&&(R=!1);const j={doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:d,maskInputFn:f,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:_,stylesheetLoadTimeout:x,keepIframeSrcFn:S};if(!(E.type===Wn.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0))for(const F of Array.from(e.childNodes)){const B=kd(F,j);B&&E.childNodes.push(B)}if(Xpe(e)&&e.shadowRoot)for(const F of Array.from(e.shadowRoot.childNodes)){const B=kd(F,j);B&&(yp(e.shadowRoot)&&(B.isShadow=!0),E.childNodes.push(B))}}return e.parentNode&&vp(e.parentNode)&&yp(e.parentNode)&&(E.isShadow=!0),E.type===Wn.Element&&E.tagName==="iframe"&&vme(e,()=>{const j=e.contentDocument;if(j&&w){const F=kd(j,{doc:j,mirror:r,blockClass:i,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:d,maskInputFn:f,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:_,stylesheetLoadTimeout:x,keepIframeSrcFn:S});F&&w(e,F)}},b),E.type===Wn.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&fj(E.attributes.href)==="css")&&yme(e,()=>{if(_){const j=kd(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:d,maskInputFn:f,slimDOMOptions:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:_,stylesheetLoadTimeout:x,keepIframeSrcFn:S});j&&_(e,j)}},x),E}function Eme(e,t){const{mirror:n=new dj,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:f,slimDOM:h=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:x=()=>!1}=t;return kd(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:d,maskInputFn:f,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:x,newlyAddedElement:!1})}function ei(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ad=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`;let tN={map:{},getId(){return console.error(ad),-1},getNode(){return console.error(ad),null},removeNodeFromMap(){console.error(ad)},has(){return console.error(ad),!1},reset(){console.error(ad)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(tN=new Proxy(tN,{get(e,t,n){return t==="map"&&console.error(ad),Reflect.get(e,t,n)}}));function hm(e,t,n={}){let r=null,i=0;return function(...s){const o=Date.now();!i&&n.leading===!1&&(i=o);const a=t-(o-i),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),i=o,e.apply(l,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(l,s)},a))}}function z0(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(o){setTimeout(()=>{n.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>z0(e,t,s||{},!0)}function nh(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let bb=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(bb=()=>new Date().getTime());function vj(e){var t,n,r,i,s,o;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(a==null?void 0:a.documentElement.scrollLeft)||((n=(t=a==null?void 0:a.body)===null||t===void 0?void 0:t.parentElement)===null||n===void 0?void 0:n.scrollLeft)||((r=a==null?void 0:a.body)===null||r===void 0?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||((s=(i=a==null?void 0:a.body)===null||i===void 0?void 0:i.parentElement)===null||s===void 0?void 0:s.scrollTop)||((o=a==null?void 0:a.body)===null||o===void 0?void 0:o.scrollTop)||0}}function yj(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function bj(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function wj(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function ti(e,t,n,r){if(!e)return!1;const i=wj(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||r&&i.closest("."+t)!==null)return!0}else if(yb(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function Tme(e,t){return t.getId(e)!==-1}function RS(e,t){return t.getId(e)===fm}function _j(e,t){if(vp(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?_j(e.parentNode,t):!0:!0}function GE(e){return!!e.changedTouches}function kme(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Sj(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function xj(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function KE(e){return!!(e!=null&&e.shadowRoot)}class Cme{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ej(e){var t,n;let r=null;return((n=(t=e.getRootNode)===null||t===void 0?void 0:t.call(e))===null||n===void 0?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function Ome(e){let t=e,n;for(;n=Ej(t);)t=n;return t}function Rme(e){const t=e.ownerDocument;if(!t)return!1;const n=Ome(e);return t.contains(n)}function Tj(e){const t=e.ownerDocument;return t?t.contains(e)||Rme(e):!1}var jt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(jt||{}),zt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(zt||{}),ci=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ci||{}),Uo=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Uo||{}),yf=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(yf||{});function nN(e){return"__ln"in e}class Ime{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&nN(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&nN(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const rN=(e,t)=>`${e}@${t}`;class Ame{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Ime,i=l=>{let u=l,c=fm;for(;c===fm;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},s=l=>{if(!l.parentNode||!Tj(l)||l.parentNode.tagName==="TEXTAREA")return;const u=vp(l.parentNode)?this.mirror.getId(Ej(l)):this.mirror.getId(l.parentNode),c=i(l);if(u===-1||c===-1)return r.addNode(l);const d=kd(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Sj(f,this.mirror)&&this.iframeManager.addIframe(f),xj(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),KE(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{this.iframeManager.attachIframe(f,h),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)iN(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||s(l);for(const l of this.addedSet)!sN(this.droppedSet,l)&&!iN(this.removes,l,this.mirror)||sN(this.movedSet,l)?s(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(i(c.value)===-1)continue;if(d!==-1){l=c;break}else{const h=c.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),s(l.value)}const a={texts:this.texts.map(l=>{const u=l.node;return u.parentNode&&u.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u.parentNode),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.genTextAreaValueMutation=t=>{let n=this.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(t,n)),n.attributes.value=Array.from(t.childNodes,r=>r.textContent||"").join("")},this.processMutation=t=>{if(!RS(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ti(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:gj(t.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,wj(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const o=MO(n);i=PO({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ti(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!mj(n.tagName,r)&&(s.attributes[r]=pj(this.doc,bc(n.tagName),bc(r),i),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?s.styleDiff[a]=l:s.styleDiff[a]=[l,u]:s._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(ti(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=vp(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ti(t.target,this.blockClass,this.blockSelector,!1)||RS(n,this.mirror)||!Tme(n,this.mirror)||(this.addedSet.has(n)?(YE(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||_j(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[rN(r,i)]?YE(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:vp(t.target)&&yp(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(RS(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[rN(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ti(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),KE(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function YE(e,t){e.delete(t),t.childNodes.forEach(n=>YE(e,n))}function iN(e,t,n){return e.length===0?!1:kj(e,t,n)}function kj(e,t,n){const{parentNode:r}=t;if(!r)return!1;const i=n.getId(r);return e.some(s=>s.id===i)?!0:kj(e,r,n)}function sN(e,t){return e.size===0?!1:Cj(e,t)}function Cj(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Cj(e,n):!1}let bp;function Pme(e){bp=e}function Mme(){bp=void 0}const Vt=e=>bp?(...n)=>{try{return e(...n)}catch(r){if(bp&&bp(r)===!0)return;throw r}}:e,Lu=[];function eg(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Oj(e,t){var n,r;const i=new Ame;Lu.push(i),i.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const o=(r=(n=window==null?void 0:window.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");o&&window[o]&&(s=window[o]);const a=new s(Vt(i.processMutations.bind(i)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Dme({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=hm(Vt(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),s),u=Vt(hm(Vt(d=>{const f=eg(d),{clientX:h,clientY:p}=GE(d)?d.changedTouches[0]:d;a||(a=bb()),o.push({x:h,y:p,id:r.getId(f),timeOffset:bb()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?zt.Drag:d instanceof MouseEvent?zt.MouseMove:zt.TouchMove)}),i,{trailing:!1})),c=[ei("mousemove",u,n),ei("touchmove",u,n),ei("drag",u,n)];return Vt(()=>{c.forEach(d=>d())})}function Nme({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,a=[];let l=null;const u=c=>d=>{const f=eg(d);if(ti(f,r,i,!0))return;let h=null,p=c;if("pointerType"in d){switch(d.pointerType){case"mouse":h=Uo.Mouse;break;case"touch":h=Uo.Touch;break;case"pen":h=Uo.Pen;break}h===Uo.Touch?ci[c]===ci.MouseDown?p="TouchStart":ci[c]===ci.MouseUp&&(p="TouchEnd"):Uo.Pen}else GE(d)&&(h=Uo.Touch);h!==null?(l=h,(p.startsWith("Touch")&&h===Uo.Touch||p.startsWith("Mouse")&&h===Uo.Mouse)&&(h=null)):ci[c]===ci.Click&&(h=l,l=null);const m=GE(d)?d.changedTouches[0]:d;if(!m)return;const g=n.getId(f),{clientX:v,clientY:w}=m;Vt(e)(Object.assign({type:ci[p],id:g,x:v,y:w},h!==null&&{pointerType:h}))};return Object.keys(ci).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let d=bc(c);const f=u(c);if(window.PointerEvent)switch(ci[c]){case ci.MouseDown:case ci.MouseUp:d=d.replace("mouse","pointer");break;case ci.TouchStart:case ci.TouchEnd:return}a.push(ei(d,f,t))}),Vt(()=>{a.forEach(c=>c())})}function Rj({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:s}){const o=Vt(hm(Vt(a=>{const l=eg(a);if(!l||ti(l,r,i,!0))return;const u=n.getId(l);if(l===t&&t.defaultView){const c=vj(t.defaultView);e({id:u,x:c.left,y:c.top})}else e({id:u,x:l.scrollLeft,y:l.scrollTop})}),s.scroll||100));return ei("scroll",o,t)}function Lme({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=Vt(hm(Vt(()=>{const s=yj(),o=bj();(n!==s||r!==o)&&(e({width:Number(o),height:Number(s)}),n=s,r=o)}),200));return ei("resize",i,t)}const Fme=["INPUT","TEXTAREA","SELECT"],oN=new WeakMap;function Bme({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function d(w){let b=eg(w);const _=w.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=b.parentElement),!b||!x||Fme.indexOf(x)<0||ti(b,r,i,!0)||b.classList.contains(s)||o&&b.matches(o))return;let S=b.value,I=!1;const P=MO(b)||"";P==="radio"||P==="checkbox"?I=b.checked:(a[x.toLowerCase()]||a[P])&&(S=PO({element:b,maskInputOptions:a,tagName:x,type:P,value:S,maskInputFn:l})),f(b,c?{text:S,isChecked:I,userTriggered:_}:{text:S,isChecked:I});const R=b.name;P==="radio"&&R&&I&&t.querySelectorAll(`input[type="radio"][name="${R}"]`).forEach(O=>{if(O!==b){const M=O.value;f(O,c?{text:M,isChecked:!I,userTriggered:!1}:{text:M,isChecked:!I})}})}function f(w,b){const _=oN.get(w);if(!_||_.text!==b.text||_.isChecked!==b.isChecked){oN.set(w,b);const x=n.getId(w);Vt(e)(Object.assign(Object.assign({},b),{id:x}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(w=>ei(w,Vt(d),t)),m=t.defaultView;if(!m)return()=>{p.forEach(w=>w())};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(w=>z0(w[0],w[1],{set(){Vt(d)({target:this,isTrusted:!1})}},!1,m))),Vt(()=>{p.forEach(w=>w())})}function wb(e){const t=[];function n(r,i){if(Kg("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Kg("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Kg("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Kg("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return n(e,t)}function rl(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function zme({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Vt((c,d,f)=>{const[h,p]=f,{id:m,styleId:g}=rl(d,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:h,index:p}]}),c.apply(d,f)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Vt((c,d,f)=>{const[h]=f,{id:p,styleId:m}=rl(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,removes:[{index:h}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Vt((c,d,f)=>{const[h]=f,{id:p,styleId:m}=rl(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replace:h}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Vt((c,d,f)=>{const[h]=f,{id:p,styleId:m}=rl(d,t,n.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,replaceSync:h}),c.apply(d,f)})}));const l={};Yg("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Yg("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Yg("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Yg("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:Vt((f,h,p)=>{const[m,g]=p,{id:v,styleId:w}=rl(h.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||w&&w!==-1)&&e({id:v,styleId:w,adds:[{rule:m,index:[...wb(h),g||0]}]}),f.apply(h,p)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:Vt((f,h,p)=>{const[m]=p,{id:g,styleId:v}=rl(h.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...wb(h),m]}]}),f.apply(h,p)})})}),Vt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function Ij({mirror:e,stylesheetManager:t},n){var r,i,s;let o=null;n.nodeName==="#document"?o=e.getId(n):o=e.getId(n.host);const a=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(s=(i=n.ownerDocument)===null||i===void 0?void 0:i.defaultView)===null||s===void 0?void 0:s.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)===null||u===void 0?void 0:u.call(this)},set(u){var c;const d=(c=l.set)===null||c===void 0?void 0:c.call(this,u);if(o!==null&&o!==-1)try{t.adoptStyleSheets(u,o)}catch{}return d}}),Vt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function $me({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Vt((a,l,u)=>{var c;const[d,f,h]=u;if(n.has(d))return s.apply(l,[d,f,h]);const{id:p,styleId:m}=rl((c=l.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,set:{property:d,value:f,priority:h},index:wb(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Vt((a,l,u)=>{var c;const[d]=u;if(n.has(d))return o.apply(l,[d]);const{id:f,styleId:h}=rl((c=l.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,remove:{property:d},index:wb(l.parentRule)}),a.apply(l,u)})}),Vt(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Hme({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:i,doc:s}){const o=Vt(l=>hm(Vt(u=>{const c=eg(u);if(!c||ti(c,t,n,!0))return;const{currentTime:d,volume:f,muted:h,playbackRate:p,loop:m}=c;e({type:l,id:r.getId(c),currentTime:d,volume:f,muted:h,playbackRate:p,loop:m})}),i.media||500)),a=[ei("play",o(0),s),ei("pause",o(1),s),ei("seeked",o(2),s),ei("volumechange",o(3),s),ei("ratechange",o(4),s)];return Vt(()=>{a.forEach(l=>l())})}function Vme({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(l,u,c){const d=new s(l,u,c);return i.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=nh(t.fonts,"add",function(a){return function(l){return setTimeout(Vt(()=>{const u=i.get(l);u&&(e(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=s}),r.push(o),Vt(()=>{r.forEach(a=>a())})}function jme(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:s}=e;let o=!0;const a=Vt(()=>{const l=t.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let d=0;d<c;d++){const f=l.getRangeAt(d),{startContainer:h,startOffset:p,endContainer:m,endOffset:g}=f;ti(h,r,i,!0)||ti(m,r,i,!0)||u.push({start:n.getId(h),startOffset:p,end:n.getId(m),endOffset:g})}s({ranges:u})});return a(),ei("selectionchange",a)}function Ume({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:nh(n.customElements,"define",function(i){return function(s,o,a){try{t({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,a])}})}function Wme(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:d,fontCb:f,selectionCb:h,customElementCb:p}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),n(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),r(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),i(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),s(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),o(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),a(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),l(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),u(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),c(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),d(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),f(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),h(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),p(...m)}}function qme(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Wme(e,t);let r;e.recordDOM&&(r=Oj(e,e.doc));const i=Dme(e),s=Nme(e),o=Rj(e),a=Lme(e,{win:n}),l=Bme(e),u=Hme(e);let c=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(c=zme(e,{win:n}),d=Ij(e,e.doc),f=$me(e,{win:n}),e.collectFonts&&(h=Vme(e)));const p=jme(e),m=Ume(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,n,v.options));return Vt(()=>{Lu.forEach(v=>v.reset()),r==null||r.disconnect(),i(),s(),o(),a(),l(),u(),c(),d(),f(),h(),p(),m(),g.forEach(v=>v())})}function Kg(e){return typeof window[e]<"u"}function Yg(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class aN{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const s=r||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=i.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Gme{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new aN(hj),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new aN(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const s=this.transformCrossOriginEvent(i,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case jt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const i=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(n.data.node,i),{timestamp:n.timestamp,type:jt.IncrementalSnapshot,data:{source:zt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case jt.Meta:case jt.Load:case jt.DomContentLoaded:return!1;case jt.Plugin:return n;case jt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case jt.IncrementalSnapshot:switch(n.data.source){case zt.Mutation:return n.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(i.node,s)}),n.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),n.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),n.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case zt.Drag:case zt.TouchMove:case zt.MouseMove:return n.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),n;case zt.ViewportResize:return!1;case zt.MediaInteraction:case zt.MouseInteraction:case zt.Scroll:case zt.CanvasMutation:case zt.Input:return this.replaceIds(n.data,t,["id"]),n;case zt.StyleSheetRule:case zt.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case zt.Font:return n;case zt.Selection:return n.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),n;case zt.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const s of i)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Wn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Kme{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!yp(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=Oj(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Rj(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Ij({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(nh(t.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s);return this.shadowRoot&&Tj(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function Yme(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xme(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((r=r.apply(e,[])).next())})}var Cd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jme=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Xg=0;Xg<Cd.length;Xg++)Jme[Cd.charCodeAt(Xg)]=Xg;var Qme=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Cd[t[n]>>2],i+=Cd[(t[n]&3)<<4|t[n+1]>>4],i+=Cd[(t[n+1]&15)<<2|t[n+2]>>6],i+=Cd[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const lN=new Map;function Zme(e,t){let n=lN.get(e);return n||(n=new Map,lN.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const Aj=(e,t,n)=>{if(!e||!(Mj(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=Zme(n,r);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s};function sy(e,t,n){if(e instanceof Array)return e.map(r=>sy(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=Qme(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[sy(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[sy(e.data,t,n),e.width,e.height]};if(Mj(e,t)||typeof e=="object"){const r=e.constructor.name,i=Aj(e,t,n);return{rr_type:r,index:i}}}}return e}const Pj=(e,t,n)=>e.map(r=>sy(r,t,n)),Mj=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function ege(e,t,n,r){const i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const a=nh(t.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return ti(this.canvas,n,r,!0)||setTimeout(()=>{const c=Pj(u,t,this);e(this.canvas,{type:yf["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch{const l=z0(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:yf["2D"],property:o,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function tge(e){return e==="experimental-webgl"?"webgl":e}function uN(e,t,n,r){const i=[];try{const s=nh(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!ti(this,t,n,!0)){const u=tge(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function cN(e,t,n,r,i,s,o){const a=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const c=nh(e,u,function(d){return function(...f){const h=d.apply(this,f);if(Aj(h,o,this),"tagName"in this.canvas&&!ti(this.canvas,r,i,!0)){const p=Pj(f,o,this),m={type:t,property:u,args:p};n(this.canvas,m)}return h}});a.push(c)}catch{const d=z0(e,u,{set(f){n(this.canvas,{type:t,property:u,args:[f],setter:!0})}});a.push(d)}return a}function nge(e,t,n,r,i){const s=[];return s.push(...cN(t.WebGLRenderingContext.prototype,yf.WebGL,e,n,r,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...cN(t.WebGL2RenderingContext.prototype,yf.WebGL2,e,n,r,i,t)),()=>{s.forEach(o=>o())}}function rge(e,t){var n=e.toString(),r=n.split(` `);r.pop(),r.shift();for(var i=r[0].search(/\S/),s=/(['"])__worker_loader_strict__(['"])/g,o=0,a=r.length;o<a;++o)r[o]=r[o].substring(i).replace(s,"$1use strict$2")+` `;return r}function ige(e,t){var n=rge(e),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}function sge(e,t){var n;return function(i){return n=n||ige(e),new Worker(n,i)}}var oge=sge(function(){(function(){"__worker_loader_strict__";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function e(u,c,d,f){function h(p){return p instanceof d?p:new d(function(m){m(p)})}return new(d||(d=Promise))(function(p,m){function g(b){try{w(f.next(b))}catch(_){m(_)}}function v(b){try{w(f.throw(b))}catch(_){m(_)}}function w(b){b.done?p(b.value):h(b.value).then(g,v)}w((f=f.apply(u,[])).next())})}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=typeof Uint8Array>"u"?[]:new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;var i=function(u){var c=new Uint8Array(u),d,f=c.length,h="";for(d=0;d<f;d+=3)h+=t[c[d]>>2],h+=t[(c[d]&3)<<4|c[d+1]>>4],h+=t[(c[d+1]&15)<<2|c[d+2]>>6],h+=t[c[d+2]&63];return f%3===2?h=h.substring(0,h.length-1)+"=":f%3===1&&(h=h.substring(0,h.length-2)+"=="),h};const s=new Map,o=new Map;function a(u,c,d){return e(this,void 0,void 0,function*(){const f=`${u}-${c}`;if("OffscreenCanvas"in globalThis){if(o.has(f))return o.get(f);const h=new OffscreenCanvas(u,c);h.getContext("2d");const m=yield(yield h.convertToBlob(d)).arrayBuffer(),g=i(m);return o.set(f,g),g}else return""})}const l=self;l.onmessage=function(u){return e(this,void 0,void 0,function*(){if("OffscreenCanvas"in globalThis){const{id:c,bitmap:d,width:f,height:h,dataURLOptions:p}=u.data,m=a(f,h,p),g=new OffscreenCanvas(f,h);g.getContext("2d").drawImage(d,0,0),d.close();const w=yield g.convertToBlob(p),b=w.type,_=yield w.arrayBuffer(),x=i(_);if(!s.has(c)&&(yield m)===x)return s.set(c,x),l.postMessage({id:c});if(s.get(c)===x)return l.postMessage({id:c});l.postMessage({id:c,type:b,base64:x,width:f,height:h}),s.set(c,x)}else return l.postMessage({id:u.data.id})})}})()});class age{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)};const{sampling:n="all",win:r,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&n==="all"&&this.initCanvasMutationObserver(r,i,s),o&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,i,s,{dataURLOptions:a})}initCanvasFPSObserver(t,n,r,i,s){const o=uN(n,r,i,!0),a=new Map,l=new oge;l.onmessage=p=>{const{id:m}=p.data;if(a.set(m,!1),!("base64"in p.data))return;const{base64:g,type:v,width:w,height:b}=p.data;this.mutationCb({id:m,type:yf["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const u=1e3/t;let c=0,d;const f=()=>{const p=[];return n.document.querySelectorAll("canvas").forEach(m=>{ti(m,r,i,!0)||p.push(m)}),p},h=p=>{if(c&&p-c<u){d=requestAnimationFrame(h);return}c=p,f().forEach(m=>Xme(this,void 0,void 0,function*(){var g;const v=this.mirror.getId(m);if(a.get(v)||m.width===0||m.height===0)return;if(a.set(v,!0),["webgl","webgl2"].includes(m.__context)){const b=m.getContext(m.__context);((g=b==null?void 0:b.getContextAttributes())===null||g===void 0?void 0:g.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const w=yield createImageBitmap(m);l.postMessage({id:v,bitmap:w,width:m.width,height:m.height,dataURLOptions:s.dataURLOptions},[w])})),d=requestAnimationFrame(h)};d=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=uN(t,n,r,!1),s=ege(this.processMutation.bind(this),t,n,r),o=nge(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(o=>Yme(o,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:i}),this.pendingCanvasMutations.delete(t)}}class lge{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Cme,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const s of t){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(a,l)=>({rule:cj(a),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class uge{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function jn(e){return Object.assign(Object.assign({},e),{timestamp:bb()})}let Dn,oy,IS,_b=!1;const ps=nme();function tg(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:h,maskInputFn:p,maskTextFn:m,hooks:g,packFn:v,sampling:w={},dataURLOptions:b={},mousemoveWait:_,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:I=!1,recordAfter:P=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:O=!1,inlineImages:M=!1,plugins:E,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:j=new Set([]),errorHandler:F}=e;Pme(F);const B=I?window.parent===window:!0;let Y=!1;if(!B)try{window.parent.document&&(Y=!1)}catch{Y=!0}if(B&&!t)throw new Error("emit function is required");_!==void 0&&w.mousemove===void 0&&(w.mousemove=_),ps.reset();const Z=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f!==void 0?f:{password:!0},ne=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};kme();let oe,le=0;const Ee=Ae=>{for(const Q of E||[])Q.eventProcessor&&(Ae=Q.eventProcessor(Ae));return v&&!Y&&(Ae=v(Ae)),Ae};Dn=(Ae,Q)=>{var J;if(!((J=Lu[0])===null||J===void 0)&&J.isFrozen()&&Ae.type!==jt.FullSnapshot&&!(Ae.type===jt.IncrementalSnapshot&&Ae.data.source===zt.Mutation)&&Lu.forEach(ae=>ae.unfreeze()),B)t==null||t(Ee(Ae),Q);else if(Y){const ae={type:"rrweb",event:Ee(Ae),origin:window.location.origin,isCheckout:Q};window.parent.postMessage(ae,"*")}if(Ae.type===jt.FullSnapshot)oe=Ae,le=0;else if(Ae.type===jt.IncrementalSnapshot){if(Ae.data.source===zt.Mutation&&Ae.data.isAttachIframe)return;le++;const ae=r&&le>=r,we=n&&Ae.timestamp-oe.timestamp>n;(ae||we)&&oy(!0)}};const xe=Ae=>{Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.Mutation},Ae)}))},Me=Ae=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.Scroll},Ae)})),Ve=Ae=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.CanvasMutation},Ae)})),Ue=Ae=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.AdoptedStyleSheet},Ae)})),me=new lge({mutationCb:xe,adoptedStyleSheetCb:Ue}),_e=new Gme({mirror:ps,mutationCb:xe,stylesheetManager:me,recordCrossOriginIframes:I,wrappedEmit:Dn});for(const Ae of E||[])Ae.getMirror&&Ae.getMirror({nodeMirror:ps,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const Te=new uge;IS=new age({recordCanvas:S,mutationCb:Ve,win:window,blockClass:i,blockSelector:s,mirror:ps,sampling:w.canvas,dataURLOptions:b});const Ie=new Kme({mutationCb:xe,scrollCb:Me,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:Z,dataURLOptions:b,maskTextFn:m,maskInputFn:p,recordCanvas:S,inlineImages:M,sampling:w,slimDOMOptions:ne,iframeManager:_e,stylesheetManager:me,canvasManager:IS,keepIframeSrcFn:L,processedNodeManager:Te},mirror:ps});oy=(Ae=!1)=>{if(!x)return;Dn(jn({type:jt.Meta,data:{href:window.location.href,width:bj(),height:yj()}}),Ae),me.reset(),Ie.init(),Lu.forEach(J=>J.lock());const Q=Eme(document,{mirror:ps,blockClass:i,blockSelector:s,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:Z,maskTextFn:m,slimDOM:ne,dataURLOptions:b,recordCanvas:S,inlineImages:M,onSerialize:J=>{Sj(J,ps)&&_e.addIframe(J),xj(J,ps)&&me.trackLinkElement(J),KE(J)&&Ie.addShadowRoot(J.shadowRoot,document)},onIframeLoad:(J,ae)=>{_e.attachIframe(J,ae),Ie.observeAttachShadow(J)},onStylesheetLoad:(J,ae)=>{me.attachLinkElement(J,ae)},keepIframeSrcFn:L});if(!Q)return console.warn("Failed to snapshot the document");Dn(jn({type:jt.FullSnapshot,data:{node:Q,initialOffset:vj(window)}}),Ae),Lu.forEach(J=>J.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,ps.getId(document))};try{const Ae=[],Q=ae=>{var we;return Vt(qme)({mutationCb:xe,mousemoveCb:(be,T)=>Dn(jn({type:jt.IncrementalSnapshot,data:{source:T,positions:be}})),mouseInteractionCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.MouseInteraction},be)})),scrollCb:Me,viewportResizeCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.ViewportResize},be)})),inputCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.Input},be)})),mediaInteractionCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.MediaInteraction},be)})),styleSheetRuleCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.StyleSheetRule},be)})),styleDeclarationCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.StyleDeclaration},be)})),canvasMutationCb:Ve,fontCb:be=>Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.Font},be)})),selectionCb:be=>{Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.Selection},be)}))},customElementCb:be=>{Dn(jn({type:jt.IncrementalSnapshot,data:Object.assign({source:zt.CustomElement},be)}))},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:Z,inlineStylesheet:c,sampling:w,recordDOM:x,recordCanvas:S,inlineImages:M,userTriggeredOnInput:R,collectFonts:O,doc:ae,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:L,blockSelector:s,slimDOMOptions:ne,dataURLOptions:b,mirror:ps,iframeManager:_e,stylesheetManager:me,shadowDomManager:Ie,processedNodeManager:Te,canvasManager:IS,ignoreCSSAttributes:j,plugins:((we=E==null?void 0:E.filter(be=>be.observer))===null||we===void 0?void 0:we.map(be=>({observer:be.observer,options:be.options,callback:T=>Dn(jn({type:jt.Plugin,data:{plugin:be.name,payload:T}}))})))||[]},g)};_e.addLoadListener(ae=>{try{Ae.push(Q(ae.contentDocument))}catch(we){console.warn(we)}});const J=()=>{oy(),Ae.push(Q(document)),_b=!0};return document.readyState==="interactive"||document.readyState==="complete"?J():(Ae.push(ei("DOMContentLoaded",()=>{Dn(jn({type:jt.DomContentLoaded,data:{}})),P==="DOMContentLoaded"&&J()})),Ae.push(ei("load",()=>{Dn(jn({type:jt.Load,data:{}})),P==="load"&&J()},window))),()=>{Ae.forEach(ae=>ae()),Te.destroy(),_b=!1,Mme()}}catch(Ae){console.warn(Ae)}}tg.addCustomEvent=(e,t)=>{if(!_b)throw new Error("please add custom event after start recording");Dn(jn({type:jt.Custom,data:{tag:e,payload:t}}))};tg.freezePage=()=>{Lu.forEach(e=>e.freeze())};tg.takeFullSnapshot=e=>{if(!_b)throw new Error("please take full snapshot after start recording");oy(e)};tg.mirror=ps;var Dj=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Dj||{}),Ks=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Ks||{}),mo={DEBUG:!1,LIB_VERSION:"2.58.0"},ft;if(typeof window>"u"){var dN={hostname:""};ft={navigator:{userAgent:"",onLine:!0},document:{location:dN,referrer:""},screen:{width:0,height:0},location:dN}}else ft=window;var fN=ft.setImmediate,Hl,XE,JE,Nj=Object.prototype.toString,cge=typeof fN<"u"?function(t){return fN(t)}:setTimeout;try{Object.defineProperty({},"x",{}),Hl=function(t,n,r,i){return Object.defineProperty(t,n,{value:r,writable:!0,configurable:i!==!1})}}catch{Hl=function(n,r,i){return n[r]=i,n}}JE=function(){var t,n,r;function i(s,o){this.fn=s,this.self=o,this.next=void 0}return{add:function(o,a){r=new i(o,a),n?n.next=r:t=r,n=r,r=void 0},drain:function(){var o=t;for(t=n=XE=void 0;o;)o.fn.call(o.self),o=o.next}}}();function Sb(e,t){JE.add(e,t),XE||(XE=cge(JE.drain))}function Lj(e){var t,n=typeof e;return e!==null&&(n==="object"||n==="function")&&(t=e.then),typeof t=="function"?t:!1}function NO(){for(var e=0;e<this.chain.length;e++)dge(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function dge(e,t,n){var r,i;try{t===!1?n.reject(e.msg):(t===!0?r=e.msg:r=t.call(void 0,e.msg),r===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=Lj(r))?i.call(r,n.resolve,n.reject):n.resolve(r))}catch(s){n.reject(s)}}function Fj(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=Lj(e))?Sb(function(){var r=new hN(n);try{t.call(e,function(){Fj.apply(r,arguments)},function(){wp.apply(r,arguments)})}catch(i){wp.call(r,i)}}):(n.msg=e,n.state=1,n.chain.length>0&&Sb(NO,n))}catch(r){wp.call(new hN(n),r)}}}function wp(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&Sb(NO,t))}function Bj(e,t,n,r){for(var i=0;i<t.length;i++)(function(o){e.resolve(t[o]).then(function(l){n(o,l)},r)})(i)}function hN(e){this.def=e,this.triggered=!1}function fge(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function ou(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var t=new fge(this);this.then=function(r,i){var s={success:typeof r=="function"?r:!0,failure:typeof i=="function"?i:!1};return s.promise=new this.constructor(function(a,l){if(typeof a!="function"||typeof l!="function")throw TypeError("Not a function");s.resolve=a,s.reject=l}),t.chain.push(s),t.state!==0&&Sb(NO,t),s.promise},this.catch=function(r){return this.then(void 0,r)};try{e.call(void 0,function(r){Fj.call(t,r)},function(r){wp.call(t,r)})}catch(n){wp.call(t,n)}}var zj=Hl({},"constructor",ou,!1);ou.prototype=zj;Hl(zj,"__NPO__",0,!1);Hl(ou,"resolve",function(t){var n=this;return t&&typeof t=="object"&&t.__NPO__===1?t:new n(function(i,s){if(typeof i!="function"||typeof s!="function")throw TypeError("Not a function");i(t)})});Hl(ou,"reject",function(t){return new this(function(r,i){if(typeof r!="function"||typeof i!="function")throw TypeError("Not a function");i(t)})});Hl(ou,"all",function(t){var n=this;return Nj.call(t)!=="[object Array]"?n.reject(TypeError("Not an array")):t.length===0?n.resolve([]):new n(function(i,s){if(typeof i!="function"||typeof s!="function")throw TypeError("Not a function");var o=t.length,a=Array(o),l=0;Bj(n,t,function(c,d){a[c]=d,++l===o&&i(a)},s)})});Hl(ou,"race",function(t){var n=this;return Nj.call(t)!=="[object Array]"?n.reject(TypeError("Not an array")):new n(function(i,s){if(typeof i!="function"||typeof s!="function")throw TypeError("Not a function");Bj(n,t,function(a,l){i(l)},s)})});var $n;typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1?$n=Promise:$n=ou;var _p=24*60*60*1e3,AS=8*1e3,$0=Array.prototype,hge=Function.prototype,$j=Object.prototype,cl=$0.slice,ng=$j.toString,H0=$j.hasOwnProperty,Vn=ft.console,dl=ft.navigator,cn=ft.document,Jg=ft.opera,xb=ft.screen,eo=dl.userAgent,PS=hge.bind,pN=$0.forEach,mN=$0.indexOf,gN=$0.map,pge=Array.isArray,QE={},z={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Qt={log:function(){if(mo.DEBUG&&!z.isUndefined(Vn)&&Vn)try{Vn.log.apply(Vn,arguments)}catch{z.each(arguments,function(t){Vn.log(t)})}},warn:function(){if(mo.DEBUG&&!z.isUndefined(Vn)&&Vn){var e=["Mixpanel warning:"].concat(z.toArray(arguments));try{Vn.warn.apply(Vn,e)}catch{z.each(e,function(n){Vn.warn(n)})}}},error:function(){if(mo.DEBUG&&!z.isUndefined(Vn)&&Vn){var e=["Mixpanel error:"].concat(z.toArray(arguments));try{Vn.error.apply(Vn,e)}catch{z.each(e,function(n){Vn.error(n)})}}},critical:function(){if(!z.isUndefined(Vn)&&Vn){var e=["Mixpanel error:"].concat(z.toArray(arguments));try{Vn.error.apply(Vn,e)}catch{z.each(e,function(n){Vn.error(n)})}}}},MS=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(Qt,arguments)}},rg=function(e){return{log:MS(Qt.log,e),error:MS(Qt.error,e),critical:MS(Qt.critical,e)}};z.bind=function(e,t){var n,r;if(PS&&e.bind===PS)return PS.apply(e,cl.call(arguments,1));if(!z.isFunction(e))throw new TypeError;return n=cl.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(cl.call(arguments)));var i={};i.prototype=e.prototype;var s=new i;i.prototype=null;var o=e.apply(s,n.concat(cl.call(arguments)));return Object(o)===o?o:s},r};z.each=function(e,t,n){if(e!=null){if(pN&&e.forEach===pN)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===QE)return}else for(var s in e)if(H0.call(e,s)&&t.call(n,e[s],s,e)===QE)return}};z.extend=function(e){return z.each(cl.call(arguments,1),function(t){for(var n in t)t[n]!==void 0&&(e[n]=t[n])}),e};z.isArray=pge||function(e){return ng.call(e)==="[object Array]"};z.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};z.isArguments=function(e){return!!(e&&H0.call(e,"callee"))};z.toArray=function(e){return e?e.toArray?e.toArray():z.isArray(e)||z.isArguments(e)?cl.call(e):z.values(e):[]};z.map=function(e,t,n){if(gN&&e.map===gN)return e.map(t,n);var r=[];return z.each(e,function(i){r.push(t.call(n,i))}),r};z.keys=function(e){var t=[];return e===null||z.each(e,function(n,r){t[t.length]=r}),t};z.values=function(e){var t=[];return e===null||z.each(e,function(n){t[t.length]=n}),t};z.include=function(e,t){var n=!1;return e===null?n:mN&&e.indexOf===mN?e.indexOf(t)!=-1:(z.each(e,function(r){if(n||(n=r===t))return QE}),n)};z.includes=function(e,t){return e.indexOf(t)!==-1};z.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e};z.isObject=function(e){return e===Object(e)&&!z.isArray(e)};z.isEmptyObject=function(e){if(z.isObject(e)){for(var t in e)if(H0.call(e,t))return!1;return!0}return!1};z.isUndefined=function(e){return e===void 0};z.isString=function(e){return ng.call(e)=="[object String]"};z.isDate=function(e){return ng.call(e)=="[object Date]"};z.isNumber=function(e){return ng.call(e)=="[object Number]"};z.isElement=function(e){return!!(e&&e.nodeType===1)};z.encodeDates=function(e){return z.each(e,function(t,n){z.isDate(t)?e[n]=z.formatDate(t):z.isObject(t)&&(e[n]=z.encodeDates(t))}),e};z.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};z.formatDate=function(e){function t(n){return n<10?"0"+n:n}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())};z.strip_empty_properties=function(e){var t={};return z.each(e,function(n,r){z.isString(n)&&n.length>0&&(t[r]=n)}),t};z.truncate=function(e,t){var n;return typeof e=="string"?n=e.slice(0,t):z.isArray(e)?(n=[],z.each(e,function(r){n.push(z.truncate(r,t))})):z.isObject(e)?(n={},z.each(e,function(r,i){n[i]=z.truncate(r,t)})):n=e,n};z.JSONEncode=function(){return function(e){var t=e,n=function(i){var s=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return s.lastIndex=0,s.test(i)?'"'+i.replace(s,function(a){var l=o[a];return typeof l=="string"?l:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'},r=function(i,s){var o="",a=" ",l=0,u="",c="",d=0,f=o,h=[],p=s[i];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(i)),typeof p){case"string":return n(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(o+=a,h=[],ng.apply(p)==="[object Array]"){for(d=p.length,l=0;l<d;l+=1)h[l]=r(l,p)||"null";return c=h.length===0?"[]":o?`[ `+o+h.join(`, `+o)+` `+f+"]":"["+h.join(",")+"]",o=f,c}for(u in p)H0.call(p,u)&&(c=r(u,p),c&&h.push(n(u)+(o?": ":":")+c));return c=h.length===0?"{}":o?"{"+h.join(",")+f+"}":"{"+h.join(",")+"}",o=f,c}};return r("",{"":t})}}();z.JSONDecode=function(){var e,t,n={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` `,r:"\r",t:" "},r,i=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=r,p},s=function(h){return h&&h!==t&&i("Expected '"+h+"' instead of '"+t+"'"),t=r.charAt(e),e+=1,t},o=function(){var h,p="";for(t==="-"&&(p="-",s("-"));t>="0"&&t<="9";)p+=t,s();if(t===".")for(p+=".";s()&&t>="0"&&t<="9";)p+=t;if(t==="e"||t==="E")for(p+=t,s(),(t==="-"||t==="+")&&(p+=t,s());t>="0"&&t<="9";)p+=t,s();if(h=+p,!isFinite(h))i("Bad number");else return h},a=function(){var h,p,m="",g;if(t==='"')for(;s();){if(t==='"')return s(),m;if(t==="\\")if(s(),t==="u"){for(g=0,p=0;p<4&&(h=parseInt(s(),16),!!isFinite(h));p+=1)g=g*16+h;m+=String.fromCharCode(g)}else if(typeof n[t]=="string")m+=n[t];else break;else m+=t}i("Bad string")},l=function(){for(;t&&t<=" ";)s()},u=function(){switch(t){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}i('Unexpected "'+t+'"')},c,d=function(){var h=[];if(t==="["){if(s("["),l(),t==="]")return s("]"),h;for(;t;){if(h.push(c()),l(),t==="]")return s("]"),h;s(","),l()}}i("Bad array")},f=function(){var h,p={};if(t==="{"){if(s("{"),l(),t==="}")return s("}"),p;for(;t;){if(h=a(),l(),s(":"),Object.hasOwnProperty.call(p,h)&&i('Duplicate key "'+h+'"'),p[h]=c(),l(),t==="}")return s("}"),p;s(","),l()}}i("Bad object")};return c=function(){switch(l(),t){case"{":return f();case"[":return d();case'"':return a();case"-":return o();default:return t>="0"&&t<="9"?o():u()}},function(h){var p;return r=h,e=0,t=" ",p=c(),l(),t&&i("Syntax error"),p}}();z.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n,r,i,s,o,a,l,u,c=0,d=0,f="",h=[];if(!e)return e;e=z.utf8Encode(e);do n=e.charCodeAt(c++),r=e.charCodeAt(c++),i=e.charCodeAt(c++),u=n<<16|r<<8|i,s=u>>18&63,o=u>>12&63,a=u>>6&63,l=u&63,h[d++]=t.charAt(s)+t.charAt(o)+t.charAt(a)+t.charAt(l);while(c<e.length);switch(f=h.join(""),e.length%3){case 1:f=f.slice(0,-2)+"==";break;case 2:f=f.slice(0,-1)+"=";break}return f};z.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,` `).replace(/\r/g,` `);var t="",n,r,i=0,s;for(n=r=0,i=e.length,s=0;s<i;s++){var o=e.charCodeAt(s),a=null;o<128?r++:o>127&&o<2048?a=String.fromCharCode(o>>6|192,o&63|128):a=String.fromCharCode(o>>12|224,o>>6&63|128,o&63|128),a!==null&&(r>n&&(t+=e.substring(n,r)),t+=a,n=r=s+1)}return r>n&&(t+=e.substring(n,e.length)),t};z.UUID=function(){var e=function(){var r=1*new Date,i;if(ft.performance&&ft.performance.now)i=ft.performance.now();else for(i=0;r==1*new Date;)i++;return r.toString(16)+Math.floor(i).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},n=function(){var r=eo,i,s,o=[],a=0;function l(u,c){var d,f=0;for(d=0;d<c.length;d++)f|=o[d]<<d*8;return u^f}for(i=0;i<r.length;i++)s=r.charCodeAt(i),o.unshift(s&255),o.length>=4&&(a=l(a,o),o=[]);return o.length>0&&(a=l(a,o)),a.toString(16)};return function(){var r=(xb.height*xb.width).toString(16);return e()+"-"+t()+"-"+n()+"-"+r+"-"+e()}}();var vN=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];z.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<vN.length;t++)if(e.indexOf(vN[t])!==-1)return!0;return!1};z.HTTPBuildQuery=function(e,t){var n,r,i=[];return z.isUndefined(t)&&(t="&"),z.each(e,function(s,o){n=encodeURIComponent(s.toString()),r=encodeURIComponent(o),i[i.length]=r+"="+n}),i.join(t)};z.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var n="[\\?&]"+t+"=([^&#]*)",r=new RegExp(n),i=r.exec(e);if(i===null||i&&typeof i[1]!="string"&&i[1].length)return"";var s=i[1];try{s=decodeURIComponent(s)}catch{Qt.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")};z.cookie={get:function(e){for(var t=e+"=",n=cn.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=z.JSONDecode(z.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,n,r,i,s,o){var a="",l="",u="";if(o)a="; domain="+o;else if(r){var c=yN(cn.location.hostname);a=c?"; domain=."+c:""}if(n){var d=new Date;d.setTime(d.getTime()+n*1e3),l="; expires="+d.toGMTString()}s&&(i=!0,u="; SameSite=None"),i&&(u+="; secure"),cn.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+a+u},set:function(e,t,n,r,i,s,o){var a="",l="",u="";if(o)a="; domain="+o;else if(r){var c=yN(cn.location.hostname);a=c?"; domain=."+c:""}if(n){var d=new Date;d.setTime(d.getTime()+n*24*60*60*1e3),l="; expires="+d.toGMTString()}s&&(i=!0,u="; SameSite=None"),i&&(u+="; secure");var f=e+"="+encodeURIComponent(t)+l+"; path=/"+a+u;return cn.cookie=f,f},remove:function(e,t,n){z.cookie.set(e,"",-1,t,!1,!1,n)}};var DS=null,Eb=function(e,t){if(DS!==null&&!t)return DS;var n=!0;try{e=e||ft.localStorage;var r="__mplss_"+LO(8),i="xyz";e.setItem(r,i),e.getItem(r)!==i&&(n=!1),e.removeItem(r)}catch{n=!1}return DS=n,n};z.localStorage={is_supported:function(e){var t=Eb(null,e);return t||Qt.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){Qt.error("localStorage error: "+e)},get:function(e){try{return ft.localStorage.getItem(e)}catch(t){z.localStorage.error(t)}return null},parse:function(e){try{return z.JSONDecode(z.localStorage.get(e))||{}}catch{}return null},set:function(e,t){try{ft.localStorage.setItem(e,t)}catch(n){z.localStorage.error(n)}},remove:function(e){try{ft.localStorage.removeItem(e)}catch(t){z.localStorage.error(t)}}};z.register_event=function(){var e=function(r,i,s,o,a){if(!r){Qt.error("No valid element provided to register_event");return}if(r.addEventListener&&!o)r.addEventListener(i,s,!!a);else{var l="on"+i,u=r[l];r[l]=t(r,s,u)}};function t(r,i,s){var o=function(a){if(a=a||n(ft.event),!!a){var l=!0,u,c;return z.isFunction(s)&&(u=s(a)),c=i.call(r,a),(u===!1||c===!1)&&(l=!1),l}};return o}function n(r){return r&&(r.preventDefault=n.preventDefault,r.stopPropagation=n.stopPropagation),r}return n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0},e}();var mge=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');z.dom_query=function(){function e(i){return i.all?i.all:i.getElementsByTagName("*")}var t=/[\t\r\n]/g;function n(i,s){var o=" "+s+" ";return(" "+i.className+" ").replace(t," ").indexOf(o)>=0}function r(i){if(!cn.getElementsByTagName)return[];var s=i.split(" "),o,a,l,u,c,d,f,h,p,m,g=[cn];for(d=0;d<s.length;d++){if(o=s[d].replace(/^\s+/,"").replace(/\s+$/,""),o.indexOf("#")>-1){a=o.split("#"),l=a[0];var v=a[1],w=cn.getElementById(v);if(!w||l&&w.nodeName.toLowerCase()!=l)return[];g=[w];continue}if(o.indexOf(".")>-1){a=o.split("."),l=a[0];var b=a[1];for(l||(l="*"),u=[],c=0,f=0;f<g.length;f++)for(l=="*"?p=e(g[f]):p=g[f].getElementsByTagName(l),h=0;h<p.length;h++)u[c++]=p[h];for(g=[],m=0,f=0;f<u.length;f++)u[f].className&&z.isString(u[f].className)&&n(u[f],b)&&(g[m++]=u[f]);continue}var _=o.match(mge);if(_){l=_[1];var x=_[2],S=_[3],I=_[4];for(l||(l="*"),u=[],c=0,f=0;f<g.length;f++)for(l=="*"?p=e(g[f]):p=g[f].getElementsByTagName(l),h=0;h<p.length;h++)u[c++]=p[h];g=[],m=0;var P;switch(S){case"=":P=function(R){return R.getAttribute(x)==I};break;case"~":P=function(R){return R.getAttribute(x).match(new RegExp("\\b"+I+"\\b"))};break;case"|":P=function(R){return R.getAttribute(x).match(new RegExp("^"+I+"-?"))};break;case"^":P=function(R){return R.getAttribute(x).indexOf(I)===0};break;case"$":P=function(R){return R.getAttribute(x).lastIndexOf(I)==R.getAttribute(x).length-I.length};break;case"*":P=function(R){return R.getAttribute(x).indexOf(I)>-1};break;default:P=function(R){return R.getAttribute(x)}}for(g=[],m=0,f=0;f<u.length;f++)P(u[f])&&(g[m++]=u[f]);continue}for(l=o,u=[],c=0,f=0;f<g.length;f++)for(p=g[f].getElementsByTagName(l),h=0;h<p.length;h++)u[c++]=p[h];g=u}return g}return function(i){return z.isElement(i)?[i]:z.isObject(i)&&!z.isUndefined(i.length)?i:r.call(this,i)}}();var gge=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],vge=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];z.info={campaignParams:function(e){var t="",n={};return z.each(gge,function(r){t=z.getQueryParam(cn.URL,r),t.length?n[r]=t:e!==void 0&&(n[r]=e)}),n},clickParams:function(){var e="",t={};return z.each(vge,function(n){e=z.getQueryParam(cn.URL,n),e.length&&(t[n]=e)}),t},marketingParams:function(){return z.extend(z.info.campaignParams(),z.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=z.info.searchEngine(e),n=t!="yahoo"?"q":"p",r={};if(t!==null){r.$search_engine=t;var i=z.getQueryParam(e,n);i.length&&(r.mp_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||z.includes(e," OPR/")?z.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":z.includes(e,"IEMobile")||z.includes(e,"WPDesktop")?"Internet Explorer Mobile":z.includes(e,"SamsungBrowser/")?"Samsung Internet":z.includes(e,"Edge")||z.includes(e,"Edg/")?"Microsoft Edge":z.includes(e,"FBIOS")?"Facebook Mobile":z.includes(e,"Chrome")?"Chrome":z.includes(e,"CriOS")?"Chrome iOS":z.includes(e,"UCWEB")||z.includes(e,"UCBrowser")?"UC Browser":z.includes(e,"FxiOS")?"Firefox iOS":z.includes(t,"Apple")?z.includes(e,"Mobile")?"Mobile Safari":"Safari":z.includes(e,"Android")?"Android Mobile":z.includes(e,"Konqueror")?"Konqueror":z.includes(e,"Firefox")?"Firefox":z.includes(e,"MSIE")||z.includes(e,"Trident/")?"Internet Explorer":z.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r=z.info.browser(e,t,n),i={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},s=i[r];if(s===void 0)return null;var o=e.match(s);return o?parseFloat(o[o.length-2]):null},os:function(){var e=eo;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return ft.location.href},properties:function(e){return typeof e!="object"&&(e={}),z.extend(z.strip_empty_properties({$os:z.info.os(),$browser:z.info.browser(eo,dl.vendor,Jg),$referrer:cn.referrer,$referring_domain:z.info.referringDomain(cn.referrer),$device:z.info.device(eo)}),{$current_url:z.info.currentUrl(),$browser_version:z.info.browserVersion(eo,dl.vendor,Jg),$screen_height:xb.height,$screen_width:xb.width,mp_lib:"web",$lib_version:mo.LIB_VERSION,$insert_id:LO(),time:z.timestamp()/1e3},z.strip_empty_properties(e))},people_properties:function(){return z.extend(z.strip_empty_properties({$os:z.info.os(),$browser:z.info.browser(eo,dl.vendor,Jg)}),{$browser_version:z.info.browserVersion(eo,dl.vendor,Jg)})},mpPageViewProperties:function(){return z.strip_empty_properties({current_page_title:cn.title,current_domain:ft.location.hostname,current_url_path:ft.location.pathname,current_url_protocol:ft.location.protocol,current_url_search:ft.location.search})}};var LO=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},yge=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,bge=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,yN=function(e){var t=bge,n=e.split("."),r=n[n.length-1];(r.length>4||r==="com"||r==="org")&&(t=yge);var i=e.match(t);return i?i[0]:""},wge=function(){var e=ft.navigator.onLine;return z.isUndefined(e)||e},Tb=null,kb=null;typeof JSON<"u"&&(Tb=JSON.stringify,kb=JSON.parse);Tb=Tb||z.JSONEncode;kb=kb||z.JSONDecode;z.toArray=z.toArray;z.isObject=z.isObject;z.JSONEncode=z.JSONEncode;z.JSONDecode=z.JSONDecode;z.isBlockedUA=z.isBlockedUA;z.isEmptyObject=z.isEmptyObject;z.info=z.info;z.info.device=z.info.device;z.info.browser=z.info.browser;z.info.browserVersion=z.info.browserVersion;z.info.properties=z.info.properties;z.NPO=ou;var _ge="__mp_opt_in_out_";function Sge(e,t){jj(!0,e,t)}function xge(e,t){jj(!1,e,t)}function Ege(e,t){return Vj(e,t)==="1"}function Hj(e,t){if(kge(t))return Qt.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n=Vj(e,t)==="0";return n&&Qt.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function au(e){return zO(e,function(t){return this.get_config(t)})}function lu(e){return zO(e,function(t){return this._get_config(t)})}function rh(e){return zO(e,function(t){return this._get_config(t)})}function Tge(e,t){t=t||{},FO(t).remove(BO(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function FO(e){return e=e||{},e.persistenceType==="localStorage"?z.localStorage:z.cookie}function BO(e,t){return t=t||{},(t.persistencePrefix||_ge)+e}function Vj(e,t){return FO(t).get(BO(e,t))}function kge(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||ft,n=t.navigator||{},r=!1;return z.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(i){z.includes([!0,1,"1","yes"],i)&&(r=!0)}),r}function jj(e,t,n){if(!z.isString(t)||!t.length){Qt.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}n=n||{},FO(n).set(BO(t,n),e?1:0,z.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})}function zO(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),s=t.call(this,"opt_out_tracking_persistence_type"),o=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");r&&(n=Hj(r,{ignoreDnt:i,persistenceType:s,persistencePrefix:o,window:a}))}catch(u){Qt.error("Unexpected error when checking tracking opt-out status: "+u)}if(!n)return e.apply(this,arguments);var l=arguments[arguments.length-1];typeof l=="function"&&l(0)}}var Cge=rg("lock"),Uj=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||$n};Uj.prototype.withLock=function(e,t){var n=this.promiseImpl;return new n(z.bind(function(r,i){var s=t||new Date().getTime()+"|"+Math.random(),o=new Date().getTime(),a=this.storageKey,l=this.pollIntervalMS,u=this.timeoutMS,c=this.storage,d=a+":X",f=a+":Y",h=a+":Z",p=function(b){if(new Date().getTime()-o>u){Cge.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+s+"]"),c.removeItem(h),c.removeItem(f),v();return}setTimeout(function(){try{b()}catch(_){i(_)}},l*(Math.random()+.1))},m=function(b,_){b()?_():p(function(){m(b,_)})},g=function(){var b=c.getItem(f);return b&&b!==s?!1:(c.setItem(f,s),c.getItem(f)===s?!0:(Eb(c,!0)||i(new Error("localStorage support dropped while acquiring lock")),!1))},v=function(){c.setItem(d,s),m(g,function(){if(c.getItem(d)===s){w();return}p(function(){if(c.getItem(f)!==s){v();return}m(function(){return!c.getItem(h)},w)})})},w=function(){c.setItem(h,"1");var b=function(){c.removeItem(h),c.getItem(f)===s&&c.removeItem(f),c.getItem(d)===s&&c.removeItem(d)};e().then(function(_){b(),r(_)}).catch(function(_){b(),i(_)})};try{if(Eb(c,!0))v();else throw new Error("localStorage support check failed")}catch(b){i(b)}},this))};var ig=function(e){this.storage=e||localStorage};ig.prototype.init=function(){return $n.resolve()};ig.prototype.setItem=function(e,t){return new $n(z.bind(function(n,r){try{this.storage.setItem(e,t)}catch(i){r(i)}n()},this))};ig.prototype.getItem=function(e){return new $n(z.bind(function(t,n){var r;try{r=this.storage.getItem(e)}catch(i){n(i)}t(r)},this))};ig.prototype.removeItem=function(e){return new $n(z.bind(function(t,n){try{this.storage.removeItem(e)}catch(r){n(r)}t()},this))};var bN=rg("batch"),Pa=function(e,t){t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new ig,this.lock=new Uj(e,{storage:t.sharedLockStorage||window.localStorage}),this.queueStorage.init()),this.reportError=t.errorReporter||z.bind(bN.error,bN),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1};Pa.prototype.ensureInit=function(){return this.initialized?$n.resolve():this.queueStorage.init().then(z.bind(function(){this.initialized=!0},this)).catch(z.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))};Pa.prototype.enqueue=function(e,t){var n={id:LO(),flushAfter:new Date().getTime()+t*2,payload:e};if(this.usePersistence){var r=z.bind(function(){return this.ensureInit().then(z.bind(function(){return this.readFromStorage()},this)).then(z.bind(function(i){return i.push(n),this.saveToStorage(i)},this)).then(z.bind(function(i){return i&&this.memQueue.push(n),i},this)).catch(z.bind(function(i){return this.reportError("Error enqueueing item",i,e),!1},this))},this);return this.lock.withLock(r,this.pid).catch(z.bind(function(i){return this.reportError("Error acquiring storage lock",i),!1},this))}else return this.memQueue.push(n),$n.resolve(!0)};Pa.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(z.bind(function(){return this.readFromStorage()},this)).then(z.bind(function(n){if(n.length){var r={};z.each(t,function(o){r[o.id]=!0});for(var i=0;i<n.length;i++){var s=n[i];if(new Date().getTime()>s.flushAfter&&!r[s.id]&&(s.orphaned=!0,t.push(s),t.length>=e))break}}return t},this)):$n.resolve(t)};var wN=function(e,t){var n=[];return z.each(e,function(r){r.id&&!t[r.id]&&n.push(r)}),n};Pa.prototype.removeItemsByID=function(e){var t={};if(z.each(e,function(r){t[r]=!0}),this.memQueue=wN(this.memQueue,t),this.usePersistence){var n=z.bind(function(){return this.ensureInit().then(z.bind(function(){return this.readFromStorage()},this)).then(z.bind(function(r){return r=wN(r,t),this.saveToStorage(r)},this)).then(z.bind(function(){return this.readFromStorage()},this)).then(z.bind(function(r){for(var i=0;i<r.length;i++){var s=r[i];if(s.id&&t[s.id])throw new Error("Item not removed from storage")}return!0},this)).catch(z.bind(function(r){return this.reportError("Error removing items",r,e),!1},this))},this);return this.lock.withLock(n,this.pid).catch(z.bind(function(r){return this.reportError("Error acquiring storage lock",r),Eb(this.queueStorage.storage,!0)?!1:n().then(z.bind(function(i){return i||this.queueStorage.removeItem(this.storageKey).then(function(){return i})},this)).catch(z.bind(function(i){return this.reportError("Error clearing queue",i),!1},this))},this))}else return $n.resolve(!0)};var _N=function(e,t){var n=[];return z.each(e,function(r){var i=r.id;if(i in t){var s=t[i];s!==null&&(r.payload=s,n.push(r))}else n.push(r)}),n};Pa.prototype.updatePayloads=function(e){return this.memQueue=_N(this.memQueue,e),this.usePersistence?this.lock.withLock(z.bind(function(){return this.ensureInit().then(z.bind(function(){return this.readFromStorage()},this)).then(z.bind(function(n){return n=_N(n,e),this.saveToStorage(n)},this)).catch(z.bind(function(n){return this.reportError("Error updating items",e,n),!1},this))},this),this.pid).catch(z.bind(function(t){return this.reportError("Error acquiring storage lock",t),!1},this)):$n.resolve(!0)};Pa.prototype.readFromStorage=function(){return this.ensureInit().then(z.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(z.bind(function(e){return e&&(e=kb(e),z.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(z.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))};Pa.prototype.saveToStorage=function(e){try{var t=Tb(e)}catch(n){return this.reportError("Error serializing queue",n),$n.resolve(!1)}return this.ensureInit().then(z.bind(function(){return this.queueStorage.setItem(this.storageKey,t)},this)).then(function(){return!0}).catch(z.bind(function(n){return this.reportError("Error saving queue",n),!1},this))};Pa.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(z.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):$n.resolve()};var Oge=10*60*1e3,Sp=rg("batch"),us=function(e,t){this.errorReporter=t.errorReporter,this.queue=new Pa(e,{errorReporter:z.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,usePersistence:t.usePersistence}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1};us.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)};us.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};us.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};us.prototype.clear=function(){return this.queue.clear()};us.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};us.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};us.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(z.bind(function(){this.stopped||this.flush()},this),this.flushInterval))};us.prototype.sendRequestPromise=function(e,t){return new $n(z.bind(function(n){this.sendRequest(e,t,n)},this))};us.prototype.flush=function(e){if(this.requestInProgress)return Sp.log("Flush: Request already in progress"),$n.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,n=new Date().getTime(),r=this.batchSize;return this.queue.fillBatch(r).then(z.bind(function(i){var s=i.length===r,o=[],a={};if(z.each(i,function(d){var f=d.payload;if(this.beforeSendHook&&!d.orphaned&&(f=this.beforeSendHook(f)),f){f.event&&f.properties&&(f.properties=z.extend({},f.properties,{mp_sent_by_lib_version:mo.LIB_VERSION}));var h=!0,p=d.id;p?(this.itemIdsSentSuccessfully[p]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:d,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[p]}),h=!1):this.reportError("[dupe] found item with no ID",{item:d}),h&&o.push(f)}a[d.id]=f},this),o.length<1)return this.requestInProgress=!1,this.resetFlush(),$n.resolve();var l=z.bind(function(){return this.queue.removeItemsByID(z.map(i,function(d){return d.id})).then(z.bind(function(d){return z.each(i,z.bind(function(f){var h=f.id;h?(this.itemIdsSentSuccessfully[h]=this.itemIdsSentSuccessfully[h]||0,this.itemIdsSentSuccessfully[h]++,this.itemIdsSentSuccessfully[h]>5&&this.reportError("[dupe] item ID sent too many times",{item:f,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[h]})):this.reportError("[dupe] found item with no ID while removing",{item:f})},this)),d?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!s?(this.resetFlush(),$n.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),$n.resolve())},this))},this),u=z.bind(function(d){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(a);if(z.isObject(d)&&d.error==="timeout"&&new Date().getTime()-n>=t)return this.reportError("Network timeout; retrying"),this.flush();if(z.isObject(d)&&(d.httpStatusCode>=500||d.httpStatusCode===429||d.httpStatusCode<=0&&!wge()||d.error==="timeout")){var f=this.flushInterval*2;return d.retryAfter&&(f=parseInt(d.retryAfter,10)*1e3||f),f=Math.min(Oge,f),this.reportError("Error; retry in "+f+" ms"),this.scheduleFlush(f),$n.resolve()}else if(z.isObject(d)&&d.httpStatusCode===413)if(i.length>1){var h=Math.max(1,Math.floor(r/2));return this.batchSize=Math.min(this.batchSize,h,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),$n.resolve()}else return this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),l();else return l()}catch(p){this.reportError("Error handling API response",p),this.resetFlush()}},this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(c.transport="sendBeacon"),Sp.log("MIXPANEL REQUEST:",o),this.sendRequestPromise(o,c).then(u)},this)).catch(z.bind(function(i){this.reportError("Error flushing request queue",i),this.resetFlush()},this))};us.prototype.reportError=function(e,t){if(Sp.error.apply(Sp.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(n){Sp.error(n)}};var jd=rg("recorder"),SN=ft.CompressionStream,Rge={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},Ige=new Set([Ks.MouseMove,Ks.MouseInteraction,Ks.Scroll,Ks.ViewportResize,Ks.Input,Ks.TouchMove,Ks.MediaInteraction,Ks.Drag,Ks.Selection]);function Age(e){return e.type===Dj.IncrementalSnapshot&&Ige.has(e.data.source)}var Hs=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout,this._onMaxLengthReached=e.onMaxLengthReached,this._rrwebRecord=e.rrwebRecord,this.replayId=e.replayId,this._stopRecording=null,this.seqNo=0,this.replayStartTime=null,this.replayStartUrl=null,this.batchStartUrl=null,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=_p,this.recordMinMs=0;var t="__mprec_"+this.getConfig("token")+"_"+this.replayId;this.batcher=new us(t,{errorReporter:z.bind(this.reportError,this),flushOnlyOnInterval:!0,libConfig:Rge,sendRequestFunc:z.bind(this.flushEventsWithOptOut,this),usePersistence:!1})};Hs.prototype.getConfig=function(e){return this._mixpanel.get_config(e)};Hs.prototype.get_config=function(e){return this.getConfig(e)};Hs.prototype.startRecording=function(e){if(this._stopRecording!==null){jd.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>_p&&(this.recordMaxMs=_p,jd.critical("record_max_ms cannot be greater than "+_p+"ms. Capping value.")),this.recordMinMs=this.getConfig("record_min_ms"),this.recordMinMs>AS&&(this.recordMinMs=AS,jd.critical("record_min_ms cannot be greater than "+AS+"ms. Capping value.")),this.replayStartTime=new Date().getTime(),this.batchStartUrl=z.info.currentUrl(),this.replayStartUrl=z.info.currentUrl(),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=z.bind(function(){clearTimeout(this.idleTimeoutId),this.idleTimeoutId=setTimeout(this._onIdleTimeout,this.getConfig("record_idle_timeout_ms"))},this),n=this.getConfig("record_block_selector");if((n===""||n===null)&&(n=void 0),this._stopRecording=this._rrwebRecord({emit:z.bind(function(r){this.batcher.enqueue(r),Age(r)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t())},this),blockClass:this.getConfig("record_block_class"),blockSelector:n,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15}}),typeof this._stopRecording!="function"){this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,this.stopRecording();return}t(),this.maxTimeoutId=setTimeout(z.bind(this._onMaxLengthReached,this),this.recordMaxMs)};Hs.prototype.stopRecording=function(){if(!this.isRrwebStopped()){try{this._stopRecording()}catch(e){this.reportError("Error with rrweb stopRecording",e)}this._stopRecording=null}this.batcher.stopped?this.batcher.clear():(this.batcher.flush(),this.batcher.stop()),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId)};Hs.prototype.isRrwebStopped=function(){return this._stopRecording===null};Hs.prototype.flushEventsWithOptOut=function(e,t,n){this._flushEvents(e,t,n,z.bind(this._onOptOut,this))};Hs.prototype._onOptOut=function(e){e===0&&this.stopRecording()};Hs.prototype._sendRequest=function(e,t,n,r){var i=z.bind(function(s,o){s.status===200&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=z.info.currentUrl()),r({status:0,httpStatusCode:s.status,responseBody:o,retryAfter:s.headers.get("Retry-After")})},this);ft.fetch(this.getConfig("api_host")+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:n}).then(function(s){s.json().then(function(o){i(s,o)}).catch(function(o){r({error:o})})}).catch(function(s){r({error:s,httpStatusCode:0})})};Hs.prototype._flushEvents=au(function(e,t,n){const r=e.length;if(r>0){var i=this.replayId,s=e[0].timestamp;(this.seqNo===0||!this.replayStartTime)&&(this.seqNo!==0&&this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=s);var o=e[r-1].timestamp-this.replayStartTime,a={$current_url:this.batchStartUrl,$lib_version:mo.LIB_VERSION,batch_start_time:s/1e3,distinct_id:String(this._mixpanel.get_distinct_id()),mp_lib:"web",replay_id:i,replay_length_ms:o,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},l=z.JSONEncode(e),u=this._mixpanel.get_property("$device_id");u&&(a.$device_id=u);var c=this._mixpanel.get_property("$user_id");if(c&&(a.$user_id=c),SN){var d=new Blob([l],{type:"application/json"}).stream(),f=d.pipeThrough(new SN("gzip"));new Response(f).blob().then(z.bind(function(h){a.format="gzip",this._sendRequest(i,a,h,n)},this))}else a.format="body",this._sendRequest(i,a,l,n)}});Hs.prototype.reportError=function(e,t){jd.error.apply(jd.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(n){jd.error(n)}};var NS=rg("recorder"),ih=function(e){this._mixpanel=e,this.activeRecording=null};ih.prototype.startRecording=function(e){if(this.activeRecording&&!this.activeRecording.isRrwebStopped()){NS.log("Recording already in progress, skipping startRecording.");return}var t=z.bind(function(){NS.log("Idle timeout reached, restarting recording."),this.resetRecording()},this),n=z.bind(function(){NS.log("Max recording length reached, stopping recording."),this.resetRecording()},this);this.activeRecording=new Hs({mixpanelInstance:this._mixpanel,onIdleTimeout:t,onMaxLengthReached:n,replayId:z.UUID(),rrwebRecord:tg}),this.activeRecording.startRecording(e)};ih.prototype.stopRecording=function(){this.activeRecording&&(this.activeRecording.stopRecording(),this.activeRecording=null)};ih.prototype.resetRecording=function(){this.stopRecording(),this.startRecording(!0)};ih.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null};Object.defineProperty(ih.prototype,"replayId",{get:function(){return this.getActiveReplayId()}});ft.__mp_recorder=ih;var Ma=function(){};Ma.prototype.create_properties=function(){};Ma.prototype.event_handler=function(){};Ma.prototype.after_track_handler=function(){};Ma.prototype.init=function(e){return this.mp=e,this};Ma.prototype.track=function(e,t,n,r){var i=this,s=z.dom_query(e);if(s.length===0){Qt.error("The DOM query ("+e+") returned 0 elements");return}return z.each(s,function(o){z.register_event(o,this.override_event,function(a){var l={},u=i.create_properties(n,this),c=i.mp.get_config("track_links_timeout");i.event_handler(a,this,l),window.setTimeout(i.track_callback(r,u,l,!0),c),i.mp.track(t,u,i.track_callback(r,u,l))})},this),!0};Ma.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,!(e&&e(r,t)===!1)&&i.after_track_handler(t,n,r))}};Ma.prototype.create_properties=function(e,t){var n;return typeof e=="function"?n=e(t):n=z.extend({},e),n};var bf=function(){this.override_event="click"};z.inherit(bf,Ma);bf.prototype.create_properties=function(e,t){var n=bf.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n};bf.prototype.event_handler=function(e,t,n){n.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",n.href=t.href,n.new_tab||e.preventDefault()};bf.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var V0=function(){this.override_event="submit"};z.inherit(V0,Ma);V0.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()};V0.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var Vl="$set",wf="$set_once",_s="$unset",wc="$add",go="$append",_c="$union",fa="$remove",Pge="$delete",Wj={set_action:function(e,t){var n={},r={};return z.isObject(e)?z.each(e,function(i,s){this._is_reserved_property(s)||(r[s]=i)},this):r[e]=t,n[Vl]=r,n},unset_action:function(e){var t={},n=[];return z.isArray(e)||(e=[e]),z.each(e,function(r){this._is_reserved_property(r)||n.push(r)},this),t[_s]=n,t},set_once_action:function(e,t){var n={},r={};return z.isObject(e)?z.each(e,function(i,s){this._is_reserved_property(s)||(r[s]=i)},this):r[e]=t,n[wf]=r,n},union_action:function(e,t){var n={},r={};return z.isObject(e)?z.each(e,function(i,s){this._is_reserved_property(s)||(r[s]=z.isArray(i)?i:[i])},this):r[e]=z.isArray(t)?t:[t],n[_c]=r,n},append_action:function(e,t){var n={},r={};return z.isObject(e)?z.each(e,function(i,s){this._is_reserved_property(s)||(r[s]=i)},this):r[e]=t,n[go]=r,n},remove_action:function(e,t){var n={},r={};return z.isObject(e)?z.each(e,function(i,s){this._is_reserved_property(s)||(r[s]=i)},this):r[e]=t,n[fa]=r,n},delete_action:function(){var e={};return e[Pge]="",e}},kn=function(){};z.extend(kn.prototype,Wj);kn.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n};kn.prototype.set=rh(function(e,t,n){var r=this.set_action(e,t);return z.isObject(e)&&(n=t),this._send_request(r,n)});kn.prototype.set_once=rh(function(e,t,n){var r=this.set_once_action(e,t);return z.isObject(e)&&(n=t),this._send_request(r,n)});kn.prototype.unset=rh(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});kn.prototype.union=rh(function(e,t,n){z.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});kn.prototype.delete=rh(function(e){var t=this.delete_action();return this._send_request(t,e)});kn.prototype.remove=rh(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)});kn.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=z.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)};kn.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};kn.prototype._get_config=function(e){return this._mixpanel.get_config(e)};kn.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};kn.prototype.remove=kn.prototype.remove;kn.prototype.set=kn.prototype.set;kn.prototype.set_once=kn.prototype.set_once;kn.prototype.union=kn.prototype.union;kn.prototype.unset=kn.prototype.unset;kn.prototype.toString=kn.prototype.toString;var _t=function(){};z.extend(_t.prototype,Wj);_t.prototype._init=function(e){this._mixpanel=e};_t.prototype.set=lu(function(e,t,n){var r=this.set_action(e,t);return z.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[Vl]=z.extend({},z.info.people_properties(),r[Vl]),this._send_request(r,n)});_t.prototype.set_once=lu(function(e,t,n){var r=this.set_once_action(e,t);return z.isObject(e)&&(n=t),this._send_request(r,n)});_t.prototype.unset=lu(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)});_t.prototype.increment=lu(function(e,t,n){var r={},i={};return z.isObject(e)?(z.each(e,function(s,o){if(!this._is_reserved_property(o))if(isNaN(parseFloat(s))){Qt.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else i[o]=s},this),n=t):(z.isUndefined(t)&&(t=1),i[e]=t),r[wc]=i,this._send_request(r,n)});_t.prototype.append=lu(function(e,t,n){z.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)});_t.prototype.remove=lu(function(e,t,n){z.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)});_t.prototype.union=lu(function(e,t,n){z.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)});_t.prototype.track_charge=lu(function(e,t,n){if(!z.isNumber(e)&&(e=parseFloat(e),isNaN(e))){Qt.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",z.extend({$amount:e},t),n)});_t.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};_t.prototype.delete_user=function(){if(!this._identify_called()){Qt.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};_t.prototype.toString=function(){return this._mixpanel.toString()+".people"};_t.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var s=z.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:s,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),z.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),z.truncate(s,255))};_t.prototype._get_config=function(e){return this._mixpanel.get_config(e)};_t.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};_t.prototype._enqueue=function(e){Vl in e?this._mixpanel.persistence._add_to_people_queue(Vl,e):wf in e?this._mixpanel.persistence._add_to_people_queue(wf,e):_s in e?this._mixpanel.persistence._add_to_people_queue(_s,e):wc in e?this._mixpanel.persistence._add_to_people_queue(wc,e):go in e?this._mixpanel.persistence._add_to_people_queue(go,e):fa in e?this._mixpanel.persistence._add_to_people_queue(fa,e):_c in e?this._mixpanel.persistence._add_to_people_queue(_c,e):Qt.error("Invalid call to _enqueue():",e)};_t.prototype._flush_one_queue=function(e,t,n,r){var i=this,s=z.extend({},this._mixpanel.persistence.load_queue(e)),o=s;!z.isUndefined(s)&&z.isObject(s)&&!z.isEmptyObject(s)&&(i._mixpanel.persistence._pop_from_people_queue(e,s),i._mixpanel.persistence.save(),r&&(o=r(s)),t.call(i,o,function(a,l){a===0&&i._mixpanel.persistence._add_to_people_queue(e,s),z.isUndefined(n)||n(a,l)}))};_t.prototype._flush=function(e,t,n,r,i,s,o){var a=this;this._flush_one_queue(Vl,this.set,e),this._flush_one_queue(wf,this.set_once,r),this._flush_one_queue(_s,this.unset,s,function(g){return z.keys(g)}),this._flush_one_queue(wc,this.increment,t),this._flush_one_queue(_c,this.union,i);var l=this._mixpanel.persistence.load_queue(go);if(!z.isUndefined(l)&&z.isArray(l)&&l.length)for(var u,c=function(g,v){g===0&&a._mixpanel.persistence._add_to_people_queue(go,u),z.isUndefined(n)||n(g,v)},d=l.length-1;d>=0;d--)l=this._mixpanel.persistence.load_queue(go),u=l.pop(),a._mixpanel.persistence.save(),z.isEmptyObject(u)||a.append(u,c);var f=this._mixpanel.persistence.load_queue(fa);if(!z.isUndefined(f)&&z.isArray(f)&&f.length)for(var h,p=function(g,v){g===0&&a._mixpanel.persistence._add_to_people_queue(fa,h),z.isUndefined(o)||o(g,v)},m=f.length-1;m>=0;m--)f=this._mixpanel.persistence.load_queue(fa),h=f.pop(),a._mixpanel.persistence.save(),z.isEmptyObject(h)||a.remove(h,p)};_t.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};_t.prototype.set=_t.prototype.set;_t.prototype.set_once=_t.prototype.set_once;_t.prototype.unset=_t.prototype.unset;_t.prototype.increment=_t.prototype.increment;_t.prototype.append=_t.prototype.append;_t.prototype.remove=_t.prototype.remove;_t.prototype.union=_t.prototype.union;_t.prototype.track_charge=_t.prototype.track_charge;_t.prototype.clear_charges=_t.prototype.clear_charges;_t.prototype.delete_user=_t.prototype.delete_user;_t.prototype.toString=_t.prototype.toString;var $O="__mps",HO="__mpso",VO="__mpus",jO="__mpa",UO="__mpap",WO="__mpr",qO="__mpu",qj="$people_distinct_id",Cb="__alias",pm="__timers",Mge=[$O,HO,VO,jO,UO,WO,qO,qj,Cb,pm],It=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(Qt.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&z.localStorage.is_supported()?this.storage=z.localStorage:this.storage=z.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};It.prototype.properties=function(){var e={};return this.load(),z.each(this.props,function(t,n){z.include(Mge,n)||(e[n]=t)}),e};It.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=z.extend({},e))}};It.prototype.upgrade=function(){var e,t;this.storage===z.localStorage?(e=z.cookie.parse(this.name),z.cookie.remove(this.name),z.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===z.cookie&&(t=z.localStorage.parse(this.name),z.localStorage.remove(this.name),t&&this.register_once(t))};It.prototype.save=function(){this.disabled||this.storage.set(this.name,z.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};It.prototype.load_prop=function(e){return this.load(),this.props[e]};It.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};It.prototype.clear=function(){this.remove(),this.props={}};It.prototype.register_once=function(e,t,n){return z.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof n>"u"?this.default_expiry:n,this.load(),z.each(e,function(r,i){(!this.props.hasOwnProperty(i)||this.props[i]===t)&&(this.props[i]=r)},this),this.save(),!0):!1};It.prototype.register=function(e,t){return z.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),z.extend(this.props,e),this.save(),!0):!1};It.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};It.prototype.update_search_keyword=function(e){this.register(z.info.searchInfo(e))};It.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:z.info.referringDomain(e)||"$direct"},"")};It.prototype.get_referrer_info=function(){return z.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};It.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};It.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};It.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};It.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};It.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};It.prototype.get_cross_subdomain=function(){return this.cross_subdomain};It.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};It.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(Vl),s=this._get_or_create_queue(wf),o=this._get_or_create_queue(_s),a=this._get_or_create_queue(wc),l=this._get_or_create_queue(_c),u=this._get_or_create_queue(fa,[]),c=this._get_or_create_queue(go,[]);n===$O?(z.extend(i,r),this._pop_from_people_queue(wc,r),this._pop_from_people_queue(_c,r),this._pop_from_people_queue(_s,r)):n===HO?(z.each(r,function(d,f){f in s||(s[f]=d)}),this._pop_from_people_queue(_s,r)):n===VO?z.each(r,function(d){z.each([i,s,a,l],function(f){d in f&&delete f[d]}),z.each(c,function(f){d in f&&delete f[d]}),o[d]=!0}):n===jO?(z.each(r,function(d,f){f in i?i[f]+=d:(f in a||(a[f]=0),a[f]+=d)},this),this._pop_from_people_queue(_s,r)):n===qO?(z.each(r,function(d,f){z.isArray(d)&&(f in l||(l[f]=[]),l[f]=l[f].concat(d))}),this._pop_from_people_queue(_s,r)):n===WO?(u.push(r),this._pop_from_people_queue(go,r)):n===UO&&(c.push(r),this._pop_from_people_queue(_s,r)),Qt.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),Qt.log(t),this.save()};It.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];z.isUndefined(n)||z.each(t,function(r,i){e===go||e===fa?z.each(n,function(s){s[i]===r&&delete s[i]}):delete n[i]},this)};It.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};It.prototype._get_queue_key=function(e){if(e===Vl)return $O;if(e===wf)return HO;if(e===_s)return VO;if(e===wc)return jO;if(e===go)return UO;if(e===fa)return WO;if(e===_c)return qO;Qt.error("Invalid queue:",e)};It.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=z.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)};It.prototype.set_event_timer=function(e,t){var n=this.load_prop(pm)||{};n[e]=t,this.props[pm]=n,this.save()};It.prototype.remove_event_timer=function(e){var t=this.load_prop(pm)||{},n=t[e];return z.isUndefined(n)||(delete this.props[pm][e],this.save()),n};var GO,Gj=function(e,t){throw new Error(e+" not available in this build.")},Dr,Kj=0,Dge=1,Nge=function(e){return e},mm=function(){},Ki="mixpanel",Yj="base64",Lge="json",KO="$device:",Ud=ft.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Xj=!Ud&&eo.indexOf("MSIE")===-1&&eo.indexOf("Mozilla")===-1,Ob=null;dl.sendBeacon&&(Ob=function(){return dl.sendBeacon.apply(dl,arguments)});var Jj={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},xN={api_host:"https://api-js.mixpanel.com",api_routes:Jj,api_method:"POST",api_transport:"XHR",api_payload_format:Yj,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:mm,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:mm,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_canvas:!1,record_collect_fonts:!1,record_idle_timeout_ms:30*60*1e3,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:_p,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Qj=!1,Re=function(){},ZE=function(e,t,n){var r,i=n===Ki?Dr:Dr[n];if(i&&GO===Kj)r=i;else{if(i&&!z.isArray(i)){Qt.error("You have already initialized "+n);return}r=new Re}if(r._cached_groups={},r._init(e,t,n),r.people=new _t,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var s=z.info.campaignParams(null),o={},a=!1;z.each(s,function(l,u){o["initial_"+u]=l,l&&(a=!0)}),a&&r.people.set_once(o)}return mo.DEBUG=mo.DEBUG||r.get_config("debug"),!z.isUndefined(i)&&z.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};Re.prototype.init=function(e,t,n){if(z.isUndefined(n)){this.report_error("You must name your new library: init(token, config, name)");return}if(n===Ki){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var r=ZE(e,t,n);return Dr[n]=r,r._loaded(),r};Re.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var r={};if(!("api_payload_format"in t)){var i=t.api_host||xN.api_host;i.match(/\.mixpanel\.com/)&&(r.api_payload_format=Lge)}if(this.set_config(z.extend({},xN,r,t,{name:n,token:e,callback_fn:(n===Ki?n:Ki+"."+n)+"._jsc"})),this._jsc=mm,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!z.localStorage.is_supported(!0)||!Ud)this._batch_requests=!1,Qt.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),z.each(this.get_batcher_configs(),function(l){Qt.log("Clearing batch queue "+l.queue_key),z.localStorage.remove(l.queue_key)});else if(this.init_batchers(),Ob&&ft.addEventListener){var s=z.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);ft.addEventListener("pagehide",function(l){l.persisted&&s()}),ft.addEventListener("visibilitychange",function(){cn.visibilityState==="hidden"&&s()})}}this.persistence=this.cookie=new It(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=z.UUID();this.get_distinct_id()||this.register_once({distinct_id:KO+o,$device_id:o},"");var a=this.get_config("track_pageview");a&&this._init_url_change_tracking(a),this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent")&&this.start_session_recording()};Re.prototype.start_session_recording=au(function(){if(!ft.MutationObserver){Qt.critical("Browser does not support MutationObserver; skipping session recording");return}var e=z.bind(function(){this._recorder=this._recorder||new ft.__mp_recorder(this),this._recorder.startRecording()},this);z.isUndefined(ft.__mp_recorder)?Gj(this.get_config("recorder_src"),e):e()});Re.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():Qt.critical("Session recorder module not loaded")};Re.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e};Re.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();if(t){var n=z.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")});e="https://mixpanel.com/projects/replay-redirect?"+n}return e};Re.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null};Re.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=z.info.campaignParams(null);z.each(e,(function(t,n){this.unregister(n)}).bind(this))}};Re.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(cn.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(z.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(cn.referrer)};Re.prototype._dom_loaded=function(){z.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||z.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};Re.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Qj)return this.__dom_loaded_queue.push([e,t]),!1;var n=new e().init(this);return n.track.apply(n,t)};Re.prototype._init_url_change_tracking=function(e){var t="",n=this.track_pageview();if(n&&(t=z.info.currentUrl()),z.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){ft.addEventListener("popstate",function(){ft.dispatchEvent(new Event("mp_locationchange"))}),ft.addEventListener("hashchange",function(){ft.dispatchEvent(new Event("mp_locationchange"))});var r=ft.history.pushState;typeof r=="function"&&(ft.history.pushState=function(s,o,a){r.call(ft.history,s,o,a),ft.dispatchEvent(new Event("mp_locationchange"))});var i=ft.history.replaceState;typeof i=="function"&&(ft.history.replaceState=function(s,o,a){i.call(ft.history,s,o,a),ft.dispatchEvent(new Event("mp_locationchange"))}),ft.addEventListener("mp_locationchange",(function(){var s=z.info.currentUrl(),o=!1;if(e==="full-url"?o=s!==t:e==="url-with-path-and-query-string"?o=s.split("#")[0]!==t.split("#")[0]:e==="url-with-path"&&(o=s.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),o){var a=this.track_pageview();a&&(t=s)}}).bind(this))}};Re.prototype._prepare_callback=function(e,t){if(z.isUndefined(e))return null;if(Ud){var n=function(o){e(o,t)};return n}else{var r=this._jsc,i=""+Math.floor(Math.random()*1e8),s=this.get_config("callback_fn")+"["+i+"]";return r[i]=function(o){delete r[i],e(o,t)},s}};Re.prototype._send_request=function(e,t,n,r){var i=!0;if(Xj)return this.__request_queue.push(arguments),i;var s={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},o=null;!r&&(z.isFunction(n)||typeof n=="string")&&(r=n,n=null),n=z.extend(s,n||{}),Ud||(n.method="GET");var a=n.method==="POST",l=Ob&&a&&n.transport.toLowerCase()==="sendbeacon",u=n.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),Ud||(r?t.callback=r:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),a&&(o="data="+encodeURIComponent(t.data),delete t.data),e+="?"+z.HTTPBuildQuery(t);var c=this;if("img"in t){var d=cn.createElement("img");d.src=e,cn.body.appendChild(d)}else if(l){try{i=Ob(e,o)}catch(v){c.report_error(v),i=!1}try{r&&r(i?1:0)}catch(v){c.report_error(v)}}else if(Ud)try{var f=new XMLHttpRequest;f.open(n.method,e,!0);var h=this.get_config("xhr_headers");if(a&&(h["Content-Type"]="application/x-www-form-urlencoded"),z.each(h,function(v,w){f.setRequestHeader(w,v)}),n.timeout_ms&&typeof f.timeout<"u"){f.timeout=n.timeout_ms;var p=new Date().getTime()}f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4)if(f.status===200){if(r)if(u){var v;try{v=z.JSONDecode(f.responseText)}catch(_){if(c.report_error(_),n.ignore_json_errors)v=f.responseText;else return}r(v)}else r(Number(f.responseText))}else{var w;if(f.timeout&&!f.status&&new Date().getTime()-p>=f.timeout?w="timeout":w="Bad HTTP status: "+f.status+" "+f.statusText,c.report_error(w),r)if(u){var b=f.responseHeaders||{};r({status:0,httpStatusCode:f.status,error:w,retryAfter:b["Retry-After"]})}else r(0)}},f.send(o)}catch(v){c.report_error(v),i=!1}else{var m=cn.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=cn.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return i};Re.prototype._execute_array=function(e){var t,n=[],r=[],i=[];z.each(e,function(o){o&&(t=o[0],z.isArray(t)?i.push(o):typeof o=="function"?o.call(this):z.isArray(o)&&t==="alias"?n.push(o):z.isArray(o)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?i.push(o):r.push(o))},this);var s=function(o,a){z.each(o,function(l){if(z.isArray(l[0])){var u=a;z.each(l,function(c){u=u[c[0]].apply(u,c.slice(1))})}else this[l[0]].apply(this,l.slice(1))},a)};s(n,this),s(r,this),s(i,this)};Re.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};Re.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs};Re.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=z.bind(function(n){return new us(n.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:z.bind(function(r,i,s){this._send_request(this.get_config("api_host")+n.endpoint,this._encode_data_for_request(r),i,this._prepare_callback(s,r))},this),beforeSendHook:z.bind(function(r){return this._run_hook("before_send_"+n.type,r)},this),stopAllBatchingFunc:z.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};Re.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,z.each(this.request_batchers,function(e){e.start()}))};Re.prototype.stop_batch_senders=function(){this._batch_requests=!1,z.each(this.request_batchers,function(e){e.stop(),e.clear()})};Re.prototype.push=function(e){this._execute_array([e])};Re.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};Re.prototype._encode_data_for_request=function(e){var t=z.JSONEncode(e);return this.get_config("api_payload_format")===Yj&&(t=z.base64Encode(t)),{data:t}};Re.prototype._track_or_batch=function(e,t){var n=z.truncate(e.data,255),r=e.endpoint,i=e.batcher,s=e.should_send_immediately,o=e.send_request_options||{};t=t||mm;var a=!0,l=z.bind(function(){return o.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(Qt.log("MIXPANEL REQUEST:"),Qt.log(n),this._send_request(r,this._encode_data_for_request(n),o,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!s?i.enqueue(n).then(function(u){u?t(1,n):l()}):a=l(),a&&n};Re.prototype.track=au(function(e,t,n,r){!r&&typeof n=="function"&&(r=n,n=null),n=n||{};var i=n.transport;i&&(n.transport=i);var s=n.send_immediately;if(typeof r!="function"&&(r=mm),z.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){r(0);return}t=z.extend({},t),t.token=this.get_config("token");var o=this.persistence.remove_event_timer(e);if(!z.isUndefined(o)){var a=new Date().getTime()-o;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?z.info.marketingParams():{};t=z.extend({},z.info.properties({mp_loader:this.get_config("mp_loader")}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var u=this.get_config("property_blacklist");z.isArray(u)?z.each(u,function(f){delete t[f]}):this.report_error("Invalid value for property_blacklist config: "+u);var c={event:e,properties:t},d=this._track_or_batch({type:"events",data:c,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:s,send_request_options:n},r);return d});Re.prototype.set_group=au(function(e,t,n){z.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)});Re.prototype.add_group=au(function(e,t,n){var r=this.get_property(e),i={};return r===void 0?(i[e]=[t],this.register(i)):r.indexOf(t)===-1&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)});Re.prototype.remove_group=au(function(e,t,n){var r=this.get_property(e);if(r!==void 0){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),r.length===0&&this.unregister(e)}return this.people.remove(e,t,n)});Re.prototype.track_with_groups=au(function(e,t,n,r){var i=z.extend({},t||{});return z.each(n,function(s,o){s!=null&&(i[o]=s)}),this.track(e,i,r)});Re.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};Re.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};Re.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return(r===void 0||r._group_key!==e||r._group_id!==t)&&(r=new kn,r._init(this,e,t),this._cached_groups[n]=r),r};Re.prototype.track_pageview=au(function(e,t){typeof e!="object"&&(e={}),t=t||{};var n=t.event_name||"$mp_web_page_view",r=z.extend(z.info.mpPageViewProperties(),z.info.campaignParams(),z.info.clickParams()),i=z.extend({},r,e);return this.track(n,i)});Re.prototype.track_links=function(){return this._track_dom.call(this,bf,arguments)};Re.prototype.track_forms=function(){return this._track_dom.call(this,V0,arguments)};Re.prototype.time_event=function(e){if(z.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var Fge={persistent:!0},YO=function(e){var t;return z.isObject(e)?t=e:z.isUndefined(e)?t={}:t={days:e},z.extend({},Fge,t)};Re.prototype.register=function(e,t){var n=YO(t);n.persistent?this.persistence.register(e,n.days):z.extend(this.unpersisted_superprops,e)};Re.prototype.register_once=function(e,t,n){var r=YO(n);r.persistent?this.persistence.register_once(e,t,r.days):(typeof t>"u"&&(t="None"),z.each(e,function(i,s){(!this.unpersisted_superprops.hasOwnProperty(s)||this.unpersisted_superprops[s]===t)&&(this.unpersisted_superprops[s]=i)},this))};Re.prototype.unregister=function(e,t){t=YO(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};Re.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)};Re.prototype.identify=function(e,t,n,r,i,s,o,a){var l=this.get_distinct_id();if(e&&l!==e){if(typeof e=="string"&&e.indexOf(KO)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==l&&e!==this.get_property(Cb)&&(this.unregister(Cb),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,s,o,a),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0})};Re.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=z.UUID();this.register_once({distinct_id:KO+e,$device_id:e},"")};Re.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};Re.prototype.alias=function(e,t){if(e===this.get_property(qj))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return z.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Cb,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};Re.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};Re.prototype.set_config=function(e){if(z.isObject(e)){z.extend(this.config,e);var t=e.batch_size;t&&z.each(this.request_batchers,function(n){n.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),mo.DEBUG=mo.DEBUG||this.get_config("debug")}};Re.prototype.get_config=function(e){return this.config[e]};Re.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Nge).apply(this,cl.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};Re.prototype.get_property=function(e){return this.persistence.load_prop([e])};Re.prototype.toString=function(){var e=this.get_config("name");return e!==Ki&&(e=Ki+"."+e),e};Re.prototype._event_is_disabled=function(e){return z.isBlockedUA(eo)||this._flags.disable_all_events||z.include(this.__disabled_events,e)};Re.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&z.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||z.cookie.get("mp_optout"))&&(z.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};Re.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()};Re.prototype._gdpr_call_func=function(e,t){return t=z.extend({track:z.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),z.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};Re.prototype.opt_in_tracking=function(e){e=z.extend({enable_persistence:!0},e),this._gdpr_call_func(Sge,e),this._gdpr_update_persistence(e)};Re.prototype.opt_out_tracking=function(e){e=z.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(xge,e),this._gdpr_update_persistence(e)};Re.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(Ege,e)};Re.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(Hj,e)};Re.prototype.clear_opt_in_out_tracking=function(e){e=z.extend({enable_persistence:!0},e),this._gdpr_call_func(Tge,e),this._gdpr_update_persistence(e)};Re.prototype.report_error=function(e,t){Qt.error.apply(Qt.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(n){Qt.error(n)}};Re.prototype.init=Re.prototype.init;Re.prototype.reset=Re.prototype.reset;Re.prototype.disable=Re.prototype.disable;Re.prototype.time_event=Re.prototype.time_event;Re.prototype.track=Re.prototype.track;Re.prototype.track_links=Re.prototype.track_links;Re.prototype.track_forms=Re.prototype.track_forms;Re.prototype.track_pageview=Re.prototype.track_pageview;Re.prototype.register=Re.prototype.register;Re.prototype.register_once=Re.prototype.register_once;Re.prototype.unregister=Re.prototype.unregister;Re.prototype.identify=Re.prototype.identify;Re.prototype.alias=Re.prototype.alias;Re.prototype.name_tag=Re.prototype.name_tag;Re.prototype.set_config=Re.prototype.set_config;Re.prototype.get_config=Re.prototype.get_config;Re.prototype.get_property=Re.prototype.get_property;Re.prototype.get_distinct_id=Re.prototype.get_distinct_id;Re.prototype.toString=Re.prototype.toString;Re.prototype.opt_out_tracking=Re.prototype.opt_out_tracking;Re.prototype.opt_in_tracking=Re.prototype.opt_in_tracking;Re.prototype.has_opted_out_tracking=Re.prototype.has_opted_out_tracking;Re.prototype.has_opted_in_tracking=Re.prototype.has_opted_in_tracking;Re.prototype.clear_opt_in_out_tracking=Re.prototype.clear_opt_in_out_tracking;Re.prototype.get_group=Re.prototype.get_group;Re.prototype.set_group=Re.prototype.set_group;Re.prototype.add_group=Re.prototype.add_group;Re.prototype.remove_group=Re.prototype.remove_group;Re.prototype.track_with_groups=Re.prototype.track_with_groups;Re.prototype.start_batch_senders=Re.prototype.start_batch_senders;Re.prototype.stop_batch_senders=Re.prototype.stop_batch_senders;Re.prototype.start_session_recording=Re.prototype.start_session_recording;Re.prototype.stop_session_recording=Re.prototype.stop_session_recording;Re.prototype.get_session_recording_properties=Re.prototype.get_session_recording_properties;Re.prototype.get_session_replay_url=Re.prototype.get_session_replay_url;Re.prototype.DEFAULT_API_ROUTES=Jj;It.prototype.properties=It.prototype.properties;It.prototype.update_search_keyword=It.prototype.update_search_keyword;It.prototype.update_referrer_info=It.prototype.update_referrer_info;It.prototype.get_cross_subdomain=It.prototype.get_cross_subdomain;It.prototype.clear=It.prototype.clear;var Od={},Bge=function(){z.each(Od,function(e,t){t!==Ki&&(Dr[t]=e)}),Dr._=z},zge=function(){Dr.init=function(e,t,n){if(n)return Dr[n]||(Dr[n]=Od[n]=ZE(e,t,n),Dr[n]._loaded()),Dr[n];var r=Dr;Od[Ki]?r=Od[Ki]:e&&(r=ZE(e,t,Ki),r._loaded(),Od[Ki]=r),Dr=r,GO===Dge&&(ft[Ki]=Dr),Bge()}},$ge=function(){function e(){e.done||(e.done=!0,Qj=!0,Xj=!1,z.each(Od,function(r){r._dom_loaded()}))}function t(){try{cn.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(cn.addEventListener)cn.readyState==="complete"?e():cn.addEventListener("DOMContentLoaded",e,!1);else if(cn.attachEvent){cn.attachEvent("onreadystatechange",e);var n=!1;try{n=ft.frameElement===null}catch{}cn.documentElement.doScroll&&n&&t()}z.register_event(ft,"load",e,!0)};function Hge(e){return Gj=e,GO=Kj,Dr=new Re,zge(),Dr.init(),$ge(),Dr}function Vge(e,t){t()}var ld=Hge(Vge);const Zj=Symbol("$auth0");function to(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}var Ou=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function XO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function JO(e,t){return e(t={exports:{}},t.exports),t.exports}var Tu=JO(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function r(){var i=this;this.locked=new Map,this.addToLocked=function(s,o){var a=i.locked.get(s);a===void 0?o===void 0?i.locked.set(s,[]):i.locked.set(s,[o]):o!==void 0&&(a.unshift(o),i.locked.set(s,a))},this.isLocked=function(s){return i.locked.has(s)},this.lock=function(s){return new Promise(function(o,a){i.isLocked(s)?i.addToLocked(s,o):(i.addToLocked(s),o())})},this.unlock=function(s){var o=i.locked.get(s);if(o!==void 0&&o.length!==0){var a=o.pop();i.locked.set(s,o),a!==void 0&&setTimeout(a,0)}else i.locked.delete(s)}}return r.getInstance=function(){return r.instance===void 0&&(r.instance=new r),r.instance},r}();t.default=function(){return n.getInstance()}});XO(Tu);var jge=XO(JO(function(e,t){var n=Ou&&Ou.__awaiter||function(c,d,f,h){return new(f||(f=Promise))(function(p,m){function g(b){try{w(h.next(b))}catch(_){m(_)}}function v(b){try{w(h.throw(b))}catch(_){m(_)}}function w(b){b.done?p(b.value):new f(function(_){_(b.value)}).then(g,v)}w((h=h.apply(c,d||[])).next())})},r=Ou&&Ou.__generator||function(c,d){var f,h,p,m,g={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return m={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function v(w){return function(b){return function(_){if(f)throw new TypeError("Generator is already executing.");for(;g;)try{if(f=1,h&&(p=2&_[0]?h.return:_[0]?h.throw||((p=h.return)&&p.call(h),0):h.next)&&!(p=p.call(h,_[1])).done)return p;switch(h=0,p&&(_=[2&_[0],p.value]),_[0]){case 0:case 1:p=_;break;case 4:return g.label++,{value:_[1],done:!1};case 5:g.label++,h=_[1],_=[0];continue;case 7:_=g.ops.pop(),g.trys.pop();continue;default:if(!((p=(p=g.trys).length>0&&p[p.length-1])||_[0]!==6&&_[0]!==2)){g=0;continue}if(_[0]===3&&(!p||_[1]>p[0]&&_[1]<p[3])){g.label=_[1];break}if(_[0]===6&&g.label<p[1]){g.label=p[1],p=_;break}if(p&&g.label<p[2]){g.label=p[2],g.ops.push(_);break}p[2]&&g.ops.pop(),g.trys.pop();continue}_=d.call(c,g)}catch(x){_=[6,x],h=0}finally{f=p=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([w,b])}}},i=Ou;Object.defineProperty(t,"__esModule",{value:!0});var s="browser-tabs-lock-key",o={key:function(c){return n(i,void 0,void 0,function(){return r(this,function(d){throw new Error("Unsupported")})})},getItem:function(c){return n(i,void 0,void 0,function(){return r(this,function(d){throw new Error("Unsupported")})})},clear:function(){return n(i,void 0,void 0,function(){return r(this,function(c){return[2,window.localStorage.clear()]})})},removeItem:function(c){return n(i,void 0,void 0,function(){return r(this,function(d){throw new Error("Unsupported")})})},setItem:function(c,d){return n(i,void 0,void 0,function(){return r(this,function(f){throw new Error("Unsupported")})})},keySync:function(c){return window.localStorage.key(c)},getItemSync:function(c){return window.localStorage.getItem(c)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(c){return window.localStorage.removeItem(c)},setItemSync:function(c,d){return window.localStorage.setItem(c,d)}};function a(c){return new Promise(function(d){return setTimeout(d,c)})}function l(c){for(var d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",f="",h=0;h<c;h++)f+=d[Math.floor(Math.random()*d.length)];return f}var u=function(){function c(d){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=d,c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(d,f){return f===void 0&&(f=5e3),n(this,void 0,void 0,function(){var h,p,m,g,v,w,b;return r(this,function(_){switch(_.label){case 0:h=Date.now()+l(4),p=Date.now()+f,m=s+"-"+d,g=this.storageHandler===void 0?o:this.storageHandler,_.label=1;case 1:return Date.now()<p?[4,a(30)]:[3,8];case 2:return _.sent(),g.getItemSync(m)!==null?[3,5]:(v=this.id+"-"+d+"-"+h,[4,a(Math.floor(25*Math.random()))]);case 3:return _.sent(),g.setItemSync(m,JSON.stringify({id:this.id,iat:h,timeoutKey:v,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,a(30)];case 4:return _.sent(),(w=g.getItemSync(m))!==null&&(b=JSON.parse(w)).id===this.id&&b.iat===h?(this.acquiredIatSet.add(h),this.refreshLockWhileAcquired(m,h),[2,!0]):[3,7];case 5:return c.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(p)];case 6:_.sent(),_.label=7;case 7:return h=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},c.prototype.refreshLockWhileAcquired=function(d,f){return n(this,void 0,void 0,function(){var h=this;return r(this,function(p){return setTimeout(function(){return n(h,void 0,void 0,function(){var m,g,v;return r(this,function(w){switch(w.label){case 0:return[4,Tu.default().lock(f)];case 1:return w.sent(),this.acquiredIatSet.has(f)?(m=this.storageHandler===void 0?o:this.storageHandler,(g=m.getItemSync(d))===null?(Tu.default().unlock(f),[2]):((v=JSON.parse(g)).timeRefreshed=Date.now(),m.setItemSync(d,JSON.stringify(v)),Tu.default().unlock(f),this.refreshLockWhileAcquired(d,f),[2])):(Tu.default().unlock(f),[2])}})})},1e3),[2]})})},c.prototype.waitForSomethingToChange=function(d){return n(this,void 0,void 0,function(){return r(this,function(f){switch(f.label){case 0:return[4,new Promise(function(h){var p=!1,m=Date.now(),g=!1;function v(){if(g||(window.removeEventListener("storage",v),c.removeFromWaiting(v),clearTimeout(w),g=!0),!p){p=!0;var b=50-(Date.now()-m);b>0?setTimeout(h,b):h(null)}}window.addEventListener("storage",v),c.addToWaiting(v);var w=setTimeout(v,Math.max(0,d-Date.now()))})];case 1:return f.sent(),[2]}})})},c.addToWaiting=function(d){this.removeFromWaiting(d),c.waiters!==void 0&&c.waiters.push(d)},c.removeFromWaiting=function(d){c.waiters!==void 0&&(c.waiters=c.waiters.filter(function(f){return f!==d}))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach(function(d){return d()})},c.prototype.releaseLock=function(d){return n(this,void 0,void 0,function(){return r(this,function(f){switch(f.label){case 0:return[4,this.releaseLock__private__(d)];case 1:return[2,f.sent()]}})})},c.prototype.releaseLock__private__=function(d){return n(this,void 0,void 0,function(){var f,h,p,m;return r(this,function(g){switch(g.label){case 0:return f=this.storageHandler===void 0?o:this.storageHandler,h=s+"-"+d,(p=f.getItemSync(h))===null?[2]:(m=JSON.parse(p)).id!==this.id?[3,2]:[4,Tu.default().lock(m.iat)];case 1:g.sent(),this.acquiredIatSet.delete(m.iat),f.removeItemSync(h),Tu.default().unlock(m.iat),c.notifyWaiters(),g.label=2;case 2:return[2]}})})},c.lockCorrector=function(d){for(var f=Date.now()-5e3,h=d,p=[],m=0;;){var g=h.keySync(m);if(g===null)break;p.push(g),m++}for(var v=!1,w=0;w<p.length;w++){var b=p[w];if(b.includes(s)){var _=h.getItemSync(b);if(_!==null){var x=JSON.parse(_);(x.timeRefreshed===void 0&&x.timeAcquired<f||x.timeRefreshed!==void 0&&x.timeRefreshed<f)&&(h.removeItemSync(b),v=!0)}}}v&&c.notifyWaiters()},c.waiters=void 0,c}();t.default=u}));const Uge={timeoutInSeconds:60},eU={name:"auth0-spa-js",version:"2.1.3"},tU=()=>Date.now();let Ci=class eT extends Error{constructor(t,n){super(n),this.error=t,this.error_description=n,Object.setPrototypeOf(this,eT.prototype)}static fromPayload({error:t,error_description:n}){return new eT(t,n)}},Wge=class nU extends Ci{constructor(t,n,r,i=null){super(t,n),this.state=r,this.appState=i,Object.setPrototypeOf(this,nU.prototype)}},tT=class rU extends Ci{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,rU.prototype)}},qge=class iU extends tT{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,iU.prototype)}},Gge=class sU extends Ci{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,sU.prototype)}},Kge=class oU extends Ci{constructor(t,n,r){super(t,n),this.mfa_token=r,Object.setPrototypeOf(this,oU.prototype)}},aU=class lU extends Ci{constructor(t,n){super("missing_refresh_token",`Missing Refresh Token (audience: '${EN(t,["default"])}', scope: '${EN(n)}')`),this.audience=t,this.scope=n,Object.setPrototypeOf(this,lU.prototype)}};function EN(e,t=[]){return e&&!t.includes(e)?e:""}const ay=()=>window.crypto,LS=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(ay().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%e.length]),t},TN=e=>btoa(e),nT=e=>{var{clientId:t}=e,n=to(e,["clientId"]);return new URLSearchParams((r=>Object.keys(r).filter(i=>r[i]!==void 0).reduce((i,s)=>Object.assign(Object.assign({},i),{[s]:r[s]}),{}))(Object.assign({client_id:t},n))).toString()},kN=e=>(t=>decodeURIComponent(atob(t).split("").map(n=>"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Yge=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json()}},Xge=async(e,t,n,r,i,s,o=1e4)=>i?(async(a,l,u,c,d,f,h)=>{return p={auth:{audience:l,scope:u},timeout:d,fetchUrl:a,fetchOptions:c,useFormData:h},m=f,new Promise(function(g,v){const w=new MessageChannel;w.port1.onmessage=function(b){b.data.error?v(new Error(b.data.error)):g(b.data),w.port1.close()},m.postMessage(p,[w.port2])});var p,m})(e,t,n,r,o,i,s):(async(a,l,u)=>{const c=new AbortController;let d;return l.signal=c.signal,Promise.race([Yge(a,l),new Promise((f,h)=>{d=setTimeout(()=>{c.abort(),h(new Error("Timeout when executing 'fetch'"))},u)})]).finally(()=>{clearTimeout(d)})})(e,r,o);async function Jge(e,t){var{baseUrl:n,timeout:r,audience:i,scope:s,auth0Client:o,useFormData:a}=e,l=to(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=a?nT(l):JSON.stringify(l);return await async function(c,d,f,h,p,m,g){let v,w=null;for(let P=0;P<3;P++)try{v=await Xge(c,f,h,p,m,g,d),w=null;break}catch(R){w=R}if(w)throw w;const b=v.json,{error:_,error_description:x}=b,S=to(b,["error","error_description"]),{ok:I}=v;if(!I){const P=x||`HTTP error. Unable to fetch ${c}`;throw _==="mfa_required"?new Kge(_,P,S.mfa_token):_==="missing_refresh_token"?new aU(f,h):new Ci(_||"request_error",P)}return S}(`${n}/oauth/token`,r,i||"default",s,{method:"POST",body:u,headers:{"Content-Type":a?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||eU))}},t,a)}const Qg=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};let Fu=class rT{constructor(t,n="@@auth0spajs@@",r){this.prefix=n,this.suffix=r,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[n,r,i,s]=t.split("::");return new rT({clientId:r,scope:s,audience:i},n)}static fromCacheEntry(t){const{scope:n,audience:r,client_id:i}=t;return new rT({scope:n,audience:r,clientId:i})}},Qge=class{set(t,n){localStorage.setItem(t,JSON.stringify(n))}get(t){const n=window.localStorage.getItem(t);if(n)try{return JSON.parse(n)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}},uU=class{constructor(){this.enclosedCache=function(){let t={};return{set(n,r){t[n]=r},get(n){const r=t[n];if(r)return r},remove(n){delete t[n]},allKeys:()=>Object.keys(t)}}()}},Zge=class{constructor(t,n,r){this.cache=t,this.keyManifest=n,this.nowProvider=r||tU}async setIdToken(t,n,r){var i;const s=this.getIdTokenCacheKey(t);await this.cache.set(s,{id_token:n,decodedToken:r}),await((i=this.keyManifest)===null||i===void 0?void 0:i.add(s))}async getIdToken(t){const n=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!n&&t.scope&&t.audience){const r=await this.get(t);return!r||!r.id_token||!r.decodedToken?void 0:{id_token:r.id_token,decodedToken:r.decodedToken}}if(n)return{id_token:n.id_token,decodedToken:n.decodedToken}}async get(t,n=0){var r;let i=await this.cache.get(t.toKey());if(!i){const a=await this.getCacheKeys();if(!a)return;const l=this.matchExistingCacheKey(t,a);l&&(i=await this.cache.get(l))}if(!i)return;const s=await this.nowProvider(),o=Math.floor(s/1e3);return i.expiresAt-n<o?i.body.refresh_token?(i.body={refresh_token:i.body.refresh_token},await this.cache.set(t.toKey(),i),i.body):(await this.cache.remove(t.toKey()),void await((r=this.keyManifest)===null||r===void 0?void 0:r.remove(t.toKey()))):i.body}async set(t){var n;const r=new Fu({clientId:t.client_id,scope:t.scope,audience:t.audience}),i=await this.wrapCacheEntry(t);await this.cache.set(r.toKey(),i),await((n=this.keyManifest)===null||n===void 0?void 0:n.add(r.toKey()))}async clear(t){var n;const r=await this.getCacheKeys();r&&(await r.filter(i=>!t||i.includes(t)).reduce(async(i,s)=>{await i,await this.cache.remove(s)},Promise.resolve()),await((n=this.keyManifest)===null||n===void 0?void 0:n.clear()))}async wrapCacheEntry(t){const n=await this.nowProvider();return{body:t,expiresAt:Math.floor(n/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new Fu({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,n){return n.filter(r=>{var i;const s=Fu.fromKey(r),o=new Set(s.scope&&s.scope.split(" ")),a=((i=t.scope)===null||i===void 0?void 0:i.split(" "))||[],l=s.scope&&a.reduce((u,c)=>u&&o.has(c),!0);return s.prefix==="@@auth0spajs@@"&&s.clientId===t.clientId&&s.audience===t.audience&&l})[0]}},eve=class{constructor(t,n,r){this.storage=t,this.clientId=n,this.cookieDomain=r,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Eh=e=>typeof e=="number",tve=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var Bu=JO(function(e,t){var n=Ou&&Ou.__assign||function(){return n=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++)for(var f in u=arguments[c])Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f]);return l},n.apply(this,arguments)};function r(l,u){if(!u)return"";var c="; "+l;return u===!0?c:c+"="+u}function i(l,u,c){return encodeURIComponent(l).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(u).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(d){if(typeof d.expires=="number"){var f=new Date;f.setMilliseconds(f.getMilliseconds()+864e5*d.expires),d.expires=f}return r("Expires",d.expires?d.expires.toUTCString():"")+r("Domain",d.domain)+r("Path",d.path)+r("Secure",d.secure)+r("SameSite",d.sameSite)}(c)}function s(l){for(var u={},c=l?l.split("; "):[],d=/(%[\dA-F]{2})+/gi,f=0;f<c.length;f++){var h=c[f].split("="),p=h.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{u[h[0].replace(d,decodeURIComponent)]=p.replace(d,decodeURIComponent)}catch{}}return u}function o(){return s(document.cookie)}function a(l,u,c){document.cookie=i(l,u,n({path:"/"},c))}t.__esModule=!0,t.encode=i,t.parse=s,t.getAll=o,t.get=function(l){return o()[l]},t.set=a,t.remove=function(l,u){a(l,"",n(n({},u),{expires:-1}))}});XO(Bu),Bu.encode,Bu.parse,Bu.getAll;var nve=Bu.get,cU=Bu.set,dU=Bu.remove;const ud={get(e){const t=nve(e);if(t!==void 0)return JSON.parse(t)},save(e,t,n){let r={};window.location.protocol==="https:"&&(r={secure:!0,sameSite:"none"}),n!=null&&n.daysUntilExpire&&(r.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(r.domain=n.cookieDomain),cU(e,JSON.stringify(t),r)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),dU(e,n)}},rve={get:e=>ud.get(e)||ud.get(`_legacy_${e}`),save(e,t,n){let r={};window.location.protocol==="https:"&&(r={secure:!0}),n!=null&&n.daysUntilExpire&&(r.expires=n.daysUntilExpire),n!=null&&n.cookieDomain&&(r.domain=n.cookieDomain),cU(`_legacy_${e}`,JSON.stringify(t),r),ud.save(e,t,n)},remove(e,t){let n={};t!=null&&t.cookieDomain&&(n.domain=t.cookieDomain),dU(e,n),ud.remove(e,t),ud.remove(`_legacy_${e}`,t)}},ive={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var FS,sve=function(e){return FS=FS||function(t,n,r){var i=function(l,u){var c=atob(l);return c}(t),s=i.indexOf(` `,10)+1,o=i.substring(s)+"",a=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(a)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo="),new Worker(FS,e)};const BS={};let ove=class{constructor(t,n){this.cache=t,this.clientId=n,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var n;const r=new Set(((n=await this.cache.get(this.manifestKey))===null||n===void 0?void 0:n.keys)||[]);r.add(t),await this.cache.set(this.manifestKey,{keys:[...r]})}async remove(t){const n=await this.cache.get(this.manifestKey);if(n){const r=new Set(n.keys);return r.delete(t),r.size>0?await this.cache.set(this.manifestKey,{keys:[...r]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return`@@auth0spajs@@::${t}`}};const ave={memory:()=>new uU().enclosedCache,localstorage:()=>new Qge},CN=e=>ave[e],ON=e=>{const{openUrl:t,onRedirect:n}=e,r=to(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:t===!1||t?t:n})},zS=new jge;let lve=class{constructor(t){let n,r;if(this.userCache=new uU().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await zS.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),typeof window<"u"&&(()=>{if(!ay())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(ay().subtle===void 0)throw new Error(` auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information. `)})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)r=t.cache;else{if(n=t.cacheLocation||"memory",!CN(n))throw new Error(`Invalid cache location "${n}"`);r=CN(n)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?ud:rve,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const i=t.useCookiesForTransactions?this.cookieStorage:ive;var s;this.scope=Qg("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new eve(i,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||tU,this.cacheManager=new Zge(r,r.allKeys?void 0:new ove(r,this.options.clientId),this.nowProvider),this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:`https://${s}`),this.tokenIssuer=((o,a)=>o?o.startsWith("https://")?o:`https://${o}/`:`${a}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&n==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new sve)}_url(t){const n=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||eU)));return`${this.domainUrl}${t}&auth0Client=${n}`}_authorizeUrl(t){return this._url(`/authorize?${nT(t)}`)}async _verifyIdToken(t,n,r){const i=await this.nowProvider();return(o=>{if(!o.id_token)throw new Error("ID token is required but missing");const a=(d=>{const f=d.split("."),[h,p,m]=f;if(f.length!==3||!h||!p||!m)throw new Error("ID token could not be decoded");const g=JSON.parse(kN(p)),v={__raw:d},w={};return Object.keys(g).forEach(b=>{v[b]=g[b],tve.includes(b)||(w[b]=g[b])}),{encoded:{header:h,payload:p,signature:m},header:JSON.parse(kN(h)),claims:v,user:w}})(o.id_token);if(!a.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(a.claims.iss!==o.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${o.iss}", found "${a.claims.iss}"`);if(!a.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(a.header.alg!=="RS256")throw new Error(`Signature algorithm of "${a.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!a.claims.aud||typeof a.claims.aud!="string"&&!Array.isArray(a.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(a.claims.aud)){if(!a.claims.aud.includes(o.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${o.aud}" but was not one of "${a.claims.aud.join(", ")}"`);if(a.claims.aud.length>1){if(!a.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(a.claims.azp!==o.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${o.aud}", found "${a.claims.azp}"`)}}else if(a.claims.aud!==o.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${o.aud}" but found "${a.claims.aud}"`);if(o.nonce){if(!a.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(a.claims.nonce!==o.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${o.nonce}", found "${a.claims.nonce}"`)}if(o.max_age&&!Eh(a.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(a.claims.exp==null||!Eh(a.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Eh(a.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const l=o.leeway||60,u=new Date(o.now||Date.now()),c=new Date(0);if(c.setUTCSeconds(a.claims.exp+l),u>c)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${u}) is after expiration time (${c})`);if(a.claims.nbf!=null&&Eh(a.claims.nbf)){const d=new Date(0);if(d.setUTCSeconds(a.claims.nbf-l),u<d)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${u}) is before ${d}`)}if(a.claims.auth_time!=null&&Eh(a.claims.auth_time)){const d=new Date(0);if(d.setUTCSeconds(parseInt(a.claims.auth_time)+o.max_age+l),u>d)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${u}) is after last auth at ${d}`)}if(o.organization){const d=o.organization.trim();if(d.startsWith("org_")){const f=d;if(!a.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(f!==a.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${f}", found "${a.claims.org_id}"`)}else{const f=d.toLowerCase();if(!a.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(f!==a.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${f}", found "${a.claims.org_name}"`)}}return a})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:n,organization:r,leeway:this.options.leeway,max_age:(s=this.options.authorizationParams.max_age,typeof s!="string"?s:parseInt(s,10)||void 0),now:i});var s}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,n,r){const i=TN(LS()),s=TN(LS()),o=LS(),a=(c=>{const d=new Uint8Array(c);return(f=>{const h={"+":"-","/":"_","=":""};return f.replace(/[+/=]/g,p=>h[p])})(window.btoa(String.fromCharCode(...Array.from(d))))})(await(async c=>await ay().subtle.digest({name:"SHA-256"},new TextEncoder().encode(c)))(o)),l=((c,d,f,h,p,m,g,v)=>Object.assign(Object.assign(Object.assign({client_id:c.clientId},c.authorizationParams),f),{scope:Qg(d,f.scope),response_type:"code",response_mode:v||"query",state:h,nonce:p,redirect_uri:g||c.authorizationParams.redirect_uri,code_challenge:m,code_challenge_method:"S256"}))(this.options,this.scope,t,i,s,a,t.redirect_uri||this.options.authorizationParams.redirect_uri||r,n==null?void 0:n.response_mode),u=this._authorizeUrl(l);return{nonce:s,code_verifier:o,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:i,url:u}}async loginWithPopup(t,n){var r;if(t=t||{},!(n=n||{}).popup&&(n.popup=(a=>{const l=window.screenX+(window.innerWidth-400)/2,u=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${l},top=${u},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!n.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const i=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);n.popup.location.href=i.url;const s=await(a=>new Promise((l,u)=>{let c;const d=setInterval(()=>{a.popup&&a.popup.closed&&(clearInterval(d),clearTimeout(f),window.removeEventListener("message",c,!1),u(new Gge(a.popup)))},1e3),f=setTimeout(()=>{clearInterval(d),u(new qge(a.popup)),window.removeEventListener("message",c,!1)},1e3*(a.timeoutInSeconds||60));c=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(f),clearInterval(d),window.removeEventListener("message",c,!1),a.popup.close(),h.data.response.error)return u(Ci.fromPayload(h.data.response));l(h.data.response)}},window.addEventListener("message",c)}))(Object.assign(Object.assign({},n),{timeoutInSeconds:n.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(i.state!==s.state)throw new Ci("state_mismatch","Invalid state");const o=((r=t.authorizationParams)===null||r===void 0?void 0:r.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:i.audience,scope:i.scope,code_verifier:i.code_verifier,grant_type:"authorization_code",code:s.code,redirect_uri:i.redirect_uri},{nonceIn:i.nonce,organization:o})}async getUser(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.user}async getIdTokenClaims(){var t;const n=await this._getIdTokenFromCache();return(t=n==null?void 0:n.decodedToken)===null||t===void 0?void 0:t.claims}async loginWithRedirect(t={}){var n;const r=ON(t),{openUrl:i,fragment:s,appState:o}=r,a=to(r,["openUrl","fragment","appState"]),l=((n=a.authorizationParams)===null||n===void 0?void 0:n.organization)||this.options.authorizationParams.organization,u=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:c}=u,d=to(u,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},d),{appState:o}),l&&{organization:l}));const f=s?`${c}#${s}`:c;i?await i(f):window.location.assign(f)}async handleRedirectCallback(t=window.location.href){const n=t.split("?").slice(1);if(n.length===0)throw new Error("There are no query params available for parsing.");const{state:r,code:i,error:s,error_description:o}=(d=>{d.indexOf("#")>-1&&(d=d.substring(0,d.indexOf("#")));const f=new URLSearchParams(d);return{state:f.get("state"),code:f.get("code")||void 0,error:f.get("error")||void 0,error_description:f.get("error_description")||void 0}})(n.join("")),a=this.transactionManager.get();if(!a)throw new Ci("missing_transaction","Invalid state");if(this.transactionManager.remove(),s)throw new Wge(s,o||s,r,a.appState);if(!a.code_verifier||a.state&&a.state!==r)throw new Ci("state_mismatch","Invalid state");const l=a.organization,u=a.nonce,c=a.redirect_uri;return await this._requestToken(Object.assign({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:i},c?{redirect_uri:c}:{}),{nonceIn:u,organization:l}),{appState:a.appState}}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch{}}async getTokenSilently(t={}){var n;const r=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:Qg(this.scope,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope)})}),i=await((s,o)=>{let a=BS[o];return a||(a=s().finally(()=>{delete BS[o],a=null}),BS[o]=a),a})(()=>this._getTokenSilently(r),`${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);return t.detailedResponse?i:i==null?void 0:i.access_token}async _getTokenSilently(t){const{cacheMode:n}=t,r=to(t,["cacheMode"]);if(n!=="off"){const i=await this._getEntryFromCache({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId});if(i)return i}if(n!=="cache-only"){if(!await(async(i,s=3)=>{for(let o=0;o<s;o++)if(await i())return!0;return!1})(()=>zS.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new tT;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),n!=="off"){const u=await this._getEntryFromCache({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId});if(u)return u}const i=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(r):await this._getTokenFromIFrame(r),{id_token:s,access_token:o,oauthTokenScope:a,expires_in:l}=i;return Object.assign(Object.assign({id_token:s,access_token:o},a?{scope:a}:null),{expires_in:l})}finally{await zS.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(t={},n={}){var r;const i=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:Qg(this.scope,(r=t.authorizationParams)===null||r===void 0?void 0:r.scope)})});return n=Object.assign(Object.assign({},Uge),n),await this.loginWithPopup(i,n),(await this.cacheManager.get(new Fu({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){t.clientId!==null?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const n=t.logoutParams||{},{federated:r}=n,i=to(n,["federated"]),s=r?"&federated":"";return this._url(`/v2/logout?${nT(Object.assign({clientId:t.clientId},i))}`)+s}async logout(t={}){const n=ON(t),{openUrl:r}=n,i=to(n,["openUrl"]);t.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const s=this._buildLogoutUrl(i);r?await r(s):r!==!1&&window.location.assign(s)}async _getTokenFromIFrame(t){const n=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),r=this.cookieStorage.get(this.orgHintCookieName);r&&!n.organization&&(n.organization=r);const{url:i,state:s,nonce:o,code_verifier:a,redirect_uri:l,scope:u,audience:c}=await this._prepareAuthorizeUrl(n,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Ci("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const d=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,f=await((p,m,g=60)=>new Promise((v,w)=>{const b=window.document.createElement("iframe");b.setAttribute("width","0"),b.setAttribute("height","0"),b.style.display="none";const _=()=>{window.document.body.contains(b)&&(window.document.body.removeChild(b),window.removeEventListener("message",x,!1))};let x;const S=setTimeout(()=>{w(new tT),_()},1e3*g);x=function(I){if(I.origin!=m||!I.data||I.data.type!=="authorization_response")return;const P=I.source;P&&P.close(),I.data.response.error?w(Ci.fromPayload(I.data.response)):v(I.data.response),clearTimeout(S),window.removeEventListener("message",x,!1),setTimeout(_,2e3)},window.addEventListener("message",x,!1),window.document.body.appendChild(b),b.setAttribute("src",p)}))(i,this.domainUrl,d);if(s!==f.state)throw new Ci("state_mismatch","Invalid state");const h=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:a,code:f.code,grant_type:"authorization_code",redirect_uri:l,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:n.organization});return Object.assign(Object.assign({},h),{scope:u,oauthTokenScope:h.scope,audience:c})}catch(d){throw d.error==="login_required"&&this.logout({openUrl:!1}),d}}async _getTokenUsingRefreshToken(t){const n=await this.cacheManager.get(new Fu({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(n&&n.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new aU(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const r=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,i=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null;try{const s=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:n&&n.refresh_token,redirect_uri:r}),i&&{timeout:i}));return Object.assign(Object.assign({},s),{scope:t.authorizationParams.scope,oauthTokenScope:s.scope,audience:t.authorizationParams.audience||"default"})}catch(s){if((s.message.indexOf("Missing Refresh Token")>-1||s.message&&s.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw s}}async _saveEntryInCache(t){const{id_token:n,decodedToken:r}=t,i=to(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:n,decodedToken:r}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(i)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",n=await this.cacheManager.getIdToken(new Fu({clientId:this.options.clientId,audience:t,scope:this.scope})),r=this.userCache.get("@@user@@");return n&&n.id_token===(r==null?void 0:r.id_token)?r:(this.userCache.set("@@user@@",n),n)}async _getEntryFromCache({scope:t,audience:n,clientId:r}){const i=await this.cacheManager.get(new Fu({scope:t,audience:n,clientId:r}),60);if(i&&i.access_token){const{access_token:s,oauthTokenScope:o,expires_in:a}=i,l=await this._getIdTokenFromCache();return l&&Object.assign(Object.assign({id_token:l.id_token,access_token:s},o?{scope:o}:null),{expires_in:a})}}async _requestToken(t,n){const{nonceIn:r,organization:i}=n||{},s=await Jge(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker),o=await this._verifyIdToken(s.id_token,r,i);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},s),{decodedToken:o,scope:t.scope,audience:t.audience||"default"}),s.scope?{oauthTokenScope:s.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(i||o.claims.org_id),Object.assign(Object.assign({},s),{decodedToken:o})}};function $h(e){e!=null&&e.redirect_uri&&(console.warn("Using `redirect_uri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=e.authorizationParams||{},e.authorizationParams.redirect_uri=e.redirect_uri,delete e.redirect_uri)}const bu=()=>{console.error("Please ensure Auth0's Vue plugin is correctly installed.")},uve={isLoading:U(!1),isAuthenticated:U(!1),user:U(void 0),idTokenClaims:U(void 0),error:U(null),loginWithPopup:bu,loginWithRedirect:bu,getAccessTokenSilently:bu,getAccessTokenWithPopup:bu,logout:bu,checkSession:bu,handleRedirectCallback:bu},cve=U(uve);let dve=class{constructor(t,n){var r,i;this.clientOptions=t,this.pluginOptions=n,this.isLoading=U(!0),this.isAuthenticated=U(!1),this.user=U({}),this.idTokenClaims=U(),this.error=U(null),r=this,i=["constructor"],Object.getOwnPropertyNames(Object.getPrototypeOf(r)).filter(s=>!i.includes(s)).forEach(s=>r[s]=r[s].bind(r))}install(t){this._client=new lve(Object.assign(Object.assign({},this.clientOptions),{auth0Client:{name:"auth0-vue",version:"2.3.1"}})),this.__checkSession(t.config.globalProperties.$router),t.config.globalProperties.$auth0=this,t.provide(Zj,this),cve.value=this}async loginWithRedirect(t){return $h(t),this._client.loginWithRedirect(t)}async loginWithPopup(t,n){return $h(t),this.__proxy(()=>this._client.loginWithPopup(t,n))}async logout(t){return t!=null&&t.openUrl||(t==null?void 0:t.openUrl)===!1?this.__proxy(()=>this._client.logout(t)):this._client.logout(t)}async getAccessTokenSilently(t={}){return $h(t),this.__proxy(()=>this._client.getTokenSilently(t))}async getAccessTokenWithPopup(t,n){return $h(t),this.__proxy(()=>this._client.getTokenWithPopup(t,n))}async checkSession(t){return this.__proxy(()=>this._client.checkSession(t))}async handleRedirectCallback(t){return this.__proxy(()=>this._client.handleRedirectCallback(t))}async __checkSession(t){var n,r,i;const s=window.location.search;try{if((s.includes("code=")||s.includes("error="))&&s.includes("state=")&&!(!((n=this.pluginOptions)===null||n===void 0)&&n.skipRedirectCallback)){const o=await this.handleRedirectCallback(),a=o==null?void 0:o.appState,l=(r=a==null?void 0:a.target)!==null&&r!==void 0?r:"/";return window.history.replaceState({},"","/"),t&&t.push(l),o}await this.checkSession()}catch{window.history.replaceState({},"","/"),t&&t.push(((i=this.pluginOptions)===null||i===void 0?void 0:i.errorPath)||"/")}}async __refreshState(){this.isAuthenticated.value=await this._client.isAuthenticated(),this.user.value=await this._client.getUser(),this.idTokenClaims.value=await this._client.getIdTokenClaims(),this.isLoading.value=!1}async __proxy(t,n=!0){let r;try{r=await t(),this.error.value=null}catch(i){throw this.error.value=i,i}finally{n&&await this.__refreshState()}return r}};function fve(e,t){return $h(e),new dve(e,t)}function fU(){return Lt(Zj)}const RN=window.location.hostname==="app.arternal.com"||window.location.hostname==="v2.arternal.com",mi=fve({domain:"auth.arternal.com",clientId:"xaxQeaKLyE0sSijPjalE8Ys3BajkbnGD",issuer:RN?"https://auth.arternal.com/":"https://dev-z1e29-sc.us.auth0.com/",useRefreshTokens:!0,cacheLocation:"localstorage",useRefreshTokensFallback:!0,cookieDomain:RN?".arternal.com":void 0,authorizationParams:{display:"page",prompt:"none",redirect_uri:`${window.location.origin}/callback`,audience:"https://api.arternal.com",scope:"openid profile email offline_access"}},{skipRedirectCallback:!window.location.host.includes("3000")});async function hU(){try{return await mi.getAccessTokenSilently()}catch(e){return console.log("graphql err.error ovr",e.error),["login_required","invalid_grant","mfa_required","missing_refresh_token"].includes(e.error)&&!window.location.href.includes("login")&&!window.location.href.includes("callback")&&mi.isLoading.value,null}}function j0(){return ld}const pU=Symbol("mixpanel");function hve(e){if(!e.token)throw new Error("Mixpanel token not set");const{disable:t,...n}=e.config??{};return{install:async r=>{if(ld.init(e.token,n),r.provide(pU,ld),t&&ld.disable(),await mi.checkSession(),mi.isAuthenticated.value){const i=mi.idTokenClaims.value;i&&(ld.people.set({$distinct_id:i.id,$first_name:i.given_name,$last_name:i.family_name,$email:i.email}),ld.identify(i.id))}}}}function Ur(){return Lt(pU)}function U0(e){return Yl()?(Xl(e),!0):!1}const $S=new WeakMap,pve=(...e)=>{var t;const n=e[0],r=(t=Jn())==null?void 0:t.proxy;if(r==null&&!zw())throw new Error("injectLocal must be called in setup");return r&&$S.has(r)&&n in $S.get(r)?$S.get(r)[n]:Lt(...e)},mU=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const mve=e=>e!=null,gve=Object.prototype.toString,vve=e=>gve.call(e)==="[object Object]",Zu=()=>{},iT=yve();function yve(){var e,t;return mU&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function gU(e,t){function n(...r){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(s)})}return n}const bve=e=>e();function vU(e,t={}){let n,r,i=Zu;const s=a=>{clearTimeout(a),i(),i=Zu};return a=>{const l=rr(e),u=rr(t.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,d)=>{i=t.rejectOnCancel?d:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function wve(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",i=e.slice(r.length),s=Number.parseFloat(r)+t;return Number.isNaN(s)?e:s+i}function xp(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function _ve(e){return Jn()}function sT(e){return Array.isArray(e)?e:[e]}function Sve(...e){if(e.length!==1)return hB(...e);const t=e[0];return typeof t=="function"?Lf(Dk(()=>({get:t,set:Zu}))):U(t)}function Os(e,t=200,n={}){return gU(vU(t,n),e)}function xve(e,t,n={}){const{eventFilter:r=bve,...i}=n;return He(e,gU(r,t),i)}function yU(e,t=!0,n){_ve()?nt(e,n):t?e():vt(e)}function QO(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Jt(e),s=U(e);function o(a){if(arguments.length)return s.value=a,s.value;{const l=rr(n);return s.value=s.value===l?rr(r):l,s.value}}return i?o:[s,o]}function Eve(e,t,n={}){const{debounce:r=0,maxWait:i=void 0,...s}=n;return xve(e,t,{...s,eventFilter:vU(r,{maxWait:i})})}const sh=mU?window:void 0;function Rd(e){var t;const n=rr(e);return(t=n==null?void 0:n.$el)!=null?t:n}function ec(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=sh):[t,n,r,i]=e,!t)return Zu;n=sT(n),r=sT(r);const s=[],o=()=>{s.forEach(c=>c()),s.length=0},a=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=He(()=>[Rd(t),rr(i)],([c,d])=>{if(o(),!c)return;const f=vve(d)?{...d}:d;s.push(...n.flatMap(h=>r.map(p=>a(c,h,p,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return U0(u),u}let IN=!1;function bU(e,t,n={}){const{window:r=sh,ignore:i=[],capture:s=!0,detectIframe:o=!1}=n;if(!r)return Zu;iT&&!IN&&(IN=!0,Array.from(r.document.body.children).forEach(m=>m.addEventListener("click",Zu)),r.document.documentElement.addEventListener("click",Zu));let a=!0;const l=m=>rr(i).some(g=>{if(typeof g=="string")return Array.from(r.document.querySelectorAll(g)).some(v=>v===m.target||m.composedPath().includes(v));{const v=Rd(g);return v&&(m.target===v||m.composedPath().includes(v))}});function u(m){const g=rr(m);return g&&g.$.subTree.shapeFlag===16}function c(m,g){const v=rr(m),w=v.$.subTree&&v.$.subTree.children;return w==null||!Array.isArray(w)?!1:w.some(b=>b.el===g.target||g.composedPath().includes(b.el))}const d=m=>{const g=Rd(e);if(m.target!=null&&!(!(g instanceof Element)&&u(e)&&c(e,m))&&!(!g||g===m.target||m.composedPath().includes(g))){if(m.detail===0&&(a=!l(m)),!a){a=!0;return}t(m)}};let f=!1;const h=[ec(r,"click",m=>{f||(f=!0,setTimeout(()=>{f=!1},0),d(m))},{passive:!0,capture:s}),ec(r,"pointerdown",m=>{const g=Rd(e);a=!l(m)&&!!(g&&!m.composedPath().includes(g))},{passive:!0}),o&&ec(r,"blur",m=>{setTimeout(()=>{var g;const v=Rd(e);((g=r.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(v!=null&&v.contains(r.document.activeElement))&&t(m)},0)},{passive:!0})].filter(Boolean);return()=>h.forEach(m=>m())}function Tve(){const e=U(!1),t=Jn();return t&&nt(()=>{e.value=!0},t),e}function kve(e){const t=Tve();return te(()=>(t.value,!!e()))}function Cve(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function wU(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=sh,eventName:s="keydown",passive:o=!1,dedupe:a=!1}=r,l=Cve(t);return ec(i,s,c=>{c.repeat&&rr(a)||l(c)&&n(c)},o)}const Ove=Symbol("vueuse-ssr-width");function _U(){const e=zw()?pve(Ove,null):null;return typeof e=="number"?e:void 0}function cd(e,t={}){const{window:n=sh,ssrWidth:r=_U()}=t,i=kve(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),s=U(typeof r=="number");let o;const a=U(!1),l=d=>{a.value=d.matches},u=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",l):o.removeListener(l))},c=Mt(()=>{if(s.value){s.value=!i.value;const d=rr(e).split(",");a.value=d.some(f=>{const h=f.includes("not all"),p=f.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),m=f.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(p||m);return p&&g&&(g=r>=xp(p[1])),m&&g&&(g=r<=xp(m[1])),h?!g:g});return}i.value&&(u(),o=n.matchMedia(rr(e)),"addEventListener"in o?o.addEventListener("change",l):o.addListener(l),a.value=o.matches)});return U0(()=>{c(),u(),o=void 0}),te(()=>a.value)}const Rve={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Ive(e,t={}){function n(h,p){let m=rr(e[rr(h)]);return p!=null&&(m=wve(m,p)),typeof m=="number"&&(m=`${m}px`),m}const{window:r=sh,strategy:i="min-width",ssrWidth:s=_U()}=t,o=typeof s=="number",a=o?U(!1):{value:!0};o&&yU(()=>a.value=!!r);function l(h,p){return!a.value&&o?h==="min"?s>=xp(p):s<=xp(p):r?r.matchMedia(`(${h}-width: ${p})`).matches:!1}const u=h=>cd(()=>`(min-width: ${n(h)})`,t),c=h=>cd(()=>`(max-width: ${n(h)})`,t),d=Object.keys(e).reduce((h,p)=>(Object.defineProperty(h,p,{get:()=>i==="min-width"?u(p):c(p),enumerable:!0,configurable:!0}),h),{});function f(){const h=Object.keys(e).map(p=>[p,d[p],xp(n(p))]).sort((p,m)=>p[2]-m[2]);return te(()=>h.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(d,{greaterOrEqual:u,smallerOrEqual:c,greater(h){return cd(()=>`(min-width: ${n(h,.1)})`,t)},smaller(h){return cd(()=>`(max-width: ${n(h,-.1)})`,t)},between(h,p){return cd(()=>`(min-width: ${n(h)}) and (max-width: ${n(p,-.1)})`,t)},isGreater(h){return l("min",n(h,.1))},isGreaterOrEqual(h){return l("min",n(h))},isSmaller(h){return l("max",n(h,-.1))},isSmallerOrEqual(h){return l("max",n(h))},isInBetween(h,p){return l("min",n(h))&&l("max",n(p,-.1))},current:f,active(){const h=f();return te(()=>h.value.length===0?"":h.value.at(i==="min-width"?-1:0))}})}function HS(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function SU(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:SU(n)}}function Ave(e){const t=e||window.event,n=t.target;return SU(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const VS=new WeakMap;function Pve(e,t=!1){const n=U(t);let r=null,i="";He(Sve(e),a=>{const l=HS(rr(a));if(l){const u=l;if(VS.get(u)||VS.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(i=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const s=()=>{const a=HS(rr(e));!a||n.value||(iT&&(r=ec(a,"touchmove",l=>{Ave(l)},{passive:!1})),a.style.overflow="hidden",n.value=!0)},o=()=>{const a=HS(rr(e));!a||!n.value||(iT&&(r==null||r()),a.style.overflow=i,VS.delete(a),n.value=!1)};return U0(o),te({get(){return n.value},set(a){a?s():o()}})}function Mve(e={}){const{window:t=sh,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:s=!0,type:o="inner"}=e,a=U(n),l=U(r),u=()=>{if(t)if(o==="outer")a.value=t.outerWidth,l.value=t.outerHeight;else if(o==="visual"&&t.visualViewport){const{width:d,height:f,scale:h}=t.visualViewport;a.value=Math.round(d*h),l.value=Math.round(f*h)}else s?(a.value=t.innerWidth,l.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),yU(u);const c={passive:!0};if(ec("resize",u,c),t&&o==="visual"&&t.visualViewport&&ec(t.visualViewport,"resize",u,c),i){const d=cd("(orientation: portrait)");He(d,()=>u())}return{width:a,height:l}}const Dve=ee({__name:"Breadcrumb",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("nav",{"aria-label":"breadcrumb",class:Le(t.class)},[ce(n.$slots,"default")],2))}}),AN=ee({__name:"BreadcrumbItem",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("li",{class:Le(y(st)("inline-flex items-center gap-1.5",t.class))},[ce(n.$slots,"default")],2))}}),Nve=ee({__name:"BreadcrumbLink",props:{asChild:{type:Boolean},as:{default:"a"},class:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(at),{as:n.as,"as-child":n.asChild,class:Le(y(st)("transition-colors hover:text-slate-950 dark:hover:text-slate-50",t.class))},{default:H(()=>[ce(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Lve=ee({__name:"BreadcrumbList",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("ol",{class:Le(y(st)("flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 sm:gap-2.5 dark:text-slate-400",t.class))},[ce(n.$slots,"default")],2))}}),Fve=ee({__name:"BreadcrumbPage",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("span",{role:"link","aria-disabled":"true","aria-current":"page",class:Le(y(st)("font-normal text-slate-950 dark:text-slate-50",t.class))},[ce(n.$slots,"default")],2))}}),Bve=ee({__name:"BreadcrumbSeparator",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("li",{role:"presentation","aria-hidden":"true",class:Le(y(st)("[&>svg]:size-3.5",t.class))},[ce(n.$slots,"default",{},()=>[$(y(vfe))])],2))}}),zve=ee({__name:"Alert",props:{variant:{default:"info"}},setup(e){return(t,n)=>(k(),W("div",{class:Le(["rounded border-l-4 px-5 py-3",{"border-primary-500 bg-primary-200 text-primary-900":t.variant==="primary","border-secondary-500 bg-secondary-100 text-secondary-900":t.variant==="secondary","border-danger-500 bg-danger-200 text-danger-900":t.variant==="danger","border-warning-500 bg-warning-200 text-warning-900":t.variant==="warning","border-success-500 bg-success-200 text-success-900":t.variant==="success","border-info-500 bg-info-200 text-info-900":t.variant==="info"}])},[ce(t.$slots,"default")],2))}}),$ve={class:"mr-0 flex gap-3 font-semibold"},Hve={key:1},Vve={key:2},jve=ee({__name:"Breadcrumb",props:{items:{},trailingSeparator:{type:Boolean}},setup(e){return(t,n)=>{const r=En("router-link");return k(),W("nav",$ve,[(k(!0),W(je,null,Ot(t.items,(i,s)=>(k(),W(je,{key:s},[i.to?(k(),X(r,{key:0,to:i.to},{default:H(()=>[Ye(ye(i.text),1)]),_:2},1032,["to"])):(k(),W("div",Hve,ye(i.text),1)),s<t.items.length-(t.trailingSeparator?0:1)?(k(),W("div",Vve,[ce(t.$slots,"separator",{},()=>[n[0]||(n[0]=Ye(">"))])])):fe("",!0)],64))),128))])}}}),ly=ee({__name:"Btn",props:{variant:{default:"secondary"},size:{default:"md"},outline:{type:Boolean}},setup(e){const t=t9(),n=te(()=>"disabled"in t&&t.disabled!==!1);return(r,i)=>(k(),X(Rr(n.value&&(r.$attrs.to||r.$attrs.href)?"span":r.$attrs.to?"RouterLink":r.$attrs.href?"a":"button"),{class:Le(["inline-block rounded border text-center transition-colors duration-100 hover:no-underline focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-gray-900",{"px-2 py-1 text-sm":r.size==="sm","text-md px-3 py-2":r.size==="md","px-4 py-3 text-lg":r.size==="lg","focus:ring-secondary-500 focus:ring-opacity-40":!n.value&&r.variant==="secondary","focus:ring-primary-500 focus:ring-opacity-50":!n.value&&r.variant==="primary","focus:ring-danger-500 focus:ring-opacity-50":!n.value&&r.variant==="danger","focus:ring-warning-500 focus:ring-opacity-50":!n.value&&r.variant==="warning","focus:ring-success-500 focus:ring-opacity-50":!n.value&&r.variant==="success","focus:ring-info-400 focus:ring-opacity-50":!n.value&&r.variant==="info","bg-secondary-400 text-white hover:bg-secondary-500":!n.value&&!r.outline&&r.variant==="secondary","bg-primary-500 text-white hover:bg-primary-600":!n.value&&!r.outline&&r.variant==="primary","bg-danger-500 text-white hover:bg-danger-600":!n.value&&!r.outline&&r.variant==="danger","bg-warning-500 text-white hover:bg-warning-600":!n.value&&!r.outline&&r.variant==="warning","bg-success-500 text-white hover:bg-success-600":!n.value&&!r.outline&&r.variant==="success","bg-info-400 text-white hover:bg-info-500":!n.value&&!r.outline&&r.variant==="info","border-transparent":!r.outline,"border-secondary-400 text-secondary-500 hover:border-transparent hover:bg-secondary-400 hover:text-white":!n.value&&r.outline&&r.variant==="secondary","border-primary-500 text-primary-600 hover:border-transparent hover:bg-primary-500 hover:text-white":!n.value&&r.outline&&r.variant==="primary","border-danger-500 text-danger-600 hover:border-transparent hover:bg-danger-500 hover:text-white":!n.value&&r.outline&&r.variant==="danger","border-warning-500 text-warning-600 hover:border-transparent hover:bg-warning-500 hover:text-white":!n.value&&r.outline&&r.variant==="warning","border-success-500 text-success-600 hover:border-transparent hover:bg-success-500 hover:text-white":!n.value&&r.outline&&r.variant==="success","border-info-400 text-info-600 hover:border-transparent hover:bg-info-400 hover:text-white":!n.value&&r.outline&&r.variant==="info","cursor-pointer":!n.value,"cursor-not-allowed bg-disabled-300 text-disabled-600 focus:ring-0":n.value}])},{default:H(()=>[ce(r.$slots,"default")]),_:3},8,["class"]))}});function Uve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})])}function PN(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})])}function Wve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3-3-3m0 0-3 3m3-3V15"})])}function xU(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function qve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"})])}function ZO(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})])}function Gve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})])}function MN(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})])}function EU(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function eR(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z"}),A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}function Kve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function jS(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function Yve(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})])}function tR(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})])}function TU(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function oT(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})])}function Rb(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}const gt=ee({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,r)=>(k(),X(y(at),{as:n.as,"as-child":n.asChild,class:Le(y(st)(y(nR)({variant:n.variant,size:n.size}),t.class))},{default:H(()=>[ce(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),nR=M0("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",{variants:{variant:{default:"bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",destructive:"bg-red-500 text-slate-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",outline:"border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",secondary:"bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",ghost:"hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",link:"text-slate-900 underline-offset-4 hover:underline dark:text-slate-50"},size:{default:"h-10 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),kU=ee({__name:"CopyLinkButton",props:{content:{}},emits:["copy"],setup(e,{emit:t}){const n=e,r=t,{toast:i}=$s(),{t:s}=ls(),o=Ur(),a=async()=>{r("copy",n.content),await navigator.clipboard.writeText(n.content),i({title:s("messages.linkCopied"),action:We(gt,{variant:"outline",size:"sm",onClick:()=>window.open(n.content,"_blank")},()=>s("actions.preview"))}),o.track("OVR Tracking - Link copied")};return(l,u)=>(k(),X(y(gt),{class:"flex items-center gap-1 text-xs text-info-500 border-info-500 hover:text-info-500",variant:"outline",size:"xs",outline:"",onClick:lt(a,["stop"])},{default:H(()=>[$(y(oT),{class:"w-4"}),A("div",null,ye(l.$t("actions.copyLink")),1)]),_:1}))}});function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){Xi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xve(e,t){if(e==null)return{};var n,r,i=function(o,a){if(o==null)return{};var l,u,c={},d=Object.keys(o);for(u=0;u<d.length;u++)l=d[u],a.indexOf(l)>=0||(c[l]=o[l]);return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sc(e){return function(t){if(Array.isArray(t))return US(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return US(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return US(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function US(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NN,Jve,Zg,Zn=(NN=function(e){/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var o=typeof s;if(o==="string"||o==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var a=n.apply(null,s);a&&r.push(a)}}else if(o==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&r.push(l);else r.push(s.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()},NN(Zg={path:Jve,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&Zg.path)}},Zg.exports),Zg.exports),Vs=function(e){return function(t,n){if(!t)return e;var r;typeof t=="string"?r=t:n=t;var i=e;return r&&(i+="__"+r),i+(n?Object.keys(n).reduce(function(s,o){var a=n[o];return a&&(s+=" "+(typeof a=="boolean"?i+"--"+o:i+"--"+o+"_"+a)),s},""):"")}};function aT(e,t,n){var r,i,s,o,a;function l(){var c=Date.now()-o;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(s,i),s=i=null))}t==null&&(t=100);var u=function(){s=this,i=arguments,o=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(s,i),s=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=e.apply(s,i),s=i=null,clearTimeout(r),r=null)},u}aT.debounce=aT;var lT=aT,it=function(){return it=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},it.apply(this,arguments)};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function CU(e,t){var n,r;return e&&t?(n=""+e+t[0].toUpperCase()+t.slice(1),r=e+"-"+t):(n=e||t,r=e||t),{name:n,classname:r}}function OU(e){return/^blob:/.test(e)}function LN(e){return OU(e)||function(t){return/^data:/.test(t)}(e)}function qc(e){return!!(e&&e.constructor&&e.call&&e.apply)}function lr(e){return e===void 0}function uy(e){return typeof e=="object"&&e!==null}function uT(e,t,n){var r={};return uy(e)?(Object.keys(t).forEach(function(i){lr(e[i])?r[i]=t[i]:uy(t[i])?uy(e[i])?r[i]=uT(e[i],t[i],n[i]):r[i]=e[i]?t[i]:n[i]:t[i]===!0||t[i]===!1?r[i]=!!e[i]:r[i]=e[i]}),r):e?t:n}function ev(e){var t=Number(e);return Number.isNaN(t)?e:t}function FN(e){return typeof(e=="number"||function(t){return typeof t=="object"&&t!==null}(e)&&toString.call(e)=="[object Number]")&&!RU(e)}function RU(e){return e!=e}function IU(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}var Ep=function(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=e,this.scale=t},Qve=function(e,t){t===void 0&&(t={}),this.type="resize",this.directions=e,this.params=t},rR=function(e){this.type="move",this.directions=e},Zve=function(){function e(t,n,r,i,s){this.type="drag",this.nativeEvent=t,this.position=r,this.previousPosition=i,this.element=n,this.anchor=s}return e.prototype.shift=function(){var t=this,n=t.element,r=t.anchor,i=t.position;if(n){var s=n.getBoundingClientRect(),o=s.left,a=s.top;return{left:i.left-o-r.left,top:i.top-a-r.top}}return{left:0,top:0}},e}(),iR={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(e){e.cancelable&&!this.disabled&&e.touches.length===1&&(this.touches=Sc(e.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),e.touches.length&&this.initAnchor(this.touches.reduce(function(t,n){return{clientX:t.clientX+n.clientX/e.touches.length,clientY:t.clientY+n.clientY/e.touches.length}},{clientX:0,clientY:0})),e.preventDefault&&e.preventDefault(),e.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(e){this.touches.length&&(this.processMove(e,e.touches),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation())},onMouseDown:function(e){if(!this.disabled){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.draggable.getBoundingClientRect(),n=t.left,r=t.right,i=t.bottom,s=t.top;this.anchor={left:e.clientX-n,top:e.clientY-s,bottom:i-e.clientY,right:r-e.clientX}},processMove:function(e,t){var n=Sc(t);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new Zve(e,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};iR.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"draggable",class:n.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[ce(e.$slots,"default")],34)};var WS=Vs("vue-handler-wrapper"),AU={name:"HandlerWrapper",components:{DraggableElement:iR},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var e;if(this.horizontalPosition||this.verticalPosition){var t,n=CU(this.horizontalPosition,this.verticalPosition);e=WS((Xi(t={},n.classname,!0),Xi(t,"disabled",this.disabled),t))}else e=WS({disabled:this.disabled});return{root:e,draggable:WS("draggable")}}},emits:["leave","enter","drag","drag-end"]};AU.render=function(e,t,n,r,i,s){var o=En("DraggableElement");return k(),X("div",{class:s.classes.root},[$(o,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(a){return e.$emit("drag",a)}),onDragEnd:t[2]||(t[2]=function(a){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(a){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(a){return e.$emit("enter")})},{default:H(function(){return[ce(e.$slots,"default")]}),_:3},8,["class"])],2)};var eye=Vs("vue-line-wrapper"),PU={name:"LineWrapper",components:{DraggableElement:iR},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var e;return eye((Xi(e={},this.position,!0),Xi(e,"disabled",this.disabled),e))}},emits:["leave","enter","drag","drag-end"]};PU.render=function(e,t,n,r,i,s){var o=En("DraggableElement");return k(),X(o,{class:s.classname,onDrag:t[1]||(t[1]=function(a){return e.$emit("drag",a)}),onDragEnd:t[2]||(t[2]=function(a){return e.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(a){return e.$emit("leave")}),onEnter:t[4]||(t[4]=function(a){return e.$emit("enter")})},{default:H(function(){return[ce(e.$slots,"default")]}),_:3},8,["class"])};var so=["left","right","top","bottom"],tye=["left","right"],nye=["top","bottom"],rye=["left","top"],iye=["fill-area","fit-area","stencil","none"],BN={left:0,top:0,width:0,height:0};function zN(e,t,n){return!(n=n||["width","height","left","top"]).some(function(r){return e[r]!==t[r]})}function Eo(e){return{left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height}}function _f(e,t){return{left:e.left-t.left,top:e.top-t.top}}function Cr(e){return{left:e.left+e.width/2,top:e.top+e.height/2}}function gm(e,t){var n={left:0,top:0,right:0,bottom:0};return so.forEach(function(r){var i=t[r],s=Eo(e)[r];n[r]=i!==void 0&&s!==void 0?r==="left"||r==="top"?Math.max(0,i-s):Math.max(0,s-i):0}),n}function no(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width+t.left+t.right,height:e.height+t.top+t.bottom}}function W0(e){return{left:-e.left,top:-e.top}}function yi(e,t){return it(it({},e),{left:e.left+t.left,top:e.top+t.top})}function es(e,t,n,r){if(t!==1){if(n){var i=Cr(e);return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2+(n.left-i.left)*(1-t),top:e.top+e.height*(1-t)/2+(n.top-i.top)*(1-t)}}return{width:e.width*t,height:e.height*t,left:e.left+e.width*(1-t)/2,top:e.top+e.height*(1-t)/2}}return e}function Gt(e){return e.width/e.height}function Sf(e,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/e.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/e.height:1/0)}function xf(e,t){var n={left:0,top:0},r=gm(e,t);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function qS(e,t){var n;return t.minimum&&e<t.minimum?n=t.minimum:t.maximum&&e>t.maximum&&(n=t.maximum),n}function MU(e,t){var n=Gt(e),r=Gt(t);return t.width<1/0&&t.height<1/0?n>r?{width:t.width,height:t.width/n}:{width:t.height*n,height:t.height}:t.width<1/0?{width:t.width,height:t.width/n}:t.height<1/0?{width:t.height*n,height:t.height}:e}function DU(e,t){var n=t*Math.PI/180;return{width:Math.abs(e.width*Math.cos(n))+Math.abs(e.height*Math.sin(n)),height:Math.abs(e.width*Math.sin(n))+Math.abs(e.height*Math.cos(n))}}function al(e,t){var n=t*Math.PI/180;return{left:e.left*Math.cos(n)-e.top*Math.sin(n),top:e.left*Math.sin(n)+e.top*Math.cos(n)}}function q0(e,t){var n=gm(Or(e,t),t);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((e.width+n.left+n.right)/e.width,Sf(e,t)):Math.min((e.height+n.top+n.bottom)/e.height,Sf(e,t)):1}function Or(e,t,n){n===void 0&&(n=!1);var r=xf(e,t);return yi(e,n?W0(r):r)}function cT(e){return{width:e.right!==void 0&&e.left!==void 0?e.right-e.left:1/0,height:e.bottom!==void 0&&e.top!==void 0?e.bottom-e.top:1/0}}function sye(e,t){return it(it({},e),{minWidth:Math.min(t.width,e.minWidth),minHeight:Math.min(t.height,e.minHeight),maxWidth:Math.min(t.width,e.maxWidth),maxHeight:Math.min(t.height,e.maxHeight)})}function NU(e,t,n){n===void 0&&(n=!0);var r={};return so.forEach(function(i){var s=e[i],o=t[i];s!==void 0&&o!==void 0?r[i]=i==="left"||i==="top"?n?Math.max(s,o):Math.min(s,o):n?Math.min(s,o):Math.max(s,o):o!==void 0?r[i]=o:s!==void 0&&(r[i]=s)}),r}function G0(e,t){return NU(e,t,!0)}function $N(e){var t=e.size,n=e.aspectRatio,r=e.ignoreMinimum,i=e.sizeRestrictions;return!!((t.correctRatio||Gt(t)>=n.minimum&&Gt(t)<=n.maximum)&&t.height<=i.maxHeight&&t.width<=i.maxWidth&&t.width&&t.height&&(r||t.height>=i.minHeight&&t.width>=i.minWidth))}function HN(e,t){return Math.pow(e.width-t.width,2)+Math.pow(e.height-t.height,2)}function ra(e){var t=e.width,n=e.height,r=e.sizeRestrictions,i={minimum:e.aspectRatio&&e.aspectRatio.minimum||0,maximum:e.aspectRatio&&e.aspectRatio.maximum||1/0},s={width:Math.max(r.minWidth,Math.min(r.maxWidth,t)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function o(u,c){return c===void 0&&(c=!1),u.reduce(function(d,f){return $N({size:f,aspectRatio:i,sizeRestrictions:r,ignoreMinimum:c})&&(!d||HN(f,{width:t,height:n})<HN(d,{width:t,height:n}))?f:d},null)}var a=[];[i.minimum,i.maximum].forEach(function(u){u&&a.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),$N({size:s,aspectRatio:i,sizeRestrictions:r})&&a.push(s);var l=o(a)||o(a,!0);return l&&{width:l.width,height:l.height}}function dT(e){var t=e.event,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,s=yi(n,t.directions);return yi(s,xf(s,i))}function oye(e){var t=e.coordinates,n=e.transform,r=e.imageSize,i=e.sizeRestrictions,s=e.positionRestrictions,o=e.aspectRatio,a=e.visibleArea,l=function(c,d){return dT({coordinates:c,positionRestrictions:s,event:new rR({left:d.left-c.left,top:d.top-c.top})})},u=it({},t);return(Array.isArray(n)?n:[n]).forEach(function(c){var d={};lr((d=typeof c=="function"?c({coordinates:u,imageSize:r,visibleArea:a}):c).width)&&lr(d.height)||(u=function(f,h){var p=it(it(it({},f),ra({width:h.width,height:h.height,sizeRestrictions:i,aspectRatio:o})),{left:0,top:0});return l(p,{left:f.left,top:f.top})}(u,it(it({},u),d))),lr(d.left)&&lr(d.top)||(u=l(u,it(it({},u),d)))}),u}function aye(e){e.event;var t=e.getAreaRestrictions,n=e.boundaries,r=e.coordinates,i=e.visibleArea;e.aspectRatio;var s=e.stencilSize,o=e.sizeRestrictions,a=e.positionRestrictions;e.stencilReference;var l,u,c,d=it({},r),f=it({},i),h=it({},s);l=Gt(h),u=Gt(d),c===void 0&&(c=.001),(l===0||u===0?Math.abs(u-l)<c:Math.abs(u/l)<1+c&&Math.abs(u/l)>1-c)||(d=it(it({},d),ra({sizeRestrictions:o,width:d.width,height:d.height,aspectRatio:{minimum:Gt(h),maximum:Gt(h)}})));var p=q0(f=es(f,d.width*n.width/(f.width*h.width)),t({visibleArea:f,type:"resize"}));return p!==1&&(f=es(f,p),d=es(d,p)),f=Or(f=yi(f,_f(Cr(d),Cr(f))),t({visibleArea:f,type:"move"})),{coordinates:d=Or(d,G0(Eo(f),a)),visibleArea:f}}function lye(e){var t=e.event,n=e.getAreaRestrictions,r=e.boundaries,i=e.coordinates,s=e.visibleArea;e.aspectRatio,e.stencilSize,e.sizeRestrictions;var o=e.positionRestrictions;e.stencilReference;var a=it({},i),l=it({},s);if(i&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,r.width,Gt(r)>Gt(a)?(u.height=.8*r.height,u.width=u.height*Gt(a)):(u.width=.8*r.width,u.height=u.width*Gt(a));var c=q0(l=es(l,a.width*r.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=es(l,c),c!==1&&(u.height/=c,u.width/=c),l=Or(l=yi(l,_f(Cr(a),Cr(l))),n({visibleArea:l,type:"move"})),a=Or(a,G0(Eo(l),o))}return{coordinates:a,visibleArea:l}}function uye(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.getAreaRestrictions,s=it({},r),o=it({},n);if(t.type==="setCoordinates"){var a=Math.max(0,o.width-s.width),l=Math.max(0,o.height-s.height);a>l?s=es(s,Math.min(o.width/s.width,Sf(s,i({visibleArea:s,type:"resize"})))):l>a&&(s=es(s,Math.min(o.height/s.height,Sf(s,i({visibleArea:s,type:"resize"}))))),s=Or(s=yi(s,W0(xf(o,Eo(s)))),i({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:o}}function cye(e){var t=e.imageSize,n=e.visibleArea,r=e.coordinates,i=n||t;return{left:(n?n.left:0)+i.width/2-r.width/2,top:(n?n.top:0)+i.height/2-r.height/2}}function dye(e){var t=e.imageSize,n=e.visibleArea,r=e.aspectRatio,i=e.sizeRestrictions,s=n||t,o=Math.min(r.maximum||1/0,Math.max(r.minimum||0,Gt(s))),a=s.width<s.height?{width:.8*s.width,height:.8*s.width/o}:{height:.8*s.height,width:.8*s.height*o};return ra(it(it({},a),{aspectRatio:r,sizeRestrictions:i}))}function fye(e){var t,n,r=e.imageSize,i=e.visibleArea,s=e.boundaries,o=e.aspectRatio,a=e.sizeRestrictions,l=e.stencilSize,u=i||r;return Gt(u)>Gt(s)?n=(t=l.height*u.height/s.height)*Gt(l):t=(n=l.width*u.width/s.width)/Gt(l),ra({width:n,height:t,aspectRatio:o,sizeRestrictions:a})}function hye(e){var t=e.getAreaRestrictions,n=e.coordinates,r=e.imageSize,i=Gt(e.boundaries);if(n){var s={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},o=MU({width:Gt(s)>i?s.width:s.height*i,height:Gt(s)>i?s.width/i:s.height},cT(t())),a={left:n.left+n.width/2-o.width/2,top:n.top+n.height/2-o.height/2,width:o.width,height:o.height},l=gm(n,Eo(it({left:0,top:0},r))),u={};return!l.left&&!l.right&&a.width<=r.width&&(u.left=0,u.right=r.width),!l.top&&!l.bottom&&a.height<=r.height&&(u.top=0,u.bottom=r.height),Or(a,u)}var c=Gt(r);return o={height:c>i?r.height:r.width/i,width:c>i?r.height*i:r.width},{left:r.width/2-o.width/2,top:r.height/2-o.height/2,width:o.width,height:o.height}}function tv(e,t){return NU(e,Eo(t))}function pye(e){var t=e.event,n=e.coordinates,r=e.visibleArea,i=e.sizeRestrictions,s=e.getAreaRestrictions,o=e.positionRestrictions,a=e.adjustStencil,l=t.scale,u=t.move,c=it({},r),d=it({},n),f=1,h=1,p=l.factor&&Math.abs(l.factor-1)>.001;c=yi(c,{left:u.left||0,top:u.top||0});var m={stencil:{minimum:Math.max(i.minWidth?i.minWidth/d.width:0,i.minHeight?i.minHeight/d.height:0),maximum:Math.min(i.maxWidth?i.maxWidth/d.width:1/0,i.maxHeight?i.maxHeight/d.height:1/0,Sf(d,o))},area:{maximum:Sf(c,s({visibleArea:c,type:"resize"}))}};l.factor&&p&&(l.factor<1?(h=Math.max(l.factor,m.stencil.minimum))>1&&(h=1):l.factor>1&&(h=Math.min(l.factor,Math.min(m.area.maximum,m.stencil.maximum)))<1&&(h=1)),h&&(c=es(c,h,l.center));var g=n.left-r.left,v=r.width+r.left-(n.width+n.left),w=n.top-r.top,b=r.height+r.top-(n.height+n.top);return c=Or(c=yi(c,xf(c,{left:o.left!==void 0?o.left-g*h:void 0,top:o.top!==void 0?o.top-w*h:void 0,bottom:o.bottom!==void 0?o.bottom+b*h:void 0,right:o.right!==void 0?o.right+v*h:void 0})),s({visibleArea:c,type:"move"})),d.width=d.width*h,d.height=d.height*h,d.left=c.left+g*h,d.top=c.top+w*h,d=Or(d,G0(Eo(c),o)),l.factor&&p&&a&&(l.factor>1?f=Math.min(m.area.maximum,l.factor)/h:l.factor<1&&(f=Math.max(d.height/c.height,d.width/c.width,l.factor/h)),f!==1&&(c=yi(c=Or(c=es(c,f,l.factor>1?l.center:Cr(d)),s({visibleArea:c,type:"move"})),W0(xf(d,Eo(c)))))),{coordinates:d,visibleArea:c}}function mye(e){var t=e.aspectRatio,n=e.getAreaRestrictions,r=e.coordinates,i=e.visibleArea,s=e.sizeRestrictions,o=e.positionRestrictions,a=e.imageSize,l=e.previousImageSize,u=e.angle,c=it({},r),d=it({},i),f=al(Cr(it({left:0,top:0},l)),u);return(c=it(it({},ra({sizeRestrictions:s,aspectRatio:t,width:c.width,height:c.height})),al(Cr(c),u))).left-=f.left-a.width/2+c.width/2,c.top-=f.top-a.height/2+c.height/2,d=es(d,q0(d,n({visibleArea:d,type:"resize"}))),{coordinates:c=Or(c,o),visibleArea:d=Or(d=yi(d,_f(Cr(c),Cr(r))),n({visibleArea:d,type:"move"}))}}function gye(e){var t=e.flip,n=e.previousFlip,r=e.rotate,i=e.getAreaRestrictions,s=e.coordinates,o=e.visibleArea,a=e.imageSize,l=it({},s),u=it({},o),c=n.horizontal!==t.horizontal,d=n.vertical!==t.vertical;if(c||d){var f=al({left:a.width/2,top:a.height/2},-r),h=al(Cr(l),-r),p=al({left:c?f.left-(h.left-f.left):h.left,top:d?f.top-(h.top-f.top):h.top},r);l=yi(l,_f(p,Cr(l))),h=al(Cr(u),-r),u=Or(u=yi(u,_f(p=al({left:c?f.left-(h.left-f.left):h.left,top:d?f.top-(h.top-f.top):h.top},r),Cr(u))),i({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function VN(e){var t=e.directions,n=e.coordinates,r=e.positionRestrictions,i=r===void 0?{}:r,s=e.sizeRestrictions,o=e.preserveRatio,a=e.compensate,l=it({},t),u=no(n,l).width,c=no(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-s.minWidth)/(l.left/l.right),l.right=-(n.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-s.minWidth):l.right<0&&(l.right=-(n.width-s.minWidth))),c<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-s.minHeight):l.bottom<0&&(l.bottom=-(n.height-s.minHeight)));var d=gm(no(n,l),i);a&&(d.left&&d.left>0&&d.right===0?(l.right+=d.left,l.left-=d.left):d.right&&d.right>0&&d.left===0&&(l.left+=d.right,l.right-=d.right),d.top&&d.top>0&&d.bottom===0?(l.bottom+=d.top,l.top-=d.top):d.bottom&&d.bottom>0&&d.top===0&&(l.top+=d.bottom,l.bottom-=d.bottom),d=gm(no(n,l),i));var f={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(so.forEach(function(m){var g=d[m];g&&l[m]&&(f[m]=Math.max(0,1-g/l[m]))}),o){var h=Math.min.apply(null,so.map(function(m){return f[m]}));h!==1/0&&so.forEach(function(m){l[m]*=h})}else so.forEach(function(m){f[m]!==1/0&&(l[m]*=f[m])});if(u=no(n,l).width,c=no(n,l).height,l.right+l.left&&(u>s.maxWidth?f.width=(s.maxWidth-n.width)/(l.right+l.left):u<s.minWidth&&(f.width=(s.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(c>s.maxHeight?f.height=(s.maxHeight-n.height)/(l.bottom+l.top):c<s.minHeight&&(f.height=(s.minHeight-n.height)/(l.bottom+l.top))),o){var p=Math.min(f.width,f.height);p!==1/0&&so.forEach(function(m){l[m]*=p})}else f.width!==1/0&&tye.forEach(function(m){l[m]*=f.width}),f.height!==1/0&&nye.forEach(function(m){l[m]*=f.height});return l}function nv(e,t,n){return t==0&&n==0?e/2:t==0?0:n==0?e:e*Math.abs(t/(t+n))}var vye=Vs("vue-simple-handler"),yye=Vs("vue-simple-handler-wrapper"),sR={name:"SimpleHandler",components:{HandlerWrapper:AU},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var e,t=(Xi(e={},this.horizontalPosition,!!this.horizontalPosition),Xi(e,this.verticalPosition,!!this.verticalPosition),Xi(e,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),Xi(e,"hover",this.hover),e);return{default:Zn(vye(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Zn(yye(t),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};sR.render=function(e,t,n,r,i,s){var o=En("HandlerWrapper");return k(),X(o,{class:s.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:H(function(){return[$("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var bye=Vs("vue-simple-line"),wye=Vs("vue-simple-line-wrapper"),oR={name:"SimpleLine",components:{LineWrapper:PU},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Zn(bye(Xi({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Zn(wye(Xi({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};oR.render=function(e,t,n,r,i,s){var o=En("LineWrapper");return k(),X(o,{class:s.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:H(function(){return[$("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var GS=Vs("vue-bounding-box"),_ye=["east","west",null],Sye=["south","north",null],LU={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return sR}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return oR}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var e=[];return _ye.forEach(function(t){Sye.forEach(function(n){if(t!==n){var r=CU(t,n),i=r.name,s=r.classname;e.push({name:i,classname:s,verticalDirection:n,horizontalDirection:t})}})}),{points:e}},computed:{style:function(){var e={};return this.width&&this.height&&(e.width="".concat(this.width,"px"),e.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),e},classes:function(){var e=this.handlersClasses,t=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:GS(),handlers:e,handlersWrappers:t,lines:n,linesWrappers:r}},lineNodes:function(){var e=this,t=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!e.lines[n.name]||t.push({name:n.name,component:e.linesComponent,class:Zn(e.classes.lines.default,e.classes.lines[n.name],!e.resizable&&e.classes.lines.disabled),wrapperClass:Zn(e.classes.linesWrappers.default,e.classes.linesWrappers[n.name],!e.resizable&&e.classes.linesWrappers.disabled),hoverClass:e.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!e.resizable})}),t},handlerNodes:function(){var e=this,t=[],n=this.width,r=this.height;return this.points.forEach(function(i){if(e.handlers[i.name]){var s={name:i.name,component:e.handlersComponent,class:Zn(e.classes.handlers.default,e.classes.handlers[i.name]),wrapperClass:Zn(e.classes.handlersWrappers.default,e.classes.handlersWrappers[i.name]),hoverClass:e.classes.handlers.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!e.resizable};if(n&&r){var o=i.horizontalDirection,a=i.verticalDirection,l=o==="east"?n:o==="west"?0:n/2,u=a==="south"?r:a==="north"?0:r/2;s.wrapperClass=GS("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},e.transitions&&e.transitions.enabled&&(s.wrapperStyle.transition="".concat(e.transitions.time,"ms ").concat(e.transitions.timingFunction))}else s.wrapperClass=GS("handler",Xi({},i.classname,!0));t.push(s)}}),t}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(e,t,n){var r,i=e.shift(),s=i.left,o=i.top,a={left:0,right:0,top:0,bottom:0};t==="west"?a.left-=s:t==="east"&&(a.right+=s),n==="north"?a.top-=o:n==="south"&&(a.bottom+=o),!n&&t?r="width":n&&!t&&(r="height"),this.resizable&&this.$emit("resize",new Qve(a,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:e.nativeEvent&&e.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};LU.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"box",class:s.classes.root,style:s.style},[ce(e.$slots,"default"),$("div",null,[(k(!0),X(je,null,Ot(s.lineNodes,function(o){return k(),X(Rr(o.component),{key:o.name,"default-class":o.class,"hover-class":o.hoverClass,"wrapper-class":o.wrapperClass,position:o.name,disabled:o.disabled,onDrag:function(a){return s.onHandlerDrag(a,o.horizontalDirection,o.verticalDirection)},onDragEnd:t[1]||(t[1]=function(a){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(k(!0),X(je,null,Ot(s.handlerNodes,function(o){return k(),X("div",{key:o.name,style:o.wrapperStyle,class:o.wrapperClass},[(k(),X(Rr(o.component),{"default-class":o.class,"hover-class":o.hoverClass,"wrapper-class":o.wrapperClass,"horizontal-position":o.horizontalDirection,"vertical-position":o.verticalDirection,disabled:o.disabled,onDrag:function(a){return s.onHandlerDrag(a,o.horizontalDirection,o.verticalDirection)},onDragEnd:t[2]||(t[2]=function(a){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var xye=Vs("vue-draggable-area"),FU={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:xye()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(e){if(e.cancelable){var t=this.movable&&e.touches.length===1;t&&(this.touches=Sc(e.touches)),(this.touchStarted||t)&&(e.preventDefault(),e.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(e){this.touches.length>=1&&(this.touchStarted?(this.processMove(e,e.touches),e.preventDefault(),e.stopPropagation()):IU({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:e.touches[0].clientX,y:e.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(e){if(this.movable&&e.button===0){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.initAnchor(t),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top;this.anchor={x:e.clientX-n,y:e.clientY-r}},processMove:function(e,t){var n=Sc(t);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),i=r.left,s=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new rR({left:n[0].clientX-(i+this.anchor.x),top:n[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};FU.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[ce(e.$slots,"default")],544)};function KS(e){var t,n;return{rotate:e.rotate||0,flip:{horizontal:((t=e==null?void 0:e.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((n=e==null?void 0:e.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function Eye(e){return new Promise(function(t,n){try{if(e)if(/^data:/i.test(e))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),c=u.length,d=new ArrayBuffer(c),f=new Uint8Array(d),h=0;h<c;h++)f[h]=u.charCodeAt(h);return d}(e));else if(/^blob:/i.test(e)){var r=new FileReader;r.onload=function(l){t(l.target.result)},s=e,o=function(l){r.readAsArrayBuffer(l)},(a=new XMLHttpRequest).open("GET",s,!0),a.responseType="blob",a.onload=function(){this.status!=200&&this.status!==0||o(this.response)},a.send()}else{var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===4&&(i.status===200||i.status===0?t(i.response):n("Warning: could not load an image to parse its orientation"),i=null)},i.onprogress=function(){i.getResponseHeader("content-type")!=="image/jpeg"&&i.abort()},i.withCredentials=!1,i.open("GET",e,!0),i.responseType="arraybuffer",i.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var s,o,a})}function BU(e){var t=e.rotate,n=e.flip,r=e.scaleX,i=e.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+r*(n.horizontal?-1:1)+") ",s+=" scaleY("+i*(n.vertical?-1:1)+") "}function Tye(e){try{var t,n=new DataView(e),r=void 0,i=void 0,s=void 0,o=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var a=n.byteLength,l=2;l+1<a;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){s=l;break}l++}if(s&&(r=s+10,function(h,p,m){var g,v="";for(g=p,m+=p;g<m;g++)v+=String.fromCharCode(h.getUint8(g));return v}(n,s+4,4)==="Exif")){var u=n.getUint16(r);if(((i=u===18761)||u===19789)&&n.getUint16(r+2,i)===42){var c=n.getUint32(r+4,i);c>=8&&(o=r+c)}}if(o){for(var d=n.getUint16(o,i),f=0;f<d;f++)if(l=o+12*f+2,n.getUint16(l,i)===274){l+=8,t=n.getUint16(l,i),n.setUint16(l,1,i);break}}return t}catch{return null}}function jN(e,t){var n=t.getBoundingClientRect(),r=n.left,i=n.top,s={left:0,top:0},o=0;return e.forEach(function(a){s.left+=(a.clientX-r)/e.length,s.top+=(a.clientY-i)/e.length}),e.forEach(function(a){o+=IU({x:s.left,y:s.top},{x:a.clientX-r,y:a.clientY-i})}),{centerMass:s,spread:o,count:e.length}}var zU={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=lT(this.processEnd),this.touches=[]},methods:{processMove:function(e,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new Ep({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=jN(t,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new Ep({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(e){return this.eventsFilter?this.eventsFilter(e,this.transforming)!==!1:(e.preventDefault(),e.stopPropagation(),!0)},onTouchStart:function(e){if(e.cancelable&&(this.touchMove||this.touchResize&&e.touches.length>1)&&this.processEvent(e)){var t=this.$refs.container,n=t.getBoundingClientRect(),r=n.left,i=n.top,s=n.bottom,o=n.right;this.touches=Sc(e.touches).filter(function(a){return a.clientX>r&&a.clientX<o&&a.clientY>i&&a.clientY<s}),this.oldGeometricProperties=jN(this.touches,t)}},onTouchEnd:function(e){e.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(e){var t=this;if(this.touches.length){var n=Sc(e.touches).filter(function(r){return!r.identifier||t.touches.find(function(i){return i.identifier===r.identifier})});this.processEvent(e)&&(this.processMove(e,n),this.processStart())}},onMouseDown:function(e){if(this.mouseMove&&"buttons"in e&&e.buttons===1&&this.processEvent(e)){var t={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(e){this.touches.length&&this.processEvent(e)&&this.processMove(e,[{clientX:e.clientX,clientY:e.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(e){if(this.wheelResize&&this.processEvent(e)){var t=this.$refs.container.getBoundingClientRect(),n=t.left,r=t.top,i=1+this.wheelResize.ratio*(o=e.deltaY||e.detail||e.wheelDelta,(a=+o)==0||RU(a)?a:a>0?1:-1),s={left:e.clientX-n,top:e.clientY-r};this.$emit("resize",new Ep({},{factor:i,center:s})),this.touches.length||this.debouncedProcessEnd()}var o,a}},emits:["resize","move","transform-end"]};zU.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[ce(e.$slots,"default")],544)};var fT={components:{TransformableImage:zU},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};fT.render=function(e,t,n,r,i,s){var o=En("transformable-image");return k(),X(o,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:t[1]||(t[1]=function(a){return e.$emit("move",a)}),onResize:t[2]||(t[2]=function(a){return e.$emit("resize",a)})},{default:H(function(){return[ce(e.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var rv=Vs("vue-preview"),$U={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:rv({fill:this.fill}),wrapper:rv("wrapper"),imageWrapper:rv("image-wrapper"),image:Zn(rv("image"),this.imageClass)}},style:function(){if(this.fill)return{};var e={};return this.width&&(e.width="".concat(this.size.width,"px")),this.height&&(e.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},wrapperStyle:function(){var e={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},imageStyle:function(){if(this.coordinates&&this.image){var e=this.coordinates.width/this.size.width,t=qt(qt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/e,scaleY:1/e}),n=this.imageSize.width,r=this.imageSize.height,i=DU({width:n,height:r},t.rotate),s={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},o={rotate:{left:(n-i.width)*t.scaleX/2,top:(r-i.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*n/2,top:(1-t.scaleY)*r/2}};return s.transform=`translate( `.concat(-this.coordinates.left/e-o.rotate.left-o.scale.left,"px,").concat(-this.coordinates.top/e-o.rotate.top-o.scale.top,"px) ")+BU(t),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(e){(e.width||e.height)&&this.onChangeImage()}},mounted:function(){var e=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){e.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var e=this.$refs.image;this.calculatedImageSize.height=e.naturalHeight,this.calculatedImageSize.width=e.naturalWidth},refresh:function(){var e=this.$refs.root;this.width||(this.calculatedSize.width=e.clientWidth),this.height||(this.calculatedSize.height=e.clientHeight)},onChangeImage:function(){var e=this.$refs.image;e&&e.complete&&this.refreshImage(),this.refresh()}}};$U.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"root",class:s.classes.root,style:s.style},[$("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[At($("img",{ref:"image",src:n.image&&n.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[Cu,n.image&&n.image.src]])],6)],6)};var HU={components:{Preview:$U},inheritAttrs:!1};HU.render=function(e,t,n,r,i,s){var o=En("preview");return k(),X(o,Fe(e.$attrs,{fill:!0}),null,16)};var YS=Vs("vue-rectangle-stencil"),VU={name:"RectangleStencil",components:{StencilPreview:HU,BoundingBox:LU,DraggableArea:FU},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return sR}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return oR}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Zn(YS({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Zn(YS("preview"),this.previewClass),boundingBox:Zn(YS("bounding-box"),this.boundingBoxClass)}},style:function(){var e=this.stencilCoordinates,t=e.height,n=e.width,r=e.left,i=e.top,s={width:"".concat(n,"px"),height:"".concat(t,"px"),transform:"translate(".concat(r,"px, ").concat(i,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(e){this.$emit("move",e),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(e){this.$emit("resize",e),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};VU.render=function(e,t,n,r,i,s){var o=En("stencil-preview"),a=En("draggable-area"),l=En("bounding-box");return k(),X("div",{class:s.classes.stencil,style:s.style},[$(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:s.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:H(function(){return[$(a,{movable:n.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:H(function(){return[$(o,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:s.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var kye=["transitions"],zo=Vs("vue-advanced-cropper"),jU={name:"Cropper",components:{BackgroundWrapper:fT},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return VU}},backgroundWrapperComponent:{type:[Object,String],default:function(){return fT}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(e){return iye.indexOf(e)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(e){return!(typeof e=="string"&&e!=="fill"&&e!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(e){var t=e.event,n=e.coordinates,r=e.aspectRatio,i=e.positionRestrictions,s=e.sizeRestrictions,o=it(it({},n),{right:n.left+n.width,bottom:n.top+n.height}),a=t.params||{},l=it({},t.directions),u=a.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),so.forEach(function(_){u[_]||(l[_]=0)});var c=no(o,l=VN({coordinates:o,directions:l,sizeRestrictions:s,positionRestrictions:i})).width,d=no(o,l).height,f=a.preserveRatio?Gt(o):qS(c/d,r);if(f){var h=a.respectDirection;if(h||(h=o.width>=o.height||f===1?"width":"height"),h==="width"){var p=c/f-o.height;if(u.top&&u.bottom){var m=l.top,g=l.bottom;l.bottom=nv(p,g,m),l.top=nv(p,m,g)}else u.bottom?l.bottom=p:u.top?l.top=p:u.right?l.right=0:u.left&&(l.left=0)}else if(h==="height"){var v=o.width-d*f;if(u.left&&u.right){var w=l.left,b=l.right;l.left=-nv(v,w,b),l.right=-nv(v,b,w)}else u.left?l.left=-v:u.right?l.right=-v:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=VN({directions:l,coordinates:o,sizeRestrictions:s,positionRestrictions:i,preserveRatio:!0,compensate:a.compensate})}return c=no(o,l).width,d=no(o,l).height,(f=a.preserveRatio?Gt(o):qS(c/d,r))&&Math.abs(f-c/d)>.001&&so.forEach(function(_){u[_]||(l[_]=0)}),dT({event:new rR({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:i})}},moveAlgorithm:{type:Function,default:dT},initStretcher:{type:Function,default:function(e){var t=e.stretcher,n=e.imageSize,r=Gt(n);t.style.width=n.width+"px",t.style.height=t.clientWidth/r+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(e){var t=e.visibleArea,n=e.coordinates,r=e.aspectRatio,i=e.sizeRestrictions,s=e.positionRestrictions,o=it(it({},n),ra({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,i.minHeight),minWidth:Math.min(t.width,i.minWidth)}}));return o=Or(o=yi(o,_f(Cr(n),Cr(o))),G0(Eo(t),s))}},fitVisibleArea:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.getAreaRestrictions,i=e.coordinates,s=it({},t);s.height=s.width/Gt(n),s.top+=(t.height-s.height)/2,(i.height-s.height>0||i.width-s.width>0)&&(s=es(s,Math.max(i.height/s.height,i.width/s.width)));var o=W0(xf(i,Eo(s=es(s,q0(s,r({visibleArea:s,type:"resize"}))))));return s.width<i.width&&(o.left=0),s.height<i.height&&(o.top=0),s=Or(s=yi(s,o),r({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.visibleArea,n=e.boundaries,r=e.imageSize,i=e.imageRestriction,s=e.type,o={};return i==="fill-area"?o={left:0,top:0,right:r.width,bottom:r.height}:i==="fit-area"&&(Gt(n)>Gt(r)?(o={top:0,bottom:r.height},t&&s==="move"&&(t.width>r.width?(o.left=-(t.width-r.width)/2,o.right=r.width-o.left):(o.left=0,o.right=r.width))):(o={left:0,right:r.width},t&&s==="move"&&(t.height>r.height?(o.top=-(t.height-r.height)/2,o.bottom=r.height-o.top):(o.top=0,o.bottom=r.height)))),o}},sizeRestrictionsAlgorithm:{type:Function,default:function(e){return{minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(e){var t=e.imageSize,n={};return e.imageRestriction!=="none"&&(n={left:0,top:0,right:t.width,bottom:t.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:qt({},BN)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var e=function(t){return t*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(e))+Math.abs(this.imageAttributes.height*Math.sin(e)),height:Math.abs(this.imageAttributes.width*Math.sin(e))+Math.abs(this.imageAttributes.height*Math.cos(e))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var e=uT(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:uT(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:e}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var e=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:lr(this.minWidth)?0:ev(this.minWidth),minHeight:lr(this.minHeight)?0:ev(this.minHeight),maxWidth:lr(this.maxWidth)?1/0:ev(this.maxWidth),maxHeight:lr(this.maxHeight)?1/0:ev(this.maxHeight)});if(e=function(r){var i=r.areaRestrictions,s=r.sizeRestrictions,o=r.boundaries,a=r.positionRestrictions,l=it(it({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});a.left!==void 0&&a.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,a.right-a.left)),a.bottom!==void 0&&a.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,a.bottom-a.top));var u=cT(i),c=MU(o,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>c.width)&&(l.maxWidth=Math.min(l.maxWidth,c.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>c.height)&&(l.maxHeight=Math.min(l.maxHeight,c.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:e,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var t=this.getStencilSize(),n=cT(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));e.maxWidth=Math.min(e.maxWidth,n.width*t.width/this.boundaries.width),e.maxHeight=Math.min(e.maxHeight,n.height*t.height/this.boundaries.height),e.maxWidth<e.minWidth&&(e.minWidth=e.maxWidth),e.maxHeight<e.minHeight&&(e.minHeight=e.maxHeight)}return e}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:zo(),image:Zn(zo("image"),this.imageClass),stencil:zo("stencil"),boundaries:Zn(zo("boundaries"),this.boundariesClass),stretcher:Zn(zo("stretcher")),background:Zn(zo("background"),this.backgroundClass),foreground:Zn(zo("foreground"),this.foregroundClass),imageWrapper:Zn(zo("image-wrapper")),cropperWrapper:Zn(zo("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var e=this.coordinates,t=e.width,n=e.height,r=e.left,i=e.top;return{width:t/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(i-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var e={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(e.opacity="0"),e},imageStyle:function(){var e=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},t={left:(e.width-this.imageSize.width)/(2*this.coefficient),top:(e.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*e.width/2,top:(1-1/this.coefficient)*e.height/2},r=qt(qt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/e.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/e.height)}),i={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-n.left-this.imageTransforms.translateX,"px, ").concat(-t.top-n.top-this.imageTransforms.translateY,"px)")+BU(r)};return this.transitionsOptions.enabled&&(i.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),i}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var e=this;this.$nextTick(function(){e.resetCoordinates(),e.runAutoZoom("setCoordinates"),e.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(e,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return e[n]!==t[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=lT(this.update,this.debounce),this.debouncedDisableTransitions=lT(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var e=this.initialized?this.prepareResult(qt({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:qt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:e,visibleArea:this.visibleArea?qt({},this.visibleArea):null,imageTransforms:t,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:e,visibleArea:this.visibleArea?qt({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Ep({},{factor:1/e,center:t}),{normalize:!1,transitions:i})},move:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new Ep({left:e||0,top:t||0}),{normalize:!1,transitions:i})},setCoordinates:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,i=r===void 0||r,s=n.transitions,o=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(o&&t.enableTransitions(),t.coordinates=t.applyTransform(e),i&&t.runAutoZoom("setCoordinates"),o&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=e})},refresh:function(){var e=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){e.onChange()}):this.resetVisibleArea().then(function(){e.onChange()})},reset:function(){var e=this;return this.resetVisibleArea().then(function(){e.onChange(!1)})},awaitRender:function(e){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){e(),t.awaiting=!1}))},prepareResult:function(e){return this.roundResult?function(t){var n=t.coordinates,r=t.sizeRestrictions,i=t.positionRestrictions,s={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return s.width>r.maxWidth?s.width=Math.floor(n.width):s.width<r.minWidth&&(s.width=Math.ceil(n.width)),s.height>r.maxHeight?s.height=Math.floor(n.height):s.height<r.minHeight&&(s.height=Math.ceil(n.height)),Or(s,i)}(qt(qt({},this.getPublicProperties()),{},{positionRestrictions:tv(this.positionRestrictions,this.visibleArea),coordinates:e})):e},processAutoZoom:function(e,t,n,r){var i=this.autoZoomAlgorithm;i||(i=this.stencilSize?aye:this.autoZoom?lye:uye);var s=i({event:{type:e,params:r},visibleArea:t,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return qt(qt({},s),{},{changed:!zN(s.visibleArea,t)||!zN(s.coordinates,n)})},runAutoZoom:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n!==void 0&&n,i=Xve(t,kye),s=this.processAutoZoom(e,this.visibleArea,this.coordinates,i),o=s.visibleArea,a=s.coordinates,l=s.changed;r&&l&&this.enableTransitions(),this.visibleArea=o,this.coordinates=a,r&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(e){return function(t){var n=t.event,r=t.visibleArea,i=t.coefficient;if(n.type==="manipulateImage")return it(it({},n),{move:{left:n.move&&n.move.left?i*n.move.left:0,top:n.move&&n.move.top?i*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*i+r.left,top:n.scale.center.top*i+r.top}:null}});if(n.type==="resize"){var s=it(it({},n),{directions:it({},n.directions)});return so.forEach(function(a){s.directions[a]*=i}),s}if(n.type==="move"){var o=it(it({},n),{directions:it({},n.directions)});return rye.forEach(function(a){o.directions[a]*=i}),o}return n}(qt(qt({},this.getPublicProperties()),{},{event:e}))},getCanvas:function(){if(this.$refs.canvas){var e=this.$refs.canvas,t=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(a,l,u){var c=u.rotate,d=u.flip,f={width:l.naturalWidth,height:l.naturalHeight},h=DU(f,c),p=a.getContext("2d");a.height=h.height,a.width=h.width,p.save();var m=al(Cr(it({left:0,top:0},f)),c);return p.translate(-(m.left-h.width/2),-(m.top-h.height/2)),p.rotate(c*Math.PI/180),p.translate(d.horizontal?f.width:0,d.vertical?f.height:0),p.scale(d.horizontal?-1:1,d.vertical?-1:1),p.drawImage(l,0,0,f.width,f.height),p.restore(),a}(this.$refs.sourceCanvas,t,this.imageTransforms):t,r=qt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),i=function(a){return a.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=ra({sizeRestrictions:{minWidth:i([r.width,r.minWidth])||0,minHeight:i([r.height,r.minHeight])||0,maxWidth:i([r.width,r.maxWidth])||1/0,maxHeight:i([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&s.width*s.height>r.maxArea){var o=Math.sqrt(r.maxArea/(s.width*s.height));s={width:Math.round(o*s.width),height:Math.round(o*s.height)}}return function(a,l,u,c,d){a.width=c?c.width:u.width,a.height=c?c.height:u.height;var f=a.getContext("2d");f.clearRect(0,0,a.width,a.height),d&&(d.imageSmoothingEnabled&&(f.imageSmoothingEnabled=d.imageSmoothingEnabled),d.imageSmoothingQuality&&(f.imageSmoothingQuality=d.imageSmoothingQuality),d.fillColor&&(f.fillStyle=d.fillColor,f.fillRect(0,0,a.width,a.height),f.save()));var h=u.left<0?-u.left:0,p=u.top<0?-u.top:0;f.drawImage(l,u.left+h,u.top+p,u.width,u.height,h*(a.width/u.width),p*(a.height/u.height),a.width,a.height)}(e,n,this.coordinates,s,r),e}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&t?sye(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&t?tv(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return oye({transform:e,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var e=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?fye:dye);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=qc(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,i=this.defaultPosition||cye,s=[r,function(o){var a=o.coordinates;return qt({},qc(i)?i({coordinates:a,imageSize:e.imageSize,visibleArea:e.visibleArea}):e.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,Sc(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var e=this;this.imageLoaded=!1,setTimeout(function(){var t=e.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),e.coordinates=e.defaultCoordinates(),e.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var e=this,t=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var r={cropper:n,imageSize:e.imageSize};if(qc(e.defaultBoundaries)?e.boundaries=e.defaultBoundaries(r):e.defaultBoundaries==="fit"?e.boundaries=function(i){var s=i.cropper,o=i.imageSize,a=s.clientHeight,l=s.clientWidth,u=a,c=o.width*a/o.height;return c>l&&(c=l,u=o.height*l/o.width),{width:c,height:u}}(r):e.boundaries=function(i){var s=i.cropper;return{width:s.clientWidth,height:s.clientHeight}}(r),!e.boundaries.width||!e.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var e=this;return this.appliedImageTransforms=qt(qt({},this.defaultImageTransforms),{},{flip:qt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){e.priority!=="visible-area"&&(e.visibleArea=null,e.resetCoordinates());var t,n,r,i,s,o,a=e.defaultVisibleArea||hye;e.visibleArea=qc(a)?a({imageSize:e.imageSize,boundaries:e.boundaries,coordinates:e.priority!=="visible-area"?e.coordinates:null,getAreaRestrictions:e.getAreaRestrictions,stencilSize:e.getStencilSize()}):e.defaultVisibleArea,e.visibleArea=(t={visibleArea:e.visibleArea,boundaries:e.boundaries,getAreaRestrictions:e.getAreaRestrictions},n=t.visibleArea,r=t.boundaries,i=t.getAreaRestrictions,s=it({},n),o=Gt(r),s.width/s.height!==o&&(s.height=s.width/o),Or(s,i({visibleArea:s,type:"move"}))),e.priority==="visible-area"?e.resetCoordinates():e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("resetVisibleArea")}).catch(function(){e.visibleArea=null})},updateVisibleArea:function(){var e=this;return this.updateBoundaries().then(function(){e.visibleArea=e.fitVisibleArea({imageSize:e.imageSize,boundaries:e.boundaries,visibleArea:e.visibleArea,coordinates:e.coordinates,getAreaRestrictions:e.getAreaRestrictions}),e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("updateVisibleArea")}).catch(function(){e.visibleArea=null})},onChange:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var e,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(i){if(LN(i))return!1;var s=window.location,o=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[],a={protocol:o[1]||"",host:o[2]||"",port:o[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!a.protocol&&!a.host&&!a.port||a.protocol&&a.protocol==s.protocol&&a.host&&a.host==s.host&&a.host&&l(a)==l(s))}(this.src)){var n=lr(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(e=this.src,new Promise(function(i){Eye(e).then(function(s){var o=Tye(s);i(s?{source:e,arrayBuffer:s,orientation:o}:{source:e,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),i({source:e,arrayBuffer:null,orientation:null})})}));setTimeout(function(){r.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var e=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){e.$emit("ready"),e.onChange(!1)}))},onParseImage:function(e){var t=this,n=e.source,r=e.arrayBuffer,i=e.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&i&&i>1?OU(n)||!LN(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var o=[],a=new Uint8Array(s);a.length>0;){var l=a.subarray(0,8192);o.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),a=a.subarray(8192)}return"data:image/jpeg;base64,"+btoa(o.join(""))}(r):this.imageAttributes.src=n,qc(this.defaultTransforms)?this.appliedImageTransforms=KS(this.defaultTransforms()):uy(this.defaultTransforms)?this.appliedImageTransforms=KS(this.defaultTransforms):this.appliedImageTransforms=function(s){var o=KS({});if(s)switch(s){case 2:o.flip.horizontal=!0;break;case 3:o.rotate=-180;break;case 4:o.flip.vertical=!0;break;case 5:o.rotate=90,o.flip.vertical=!0;break;case 6:o.rotate=90;break;case 7:o.rotate=90,o.flip.horizontal=!0;break;case 8:o.rotate=-90}return o}(i),this.defaultImageTransforms=qt(qt({},this.appliedImageTransforms),{},{flip:qt({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(o){return!!o.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(e){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(qt(qt({},t.getPublicProperties()),{},{positionRestrictions:tv(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(e)})),t.onChange()})},onResize:function(e){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=t.sizeRestrictions,r=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(qt(qt({},t.getPublicProperties()),{},{positionRestrictions:tv(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,t.visibleArea.width),maxHeight:Math.min(n.maxHeight,t.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:t.normalizeEvent(e)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=t.transitions,r=n!==void 0&&n,i=t.normalize,s=i===void 0||i;r&&this.enableTransitions();var o=pye(qt(qt({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(e):e,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),a=o.visibleArea,l=o.coordinates;this.visibleArea=a,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.visibleArea,n=e.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:r})},getAspectRatio:function(e){var t,n,r=this.stencilProps,i=r.aspectRatio,s=r.minAspectRatio,o=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var a=this.$refs.stencil.aspectRatios();t=a.minimum,n=a.maximum}if(lr(t)&&(t=lr(i)?s:i),lr(n)&&(n=lr(i)?o:i),!e&&(lr(t)||lr(n))){var l=this.getStencilSize(),u=l?Gt(l):null;lr(t)&&(t=FN(u)?u:void 0),lr(n)&&(n=FN(u)?u:void 0)}return{minimum:t,maximum:n}},getStencilSize:function(){if(this.stencilSize)return e={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},t=e.boundaries,n=e.stencilSize,r=e.aspectRatio,qS(Gt(i=qc(n)?n({boundaries:t,aspectRatio:r}):n),r)&&(i=ra({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(i.width>t.width||i.height>t.height)&&(i=ra({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:Gt(i),maximum:Gt(i)}})),i;var e,t,n,r,i},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return qt({},BN)},flip:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;if(!this.transitionsActive){i&&this.enableTransitions();var s=qt({},this.imageTransforms.flip),o=gye({flip:{horizontal:e?!s.horizontal:s.horizontal,vertical:t?!s.vertical:s.vertical},previousFlip:s,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=o.visibleArea,l=o.coordinates;e&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=a,this.coordinates=l,this.onChange(),i&&this.debouncedDisableTransitions()}},rotate:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var i=qt({},this.imageSize);this.appliedImageTransforms.rotate+=e;var s=mye({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:i,imageSize:this.imageSize,angle:e,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),o=s.visibleArea,a=s.coordinates,l=this.processAutoZoom("rotateImage",o,a);o=l.visibleArea,a=l.coordinates,this.visibleArea=o,this.coordinates=a,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Cye={key:0,ref:"canvas",style:{display:"none"}},Oye={key:1,ref:"sourceCanvas",style:{display:"none"}};jU.render=function(e,t,n,r,i,s){return k(),X("div",{ref:"cropper",class:s.classes.cropper},[$("div",{ref:"stretcher",class:s.classes.stretcher},null,2),$("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(k(),X(Rr(n.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:H(function(){return[$("div",{class:s.classes.background,style:s.boundariesStyle},null,6),$("div",{class:s.classes.imageWrapper},[$("img",{ref:"image",crossorigin:i.imageAttributes.crossOrigin,src:i.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=lt(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),$("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),At((k(),X(Rr(n.stencilComponent),Fe({ref:"stencil",image:s.image,coordinates:i.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},n.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Cu,i.imageLoaded]]),n.canvas?(k(),X("canvas",Cye,null,512)):fe("",!0),n.canvas?(k(),X("canvas",Oye,null,512)):fe("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Rye={class:"pt-5"},Iye=ee({__name:"CropperModal",props:{open:{type:Boolean},imgSrc:{}},emits:["crop","close"],setup(e,{emit:t}){const n=e,r=t,i=Ur(),{toast:s}=$s(),{t:o}=ls(),a=U(),l=async()=>{if(!a.value)return;const c=h=>{h?r("crop",h):s({variant:"destructive",description:o("messages.imageCropFailed")}),r("close")},d=n.imgSrc.lastIndexOf("."),f=d>-1?`image/${n.imgSrc.slice(d+1)}`:"image/png";a.value.getCanvas().toBlob(c,f),i.track("OVR Tracking - Cropped an image")},u=async c=>new Promise((d,f)=>{const h=new Image;h.onload=d,h.onerror=f,h.src=c});return He(()=>n.imgSrc,c=>{u(c)},{immediate:!0}),(c,d)=>(k(),X(y(bW),{open:c.open,title:c.$t("components.Cropper.title"),"confirm-text":c.$t("actions.crop"),"no-auto-close":"",cancelable:"",confirmable:"",onConfirm:l},{default:H(()=>[A("div",Rye,[$(y(zve),{variant:"info",class:"mb-5"},{default:H(()=>[Ye(ye(c.$t("components.Cropper.helpText")),1)]),_:1}),$(y(jU),{id:"image-cropper",ref_key:"cropper",ref:a,class:"max-h-96","image-class":"img-bg-fallback","background-class":"cropper-fbg","foreground-class":"cropper-fbg","stencil-props":{handlersClasses:{default:"handlers-color"},linesClasses:{default:"lines-color"}},src:c.imgSrc},null,8,["src"])])]),_:1},8,["open","title","confirm-text"]))}}),Ei=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},Aye=Ei(Iye,[["__scopeId","data-v-e0899e4f"]]),UU=ee({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(Jle),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),Pye={id:"radix-css-container"},WU=ee({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Qle),null,{default:H(()=>[A("div",Pye,[$(y(nue),{class:"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"}),$(y(tue),Fe(y(s),{class:y(st)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-slate-200 bg-white 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%] sm:rounded-lg dark:border-slate-800 dark:bg-slate-950",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"])])]),_:3}))}}),qU=ee({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)("flex flex-col gap-y-2 text-center sm:text-left",t.class))},[ce(n.$slots,"default")],2))}}),GU=ee({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(iue),Fe(n.value,{class:y(st)("text-lg font-semibold",t.class)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),KU=ee({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(sue),Fe(n.value,{class:y(st)("text-sm text-slate-500 dark:text-slate-400",t.class)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),YU=ee({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",t.class))},[ce(n.$slots,"default")],2))}}),XU=ee({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(oue),Fe(n.value,{class:y(st)(y(nR)(),t.class)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),JU=ee({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(rue),Fe(n.value,{class:y(st)(y(nR)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),Mye={class:"text-sm text-secondary-500"},Dye=ee({__name:"SaveSettingsDialog",props:{isOpen:{type:Boolean}},emits:["cancel","confirm"],setup(e){return(t,n)=>(k(),X(y(UU),{open:t.isOpen},{default:H(()=>[$(y(WU),{class:"!z-[51] !max-w-md",onInteractOutside:n[2]||(n[2]=r=>t.$emit("cancel"))},{default:H(()=>[$(y(qU),null,{default:H(()=>[$(y(GU),{class:"flex flex-col"},{default:H(()=>[A("div",null,ye(t.$t("components.SaveSettingsDialog.title")),1)]),_:1}),$(y(KU),{class:"flex flex-col items-center"},{default:H(()=>[A("div",Mye,ye(t.$t("components.SaveSettingsDialog.description")),1)]),_:1})]),_:1}),$(y(YU),{class:"!justify-end items-right gap-y-2"},{default:H(()=>[$(y(JU),{onClick:n[0]||(n[0]=r=>t.$emit("cancel"))},{default:H(()=>[Ye(ye(t.$t("components.SaveSettingsDialog.cancel")),1)]),_:1}),$(y(XU),{class:"bg-black hover:opacity-90",onClick:n[1]||(n[1]=r=>t.$emit("confirm"))},{default:H(()=>[Ye(ye(t.$t("components.SaveSettingsDialog.confirm")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]))}});/** * table-core * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function fl(e,t){return typeof e=="function"?e(t):e}function Li(e,t){return n=>{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function K0(e){return e instanceof Function}function Nye(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Lye(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const o=t(s);o!=null&&o.length&&r(o)})};return r(e),n}function ct(e,t,n){let r=[],i;return s=>{let o;n.key&&n.debug&&(o=Date.now());const a=e(s);if(!(a.length!==r.length||a.some((c,d)=>r[d]!==c)))return i;r=a;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,h=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(c,5)} ms`,` font-size: .6rem; font-weight: bold; color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function dt(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Fye(e,t,n,r){const i=()=>{var o;return(o=s.getValue())!=null?o:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:ct(()=>[e,n,t,s],(o,a,l,u)=>({table:o,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),dt(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(s,n,t,e)},{}),s}function Bye(e,t,n,r){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=f=>{let h=f;for(const m of l.split(".")){var p;h=(p=h)==null?void 0:p[m]}return h}:c=f=>f[a.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:ct(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},dt(e.options,"debugColumns")),getLeafColumns:ct(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(m=>m.getLeafColumns());return f(p)}return[d]},dt(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const Pr="debugHeaders";function UN(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),o.push(l)};return a(s),o},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(s,e)}),s}const zye={createTable:e=>{e.getHeaderGroups=ct(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,o;const a=(s=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],l=(o=i==null?void 0:i.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return iv(t,[...a,...u,...l],e)},dt(e.options,Pr)),e.getCenterHeaderGroups=ct(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),iv(t,n,e,"center")),dt(e.options,Pr)),e.getLeftHeaderGroups=ct(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return iv(t,s,e,"left")},dt(e.options,Pr)),e.getRightHeaderGroups=ct(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return iv(t,s,e,"right")},dt(e.options,Pr)),e.getFooterGroups=ct(()=>[e.getHeaderGroups()],t=>[...t].reverse(),dt(e.options,Pr)),e.getLeftFooterGroups=ct(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),dt(e.options,Pr)),e.getCenterFooterGroups=ct(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),dt(e.options,Pr)),e.getRightFooterGroups=ct(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),dt(e.options,Pr)),e.getFlatHeaders=ct(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Pr)),e.getLeftFlatHeaders=ct(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Pr)),e.getCenterFlatHeaders=ct(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Pr)),e.getRightFlatHeaders=ct(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Pr)),e.getCenterLeafHeaders=ct(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Pr)),e.getLeftLeafHeaders=ct(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Pr)),e.getRightLeafHeaders=ct(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Pr)),e.getLeafHeaders=ct(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,o,a,l,u;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},dt(e.options,Pr))}};function iv(e,t,n,r){var i,s;let o=0;const a=function(f,h){h===void 0&&(h=1),o=Math.max(o,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&a(p.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const p={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(g=>{const v=[...m].reverse()[0],w=g.column.depth===p.depth;let b,_=!1;if(w&&g.column.parent?b=g.column.parent:(b=g.column,_=!0),v&&(v==null?void 0:v.column)===b)v.subHeaders.push(g);else{const x=UN(n,b,{id:[r,h,b.id,g==null?void 0:g.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${m.filter(S=>S.column===b).length}`:void 0,depth:h,index:m.length});x.subHeaders.push(g),m.push(x)}p.headers.push(g),g.headerGroup=p}),l.push(p),h>0&&u(m,h-1)},c=t.map((f,h)=>UN(n,f,{depth:o,index:h}));u(c,o-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,g=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],d(p.subHeaders).forEach(b=>{let{colSpan:_,rowSpan:x}=b;m+=_,v.push(x)})):m=1;const w=Math.min(...v);return g=g+w,p.colSpan=m,p.rowSpan=g,{colSpan:m,rowSpan:g}});return d((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const $ye=(e,t,n,r,i,s,o)=>{let a={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Lye(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:ct(()=>[e.getAllLeafColumns()],l=>l.map(u=>Fye(e,a,u,u.id)),dt(e.options,"debugRows")),_getAllCellsByColumnId:ct(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),dt(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},Hye={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},QU=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};QU.autoRemove=e=>Rs(e);const ZU=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};ZU.autoRemove=e=>Rs(e);const e4=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};e4.autoRemove=e=>Rs(e);const t4=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};t4.autoRemove=e=>Rs(e)||!(e!=null&&e.length);const n4=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});n4.autoRemove=e=>Rs(e)||!(e!=null&&e.length);const r4=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});r4.autoRemove=e=>Rs(e)||!(e!=null&&e.length);const i4=(e,t,n)=>e.getValue(t)===n;i4.autoRemove=e=>Rs(e);const s4=(e,t,n)=>e.getValue(t)==n;s4.autoRemove=e=>Rs(e);const aR=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};aR.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(s>o){const a=s;s=o,o=a}return[s,o]};aR.autoRemove=e=>Rs(e)||Rs(e[0])&&Rs(e[1]);const Yo={includesString:QU,includesStringSensitive:ZU,equalsString:e4,arrIncludes:t4,arrIncludesAll:n4,arrIncludesSome:r4,equals:i4,weakEquals:s4,inNumberRange:aR};function Rs(e){return e==null||e===""}const Vye={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Li("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Yo.includesString:typeof r=="number"?Yo.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Yo.equals:Array.isArray(r)?Yo.arrIncludes:Yo.weakEquals},e.getFilterFn=()=>{var n,r;return K0(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Yo[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r==null?void 0:r.find(c=>c.id===e.id),o=fl(n,s?s.value:void 0);if(WN(i,o,e)){var a;return(a=r==null?void 0:r.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:o};if(s){var u;return(u=r==null?void 0:r.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=fl(t,i))==null?void 0:s.filter(o=>{const a=n.find(l=>l.id===o.id);if(a){const l=a.getFilterFn();if(WN(l,o.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function WN(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const jye=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),Uye=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},Wye=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},qye=(e,t,n)=>{let r,i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}),[r,i]},Gye=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},Kye=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!Nye(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,o)=>s-o);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Yye=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Xye=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Jye=(e,t)=>t.length,XS={sum:jye,min:Uye,max:Wye,extent:qye,mean:Gye,median:Kye,unique:Yye,uniqueCount:Xye,count:Jye},Qye={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Li("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return XS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return XS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return K0(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:XS[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function Zye(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(o=>o.id===s)).filter(Boolean),...r]}const ebe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Li("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ct(n=>[Tp(t,n)],n=>n.findIndex(r=>r.id===e.id),dt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Tp(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Tp(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ct(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const o=[...t],a=[...i];for(;a.length&&o.length;){const l=o.shift(),u=a.findIndex(c=>c.id===l);u>-1&&s.push(a.splice(u,1)[0])}s=[...s,...a]}return Zye(s,n,r)},dt(e.options,"debugTable"))}},JS=()=>({left:[],right:[]}),tbe={getInitialState:e=>({columnPinning:JS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Li("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,o;if(n==="right"){var a,l;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,c;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i==null?void 0:i.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((o=i==null?void 0:i.right)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ct(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(o=>!s.includes(o.column.id))},dt(t.options,"debugRows")),e.getLeftVisibleCells=ct(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),dt(t.options,"debugRows")),e.getRightVisibleCells=ct(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),dt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?JS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:JS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ct(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),dt(e.options,"debugColumns")),e.getRightLeafColumns=ct(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),dt(e.options,"debugColumns")),e.getCenterLeafColumns=ct(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},dt(e.options,"debugColumns"))}},sv={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},QS=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),nbe={getDefaultColumnDef:()=>sv,getInitialState:e=>({columnSizing:{},columnSizingInfo:QS(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Li("columnSizing",e),onColumnSizingInfoChange:Li("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:sv.minSize,(r=s??e.columnDef.size)!=null?r:sv.size),(i=e.columnDef.maxSize)!=null?i:sv.maxSize)},e.getStart=ct(n=>[n,Tp(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),dt(t.options,"debugColumns")),e.getAfter=ct(n=>[n,Tp(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),dt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),ZS(s)&&s.touches&&s.touches.length>1))return;const o=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=ZS(s)?Math.round(s.touches[0].clientX):s.clientX,u={},c=(v,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(b=>{var _,x;const S=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((_=b==null?void 0:b.startOffset)!=null?_:0))*S,P=Math.max(I/((x=b==null?void 0:b.startSize)!=null?x:0),-.999999);return b.columnSizingStart.forEach(R=>{let[O,M]=R;u[O]=Math.round(Math.max(M+M*P,0)*100)/100}),{...b,deltaOffset:I,deltaPercentage:P}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(b=>({...b,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||typeof document<"u"?document:null,p={moveHandler:v=>d(v.clientX),upHandler:v=>{h==null||h.removeEventListener("mousemove",p.moveHandler),h==null||h.removeEventListener("mouseup",p.upHandler),f(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var w;h==null||h.removeEventListener("touchmove",m.moveHandler),h==null||h.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((w=v.touches[0])==null?void 0:w.clientX)}},g=rbe()?{passive:!1}:!1;ZS(s)?(h==null||h.addEventListener("touchmove",m.moveHandler,g),h==null||h.addEventListener("touchend",m.upHandler,g)):(h==null||h.addEventListener("mousemove",p.moveHandler,g),h==null||h.addEventListener("mouseup",p.upHandler,g)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?QS():(n=e.initialState.columnSizingInfo)!=null?n:QS())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let ov=null;function rbe(){if(typeof ov=="boolean")return ov;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return ov=e,ov}function ZS(e){return e.type==="touchstart"}const ibe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Li("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ct(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),dt(t.options,"debugRows")),e.getVisibleCells=ct(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],dt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>ct(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),dt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Tp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const sbe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},obe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Li("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Yo.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return K0(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Yo[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},abe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Li("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const o=s.split(".");r=Math.max(r,o.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{o[a]=!0}):o=r,n=(i=n)!=null?i:!s,!s&&n)return{...o,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=o;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},hT=0,pT=10,ex=()=>({pageIndex:hT,pageSize:pT}),lbe={getInitialState:e=>({...e,pagination:{...ex(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Li("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>fl(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?ex():(i=e.initialState.pagination)!=null?i:ex())},e.setPageIndex=r=>{e.setPagination(i=>{let s=fl(r,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,o)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?hT:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:hT)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?pT:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:pT)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,fl(r,i.pageSize)),o=i.pageSize*i.pageIndex,a=Math.floor(o/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let o=fl(r,(s=e.options.pageCount)!=null?s:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=ct(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,o)=>o)),i},dt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},tx=()=>({top:[],bottom:[]}),ube={getInitialState:e=>({rowPinning:tx(),...e}),getDefaultOptions:e=>({onRowPinningChange:Li("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],o=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...o,e.id,...s]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((c=l==null?void 0:l.bottom)!=null?c:[]).filter(m=>!(a!=null&&a.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:a}=o;return a});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?tx():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:tx())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(o=>{const a=e.getRow(o,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(o=>t.find(a=>a.id===o))).filter(Boolean).map(o=>({...o,position:r}))},e.getTopRows=ct(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),dt(e.options,"debugRows")),e.getBottomRows=ct(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),dt(e.options,"debugRows")),e.getCenterRows=ct(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},dt(e.options,"debugRows"))}},cbe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Li("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{mT(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ct(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?nx(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getFilteredSelectedRowModel=ct(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?nx(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getGroupedSelectedRowModel=ct(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?nx(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return mT(a,e.id,n,(o=r==null?void 0:r.selectChildren)!=null?o:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return lR(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return gT(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return gT(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},mT=(e,t,n,r,i)=>{var s;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=o.subRows)!=null&&s.length&&o.getCanSelectSubRows()&&o.subRows.forEach(a=>mT(e,a.id,n,r,i))};function nx(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(o,a){return o.map(l=>{var u;const c=lR(l,n);if(c&&(r.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:s(l.subRows)}),c)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function lR(e,t){var n;return(n=t[e.id])!=null?n:!1}function gT(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(o=>{if(!(s&&!i)&&(o.getCanSelect()&&(lR(o,t)?s=!0:i=!1),o.subRows&&o.subRows.length)){const a=gT(o,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const vT=/([0-9]+)/gm,dbe=(e,t,n)=>o4(jl(e.getValue(n)).toLowerCase(),jl(t.getValue(n)).toLowerCase()),fbe=(e,t,n)=>o4(jl(e.getValue(n)),jl(t.getValue(n))),hbe=(e,t,n)=>uR(jl(e.getValue(n)).toLowerCase(),jl(t.getValue(n)).toLowerCase()),pbe=(e,t,n)=>uR(jl(e.getValue(n)),jl(t.getValue(n))),mbe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},gbe=(e,t,n)=>uR(e.getValue(n),t.getValue(n));function uR(e,t){return e===t?0:e>t?1:-1}function jl(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function o4(e,t){const n=e.split(vT).filter(Boolean),r=t.split(vT).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),o=parseInt(i,10),a=parseInt(s,10),l=[o,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}return n.length-r.length}const Th={alphanumeric:dbe,alphanumericCaseSensitive:fbe,text:hbe,textCaseSensitive:pbe,datetime:mbe,basic:gbe},vbe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Li("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Th.datetime;if(typeof s=="string"&&(r=!0,s.split(vT).length>1))return Th.alphanumeric}return r?Th.text:Th.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return K0(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Th[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(o=>{const a=o==null?void 0:o.find(h=>h.id===e.id),l=o==null?void 0:o.findIndex(h=>h.id===e.id);let u=[],c,d=s?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&r?a?c="toggle":c="add":o!=null&&o.length&&l!==o.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(s||i||(c="remove")),c==="add"){var f;u=[...o,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=o.map(h=>h.id===e.id?{...h,desc:d}:h):c==="remove"?u=o.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const s=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ybe=[zye,ibe,ebe,tbe,Hye,Vye,sbe,obe,vbe,Qye,abe,lbe,ube,cbe,nbe];function bbe(e){var t,n;const r=[...ybe,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),o=f=>i.options.mergeOptions?i.options.mergeOptions(s,f):{...s,...f};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const u=[];let c=!1;const d={_features:r,options:{...s,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const h=fl(f,i.options);i.options=o(h)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,h,p)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(f,h,p))!=null?m:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!p&&(p=i.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:ct(()=>[i.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,g;return(m=(g=p.renderValue())==null||g.toString==null?void 0:g.toString())!=null?m:null},...i._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},dt(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:ct(()=>[i._getColumnDefs()],f=>{const h=function(p,m,g){return g===void 0&&(g=0),p.map(v=>{const w=Bye(i,v,g,m),b=v;return w.columns=b.columns?h(b.columns,w,g+1):[],w})};return h(f)},dt(e,"debugColumns")),getAllFlatColumns:ct(()=>[i.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),dt(e,"debugColumns")),_getAllFlatColumnsById:ct(()=>[i.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),dt(e,"debugColumns")),getAllLeafColumns:ct(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(m=>m.getLeafColumns());return h(p)},dt(e,"debugColumns")),getColumn:f=>i._getAllFlatColumnsById()[f]};Object.assign(i,d);for(let f=0;f<i._features.length;f++){const h=i._features[f];h==null||h.createTable==null||h.createTable(i)}return i}function a4(){return e=>ct(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,o){s===void 0&&(s=0);const a=[];for(let u=0;u<i.length;u++){const c=$ye(e,e._getRowId(i[u],u,o),i[u],u,s,void 0,o==null?void 0:o.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(i[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,s+1,c))}}return a};return n.rows=r(t),n},dt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function wbe(){return e=>ct(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:l4(n),dt(e.options,"debugTable"))}function l4(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function u4(e){return t=>ct(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:s}=n;let{rows:o,flatRows:a,rowsById:l}=r;const u=i*s,c=u+i;o=o.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:o,flatRows:a,rowsById:l}:d=l4({rows:o,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},dt(t.options,"debugTable"))}/** * vue-table * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function av(){return!0}const _be=Symbol("merge-proxy"),Sbe={get(e,t,n){return t===_be?n:e.get(t)},has(e,t){return e.has(t)},set:av,deleteProperty:av,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:av,deleteProperty:av}},ownKeys(e){return e.keys()}};function rx(e){return"value"in e?e.value:e}function Hh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Proxy({get(r){for(let i=t.length-1;i>=0;i--){const s=rx(t[i])[r];if(s!==void 0)return s}},has(r){for(let i=t.length-1;i>=0;i--)if(r in rx(t[i]))return!0;return!1},keys(){const r=[];for(let i=0;i<t.length;i++)r.push(...Object.keys(rx(t[i])));return[...Array.from(new Set(r))]}},Sbe)}const Ib=ee({props:["render","props"],setup:e=>()=>typeof e.render=="function"||typeof e.render=="object"?We(e.render,e.props):e.render});function qN(e){return Hh(e,{data:y(e.data)})}function c4(e){const t=Jt(e.data),n=Hh({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(s,o){return t?{...s,...o}:Hh(s,o)}},t?qN(e):e),r=bbe(n);if(t){const s=ho(e.data);He(s,()=>{r.setState(o=>({...o,data:s.value}))},{immediate:!0})}const i=U(r.initialState);return Mt(()=>{r.setOptions(s=>{var o;const a=new Proxy({},{get:(l,u)=>i.value[u]});return Hh(s,t?qN(e):e,{state:Hh(a,(o=e.state)!=null?o:{}),onStateChange:l=>{l instanceof Function?i.value=l(i.value):i.value=l,e.onStateChange==null||e.onStateChange(l)}})})}),r}const Ab=ee({__name:"Badge",props:{variant:{},class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)(y(xbe)({variant:n.variant}),t.class))},[ce(n.$slots,"default")],2))}}),xbe=M0("inline-flex items-center rounded-full border border-slate-200 px-1.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 dark:border-slate-800 dark:focus:ring-slate-300",{variants:{variant:{default:"border-transparent bg-slate-900 text-slate-50 hover:bg-slate-900/80 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/80",secondary:"border-transparent bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",destructive:"border-transparent bg-red-500 text-slate-50 hover:bg-red-500/80 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/80",outline:"text-slate-950 dark:text-slate-50"}},defaultVariants:{variant:"default"}}),cR=ee({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(NH),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),GN=ee({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(uO),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),Ebe={id:"radix-css-container"},dR=ee({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Ale),null,{default:H(()=>[A("div",Ebe,[$(y(HH),{class:"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"}),$(y($H),Fe(y(s),{class:y(st)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-slate-200 bg-white 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%] sm:rounded-lg dark:border-slate-800 dark:bg-slate-950",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"])])]),_:3}))}}),d4=ee({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(jH),Fe(y(r),{class:y(st)("text-sm text-slate-500 dark:text-slate-400",t.class)}),{default:H(()=>[ce(i.$slots,"default")]),_:3},16,["class"]))}}),Tbe=ee({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",t.class))},[ce(n.$slots,"default")],2))}}),fR=ee({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)("flex flex-col gap-y-1.5 text-center sm:text-left",t.class))},[ce(n.$slots,"default")],2))}}),hR=ee({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(VH),Fe(y(r),{class:y(st)("text-lg font-semibold leading-none tracking-tight",t.class)}),{default:H(()=>[ce(i.$slots,"default")]),_:3},16,["class"]))}}),kbe=ee({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(Ile),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),Cbe=ee({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(jue),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),Obe=ee({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=ai(e);return(r,i)=>(k(),X(y(Uue),Fe({class:"outline-none"},y(n)),{default:H(()=>[ce(r.$slots,"default")]),_:3},16))}}),Rbe={id:"radix-css-container"},Ibe=ee({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Wue),null,{default:H(()=>[A("div",Rbe,[$(y(que),Fe(y(s),{class:y(st)("z-50 min-w-32 overflow-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md 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-[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 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"])])]),_:3}))}}),lv=ee({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(Gue),Fe(y(r),{class:y(st)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",i.inset&&"pl-8",t.class)}),{default:H(()=>[ce(i.$slots,"default")]),_:3},16,["class"]))}}),Abe=ee({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(Kue),Fe(n.value,{class:y(st)("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800",t.class)}),null,16,["class"]))}}),Wd=ee({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(ede),Fe(y(s),{class:y(st)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-300 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",n.class)}),{default:H(()=>[$(y(tde),{class:Le(y(st)("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"))},null,8,["class"])]),_:1},16,["class"]))}}),Pbe={class:"relative w-full overflow-auto"},Mbe=ee({__name:"Table",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",Pbe,[A("table",{class:Le(y(st)("w-full caption-bottom text-sm",t.class))},[ce(n.$slots,"default")],2)]))}}),Dbe=ee({__name:"TableBody",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("tbody",{class:Le(y(st)("[&_tr:last-child]:border-0",t.class))},[ce(n.$slots,"default")],2))}}),ix=ee({__name:"TableCell",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("td",{class:Le(y(st)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t.class))},[ce(n.$slots,"default")],2))}}),Nbe=ee({__name:"TableHead",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("th",{class:Le(y(st)("h-12 px-4 text-left align-middle font-medium text-slate-500 [&:has([role=checkbox])]:pr-0 dark:text-slate-400",t.class))},[ce(n.$slots,"default")],2))}}),Lbe=ee({__name:"TableHeader",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("thead",{class:Le(y(st)("[&_tr]:border-b",t.class))},[ce(n.$slots,"default")],2))}}),uv=ee({__name:"TableRow",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("tr",{class:Le(y(st)("border-b transition-colors hover:bg-slate-100/50 data-[state=selected]:bg-slate-100 dark:hover:bg-slate-800/50 dark:data-[state=selected]:bg-slate-800",t.class))},[ce(n.$slots,"default")],2))}}),Fbe=M0("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors hover:bg-slate-100 hover:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-slate-100 data-[state=on]:text-slate-900 dark:ring-offset-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-400 dark:focus-visible:ring-slate-300 dark:data-[state=on]:bg-slate-800 dark:data-[state=on]:text-slate-50",{variants:{variant:{default:"bg-transparent",outline:"border border-slate-200 bg-transparent hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:hover:bg-slate-800 dark:hover:text-slate-50"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),f4=ee({__name:"Skeleton",props:{class:{}},setup(e){const t=e;return(n,r)=>(k(),W("div",{class:Le(y(st)("animate-pulse rounded-md bg-slate-100 dark:bg-slate-800",t.class))},null,2))}}),Bbe={class:"border rounded-md"},zbe={class:"flex items-center justify-center py-4 space-x-4"},$be={class:"text-sm text-secondary-500 mr-2"},Hbe=ee({__name:"DataTable",props:{columns:{},data:{},dataCount:{},loading:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},pageSize:{}},emits:["expanded-change","fetch-more","sort-by"],setup(e,{expose:t,emit:n}){const r=e,i=n,s=U({}),o=U({pageIndex:0,pageSize:r.pageSize});He(()=>o.value.pageIndex,()=>{i("fetch-more",o.value.pageIndex)});const a=U([]);He(()=>a.value,()=>{i("sort-by",a.value),o.value.pageIndex=0}),t({pagination:o.value,expanded:s.value,sorting:a});const l=c4({get data(){return r.data},get columns(){return r.columns},getCoreRowModel:a4(),getPaginationRowModel:u4(),onPaginationChange:u=>(l.toggleAllRowsExpanded(!1),pp(u,o)),getExpandedRowModel:wbe(),onExpandedChange:u=>(i("expanded-change"),pp(u,s)),onSortingChange:u=>pp(u,a),manualPagination:!0,manualSorting:!0,rowCount:r.dataCount,state:{get expanded(){return s.value},get pagination(){return o.value},get sorting(){return a.value}}});return(u,c)=>(k(),W("div",null,[A("div",Bbe,[$(y(Mbe),null,{default:H(()=>[$(y(Lbe),null,{default:H(()=>[(k(!0),W(je,null,Ot(y(l).getHeaderGroups(),d=>(k(),X(y(uv),{key:d.id},{default:H(()=>[(k(!0),W(je,null,Ot(d.headers,f=>(k(),X(y(Nbe),{key:f.id},{default:H(()=>[f.isPlaceholder?fe("",!0):(k(),X(y(Ib),{key:0,render:f.column.columnDef.header,props:f.getContext()},null,8,["render","props"]))]),_:2},1024))),128))]),_:2},1024))),128))]),_:1}),$(y(Dbe),null,{default:H(()=>{var d;return[u.loading?(k(!0),W(je,{key:0},Ot(u.pageSize,f=>(k(),W("tr",{key:f},[(k(!0),W(je,null,Ot(u.columns.length,h=>(k(),W("td",{key:h,class:"p-3"},[$(y(f4),{class:"h-5"})]))),128))]))),128)):(d=y(l).getRowModel().rows)!=null&&d.length?(k(!0),W(je,{key:1},Ot(y(l).getRowModel().rows,f=>(k(),W(je,{key:f.id},[$(y(uv),{"data-state":u.selectable&&f.getIsSelected()?"selected":void 0,class:"relative group cursor-pointer hover:bg-secondary-50",onClick:h=>f.toggleExpanded()},{default:H(()=>[(k(!0),W(je,null,Ot(f.getVisibleCells(),h=>(k(),X(y(ix),{key:h.id},{default:H(()=>[$(y(Ib),{render:h.column.columnDef.cell,props:h.getContext()},null,8,["render","props"])]),_:2},1024))),128)),$(y(bfe),{class:"absolute hidden block w-5 right-5 bottom-5 group-hover:block text-secondary-500"})]),_:2},1032,["data-state","onClick"]),$(is,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"-translate-y-1 opacity-100","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"-translate-y-1 opacity-0"},{default:H(()=>[u.expandable&&f.getIsExpanded()?(k(),X(y(uv),{key:0},{default:H(()=>[$(y(ix),{colspan:f.getAllCells().length},{default:H(()=>[$(is,{name:"fade"},{default:H(()=>[ce(u.$slots,"expanded-content",Fe({ref_for:!0},f))]),_:2},1024)]),_:2},1032,["colspan"])]),_:2},1024)):fe("",!0)]),_:2},1024)],64))),128)):(k(),X(y(uv),{key:2},{default:H(()=>[$(y(ix),{colspan:u.columns.length,class:"h-24 text-center text-secondary-500"},{default:H(()=>[Ye(ye(u.$t("messages.noResultsFound")),1)]),_:1},8,["colspan"])]),_:1}))]}),_:3})]),_:3})]),A("div",zbe,[$(y(gt),{variant:"outline",size:"sm",disabled:!y(l).getCanPreviousPage(),onClick:c[0]||(c[0]=d=>y(l).previousPage())},{default:H(()=>[Ye(ye(u.$t("actions.previous")),1)]),_:1},8,["disabled"]),A("div",$be,ye(u.$t("tables.shared.footers.pageNumberAndCount",{pageNumber:o.value.pageIndex+1,pageCount:Math.max(Math.ceil(r.dataCount/r.pageSize),1)})),1),$(y(gt),{variant:"outline",size:"sm",disabled:!y(l).getCanNextPage(),onClick:c[1]||(c[1]=d=>y(l).nextPage())},{default:H(()=>[Ye(ye(u.$t("actions.next")),1)]),_:1},8,["disabled"])])]))}});var cy={exports:{}},Vbe=cy.exports,KN;function jbe(){return KN||(KN=1,function(e,t){(function(n,r){e.exports=r()})(Vbe,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var F=["th","st","nd","rd"],B=j%100;return"["+j+(F[(B-20)%10]||F[B]||F[0])+"]"}},b=function(j,F,B){var Y=String(j);return!Y||Y.length>=F?j:""+Array(F+1-Y.length).join(B)+j},_={s:b,z:function(j){var F=-j.utcOffset(),B=Math.abs(F),Y=Math.floor(B/60),Z=B%60;return(F<=0?"+":"-")+b(Y,2,"0")+":"+b(Z,2,"0")},m:function j(F,B){if(F.date()<B.date())return-j(B,F);var Y=12*(B.year()-F.year())+(B.month()-F.month()),Z=F.clone().add(Y,d),ne=B-Z<0,oe=F.clone().add(Y+(ne?-1:1),d);return+(-(Y+(B-Z)/(ne?Z-oe:oe-Z))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:d,y:h,w:c,d:u,D:p,h:l,m:a,s:o,ms:s,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},x="en",S={};S[x]=w;var I="$isDayjsObject",P=function(j){return j instanceof E||!(!j||!j[I])},R=function j(F,B,Y){var Z;if(!F)return x;if(typeof F=="string"){var ne=F.toLowerCase();S[ne]&&(Z=ne),B&&(S[ne]=B,Z=ne);var oe=F.split("-");if(!Z&&oe.length>1)return j(oe[0])}else{var le=F.name;S[le]=F,Z=le}return!Y&&Z&&(x=Z),Z||!Y&&x},O=function(j,F){if(P(j))return j.clone();var B=typeof F=="object"?F:{};return B.date=j,B.args=arguments,new E(B)},M=_;M.l=R,M.i=P,M.w=function(j,F){return O(j,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var E=function(){function j(B){this.$L=R(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[I]=!0}var F=j.prototype;return F.parse=function(B){this.$d=function(Y){var Z=Y.date,ne=Y.utc;if(Z===null)return new Date(NaN);if(M.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var oe=Z.match(g);if(oe){var le=oe[2]-1||0,Ee=(oe[7]||"0").substring(0,3);return ne?new Date(Date.UTC(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Ee)):new Date(oe[1],le,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Ee)}}return new Date(Z)}(B),this.init()},F.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},F.$utils=function(){return M},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(B,Y){var Z=O(B);return this.startOf(Y)<=Z&&Z<=this.endOf(Y)},F.isAfter=function(B,Y){return O(B)<this.startOf(Y)},F.isBefore=function(B,Y){return this.endOf(Y)<O(B)},F.$g=function(B,Y,Z){return M.u(B)?this[Y]:this.set(Z,B)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(B,Y){var Z=this,ne=!!M.u(Y)||Y,oe=M.p(B),le=function(Te,Ie){var Ae=M.w(Z.$u?Date.UTC(Z.$y,Ie,Te):new Date(Z.$y,Ie,Te),Z);return ne?Ae:Ae.endOf(u)},Ee=function(Te,Ie){return M.w(Z.toDate()[Te].apply(Z.toDate("s"),(ne?[0,0,0,0]:[23,59,59,999]).slice(Ie)),Z)},xe=this.$W,Me=this.$M,Ve=this.$D,Ue="set"+(this.$u?"UTC":"");switch(oe){case h:return ne?le(1,0):le(31,11);case d:return ne?le(1,Me):le(0,Me+1);case c:var me=this.$locale().weekStart||0,_e=(xe<me?xe+7:xe)-me;return le(ne?Ve-_e:Ve+(6-_e),Me);case u:case p:return Ee(Ue+"Hours",0);case l:return Ee(Ue+"Minutes",1);case a:return Ee(Ue+"Seconds",2);case o:return Ee(Ue+"Milliseconds",3);default:return this.clone()}},F.endOf=function(B){return this.startOf(B,!1)},F.$set=function(B,Y){var Z,ne=M.p(B),oe="set"+(this.$u?"UTC":""),le=(Z={},Z[u]=oe+"Date",Z[p]=oe+"Date",Z[d]=oe+"Month",Z[h]=oe+"FullYear",Z[l]=oe+"Hours",Z[a]=oe+"Minutes",Z[o]=oe+"Seconds",Z[s]=oe+"Milliseconds",Z)[ne],Ee=ne===u?this.$D+(Y-this.$W):Y;if(ne===d||ne===h){var xe=this.clone().set(p,1);xe.$d[le](Ee),xe.init(),this.$d=xe.set(p,Math.min(this.$D,xe.daysInMonth())).$d}else le&&this.$d[le](Ee);return this.init(),this},F.set=function(B,Y){return this.clone().$set(B,Y)},F.get=function(B){return this[M.p(B)]()},F.add=function(B,Y){var Z,ne=this;B=Number(B);var oe=M.p(Y),le=function(Me){var Ve=O(ne);return M.w(Ve.date(Ve.date()+Math.round(Me*B)),ne)};if(oe===d)return this.set(d,this.$M+B);if(oe===h)return this.set(h,this.$y+B);if(oe===u)return le(1);if(oe===c)return le(7);var Ee=(Z={},Z[a]=r,Z[l]=i,Z[o]=n,Z)[oe]||1,xe=this.$d.getTime()+B*Ee;return M.w(xe,this)},F.subtract=function(B,Y){return this.add(-1*B,Y)},F.format=function(B){var Y=this,Z=this.$locale();if(!this.isValid())return Z.invalidDate||m;var ne=B||"YYYY-MM-DDTHH:mm:ssZ",oe=M.z(this),le=this.$H,Ee=this.$m,xe=this.$M,Me=Z.weekdays,Ve=Z.months,Ue=Z.meridiem,me=function(Ie,Ae,Q,J){return Ie&&(Ie[Ae]||Ie(Y,ne))||Q[Ae].slice(0,J)},_e=function(Ie){return M.s(le%12||12,Ie,"0")},Te=Ue||function(Ie,Ae,Q){var J=Ie<12?"AM":"PM";return Q?J.toLowerCase():J};return ne.replace(v,function(Ie,Ae){return Ae||function(Q){switch(Q){case"YY":return String(Y.$y).slice(-2);case"YYYY":return M.s(Y.$y,4,"0");case"M":return xe+1;case"MM":return M.s(xe+1,2,"0");case"MMM":return me(Z.monthsShort,xe,Ve,3);case"MMMM":return me(Ve,xe);case"D":return Y.$D;case"DD":return M.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return me(Z.weekdaysMin,Y.$W,Me,2);case"ddd":return me(Z.weekdaysShort,Y.$W,Me,3);case"dddd":return Me[Y.$W];case"H":return String(le);case"HH":return M.s(le,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Te(le,Ee,!0);case"A":return Te(le,Ee,!1);case"m":return String(Ee);case"mm":return M.s(Ee,2,"0");case"s":return String(Y.$s);case"ss":return M.s(Y.$s,2,"0");case"SSS":return M.s(Y.$ms,3,"0");case"Z":return oe}return null}(Ie)||oe.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(B,Y,Z){var ne,oe=this,le=M.p(Y),Ee=O(B),xe=(Ee.utcOffset()-this.utcOffset())*r,Me=this-Ee,Ve=function(){return M.m(oe,Ee)};switch(le){case h:ne=Ve()/12;break;case d:ne=Ve();break;case f:ne=Ve()/3;break;case c:ne=(Me-xe)/6048e5;break;case u:ne=(Me-xe)/864e5;break;case l:ne=Me/i;break;case a:ne=Me/r;break;case o:ne=Me/n;break;default:ne=Me}return Z?ne:M.a(ne)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return S[this.$L]},F.locale=function(B,Y){if(!B)return this.$L;var Z=this.clone(),ne=R(B,Y,!0);return ne&&(Z.$L=ne),Z},F.clone=function(){return M.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},j}(),L=E.prototype;return O.prototype=L,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",d],["$y",h],["$D",p]].forEach(function(j){L[j[1]]=function(F){return this.$g(F,j[0],j[1])}}),O.extend=function(j,F){return j.$i||(j(F,E,O),j.$i=!0),O},O.locale=R,O.isDayjs=P,O.unix=function(j){return O(1e3*j)},O.en=S[x],O.Ls=S,O.p={},O})}(cy)),cy.exports}var Ube=jbe();const h4=e0(Ube);var dy={exports:{}},Wbe=dy.exports,YN;function qbe(){return YN||(YN=1,function(e,t){(function(n,r){e.exports=r()})(Wbe,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,o,a){var l=o.prototype;a.utc=function(m){var g={date:m,utc:!0,args:arguments};return new o(g)},l.utc=function(m){var g=a(this.toDate(),{locale:this.$L,utc:!0});return m?g.add(this.utcOffset(),n):g},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var c=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else c.call(this)};var d=l.utcOffset;l.utcOffset=function(m,g){var v=this.$utils().u;if(v(m))return this.$u?0:v(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(x){x===void 0&&(x="");var S=x.match(r);if(!S)return null;var I=(""+S[0]).match(i)||["-",0,0],P=I[0],R=60*+I[1]+ +I[2];return R===0?0:P==="+"?R:-R}(m),m===null))return this;var w=Math.abs(m)<=16?60*m:m,b=this;if(g)return b.$offset=w,b.$u=m===0,b;if(m!==0){var _=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(w+_,n)).$offset=w,b.$x.$localOffset=_}else b=this.utc();return b};var f=l.format;l.format=function(m){var g=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,g)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var p=l.diff;l.diff=function(m,g,v){if(m&&this.$u===m.$u)return p.call(this,m,g,v);var w=this.local(),b=a(m).local();return p.call(w,b,g,v)}}})}(dy)),dy.exports}var Gbe=qbe();const Kbe=e0(Gbe);h4.extend(Kbe);const p4=e=>{if(e instanceof Date)return e;if(typeof e=="number")return new Date(e);if(typeof e=="string")return new Date(e);if(h4.isDayjs(e))return e.toDate();throw new Error("Invalid date")},Ybe=(e,{precision:t=2,fixed:n=!0,currency:r="USD",locale:i="en-US"}={})=>new Intl.NumberFormat(i,{style:"currency",currency:r,minimumFractionDigits:n?t:0,maximumFractionDigits:t}).format(e/100),Ua=(e,t="en-US")=>p4(e).toLocaleDateString(t,{month:"short",day:"numeric",year:"numeric"}),XN=(e,{precision:t=2,fixed:n=!1,locale:r="en-US"}={})=>isNaN(e)?"0%":new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:n?t:0,maximumFractionDigits:t}).format(e),pR=(e,t="en-US")=>{const n=p4(e),r=Math.round((Date.now()-n.getTime())/1e3),i=60*60,s=i*24,o=new Date().getDate();return r<0||r>=s||o!==n.getDate()?Ua(n,t):r<i?`${Math.floor(r/60)} min ago`:`Today ${n.toLocaleTimeString(t,{hour:"numeric",minute:"numeric"})}`},Xbe=new RegExp(/^.*?(arternal\.com(\/fit-in\/\d+x\d+)?|(www\.inventory\.gallery(\/fit-in\/\d+x\d+)?))/i),Pb=(e,t,n=256,r=256)=>{const s=`${t==null?void 0:t.replace(/\/+$/,"")}/${n}x${r}`;return e.startsWith("http")||e.startsWith("/images")?e.replace(Xbe,s):`${s}/${e}`},cv=[{symbol:"s",in_seconds:1},{symbol:"m",in_seconds:60},{symbol:"h",in_seconds:60*60},{symbol:"d",in_seconds:60*60*24},{symbol:"mo",in_seconds:60*60*24*30},{symbol:"y",in_seconds:60*60*24*365}],mR=e=>{let t=cv[0],n=0;for(;n<cv.length&&e>=cv[n].in_seconds;)t=cv[n],n+=1;const{symbol:r,in_seconds:i}=t;return`${Math.floor(e/i)}${r}`},Es=e=>{switch(e.getIsSorted()){case"asc":e.clearSorting();break;case"desc":e.toggleSorting(!1);break;default:e.toggleSorting(!0)}},qd=e=>{switch(e){case"available":return"bg-success-500";case"hold":return"bg-info-500";case"sold":return"bg-danger-500";case"nfs":return"bg-secondary-300";case"reserved":return"bg-warning-500";case"on consignment":return"bg-info-300";case"to be approved":return"bg-info-300";case"pending hold":return"bg-info-300";case"pending sale":return"bg-warning-500";case"rejected hold":return"bg-warning-500";case"expired hold":return"bg-warning-500";case"rejected":return"bg-warning-500";case"expired":return"bg-warning-500";default:return"bg-secondary-500"}};function m4(e,t){return function(){return e.apply(t,arguments)}}const{toString:Jbe}=Object.prototype,{getPrototypeOf:gR}=Object,Y0=(e=>t=>{const n=Jbe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),js=e=>(e=e.toLowerCase(),t=>Y0(t)===e),X0=e=>t=>typeof t===e,{isArray:oh}=Array,vm=X0("undefined");function Qbe(e){return e!==null&&!vm(e)&&e.constructor!==null&&!vm(e.constructor)&&Di(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g4=js("ArrayBuffer");function Zbe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&g4(e.buffer),t}const ewe=X0("string"),Di=X0("function"),v4=X0("number"),J0=e=>e!==null&&typeof e=="object",twe=e=>e===!0||e===!1,fy=e=>{if(Y0(e)!=="object")return!1;const t=gR(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nwe=js("Date"),rwe=js("File"),iwe=js("Blob"),swe=js("FileList"),owe=e=>J0(e)&&Di(e.pipe),awe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Di(e.append)&&((t=Y0(e))==="formdata"||t==="object"&&Di(e.toString)&&e.toString()==="[object FormData]"))},lwe=js("URLSearchParams"),[uwe,cwe,dwe,fwe]=["ReadableStream","Request","Response","Headers"].map(js),hwe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sg(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oh(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function y4(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const zu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,b4=e=>!vm(e)&&e!==zu;function yT(){const{caseless:e}=b4(this)&&this||{},t={},n=(r,i)=>{const s=e&&y4(t,i)||i;fy(t[s])&&fy(r)?t[s]=yT(t[s],r):fy(r)?t[s]=yT({},r):oh(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&sg(arguments[r],n);return t}const pwe=(e,t,n,{allOwnKeys:r}={})=>(sg(t,(i,s)=>{n&&Di(i)?e[s]=m4(i,n):e[s]=i},{allOwnKeys:r}),e),mwe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gwe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},vwe=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&gR(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ywe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bwe=e=>{if(!e)return null;if(oh(e))return e;let t=e.length;if(!v4(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wwe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gR(Uint8Array)),_we=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},Swe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xwe=js("HTMLFormElement"),Ewe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),JN=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Twe=js("RegExp"),w4=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};sg(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},kwe=e=>{w4(e,(t,n)=>{if(Di(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Di(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Cwe=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return oh(e)?r(e):r(String(e).split(t)),n},Owe=()=>{},Rwe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,sx="abcdefghijklmnopqrstuvwxyz",QN="0123456789",_4={DIGIT:QN,ALPHA:sx,ALPHA_DIGIT:sx+sx.toUpperCase()+QN},Iwe=(e=16,t=_4.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Awe(e){return!!(e&&Di(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Pwe=e=>{const t=new Array(10),n=(r,i)=>{if(J0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=oh(r)?[]:{};return sg(r,(o,a)=>{const l=n(o,i+1);!vm(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},Mwe=js("AsyncFunction"),Dwe=e=>e&&(J0(e)||Di(e))&&Di(e.then)&&Di(e.catch),S4=((e,t)=>e?setImmediate:t?((n,r)=>(zu.addEventListener("message",({source:i,data:s})=>{i===zu&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),zu.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Di(zu.postMessage)),Nwe=typeof queueMicrotask<"u"?queueMicrotask.bind(zu):typeof process<"u"&&process.nextTick||S4,Oe={isArray:oh,isArrayBuffer:g4,isBuffer:Qbe,isFormData:awe,isArrayBufferView:Zbe,isString:ewe,isNumber:v4,isBoolean:twe,isObject:J0,isPlainObject:fy,isReadableStream:uwe,isRequest:cwe,isResponse:dwe,isHeaders:fwe,isUndefined:vm,isDate:nwe,isFile:rwe,isBlob:iwe,isRegExp:Twe,isFunction:Di,isStream:owe,isURLSearchParams:lwe,isTypedArray:wwe,isFileList:swe,forEach:sg,merge:yT,extend:pwe,trim:hwe,stripBOM:mwe,inherits:gwe,toFlatObject:vwe,kindOf:Y0,kindOfTest:js,endsWith:ywe,toArray:bwe,forEachEntry:_we,matchAll:Swe,isHTMLForm:xwe,hasOwnProperty:JN,hasOwnProp:JN,reduceDescriptors:w4,freezeMethods:kwe,toObjectSet:Cwe,toCamelCase:Ewe,noop:Owe,toFiniteNumber:Rwe,findKey:y4,global:zu,isContextDefined:b4,ALPHABET:_4,generateString:Iwe,isSpecCompliantForm:Awe,toJSONObject:Pwe,isAsyncFn:Mwe,isThenable:Dwe,setImmediate:S4,asap:Nwe};function St(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Oe.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Oe.toJSONObject(this.config),code:this.code,status:this.status}}});const x4=St.prototype,E4={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{E4[e]={value:e}});Object.defineProperties(St,E4);Object.defineProperty(x4,"isAxiosError",{value:!0});St.from=(e,t,n,r,i,s)=>{const o=Object.create(x4);return Oe.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),St.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Lwe=null;function bT(e){return Oe.isPlainObject(e)||Oe.isArray(e)}function T4(e){return Oe.endsWith(e,"[]")?e.slice(0,-2):e}function ZN(e,t,n){return e?e.concat(t).map(function(i,s){return i=T4(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Fwe(e){return Oe.isArray(e)&&!e.some(bT)}const Bwe=Oe.toFlatObject(Oe,{},null,function(t){return/^is[A-Z]/.test(t)});function Q0(e,t,n){if(!Oe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!Oe.isUndefined(g[m])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Oe.isSpecCompliantForm(t);if(!Oe.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(Oe.isDate(p))return p.toISOString();if(!l&&Oe.isBlob(p))throw new St("Blob is not supported. Use a Buffer instead.");return Oe.isArrayBuffer(p)||Oe.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,g){let v=p;if(p&&!g&&typeof p=="object"){if(Oe.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(Oe.isArray(p)&&Fwe(p)||(Oe.isFileList(p)||Oe.endsWith(m,"[]"))&&(v=Oe.toArray(p)))return m=T4(m),v.forEach(function(b,_){!(Oe.isUndefined(b)||b===null)&&t.append(o===!0?ZN([m],_,s):o===null?m:m+"[]",u(b))}),!1}return bT(p)?!0:(t.append(ZN(g,m,s),u(p)),!1)}const d=[],f=Object.assign(Bwe,{defaultVisitor:c,convertValue:u,isVisitable:bT});function h(p,m){if(!Oe.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),Oe.forEach(p,function(v,w){(!(Oe.isUndefined(v)||v===null)&&i.call(t,v,Oe.isString(w)?w.trim():w,m,f))===!0&&h(v,m?m.concat(w):[w])}),d.pop()}}if(!Oe.isObject(e))throw new TypeError("data must be an object");return h(e),t}function eL(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vR(e,t){this._pairs=[],e&&Q0(e,this,t)}const k4=vR.prototype;k4.append=function(t,n){this._pairs.push([t,n])};k4.toString=function(t){const n=t?function(r){return t.call(this,r,eL)}:eL;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function zwe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function C4(e,t,n){if(!t)return e;const r=n&&n.encode||zwe;Oe.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=Oe.isURLSearchParams(t)?t.toString():new vR(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class tL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Oe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const O4={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$we=typeof URLSearchParams<"u"?URLSearchParams:vR,Hwe=typeof FormData<"u"?FormData:null,Vwe=typeof Blob<"u"?Blob:null,jwe={isBrowser:!0,classes:{URLSearchParams:$we,FormData:Hwe,Blob:Vwe},protocols:["http","https","file","blob","url","data"]},yR=typeof window<"u"&&typeof document<"u",wT=typeof navigator=="object"&&navigator||void 0,Uwe=yR&&(!wT||["ReactNative","NativeScript","NS"].indexOf(wT.product)<0),Wwe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qwe=yR&&window.location.href||"http://localhost",Gwe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yR,hasStandardBrowserEnv:Uwe,hasStandardBrowserWebWorkerEnv:Wwe,navigator:wT,origin:qwe},Symbol.toStringTag,{value:"Module"})),Br={...Gwe,...jwe};function Kwe(e,t){return Q0(e,new Br.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Br.isNode&&Oe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Ywe(e){return Oe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xwe(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function R4(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&Oe.isArray(i)?i.length:o,l?(Oe.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!Oe.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&Oe.isArray(i[o])&&(i[o]=Xwe(i[o])),!a)}if(Oe.isFormData(e)&&Oe.isFunction(e.entries)){const n={};return Oe.forEachEntry(e,(r,i)=>{t(Ywe(r),i,n,0)}),n}return null}function Jwe(e,t,n){if(Oe.isString(e))try{return(t||JSON.parse)(e),Oe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const og={transitional:O4,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=Oe.isObject(t);if(s&&Oe.isHTMLForm(t)&&(t=new FormData(t)),Oe.isFormData(t))return i?JSON.stringify(R4(t)):t;if(Oe.isArrayBuffer(t)||Oe.isBuffer(t)||Oe.isStream(t)||Oe.isFile(t)||Oe.isBlob(t)||Oe.isReadableStream(t))return t;if(Oe.isArrayBufferView(t))return t.buffer;if(Oe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kwe(t,this.formSerializer).toString();if((a=Oe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Q0(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),Jwe(t)):t}],transformResponse:[function(t){const n=this.transitional||og.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Oe.isResponse(t)||Oe.isReadableStream(t))return t;if(t&&Oe.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?St.from(a,St.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Br.classes.FormData,Blob:Br.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oe.forEach(["delete","get","head","post","put","patch"],e=>{og.headers[e]={}});const Qwe=Oe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zwe=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&Qwe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},nL=Symbol("internals");function kh(e){return e&&String(e).trim().toLowerCase()}function hy(e){return e===!1||e==null?e:Oe.isArray(e)?e.map(hy):String(e)}function e0e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const t0e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ox(e,t,n,r,i){if(Oe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Oe.isString(t)){if(Oe.isString(r))return t.indexOf(r)!==-1;if(Oe.isRegExp(r))return r.test(t)}}function n0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function r0e(e,t){const n=Oe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}class bi{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=kh(l);if(!c)throw new Error("header name must be a non-empty string");const d=Oe.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=hy(a))}const o=(a,l)=>Oe.forEach(a,(u,c)=>s(u,c,l));if(Oe.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Oe.isString(t)&&(t=t.trim())&&!t0e(t))o(Zwe(t),n);else if(Oe.isHeaders(t))for(const[a,l]of t.entries())s(l,a,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=kh(t),t){const r=Oe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return e0e(i);if(Oe.isFunction(n))return n.call(this,i,r);if(Oe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=kh(t),t){const r=Oe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ox(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=kh(o),o){const a=Oe.findKey(r,o);a&&(!n||ox(r,r[a],a,n))&&(delete r[a],i=!0)}}return Oe.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||ox(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return Oe.forEach(this,(i,s)=>{const o=Oe.findKey(r,s);if(o){n[o]=hy(i),delete n[s];return}const a=t?n0e(s):String(s).trim();a!==s&&delete n[s],n[a]=hy(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Oe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Oe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[nL]=this[nL]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=kh(o);r[a]||(r0e(i,o),r[a]=!0)}return Oe.isArray(t)?t.forEach(s):s(t),this}}bi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Oe.reduceDescriptors(bi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Oe.freezeMethods(bi);function ax(e,t){const n=this||og,r=t||n,i=bi.from(r.headers);let s=r.data;return Oe.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function I4(e){return!!(e&&e.__CANCEL__)}function ah(e,t,n){St.call(this,e??"canceled",St.ERR_CANCELED,t,n),this.name="CanceledError"}Oe.inherits(ah,St,{__CANCEL__:!0});function A4(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new St("Request failed with status code "+n.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function i0e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function s0e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function o0e(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Mb=(e,t,n=3)=>{let r=0;const i=s0e(50,250);return o0e(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},rL=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},iL=e=>(...t)=>Oe.asap(()=>e(...t)),a0e=Br.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Br.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Br.origin),Br.navigator&&/(msie|trident)/i.test(Br.navigator.userAgent)):()=>!0,l0e=Br.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];Oe.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Oe.isString(r)&&o.push("path="+r),Oe.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function u0e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function c0e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function P4(e,t){return e&&!u0e(t)?c0e(e,t):t}const sL=e=>e instanceof bi?{...e}:e;function xc(e,t){t=t||{};const n={};function r(u,c,d,f){return Oe.isPlainObject(u)&&Oe.isPlainObject(c)?Oe.merge.call({caseless:f},u,c):Oe.isPlainObject(c)?Oe.merge({},c):Oe.isArray(c)?c.slice():c}function i(u,c,d,f){if(Oe.isUndefined(c)){if(!Oe.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function s(u,c){if(!Oe.isUndefined(c))return r(void 0,c)}function o(u,c){if(Oe.isUndefined(c)){if(!Oe.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>i(sL(u),sL(c),d,!0)};return Oe.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);Oe.isUndefined(f)&&d!==a||(n[c]=f)}),n}const M4=e=>{const t=xc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=bi.from(o),t.url=C4(P4(t.baseURL,t.url),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(Oe.isFormData(n)){if(Br.hasStandardBrowserEnv||Br.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Br.hasStandardBrowserEnv&&(r&&Oe.isFunction(r)&&(r=r(t)),r||r!==!1&&a0e(t.url))){const u=i&&s&&l0e.read(s);u&&o.set(i,u)}return t},d0e=typeof XMLHttpRequest<"u",f0e=d0e&&function(e){return new Promise(function(n,r){const i=M4(e);let s=i.data;const o=bi.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,p;function m(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function v(){if(!g)return;const b=bi.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:b,config:e,request:g};A4(function(I){n(I),m()},function(I){r(I),m()},x),g=null}"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(v)},g.onabort=function(){g&&(r(new St("Request aborted",St.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new St("Network Error",St.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||O4;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),r(new St(_,x.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,e,g)),g=null},s===void 0&&o.setContentType(null),"setRequestHeader"in g&&Oe.forEach(o.toJSON(),function(_,x){g.setRequestHeader(x,_)}),Oe.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),a&&a!=="json"&&(g.responseType=i.responseType),u&&([f,p]=Mb(u,!0),g.addEventListener("progress",f)),l&&g.upload&&([d,h]=Mb(l),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=b=>{g&&(r(!b||b.type?new ah(null,e,g):b),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=i0e(i.url);if(w&&Br.protocols.indexOf(w)===-1){r(new St("Unsupported protocol "+w+":",St.ERR_BAD_REQUEST,e));return}g.send(s||null)})},h0e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof St?c:new ah(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new St(`timeout ${t} of ms exceeded`,St.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>Oe.asap(a),l}},p0e=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},m0e=async function*(e,t){for await(const n of g0e(e))yield*p0e(n,t)},g0e=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},oL=(e,t,n,r)=>{const i=m0e(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Z0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",D4=Z0&&typeof ReadableStream=="function",v0e=Z0&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),N4=(e,...t)=>{try{return!!e(...t)}catch{return!1}},y0e=D4&&N4(()=>{let e=!1;const t=new Request(Br.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),aL=64*1024,_T=D4&&N4(()=>Oe.isReadableStream(new Response("").body)),Db={stream:_T&&(e=>e.body)};Z0&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Db[t]&&(Db[t]=Oe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new St(`Response type '${t}' is not supported`,St.ERR_NOT_SUPPORT,r)})})})(new Response);const b0e=async e=>{if(e==null)return 0;if(Oe.isBlob(e))return e.size;if(Oe.isSpecCompliantForm(e))return(await new Request(Br.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Oe.isArrayBufferView(e)||Oe.isArrayBuffer(e))return e.byteLength;if(Oe.isURLSearchParams(e)&&(e=e+""),Oe.isString(e))return(await v0e(e)).byteLength},w0e=async(e,t)=>{const n=Oe.toFiniteNumber(e.getContentLength());return n??b0e(t)},_0e=Z0&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=M4(e);u=u?(u+"").toLowerCase():"text";let h=h0e([i,s&&s.toAbortSignal()],o),p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&y0e&&n!=="get"&&n!=="head"&&(g=await w0e(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(Oe.isFormData(r)&&(S=x.headers.get("content-type"))&&c.setContentType(S),x.body){const[I,P]=rL(g,Mb(iL(l)));r=oL(x.body,aL,I,P)}}Oe.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let w=await fetch(p);const b=_T&&(u==="stream"||u==="response");if(_T&&(a||b&&m)){const x={};["status","statusText","headers"].forEach(R=>{x[R]=w[R]});const S=Oe.toFiniteNumber(w.headers.get("content-length")),[I,P]=a&&rL(S,Mb(iL(a),!0))||[];w=new Response(oL(w.body,aL,I,()=>{P&&P(),m&&m()}),x)}u=u||"text";let _=await Db[Oe.findKey(Db,u)||"text"](w,e);return!b&&m&&m(),await new Promise((x,S)=>{A4(x,S,{data:_,headers:bi.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,e,p),{cause:v.cause||v}):St.from(v,v&&v.code,e,p)}}),ST={http:Lwe,xhr:f0e,fetch:_0e};Oe.forEach(ST,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const lL=e=>`- ${e}`,S0e=e=>Oe.isFunction(e)||e===null||e===!1,L4={getAdapter:e=>{e=Oe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!S0e(n)&&(r=ST[(o=String(n)).toLowerCase()],r===void 0))throw new St(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since : `+s.map(lL).join(` `):" "+lL(s[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ST};function lx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ah(null,e)}function uL(e){return lx(e),e.headers=bi.from(e.headers),e.data=ax.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),L4.getAdapter(e.adapter||og.adapter)(e).then(function(r){return lx(e),r.data=ax.call(e,e.transformResponse,r),r.headers=bi.from(r.headers),r},function(r){return I4(r)||(lx(e),r&&r.response&&(r.response.data=ax.call(e,e.transformResponse,r.response),r.response.headers=bi.from(r.response.headers))),Promise.reject(r)})}const F4="1.7.9",e_={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e_[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const cL={};e_.transitional=function(t,n,r){function i(s,o){return"[Axios v"+F4+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new St(i(o," has been removed"+(n?" in "+n:"")),St.ERR_DEPRECATED);return n&&!cL[o]&&(cL[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};e_.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function x0e(e,t,n){if(typeof e!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new St("option "+s+" must be "+l,St.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new St("Unknown option "+s,St.ERR_BAD_OPTION)}}const py={assertOptions:x0e,validators:e_},Gs=py.validators;class tc{constructor(t){this.defaults=t,this.interceptors={request:new tL,response:new tL}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&py.assertOptions(r,{silentJSONParsing:Gs.transitional(Gs.boolean),forcedJSONParsing:Gs.transitional(Gs.boolean),clarifyTimeoutError:Gs.transitional(Gs.boolean)},!1),i!=null&&(Oe.isFunction(i)?n.paramsSerializer={serialize:i}:py.assertOptions(i,{encode:Gs.function,serialize:Gs.function},!0)),py.assertOptions(n,{baseUrl:Gs.spelling("baseURL"),withXsrfToken:Gs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&Oe.merge(s.common,s[n.method]);s&&Oe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=bi.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const p=[uL.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=a.length;let h=n;for(d=0;d<f;){const p=a[d++],m=a[d++];try{h=p(h)}catch(g){m.call(this,g);break}}try{c=uL.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=xc(this.defaults,t);const n=P4(t.baseURL,t.url);return C4(n,t.params,t.paramsSerializer)}}Oe.forEach(["delete","get","head","options"],function(t){tc.prototype[t]=function(n,r){return this.request(xc(r||{},{method:t,url:n,data:(r||{}).data}))}});Oe.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(xc(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}tc.prototype[t]=n(),tc.prototype[t+"Form"]=n(!0)});class bR{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new ah(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new bR(function(i){t=i}),cancel:t}}}function E0e(e){return function(n){return e.apply(null,n)}}function T0e(e){return Oe.isObject(e)&&e.isAxiosError===!0}const xT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xT).forEach(([e,t])=>{xT[t]=e});function B4(e){const t=new tc(e),n=m4(tc.prototype.request,t);return Oe.extend(n,tc.prototype,t,{allOwnKeys:!0}),Oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return B4(xc(e,i))},n}const Rn=B4(og);Rn.Axios=tc;Rn.CanceledError=ah;Rn.CancelToken=bR;Rn.isCancel=I4;Rn.VERSION=F4;Rn.toFormData=Q0;Rn.AxiosError=St;Rn.Cancel=Rn.CanceledError;Rn.all=function(t){return Promise.all(t)};Rn.spread=E0e;Rn.isAxiosError=T0e;Rn.mergeConfig=xc;Rn.AxiosHeaders=bi;Rn.formToJSON=e=>R4(Oe.isHTMLForm(e)?new FormData(e):e);Rn.getAdapter=L4.getAdapter;Rn.HttpStatusCode=xT;Rn.default=Rn;const k0e=Rn.create({baseURL:"https://api.arternal.com",timeout:3e4});async function C0e(e,t){try{const r={Authorization:`Bearer ${await hU()}`},i=await k0e.get("/s3-upload",{params:{path:t},headers:r});if(i.data){const{url:s}=i.data;await Rn.put(s,e,{headers:{"Content-Type":e.type}})}i.status===200?console.log("File uploaded successfully!"):console.error("Failed to upload the file.")}catch(n){console.error("Error uploading file",n)}}const z4=ee({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(Cde),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),O0e={id:"radix-css-container"},$4=ee({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Ade),null,{default:H(()=>[A("div",O0e,[$(y(Ide),Fe({...y(s),...o.$attrs},{class:y(st)("z-50 overflow-hidden rounded-md border border-slate-200 bg-white px-3 py-1.5 text-sm text-slate-950 shadow-md 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 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"])])]),_:3}))}}),H4=ee({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,r)=>(k(),X(y(Tde),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),V4=ee({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(Ode),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}});function j4(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M15.22 6.268a.75.75 0 0 1 .968-.431l5.942 2.28a.75.75 0 0 1 .431.97l-2.28 5.94a.75.75 0 1 1-1.4-.537l1.63-4.251-1.086.484a11.2 11.2 0 0 0-5.45 5.173.75.75 0 0 1-1.199.19L9 12.312l-6.22 6.22a.75.75 0 0 1-1.06-1.061l6.75-6.75a.75.75 0 0 1 1.06 0l3.606 3.606a12.695 12.695 0 0 1 5.68-4.974l1.086-.483-4.251-1.632a.75.75 0 0 1-.432-.97Z","clip-rule":"evenodd"})])}function R0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z","clip-rule":"evenodd"})])}function I0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M10.5 3.75a6 6 0 0 0-5.98 6.496A5.25 5.25 0 0 0 6.75 20.25H18a4.5 4.5 0 0 0 2.206-8.423 3.75 3.75 0 0 0-4.133-4.303A6.001 6.001 0 0 0 10.5 3.75Zm2.03 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v4.94a.75.75 0 0 0 1.5 0v-4.94l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z","clip-rule":"evenodd"})])}function A0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M2.25 5.25a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3V15a3 3 0 0 1-3 3h-3v.257c0 .597.237 1.17.659 1.591l.621.622a.75.75 0 0 1-.53 1.28h-9a.75.75 0 0 1-.53-1.28l.621-.622a2.25 2.25 0 0 0 .659-1.59V18h-3a3 3 0 0 1-3-3V5.25Zm1.5 0v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5Z","clip-rule":"evenodd"})])}function P0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M12 1.5a.75.75 0 0 1 .75.75V4.5a.75.75 0 0 1-1.5 0V2.25A.75.75 0 0 1 12 1.5ZM5.636 4.136a.75.75 0 0 1 1.06 0l1.592 1.591a.75.75 0 0 1-1.061 1.06l-1.591-1.59a.75.75 0 0 1 0-1.061Zm12.728 0a.75.75 0 0 1 0 1.06l-1.591 1.592a.75.75 0 0 1-1.06-1.061l1.59-1.591a.75.75 0 0 1 1.061 0Zm-6.816 4.496a.75.75 0 0 1 .82.311l5.228 7.917a.75.75 0 0 1-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 0 1-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 0 1-1.247-.606l.569-9.47a.75.75 0 0 1 .554-.68ZM3 10.5a.75.75 0 0 1 .75-.75H6a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 10.5Zm14.25 0a.75.75 0 0 1 .75-.75h2.25a.75.75 0 0 1 0 1.5H18a.75.75 0 0 1-.75-.75Zm-8.962 3.712a.75.75 0 0 1 0 1.061l-1.591 1.591a.75.75 0 1 1-1.061-1.06l1.591-1.592a.75.75 0 0 1 1.06 0Z","clip-rule":"evenodd"})])}function M0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{d:"M10.5 18.75a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 0-1.5h-3Z"}),A("path",{"fill-rule":"evenodd",d:"M8.625.75A3.375 3.375 0 0 0 5.25 4.125v15.75a3.375 3.375 0 0 0 3.375 3.375h6.75a3.375 3.375 0 0 0 3.375-3.375V4.125A3.375 3.375 0 0 0 15.375.75h-6.75ZM7.5 4.125C7.5 3.504 8.004 3 8.625 3H9.75v.375c0 .621.504 1.125 1.125 1.125h2.25c.621 0 1.125-.504 1.125-1.125V3h1.125c.621 0 1.125.504 1.125 1.125v15.75c0 .621-.504 1.125-1.125 1.125h-6.75A1.125 1.125 0 0 1 7.5 19.875V4.125Z","clip-rule":"evenodd"})])}function D0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M10.5 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z","clip-rule":"evenodd"})])}function N0e(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z","clip-rule":"evenodd"})])}function U4(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z","clip-rule":"evenodd"})])}function W4(e,t){return k(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[A("path",{"fill-rule":"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}const q4=ee({__name:"DisabledBadge",props:{badgeClass:{default:""}},emits:["reenable"],setup(e,{emit:t}){const n=t,r=i=>{i.stopPropagation(),console.log("reenable"),n("reenable")};return(i,s)=>(k(),X(y(H4),null,{default:H(()=>[$(y(z4),null,{default:H(()=>[$(y(V4),null,{default:H(()=>[$(y(gt),{variant:"outline",class:Le(["border-warning-500 text-warning-500 text-xs hover:text-warning-500 flex items-center gap-1",i.badgeClass]),size:"xs",onClick:r},{default:H(()=>[$(y(U4),{class:"w-4"}),Ye(" "+ye(i.$t("messages.disabled")),1)]),_:1},8,["class"])]),_:1}),$(y($4),{class:"bg-black text-white border-black"},{default:H(()=>[Ye(ye(i.$t("actions.reenableLink")),1)]),_:1})]),_:1})]),_:1}))}});function wR(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ag(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return wR(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=ag();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}var dL;let L0e=Symbol("headlessui.useid"),F0e=0;const lh=(dL=RB)!=null?dL:function(){return Lt(L0e,()=>`${++F0e}`)()};function Nt(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function Fs(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Fs),r}var B0e=Object.defineProperty,z0e=(e,t,n)=>t in e?B0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fL=(e,t,n)=>(z0e(e,typeof t!="symbol"?t+"":t,n),n);let $0e=class{constructor(){fL(this,"current",this.detect()),fL(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},lg=new $0e;function uu(e){if(lg.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=Nt(e);if(t)return t.ownerDocument}return document}let ET=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var oo=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(oo||{}),G4=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(G4||{}),H0e=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(H0e||{});function K4(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ET)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var _R=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(_R||{});function SR(e,t=0){var n;return e===((n=uu(e))==null?void 0:n.body)?!1:Fs(t,{0(){return e.matches(ET)},1(){let r=e;for(;r!==null;){if(r.matches(ET))return!0;r=r.parentElement}return!1}})}function V0e(e){let t=uu(e);vt(()=>{t&&!SR(t.activeElement,0)&&xl(e)})}var j0e=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(j0e||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function xl(e){e==null||e.focus({preventScroll:!0})}let U0e=["textarea","input"].join(",");function W0e(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,U0e))!=null?n:!1}function Y4(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function q0e(e,t){return kp(K4(),t,{relativeTo:e})}function kp(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){var s;let o=(s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?s:document,a=Array.isArray(e)?n?Y4(e):e:K4(e);i.length>0&&a.length>1&&(a=a.filter(p=>!i.includes(p))),r=r??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},d=0,f=a.length,h;do{if(d>=f||d+f<=0)return 0;let p=u+d;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=a[p],h==null||h.focus(c),d+=l}while(h!==o.activeElement);return t&6&&W0e(h)&&h.select(),2}function X4(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function G0e(){return/Android/gi.test(window.navigator.userAgent)}function K0e(){return X4()||G0e()}function dv(e,t,n){lg.isServer||Mt(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function J4(e,t,n){lg.isServer||Mt(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Q4(e,t,n=te(()=>!0)){function r(s,o){if(!n.value||s.defaultPrevented)return;let a=o(s);if(a===null||!a.getRootNode().contains(a))return;let l=function u(c){return typeof c=="function"?u(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e);for(let u of l){if(u===null)continue;let c=u instanceof HTMLElement?u:Nt(u);if(c!=null&&c.contains(a)||s.composed&&s.composedPath().includes(c))return}return!SR(a,_R.Loose)&&a.tabIndex!==-1&&s.preventDefault(),t(s,a)}let i=U(null);dv("pointerdown",s=>{var o,a;n.value&&(i.value=((a=(o=s.composedPath)==null?void 0:o.call(s))==null?void 0:a[0])||s.target)},!0),dv("mousedown",s=>{var o,a;n.value&&(i.value=((a=(o=s.composedPath)==null?void 0:o.call(s))==null?void 0:a[0])||s.target)},!0),dv("click",s=>{K0e()||i.value&&(r(s,()=>i.value),i.value=null)},!0),dv("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),J4("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function hL(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Y0e(e,t){let n=U(hL(e.value.type,e.value.as));return nt(()=>{n.value=hL(e.value.type,e.value.as)}),Mt(()=>{var r;n.value||Nt(t)&&Nt(t)instanceof HTMLButtonElement&&!((r=Nt(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}function X0e({container:e,accept:t,walk:n,enabled:r}){Mt(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let s=uu(e);if(!s)return;let o=Object.assign(l=>t(l),{acceptNode:t}),a=s.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,o,!1);for(;a.nextNode();)n(a.currentNode)})}var Ef=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ef||{}),hl=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(hl||{});function zi({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var s;let o=eW(r,n),a=Object.assign(i,{props:o});if(e||t&2&&o.static)return ux(a);if(t&1){let l=(s=o.unmount)==null||s?0:1;return Fs(l,{0(){return null},1(){return ux({...i,props:{...o,hidden:!0,style:{display:"none"}}})}})}return ux(a)}function ux({props:e,attrs:t,slots:n,slot:r,name:i}){var s,o;let{as:a,...l}=tW(e,["unmount","static"]),u=(s=n.default)==null?void 0:s.call(n,r),c={};if(r){let d=!1,f=[];for(let[h,p]of Object.entries(r))typeof p=="boolean"&&(d=!0),p===!0&&f.push(h);d&&(c["data-headlessui-state"]=f.join(" "))}if(a==="template"){if(u=Z4(u??[]),Object.keys(l).length>0||Object.keys(t).length>0){let[d,...f]=u??[];if(!J0e(d)||f.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).map(m=>m.trim()).filter((m,g,v)=>v.indexOf(m)===g).sort((m,g)=>m.localeCompare(g)).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` `));let h=eW((o=d.props)!=null?o:{},l,c),p=yo(d,h,!0);for(let m in h)m.startsWith("on")&&(p.props||(p.props={}),p.props[m]=h[m]);return p}return Array.isArray(u)&&u.length===1?u[0]:u}return We(a,Object.assign({},l,c),{default:()=>u})}function Z4(e){return e.flatMap(t=>t.type===je?Z4(t.children):[t])}function eW(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if(i instanceof Event&&i.defaultPrevented)return;a(i,...s)}}});return t}function tW(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function J0e(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Nb=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Nb||{});let TT=ee({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var r;let{features:i,...s}=e,o={"aria-hidden":(i&2)===2?!0:(r=s["aria-hidden"])!=null?r:void 0,hidden:(i&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(i&4)===4&&(i&2)!==2&&{display:"none"}}};return zi({ourProps:o,theirProps:s,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),nW=Symbol("Context");var Er=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Er||{});function Q0e(){return t_()!==null}function t_(){return Lt(nW,null)}function rW(e){Yn(nW,e)}var ur=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ur||{});function Z0e(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ru=[];Z0e(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ru[0]!==t.target&&(Ru.unshift(t.target),Ru=Ru.filter(n=>n!=null&&n.isConnected),Ru.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function e_e(e){throw new Error("Unexpected object: "+e)}var ia=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ia||{});function t_e(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{i===-1&&(i=n.length);for(let s=i-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=i+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:e_e(e)}}function iW(e,t,n,r){lg.isServer||Mt(i=>{e=e??window,e.addEventListener(t,n,r),i(()=>e.removeEventListener(t,n,r))})}var Vh=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Vh||{});function n_e(){let e=U(0);return J4("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function sW(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let r=Nt(n);r instanceof HTMLElement&&t.add(r)}return t}var oW=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(oW||{});let Ch=Object.assign(ee({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:U(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=U(null);r({el:i,$el:i});let s=te(()=>uu(i)),o=U(!1);nt(()=>o.value=!0),On(()=>o.value=!1),i_e({ownerDocument:s},te(()=>o.value&&!!(e.features&16)));let a=s_e({ownerDocument:s,container:i,initialFocus:te(()=>e.initialFocus)},te(()=>o.value&&!!(e.features&2)));o_e({ownerDocument:s,container:i,containers:e.containers,previousActiveElement:a},te(()=>o.value&&!!(e.features&8)));let l=n_e();function u(h){let p=Nt(i);p&&(m=>m())(()=>{Fs(l.value,{[Vh.Forwards]:()=>{kp(p,oo.First,{skipElements:[h.relatedTarget]})},[Vh.Backwards]:()=>{kp(p,oo.Last,{skipElements:[h.relatedTarget]})}})})}let c=U(!1);function d(h){h.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function f(h){if(!o.value)return;let p=sW(e.containers);Nt(i)instanceof HTMLElement&&p.add(Nt(i));let m=h.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(aW(p,m)||(c.value?kp(Nt(i),Fs(l.value,{[Vh.Forwards]:()=>oo.Next,[Vh.Backwards]:()=>oo.Previous})|oo.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&xl(h.target)))}return()=>{let h={},p={ref:i,onKeydown:d,onFocusout:f},{features:m,initialFocus:g,containers:v,...w}=e;return We(je,[!!(m&4)&&We(TT,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:Nb.Focusable}),zi({ourProps:p,theirProps:{...t,...w},slot:h,attrs:t,slots:n,name:"FocusTrap"}),!!(m&4)&&We(TT,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:Nb.Focusable})])}}}),{features:oW});function r_e(e){let t=U(Ru.slice());return He([e],([n],[r])=>{r===!0&&n===!1?wR(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Ru.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(r=>r!=null&&r.isConnected))!=null?n:null}}function i_e({ownerDocument:e},t){let n=r_e(t);nt(()=>{Mt(()=>{var r,i;t.value||((r=e.value)==null?void 0:r.activeElement)===((i=e.value)==null?void 0:i.body)&&xl(n())},{flush:"post"})}),On(()=>{t.value&&xl(n())})}function s_e({ownerDocument:e,container:t,initialFocus:n},r){let i=U(null),s=U(!1);return nt(()=>s.value=!0),On(()=>s.value=!1),nt(()=>{He([t,n,r],(o,a)=>{if(o.every((u,c)=>(a==null?void 0:a[c])===u)||!r.value)return;let l=Nt(t);l&&wR(()=>{var u,c;if(!s.value)return;let d=Nt(n),f=(u=e.value)==null?void 0:u.activeElement;if(d){if(d===f){i.value=f;return}}else if(l.contains(f)){i.value=f;return}d?xl(d):kp(l,oo.First|oo.NoScroll)===G4.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.value=(c=e.value)==null?void 0:c.activeElement})},{immediate:!0,flush:"post"})}),i}function o_e({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){var s;iW((s=e.value)==null?void 0:s.defaultView,"focus",o=>{if(!i.value)return;let a=sW(n);Nt(t)instanceof HTMLElement&&a.add(Nt(t));let l=r.value;if(!l)return;let u=o.target;u&&u instanceof HTMLElement?aW(a,u)?(r.value=u,xl(u)):(o.preventDefault(),o.stopPropagation(),xl(l)):xl(r.value)},!0)}function aW(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function a_e(e){let t=ho(e.getSnapshot());return On(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function l_e(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...s){let o=t[i].call(n,...s);o&&(n=o,r.forEach(a=>a()))}}}function u_e(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,s=e-i;n.style(r,"paddingRight",`${s}px`)}}}function c_e(){return X4()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(s=>s()).some(s=>s.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=ag();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=e.querySelector(u);c&&!r(c)&&(o=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let l=a.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function d_e(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function f_e(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let $u=l_e(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ag(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:f_e(n)},i=[c_e(),u_e(),d_e()];i.forEach(({before:s})=>s==null?void 0:s(r)),i.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});$u.subscribe(()=>{let e=$u.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&$u.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&$u.dispatch("TEARDOWN",n)}});function h_e(e,t,n){let r=a_e($u),i=te(()=>{let s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return He([e,t],([s,o],[a],l)=>{if(!s||!o)return;$u.dispatch("PUSH",s,n);let u=!1;l(()=>{u||($u.dispatch("POP",a??s,n),u=!0)})},{immediate:!0}),i}let cx=new Map,Oh=new Map;function pL(e,t=U(!0)){Mt(n=>{var r;if(!t.value)return;let i=Nt(e);if(!i)return;n(function(){var o;if(!i)return;let a=(o=Oh.get(i))!=null?o:1;if(a===1?Oh.delete(i):Oh.set(i,a-1),a!==1)return;let l=cx.get(i);l&&(l["aria-hidden"]===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",l["aria-hidden"]),i.inert=l.inert,cx.delete(i))});let s=(r=Oh.get(i))!=null?r:0;Oh.set(i,s+1),s===0&&(cx.set(i,{"aria-hidden":i.getAttribute("aria-hidden"),inert:i.inert}),i.setAttribute("aria-hidden","true"),i.inert=!0)})}function p_e({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let r=U(null),i=uu(r);function s(){var o,a,l;let u=[];for(let c of e)c!==null&&(c instanceof HTMLElement?u.push(c):"value"in c&&c.value instanceof HTMLElement&&u.push(c.value));if(t!=null&&t.value)for(let c of t.value)u.push(c);for(let c of(o=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?o:[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="headlessui-portal-root"&&(c.contains(Nt(r))||c.contains((l=(a=Nt(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||u.some(d=>c.contains(d))||u.push(c));return u}return{resolveContainers:s,contains(o){return s().some(a=>a.contains(o))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:We(TT,{features:Nb.Hidden,ref:r})}}}let lW=Symbol("ForcePortalRootContext");function m_e(){return Lt(lW,!1)}let mL=ee({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return Yn(lW,e.force),()=>{let{force:r,...i}=e;return zi({theirProps:i,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),uW=Symbol("StackContext");var kT=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(kT||{});function g_e(){return Lt(uW,()=>{})}function v_e({type:e,enabled:t,element:n,onUpdate:r}){let i=g_e();function s(...o){r==null||r(...o),i(...o)}nt(()=>{He(t,(o,a)=>{o?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),On(()=>{t.value&&s(1,e,n)}),Yn(uW,s)}let y_e=Symbol("DescriptionContext");function b_e({slot:e=U({}),name:t="Description",props:n={}}={}){let r=U([]);function i(s){return r.value.push(s),()=>{let o=r.value.indexOf(s);o!==-1&&r.value.splice(o,1)}}return Yn(y_e,{register:i,slot:e,name:t,props:n}),te(()=>r.value.length>0?r.value.join(" "):void 0)}function w_e(e){let t=uu(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}const CT=new WeakMap;function __e(e){var t;return(t=CT.get(e))!=null?t:0}function gL(e,t){let n=t(__e(e));return n<=0?CT.delete(e):CT.set(e,n),n}let S_e=ee({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=U(null),i=te(()=>uu(r)),s=m_e(),o=Lt(cW,null),a=U(s===!0||o==null?w_e(r.value):o.resolveTarget());a.value&&gL(a.value,f=>f+1);let l=U(!1);nt(()=>{l.value=!0}),Mt(()=>{s||o!=null&&(a.value=o.resolveTarget())});let u=Lt(OT,null),c=!1,d=Jn();return He(r,()=>{if(c||!u)return;let f=Nt(r);f&&(On(u.register(f),d),c=!0)}),On(()=>{var f,h;let p=(f=i.value)==null?void 0:f.getElementById("headlessui-portal-root");!p||a.value!==p||gL(a.value,m=>m-1)||a.value.children.length>0||(h=a.value.parentElement)==null||h.removeChild(a.value)}),()=>{if(!l.value||a.value===null)return null;let f={ref:r,"data-headlessui-portal":""};return We(Ff,{to:a.value},zi({ourProps:f,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),OT=Symbol("PortalParentContext");function x_e(){let e=Lt(OT,null),t=U([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){let o=t.value.indexOf(s);o!==-1&&t.value.splice(o,1),e&&e.unregister(s)}let i={register:n,unregister:r,portals:t};return[t,ee({name:"PortalWrapper",setup(s,{slots:o}){return Yn(OT,i),()=>{var a;return(a=o.default)==null?void 0:a.call(o)}}})]}let cW=Symbol("PortalGroupContext"),E_e=ee({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=Ca({resolveTarget(){return e.target}});return Yn(cW,r),()=>{let{target:i,...s}=e;return zi({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var T_e=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(T_e||{});let RT=Symbol("DialogContext");function xR(e){let t=Lt(RT,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,xR),n}return t}let fv="DC8F892D-2EBD-447C-A4C8-A03058436FF4",k_e=ee({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:fv},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){var s,o;let a=(s=e.id)!=null?s:`headlessui-dialog-${lh()}`,l=U(!1);nt(()=>{l.value=!0});let u=!1,c=te(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(u||(u=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),d=U(0),f=t_(),h=te(()=>e.open===fv&&f!==null?(f.value&Er.Open)===Er.Open:e.open),p=U(null),m=te(()=>uu(p));if(i({el:p,$el:p}),!(e.open!==fv||f!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof h.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${h.value===fv?void 0:e.open}`);let g=te(()=>l.value&&h.value?0:1),v=te(()=>g.value===0),w=te(()=>d.value>1),b=Lt(RT,null)!==null,[_,x]=x_e(),{resolveContainers:S,mainTreeNodeRef:I,MainTreeNode:P}=p_e({portals:_,defaultContainers:[te(()=>{var le;return(le=Y.panelRef.value)!=null?le:p.value})]}),R=te(()=>w.value?"parent":"leaf"),O=te(()=>f!==null?(f.value&Er.Closing)===Er.Closing:!1),M=te(()=>b||O.value?!1:v.value),E=te(()=>{var le,Ee,xe;return(xe=Array.from((Ee=(le=m.value)==null?void 0:le.querySelectorAll("body > *"))!=null?Ee:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(Nt(I))&&Me instanceof HTMLElement))!=null?xe:null});pL(E,M);let L=te(()=>w.value?!0:v.value),j=te(()=>{var le,Ee,xe;return(xe=Array.from((Ee=(le=m.value)==null?void 0:le.querySelectorAll("[data-headlessui-portal]"))!=null?Ee:[]).find(Me=>Me.contains(Nt(I))&&Me instanceof HTMLElement))!=null?xe:null});pL(j,L),v_e({type:"Dialog",enabled:te(()=>g.value===0),element:p,onUpdate:(le,Ee)=>{if(Ee==="Dialog")return Fs(le,{[kT.Add]:()=>d.value+=1,[kT.Remove]:()=>d.value-=1})}});let F=b_e({name:"DialogDescription",slot:te(()=>({open:h.value}))}),B=U(null),Y={titleId:B,panelRef:U(null),dialogState:g,setTitleId(le){B.value!==le&&(B.value=le)},close(){t("close",!1)}};Yn(RT,Y);let Z=te(()=>!(!v.value||w.value));Q4(S,(le,Ee)=>{le.preventDefault(),Y.close(),vt(()=>Ee==null?void 0:Ee.focus())},Z);let ne=te(()=>!(w.value||g.value!==0));iW((o=m.value)==null?void 0:o.defaultView,"keydown",le=>{ne.value&&(le.defaultPrevented||le.key===ur.Escape&&(le.preventDefault(),le.stopPropagation(),Y.close()))});let oe=te(()=>!(O.value||g.value!==0||b));return h_e(m,oe,le=>{var Ee;return{containers:[...(Ee=le.containers)!=null?Ee:[],S]}}),Mt(le=>{if(g.value!==0)return;let Ee=Nt(p);if(!Ee)return;let xe=new ResizeObserver(Me=>{for(let Ve of Me){let Ue=Ve.target.getBoundingClientRect();Ue.x===0&&Ue.y===0&&Ue.width===0&&Ue.height===0&&Y.close()}});xe.observe(Ee),le(()=>xe.disconnect())}),()=>{let{open:le,initialFocus:Ee,...xe}=e,Me={...n,ref:p,id:a,role:c.value,"aria-modal":g.value===0?!0:void 0,"aria-labelledby":B.value,"aria-describedby":F.value},Ve={open:g.value===0};return We(mL,{force:!0},()=>[We(S_e,()=>We(E_e,{target:p.value},()=>We(mL,{force:!1},()=>We(Ch,{initialFocus:Ee,containers:S,features:v.value?Fs(R.value,{parent:Ch.features.RestoreFocus,leaf:Ch.features.All&~Ch.features.FocusLock}):Ch.features.None},()=>We(x,{},()=>zi({ourProps:Me,theirProps:{...xe,...n},slot:Ve,attrs:n,slots:r,visible:g.value===0,features:Ef.RenderStrategy|Ef.Static,name:"Dialog"})))))),We(P)])}}}),C_e=ee({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var i;let s=(i=e.id)!=null?i:`headlessui-dialog-panel-${lh()}`,o=xR("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function a(l){l.stopPropagation()}return()=>{let{...l}=e,u={id:s,ref:o.panelRef,onClick:a};return zi({ourProps:u,theirProps:l,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),O_e=ee({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-title-${lh()}`,s=xR("DialogTitle");return nt(()=>{s.setTitleId(i),On(()=>s.setTitleId(null))}),()=>{let{...o}=e;return zi({ourProps:{id:i},theirProps:o,slot:{open:s.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});var R_e=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(R_e||{}),I_e=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(I_e||{});function A_e(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let dW=Symbol("MenuContext");function ER(e){let t=Lt(dW,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ER),n}return t}let P_e=ee({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=U(1),i=U(null),s=U(null),o=U([]),a=U(""),l=U(null),u=U(1);function c(f=h=>h){let h=l.value!==null?o.value[l.value]:null,p=Y4(f(o.value.slice()),g=>Nt(g.dataRef.domRef)),m=h?p.indexOf(h):null;return m===-1&&(m=null),{items:p,activeItemIndex:m}}let d={menuState:r,buttonRef:i,itemsRef:s,items:o,searchQuery:a,activeItemIndex:l,activationTrigger:u,closeMenu:()=>{r.value=1,l.value=null},openMenu:()=>r.value=0,goToItem(f,h,p){let m=c(),g=t_e(f===ia.Specific?{focus:ia.Specific,id:h}:{focus:f},{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:v=>v.id,resolveDisabled:v=>v.dataRef.disabled});a.value="",l.value=g,u.value=p??1,o.value=m.items},search(f){let h=a.value!==""?0:1;a.value+=f.toLowerCase();let p=(l.value!==null?o.value.slice(l.value+h).concat(o.value.slice(0,l.value+h)):o.value).find(g=>g.dataRef.textValue.startsWith(a.value)&&!g.dataRef.disabled),m=p?o.value.indexOf(p):-1;m===-1||m===l.value||(l.value=m,u.value=1)},clearSearch(){a.value=""},registerItem(f,h){let p=c(m=>[...m,{id:f,dataRef:h}]);o.value=p.items,l.value=p.activeItemIndex,u.value=1},unregisterItem(f){let h=c(p=>{let m=p.findIndex(g=>g.id===f);return m!==-1&&p.splice(m,1),p});o.value=h.items,l.value=h.activeItemIndex,u.value=1}};return Q4([i,s],(f,h)=>{var p;d.closeMenu(),SR(h,_R.Loose)||(f.preventDefault(),(p=Nt(i))==null||p.focus())},te(()=>r.value===0)),Yn(dW,d),rW(te(()=>Fs(r.value,{0:Er.Open,1:Er.Closed}))),()=>{let f={open:r.value===0,close:d.closeMenu};return zi({ourProps:{},theirProps:e,slot:f,slots:t,attrs:n,name:"Menu"})}}}),M_e=ee({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var i;let s=(i=e.id)!=null?i:`headlessui-menu-button-${lh()}`,o=ER("MenuButton");r({el:o.buttonRef,$el:o.buttonRef});function a(d){switch(d.key){case ur.Space:case ur.Enter:case ur.ArrowDown:d.preventDefault(),d.stopPropagation(),o.openMenu(),vt(()=>{var f;(f=Nt(o.itemsRef))==null||f.focus({preventScroll:!0}),o.goToItem(ia.First)});break;case ur.ArrowUp:d.preventDefault(),d.stopPropagation(),o.openMenu(),vt(()=>{var f;(f=Nt(o.itemsRef))==null||f.focus({preventScroll:!0}),o.goToItem(ia.Last)});break}}function l(d){switch(d.key){case ur.Space:d.preventDefault();break}}function u(d){e.disabled||(o.menuState.value===0?(o.closeMenu(),vt(()=>{var f;return(f=Nt(o.buttonRef))==null?void 0:f.focus({preventScroll:!0})})):(d.preventDefault(),o.openMenu(),A_e(()=>{var f;return(f=Nt(o.itemsRef))==null?void 0:f.focus({preventScroll:!0})})))}let c=Y0e(te(()=>({as:e.as,type:t.type})),o.buttonRef);return()=>{var d;let f={open:o.menuState.value===0},{...h}=e,p={ref:o.buttonRef,id:s,type:c.value,"aria-haspopup":"menu","aria-controls":(d=Nt(o.itemsRef))==null?void 0:d.id,"aria-expanded":o.menuState.value===0,onKeydown:a,onKeyup:l,onClick:u};return zi({ourProps:p,theirProps:h,slot:f,attrs:t,slots:n,name:"MenuButton"})}}}),D_e=ee({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var i;let s=(i=e.id)!=null?i:`headlessui-menu-items-${lh()}`,o=ER("MenuItems"),a=U(null);r({el:o.itemsRef,$el:o.itemsRef}),X0e({container:te(()=>Nt(o.itemsRef)),enabled:te(()=>o.menuState.value===0),accept(f){return f.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});function l(f){var h;switch(a.value&&clearTimeout(a.value),f.key){case ur.Space:if(o.searchQuery.value!=="")return f.preventDefault(),f.stopPropagation(),o.search(f.key);case ur.Enter:if(f.preventDefault(),f.stopPropagation(),o.activeItemIndex.value!==null){let p=o.items.value[o.activeItemIndex.value];(h=Nt(p.dataRef.domRef))==null||h.click()}o.closeMenu(),V0e(Nt(o.buttonRef));break;case ur.ArrowDown:return f.preventDefault(),f.stopPropagation(),o.goToItem(ia.Next);case ur.ArrowUp:return f.preventDefault(),f.stopPropagation(),o.goToItem(ia.Previous);case ur.Home:case ur.PageUp:return f.preventDefault(),f.stopPropagation(),o.goToItem(ia.First);case ur.End:case ur.PageDown:return f.preventDefault(),f.stopPropagation(),o.goToItem(ia.Last);case ur.Escape:f.preventDefault(),f.stopPropagation(),o.closeMenu(),vt(()=>{var p;return(p=Nt(o.buttonRef))==null?void 0:p.focus({preventScroll:!0})});break;case ur.Tab:f.preventDefault(),f.stopPropagation(),o.closeMenu(),vt(()=>q0e(Nt(o.buttonRef),f.shiftKey?oo.Previous:oo.Next));break;default:f.key.length===1&&(o.search(f.key),a.value=setTimeout(()=>o.clearSearch(),350));break}}function u(f){switch(f.key){case ur.Space:f.preventDefault();break}}let c=t_(),d=te(()=>c!==null?(c.value&Er.Open)===Er.Open:o.menuState.value===0);return()=>{var f,h;let p={open:o.menuState.value===0},{...m}=e,g={"aria-activedescendant":o.activeItemIndex.value===null||(f=o.items.value[o.activeItemIndex.value])==null?void 0:f.id,"aria-labelledby":(h=Nt(o.buttonRef))==null?void 0:h.id,id:s,onKeydown:l,onKeyup:u,role:"menu",tabIndex:0,ref:o.itemsRef};return zi({ourProps:g,theirProps:m,slot:p,attrs:t,slots:n,features:Ef.RenderStrategy|Ef.Static,visible:d.value,name:"MenuItems"})}}});function N_e(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function dx(e,...t){e&&t.length>0&&e.classList.add(...t)}function hv(e,...t){e&&t.length>0&&e.classList.remove(...t)}var IT=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(IT||{});function L_e(e,t){let n=ag();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[s,o]=[r,i].map(a=>{let[l=0]=a.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,c)=>c-u);return l});return s!==0?n.setTimeout(()=>t("finished"),s+o):t("finished"),n.add(()=>t("cancelled")),n.dispose}function vL(e,t,n,r,i,s){let o=ag(),a=s!==void 0?N_e(s):()=>{};return hv(e,...i),dx(e,...t,...n),o.nextFrame(()=>{hv(e,...n),dx(e,...r),o.add(L_e(e,l=>(hv(e,...r,...t),dx(e,...i),a(l))))}),o.add(()=>hv(e,...t,...n,...r,...i)),o.add(()=>a("cancelled")),o.dispose}function wu(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let TR=Symbol("TransitionContext");var F_e=(e=>(e.Visible="visible",e.Hidden="hidden",e))(F_e||{});function B_e(){return Lt(TR,null)!==null}function z_e(){let e=Lt(TR,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function $_e(){let e=Lt(kR,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}let kR=Symbol("NestingContext");function n_(e){return"children"in e?n_(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function fW(e){let t=U([]),n=U(!1);nt(()=>n.value=!0),On(()=>n.value=!1);function r(s,o=hl.Hidden){let a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Fs(o,{[hl.Unmount](){t.value.splice(a,1)},[hl.Hidden](){t.value[a].state="hidden"}}),!n_(t)&&n.value&&(e==null||e()))}function i(s){let o=t.value.find(({id:a})=>a===s);return o?o.state!=="visible"&&(o.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,hl.Unmount)}return{children:t,register:i,unregister:r}}let hW=Ef.RenderStrategy,AT=ee({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){let s=U(0);function o(){s.value|=Er.Opening,t("beforeEnter")}function a(){s.value&=~Er.Opening,t("afterEnter")}function l(){s.value|=Er.Closing,t("beforeLeave")}function u(){s.value&=~Er.Closing,t("afterLeave")}if(!B_e()&&Q0e())return()=>We(CR,{...e,onBeforeEnter:o,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:u},r);let c=U(null),d=te(()=>e.unmount?hl.Unmount:hl.Hidden);i({el:c,$el:c});let{show:f,appear:h}=z_e(),{register:p,unregister:m}=$_e(),g=U(f.value?"visible":"hidden"),v={value:!0},w=lh(),b={value:!1},_=fW(()=>{!b.value&&g.value!=="hidden"&&(g.value="hidden",m(w),u())});nt(()=>{let L=p(w);On(L)}),Mt(()=>{if(d.value===hl.Hidden&&w){if(f.value&&g.value!=="visible"){g.value="visible";return}Fs(g.value,{hidden:()=>m(w),visible:()=>p(w)})}});let x=wu(e.enter),S=wu(e.enterFrom),I=wu(e.enterTo),P=wu(e.entered),R=wu(e.leave),O=wu(e.leaveFrom),M=wu(e.leaveTo);nt(()=>{Mt(()=>{if(g.value==="visible"){let L=Nt(c);if(L instanceof Comment&&L.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function E(L){let j=v.value&&!h.value,F=Nt(c);!F||!(F instanceof HTMLElement)||j||(b.value=!0,f.value&&o(),f.value||l(),L(f.value?vL(F,x,S,I,P,B=>{b.value=!1,B===IT.Finished&&a()}):vL(F,R,O,M,P,B=>{b.value=!1,B===IT.Finished&&(n_(_)||(g.value="hidden",m(w),u()))})))}return nt(()=>{He([f],(L,j,F)=>{E(F),v.value=!1},{immediate:!0})}),Yn(kR,_),rW(te(()=>Fs(g.value,{visible:Er.Open,hidden:Er.Closed})|s.value)),()=>{let{appear:L,show:j,enter:F,enterFrom:B,enterTo:Y,entered:Z,leave:ne,leaveFrom:oe,leaveTo:le,...Ee}=e,xe={ref:c},Me={...Ee,...h.value&&f.value&&lg.isServer?{class:Le([n.class,Ee.class,...x,...S])}:{}};return zi({theirProps:Me,ourProps:xe,slot:{},slots:r,attrs:n,features:hW,visible:g.value==="visible",name:"TransitionChild"})}}}),H_e=AT,CR=ee({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){let i=t_(),s=te(()=>e.show===null&&i!==null?(i.value&Er.Open)===Er.Open:e.show);Mt(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});let o=U(s.value?"visible":"hidden"),a=fW(()=>{o.value="hidden"}),l=U(!0),u={show:s,appear:te(()=>e.appear||!l.value)};return nt(()=>{Mt(()=>{l.value=!1,s.value?o.value="visible":n_(a)||(o.value="hidden")})}),Yn(kR,a),Yn(TR,u),()=>{let c=tW(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return zi({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[We(H_e,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...c},r.default)]},attrs:{},features:hW,visible:o.value==="visible",name:"Transition"})}}});const V_e={class:"flex max-h-64 min-w-[200px] flex-col overflow-hidden overflow-y-auto rounded border border-gray-300 bg-white shadow-lg group-focus:outline-none dark:border-gray-700 dark:bg-gray-800"},j_e=ee({__name:"DropdownMenu",props:{menuClass:{default:""},buttonClass:{default:""},buttonVariant:{default:"primary"},buttonSize:{default:"md"},buttonOutline:{type:Boolean},buttonBorderless:{type:Boolean,default:!0}},emits:["open"],setup(e){return(t,n)=>(k(),X(y(P_e),{as:"div",class:"relative"},{default:H(r=>[$(y(HEe),{input:r.open,onChange:n[0]||(n[0]=i=>t.$emit("open",!!i))},null,8,["input"]),$(y(M_e),{variant:t.buttonVariant,size:t.buttonSize,borderless:t.buttonBorderless,class:Le(t.buttonClass)},{default:H(()=>[ce(t.$slots,"icon",Pt(Ft(r)),()=>[$(y(D0e),{class:"h-6 w-6"})])]),_:2},1032,["variant","size","borderless","class"]),$(y(D_e),{class:Le(["group absolute z-10",t.menuClass])},{default:H(()=>[A("div",V_e,[ce(t.$slots,"default",Pt(Ft(r)))])]),_:2},1032,["class"])]),_:3}))}}),U_e={class:"z-40 h-40 cursor-pointer"},W_e={class:"flex flex-col h-full items-center justify-center rounded-xl border-2 border-dashed border-secondary-500"},q_e={class:"text-sm text-secondary-500"},G_e={class:"flex items-center gap-2 absolute right-0 bottom-2 z-1"},K_e=["src"],Y_e=ee({__name:"DropZone",props:{modelValue:{},disabled:{type:Boolean}},emits:["files","crop","delete"],setup(e,{emit:t}){const n=e,r=t,i=U(""),s=U(!1),o=f=>{var h;(h=f.dataTransfer)!=null&&h.types.includes("Files")&&(s.value=!0)},a=async()=>{s.value=!1},l=f=>{var h;s.value=!1,r("files",Array.from(((h=f.dataTransfer)==null?void 0:h.files)??[]))},u=async f=>new Promise((h,p)=>{const m=new Image;m.onload=h,m.onerror=p,m.src=f}),c=()=>{r("delete")},d=()=>{r("crop")};return He(()=>n.modelValue,async f=>{f&&await u(f),i.value=f},{immediate:!0}),(f,h)=>(k(),W("div",{class:Le(["relative",{"no-pointer-children":s.value,"bg-secondary-200 pointer-events-none":f.disabled}]),onDragenter:lt(o,["prevent","stop"]),onDragleave:lt(a,["prevent","self"]),onDragover:h[0]||(h[0]=lt(()=>{},["prevent"])),onDrop:lt(l,["prevent"])},[$(y(CR),{show:!0,enter:"transition-opacity duration-75","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:H(()=>[A("div",U_e,[A("div",W_e,[i.value?(k(),W(je,{key:1},[A("div",G_e,[f.disabled?fe("",!0):(k(),X(y(gt),{key:0,type:"button",size:"sm",class:"mt-3 text-blue-500 bg-white hover:bg-gray-200 shadow shadow-gray-800/20",onClick:lt(d,["stop"])},{default:H(()=>[Ye(ye(f.$t("actions.crop")),1)]),_:1})),f.disabled?fe("",!0):(k(),X(y(gt),{key:1,type:"button",size:"sm",class:"mr-3 mt-3 flex items-center gap-1 text-red-500 bg-white hover:bg-gray-200 shadow shadow-gray-800/20",onClick:lt(c,["stop"])},{default:H(()=>[Ye(ye(f.$t("actions.remove")),1)]),_:1}))]),ce(f.$slots,"thumbnail",{},()=>[A("img",{src:i.value,alt:"Thumbnail",class:"object-cover h-full w-full rounded-xl"},null,8,K_e)],!0)],64)):ce(f.$slots,"icon",{key:0},()=>[$(y(I0e),{class:"h-6 w-6 text-secondary-500"}),A("div",q_e,ye(f.$t("actions.dragOrClick")),1)],!0)])])]),_:3}),ce(f.$slots,"default",{},void 0,!0)],34))}}),X_e=Ei(Y_e,[["__scopeId","data-v-b97c014e"]]);var my={exports:{}},J_e=my.exports,yL;function Q_e(){return yL||(yL=1,function(e,t){(function(n,r,i){e.exports=i(),e.exports.default=i()})("slugify",J_e,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var a=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,u=o.trim===void 0?!0:o.trim,c=s.normalize().split("").reduce(function(d,f){var h=a[f];return h===void 0&&(h=n[f]),h===void 0&&(h=f),h===l&&(h=" "),d+h.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(c=c.replace(/[^A-Za-z0-9\s]/g,"")),u&&(c=c.trim()),c=c.replace(/\s+/g,l),o.lower&&(c=c.toLowerCase()),c}return i.extend=function(s){Object.assign(n,s)},i})}(my)),my.exports}var Z_e=Q_e();const r_=e0(Z_e);function pW(e,t){return k(),W("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[A("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor"})])}const eSe={},tSe={class:"inline-flex items-center gap-2"};function nSe(e,t){return k(),W("span",tSe,[t[0]||(t[0]=A("svg",{class:"inline-block h-5 w-5 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[A("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),A("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),e.$slots.default?ce(e.$slots,"default",{key:0}):fe("",!0)])}const Ul=Ei(eSe,[["render",nSe]]),rSe={class:"flex w-full text-sm text-left"},iSe={key:0,class:"mt-1 absolute w-full bg-white border rounded-md shadow overflow-hidden z-10"},sSe={class:"border-b border-gray-300 p-2 bg-white relative"},oSe={key:0},aSe=["onClick"],lSe={class:"font-normal text-sm"},uSe={key:1},cSe=ee({__name:"SelectInventorySetDropdown",props:{modelValue:Number},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){var w;const r=e,i=n,s=U(""),o=U([]),a=U(!1),l=U({}),u=U(null),c=U(),d=ln` query getInventorySetList($search: String!, $id: Int = null, $live: Boolean, $excludeTypes: [String!], $includeId: Boolean!) { getInventorySetList (search: $search, live: $live excludeTypes: $excludeTypes) { id name set_type } getInventorySetById (id: $id) @include(if: $includeId) { id name set_type } } `,{refetch:f,onResult:h,loading:p}=Ro(d,{search:s.value,id:Number(r.modelValue||0),live:!1,excludeTypes:["selection","cart"],includeId:!!(r.modelValue||(w=l.value)!=null&&w.id)});h(b=>{var _,x;b!=null&&b.data&&(o.value=(_=b==null?void 0:b.data)==null?void 0:_.getInventorySetList,l.value=(x=b==null?void 0:b.data)==null?void 0:x.getInventorySetById)});function m(){var b,_;f({search:s.value,id:(b=l.value)==null?void 0:b.id,live:!1,excludeTypes:["selection","cart"],includeId:!!(r.modelValue||(_=l.value)!=null&&_.id)})}function g(b){var _;l.value=b,i("update:modelValue",Number((_=l.value)==null?void 0:_.id)),a.value=!1}const v=()=>{var b,_;setTimeout(()=>{var x;(x=c.value)==null||x.focus()},200),s.value="",a.value=!a.value,a.value&&f({search:s.value,id:(b=l.value)==null?void 0:b.id,live:!1,excludeTypes:["selection","cart"],includeId:!!(r.modelValue||(_=l.value)!=null&&_.id)})};return bU(u,()=>{a.value=!1}),t({items:o}),(b,_)=>{var x,S,I,P;return k(),W("div",{ref_key:"target",ref:u,class:"relative w-full max-w-md"},[A("button",{type:"button",class:Le(["flex items-center space-x-2 p-3 border border-slate-300 rounded w-full hover:bg-slate-50 transition-all bg-white",{"bg-slate-100":a.value}]),onClick:v},[A("span",rSe,ye((x=l.value)!=null&&x.id?(S=l.value)==null?void 0:S.name:"Select Inventory List"),1),(I=l.value)!=null&&I.id&&((P=l.value)==null?void 0:P.set_type)!=="default"?(k(),X(y(Ab),{key:0,class:"capitalize bg-slate-100 text-slate-600 hover:bg-slate-100 hover:text-slate-600"},{default:H(()=>{var R;return[Ye(ye((R=l.value)==null?void 0:R.set_type),1)]}),_:1})):fe("",!0),$(y(pW),{class:"h-5 w-5 shrink-0 opacity-50"})],2),$(is,{"enter-active-class":"duration-200 ease-out","enter-from-class":"opacity-0 translate-y-5","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-5"},{default:H(()=>[a.value?(k(),W("div",iSe,[A("div",sSe,[At(A("input",{ref_key:"input",ref:c,"onUpdate:modelValue":_[0]||(_[0]=R=>s.value=R),type:"text",placeholder:"Search...",class:"w-full focus:outline-none border-0",onInput:m,autofocus:""},null,544),[[pi,s.value]]),s.value!==""&&y(p)?(k(),X(y(Ul),{key:0,class:"absolute top-1/2 right-5 -translate-y-1/2"})):fe("",!0)]),o.value.length?(k(),W("ul",oSe,[(k(!0),W(je,null,Ot(o.value,R=>(k(),W("li",{key:R.id,class:"flex justify-between items-start px-3 py-2 hover:bg-slate-50 cursor-pointer",onClick:O=>g(R)},[A("div",null,[A("h3",lSe,ye(R.name),1)]),A("div",null,[R.set_type!=="default"?(k(),X(y(Ab),{key:0,class:"capitalize bg-slate-100 text-slate-600 hover:bg-slate-100 hover:text-slate-600"},{default:H(()=>[Ye(ye(R.set_type),1)]),_:2},1024)):fe("",!0)])],8,aSe))),128))])):(k(),W("div",uSe,_[1]||(_[1]=[A("p",{class:"p-3 text-center text-gray-500"},"No items found",-1)])))])):fe("",!0)]),_:1})],512)}}}),dSe={class:"space-y-5"},fSe={class:"space-y-1"},hSe={key:0,class:"text-red-500 text-sm"},pSe={class:"space-y-1"},mSe={key:0,class:"text-red-500 text-sm"},gSe={class:"space-y-1"},vSe={class:"flex justify-end mt-8"},ySe=ee({__name:"GeneralSettingsDialog",props:{open:{type:Boolean}},emits:["close"],setup(e){const t=Aa(),n=U(""),r=U(),i=U(null),s=te(()=>r_(n.value,{lower:!0,strict:!0})),o={title:U(""),inventorySetId:U("")},a=()=>{let u=!0;return n.value.length===0?(o.title.value="Please enter a title",u=!1):n.value.length>200?(o.title.value="Link name is too long",u=!1):s.value.length===0&&(o.title.value="Link name must contain non-special characters",u=!1),r.value||(o.inventorySetId.value="Please select an Inventory List",u=!1),u},l=()=>{a()&&t.push({name:"ovr-create",query:{type:"ovr",title:n.value,list_id:r.value}})};return He(()=>n.value,u=>{if(u){o.title.value="";const c=u.replace(/(\r\n|\n|\r)/gm,"").replace(/\s\s+/g," ");u!==c&&(n.value=c)}}),He(()=>r.value,u=>{var c,d,f;u&&(o.inventorySetId.value="",n.value||(n.value=((f=(d=(c=i.value)==null?void 0:c.items)==null?void 0:d.find(h=>h.id===u))==null?void 0:f.name)||""))}),(u,c)=>(k(),X(y(cR),{open:u.open},{default:H(()=>[$(y(dR),{class:"!z-[51]",onInteractOutside:c[4]||(c[4]=d=>u.$emit("close"))},{default:H(()=>[$(y(fR),null,{default:H(()=>[$(y(hR),{class:"flex items-center justify-between"},{default:H(()=>[A("div",null,ye(u.$t("actions.createRoom")),1),$(y(EO),{class:"w-6 cursor-pointer",onClick:c[0]||(c[0]=d=>u.$emit("close"))})]),_:1})]),_:1}),A("form",{class:"p-4",onSubmit:lt(l,["prevent"])},[A("div",dSe,[A("div",fSe,[c[5]||(c[5]=A("label",{class:"text-sm font-medium"},"Inventory list",-1)),$(cSe,{ref_key:"inventorySetDropdown",ref:i,modelValue:r.value,"onUpdate:modelValue":c[1]||(c[1]=d=>r.value=d)},null,8,["modelValue"]),o.inventorySetId.value?(k(),W("span",hSe,ye(o.inventorySetId),1)):fe("",!0)]),A("div",pSe,[c[6]||(c[6]=A("label",{for:"ovr-title",class:"text-sm font-medium cursor-pointer"},"Link name",-1)),At(A("input",{id:"ovr-title","onUpdate:modelValue":c[2]||(c[2]=d=>n.value=d),class:Le(["w-full p-2 border border-gray-300 rounded resize text-sm",{"border-red-500":o.title.value}]),placeholder:"Name your link",maxlength:"200"},null,2),[[pi,n.value,void 0,{trim:!0}]]),o.title.value?(k(),W("span",mSe,ye(o.title),1)):fe("",!0)]),A("div",gSe,[c[7]||(c[7]=A("label",{class:"text-sm font-medium"},"URL slug",-1)),At(A("input",{"onUpdate:modelValue":c[3]||(c[3]=d=>s.value=d),class:"w-full p-2 border border-gray-300 rounded bg-secondary-100 text-sm",disabled:""},null,512),[[pi,s.value,void 0,{trim:!0}]])])]),A("div",vSe,[$(y(gt),{class:"bg-black text-white hover:opacity-90",type:"submit",disabled:!r.value},{default:H(()=>[Ye(ye(u.$t("actions.create")),1)]),_:1},8,["disabled"])])],32)]),_:1})]),_:1},8,["open"]))}}),bSe={class:"image-wrapper"},wSe=["src","alt","loading"],_Se=["src","alt","loading"],SSe=ee({__name:"ProgressiveImage",props:{lowResSrc:{},highResSrc:{},alt:{},lazy:{type:Boolean},imgClass:{}},setup(e){const t=U(!1),n=()=>{t.value=!0};return(r,i)=>(k(),W("div",bSe,[A("img",{src:r.lowResSrc,alt:r.alt,class:Le([r.imgClass,"low-res max-h-screen"]),style:xn({opacity:t.value?0:1,height:t.value?0:"auto"}),loading:r.lazy?"lazy":"eager"},null,14,wSe),A("img",{src:r.highResSrc,alt:r.alt,class:Le([r.imgClass,"high-res max-h-screen"]),style:xn({opacity:t.value?1:0,height:t.value?"auto":0}),loading:r.lazy?"lazy":"eager",onLoad:n},null,46,_Se)]))}}),Cp=Ei(SSe,[["__scopeId","data-v-2dd35142"]]),xSe={key:0,class:"p-3 sm:p-8 flex flex-wrap items-start gap-8 overflow-scroll max-h-[50svh] sm:max-h-[60vh]"},ESe={class:"relative mb-3"},TSe=["src"],kSe={key:1,class:"w-36 h-36 bg-secondary-100 rounded-md flex justify-center items-center"},CSe={class:"absolute bottom-2 flex items-center gap-2"},OSe={class:"max-w-32"},RSe={key:1},ISe={class:"h-24 flex justify-center items-center text-sm text-secondary-500"},PT=ee({__name:"InventoryGrid",props:{cards:{},hideVisits:{type:Boolean,default:!1}},setup(e){const t=e,n=te(()=>t.cards.filter(o=>o.inventory)),r="https://www.inventory.gallery/fit-in",i=o=>["edition","inventory"].includes(o.inventory.type)?o.inventory.url:o.inventory.type==="doc"?o.inventory.url&&o.inventory.url.includes("pdf"):!1,s=o=>["edition","inventory"].includes(o.inventory.type)?Pb(o.inventory.url,r,800,800):o.inventory.type==="doc"?Pb(o.inventory.url.replace(".pdf",".png"),r,800,800):"";return(o,a)=>n.value.length?(k(),W("div",xSe,[(k(!0),W(je,null,Ot(n.value,(l,u)=>(k(),W("div",{key:u},[A("div",ESe,[i(l)?(k(),W("img",{key:0,src:s(l),alt:"",class:"w-36 h-36 object-cover rounded-md"},null,8,TSe)):(k(),W("div",kSe,[$(y(Kve),{class:"w-14 h-14 text-secondary-500 mb-4"})])),A("div",CSe,[l.inventory.type!=="doc"?(k(),X(y(Ab),{key:0,class:"ml-1 border-white"},{default:H(()=>[$(y(EU),{class:"h-4 w-4 mr-1"}),Ye(" "+ye(y(mR)(l.visitLength)),1)]),_:2},1024)):fe("",!0),o.hideVisits?fe("",!0):(k(),X(y(Ab),{key:1,class:"border-white"},{default:H(()=>[$(y(P0e),{class:"h-4 w-4 mr-1"}),Ye(" "+ye(l.totalVisits||1),1)]),_:2},1024))])]),A("div",OSe,[ce(o.$slots,"caption",Fe({ref_for:!0},l))])]))),128))])):(k(),W("div",RSe,[A("div",ISe,ye(o.$t("messages.noResultsFound")),1)]))}}),mW=e=>typeof e=="object"&&e!==null,bL=e=>mW(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),ASe=Symbol("mapObjectSkip"),MT=(e,t,n,r=new WeakMap)=>{if(n={deep:!1,target:{},...n},r.has(e))return r.get(e);r.set(e,n.target);const{target:i}=n;delete n.target;const s=o=>o.map(a=>bL(a)?MT(a,t,n,r):a);if(Array.isArray(e))return s(e);for(const[o,a]of Object.entries(e)){const l=t(o,a,e);if(l===ASe)continue;let[u,c,{shouldRecurse:d=!0}={}]=l;u!=="__proto__"&&(n.deep&&d&&bL(c)&&(c=Array.isArray(c)?s(c):MT(c,t,n,r)),i[u]=c)}return i};function wL(e,t,n){if(!mW(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return MT(e,t,n)}const PSe=/[\p{Lu}]/u,MSe=/[\p{Ll}]/u,_L=/^[\p{Lu}](?![\p{Lu}])/gu,gW=/([\p{Alpha}\p{N}_]|$)/u,OR=/[_.\- ]+/,DSe=new RegExp("^"+OR.source),SL=new RegExp(OR.source+gW.source,"gu"),xL=new RegExp("\\d+"+gW.source,"gu"),NSe=(e,t,n,r)=>{let i=!1,s=!1,o=!1,a=!1;for(let l=0;l<e.length;l++){const u=e[l];a=l>2?e[l-3]==="-":!0,i&&PSe.test(u)?(e=e.slice(0,l)+"-"+e.slice(l),i=!1,o=s,s=!0,l++):s&&o&&MSe.test(u)&&(!a||r)?(e=e.slice(0,l-1)+"-"+e.slice(l-1),o=s,s=!1,i=!0):(i=t(u)===u&&n(u)!==u,o=s,s=n(u)===u&&t(u)!==u)}return e},LSe=(e,t)=>(_L.lastIndex=0,e.replaceAll(_L,n=>t(n))),FSe=(e,t)=>(SL.lastIndex=0,xL.lastIndex=0,e.replaceAll(xL,(n,r,i)=>["_","-"].includes(e.charAt(i+n.length))?n:t(n)).replaceAll(SL,(n,r)=>t(r)));function BSe(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(s=>s.trim()).filter(s=>s.length).join("-"):e=e.trim(),e.length===0)return"";const n=t.locale===!1?s=>s.toLowerCase():s=>s.toLocaleLowerCase(t.locale),r=t.locale===!1?s=>s.toUpperCase():s=>s.toLocaleUpperCase(t.locale);return e.length===1?OR.test(e)?"":t.pascalCase?r(e):n(e):(e!==n(e)&&(e=NSe(e,n,r,t.preserveConsecutiveUppercase)),e=e.replace(DSe,""),e=t.preserveConsecutiveUppercase?LSe(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),FSe(e,r))}class zSe extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(const[n,r]of t)this.onEviction(n,r.value)}_deleteIfExpired(t,n){return typeof n.expiry=="number"&&n.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,n.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,n){if(this._deleteIfExpired(t,n)===!1)return n.value}_getItemValue(t,n){return n.expiry?this._getOrDeleteIfExpired(t,n):n.value}_peek(t,n){const r=n.get(t);return this._getItemValue(t,r)}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,n){this.oldCache.delete(t),this._set(t,n)}*_entriesAscending(){for(const t of this.oldCache){const[n,r]=t;this.cache.has(n)||this._deleteIfExpired(n,r)===!1&&(yield t)}for(const t of this.cache){const[n,r]=t;this._deleteIfExpired(n,r)===!1&&(yield t)}}get(t){if(this.cache.has(t)){const n=this.cache.get(t);return this._getItemValue(t,n)}if(this.oldCache.has(t)){const n=this.oldCache.get(t);if(this._deleteIfExpired(t,n)===!1)return this._moveToRecent(t,n),n.value}}set(t,n,{maxAge:r=this.maxAge}={}){const i=typeof r=="number"&&r!==Number.POSITIVE_INFINITY?Date.now()+r:void 0;return this.cache.has(t)?this.cache.set(t,{value:n,expiry:i}):this._set(t,{value:n,expiry:i}),this}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const n=[...this._entriesAscending()],r=n.length-t;r<0?(this.cache=new Map(n),this.oldCache=new Map,this._size=n.length):(r>0&&this._emitEvictions(n.slice(0,r)),this.oldCache=new Map(n.slice(r)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache){const[n,r]=t;this._deleteIfExpired(n,r)===!1&&(yield[n,r.value])}for(const t of this.oldCache){const[n,r]=t;this.cache.has(n)||this._deleteIfExpired(n,r)===!1&&(yield[n,r.value])}}*entriesDescending(){let t=[...this.cache];for(let n=t.length-1;n>=0;--n){const r=t[n],[i,s]=r;this._deleteIfExpired(i,s)===!1&&(yield[i,s.value])}t=[...this.oldCache];for(let n=t.length-1;n>=0;--n){const r=t[n],[i,s]=r;this.cache.has(i)||this._deleteIfExpired(i,s)===!1&&(yield[i,s.value])}}*entriesAscending(){for(const[t,n]of this._entriesAscending())yield[t,n.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,n=this){for(const[r,i]of this.entriesAscending())t.call(n,i,r,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}const $Se=(e,t)=>e.some(n=>typeof n=="string"?n===t:(n.lastIndex=0,n.test(t))),fx=new zSe({maxSize:1e5}),EL=e=>typeof e=="object"&&e!==null&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),TL=(e,t={})=>{if(!EL(e))return e;const{exclude:n,pascalCase:r=!1,stopPaths:i,deep:s=!1,preserveConsecutiveUppercase:o=!1}=t,a=new Set(i),l=u=>(c,d)=>{if(s&&EL(d)){const f=u===void 0?c:`${u}.${c}`;a.has(f)||(d=wL(d,l(f)))}if(!(n&&$Se(n,c))){const f=r?`${c}_`:c;if(fx.has(f))c=fx.get(f);else{const h=BSe(c,{pascalCase:r,locale:!1,preserveConsecutiveUppercase:o});c.length<100&&fx.set(f,h),c=h}}return[c,d]};return wL(e,l(void 0))};function DT(e,t){return Array.isArray(e)?Object.keys(e).map(n=>TL(e[n],t)):TL(e,t)}const vW=ln` query GetInventorySetById($id: Int!) { getInventorySetById(id: $id) { id name item_count document_count description } } `,HSe=ln` query GetInventoryOverview($ovr_id: Int!, $types: [String!]!) { getInventoryOverview(ovr_id: $ovr_id, types: $types) { inventory { id title year artist url type } visit_length total_visits } } `,VSe=ln` query GetOvrSessions($ovr_id: Int!, $limit: Float!, $offset: Float!, $order: [JSON!]!) { getOvrSessions(ovr_id: $ovr_id, limit: $limit, offset: $offset, order: $order) { sessions { id device contact_email contact_first_name contact_last_name contact_id created_at visit_length viewed_images total_images viewed_docs total_docs location country activities { visit_length inventory { id title year artist url type } } } count } } `,jSe=ln` query GetOvrStats($ovr_id: Int!) { getOvrStats(ovr_id: $ovr_id) { total_visit_length total_artwork_views total_doc_views } } `,USe=ln` query GetOvrs( $search: String! $limit: Float! $offset: Float! $order: [JSON!]! $filters: JSON $list_id: Int ) { getOvrsForList( search: $search limit: $limit offset: $offset order: $order filters: $filters list_id: $list_id ) { ovrs { id enabled type slug title visits_count user { id first_name last_name } inventory_set { id name cover_inventory { url } } settings created_at last_visited_at } count } } `,WSe=ln` query getOvr($id: Int!) { getOvrById(id: $id) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings created_at updated_at visits_count content inventory_set { id name public_url item_count description start end } organization { id name json_setting } } } `,qSe=ln` query GetDefaultOVRSettings { getDefaultOVRSettings } `,GSe={class:"flex justify-between mb-4"},KSe={class:"flex flex-col items-start gap-2 sm:flex-row sm:gap-4"},YSe={class:"mr-2 max-w-sm break-words"},XSe={key:0,class:"font-medium text-sm text-secondary-500"},JSe=["href"],QSe={key:1,class:"flex items-center gap-2 mr-2"},ZSe={class:"max-w-sm flex justify-between mb-4"},exe={class:"text-lg text-secondary-500 font-semibold"},txe={class:"text-xs text-gray-500"},nxe={class:"text-lg text-secondary-500 font-semibold"},rxe={class:"text-xs text-gray-500"},ixe={class:"text-lg text-secondary-500 font-semibold"},sxe={class:"text-xs text-gray-500"},oxe={class:"text-lg text-secondary-500 font-semibold"},axe={class:"text-xs text-gray-500"},lxe={class:"flex items-center"},uxe=["onClick"],cxe={key:0,class:"max-w-sm sm:max-w-full"},dxe={key:1},fxe={class:"border border-gray-300 rounded-md"},hxe={class:"text-xs text-gray-500"},pxe={class:"font-semibold"},mxe={key:2},gxe={class:"border border-gray-300 rounded-md"},vxe={class:"text-xs text-gray-500"},yxe=ee({__name:"LinkActivityDialog",props:{selectedLink:{}},emits:["close","delete-link","toggle-link"],setup(e,{emit:t}){const n=e,r=t,i=Ur(),s=Aa(),{resolveClient:o}=Ac(),a=o(),l=U(0),u=U(0),c=U(0),d=async()=>{const{data:O}=await a.query({query:jSe,variables:{ovr_id:n.selectedLink.id}});return DT(O.getOvrStats,{deep:!0})};nt(()=>{d().then(O=>{l.value=O.totalVisitLength,u.value=O.totalArtworkViews,c.value=O.totalDocViews})});const f=U("activity"),h=O=>O.key===f.value,p=U([{name:"Activity",key:"activity"},{name:"Artwork Views",key:"artworkViews"},{name:"Doc Views",key:"docViews"}]),m=O=>{f.value!==O.key&&(f.value=O.key,O.key==="activity"?i.track("OVR tracking - link tracking view - view visitor activity"):O.key==="artworkViews"?i.track("OVR tracking - link tracking view - artwork views"):i.track("OVR tracking - link tracking view - documents views"))},g=U([]),v=U([]),w=O=>[O.title,O.year].filter(Boolean).join(", "),b=async O=>{const{data:M}=await a.query({query:HSe,variables:{ovr_id:n.selectedLink.id,types:O}});return DT(M.getInventoryOverview,{deep:!0})};nt(()=>{Promise.all([b(["inventory","edition"]),b(["doc"])]).then(([O,M])=>{g.value=O,v.value=M})});const _=O=>`https://preview.arternal.com/${O.id}/${O.slug}`,x=()=>{window.open(_(n.selectedLink),"_blank"),i.track("OVR tracking - link tracking view - preview")},S=()=>{n.selectedLink.enabled?i.track("OVR tracking - link tracking view - disable link"):i.track("OVR tracking - link tracking view - enable link"),r("toggle-link",n.selectedLink.id,n.selectedLink.enabled)},I=()=>{r("delete-link",n.selectedLink.id),i.track("OVR tracking - link tracking view - delete link")},P=()=>{i.track("OVR tracking - link tracking view - edit"),s.push({name:"ovr-edit",params:{id:n.selectedLink.id}})},R=te(()=>{var M,E;const O=(E=(M=n.selectedLink)==null?void 0:M.inventory_set)==null?void 0:E.id;return O?`/inventory/set/${O}`:""});return(O,M)=>(k(),X(y(cR),{open:!!O.selectedLink},{default:H(()=>[$(y(dR),{class:"sm:max-w-5xl max-w-md max-h-[95vh] overflow-auto",onInteractOutside:M[3]||(M[3]=E=>O.$emit("close"))},{default:H(()=>[$(y(fR),null,{default:H(()=>[A("div",GSe,[A("div",KSe,[$(y(hR),{class:"flex flex-col items-start gap-2"},{default:H(()=>[A("div",YSe,ye(O.selectedLink.title||"(no title)"),1),O.selectedLink.inventory_set?(k(),W("div",XSe,[Ye(ye(O.$t("components.LinkActivityDialog.createdFrom"))+" ",1),A("a",{href:R.value,target:"_blank",class:"text-primary hover:no-underline hover:text-primary-600",onClick:M[0]||(M[0]=lt(E=>y(i).track("OVR tracking - link tracking view - list button"),["stop"]))},ye(O.selectedLink.inventory_set.name||O.$t("components.LinkActivityDialog.noName")),9,JSe)])):fe("",!0)]),_:1}),O.selectedLink.enabled?(k(),W("div",QSe,[$(y(kU),{content:_(O.selectedLink),onCopy:M[1]||(M[1]=E=>y(i).track("OVR tracking - link tracking view - copy link"))},null,8,["content"]),$(y(gt),{class:"flex items-center gap-1 text-xs text-secondary-500 border-secondary-500 hover:text-secondary-500",variant:"outline",size:"xs",outline:"",onClick:lt(x,["stop"])},{default:H(()=>[$(y(tR),{class:"w-4"}),A("div",null,ye(O.$t("actions.preview")),1)]),_:1}),$(y(gt),{class:"flex items-center gap-1 text-xs text-secondary-500 border-secondary-500 hover:text-secondary-500",variant:"outline",size:"xs",outline:"",onClick:lt(P,["stop"])},{default:H(()=>[$(y(eR),{class:"w-4"}),A("div",null,ye(O.$t("actions.edit")),1)]),_:1}),$(y(yW),{"link-enabled":O.selectedLink.enabled,"disable-edit":!0,"disable-preview":!0,onDelete:I,onToggle:S},null,8,["link-enabled"])])):(k(),X(y(q4),{key:0,"badge-class":"mr-2",onReenable:S}))]),A("div",null,[$(y(U4),{class:"w-6 cursor-pointer text-slate-500",onClick:M[2]||(M[2]=E=>O.$emit("close"))})])]),$(y(d4),null,{default:H(()=>[A("div",ZSe,[A("div",null,[A("div",exe,ye(O.selectedLink.visits_count||0),1),A("div",txe,ye(O.$t("components.LinkActivityDialog.stats.totalVisits")),1)]),A("div",null,[A("div",nxe,ye(y(mR)(l.value)),1),A("div",rxe,ye(O.$t("components.LinkActivityDialog.stats.totalVisitLength")),1)]),A("div",null,[A("div",ixe,ye(u.value),1),A("div",sxe,ye(O.$t("components.LinkActivityDialog.stats.totalArtworkViews")),1)]),A("div",null,[A("div",oxe,ye(c.value),1),A("div",axe,ye(O.$t("components.LinkActivityDialog.stats.totalDocViews")),1)])]),A("div",lxe,[(k(!0),W(je,null,Ot(p.value,E=>(k(),W("div",{key:E.key,class:Le(["py-2 px-5 mb-1 text-sm text-secondary-500 cursor-pointer",{"mb-0 border border-b-4 border-t-0 border-b-info-500 font-semibold !text-info-500":h(E)}]),onClick:L=>m(E)},ye(O.$t(`components.LinkActivityDialog.tabs.${E.key}`)),11,uxe))),128))])]),_:1})]),_:1}),f.value==="activity"?(k(),W("div",cxe,[$(y(kxe),{id:O.selectedLink.id},null,8,["id"])])):fe("",!0),f.value==="artworkViews"?(k(),W("div",dxe,[A("div",fxe,[$(y(PT),{cards:g.value},{caption:H(({inventory:E})=>[A("div",hxe,[A("div",pxe,ye(E.artist),1),A("div",null,ye(w(E)),1)])]),_:1},8,["cards"])])])):fe("",!0),f.value==="docViews"?(k(),W("div",mxe,[A("div",gxe,[$(y(PT),{cards:v.value},{caption:H(({inventory:E})=>[A("div",vxe,ye(E.title),1)]),_:1},8,["cards"])])])):fe("",!0)]),_:1})]),_:1},8,["open"]))}}),{t:Rh}=L0.global,kL=j0(),bxe=[{id:"contact_full_name",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&kL.track("OVR tracking - link activity table - sort by contact name")}},()=>[Rh("tables.LinkActivityTable.headers.contact_full_name"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>{const t=[e.original.contactFirstName,e.original.contactLastName].filter(Boolean).join(" "),n=e.original.device==="desktop"?A0e:M0e;return We("div",{class:"flex items-center"},[We(n,{class:"w-5 h-5"}),We("div",{class:"ml-2"},[We("div",{class:"hover:text-info-500"},t||e.original.contactEmail||"Visitor"),We("div",{class:"text-xs text-gray-500"},pR(e.original.createdAt))])])}},{id:"visit_length",header:Rh("tables.LinkActivityTable.headers.visit_length"),cell:({row:e})=>We("div",{class:"flex items-center"},[We(EU,{class:"w-5 h-5 mr-2"}),We("div",mR(e.original.visitLength))])},{id:"viewed_images",header:Rh("tables.LinkActivityTable.headers.viewed_images"),cell:({row:e})=>We("div",{},`${e.original.viewedImages}/${e.original.totalImages}`)},{id:"viewed_docs",header:Rh("tables.LinkActivityTable.headers.viewed_docs"),cell:({row:e})=>We("div",{},`${e.original.viewedDocs}/${e.original.totalDocs}`)},{id:"session_location",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&kL.track("OVR tracking - link activity table - sort by location")}},()=>[Rh("tables.LinkActivityTable.headers.session_location"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>e.original.location||e.original.country||"Unknown"}],wxe={key:0},_xe={class:"text-xs text-gray-500"},Sxe={key:0},xxe={class:"font-semibold"},Exe={key:1},Txe={key:1,class:"flex justify-center items-center h-48"},hx=5,kxe=ee({__name:"LinkActivityTable",props:{id:{}},setup(e){const t=e,{resolveClient:n}=Ac(),r=n(),i=Ur(),s=U([]),o=U(),a=U(null),l=U(!0),u=async(d,f=null)=>{var w,b;l.value=!0;const h=(w=a.value)==null?void 0:w.pagination,p=d??(h==null?void 0:h.pageIndex)??0,m=(h==null?void 0:h.pageSize)??hx,g=f??((b=a.value)==null?void 0:b.sorting)??[],{data:v}=await r.query({query:VSe,variables:{ovr_id:t.id,offset:p*m,limit:hx,order:g}});s.value=DT(v.getOvrSessions.sessions,{deep:!0}),o.value=v.getOvrSessions.count,l.value=!1};nt(u);const c=d=>[d.title,d.year].filter(Boolean).join(", ");return(d,f)=>(k(),W("div",null,[o.value!==void 0?(k(),W("div",wxe,[$(y(Hbe),{ref_key:"dataTableRef",ref:a,data:s.value,"data-count":o.value,columns:y(bxe),loading:l.value,"page-size":hx,expandable:"",onFetchMore:u,onSortBy:f[0]||(f[0]=h=>u(0,h)),onExpandedChange:f[1]||(f[1]=h=>y(i).track("OVR tracking - link activity table - row expanded/collapsed"))},{"expanded-content":H(({original:h})=>[A("div",null,[$(y(PT),{cards:h.activities,"hide-visits":!0,class:"!p-2"},{caption:H(({inventory:p})=>[A("div",_xe,[["inventory","edition"].includes(p.type)?(k(),W("div",Sxe,[A("div",xxe,ye(p.artist),1),A("div",null,ye(c(p)),1)])):(k(),W("div",Exe,ye(p.title),1))])]),_:2},1032,["cards"])])]),_:1},8,["data","data-count","columns","loading"])])):(k(),W("div",Txe,[$(y(Ul))]))]))}}),Cxe=ee({__name:"LinkDeletionDialog",props:{linkId:{},isOpen:{type:Boolean}},emits:["cancel","confirm"],setup(e){return(t,n)=>(k(),X(y(UU),{open:t.isOpen},{default:H(()=>[$(y(WU),{class:"!z-[51] !max-w-md",onInteractOutside:n[3]||(n[3]=r=>t.$emit("cancel"))},{default:H(()=>[$(y(qU),null,{default:H(()=>[$(y(GU),{class:"flex flex-col"},{default:H(()=>[$(y(EO),{class:"w-5 cursor-pointer ml-auto",onClick:n[0]||(n[0]=r=>t.$emit("cancel"))}),A("div",null,ye(t.$t("messages.deletelink")),1)]),_:1}),$(y(KU),{class:"flex flex-col items-center"},{default:H(()=>[A("div",null,ye(t.$t("messages.confirmDeleteLink")),1)]),_:1})]),_:1}),$(y(YU),{class:"!justify-end items-right gap-y-2"},{default:H(()=>[$(y(JU),{onClick:n[1]||(n[1]=r=>t.$emit("cancel"))},{default:H(()=>[Ye(ye(t.$t("actions.cancel")),1)]),_:1}),$(y(XU),{class:"bg-danger-500 hover:bg-danger-600",onClick:n[2]||(n[2]=r=>t.$emit("confirm"))},{default:H(()=>[Ye(ye(t.$t("actions.deleteLink")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]))}}),Oxe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},Rxe={class:"ml-2"},Ixe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},Axe={class:"ml-2"},Pxe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},Mxe={class:"ml-2"},Dxe={class:"ml-2"},Nxe={class:"p-2 flex items-center cursor-pointer text-danger-500"},Lxe={class:"ml-2"},yW=ee({__name:"LinkDropdownMenu",props:{linkEnabled:{type:Boolean},disablePreview:{type:Boolean,default:!1},disableEdit:{type:Boolean,default:!1}},emits:["edit","delete","toggle","preview"],setup(e){return(t,n)=>(k(),X(y(Cbe),null,{default:H(()=>[$(y(Obe),{"as-child":"",onClick:n[0]||(n[0]=r=>r.stopPropagation())},{default:H(()=>[$(y(Yve),{class:"w-7 p-1 text-secondary-500 border border-secondary-500 rounded-md cursor-pointer"})]),_:1}),$(y(Ibe),{class:"w-56"},{default:H(()=>[t.disablePreview?fe("",!0):(k(),X(y(lv),{key:0,class:"py-0",onClick:n[1]||(n[1]=r=>t.$emit("preview"))},{default:H(()=>[A("div",Oxe,[$(y(tR),{class:"w-6 mr-2"}),A("span",Rxe,ye(t.$t("actions.previewLink")),1)])]),_:1})),t.disableEdit?fe("",!0):(k(),X(y(lv),{key:1,class:"py-0",onClick:n[2]||(n[2]=r=>t.$emit("edit"))},{default:H(()=>[A("div",Ixe,[$(y(eR),{class:"w-6 mr-2"}),A("span",Axe,ye(t.$t("actions.editSettings")),1)])]),_:1})),$(y(lv),{class:"py-0",onClick:n[3]||(n[3]=r=>t.$emit("toggle"))},{default:H(()=>[A("div",Pxe,[t.linkEnabled?(k(),W(je,{key:0},[$(y(Rb),{class:"w-6 mr-2"}),A("span",Mxe,ye(t.$t("actions.disableLink")),1)],64)):(k(),W(je,{key:1},[$(y(xU),{class:"w-6 mr-2"}),A("span",Dxe,ye(t.$t("actions.enableLink")),1)],64))])]),_:1}),$(y(Abe)),$(y(lv),{class:"py-0",onClick:n[4]||(n[4]=r=>t.$emit("delete"))},{default:H(()=>[A("div",Nxe,[$(y(Rb),{class:"w-6 mr-2"}),A("span",Lxe,ye(t.$t("actions.deleteLink")),1)])]),_:1})]),_:1})]),_:1}))}}),Fxe=ee({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(Lue),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),Bxe={id:"radix-css-container"},zxe=ee({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Bue),null,{default:H(()=>[A("div",Bxe,[$(y(zue),Fe(y(s),{class:y(st)("z-50 min-w-32 overflow-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md animate-in fade-in-80 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-[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 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"])])]),_:3}))}}),pv=ee({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y($ue),Fe(y(s),{class:y(st)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",o.inset&&"pl-8",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"]))}}),$xe=ee({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(Hue),Fe(n.value,{class:y(st)("-mx-1 my-1 h-px bg-slate-200 dark:bg-slate-800",t.class)}),null,16,["class"]))}}),Hxe=ee({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=ai(e);return(r,i)=>(k(),X(y(Fue),Pt(Ft(y(n))),{default:H(()=>[ce(r.$slots,"default")]),_:3},16))}}),Vxe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},jxe={class:"ml-2"},Uxe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},Wxe={class:"ml-2"},qxe={class:"p-2 flex items-center cursor-pointer text-secondary-500"},Gxe={class:"ml-2"},Kxe={class:"ml-2"},Yxe={class:"p-2 flex items-center cursor-pointer text-danger-500"},Xxe={class:"ml-2"},Jxe=ee({__name:"LinkContextMenu",props:{linkEnabled:{type:Boolean},disablePreview:{type:Boolean,default:!1},disableEdit:{type:Boolean,default:!1}},emits:["edit","delete","toggle","preview"],setup(e){return(t,n)=>(k(),X(y(Fxe),null,{default:H(()=>[$(y(Hxe),{"as-child":!0,onClick:n[0]||(n[0]=r=>r.stopPropagation())},{default:H(()=>[ce(t.$slots,"trigger")]),_:3}),$(y(zxe),{class:"w-56"},{default:H(()=>[t.disablePreview?fe("",!0):(k(),X(y(pv),{key:0,class:"py-0",onClick:n[1]||(n[1]=r=>t.$emit("preview"))},{default:H(()=>[A("div",Vxe,[$(y(tR),{class:"w-6 mr-2"}),A("span",jxe,ye(t.$t("actions.previewLink")),1)])]),_:1})),t.disableEdit?fe("",!0):(k(),X(y(pv),{key:1,class:"py-0",onClick:n[2]||(n[2]=r=>t.$emit("edit"))},{default:H(()=>[A("div",Uxe,[$(y(eR),{class:"w-6 mr-2"}),A("span",Wxe,ye(t.$t("actions.editSettings")),1)])]),_:1})),$(y(pv),{class:"py-0",onClick:n[3]||(n[3]=r=>t.$emit("toggle"))},{default:H(()=>[A("div",qxe,[t.linkEnabled?(k(),W(je,{key:0},[$(y(Rb),{class:"w-6 mr-2"}),A("span",Gxe,ye(t.$t("actions.disableLink")),1)],64)):(k(),W(je,{key:1},[$(y(xU),{class:"w-6 mr-2"}),A("span",Kxe,ye(t.$t("actions.enableLink")),1)],64))])]),_:1}),$(y($xe)),$(y(pv),{class:"py-0",onClick:n[4]||(n[4]=r=>t.$emit("delete"))},{default:H(()=>[A("div",Yxe,[$(y(Rb),{class:"w-6 mr-2"}),A("span",Xxe,ye(t.$t("actions.deleteLink")),1)])]),_:1})]),_:1})]),_:3}))}}),Qxe={class:"flex mb-2 items-center flex-wrap-reverse"},Zxe={class:"font-normal text-secondary-500 w-full sm:w-1/2 md:1/3"},e1e={class:"sm:ml-auto mr-3"},t1e={class:"font-normal"},n1e={class:"w-full shadow shadow-gray-800/10 rounded-md text-sm"},r1e=["colSpan"],i1e={class:"text-left border cursor-pointer hover:bg-info-50"},s1e=["onClick"],o1e={key:2},a1e=["colSpan"],l1e={class:"flex items-center justify-center py-4 space-x-4"},u1e={class:"text-sm text-secondary-500 mr-2"},c1e=ee({__name:"LinkTable",props:{data:{},dataCount:{},columns:{},listId:{},pageSize:{},loading:{type:Boolean,default:!1}},emits:["link-clicked","search","create-link","toggle-link","delete-link","fetch-more","sort-by"],setup(e,{expose:t,emit:n}){const r=e,i=n,s=Ur(),o=Aa(),{data:a}=fn(r),l=U([]);He(()=>l.value,()=>{i("sort-by",l.value),u.value.pageIndex=0});const u=U({pageIndex:0,pageSize:r.pageSize});He(()=>u.value.pageIndex,()=>{i("fetch-more",u.value.pageIndex)});const c=S=>{window.open(_(S),"_blank")},d=S=>{o.push({name:"ovr-edit",params:{id:S}})},f=S=>{i("delete-link",S)},h=(S,I)=>{i("toggle-link",S,I)},p=S=>{S.original.enabled?s.track("OVR tracking - link context menu - disable link"):s.track("OVR tracking - link context menu - enable link"),h(S.original.id,S.original.enabled)},m=()=>{r.listId?(s.track("Create OVR - List view"),o.push({name:"ovr-create",query:{type:"ovr",list_id:r.listId}})):(s.track("Create OVR - All Links"),i("create-link"))},g=c4({get columns(){const S={id:"actions",cell:I=>We("div",{class:"flex items-center gap-2 float-right"},[...I.row.original.enabled?[We(kU,{content:_(I.row.original),onCopy:()=>{s.track("OVR tracking - links table - copy link")}})]:[We(q4,{onReenable:()=>{h(I.row.original.id,I.row.original.enabled),s.track("OVR tracking - links table - enable link")}})],We(yW,{linkEnabled:I.row.original.enabled,onEdit:()=>{d(I.row.original.id),s.track("OVR tracking - links table - edit")},onToggle:()=>{I.row.original.enabled?s.track("OVR tracking - links table - disable link"):s.track("OVR tracking - links table - enable link"),h(I.row.original.id,I.row.original.enabled)},onDelete:()=>{f(I.row.original.id),s.track("OVR tracking - links table - delete link")},onPreview:()=>{c(I.row.original),s.track("OVR tracking - links table - preview")}})])};return[...r.columns,S]},data:a,rowCount:r.dataCount,getCoreRowModel:a4(),getPaginationRowModel:u4(),manualPagination:!0,manualSorting:!0,onPaginationChange:S=>pp(S,u),onSortingChange:S=>pp(S,l),state:{get pagination(){return u.value},get sorting(){return l.value}}}),v=U(""),w=()=>{i("search",v.value),u.value.pageIndex=0,s.track("OVR tracking - links table - search")},b=()=>{i("search",""),u.value.pageIndex=0},_=S=>`https://preview.arternal.com/${S.id}/${S.slug}`,x=te(()=>{const S=u.value.pageIndex+1,I=Math.ceil(r.dataCount/u.value.pageSize);return S<I});return t({pagination:u,searchString:v,sorting:l}),(S,I)=>{var P;return k(),W(je,null,[A("div",Qxe,[A("div",Zxe,[$(y(sEe),{modelValue:v.value,"onUpdate:modelValue":I[0]||(I[0]=R=>v.value=R),class:"max-w-sm",onSearch:w,onClear:b},null,8,["modelValue"])]),A("div",e1e,[$(y(gt),{type:"button",class:"flex items-center gap-2 p-2 float-right border border-secondary-500 text-secondary-500 bg-transparent",variant:"secondary",size:"sm",onClick:m},{default:H(()=>[$(y(fb),{class:"w-5"}),A("span",t1e,ye(S.$t("actions.createOVR")),1)]),_:1})])]),A("table",n1e,[A("thead",null,[(k(!0),W(je,null,Ot(y(g).getHeaderGroups(),R=>(k(),W("tr",{key:R.id,class:"bg-secondary-50 text-left"},[(k(!0),W(je,null,Ot(R.headers,O=>(k(),W("th",{key:O.id,colSpan:O.colSpan,class:"p-4 font-semibold text-secondary-500"},[$(y(Ib),{render:O.column.columnDef.header,props:O.getContext()},null,8,["render","props"])],8,r1e))),128))]))),128))]),A("tbody",null,[S.loading?(k(!0),W(je,{key:0},Ot(S.pageSize,R=>(k(),W("tr",{key:R},[(k(!0),W(je,null,Ot(S.columns.length,O=>(k(),W("td",{key:O,class:"p-3"},[$(y(f4),{class:"h-5"})]))),128))]))),128)):(P=y(g).getRowModel().rows)!=null&&P.length?(k(!0),W(je,{key:1},Ot(y(g).getRowModel().rows,R=>(k(),X(y(Jxe),{key:R.id,"link-enabled":R.original.enabled,onPreview:O=>{c(R.original),y(s).track("OVR tracking - link context menu - preview")},onEdit:O=>{d(R.original.id),y(s).track("OVR tracking - link context menu - edit")},onToggle:O=>p(R),onDelete:O=>{f(R.original.id),y(s).track("OVR tracking - link context menu - delete link")}},{trigger:H(()=>[A("tr",i1e,[(k(!0),W(je,null,Ot(R.getVisibleCells(),O=>(k(),W("td",{key:O.id,class:"p-3",onClick:M=>S.$emit("link-clicked",R.original.id)},[$(y(Ib),{render:O.column.columnDef.cell,props:O.getContext()},null,8,["render","props"])],8,s1e))),128))])]),_:2},1032,["link-enabled","onPreview","onEdit","onToggle","onDelete"]))),128)):(k(),W("tr",o1e,[A("td",{colSpan:S.columns.length+1,class:"p-4 text-center text-gray-500"},ye(S.$t("messages.noResultsFound")),9,a1e)]))])]),A("div",l1e,[$(y(gt),{variant:"outline",size:"sm",disabled:!y(g).getCanPreviousPage(),onClick:I[1]||(I[1]=R=>y(g).previousPage())},{default:H(()=>[Ye(ye(S.$t("actions.previous")),1)]),_:1},8,["disabled"]),A("div",u1e,ye(S.$t("tables.shared.footers.pageNumberAndCount",{pageNumber:u.value.pageIndex+1,pageCount:Math.max(Math.ceil(r.dataCount/r.pageSize),1)})),1),$(y(gt),{variant:"outline",size:"sm",disabled:!y(g).getCanNextPage()||!x.value,onClick:I[2]||(I[2]=R=>y(g).nextPage())},{default:H(()=>[Ye(ye(S.$t("actions.next")),1)]),_:1},8,["disabled"])])],64)}}}),d1e={class:"fixed inset-0 flex overflow-auto"},f1e={class:"m-auto w-full p-5"},h1e={class:"flex items-center justify-between gap-3"},p1e={key:0,class:"space-x-2 text-right"},bW=ee({__name:"ModalDialog",props:{open:{type:Boolean},title:{},noAutoClose:{type:Boolean},cancelable:{type:Boolean},cancelText:{},confirmable:{type:Boolean},confirmText:{},closeable:{type:Boolean}},emits:["confirm","cancel","close","toggle"],setup(e,{emit:t}){const n=e,r=t,i=U(!1);He(()=>n.open,c=>{i.value=c},{immediate:!0});const s=c=>{i.value=c},o=(c=!1)=>{!n.closeable&&!c||(s(!1),r("close"),r("toggle",!1))},a=()=>{r("confirm"),n.noAutoClose||o(!0)},l=()=>{r("cancel"),o()};wU("Escape",c=>{c.preventDefault(),o()});const u=U(!1);return nt(()=>{u.value=!0}),(c,d)=>u.value?(k(),X(Ff,{key:0,to:"#modals"},[$(y(CR),{show:i.value,as:"template"},{default:H(()=>[$(y(k_e),{class:"relative z-50",onClose:o},{default:H(()=>[$(y(AT),{enter:"duration-200 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:H(()=>[A("div",{class:"fixed inset-0 bg-gray-900/80","aria-hidden":"true",onClick:d[0]||(d[0]=f=>o(!1))})]),_:1}),A("div",d1e,[$(y(AT),{as:"template",enter:"duration-200 ease-out","enter-from":"opacity-0 translate-y-5","enter-to":"opacity-100 translate-y-0",leave:"duration-200 ease-in","leave-from":"opacity-100 translate-y-0","leave-to":"opacity-0 translate-y-5"},{default:H(()=>[A("div",f1e,[$(y(C_e),{class:"m-auto flex w-full max-w-lg flex-col gap-5 rounded-lg bg-white p-5 shadow-lg shadow-black/20 dark:bg-gray-800"},{default:H(()=>[A("header",h1e,[$(y(O_e),{class:"text-base font-semibold"},{default:H(()=>[Ye(ye(c.title),1)]),_:1}),c.closeable?(k(),X(y(ly),{key:0,size:"sm",outline:"",class:"flex h-8 w-8 items-center justify-center rounded-full !p-0",onClick:o},{default:H(()=>[$(y(W4),{class:"h-5 w-5"})]),_:1})):fe("",!0)]),A("div",null,[ce(c.$slots,"default")]),c.cancelable||c.confirmable?(k(),W("footer",p1e,[c.cancelable?(k(),X(y(ly),{key:0,outline:"",onClick:l},{default:H(()=>[Ye(ye(c.cancelText??c.$t("actions.cancel")),1)]),_:1})):fe("",!0),c.confirmable?(k(),X(y(ly),{key:1,variant:"primary",onClick:a},{default:H(()=>[Ye(ye(c.confirmText??c.$t("actions.confirm")),1)]),_:1})):fe("",!0)])):fe("",!0)]),_:3})])]),_:3})])]),_:3})]),_:3},8,["show"])])):fe("",!0)}});function m1e(e,t,n,r="/",i="none"){const s=new Date;s.setTime(s.getTime()+n*24*60*60*1e3);const o=`expires=${s.toUTCString()}`;document.cookie=`${e}=${t}; ${o}; path=${r}; samesite=${i}`}function g1e(e){return new RegExp(`(^|; )${e}=`).test(document.cookie)}const v1e={class:"space-y-4"},y1e=["src","alt"],b1e={key:1,class:"font-semibold"},w1e={class:"max-w-sm break-words"},_1e={class:"space-y-3"},S1e={key:0,class:"text-red-500 text-sm px-2"},x1e={class:"flex items-center justify-center space-x-3"},E1e=ee({__name:"AskEmailModal",props:{ovr:{}},setup(e){const t=U(!0),n=U(""),r=U({}),i=U(!1),s=U(!1),o=te(()=>{var h,p;const d=((h=e.ovr.organization)==null?void 0:h.json_setting)&&((p=e.ovr.organization.json_setting.ovr_header)==null?void 0:p.default);if(!d)return null;const f=RegExp(/src=["']([^"']+)["']/).exec(d);return f?f&&f[1].replaceAll("\\",""):d}),a=d=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(d).toLowerCase()),l=()=>{r.value={};let d=!0;return n.value.trim()?a(n.value)||(r.value.email="Email is not valid",d=!1):(r.value.email="Email is required",d=!1),d},u=()=>{var d,f;if(s.value=!0,l()){i.value=!1;const h={email:n.value.toLowerCase(),inventorySetUrl:(f=(d=e.ovr)==null?void 0:d.inventory_set)==null?void 0:f.public_url,createContact:"true",sessionId:sessionStorage.getItem("session_id")||null};Rn.post("https://api.arternal.com/roominquiry",h).then(()=>{i.value=!0,m1e("emailCollected","true",365,`/${e.ovr.id}/${e.ovr.slug}`,"strict"),c()}).catch(p=>{i.value=!1,console.error("Error submitting inquiry",p)}).finally(()=>{s.value=!1})}else s.value=!1},c=()=>{t.value=!1};return(d,f)=>(k(),X(bW,{closeable:!1,open:t.value,title:""},{default:H(()=>{var h,p,m;return[A("form",{class:"space-y-5",role:"form",onSubmit:lt(u,["prevent"])},[A("div",v1e,[o.value?(k(),W("img",{key:0,src:o.value,alt:(h=d.ovr.organization)==null?void 0:h.name,class:"w-full"},null,8,y1e)):(k(),W("h2",b1e,ye((p=d.ovr.organization)==null?void 0:p.name),1)),A("h4",w1e,ye((m=d.ovr)==null?void 0:m.title),1)]),A("div",_1e,[At(A("input",{"onUpdate:modelValue":f[0]||(f[0]=g=>n.value=g),type:"email",placeholder:"Enter your email",class:"w-full p-2 border border-gray-300 rounded-md",autofocus:""},null,512),[[pi,n.value]]),r.value.email?(k(),W("span",S1e,ye(r.value.email),1)):fe("",!0)]),$(ly,{variant:"primary",class:"w-full !bg-gray-800 text-white",type:"submit"},{default:H(()=>[A("div",x1e,[f[1]||(f[1]=A("span",null,"Enter Online Viewing Room",-1)),s.value?(k(),X(Ul,{key:0})):fe("",!0)])]),_:1})],32)]}),_:1},8,["open"]))}}),T1e={class:"flex items-center gap-3"},k1e={class:"ml-auto"},C1e=ee({__name:"PageHeader",props:{title:{default:""},breadcrumbs:{default:()=>[]}},setup(e){return(t,n)=>(k(),W("header",null,[$(y(jve),{"trailing-separator":"",class:"text-muted mr-4 mb-4",items:t.breadcrumbs},null,8,["items"]),A("div",T1e,[ce(t.$slots,"default",{},()=>[A("h1",null,ye(t.title),1)]),A("div",k1e,[ce(t.$slots,"actions")]),t.$slots.menu?(k(),X(y(j_e),{key:0,"menu-class":"right-0","button-class":"p-2 rounded hover:bg-primary-500 focus:bg-primary-500 transition-colors duration-200 ease-in-out outline-none focus:outline-none"},{default:H(()=>[ce(t.$slots,"menu")]),_:3})):fe("",!0)])]))}}),O1e="modulepreload",R1e=function(e){return"/"+e},CL={},I1e=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=R1e(l),l in CL)return;CL[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":O1e,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};/*! * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com * (c) 2024 Dmytro Semenov */function jh(e,t,n){const r=document.createElement(t);return e&&(r.className=e),n&&n.appendChild(r),r}function A1e(e,t,n){let r=`translate3d(${e}px,0px,0)`;return n!==void 0&&(r+=` scale3d(${n},${n},1)`),r}function NT(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}const Vi={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function P1e(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function Uh(e,t,n=document){let r=[];if(e instanceof Element)r=[e];else if(e instanceof NodeList||Array.isArray(e))r=Array.from(e);else{const i=typeof e=="string"?e:t;i&&(r=Array.from(n.querySelectorAll(i)))}return r}function M1e(e){return typeof e=="function"&&e.prototype&&e.prototype.goTo}function OL(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class D1e{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class N1e{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,r=100){var i,s,o;this._filters[t]||(this._filters[t]=[]),(i=this._filters[t])===null||i===void 0||i.push({fn:n,priority:r}),(s=this._filters[t])===null||s===void 0||s.sort((a,l)=>a.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(t,n,r)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(r=>r.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var r;return(r=this._filters[t])===null||r===void 0||r.forEach(i=>{n[0]=i.fn.apply(this,n)}),n[0]}on(t,n){var r,i;this._listeners[t]||(this._listeners[t]=[]),(r=this._listeners[t])===null||r===void 0||r.push(n),(i=this.pswp)===null||i===void 0||i.on(t,n)}off(t,n){var r;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(i=>n!==i)),(r=this.pswp)===null||r===void 0||r.off(t,n)}dispatch(t,n){var r;if(this.pswp)return this.pswp.dispatch(t,n);const i=new D1e(t,n);return(r=this._listeners[t])===null||r===void 0||r.forEach(s=>{s.call(this,i)}),i}}let L1e=class{constructor(t,n){if(this.element=jh("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const r=this.element;r.decoding="async",r.alt="",r.src=t,r.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(NT(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=A1e(0,0,t/250)):NT(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}};class F1e{constructor(t,n,r){this.instance=n,this.data=t,this.index=r,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Vi.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){const r=this.placeholder.element;r&&!r.parentElement&&this.slide.container.prepend(r)}else{const r=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new L1e(r,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=jh("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=jh("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,r;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const i=this.element;this.updateSrcsetSizes(),this.data.srcset&&(i.srcset=this.data.srcset),i.src=(n=this.data.src)!==null&&n!==void 0?n:"",i.alt=(r=this.data.alt)!==null&&r!==void 0?r:"",this.state=Vi.LOADING,i.complete?this.onLoaded():(i.onload=()=>{this.onLoaded()},i.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=Vi.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Vi.LOADED||this.state===Vi.ERROR)&&this.removePlaceholder())}onError(){this.state=Vi.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Vi.LOADING,this)}isError(){return this.state===Vi.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,n),!this.instance.dispatch("contentResize",{content:this,width:t,height:n}).defaultPrevented&&(NT(this.element,t,n),this.isImageContent()&&!this.isError()))){const r=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,r?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Vi.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||n>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=n+"px",t.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,n;let r=jh("pswp__error-msg","div");r.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",r=this.instance.applyFilters("contentErrorElement",r,this),this.element=jh("pswp__content pswp__error-msg-container","div"),this.element.appendChild(r),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Vi.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||OL())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!OL()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Vi.LOADED||this.state===Vi.ERROR)&&this.removePlaceholder()))}}function B1e(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function mv(e,t,n,r,i){let s=0;if(t.paddingFn)s=t.paddingFn(n,r,i)[e];else if(t.padding)s=t.padding[e];else{const o="padding"+e[0].toUpperCase()+e.slice(1);t[o]&&(s=t[o])}return Number(s)||0}function z1e(e,t,n,r){return{x:t.x-mv("left",e,t,n,r)-mv("right",e,t,n,r),y:t.y-mv("top",e,t,n,r)-mv("bottom",e,t,n,r)}}const RL=4e3;class $1e{constructor(t,n,r,i){this.pswp=i,this.options=t,this.itemData=n,this.index=r,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,n,r){const i={x:t,y:n};this.elementSize=i,this.panAreaSize=r;const s=r.x/i.x,o=r.y/i.y;this.fit=Math.min(1,s<o?s:o),this.fill=Math.min(1,s>o?s:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const n=t+"ZoomLevel",r=this.options[n];if(r)return typeof r=="function"?r(this):r==="fill"?this.fill:r==="fit"?this.fit:Number(r)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>RL&&(t=RL/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function wW(e,t,n){const r=t.createContentFromData(e,n);let i;const{options:s}=t;if(s){i=new $1e(s,e,-1);let o;t.pswp?o=t.pswp.viewportSize:o=B1e(s,t);const a=z1e(s,o,e,n);i.update(r.width,r.height,a)}return r.lazyLoad(),i&&r.setDisplayedSize(Math.ceil(r.width*i.initial),Math.ceil(r.height*i.initial)),r}function H1e(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return wW(n,t,e)}class V1e extends N1e{getNumItems(){var t;let n=0;const r=(t=this.options)===null||t===void 0?void 0:t.dataSource;r&&"length"in r?n=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(n=r.items.length));const i=this.dispatch("numItems",{dataSource:r,numItems:n});return this.applyFilters("numItems",i.numItems,r)}createContentFromData(t,n){return new F1e(t,this,n)}getItemData(t){var n;const r=(n=this.options)===null||n===void 0?void 0:n.dataSource;let i={};Array.isArray(r)?i=r[t]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),i=r.items[t]);let s=i;s instanceof Element&&(s=this._domElementToItemData(s));const o=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){var n,r;return(n=this.options)!==null&&n!==void 0&&n.children||(r=this.options)!==null&&r!==void 0&&r.childSelector?Uh(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},r=t.tagName==="A"?t:t.querySelector("a");if(r){n.src=r.dataset.pswpSrc||r.href,r.dataset.pswpSrcset&&(n.srcset=r.dataset.pswpSrcset),n.width=r.dataset.pswpWidth?parseInt(r.dataset.pswpWidth,10):0,n.height=r.dataset.pswpHeight?parseInt(r.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,r.dataset.pswpType&&(n.type=r.dataset.pswpType);const s=t.querySelector("img");if(s){var i;n.msrc=s.currentSrc||s.src,n.alt=(i=s.getAttribute("alt"))!==null&&i!==void 0?i:""}(r.dataset.pswpCropped||r.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,r)}lazyLoadData(t,n){return wW(t,this,n)}}class j1e extends V1e{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Uh(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(P1e(t)||window.pswp)return;let n={x:t.clientX,y:t.clientY};!n.x&&!n.y&&(n=null);let r=this.getClickedIndex(t);r=this.applyFilters("clickedIndex",r,t,this);const i={gallery:t.currentTarget};r>=0&&(t.preventDefault(),this.loadAndOpen(r,i,n))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const n=t.target,i=Uh(this.options.children,this.options.childSelector,t.currentTarget).findIndex(s=>s===n||s.contains(n));return i!==-1?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,n,r){if(window.pswp||!this.options)return!1;if(!n&&this.options.gallery&&this.options.children){const i=Uh(this.options.gallery);i[0]&&(n={gallery:i[0]})}return this.options.index=t,this.options.initialPointerPos=r,this.shouldOpen=!0,this.preload(t,n),!0}preload(t,n){const{options:r}=this;n&&(r.dataSource=n);const i=[],s=typeof r.pswpModule;if(M1e(r.pswpModule))i.push(Promise.resolve(r.pswpModule));else{if(s==="string")throw new Error("pswpModule as string is no longer supported");if(s==="function")i.push(r.pswpModule());else throw new Error("pswpModule is not valid")}typeof r.openPromise=="function"&&i.push(r.openPromise()),r.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=H1e(t,this));const o=++this._uid;Promise.all(i).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,o)}})}_openPhotoswipe(t,n){if(n!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const r=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=r,window.pswp=r,Object.keys(this._listeners).forEach(i=>{var s;(s=this._listeners[i])===null||s===void 0||s.forEach(o=>{r.on(i,o)})}),Object.keys(this._filters).forEach(i=>{var s;(s=this._filters[i])===null||s===void 0||s.forEach(o=>{r.addFilter(i,o.fn,o.priority)})}),this._preloadedContent&&(r.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),r.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),r.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},Uh(this.options.gallery,this.options.gallerySelector).forEach(n=>{n.removeEventListener("click",this.onThumbnailsClick,!1)})}}const U1e={videoAttributes:{controls:"",playsinline:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function ji(e){return e&&e.data&&e.data.type==="video"}class W1e{constructor(t,n){this.options=n,this.initLightboxEvents(t),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(n,r,i)=>(n.type==="video"&&i&&(i.dataset.pswpVideoSources?n.videoSources=JSON.parse(pswpVideoSources):i.dataset.pswpVideoSrc?n.videoSrc=i.dataset.pswpVideoSrc:n.videoSrc=i.href),n))}initPswpEvents(t){t.on("pointerDown",n=>{const r=t.currSlide;if(ji(r)&&this.options.preventDragOffset){const i=n.originalEvent;if(i.type==="pointerdown"){const o=Math.ceil(r.height*r.currZoomLevel)+r.bounds.center.y,a=i.pageY-t.offset.y;a>o-this.options.preventDragOffset&&a<o&&n.preventDefault()}}}),t.on("appendHeavy",n=>{ji(n.slide)&&!n.slide.isActive&&n.preventDefault()}),t.on("close",()=>{ji(t.currSlide.content)&&((!t.options.showHideAnimationType||t.options.showHideAnimationType==="zoom")&&(t.options.showHideAnimationType="fade"),this.pauseVideo(t.currSlide.content))})}onContentDestroy({content:t}){ji(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}onContentResize(t){if(ji(t.content)){t.preventDefault();const n=t.width,r=t.height,i=t.content;if(i.element&&(i.element.style.width=n+"px",i.element.style.height=r+"px"),i.slide&&i.slide.placeholder){const s=i.slide.placeholder.element.style;s.transform="none",s.width=n+"px",s.height=r+"px"}}}isKeepingPlaceholder(t,n){return ji(n)?!1:t}isContentZoomable(t,n){return ji(n)?!1:t}onContentActivate({content:t}){ji(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){ji(t)&&this.pauseVideo(t)}onContentAppend(t){ji(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}onContentLoad(t){const n=t.content;if(ji(t.content)&&(t.preventDefault(),!n.element)){if(n.state="loading",n.type="video",n.element=document.createElement("video"),this.options.videoAttributes)for(let r in this.options.videoAttributes)n.element.setAttribute(r,this.options.videoAttributes[r]||"");n.element.setAttribute("poster",n.data.msrc),this.preloadVideoPoster(n,n.data.msrc),n.element.style.position="absolute",n.element.style.left=0,n.element.style.top=0,n.data.videoSources?n.data.videoSources.forEach(r=>{let i=document.createElement("source");i.src=r.src,i.type=r.type,n.element.appendChild(i)}):n.data.videoSrc&&(n.element.src=n.data.videoSrc)}}preloadVideoPoster(t,n){!t._videoPosterImg&&n&&(t._videoPosterImg=new Image,t._videoPosterImg.src=n,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&t.element.play()}pauseVideo(t){t.element&&t.element.pause()}useContentPlaceholder(t,n){return ji(n)?!0:t}}class q1e{constructor(t,n){new W1e(t,{...U1e,...n})}}const G1e=["id"],K1e=["href","data-pswp-width","data-pswp-height","data-pswp-type"],Y1e=["src"],RR=ee({__name:"PhotoSwipeGallery",props:{id:{},inventories:{default:()=>[]}},setup(e,{expose:t}){const n=e,r=U(null),i=U(null),s=U({}),o=U({}),{toast:a}=$s();nt(()=>{r.value=new j1e({gallery:"#"+n.id,children:"a",pswpModule:()=>I1e(()=>import("./photoswipe.esm-CMg0yb1C.js"),[]),bgOpacity:.9,showHideAnimationType:"none"}),r.value.on("uiRegister",()=>{var h,p;(p=(h=r.value)==null?void 0:h.pswp)!=null&&p.ui&&r.value.pswp.ui.registerElement({name:"download-button",order:8,isButton:!0,tagName:"a",html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download"><path id="pswp__icn-download" d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>',onInit:(m,g)=>{const v=m;v.setAttribute("download",""),v.setAttribute("target","_blank"),v.setAttribute("rel","noopener"),v.setAttribute("style","display:flex;justify-content:center;align-items:center;color:#f5f5f5"),g.on("change",()=>{var b;const w=(b=g==null?void 0:g.currSlide)==null?void 0:b.data.src;if(w){const _=w.replace(/fit-in\/[^/]+\//,"");v.href=_}})}})}),i.value=new q1e(r.value,{videoAttributes:{controls:"",preload:"auto"}}),r.value.init()}),yr(()=>{var h;(h=r.value)==null||h.destroy(),r.value=null});const l=h=>new Promise((p,m)=>{const g=new Image;g.onload=()=>{p(g)},g.onerror=m,g.src=h}),u=h=>new Promise((p,m)=>{const g=document.createElement("video");g.onloadedmetadata=()=>{document.body.removeChild(g),p({width:g.videoWidth,height:g.videoHeight})},g.onerror=v=>{document.body.removeChild(g),m(v)},document.body.appendChild(g),g.src=h}),c=h=>{(!s.value||!s.value[h])&&a({title:"Please wait for the image to finish loading",variant:"default"}),s.value[h].click()};He(()=>n.inventories,async h=>{if(h){for(const p of h)if(!o.value[p.id]){if(p.video_url){const m=await u(p.video_url);o.value[p.id]={width:m.width,height:m.height}}else if(p.largeImagePreviewUrl){const m=await l(p.largeImagePreviewUrl);o.value[p.id]={width:m.width,height:m.height}}}}},{immediate:!0});const f=te(()=>n.inventories.filter(h=>o.value[h.id]));return t({openImage:c}),(h,p)=>(k(),W("div",{id:n.id},[(k(!0),W(je,null,Ot(f.value,m=>(k(),W("a",{key:m.id,href:m.video_url?m.video_url:m.largeImagePreviewUrl,"data-pswp-width":o.value[m.id]?o.value[m.id].width:0,"data-pswp-height":o.value[m.id]?o.value[m.id].height:0,"data-pswp-type":m.video_url?"video":"image",target:"_blank",rel:"noreferrer"},[A("img",{ref_for:!0,ref:g=>s.value[m.id]=g,src:m.imagePreviewUrl,alt:"thumbnail"},null,8,Y1e)],8,K1e))),128))],8,G1e))}}),X1e={},J1e={class:"mx-auto max-w-md space-y-8 rounded-lg bg-gray-100 p-8 text-center dark:bg-gray-800"},Q1e={key:0},Z1e={key:1,class:"mt-8"},eEe={key:2};function tEe(e,t){return k(),W("div",J1e,[e.$slots.header?(k(),W("header",Q1e,[ce(e.$slots,"header")])):fe("",!0),e.$slots.default?(k(),W("div",Z1e,[ce(e.$slots,"default")])):fe("",!0),e.$slots.actions?(k(),W("hr",eEe)):fe("",!0),ce(e.$slots,"actions")])}const nEe=Ei(X1e,[["render",tEe]]),rEe={class:"flex items-center p-3 rounded-md border-gray-500"},iEe=["value","placeholder"],sEe=ee({__name:"SearchBar",props:{modelValue:{default:""}},emits:["update:modelValue","search","clear"],setup(e,{emit:t}){const n=t,{t:r}=ls(),i=Os(o=>{o.target.value?n("search",o.target.value):n("clear")},500),s=o=>{n("update:modelValue",o.target.value),i(o)};return(o,a)=>(k(),W("div",rEe,[$(y(N0e),{class:"-mr-8 w-6 h-6 z-10 text-gray-400"}),A("input",{type:"search",class:"w-full h-10 !pl-9 py-2 text-sm",value:o.modelValue,placeholder:y(r)("actions.search"),onInput:s,onSearch:a[0]||(a[0]=(...l)=>y(i)&&y(i)(...l))},null,40,iEe)]))}});/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var _W=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Lb=_W.join(","),SW=typeof Element>"u",Ec=SW?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fb=!SW&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Bb=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&e(t.parentNode);return o},oEe=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xW=function(t,n,r){if(Bb(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Lb));return n&&Ec.call(t,Lb)&&i.unshift(t),i=i.filter(r),i},EW=function e(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!Bb(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var c=Ec.call(o,Lb);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var d=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),f=!Bb(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(d&&f){var h=e(d===!0?o.children:d.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else s.unshift.apply(s,o.children)}}return i},TW=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Iu=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||oEe(t))&&!TW(t)?0:t.tabIndex},aEe=function(t,n){var r=Iu(t);return r<0&&n&&!TW(t)?0:r},lEe=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},kW=function(t){return t.tagName==="INPUT"},uEe=function(t){return kW(t)&&t.type==="hidden"},cEe=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},dEe=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},fEe=function(t){if(!t.name)return!0;var n=t.form||Fb(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=dEe(i,t.form);return!s||s===t},hEe=function(t){return kW(t)&&t.type==="radio"},pEe=function(t){return hEe(t)&&!fEe(t)},mEe=function(t){var n,r=t&&Fb(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&i;){var u,c,d;r=Fb(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return s},IL=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},gEe=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ec.call(t,"details>summary:first-of-type"),o=s?t.parentElement:t;if(Ec.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var l=t.parentElement,u=Fb(t);if(l&&!l.shadowRoot&&i(l)===!0)return IL(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(mEe(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return IL(t);return!1},vEe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Ec.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},zb=function(t,n){return!(n.disabled||Bb(n)||uEe(n)||gEe(n,t)||cEe(n)||vEe(n))},LT=function(t,n){return!(pEe(n)||Iu(n)<0||!zb(t,n))},yEe=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},bEe=function e(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=aEe(a,o),u=o?e(i.candidates):a;l===0?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:u})}),r.sort(lEe).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},wEe=function(t,n){n=n||{};var r;return n.getShadowRoot?r=EW([t],n.includeContainer,{filter:LT.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:yEe}):r=xW(t,n.includeContainer,LT.bind(null,n)),bEe(r)},_Ee=function(t,n){n=n||{};var r;return n.getShadowRoot?r=EW([t],n.includeContainer,{filter:zb.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=xW(t,n.includeContainer,zb.bind(null,n)),r},Gc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ec.call(t,Lb)===!1?!1:LT(n,t)},SEe=_W.concat("iframe").join(","),px=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ec.call(t,SEe)===!1?!1:zb(n,t)};/*! * focus-trap 7.6.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */function FT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xEe(e){if(Array.isArray(e))return FT(e)}function EEe(e,t,n){return(t=REe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AL(Object(n),!0).forEach(function(r){EEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CEe(e){return xEe(e)||TEe(e)||IEe(e)||kEe()}function OEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function REe(e){var t=OEe(e,"string");return typeof t=="symbol"?t:t+""}function IEe(e,t){if(e){if(typeof e=="string")return FT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FT(e,t):void 0}}var ML={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r._setPausedState(!0)}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&!t[t.length-1]._isManuallyPaused()&&t[t.length-1]._setPausedState(!1)}},AEe=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},PEe=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Op=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},MEe=function(t){return Op(t)&&!t.shiftKey},DEe=function(t){return Op(t)&&t.shiftKey},DL=function(t){return setTimeout(t,0)},Ih=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof t=="function"?t.apply(void 0,r):t},gv=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},NEe=[],LEe=function(t,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||NEe,s=PL({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:MEe,isKeyBackward:DEe},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,l=function(L,j,F){return L&&L[j]!==void 0?L[j]:s[F||j]},u=function(L,j){var F=typeof(j==null?void 0:j.composedPath)=="function"?j.composedPath():void 0;return o.containerGroups.findIndex(function(B){var Y=B.container,Z=B.tabbableNodes;return Y.contains(L)||(F==null?void 0:F.includes(Y))||Z.find(function(ne){return ne===L})})},c=function(L){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=j.hasFallback,B=F===void 0?!1:F,Y=j.params,Z=Y===void 0?[]:Y,ne=s[L];if(typeof ne=="function"&&(ne=ne.apply(void 0,CEe(Z))),ne===!0&&(ne=void 0),!ne){if(ne===void 0||ne===!1)return ne;throw new Error("`".concat(L,"` was specified but was not a node, or did not return a node"))}var oe=ne;if(typeof ne=="string"){try{oe=r.querySelector(ne)}catch(le){throw new Error("`".concat(L,'` appears to be an invalid selector; error="').concat(le.message,'"'))}if(!oe&&!B)throw new Error("`".concat(L,"` as selector refers to no known node"))}return oe},d=function(){var L=c("initialFocus",{hasFallback:!0});if(L===!1)return!1;if(L===void 0||L&&!px(L,s.tabbableOptions))if(u(r.activeElement)>=0)L=r.activeElement;else{var j=o.tabbableGroups[0],F=j&&j.firstTabbableNode;L=F||c("fallbackFocus")}else L===null&&(L=c("fallbackFocus"));if(!L)throw new Error("Your focus-trap needs to have at least one focusable element");return L},f=function(){if(o.containerGroups=o.containers.map(function(L){var j=wEe(L,s.tabbableOptions),F=_Ee(L,s.tabbableOptions),B=j.length>0?j[0]:void 0,Y=j.length>0?j[j.length-1]:void 0,Z=F.find(function(le){return Gc(le)}),ne=F.slice().reverse().find(function(le){return Gc(le)}),oe=!!j.find(function(le){return Iu(le)>0});return{container:L,tabbableNodes:j,focusableNodes:F,posTabIndexesFound:oe,firstTabbableNode:B,lastTabbableNode:Y,firstDomTabbableNode:Z,lastDomTabbableNode:ne,nextTabbableNode:function(Ee){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Me=j.indexOf(Ee);return Me<0?xe?F.slice(F.indexOf(Ee)+1).find(function(Ve){return Gc(Ve)}):F.slice(0,F.indexOf(Ee)).reverse().find(function(Ve){return Gc(Ve)}):j[Me+(xe?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(L){return L.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(L){return L.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(L){var j=L.activeElement;if(j)return j.shadowRoot&&j.shadowRoot.activeElement!==null?h(j.shadowRoot):j},p=function(L){if(L!==!1&&L!==h(document)){if(!L||!L.focus){p(d());return}L.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=L,AEe(L)&&L.select()}},m=function(L){var j=c("setReturnFocus",{params:[L]});return j||(j===!1?!1:L)},g=function(L){var j=L.target,F=L.event,B=L.isBackward,Y=B===void 0?!1:B;j=j||gv(F),f();var Z=null;if(o.tabbableGroups.length>0){var ne=u(j,F),oe=ne>=0?o.containerGroups[ne]:void 0;if(ne<0)Y?Z=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:Z=o.tabbableGroups[0].firstTabbableNode;else if(Y){var le=o.tabbableGroups.findIndex(function(me){var _e=me.firstTabbableNode;return j===_e});if(le<0&&(oe.container===j||px(j,s.tabbableOptions)&&!Gc(j,s.tabbableOptions)&&!oe.nextTabbableNode(j,!1))&&(le=ne),le>=0){var Ee=le===0?o.tabbableGroups.length-1:le-1,xe=o.tabbableGroups[Ee];Z=Iu(j)>=0?xe.lastTabbableNode:xe.lastDomTabbableNode}else Op(F)||(Z=oe.nextTabbableNode(j,!1))}else{var Me=o.tabbableGroups.findIndex(function(me){var _e=me.lastTabbableNode;return j===_e});if(Me<0&&(oe.container===j||px(j,s.tabbableOptions)&&!Gc(j,s.tabbableOptions)&&!oe.nextTabbableNode(j))&&(Me=ne),Me>=0){var Ve=Me===o.tabbableGroups.length-1?0:Me+1,Ue=o.tabbableGroups[Ve];Z=Iu(j)>=0?Ue.firstTabbableNode:Ue.firstDomTabbableNode}else Op(F)||(Z=oe.nextTabbableNode(j))}}else Z=c("fallbackFocus");return Z},v=function(L){var j=gv(L);if(!(u(j,L)>=0)){if(Ih(s.clickOutsideDeactivates,L)){a.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Ih(s.allowOutsideClick,L)||L.preventDefault()}},w=function(L){var j=gv(L),F=u(j,L)>=0;if(F||j instanceof Document)F&&(o.mostRecentlyFocusedNode=j);else{L.stopImmediatePropagation();var B,Y=!0;if(o.mostRecentlyFocusedNode)if(Iu(o.mostRecentlyFocusedNode)>0){var Z=u(o.mostRecentlyFocusedNode),ne=o.containerGroups[Z].tabbableNodes;if(ne.length>0){var oe=ne.findIndex(function(le){return le===o.mostRecentlyFocusedNode});oe>=0&&(s.isKeyForward(o.recentNavEvent)?oe+1<ne.length&&(B=ne[oe+1],Y=!1):oe-1>=0&&(B=ne[oe-1],Y=!1))}}else o.containerGroups.some(function(le){return le.tabbableNodes.some(function(Ee){return Iu(Ee)>0})})||(Y=!1);else Y=!1;Y&&(B=g({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),p(B||o.mostRecentlyFocusedNode||d())}o.recentNavEvent=void 0},b=function(L){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=L;var F=g({event:L,isBackward:j});F&&(Op(L)&&L.preventDefault(),p(F))},_=function(L){(s.isKeyForward(L)||s.isKeyBackward(L))&&b(L,s.isKeyBackward(L))},x=function(L){PEe(L)&&Ih(s.escapeDeactivates,L)!==!1&&(L.preventDefault(),a.deactivate())},S=function(L){var j=gv(L);u(j,L)>=0||Ih(s.clickOutsideDeactivates,L)||Ih(s.allowOutsideClick,L)||(L.preventDefault(),L.stopImmediatePropagation())},I=function(){if(o.active)return ML.activateTrap(i,a),o.delayInitialFocusTimer=s.delayInitialFocus?DL(function(){p(d())}):p(d()),r.addEventListener("focusin",w,!0),r.addEventListener("mousedown",v,{capture:!0,passive:!1}),r.addEventListener("touchstart",v,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",_,{capture:!0,passive:!1}),r.addEventListener("keydown",x),a},P=function(){if(o.active)return r.removeEventListener("focusin",w,!0),r.removeEventListener("mousedown",v,!0),r.removeEventListener("touchstart",v,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",_,!0),r.removeEventListener("keydown",x),a},R=function(L){var j=L.some(function(F){var B=Array.from(F.removedNodes);return B.some(function(Y){return Y===o.mostRecentlyFocusedNode})});j&&p(d())},O=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(R):void 0,M=function(){O&&(O.disconnect(),o.active&&!o.paused&&o.containers.map(function(L){O.observe(L,{subtree:!0,childList:!0})}))};return a={get active(){return o.active},get paused(){return o.paused},activate:function(L){if(o.active)return this;var j=l(L,"onActivate"),F=l(L,"onPostActivate"),B=l(L,"checkCanFocusTrap");B||f(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,j==null||j();var Y=function(){B&&f(),I(),M(),F==null||F()};return B?(B(o.containers.concat()).then(Y,Y),this):(Y(),this)},deactivate:function(L){if(!o.active)return this;var j=PL({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},L);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,P(),o.active=!1,o.paused=!1,M(),ML.deactivateTrap(i,a);var F=l(j,"onDeactivate"),B=l(j,"onPostDeactivate"),Y=l(j,"checkCanReturnFocus"),Z=l(j,"returnFocus","returnFocusOnDeactivate");F==null||F();var ne=function(){DL(function(){Z&&p(m(o.nodeFocusedBeforeActivation)),B==null||B()})};return Z&&Y?(Y(m(o.nodeFocusedBeforeActivation)).then(ne,ne),this):(ne(),this)},pause:function(L){return o.active?(o.manuallyPaused=!0,this._setPausedState(!0,L)):this},unpause:function(L){return o.active?(o.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,L)):this},updateContainerElements:function(L){var j=[].concat(L).filter(Boolean);return o.containers=j.map(function(F){return typeof F=="string"?r.querySelector(F):F}),o.active&&f(),M(),this}},Object.defineProperties(a,{_isManuallyPaused:{value:function(){return o.manuallyPaused}},_setPausedState:{value:function(L,j){if(o.paused===L)return this;if(o.paused=L,L){var F=l(j,"onPause"),B=l(j,"onPostPause");F==null||F(),P(),M(),B==null||B()}else{var Y=l(j,"onUnpause"),Z=l(j,"onPostUnpause");Y==null||Y(),f(),I(),M(),Z==null||Z()}return this}}}),a.updateContainerElements(t),a};function FEe(e,t={}){let n;const{immediate:r,...i}=t,s=U(!1),o=U(!1),a=f=>n&&n.activate(f),l=f=>n&&n.deactivate(f),u=()=>{n&&(n.pause(),o.value=!0)},c=()=>{n&&(n.unpause(),o.value=!1)},d=te(()=>{const f=rr(e);return sT(f).map(h=>{const p=rr(h);return typeof p=="string"?p:Rd(p)}).filter(mve)});return He(d,f=>{f.length&&(n=LEe(f,{...i,onActivate(){s.value=!0,t.onActivate&&t.onActivate()},onDeactivate(){s.value=!1,t.onDeactivate&&t.onDeactivate()}}),r&&a())},{flush:"post"}),U0(()=>l()),{hasFocus:s,isPaused:o,activate:a,deactivate:l,pause:u,unpause:c}}const BEe={class:"flex"},zEe={ref:"focus"},$Ee=ee({__name:"Sidebar",props:{open:{type:Boolean,default:!1},closeOnRouteChange:{type:Boolean,default:!0},breakpoint:{default:"lg"},sidebarClass:{default:"bg-black"},bodyClass:{default:""},backdropClass:{default:"bg-black/50"},closeClass:{default:""}},emits:["open","close","pin","change"],setup(e,{emit:t}){const n="SSPA"in window,r=e,i=t,s=Ir(),o=U(r.open?"open":"closed"),a=()=>{i("change",o.value),o.value==="open"?i("open",o.value):o.value==="pinned"?i("pin",o.value):i("close",o.value)},l=U(),{activate:u,deactivate:c}=FEe(l);On(()=>{c()});const d=async(b=!0)=>{o.value==="open"||o.value==="pinned"||(o.value="open",a(),await vt(),u(),b&&document.dispatchEvent(new CustomEvent("toggle-universal-nav",{detail:{value:!0}})))},f=async(b=!0)=>{o.value!=="closed"&&(o.value="closed",a(),c(),b&&document.dispatchEvent(new CustomEvent("toggle-universal-nav",{detail:{value:!1}})))},h=()=>{o.value!=="pinned"&&(o.value==="open"?f():d())},p=()=>{o.value!=="pinned"&&(o.value="pinned",a(),c())};He(()=>r.open,b=>{b?d():f()},{immediate:!0}),He(()=>s.path,()=>{o.value==="open"&&r.closeOnRouteChange&&f()}),wU("Escape",b=>{o.value==="open"&&f(),b.preventDefault()});const m=Pve(document.body);He(o,b=>{m.value=b==="open"});const v=Ive(Rve).greaterOrEqual(r.breakpoint);He(v,b=>{b?p():f()},{immediate:!0});const w=b=>{b.detail.value?d(!1):f(!1)};return nt(()=>{n&&document.addEventListener("toggle-sidebar",w)}),yr(()=>{n&&document.removeEventListener("toggle-sidebar",w),(o.value==="open"||o.value==="pinned")&&f()}),(b,_)=>(k(),W("div",BEe,[A("div",zEe,[$(is,{name:"fade","enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:H(()=>[o.value==="open"?(k(),W("div",{key:0,class:Le(["fixed inset-0 h-screen z-10",b.backdropClass]),onClick:_[0]||(_[0]=x=>f())},null,2)):fe("",!0)]),_:1}),$(is,{name:"bump","enter-active-class":"transition-all duration-300","enter-from-class":"opacity-0 scale-50","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition-all duration-300","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-50"},{default:H(()=>[o.value==="open"?(k(),W("button",{key:0,class:Le(["fixed top-2 right-2 z-20 block rounded-full bg-gray-500 p-3 hover:bg-gray-400 focus:bg-gray-400",b.closeClass]),onClick:_[1]||(_[1]=x=>f())},[$(y(W4),{class:"h-6 w-6 text-white"})],2)):fe("",!0)]),_:1}),A("aside",{class:Le(["fixed inset-y-0 h-screen z-10 w-64 overflow-y-hidden border-gray-800 transition transition-transform duration-200 ease-in-out",[b.sidebarClass,o.value==="open"&&n&&"ml-16 z-30",o.value!=="open"&&o.value!=="pinned"&&"-translate-x-[125%] lg:translate-x-0"]])},[ce(b.$slots,"aside",{toggle:h,open:d,close:f,state:o.value})],2)],512),A("div",{class:Le(["grow",[b.bodyClass,"lg:pl-64"]])},[ce(b.$slots,"default",{toggle:h,open:d,close:f,state:o.value})],2)]))}}),Kc=ee({__name:"SidebarItem",props:{icon:{type:[Function,Object]},iconClass:{},disabled:{type:Boolean}},setup(e){return(t,n)=>(k(),X(Rr(t.disabled&&(t.$attrs.to||t.$attrs.href)?"span":t.$attrs.to?"RouterLink":t.$attrs.href?"a":"button"),{class:"my-1 mx-3 flex items-center px-5 py-3 text-black text-sm rounded-md hover:bg-black/5 hover:no-underline focus:bg-black/5 focus:no-underline focus:outline-none","exact-active-class":"!bg-blue-200 !font-semibold",disabled:t.disabled},{default:H(()=>[t.icon?(k(),X(Rr(t.icon),{key:0,class:Le(["mr-2 h-5 w-5 flex-shrink-0",t.iconClass])},null,8,["class"])):fe("",!0),ce(t.$slots,"default")]),_:3},8,["disabled"]))}}),HEe=ee({__name:"WatchEmitter",props:{input:{},immediate:{type:Boolean}},emits:["change"],setup(e,{emit:t}){const n=e,r=t;return He(()=>n.input,i=>{r("change",i)},{immediate:n.immediate}),(i,s)=>null}});var gy={exports:{}},VEe=gy.exports,NL;function jEe(){return NL||(NL=1,function(e){//! openseadragon 5.0.1 //! Built on 2024-12-09 //! Git commit: v5.0.1-0-480de92d //! http://openseadragon.github.io //! License: http://openseadragon.github.io/license/ function t(n){return new t.Viewer(n)}(function(n){n.version={versionStr:"5.0.1",major:parseInt("5",10),minor:parseInt("0",10),revision:parseInt("1",10)};var r={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,s=Object.prototype.hasOwnProperty;n.isFunction=function(o){return n.type(o)==="function"},n.isArray=Array.isArray||function(o){return n.type(o)==="array"},n.isWindow=function(o){return o&&typeof o=="object"&&"setInterval"in o},n.type=function(o){return o==null?String(o):r[i.call(o)]||"object"},n.isPlainObject=function(o){if(!o||t.type(o)!=="object"||o.nodeType||n.isWindow(o)||o.constructor&&!s.call(o,"constructor")&&!s.call(o.constructor.prototype,"isPrototypeOf"))return!1;var a;for(var l in o)a=l;return a===void 0||s.call(o,a)},n.isEmptyObject=function(o){for(var a in o)return!1;return!0},n.freezeObject=function(o){return Object.freeze?n.freezeObject=Object.freeze:n.freezeObject=function(a){return a},n.freezeObject(o)},n.supportsCanvas=function(){var o=document.createElement("canvas");return!!(n.isFunction(o.getContext)&&o.getContext("2d"))}(),n.isCanvasTainted=function(o){var a=!1;try{o.getContext("2d").getImageData(0,0,1,1)}catch{a=!0}return a},n.supportsAddEventListener=function(){return!!(document.documentElement.addEventListener&&document.addEventListener)}(),n.supportsRemoveEventListener=function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)}(),n.supportsEventListenerOptions=function(){var o=0;if(n.supportsAddEventListener)try{var a={get capture(){return o++,!1},get once(){return o++,!1},get passive(){return o++,!1}};window.addEventListener("test",null,a),window.removeEventListener("test",null,a)}catch{o=0}return o>=3}(),n.getCurrentPixelDensityRatio=function(){if(n.supportsCanvas){var o=document.createElement("canvas").getContext("2d"),a=window.devicePixelRatio||1,l=o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1;return Math.max(a,1)/l}else return 1},n.pixelDensityRatio=n.getCurrentPixelDensityRatio()})(t),function(n){n.extend=function(){var l,u,c,d,f,h,p=arguments[0]||{},m=arguments.length,g=!1,v=1;for(typeof p=="boolean"&&(g=p,p=arguments[1]||{},v=2),typeof p!="object"&&!t.isFunction(p)&&(p={}),m===v&&(p=this,--v);v<m;v++)if(l=arguments[v],l!==null||l!==void 0)for(u in l){var w=Object.getOwnPropertyDescriptor(l,u);if(w!==void 0){if(w.get||w.set){Object.defineProperty(p,u,w);continue}d=w.value}else{n.console.warn('Could not copy inherited property "'+u+'".');continue}p!==d&&(g&&d&&(t.isPlainObject(d)||(f=t.isArray(d)))?(c=p[u],f?(f=!1,h=c&&t.isArray(c)?c:[]):h=c&&t.isPlainObject(c)?c:{},p[u]=t.extend(g,h,d)):d!==void 0&&(p[u]=d))}return p};var r=function(){if(typeof navigator!="object")return!1;var l=navigator.userAgent;return typeof l!="string"?!1:l.indexOf("iPhone")!==-1||l.indexOf("iPad")!==-1||l.indexOf("iPod")!==-1};n.extend(n,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!1,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerDblClickDrag:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:r(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,maxTilesPerFrame:1,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorElement:null,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,overlayPreserveContentDirection:!0,opacity:1,compositeOperation:null,drawer:["webgl","canvas","html"],drawerOptions:{webgl:{},canvas:{},html:{},custom:{}},preload:!1,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,tileRetryMax:0,tileRetryDelay:2500,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},delegate:function(l,u){return function(){var c=arguments;return c===void 0&&(c=[]),u.apply(l,c)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(l){return n._viewers.get(this.getElement(l))},getElement:function(l){return typeof l=="string"&&(l=document.getElementById(l)),l},getElementPosition:function(l){var u=new n.Point,c,d;for(l=n.getElement(l),c=n.getElementStyle(l).position==="fixed",d=a(l,c);d;)u.x+=l.offsetLeft,u.y+=l.offsetTop,c&&(u=u.plus(n.getPageScroll())),l=d,c=n.getElementStyle(l).position==="fixed",d=a(l,c);return u},getElementOffset:function(l){l=n.getElement(l);var u=l&&l.ownerDocument,c,d,f={top:0,left:0};return u?(c=u.documentElement,typeof l.getBoundingClientRect<"u"&&(f=l.getBoundingClientRect()),d=u===u.window?u:u.nodeType===9?u.defaultView||u.parentWindow:!1,new n.Point(f.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0),f.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0))):new n.Point},getElementSize:function(l){return l=n.getElement(l),new n.Point(l.clientWidth,l.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(l){return l=n.getElement(l),l.currentStyle}:function(l){return l=n.getElement(l),window.getComputedStyle(l,"")},getCssPropertyWithVendorPrefix:function(l){var u={};return n.getCssPropertyWithVendorPrefix=function(c){if(u[c]!==void 0)return u[c];var d=document.createElement("div").style,f=null;if(d[c]!==void 0)f=c;else for(var h=["Webkit","Moz","MS","O","webkit","moz","ms","o"],p=n.capitalizeFirstLetter(c),m=0;m<h.length;m++){var g=h[m]+p;if(d[g]!==void 0){f=g;break}}return u[c]=f,f},n.getCssPropertyWithVendorPrefix(l)},capitalizeFirstLetter:function(l){return l.charAt(0).toUpperCase()+l.slice(1)},positiveModulo:function(l,u){var c=l%u;return c<0&&(c+=u),c},pointInElement:function(l,u){l=n.getElement(l);var c=n.getElementOffset(l),d=n.getElementSize(l);return u.x>=c.x&&u.x<c.x+d.x&&u.y<c.y+d.y&&u.y>=c.y},getMousePosition:function(l){if(typeof l.pageX=="number")n.getMousePosition=function(u){var c=new n.Point;return c.x=u.pageX,c.y=u.pageY,c};else if(typeof l.clientX=="number")n.getMousePosition=function(u){var c=new n.Point;return c.x=u.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c.y=u.clientY+document.body.scrollTop+document.documentElement.scrollTop,c};else throw new Error("Unknown event mouse position, no known technique.");return n.getMousePosition(l)},getPageScroll:function(){var l=document.documentElement||{},u=document.body||{};if(typeof window.pageXOffset=="number")n.getPageScroll=function(){return new n.Point(window.pageXOffset,window.pageYOffset)};else if(u.scrollLeft||u.scrollTop)n.getPageScroll=function(){return new n.Point(document.body.scrollLeft,document.body.scrollTop)};else if(l.scrollLeft||l.scrollTop)n.getPageScroll=function(){return new n.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new n.Point(0,0);return n.getPageScroll()},setPageScroll:function(l){if(typeof window.scrollTo<"u")n.setPageScroll=function(d){window.scrollTo(d.x,d.y)};else{var u=n.getPageScroll();if(u.x===l.x&&u.y===l.y)return;document.body.scrollLeft=l.x,document.body.scrollTop=l.y;var c=n.getPageScroll();if(c.x!==u.x&&c.y!==u.y){n.setPageScroll=function(d){document.body.scrollLeft=d.x,document.body.scrollTop=d.y};return}if(document.documentElement.scrollLeft=l.x,document.documentElement.scrollTop=l.y,c=n.getPageScroll(),c.x!==u.x&&c.y!==u.y){n.setPageScroll=function(d){document.documentElement.scrollLeft=d.x,document.documentElement.scrollTop=d.y};return}n.setPageScroll=function(d){}}n.setPageScroll(l)},getWindowSize:function(){var l=document.documentElement||{},u=document.body||{};if(typeof window.innerWidth=="number")n.getWindowSize=function(){return new n.Point(window.innerWidth,window.innerHeight)};else if(l.clientWidth||l.clientHeight)n.getWindowSize=function(){return new n.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(u.clientWidth||u.clientHeight)n.getWindowSize=function(){return new n.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return n.getWindowSize()},makeCenteredNode:function(l){l=n.getElement(l);var u=[n.makeNeutralElement("div"),n.makeNeutralElement("div"),n.makeNeutralElement("div")];return n.extend(u[0].style,{display:"table",height:"100%",width:"100%"}),n.extend(u[1].style,{display:"table-row"}),n.extend(u[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),u[0].appendChild(u[1]),u[1].appendChild(u[2]),u[2].appendChild(l),u[0]},makeNeutralElement:function(l){var u=document.createElement(l),c=u.style;return c.background="transparent none",c.border="none",c.margin="0px",c.padding="0px",c.position="static",u},now:function(){return Date.now?n.now=Date.now:n.now=function(){return new Date().getTime()},n.now()},makeTransparentImage:function(l){var u=n.makeNeutralElement("img");return u.src=l,u},setElementOpacity:function(l,u,c){var d,f;l=n.getElement(l),c&&!n.Browser.alpha&&(u=Math.round(u)),n.Browser.opacity?l.style.opacity=u<1?u:"":u<1?(d=Math.round(100*u),f="alpha(opacity="+d+")",l.style.filter=f):l.style.filter=""},setElementTouchActionNone:function(l){l=n.getElement(l),typeof l.style.touchAction<"u"?l.style.touchAction="none":typeof l.style.msTouchAction<"u"&&(l.style.msTouchAction="none")},setElementPointerEvents:function(l,u){l=n.getElement(l),typeof l.style<"u"&&typeof l.style.pointerEvents<"u"&&(l.style.pointerEvents=u)},setElementPointerEventsNone:function(l){n.setElementPointerEvents(l,"none")},addClass:function(l,u){l=n.getElement(l),l.className?(" "+l.className+" ").indexOf(" "+u+" ")===-1&&(l.className+=" "+u):l.className=u},indexOf:function(l,u,c){return Array.prototype.indexOf?this.indexOf=function(d,f,h){return d.indexOf(f,h)}:this.indexOf=function(d,f,h){var p,m=h||0,g;if(!d)throw new TypeError;if(g=d.length,g===0||m>=g)return-1;for(m<0&&(m=g-Math.abs(m)),p=m;p<g;p++)if(d[p]===f)return p;return-1},this.indexOf(l,u,c)},removeClass:function(l,u){var c,d=[],f;for(l=n.getElement(l),c=l.className.split(/\s+/),f=0;f<c.length;f++)c[f]&&c[f]!==u&&d.push(c[f]);l.className=d.join(" ")},normalizeEventListenerOptions:function(l){var u;return typeof l<"u"?typeof l=="boolean"?u=n.supportsEventListenerOptions?{capture:l}:l:u=n.supportsEventListenerOptions?l:typeof l.capture<"u"?l.capture:!1:u=n.supportsEventListenerOptions?{capture:!1}:!1,u},addEvent:function(){if(n.supportsAddEventListener)return function(l,u,c,d){d=n.normalizeEventListenerOptions(d),l=n.getElement(l),l.addEventListener(u,c,d)};if(document.documentElement.attachEvent&&document.attachEvent)return function(l,u,c){l=n.getElement(l),l.attachEvent("on"+u,c)};throw new Error("No known event model.")}(),removeEvent:function(){if(n.supportsRemoveEventListener)return function(l,u,c,d){d=n.normalizeEventListenerOptions(d),l=n.getElement(l),l.removeEventListener(u,c,d)};if(document.documentElement.detachEvent&&document.detachEvent)return function(l,u,c){l=n.getElement(l),l.detachEvent("on"+u,c)};throw new Error("No known event model.")}(),cancelEvent:function(l){l.preventDefault()},eventIsCanceled:function(l){return l.defaultPrevented},stopEvent:function(l){l.stopPropagation()},createCallback:function(l,u){console.error("The createCallback function is deprecated and will be removed in future versions. Please use alternativeFunction instead.");var c=[],d;for(d=2;d<arguments.length;d++)c.push(arguments[d]);return function(){var f=c.concat([]),h;for(h=0;h<arguments.length;h++)f.push(arguments[h]);return u.apply(l,f)}},getUrlParameter:function(l){var u=o[l];return u||null},getUrlProtocol:function(l){var u=l.match(/^([a-z]+:)\/\//i);return u===null?window.location.protocol:u[1].toLowerCase()},createAjaxRequest:function(){if(window.XMLHttpRequest)return n.createAjaxRequest=function(){return new XMLHttpRequest},new XMLHttpRequest;throw new Error("Browser doesn't support XMLHttpRequest.")},makeAjaxRequest:function(l,u,c){var d,f,h,p;n.isPlainObject(l)&&(u=l.success,c=l.error,d=l.withCredentials,f=l.headers,h=l.responseType||null,p=l.postData||null,l=l.url);var m=n.getUrlProtocol(l),g=n.createAjaxRequest();if(!n.isFunction(u))throw new Error("makeAjaxRequest requires a success callback");g.onreadystatechange=function(){g.readyState===4&&(g.onreadystatechange=function(){},g.status>=200&&g.status<300||g.status===0&&m!=="http:"&&m!=="https:"?u(g):n.isFunction(c)?c(g):n.console.error("AJAX request returned %d: %s",g.status,l))};var v=p?"POST":"GET";try{if(g.open(v,l,!0),h&&(g.responseType=h),f)for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&f[w]&&g.setRequestHeader(w,f[w]);d&&(g.withCredentials=!0),g.send(p)}catch(b){n.console.error("%s while making AJAX request: %s",b.name,b.message),g.onreadystatechange=function(){},n.isFunction(c)&&c(g,b)}return g},jsonp:function(l){var u,c=l.url,d=document.head||document.getElementsByTagName("head")[0]||document.documentElement,f=l.callbackName||"openseadragon"+n.now(),h=window[f],p="$1"+f+"$2",m=l.param||"callback",g=l.callback;c=c.replace(/(=)\?(&|$)|\?\?/i,p),c+=(/\?/.test(c)?"&":"?")+m+"="+f,window[f]=function(v){if(h)window[f]=h;else try{delete window[f]}catch{}g&&n.isFunction(g)&&g(v)},u=document.createElement("script"),(l.async!==void 0||l.async!==!1)&&(u.async="async"),l.scriptCharset&&(u.charset=l.scriptCharset),u.src=c,u.onload=u.onreadystatechange=function(v,w){(w||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,d&&u.parentNode&&d.removeChild(u),u=void 0)},d.insertBefore(u,d.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(l){if(window.DOMParser)n.parseXml=function(u){var c=null,d;return d=new DOMParser,c=d.parseFromString(u,"text/xml"),c};else throw new Error("Browser doesn't support XML DOM.");return n.parseXml(l)},parseJSON:function(l){return n.parseJSON=window.JSON.parse,n.parseJSON(l)},imageFormatSupported:function(l){return l=l||"",!!s[l.toLowerCase()]},setImageFormatsSupported:function(l){n.extend(s,l)}});var i=function(l){};n.console=window.console||{log:i,debug:i,info:i,warn:i,error:i,assert:i},n.Browser={vendor:n.BROWSERS.UNKNOWN,version:0,alpha:!0};var s={avif:!0,bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1,webp:!0},o={};(function(){var l=navigator.appVersion,u=navigator.userAgent,c;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(n.Browser.vendor=n.BROWSERS.IE,n.Browser.version=parseFloat(u.substring(u.indexOf("MSIE")+5,u.indexOf(";",u.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(u.indexOf("Edge")>=0?(n.Browser.vendor=n.BROWSERS.EDGE,n.Browser.version=parseFloat(u.substring(u.indexOf("Edge")+5))):u.indexOf("Edg")>=0?(n.Browser.vendor=n.BROWSERS.CHROMEEDGE,n.Browser.version=parseFloat(u.substring(u.indexOf("Edg")+4))):u.indexOf("Firefox")>=0?(n.Browser.vendor=n.BROWSERS.FIREFOX,n.Browser.version=parseFloat(u.substring(u.indexOf("Firefox")+8))):u.indexOf("Safari")>=0?(n.Browser.vendor=u.indexOf("Chrome")>=0?n.BROWSERS.CHROME:n.BROWSERS.SAFARI,n.Browser.version=parseFloat(u.substring(u.substring(0,u.indexOf("Safari")).lastIndexOf("/")+1,u.indexOf("Safari")))):(c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),c.exec(u)!==null&&(n.Browser.vendor=n.BROWSERS.IE,n.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":n.Browser.vendor=n.BROWSERS.OPERA,n.Browser.version=parseFloat(l);break}var d=window.location.search.substring(1),f=d.split("&"),h,p,m;for(m=0;m<f.length;m++)if(h=f[m],p=h.indexOf("="),p>0){var g=h.substring(0,p),v=h.substring(p+1);try{o[g]=decodeURIComponent(v)}catch{n.console.error("Ignoring malformed URL parameter: %s=%s",g,v)}}n.Browser.alpha=!(n.Browser.vendor===n.BROWSERS.CHROME&&n.Browser.version<2),n.Browser.opacity=!0,n.Browser.vendor===n.BROWSERS.IE&&n.console.error("Internet Explorer is not supported by OpenSeadragon")})(),function(l){var u=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame,c=l.cancelAnimationFrame||l.mozCancelAnimationFrame||l.webkitCancelAnimationFrame||l.msCancelAnimationFrame;if(u&&c)n.requestAnimationFrame=function(){return u.apply(l,arguments)},n.cancelAnimationFrame=function(){return c.apply(l,arguments)};else{var d=[],f=[],h=0,p;n.requestAnimationFrame=function(m){return d.push([++h,m]),p||(p=setInterval(function(){if(d.length){var g=n.now(),v=f;for(f=d,d=v;f.length;)f.shift()[1](g)}else clearInterval(p),p=void 0},1e3/50)),h},n.cancelAnimationFrame=function(m){var g,v;for(g=0,v=d.length;g<v;g+=1)if(d[g][0]===m){d.splice(g,1);return}for(g=0,v=f.length;g<v;g+=1)if(f[g][0]===m){f.splice(g,1);return}}}}(window);function a(l,u){return u&&l!==document.body?document.body:l.offsetParent}}(t),function(n,r){e.exports?e.exports=r():n.OpenSeadragon=r()}(VEe,function(){return t}),function(n){class r{constructor(s){s||(s=[0,0,0,0,0,0,0,0,0]),this.values=s}static makeIdentity(){return new r([1,0,0,0,1,0,0,0,1])}static makeTranslation(s,o){return new r([1,0,0,0,1,0,s,o,1])}static makeRotation(s){var o=Math.cos(s),a=Math.sin(s);return new r([o,-a,0,a,o,0,0,0,1])}static makeScaling(s,o){return new r([s,0,0,0,o,0,0,0,1])}multiply(s){let o=this.values,a=s.values;var l=o[0*3+0],u=o[0*3+1],c=o[0*3+2],d=o[1*3+0],f=o[1*3+1],h=o[1*3+2],p=o[2*3+0],m=o[2*3+1],g=o[2*3+2],v=a[0*3+0],w=a[0*3+1],b=a[0*3+2],_=a[1*3+0],x=a[1*3+1],S=a[1*3+2],I=a[2*3+0],P=a[2*3+1],R=a[2*3+2];return new r([v*l+w*d+b*p,v*u+w*f+b*m,v*c+w*h+b*g,_*l+x*d+S*p,_*u+x*f+S*m,_*c+x*h+S*g,I*l+P*d+R*p,I*u+P*f+R*m,I*c+P*h+R*g])}}n.Mat3=r}(t),function(n){var r={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.fullscreenElement},r.requestFullScreen=function(i){return i.requestFullscreen().catch(function(s){n.console.error("Fullscreen request failed: ",s)})},r.exitFullScreen=function(){document.exitFullscreen().catch(function(i){n.console.error("Error while exiting fullscreen: ",i)})},r.fullScreenEventName="fullscreenchange",r.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.msFullscreenElement},r.requestFullScreen=function(i){return i.msRequestFullscreen()},r.exitFullScreen=function(){document.msExitFullscreen()},r.fullScreenEventName="MSFullscreenChange",r.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitFullscreenElement},r.requestFullScreen=function(i){return i.webkitRequestFullscreen()},r.exitFullScreen=function(){document.webkitExitFullscreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},r.requestFullScreen=function(i){return i.webkitRequestFullScreen()},r.exitFullScreen=function(){document.webkitCancelFullScreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.mozFullScreenElement},r.requestFullScreen=function(i){return i.mozRequestFullScreen()},r.exitFullScreen=function(){document.mozCancelFullScreen()},r.fullScreenEventName="mozfullscreenchange",r.fullScreenErrorEventName="mozfullscreenerror"),r.isFullScreen=function(){return r.getFullScreenElement()!==null},r.cancelFullScreen=function(){n.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),r.exitFullScreen()},n.extend(n,r)}(t),function(n){n.EventSource=function(){this.events={},this._rejectedEventList={}},n.EventSource.prototype={addOnceHandler:function(r,i,s,o,a){var l=this;o=o||1;var u=0,c=function(d){return u++,u===o&&l.removeHandler(r,c),i(d)};return this.addHandler(r,c,s,a)},addHandler:function(r,i,s,o){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return n.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var a=this.events[r];if(a||(this.events[r]=a=[]),i&&n.isFunction(i)){var l=a.length,u={handler:i,userData:s||null,priority:o||0};for(a[l]=u;l>0&&a[l-1].priority<a[l].priority;)a[l]=a[l-1],a[l-1]=u,l--}return!0},removeHandler:function(r,i){var s=this.events[r],o=[],a;if(s&&n.isArray(s)){for(a=0;a<s.length;a++)s[a].handler!==i&&o.push(s[a]);this.events[r]=o}},numberOfHandlers:function(r){var i=this.events[r];return i?i.length:0},removeAllHandlers:function(r){if(r)this.events[r]=[];else for(var i in this.events)this.events[i]=[]},getHandler:function(r){var i=this.events[r];return!i||!i.length?null:(i=i.length===1?[i[0]]:Array.apply(null,i),function(s,o){var a,l=i.length;for(a=0;a<l;a++)i[a]&&(o.eventSource=s,o.userData=i[a].userData,i[a].handler(o))})},raiseEvent:function(r,i){if(Object.prototype.hasOwnProperty.call(this._rejectedEventList,r))return n.console.error(`Error adding handler for ${r}. ${this._rejectedEventList[r]}`),!1;var s=this.getHandler(r);return s&&s(this,i||{}),!0},rejectEventHandler(r,i=""){this._rejectedEventList[r]=i},allowEventHandler(r){delete this._rejectedEventList[r]}}}(t),function(n){var r={};n.MouseTracker=function(N){var D=arguments;n.isPlainObject(N)||(N={element:D[0],clickTimeThreshold:D[1],clickDistThreshold:D[2]}),this.hash=Math.random(),this.element=n.getElement(N.element),this.clickTimeThreshold=N.clickTimeThreshold||n.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=N.clickDistThreshold||n.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=N.dblClickTimeThreshold||n.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=N.dblClickDistThreshold||n.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=N.userData||null,this.stopDelay=N.stopDelay||50,this.preProcessEventHandler=N.preProcessEventHandler||null,this.contextMenuHandler=N.contextMenuHandler||null,this.enterHandler=N.enterHandler||null,this.leaveHandler=N.leaveHandler||null,this.exitHandler=N.exitHandler||null,this.overHandler=N.overHandler||null,this.outHandler=N.outHandler||null,this.pressHandler=N.pressHandler||null,this.nonPrimaryPressHandler=N.nonPrimaryPressHandler||null,this.releaseHandler=N.releaseHandler||null,this.nonPrimaryReleaseHandler=N.nonPrimaryReleaseHandler||null,this.moveHandler=N.moveHandler||null,this.scrollHandler=N.scrollHandler||null,this.clickHandler=N.clickHandler||null,this.dblClickHandler=N.dblClickHandler||null,this.dragHandler=N.dragHandler||null,this.dragEndHandler=N.dragEndHandler||null,this.pinchHandler=N.pinchHandler||null,this.stopHandler=N.stopHandler||null,this.keyDownHandler=N.keyDownHandler||null,this.keyUpHandler=N.keyUpHandler||null,this.keyHandler=N.keyHandler||null,this.focusHandler=N.focusHandler||null,this.blurHandler=N.blurHandler||null;var q=this;r[this.hash]={click:function(C){b(q,C)},dblclick:function(C){_(q,C)},keydown:function(C){x(q,C)},keyup:function(C){S(q,C)},keypress:function(C){I(q,C)},focus:function(C){P(q,C)},blur:function(C){R(q,C)},contextmenu:function(C){O(q,C)},wheel:function(C){M(q,C)},mousewheel:function(C){E(q,C)},DOMMouseScroll:function(C){E(q,C)},MozMousePixelScroll:function(C){E(q,C)},losecapture:function(C){j(q,C)},mouseenter:function(C){xe(q,C)},mouseleave:function(C){Me(q,C)},mouseover:function(C){Ve(q,C)},mouseout:function(C){Ue(q,C)},mousedown:function(C){me(q,C)},mouseup:function(C){_e(q,C)},mousemove:function(C){Ae(q,C)},touchstart:function(C){F(q,C)},touchend:function(C){B(q,C)},touchmove:function(C){Y(q,C)},touchcancel:function(C){Z(q,C)},gesturestart:function(C){ne(q,C)},gesturechange:function(C){oe(q,C)},gotpointercapture:function(C){le(q,C)},lostpointercapture:function(C){Ee(q,C)},pointerenter:function(C){xe(q,C)},pointerleave:function(C){Me(q,C)},pointerover:function(C){Ve(q,C)},pointerout:function(C){Ue(q,C)},pointerdown:function(C){me(q,C)},pointerup:function(C){_e(q,C)},pointermove:function(C){Ae(q,C)},pointercancel:function(C){ae(q,C)},pointerupcaptured:function(C){Te(q,C)},pointermovecaptured:function(C){Q(q,C)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,n.MouseTracker.havePointerEvents&&n.setElementPointerEvents(this.element,"auto"),this.exitHandler&&n.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),N.startDisabled||this.setTracking(!0)},n.MouseTracker.prototype={destroy:function(){l(this),this.element=null,r[this.hash]=null,delete r[this.hash]},isTracking:function(){return r[this.hash].tracking},setTracking:function(N){return N?a(this):l(this),this},getActivePointersListByType:function(N){var D=r[this.hash],q,C=D?D.activePointersLists.length:0,G;for(q=0;q<C;q++)if(D.activePointersLists[q].type===N)return D.activePointersLists[q];return G=new n.MouseTracker.GesturePointList(N),D&&D.activePointersLists.push(G),G},getActivePointerCount:function(){var N=r[this.hash],D,q=N.activePointersLists.length,C=0;for(D=0;D<q;D++)C+=N.activePointersLists[D].getLength();return C},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var i=function(){try{return window.self!==window.top}catch{return!0}}();function s(N){try{return N.addEventListener&&N.removeEventListener}catch{return!1}}n.MouseTracker.gesturePointVelocityTracker=function(){var N=[],D=0,q=0,C=function(ve,ke){return ve.hash.toString()+ke.type+ke.id.toString()},G=function(){var ve,ke=N.length,ze,Je,ut=n.now(),Wt,sn,pn;for(Wt=ut-q,q=ut,ve=0;ve<ke;ve++)ze=N[ve],Je=ze.gPoint,Je.direction=Math.atan2(Je.currentPos.y-ze.lastPos.y,Je.currentPos.x-ze.lastPos.x),sn=ze.lastPos.distanceTo(Je.currentPos),ze.lastPos=Je.currentPos,pn=1e3*sn/(Wt+1),Je.speed=.75*pn+.25*Je.speed},K=function(ve,ke){var ze=C(ve,ke);N.push({guid:ze,gPoint:ke,lastPos:ke.currentPos}),N.length===1&&(q=n.now(),D=window.setInterval(G,50))},se=function(ve,ke){var ze=C(ve,ke),Je,ut=N.length;for(Je=0;Je<ut;Je++)if(N[Je].guid===ze){N.splice(Je,1),ut--,ut===0&&window.clearInterval(D);break}};return{addPoint:K,removePoint:se}}(),n.MouseTracker.captureElement=document,n.MouseTracker.wheelEventName="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",n.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",n.MouseTracker.wheelEventName],n.MouseTracker.wheelEventName==="DOMMouseScroll"&&n.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(n.MouseTracker.havePointerEvents=!0,n.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),n.MouseTracker.havePointerCapture=function(){var N=document.createElement("div");return n.isFunction(N.setPointerCapture)&&n.isFunction(N.releasePointerCapture)}(),n.MouseTracker.havePointerCapture&&n.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(n.MouseTracker.havePointerEvents=!1,n.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),n.MouseTracker.mousePointerId="legacy-mouse",n.MouseTracker.havePointerCapture=function(){var N=document.createElement("div");return n.isFunction(N.setCapture)&&n.isFunction(N.releaseCapture)}(),n.MouseTracker.havePointerCapture&&n.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&n.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&n.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),n.MouseTracker.GesturePointList=function(N){this._gPoints=[],this.type=N,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},n.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(N){return this._gPoints.push(N)},removeById:function(N){var D,q=this._gPoints.length;for(D=0;D<q;D++)if(this._gPoints[D].id===N){this._gPoints.splice(D,1);break}return this._gPoints.length},getByIndex:function(N){return N<this._gPoints.length?this._gPoints[N]:null},getById:function(N){var D,q=this._gPoints.length;for(D=0;D<q;D++)if(this._gPoints[D].id===N)return this._gPoints[D];return null},getPrimary:function(N){var D,q=this._gPoints.length;for(D=0;D<q;D++)if(this._gPoints[D].isPrimary)return this._gPoints[D];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(n.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function o(N){var D=r[N.hash],q,C,G,K,se,ve=D.activePointersLists.length;for(q=0;q<ve;q++)if(G=D.activePointersLists[q],G.getLength()>0){for(se=[],K=G.asArray(),C=0;C<K.length;C++)se.push(K[C]);for(C=0;C<se.length;C++)be(N,G,se[C])}for(q=0;q<ve;q++)D.activePointersLists.pop();D.sentDragEvent=!1}function a(N){var D=r[N.hash],q,C;if(!D.tracking){for(C=0;C<n.MouseTracker.subscribeEvents.length;C++)q=n.MouseTracker.subscribeEvents[C],n.addEvent(N.element,q,D[q],q===n.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);o(N),D.tracking=!0}}function l(N){var D=r[N.hash],q,C;if(D.tracking){for(C=0;C<n.MouseTracker.subscribeEvents.length;C++)q=n.MouseTracker.subscribeEvents[C],n.removeEvent(N.element,q,D[q],!1);o(N),D.tracking=!1}}function u(N,D){var q=r[N.hash];if(D==="pointerevent")return{upName:"pointerup",upHandler:q.pointerupcaptured,moveName:"pointermove",moveHandler:q.pointermovecaptured};if(D==="mouse")return{upName:"pointerup",upHandler:q.pointerupcaptured,moveName:"pointermove",moveHandler:q.pointermovecaptured};if(D==="touch")return{upName:"touchend",upHandler:q.touchendcaptured,moveName:"touchmove",moveHandler:q.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function c(N,D){var q;if(n.MouseTracker.havePointerCapture)if(n.MouseTracker.havePointerEvents)try{N.element.setPointerCapture(D.id)}catch{n.console.warn("setPointerCapture() called on invalid pointer ID");return}else N.element.setCapture(!0);else q=u(N,n.MouseTracker.havePointerEvents?"pointerevent":D.type),i&&s(window.top)&&n.addEvent(window.top,q.upName,q.upHandler,!0),n.addEvent(n.MouseTracker.captureElement,q.upName,q.upHandler,!0),n.addEvent(n.MouseTracker.captureElement,q.moveName,q.moveHandler,!0);ie(N,D,!0)}function d(N,D){var q,C,G;if(n.MouseTracker.havePointerCapture)if(n.MouseTracker.havePointerEvents){if(C=N.getActivePointersListByType(D.type),G=C.getById(D.id),!G||!G.captured)return;try{N.element.releasePointerCapture(D.id)}catch{}}else N.element.releaseCapture();else q=u(N,n.MouseTracker.havePointerEvents?"pointerevent":D.type),i&&s(window.top)&&n.removeEvent(window.top,q.upName,q.upHandler,!0),n.removeEvent(n.MouseTracker.captureElement,q.moveName,q.moveHandler,!0),n.removeEvent(n.MouseTracker.captureElement,q.upName,q.upHandler,!0);ie(N,D,!1)}function f(N){return n.MouseTracker.havePointerEvents?N.pointerId:n.MouseTracker.mousePointerId}function h(N){return n.MouseTracker.havePointerEvents&&N.pointerType?N.pointerType:"mouse"}function p(N){return n.MouseTracker.havePointerEvents?N.isPrimary:!0}function m(N){return n.getMousePosition(N)}function g(N,D){return v(m(N),D)}function v(N,D){var q=n.getElementOffset(D);return N.minus(q)}function w(N,D){return new n.Point((N.x+D.x)/2,(N.y+D.y)/2)}function b(N,D){var q={originalEvent:D,eventType:"click",pointerType:"mouse",isEmulated:!1};V(N,q),q.preventDefault&&!q.defaultPrevented&&n.cancelEvent(D),q.stopPropagation&&n.stopEvent(D)}function _(N,D){var q={originalEvent:D,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};V(N,q),q.preventDefault&&!q.defaultPrevented&&n.cancelEvent(D),q.stopPropagation&&n.stopEvent(D)}function x(N,D){var q=null,C={originalEvent:D,eventType:"keydown",pointerType:"",isEmulated:!1};V(N,C),N.keyDownHandler&&!C.preventGesture&&!C.defaultPrevented&&(q={eventSource:N,keyCode:D.keyCode?D.keyCode:D.charCode,ctrl:D.ctrlKey,shift:D.shiftKey,alt:D.altKey,meta:D.metaKey,originalEvent:D,preventDefault:C.preventDefault||C.defaultPrevented,userData:N.userData},N.keyDownHandler(q)),(q&&q.preventDefault||C.preventDefault&&!C.defaultPrevented)&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function S(N,D){var q=null,C={originalEvent:D,eventType:"keyup",pointerType:"",isEmulated:!1};V(N,C),N.keyUpHandler&&!C.preventGesture&&!C.defaultPrevented&&(q={eventSource:N,keyCode:D.keyCode?D.keyCode:D.charCode,ctrl:D.ctrlKey,shift:D.shiftKey,alt:D.altKey,meta:D.metaKey,originalEvent:D,preventDefault:C.preventDefault||C.defaultPrevented,userData:N.userData},N.keyUpHandler(q)),(q&&q.preventDefault||C.preventDefault&&!C.defaultPrevented)&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function I(N,D){var q=null,C={originalEvent:D,eventType:"keypress",pointerType:"",isEmulated:!1};V(N,C),N.keyHandler&&!C.preventGesture&&!C.defaultPrevented&&(q={eventSource:N,keyCode:D.keyCode?D.keyCode:D.charCode,ctrl:D.ctrlKey,shift:D.shiftKey,alt:D.altKey,meta:D.metaKey,originalEvent:D,preventDefault:C.preventDefault||C.defaultPrevented,userData:N.userData},N.keyHandler(q)),(q&&q.preventDefault||C.preventDefault&&!C.defaultPrevented)&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function P(N,D){var q={originalEvent:D,eventType:"focus",pointerType:"",isEmulated:!1};V(N,q),N.focusHandler&&!q.preventGesture&&N.focusHandler({eventSource:N,originalEvent:D,userData:N.userData})}function R(N,D){var q={originalEvent:D,eventType:"blur",pointerType:"",isEmulated:!1};V(N,q),N.blurHandler&&!q.preventGesture&&N.blurHandler({eventSource:N,originalEvent:D,userData:N.userData})}function O(N,D){var q=null,C={originalEvent:D,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};V(N,C),N.contextMenuHandler&&!C.preventGesture&&!C.defaultPrevented&&(q={eventSource:N,position:v(m(D),N.element),originalEvent:C.originalEvent,preventDefault:C.preventDefault||C.defaultPrevented,userData:N.userData},N.contextMenuHandler(q)),(q&&q.preventDefault||C.preventDefault&&!C.defaultPrevented)&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function M(N,D){L(N,D,D)}function E(N,D){var q={target:D.target||D.srcElement,type:"wheel",shiftKey:D.shiftKey||!1,clientX:D.clientX,clientY:D.clientY,pageX:D.pageX?D.pageX:D.clientX,pageY:D.pageY?D.pageY:D.clientY,deltaMode:D.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};n.MouseTracker.wheelEventName==="mousewheel"?q.deltaY=-D.wheelDelta/n.DEFAULT_SETTINGS.pixelsPerWheelLine:q.deltaY=D.detail,L(N,q,D)}function L(N,D,q){var C=0,G,K=null;C=D.deltaY?D.deltaY<0?1:-1:0,G={originalEvent:D,eventType:"wheel",pointerType:"mouse",isEmulated:D!==q},V(N,G),N.scrollHandler&&!G.preventGesture&&!G.defaultPrevented&&(K={eventSource:N,pointerType:"mouse",position:g(D,N.element),scroll:C,shift:D.shiftKey,isTouchEvent:!1,originalEvent:q,preventDefault:G.preventDefault||G.defaultPrevented,userData:N.userData},N.scrollHandler(K)),G.stopPropagation&&n.stopEvent(q),(K&&K.preventDefault||G.preventDefault&&!G.defaultPrevented)&&n.cancelEvent(q)}function j(N,D){var q={id:n.MouseTracker.mousePointerId,type:"mouse"},C={originalEvent:D,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};V(N,C),D.target===N.element&&ie(N,q,!1),C.stopPropagation&&n.stopEvent(D)}function F(N,D){var q,C,G=D.changedTouches.length,K,se=N.getActivePointersListByType("touch");q=n.now(),se.getLength()>D.touches.length-G&&n.console.warn("Tracked touch contact count doesn't match event.touches.length");var ve={originalEvent:D,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(V(N,ve),C=0;C<G;C++)K={id:D.changedTouches[C].identifier,type:"touch",isPrimary:se.getLength()===0,currentPos:m(D.changedTouches[C]),currentTime:q},ue(N,ve,K),Pe(N,ve,K,0),ie(N,K,!0);ve.preventDefault&&!ve.defaultPrevented&&n.cancelEvent(D),ve.stopPropagation&&n.stopEvent(D)}function B(N,D){var q,C,G=D.changedTouches.length,K;q=n.now();var se={originalEvent:D,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(V(N,se),C=0;C<G;C++)K={id:D.changedTouches[C].identifier,type:"touch",currentPos:m(D.changedTouches[C]),currentTime:q},Ce(N,se,K,0),ie(N,K,!1),he(N,se,K);se.preventDefault&&!se.defaultPrevented&&n.cancelEvent(D),se.stopPropagation&&n.stopEvent(D)}function Y(N,D){var q,C,G=D.changedTouches.length,K;q=n.now();var se={originalEvent:D,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(V(N,se),C=0;C<G;C++)K={id:D.changedTouches[C].identifier,type:"touch",currentPos:m(D.changedTouches[C]),currentTime:q},re(N,se,K);se.preventDefault&&!se.defaultPrevented&&n.cancelEvent(D),se.stopPropagation&&n.stopEvent(D)}function Z(N,D){var q=D.changedTouches.length,C,G,K={originalEvent:D,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(V(N,K),C=0;C<q;C++)G={id:D.changedTouches[C].identifier,type:"touch"},pe(N,K,G);K.stopPropagation&&n.stopEvent(D)}function ne(N,D){return n.eventIsCanceled(D)||D.preventDefault(),!1}function oe(N,D){return n.eventIsCanceled(D)||D.preventDefault(),!1}function le(N,D){var q={originalEvent:D,eventType:"gotpointercapture",pointerType:h(D),isEmulated:!1};V(N,q),D.target===N.element&&ie(N,{id:D.pointerId,type:h(D)},!0),q.stopPropagation&&n.stopEvent(D)}function Ee(N,D){var q={originalEvent:D,eventType:"lostpointercapture",pointerType:h(D),isEmulated:!1};V(N,q),D.target===N.element&&ie(N,{id:D.pointerId,type:h(D)},!1),q.stopPropagation&&n.stopEvent(D)}function xe(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C={originalEvent:D,eventType:"pointerenter",pointerType:q.type,isEmulated:!1};V(N,C),ue(N,C,q)}function Me(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C={originalEvent:D,eventType:"pointerleave",pointerType:q.type,isEmulated:!1};V(N,C),he(N,C,q)}function Ve(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C={originalEvent:D,eventType:"pointerover",pointerType:q.type,isEmulated:!1};V(N,C),Se(N,C,q),C.preventDefault&&!C.defaultPrevented&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function Ue(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C={originalEvent:D,eventType:"pointerout",pointerType:q.type,isEmulated:!1};V(N,C),de(N,C,q),C.preventDefault&&!C.defaultPrevented&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function me(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C=n.MouseTracker.havePointerEvents&&q.type==="touch",G={originalEvent:D,eventType:"pointerdown",pointerType:q.type,isEmulated:!1};V(N,G),Pe(N,G,q,D.button),G.preventDefault&&!G.defaultPrevented&&n.cancelEvent(D),G.stopPropagation&&n.stopEvent(D),G.shouldCapture&&(C?ie(N,q,!0):c(N,q))}function _e(N,D){Ie(N,D)}function Te(N,D){var q=N.getActivePointersListByType(h(D));q.getById(D.pointerId)&&Ie(N,D),n.stopEvent(D)}function Ie(N,D){var q;q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()};var C={originalEvent:D,eventType:"pointerup",pointerType:q.type,isEmulated:!1};V(N,C),Ce(N,C,q,D.button),C.preventDefault&&!C.defaultPrevented&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D),C.shouldReleaseCapture&&(D.target===N.element?d(N,q):ie(N,q,!1))}function Ae(N,D){J(N,D)}function Q(N,D){var q=N.getActivePointersListByType(h(D));q.getById(D.pointerId)&&J(N,D),n.stopEvent(D)}function J(N,D){var q={id:f(D),type:h(D),isPrimary:p(D),currentPos:m(D),currentTime:n.now()},C={originalEvent:D,eventType:"pointermove",pointerType:q.type,isEmulated:!1};V(N,C),re(N,C,q),C.preventDefault&&!C.defaultPrevented&&n.cancelEvent(D),C.stopPropagation&&n.stopEvent(D)}function ae(N,D){var q={id:D.pointerId,type:h(D)},C={originalEvent:D,eventType:"pointercancel",pointerType:q.type,isEmulated:!1};V(N,C),pe(N,C,q),C.stopPropagation&&n.stopEvent(D)}function we(N,D){return D.speed=0,D.direction=0,D.contactPos=D.currentPos,D.contactTime=D.currentTime,D.lastPos=D.currentPos,D.lastTime=D.currentTime,N.add(D)}function be(N,D,q){var C,G=D.getById(q.id);return G?(G.captured&&(n.console.warn("stopTrackingPointer() called on captured pointer"),d(N,G)),D.removeContact(),C=D.removeById(q.id)):C=D.getLength(),C}function T(N,D){switch(D.eventType){case"pointermove":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!1,D.preventGesture=!N.hasGestureHandlers,D.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!1,D.preventGesture=!1,D.stopPropagation=!1;break;case"pointerdown":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!1,D.preventGesture=!N.hasGestureHandlers,D.stopPropagation=!1;break;case"pointerup":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!1,D.preventGesture=!N.hasGestureHandlers,D.stopPropagation=!1;break;case"wheel":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!1,D.preventGesture=!N.hasScrollHandler,D.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":D.isStoppable=!0,D.isCancelable=!1,D.preventDefault=!1,D.preventGesture=!1,D.stopPropagation=!1;break;case"click":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!!N.clickHandler,D.preventGesture=!1,D.stopPropagation=!1;break;case"dblclick":D.isStoppable=!0,D.isCancelable=!0,D.preventDefault=!!N.dblClickHandler,D.preventGesture=!1,D.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:D.isStoppable=!1,D.isCancelable=!1,D.preventDefault=!1,D.preventGesture=!1,D.stopPropagation=!1;break}}function V(N,D){D.eventSource=N,D.eventPhase=D.originalEvent&&typeof D.originalEvent.eventPhase<"u"?D.originalEvent.eventPhase:0,D.defaultPrevented=n.eventIsCanceled(D.originalEvent),D.shouldCapture=!1,D.shouldReleaseCapture=!1,D.userData=N.userData,T(N,D),N.preProcessEventHandler&&N.preProcessEventHandler(D)}function ie(N,D,q){var C=N.getActivePointersListByType(D.type),G=C.getById(D.id);G?q&&!G.captured?(G.captured=!0,C.captureCount++):!q&&G.captured&&(G.captured=!1,C.captureCount--,C.captureCount<0&&(C.captureCount=0,n.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):n.console.warn("updatePointerCaptured() called on untracked pointer")}function ue(N,D,q){var C=N.getActivePointersListByType(q.type),G;G=C.getById(q.id),G?(G.insideElement=!0,G.lastPos=G.currentPos,G.lastTime=G.currentTime,G.currentPos=q.currentPos,G.currentTime=q.currentTime,q=G):(q.captured=!1,q.insideElementPressed=!1,q.insideElement=!0,we(C,q)),N.enterHandler&&N.enterHandler({eventSource:N,pointerType:q.type,position:v(q.currentPos,N.element),buttons:C.buttons,pointers:N.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData})}function he(N,D,q){var C=N.getActivePointersListByType(q.type),G,K;G=C.getById(q.id),G?(G.captured?(G.insideElement=!1,G.lastPos=G.currentPos,G.lastTime=G.currentTime,G.currentPos=q.currentPos,G.currentTime=q.currentTime):be(N,C,G),q=G):(q.captured=!1,q.insideElementPressed=!1),(N.leaveHandler||N.exitHandler)&&(K={eventSource:N,pointerType:q.type,position:q.currentPos&&v(q.currentPos,N.element),buttons:C.buttons,pointers:N.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData},N.leaveHandler&&N.leaveHandler(K),N.exitHandler&&N.exitHandler(K))}function Se(N,D,q){var C,G;C=N.getActivePointersListByType(q.type),G=C.getById(q.id),G?q=G:(q.captured=!1,q.insideElementPressed=!1),N.overHandler&&N.overHandler({eventSource:N,pointerType:q.type,position:v(q.currentPos,N.element),buttons:C.buttons,pointers:N.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData})}function de(N,D,q){var C,G;C=N.getActivePointersListByType(q.type),G=C.getById(q.id),G?q=G:(q.captured=!1,q.insideElementPressed=!1),N.outHandler&&N.outHandler({eventSource:N,pointerType:q.type,position:q.currentPos&&v(q.currentPos,N.element),buttons:C.buttons,pointers:N.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:C.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData})}function Pe(N,D,q,C){var G=r[N.hash],K=N.getActivePointersListByType(q.type),se;if(typeof D.originalEvent.buttons<"u"?K.buttons=D.originalEvent.buttons:C===0?K.buttons|=1:C===1?K.buttons|=4:C===2?K.buttons|=2:C===3?K.buttons|=8:C===4?K.buttons|=16:C===5&&(K.buttons|=32),C!==0){D.shouldCapture=!1,D.shouldReleaseCapture=!1,N.nonPrimaryPressHandler&&!D.preventGesture&&!D.defaultPrevented&&(D.preventDefault=!0,N.nonPrimaryPressHandler({eventSource:N,pointerType:q.type,position:v(q.currentPos,N.element),button:C,buttons:K.buttons,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData}));return}se=K.getById(q.id),se?(se.insideElementPressed=!0,se.insideElement=!0,se.originalTarget=D.originalEvent.target,se.contactPos=q.currentPos,se.contactTime=q.currentTime,se.lastPos=se.currentPos,se.lastTime=se.currentTime,se.currentPos=q.currentPos,se.currentTime=q.currentTime,q=se):(q.captured=!1,q.insideElementPressed=!0,q.insideElement=!0,q.originalTarget=D.originalEvent.target,we(K,q)),K.addContact(),!D.preventGesture&&!D.defaultPrevented?(D.shouldCapture=!0,D.shouldReleaseCapture=!1,D.preventDefault=!0,(N.dragHandler||N.dragEndHandler||N.pinchHandler)&&n.MouseTracker.gesturePointVelocityTracker.addPoint(N,q),K.contacts===1?N.pressHandler&&!D.preventGesture&&N.pressHandler({eventSource:N,pointerType:q.type,position:v(q.contactPos,N.element),buttons:K.buttons,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData}):K.contacts===2&&N.pinchHandler&&q.type==="touch"&&(G.pinchGPoints=K.asArray(),G.lastPinchDist=G.currentPinchDist=G.pinchGPoints[0].currentPos.distanceTo(G.pinchGPoints[1].currentPos),G.lastPinchCenter=G.currentPinchCenter=w(G.pinchGPoints[0].currentPos,G.pinchGPoints[1].currentPos))):(D.shouldCapture=!1,D.shouldReleaseCapture=!1)}function Ce(N,D,q,C){var G=r[N.hash],K=N.getActivePointersListByType(q.type),se,ve,ke,ze=!1,Je;if(typeof D.originalEvent.buttons<"u"?K.buttons=D.originalEvent.buttons:C===0?K.buttons^=-2:C===1?K.buttons^=-5:C===2?K.buttons^=-3:C===3?K.buttons^=-9:C===4?K.buttons^=-17:C===5&&(K.buttons^=-33),D.shouldCapture=!1,C!==0){D.shouldReleaseCapture=!1,N.nonPrimaryReleaseHandler&&!D.preventGesture&&!D.defaultPrevented&&(D.preventDefault=!0,N.nonPrimaryReleaseHandler({eventSource:N,pointerType:q.type,position:v(q.currentPos,N.element),button:C,buttons:K.buttons,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData}));return}ke=K.getById(q.id),ke?(K.removeContact(),ke.captured&&(ze=!0),ke.lastPos=ke.currentPos,ke.lastTime=ke.currentTime,ke.currentPos=q.currentPos,ke.currentTime=q.currentTime,ke.insideElement||be(N,K,ke),se=ke.currentPos,ve=ke.currentTime):(q.captured=!1,q.insideElementPressed=!1,q.insideElement=!0,we(K,q),ke=q),!D.preventGesture&&!D.defaultPrevented&&(ze?(D.shouldReleaseCapture=!0,D.preventDefault=!0,(N.dragHandler||N.dragEndHandler||N.pinchHandler)&&n.MouseTracker.gesturePointVelocityTracker.removePoint(N,ke),K.contacts===0?(N.releaseHandler&&se&&N.releaseHandler({eventSource:N,pointerType:ke.type,position:v(se,N.element),buttons:K.buttons,insideElementPressed:ke.insideElementPressed,insideElementReleased:ke.insideElement,isTouchEvent:ke.type==="touch",originalEvent:D.originalEvent,userData:N.userData}),N.dragEndHandler&&G.sentDragEvent&&N.dragEndHandler({eventSource:N,pointerType:ke.type,position:v(ke.currentPos,N.element),speed:ke.speed,direction:ke.direction,shift:D.originalEvent.shiftKey,isTouchEvent:ke.type==="touch",originalEvent:D.originalEvent,userData:N.userData}),G.sentDragEvent=!1,(N.clickHandler||N.dblClickHandler)&&ke.insideElement&&(Je=ve-ke.contactTime<=N.clickTimeThreshold&&ke.contactPos.distanceTo(se)<=N.clickDistThreshold,N.clickHandler&&N.clickHandler({eventSource:N,pointerType:ke.type,position:v(ke.currentPos,N.element),quick:Je,shift:D.originalEvent.shiftKey,isTouchEvent:ke.type==="touch",originalEvent:D.originalEvent,originalTarget:ke.originalTarget,userData:N.userData}),N.dblClickHandler&&Je&&(K.clicks++,K.clicks===1?(G.lastClickPos=se,G.dblClickTimeOut=setTimeout(function(){K.clicks=0},N.dblClickTimeThreshold)):K.clicks===2&&(clearTimeout(G.dblClickTimeOut),K.clicks=0,G.lastClickPos.distanceTo(se)<=N.dblClickDistThreshold&&N.dblClickHandler({eventSource:N,pointerType:ke.type,position:v(ke.currentPos,N.element),shift:D.originalEvent.shiftKey,isTouchEvent:ke.type==="touch",originalEvent:D.originalEvent,userData:N.userData}),G.lastClickPos=null)))):K.contacts===2&&N.pinchHandler&&ke.type==="touch"&&(G.pinchGPoints=K.asArray(),G.lastPinchDist=G.currentPinchDist=G.pinchGPoints[0].currentPos.distanceTo(G.pinchGPoints[1].currentPos),G.lastPinchCenter=G.currentPinchCenter=w(G.pinchGPoints[0].currentPos,G.pinchGPoints[1].currentPos))):(D.shouldReleaseCapture=!1,N.releaseHandler&&se&&(N.releaseHandler({eventSource:N,pointerType:ke.type,position:v(se,N.element),buttons:K.buttons,insideElementPressed:ke.insideElementPressed,insideElementReleased:ke.insideElement,isTouchEvent:ke.type==="touch",originalEvent:D.originalEvent,userData:N.userData}),D.preventDefault=!0)))}function re(N,D,q){var C=r[N.hash],G=N.getActivePointersListByType(q.type),K,se,ve;if(typeof D.originalEvent.buttons<"u"&&(G.buttons=D.originalEvent.buttons),K=G.getById(q.id),K)K.lastPos=K.currentPos,K.lastTime=K.currentTime,K.currentPos=q.currentPos,K.currentTime=q.currentTime;else return;D.shouldCapture=!1,D.shouldReleaseCapture=!1,N.stopHandler&&q.type==="mouse"&&(clearTimeout(N.stopTimeOut),N.stopTimeOut=setTimeout(function(){De(N,D.originalEvent,q.type)},N.stopDelay)),G.contacts===0?N.moveHandler&&N.moveHandler({eventSource:N,pointerType:q.type,position:v(q.currentPos,N.element),buttons:G.buttons,isTouchEvent:q.type==="touch",originalEvent:D.originalEvent,userData:N.userData}):G.contacts===1?(N.moveHandler&&(K=G.asArray()[0],N.moveHandler({eventSource:N,pointerType:K.type,position:v(K.currentPos,N.element),buttons:G.buttons,isTouchEvent:K.type==="touch",originalEvent:D.originalEvent,userData:N.userData})),N.dragHandler&&!D.preventGesture&&!D.defaultPrevented&&(K=G.asArray()[0],ve=K.currentPos.minus(K.lastPos),N.dragHandler({eventSource:N,pointerType:K.type,position:v(K.currentPos,N.element),buttons:G.buttons,delta:ve,speed:K.speed,direction:K.direction,shift:D.originalEvent.shiftKey,isTouchEvent:K.type==="touch",originalEvent:D.originalEvent,userData:N.userData}),D.preventDefault=!0,C.sentDragEvent=!0)):G.contacts===2&&(N.moveHandler&&(se=G.asArray(),N.moveHandler({eventSource:N,pointerType:se[0].type,position:v(w(se[0].currentPos,se[1].currentPos),N.element),buttons:G.buttons,isTouchEvent:se[0].type==="touch",originalEvent:D.originalEvent,userData:N.userData})),N.pinchHandler&&q.type==="touch"&&!D.preventGesture&&!D.defaultPrevented&&(ve=C.pinchGPoints[0].currentPos.distanceTo(C.pinchGPoints[1].currentPos),ve!==C.currentPinchDist&&(C.lastPinchDist=C.currentPinchDist,C.currentPinchDist=ve,C.lastPinchCenter=C.currentPinchCenter,C.currentPinchCenter=w(C.pinchGPoints[0].currentPos,C.pinchGPoints[1].currentPos),N.pinchHandler({eventSource:N,pointerType:"touch",gesturePoints:C.pinchGPoints,lastCenter:v(C.lastPinchCenter,N.element),center:v(C.currentPinchCenter,N.element),lastDistance:C.lastPinchDist,distance:C.currentPinchDist,shift:D.originalEvent.shiftKey,originalEvent:D.originalEvent,userData:N.userData}),D.preventDefault=!0)))}function pe(N,D,q){var C=N.getActivePointersListByType(q.type),G;G=C.getById(q.id),G&&be(N,C,G)}function De(N,D,q){N.stopHandler&&N.stopHandler({eventSource:N,pointerType:q,position:g(D,N.element),buttons:N.getActivePointersListByType(q).buttons,isTouchEvent:q==="touch",originalEvent:D,userData:N.userData})}}(t),function(n){n.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},n.Control=function(r,i,s){var o=r.parentNode;typeof i=="number"&&(n.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),i={anchor:i}),i.attachToViewer=typeof i.attachToViewer>"u"?!0:i.attachToViewer,this.autoFade=typeof i.autoFade>"u"?!0:i.autoFade,this.element=r,this.anchor=i.anchor,this.container=s,this.anchor===n.ControlAnchor.ABSOLUTE?(this.wrapper=n.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof i.top=="number"?i.top+"px":i.top,this.wrapper.style.left=typeof i.left=="number"?i.left+"px":i.left,this.wrapper.style.height=typeof i.height=="number"?i.height+"px":i.height,this.wrapper.style.width=typeof i.width=="number"?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=n.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===n.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor===n.ControlAnchor.TOP_RIGHT||this.anchor===n.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):o.appendChild(this.wrapper)},n.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==n.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(r){this.wrapper.style.display=r?this.anchor===n.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(r){n.setElementOpacity(this.wrapper,r,!0)}}}(t),function(n){n.ControlDock=function(i){var s=["topleft","topright","bottomright","bottomleft"],o,a;for(n.extend(!0,this,{id:"controldock-"+n.now()+"-"+Math.floor(Math.random()*1e6),container:n.makeNeutralElement("div"),controls:[]},i),this.container.onsubmit=function(){return!1},this.element&&(this.element=n.getElement(this.element),this.element.appendChild(this.container),n.getElementStyle(this.element).position==="static"&&(this.element.style.position="relative"),this.container.style.width="100%",this.container.style.height="100%"),a=0;a<s.length;a++)o=s[a],this.controls[o]=n.makeNeutralElement("div"),this.controls[o].style.position="absolute",o.match("left")&&(this.controls[o].style.left="0px"),o.match("right")&&(this.controls[o].style.right="0px"),o.match("top")&&(this.controls[o].style.top="0px"),o.match("bottom")&&(this.controls[o].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},n.ControlDock.prototype={addControl:function(i,s){i=n.getElement(i);var o=null;if(!(r(this,i)>=0)){switch(s.anchor){case n.ControlAnchor.TOP_RIGHT:o=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case n.ControlAnchor.BOTTOM_RIGHT:o=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case n.ControlAnchor.BOTTOM_LEFT:o=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case n.ControlAnchor.TOP_LEFT:o=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case n.ControlAnchor.ABSOLUTE:o=this.container,i.style.margin="0px",i.style.padding="0px";break;default:case n.ControlAnchor.NONE:o=this.container,i.style.margin="0px",i.style.padding="0px";break}this.controls.push(new n.Control(i,s,o)),i.style.display="inline-block"}},removeControl:function(i){i=n.getElement(i);var s=r(this,i);return s>=0&&(this.controls[s].destroy(),this.controls.splice(s,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var i;for(i=this.controls.length-1;i>=0;i--)if(this.controls[i].isVisible())return!0;return!1},setControlsEnabled:function(i){var s;for(s=this.controls.length-1;s>=0;s--)this.controls[s].setVisible(i);return this}};function r(i,s){var o=i.controls,a;for(a=o.length-1;a>=0;a--)if(o[a].element===s)return a;return-1}}(t),function(n){n.Placement=n.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(t),function(n){var r={},i=1;n.Viewer=function(T){var V=arguments,ie=this,ue;n.isPlainObject(T)||(T={id:V[0],xmlPath:V.length>1?V[1]:void 0,prefixUrl:V.length>2?V[2]:void 0,controls:V.length>3?V[3]:void 0,overlays:V.length>4?V[4]:void 0}),T.config&&(n.extend(!0,T,T.config),delete T.config);let he=["useCanvas"];if(T.drawerOptions=Object.assign({},he.reduce((de,Pe)=>(de[Pe]=T[Pe],delete T[Pe],de),{}),T.drawerOptions),n.extend(!0,this,{id:T.id,hash:T.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttonGroup:null,profiler:null},n.DEFAULT_SETTINGS,T),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");typeof r[this.hash]<"u"&&n.console.warn("Hash "+this.hash+" has already been used."),r[this.hash]={fsBoundsDelta:new n.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=n.now(),n.EventSource.call(this),this.addHandler("open-failed",function(de){var Pe=n.getString("Errors.OpenFailed",de.eventSource,de.message);ie._showMessage(Pe)}),n.ControlDock.call(this,T),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=n.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(de){de.width="100%",de.height="100%",de.overflow="hidden",de.position="absolute",de.top="0px",de.left="0px"}(this.canvas.style),n.setElementTouchActionNone(this.canvas),T.tabIndex!==""&&(this.canvas.tabIndex=T.tabIndex===void 0?0:T.tabIndex),this.container.className="openseadragon-container",function(de){de.width="100%",de.height="100%",de.position="relative",de.overflow="hidden",de.left="0px",de.top="0px",de.textAlign="left"}(this.container.style),n.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new n.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:n.delegate(this,g),keyDownHandler:n.delegate(this,v),keyHandler:n.delegate(this,w),clickHandler:n.delegate(this,b),dblClickHandler:n.delegate(this,_),dragHandler:n.delegate(this,x),dragEndHandler:n.delegate(this,S),enterHandler:n.delegate(this,I),leaveHandler:n.delegate(this,P),pressHandler:n.delegate(this,R),releaseHandler:n.delegate(this,O),nonPrimaryPressHandler:n.delegate(this,M),nonPrimaryReleaseHandler:n.delegate(this,E),scrollHandler:n.delegate(this,B),pinchHandler:n.delegate(this,L),focusHandler:n.delegate(this,j),blurHandler:n.delegate(this,F)}),this.outerTracker=new n.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:n.delegate(this,Y),leaveHandler:n.delegate(this,Z)}),this.toolbar&&(this.toolbar=new n.ControlDock({element:this.toolbar})),this.bindStandardControls(),r[this.hash].prevContainerSize=s(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver(function(){r[ie.hash].needsResize=!0}),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new n.World({viewer:this}),this.world.addHandler("add-item",function(de){ie.source=ie.world.getItemAt(0).source,r[ie.hash].forceRedraw=!0,ie._updateRequestId||(ie._updateRequestId=u(ie,ne))}),this.world.addHandler("remove-item",function(de){ie.world.getItemCount()?ie.source=ie.world.getItemAt(0).source:ie.source=null,r[ie.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(de){ie.viewport&&ie.viewport._setContentBounds(ie.world.getHomeBounds(),ie.world.getContentFactor())}),this.world.addHandler("item-index-change",function(de){ie.source=ie.world.getItemAt(0).source}),this.viewport=new n.Viewport({containerSize:r[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,overlayPreserveContentDirection:this.overlayPreserveContentDirection,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new n.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:T.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new n.TileCache({maxImageCacheCount:this.maxImageCacheCount}),Object.prototype.hasOwnProperty.call(this.drawerOptions,"useCanvas")&&(n.console.error('useCanvas is deprecated, use the "drawer" option to indicate preferred drawer(s)'),this.drawerOptions.useCanvas||(this.drawer=n.HTMLDrawer),delete this.drawerOptions.useCanvas);let Se=Array.isArray(this.drawer)?this.drawer:[this.drawer];Se.length===0&&(Se=[n.DEFAULT_SETTINGS.drawer].flat(),n.console.warn("No valid drawers were selected. Using the default value.")),this.drawer=null;for(const de of Se)if(this.requestDrawer(de,{mainDrawer:!0,redrawImmediately:!1}))break;if(!this.drawer)throw n.console.error("No drawer could be created!"),"Error with creating the selected drawer(s)";for(this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),this.overlaysContainer=n.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(ue=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(ue,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(ue=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(ue,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new n.Navigator({element:this.navigatorElement,id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime,drawer:this.drawer.getType(),loadTilesWithAjax:this.loadTilesWithAjax,ajaxHeaders:this.ajaxHeaders,ajaxWithCredentials:this.ajaxWithCredentials})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),ue=0;ue<this.customControls.length;ue++)this.addControl(this.customControls[ue].id,{anchor:this.customControls[ue].anchor});n.requestAnimationFrame(function(){d(ie)}),n._viewers.set(this.element,this)},n.extend(n.Viewer.prototype,n.EventSource.prototype,n.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(T){return n.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(T)},openTileSource:function(T){return n.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(T)},get buttons(){return n.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(T,V){var ie=this;if(this.close(),!T)return this;if(this.sequenceMode&&n.isArray(T))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof V<"u"&&!isNaN(V)&&(this.initialPage=V),this.tileSources=T,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(n.isArray(T)||(T=[T]),!T.length)return this;this._opening=!0;for(var ue=T.length,he=0,Se=0,de,Pe=function(){if(he+Se===ue)if(he){(ie._firstOpen||!ie.preserveViewport)&&(ie.viewport.goHome(!0),ie.viewport.update()),ie._firstOpen=!1;var pe=T[0];if(pe.tileSource&&(pe=pe.tileSource),ie.overlays&&!ie.preserveOverlays)for(var De=0;De<ie.overlays.length;De++)ie.currentOverlays[De]=a(ie,ie.overlays[De]);ie._drawOverlays(),ie._opening=!1,ie.raiseEvent("open",{source:pe})}else ie._opening=!1,ie.raiseEvent("open-failed",de)},Ce=function(pe){(!n.isPlainObject(pe)||!pe.tileSource)&&(pe={tileSource:pe}),pe.index!==void 0&&(n.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete pe.index),pe.collectionImmediately===void 0&&(pe.collectionImmediately=!0);var De=pe.success;pe.success=function(D){if(he++,pe.tileSource.overlays)for(var q=0;q<pe.tileSource.overlays.length;q++)ie.addOverlay(pe.tileSource.overlays[q]);De&&De(D),Pe()};var N=pe.error;pe.error=function(D){Se++,de||(de=D),N&&N(D),Pe()},ie.addTiledImage(pe)},re=0;re<T.length;re++)Ce(T[re]);return this},close:function(){return r[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),r[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(r[this.hash]){if(this.raiseEvent("before-destroy"),this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this._resizeObserver&&this._resizeObserver.disconnect(),this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),this._updateRequestId!==null&&(n.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),r[this.navigator.hash]=null,delete r[this.navigator.hash],this.navigator=null),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),r[this.hash]=null,delete r[this.hash],this.canvas=null,this.container=null,n._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},requestDrawer(T,V){const ie={mainDrawer:!0,redrawImmediately:!0,drawerOptions:null};V=n.extend(!0,ie,V);const ue=V.mainDrawer,he=V.redrawImmediately,Se=V.drawerOptions,de=this.drawer;let Pe=null;if(T&&T.prototype instanceof n.DrawerBase?(Pe=T,T="custom"):typeof T=="string"&&(Pe=n.determineDrawer(T)),Pe||n.console.warn("Unsupported drawer! Drawer must be an existing string type, or a class that extends OpenSeadragon.DrawerBase."),Pe&&Pe.isSupported()){de&&ue&&de.destroy();const Ce=new Pe({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor,options:Se||this.drawerOptions[T]});return ue&&(this.drawer=Ce,he&&this.forceRedraw()),Ce}return!1},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(T){return this.innerTracker.setTracking(T),this.outerTracker.setTracking(T),this.raiseEvent("mouse-enabled",{enabled:T}),this},areControlsEnabled:function(){var T=this.controls.length,V;for(V=0;V<this.controls.length;V++)T=T&&this.controls[V].isVisible();return T},setControlsEnabled:function(T){return T?h(this):d(this),this.raiseEvent("controls-enabled",{enabled:T}),this},setDebugMode:function(T){for(var V=0;V<this.world.getItemCount();V++)this.world.getItemAt(V).debugMode=T;this.debugMode=T,this.forceRedraw()},setAjaxHeaders:function(T,V){if(T===null&&(T={}),!n.isPlainObject(T)){console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}if(V===void 0&&(V=!0),this.ajaxHeaders=T,V){for(var ie=0;ie<this.world.getItemCount();ie++)this.world.getItemAt(ie)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var ue in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[ue].setAjaxHeaders(this.ajaxHeaders,!0)}},addButton:function(T){this.buttonGroup.addButton(T)},isFullPage:function(){return r[this.hash]&&r[this.hash].fullPage},setFullPage:function(T){var V=document.body,ie=V.style,ue=document.documentElement.style,he=this,Se,de;if(T===this.isFullPage())return this;var Pe={fullPage:T,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",Pe),Pe.preventDefaultAction)return this;if(T&&this.element){for(this.elementSize=n.getElementSize(this.element),this.pageScroll=n.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=ie.margin,this.docMargin=ue.margin,ie.margin="0",ue.margin="0",this.bodyPadding=ie.padding,this.docPadding=ue.padding,ie.padding="0",ue.padding="0",this.bodyWidth=ie.width,this.docWidth=ue.width,ie.width="100%",ue.width="100%",this.bodyHeight=ie.height,this.docHeight=ue.height,ie.height="100%",ue.height="100%",this.bodyDisplay=ie.display,ie.display="block",this.previousBody=[],r[this.hash].prevElementParent=this.element.parentNode,r[this.hash].prevNextSibling=this.element.nextSibling,r[this.hash].prevElementWidth=this.element.style.width,r[this.hash].prevElementHeight=this.element.style.height,Se=V.childNodes.length,de=0;de<Se;de++)this.previousBody.push(V.childNodes[0]),V.removeChild(V.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,V.appendChild(this.toolbar.element),n.addClass(this.toolbar.element,"fullpage")),n.addClass(this.element,"fullpage"),V.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=n.getElementSize(this.element).y-n.getElementSize(this.toolbar.element).y+"px"),r[this.hash].fullPage=!0,n.delegate(this,Y)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,ie.margin=this.bodyMargin,ue.margin=this.docMargin,ie.padding=this.bodyPadding,ue.padding=this.docPadding,ie.width=this.bodyWidth,ue.width=this.docWidth,ie.height=this.bodyHeight,ue.height=this.docHeight,ie.display=this.bodyDisplay,V.removeChild(this.element),Se=this.previousBody.length,de=0;de<Se;de++)V.appendChild(this.previousBody.shift());n.removeClass(this.element,"fullpage"),r[this.hash].prevElementParent.insertBefore(this.element,r[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(V.removeChild(this.toolbar.element),n.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=r[this.hash].prevElementWidth,this.element.style.height=r[this.hash].prevElementHeight;var Ce=0,re=function(){n.setPageScroll(he.pageScroll);var pe=n.getPageScroll();Ce++,Ce<10&&(pe.x!==he.pageScroll.x||pe.y!==he.pageScroll.y)&&n.requestAnimationFrame(re)};n.requestAnimationFrame(re),r[this.hash].fullPage=!1,n.delegate(this,Z)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:T}),this},setFullScreen:function(T){var V=this;if(!n.supportsFullScreen)return this.setFullPage(T);if(n.isFullScreen()===T)return this;var ie={fullScreen:T,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",ie),ie.preventDefaultAction)return this;if(T){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var ue=function(){var he=n.isFullScreen();he||(n.removeEvent(document,n.fullScreenEventName,ue),n.removeEvent(document,n.fullScreenErrorEventName,ue),V.setFullPage(!1),V.isFullPage()&&(V.element.style.width=V.fullPageStyleWidth,V.element.style.height=V.fullPageStyleHeight)),V.navigator&&V.viewport&&setTimeout(function(){V.navigator.update(V.viewport)}),V.raiseEvent("full-screen",{fullScreen:he})};n.addEvent(document,n.fullScreenEventName,ue),n.addEvent(document,n.fullScreenErrorEventName,ue),n.requestFullScreen(document.body)}else n.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},isFullScreen:function(){return n.isFullScreen()&&this.isFullPage()},setVisible:function(T){return this.container.style.visibility=T?"":"hidden",this.raiseEvent("visible",{visible:T}),this},addTiledImage:function(T){n.console.assert(T,"[Viewer.addTiledImage] options is required"),n.console.assert(T.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),n.console.assert(!T.replace||T.index>-1&&T.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var V=this;T.replace&&(T.replaceItem=V.world.getItemAt(T.index)),this._hideMessage(),T.placeholderFillStyle===void 0&&(T.placeholderFillStyle=this.placeholderFillStyle),T.opacity===void 0&&(T.opacity=this.opacity),T.preload===void 0&&(T.preload=this.preload),T.compositeOperation===void 0&&(T.compositeOperation=this.compositeOperation),T.crossOriginPolicy===void 0&&(T.crossOriginPolicy=T.tileSource.crossOriginPolicy!==void 0?T.tileSource.crossOriginPolicy:this.crossOriginPolicy),T.ajaxWithCredentials===void 0&&(T.ajaxWithCredentials=this.ajaxWithCredentials),T.loadTilesWithAjax===void 0&&(T.loadTilesWithAjax=this.loadTilesWithAjax),n.isPlainObject(T.ajaxHeaders)||(T.ajaxHeaders={});var ie={options:T};function ue(de){for(var Pe=0;Pe<V._loadQueue.length;Pe++)if(V._loadQueue[Pe]===ie){V._loadQueue.splice(Pe,1);break}V._loadQueue.length===0&&he(ie),V.raiseEvent("add-item-failed",de),T.error&&T.error(de)}function he(de){V.collectionMode&&(V.world.arrange({immediately:de.options.collectionImmediately,rows:V.collectionRows,columns:V.collectionColumns,layout:V.collectionLayout,tileSize:V.collectionTileSize,tileMargin:V.collectionTileMargin}),V.world.setAutoRefigureSizes(!0))}if(n.isArray(T.tileSource)){setTimeout(function(){ue({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:T.tileSource,options:T})});return}this._loadQueue.push(ie);function Se(){for(var de,Pe,Ce;V._loadQueue.length&&(de=V._loadQueue[0],!!de.tileSource);){if(V._loadQueue.splice(0,1),de.options.replace){var re=V.world.getIndexOfItem(de.options.replaceItem);re!==-1&&(de.options.index=re),V.world.removeItem(de.options.replaceItem)}Pe=new n.TiledImage({viewer:V,source:de.tileSource,viewport:V.viewport,drawer:V.drawer,tileCache:V.tileCache,imageLoader:V.imageLoader,x:de.options.x,y:de.options.y,width:de.options.width,height:de.options.height,fitBounds:de.options.fitBounds,fitBoundsPlacement:de.options.fitBoundsPlacement,clip:de.options.clip,placeholderFillStyle:de.options.placeholderFillStyle,opacity:de.options.opacity,preload:de.options.preload,degrees:de.options.degrees,flipped:de.options.flipped,compositeOperation:de.options.compositeOperation,springStiffness:V.springStiffness,animationTime:V.animationTime,minZoomImageRatio:V.minZoomImageRatio,wrapHorizontal:V.wrapHorizontal,wrapVertical:V.wrapVertical,maxTilesPerFrame:V.maxTilesPerFrame,immediateRender:V.immediateRender,blendTime:V.blendTime,alwaysBlend:V.alwaysBlend,minPixelRatio:V.minPixelRatio,smoothTileEdgesMinZoom:V.smoothTileEdgesMinZoom,iOSDevice:V.iOSDevice,crossOriginPolicy:de.options.crossOriginPolicy,ajaxWithCredentials:de.options.ajaxWithCredentials,loadTilesWithAjax:de.options.loadTilesWithAjax,ajaxHeaders:de.options.ajaxHeaders,debugMode:V.debugMode,subPixelRoundingForTransparency:V.subPixelRoundingForTransparency}),V.collectionMode&&V.world.setAutoRefigureSizes(!1),V.navigator&&(Ce=n.extend({},de.options,{replace:!1,originalTiledImage:Pe,tileSource:de.tileSource}),V.navigator.addTiledImage(Ce)),V.world.addItem(Pe,{index:de.options.index}),V._loadQueue.length===0&&he(de),V.world.getItemCount()===1&&!V.preserveViewport&&V.viewport.goHome(!0),de.options.success&&de.options.success({item:Pe})}}o(this,T.tileSource,T,function(de){ie.tileSource=de,Se()},function(de){de.options=T,ue(de),Se()})},addSimpleImage:function(T){n.console.assert(T,"[Viewer.addSimpleImage] options is required"),n.console.assert(T.url,"[Viewer.addSimpleImage] options.url is required");var V=n.extend({},T,{tileSource:{type:"image",url:T.url}});delete V.url,this.addTiledImage(V)},addLayer:function(T){var V=this;n.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var ie=n.extend({},T,{success:function(ue){V.raiseEvent("add-layer",{options:T,drawer:ue.item})},error:function(ue){V.raiseEvent("add-layer-failed",ue)}});return this.addTiledImage(ie),this},getLayerAtLevel:function(T){return n.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(T)},getLevelOfLayer:function(T){return n.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(T)},getLayersCount:function(){return n.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(T,V){return n.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(T,V)},removeLayer:function(T){return n.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(T)},forceRedraw:function(){return r[this.hash].forceRedraw=!0,this},forceResize:function(){r[this.hash].needsResize=!0,r[this.hash].forceResize=!0},bindSequenceControls:function(){var T=n.delegate(this,p),V=n.delegate(this,m),ie=n.delegate(this,this.goToNextPage),ue=n.delegate(this,this.goToPreviousPage),he=this.navImages,Se=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(Se=!1),this.previousButton=new n.Button({element:this.previousButton?n.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.PreviousPage"),srcRest:xe(this.prefixUrl,he.previous.REST),srcGroup:xe(this.prefixUrl,he.previous.GROUP),srcHover:xe(this.prefixUrl,he.previous.HOVER),srcDown:xe(this.prefixUrl,he.previous.DOWN),onRelease:ue,onFocus:T,onBlur:V}),this.nextButton=new n.Button({element:this.nextButton?n.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.NextPage"),srcRest:xe(this.prefixUrl,he.next.REST),srcGroup:xe(this.prefixUrl,he.next.GROUP),srcHover:xe(this.prefixUrl,he.next.HOVER),srcDown:xe(this.prefixUrl,he.next.DOWN),onRelease:ie,onFocus:T,onBlur:V}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),Se&&(this.paging=new n.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:n.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||n.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var T=n.delegate(this,Me),V=n.delegate(this,Ue),ie=n.delegate(this,Te),ue=n.delegate(this,Ve),he=n.delegate(this,Ie),Se=n.delegate(this,Q),de=n.delegate(this,J),Pe=n.delegate(this,ae),Ce=n.delegate(this,we),re=n.delegate(this,be),pe=n.delegate(this,p),De=n.delegate(this,m),N=this.navImages,D=[],q=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(q=!1),this.showZoomControl&&(D.push(this.zoomInButton=new n.Button({element:this.zoomInButton?n.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.ZoomIn"),srcRest:xe(this.prefixUrl,N.zoomIn.REST),srcGroup:xe(this.prefixUrl,N.zoomIn.GROUP),srcHover:xe(this.prefixUrl,N.zoomIn.HOVER),srcDown:xe(this.prefixUrl,N.zoomIn.DOWN),onPress:T,onRelease:V,onClick:ie,onEnter:T,onExit:V,onFocus:pe,onBlur:De})),D.push(this.zoomOutButton=new n.Button({element:this.zoomOutButton?n.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.ZoomOut"),srcRest:xe(this.prefixUrl,N.zoomOut.REST),srcGroup:xe(this.prefixUrl,N.zoomOut.GROUP),srcHover:xe(this.prefixUrl,N.zoomOut.HOVER),srcDown:xe(this.prefixUrl,N.zoomOut.DOWN),onPress:ue,onRelease:V,onClick:he,onEnter:ue,onExit:V,onFocus:pe,onBlur:De}))),this.showHomeControl&&D.push(this.homeButton=new n.Button({element:this.homeButton?n.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.Home"),srcRest:xe(this.prefixUrl,N.home.REST),srcGroup:xe(this.prefixUrl,N.home.GROUP),srcHover:xe(this.prefixUrl,N.home.HOVER),srcDown:xe(this.prefixUrl,N.home.DOWN),onRelease:Se,onFocus:pe,onBlur:De})),this.showFullPageControl&&D.push(this.fullPageButton=new n.Button({element:this.fullPageButton?n.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.FullPage"),srcRest:xe(this.prefixUrl,N.fullpage.REST),srcGroup:xe(this.prefixUrl,N.fullpage.GROUP),srcHover:xe(this.prefixUrl,N.fullpage.HOVER),srcDown:xe(this.prefixUrl,N.fullpage.DOWN),onRelease:de,onFocus:pe,onBlur:De})),this.showRotationControl&&(D.push(this.rotateLeftButton=new n.Button({element:this.rotateLeftButton?n.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.RotateLeft"),srcRest:xe(this.prefixUrl,N.rotateleft.REST),srcGroup:xe(this.prefixUrl,N.rotateleft.GROUP),srcHover:xe(this.prefixUrl,N.rotateleft.HOVER),srcDown:xe(this.prefixUrl,N.rotateleft.DOWN),onRelease:Pe,onFocus:pe,onBlur:De})),D.push(this.rotateRightButton=new n.Button({element:this.rotateRightButton?n.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.RotateRight"),srcRest:xe(this.prefixUrl,N.rotateright.REST),srcGroup:xe(this.prefixUrl,N.rotateright.GROUP),srcHover:xe(this.prefixUrl,N.rotateright.HOVER),srcDown:xe(this.prefixUrl,N.rotateright.DOWN),onRelease:Ce,onFocus:pe,onBlur:De}))),this.showFlipControl&&D.push(this.flipButton=new n.Button({element:this.flipButton?n.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:n.getString("Tooltips.Flip"),srcRest:xe(this.prefixUrl,N.flip.REST),srcGroup:xe(this.prefixUrl,N.flip.GROUP),srcHover:xe(this.prefixUrl,N.flip.HOVER),srcDown:xe(this.prefixUrl,N.flip.DOWN),onRelease:re,onFocus:pe,onBlur:De})),q?(this.buttonGroup=new n.ButtonGroup({buttons:D,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",n.delegate(this,Ae)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||n.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||n.ControlAnchor.TOP_LEFT})):this.customButtons=D),this},currentPage:function(){return this._sequenceIndex},goToPage:function(T){return this.tileSources&&T>=0&&T<this.tileSources.length&&(this._sequenceIndex=T,this._updateSequenceButtons(T),this.open(this.tileSources[T]),this.referenceStrip&&this.referenceStrip.setFocus(T),this.raiseEvent("page",{page:T})),this},addOverlay:function(T,V,ie,ue){var he;if(n.isPlainObject(T)?he=T:he={element:T,location:V,placement:ie,onDraw:ue},T=n.getElement(he.element),l(this.currentOverlays,T)>=0)return this;var Se=a(this,he);return this.currentOverlays.push(Se),Se.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:T,location:he.location,placement:he.placement}),this},updateOverlay:function(T,V,ie){var ue;return T=n.getElement(T),ue=l(this.currentOverlays,T),ue>=0&&(this.currentOverlays[ue].update(V,ie),r[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:T,location:V,placement:ie})),this},removeOverlay:function(T){var V;return T=n.getElement(T),V=l(this.currentOverlays,T),V>=0&&(this.currentOverlays[V].destroy(),this.currentOverlays.splice(V,1),r[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:T})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return r[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(T){var V;return T=n.getElement(T),V=l(this.currentOverlays,T),V>=0?this.currentOverlays[V]:null},_updateSequenceButtons:function(T){this.nextButton&&(!this.tileSources||this.tileSources.length-1===T?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(T>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(T){this._hideMessage();var V=n.makeNeutralElement("div");V.appendChild(document.createTextNode(T)),this.messageDiv=n.makeCenteredNode(V),n.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var T=this.messageDiv;T&&(T.parentNode.removeChild(T),delete this.messageDiv)},gestureSettingsByDeviceType:function(T){switch(T){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var T,V=this.currentOverlays.length;for(T=0;T<V;T++)this.currentOverlays[T].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(this.referenceStrip=new n.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else n.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),n.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){n.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var T=n.pixelDensityRatio,V=n.getCurrentPixelDensityRatio();T!==V&&(n.pixelDensityRatio=V,this.forceResize())},goToPreviousPage:function(){var T=this._sequenceIndex-1;this.navPrevNextWrap&&T<0&&(T+=this.tileSources.length),this.goToPage(T)},goToNextPage:function(){var T=this._sequenceIndex+1;this.navPrevNextWrap&&T>=this.tileSources.length&&(T=0),this.goToPage(T)},isAnimating:function(){return r[this.hash].animating}});function s(T){return T=n.getElement(T),new n.Point(T.clientWidth===0?1:T.clientWidth,T.clientHeight===0?1:T.clientHeight)}function o(T,V,ie,ue,he){var Se=T;if(n.type(V)==="string"){if(V.match(/^\s*<.*>\s*$/))V=n.parseXml(V);else if(V.match(/^\s*[{[].*[}\]]\s*$/))try{var de=n.parseJSON(V);V=de}catch{}}function Pe(Ce,re){Ce.ready?ue(Ce):(Ce.addHandler("ready",function(){ue(Ce)}),Ce.addHandler("open-failed",function(pe){he({message:pe.message,source:re})}))}setTimeout(function(){if(n.type(V)==="string")V=new n.TileSource({url:V,crossOriginPolicy:ie.crossOriginPolicy!==void 0?ie.crossOriginPolicy:T.crossOriginPolicy,ajaxWithCredentials:T.ajaxWithCredentials,ajaxHeaders:ie.ajaxHeaders?ie.ajaxHeaders:T.ajaxHeaders,splitHashDataForPost:T.splitHashDataForPost,success:function(De){ue(De.tileSource)}}),V.addHandler("open-failed",function(De){he(De)});else if(n.isPlainObject(V)||V.nodeType)if(V.crossOriginPolicy===void 0&&(ie.crossOriginPolicy!==void 0||T.crossOriginPolicy!==void 0)&&(V.crossOriginPolicy=ie.crossOriginPolicy!==void 0?ie.crossOriginPolicy:T.crossOriginPolicy),V.ajaxWithCredentials===void 0&&(V.ajaxWithCredentials=T.ajaxWithCredentials),n.isFunction(V.getTileUrl)){var Ce=new n.TileSource(V);Ce.getTileUrl=V.getTileUrl,ue(Ce)}else{var re=n.TileSource.determineType(Se,V);if(!re){he({message:"Unable to load TileSource",source:V});return}var pe=re.prototype.configure.apply(Se,[V]);Pe(new re(pe),V)}else Pe(V,V)})}function a(T,V){if(V instanceof n.Overlay)return V;var ie=null;if(V.element)ie=n.getElement(V.element);else{var ue=V.id?V.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);ie=n.getElement(V.id),ie||(ie=document.createElement("a"),ie.href="#/overlay/"+ue),ie.id=ue,n.addClass(ie,V.className?V.className:"openseadragon-overlay")}var he=V.location,Se=V.width,de=V.height;if(!he){var Pe=V.x,Ce=V.y;if(V.px!==void 0){var re=T.viewport.imageToViewportRectangle(new n.Rect(V.px,V.py,Se||0,de||0));Pe=re.x,Ce=re.y,Se=Se!==void 0?re.width:void 0,de=de!==void 0?re.height:void 0}he=new n.Point(Pe,Ce)}var pe=V.placement;return pe&&n.type(pe)==="string"&&(pe=n.Placement[V.placement.toUpperCase()]),new n.Overlay({element:ie,location:he,placement:pe,onDraw:V.onDraw,checkResize:V.checkResize,width:Se,height:de,rotationMode:V.rotationMode})}function l(T,V){var ie;for(ie=T.length-1;ie>=0;ie--)if(T[ie].element===V)return ie;return-1}function u(T,V){return n.requestAnimationFrame(function(){V(T)})}function c(T){n.requestAnimationFrame(function(){f(T)})}function d(T){T.autoHideControls&&(T.controlsShouldFade=!0,T.controlsFadeBeginTime=n.now()+T.controlsFadeDelay,window.setTimeout(function(){c(T)},T.controlsFadeDelay))}function f(T){var V,ie,ue,he;if(T.controlsShouldFade){for(V=n.now(),ie=V-T.controlsFadeBeginTime,ue=1-ie/T.controlsFadeLength,ue=Math.min(1,ue),ue=Math.max(0,ue),he=T.controls.length-1;he>=0;he--)T.controls[he].autoFade&&T.controls[he].setOpacity(ue);ue>0&&c(T)}}function h(T){var V;for(T.controlsShouldFade=!1,V=T.controls.length-1;V>=0;V--)T.controls[V].setOpacity(1)}function p(){h(this)}function m(){d(this)}function g(T){var V={tracker:T.eventSource,position:T.position,originalEvent:T.originalEvent,preventDefault:T.preventDefault};this.raiseEvent("canvas-contextmenu",V),T.preventDefault=V.preventDefault}function v(T){var V={originalEvent:T.originalEvent,preventDefaultAction:!1,preventVerticalPan:T.preventVerticalPan||!this.panVertical,preventHorizontalPan:T.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",V),!V.preventDefaultAction&&!T.ctrl&&!T.alt&&!T.meta)switch(T.keyCode){case 38:V.preventVerticalPan||(T.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 40:V.preventVerticalPan||(T.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 37:V.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 39:V.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),T.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),T.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),T.preventDefault=!0;break;case 87:V.preventVerticalPan||(T.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(0,-40))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 83:V.preventVerticalPan||(T.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(0,40))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 65:V.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(-40,0))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 68:V.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new n.Point(40,0))),this.viewport.applyConstraints()),T.preventDefault=!0;break;case 82:T.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),T.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),T.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:T.preventDefault=!1;break}else T.preventDefault=!1}function w(T){var V={originalEvent:T.originalEvent};this.raiseEvent("canvas-key-press",V)}function b(T){var V,ie=document.activeElement===this.canvas;ie||this.canvas.focus(),this.viewport.flipped&&(T.position.x=this.viewport.getContainerSize().x-T.position.x);var ue={tracker:T.eventSource,position:T.position,quick:T.quick,shift:T.shift,originalEvent:T.originalEvent,originalTarget:T.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",ue),!ue.preventDefaultAction&&this.viewport&&T.quick&&(V=this.gestureSettingsByDeviceType(T.pointerType),V.clickToZoom===!0&&(this.viewport.zoomBy(T.shift?1/this.zoomPerClick:this.zoomPerClick,V.zoomToRefPoint?this.viewport.pointFromPixel(T.position,!0):null),this.viewport.applyConstraints()),V.dblClickDragToZoom&&(r[this.hash].draggingToZoom===!0?(r[this.hash].lastClickTime=null,r[this.hash].draggingToZoom=!1):r[this.hash].lastClickTime=n.now()))}function _(T){var V,ie={tracker:T.eventSource,position:T.position,shift:T.shift,originalEvent:T.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",ie),!ie.preventDefaultAction&&this.viewport&&(V=this.gestureSettingsByDeviceType(T.pointerType),V.dblClickToZoom&&(this.viewport.zoomBy(T.shift?1/this.zoomPerClick:this.zoomPerClick,V.zoomToRefPoint?this.viewport.pointFromPixel(T.position,!0):null),this.viewport.applyConstraints()))}function x(T){var V,ie={tracker:T.eventSource,pointerType:T.pointerType,position:T.position,delta:T.delta,speed:T.speed,direction:T.direction,shift:T.shift,originalEvent:T.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",ie),V=this.gestureSettingsByDeviceType(T.pointerType),!ie.preventDefaultAction&&this.viewport){if(V.dblClickDragToZoom&&r[this.hash].draggingToZoom){var ue=Math.pow(this.zoomPerDblClickDrag,T.delta.y/50);this.viewport.zoomBy(ue)}else if(V.dragToPan&&!r[this.hash].draggingToZoom){if(this.panHorizontal||(T.delta.x=0),this.panVertical||(T.delta.y=0),this.viewport.flipped&&(T.delta.x=-T.delta.x),this.constrainDuringPan){var he=this.viewport.deltaPointsFromPixels(T.delta.negate());this.viewport.centerSpringX.target.value+=he.x,this.viewport.centerSpringY.target.value+=he.y;var Se=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=he.x,this.viewport.centerSpringY.target.value-=he.y,Se.xConstrained&&(T.delta.x=0),Se.yConstrained&&(T.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(T.delta.negate()),V.flickEnabled&&!this.constrainDuringPan)}}}function S(T){var V,ie={tracker:T.eventSource,pointerType:T.pointerType,position:T.position,speed:T.speed,direction:T.direction,shift:T.shift,originalEvent:T.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",ie),V=this.gestureSettingsByDeviceType(T.pointerType),!ie.preventDefaultAction&&this.viewport){if(!r[this.hash].draggingToZoom&&V.dragToPan&&V.flickEnabled&&T.speed>=V.flickMinSpeed){var ue=0;this.panHorizontal&&(ue=V.flickMomentum*T.speed*Math.cos(T.direction));var he=0;this.panVertical&&(he=V.flickMomentum*T.speed*Math.sin(T.direction));var Se=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),de=this.viewport.pointFromPixel(new n.Point(Se.x-ue,Se.y-he));this.viewport.panTo(de,!1)}this.viewport.applyConstraints()}V.dblClickDragToZoom&&r[this.hash].draggingToZoom===!0&&(r[this.hash].draggingToZoom=!1)}function I(T){this.raiseEvent("canvas-enter",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,buttons:T.buttons,pointers:T.pointers,insideElementPressed:T.insideElementPressed,buttonDownAny:T.buttonDownAny,originalEvent:T.originalEvent})}function P(T){this.raiseEvent("canvas-exit",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,buttons:T.buttons,pointers:T.pointers,insideElementPressed:T.insideElementPressed,buttonDownAny:T.buttonDownAny,originalEvent:T.originalEvent})}function R(T){var V;if(this.raiseEvent("canvas-press",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,insideElementPressed:T.insideElementPressed,insideElementReleased:T.insideElementReleased,originalEvent:T.originalEvent}),V=this.gestureSettingsByDeviceType(T.pointerType),V.dblClickDragToZoom){var ie=r[this.hash].lastClickTime,ue=n.now();if(ie===null)return;ue-ie<this.dblClickTimeThreshold&&(r[this.hash].draggingToZoom=!0),r[this.hash].lastClickTime=null}}function O(T){this.raiseEvent("canvas-release",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,insideElementPressed:T.insideElementPressed,insideElementReleased:T.insideElementReleased,originalEvent:T.originalEvent})}function M(T){this.raiseEvent("canvas-nonprimary-press",{tracker:T.eventSource,position:T.position,pointerType:T.pointerType,button:T.button,buttons:T.buttons,originalEvent:T.originalEvent})}function E(T){this.raiseEvent("canvas-nonprimary-release",{tracker:T.eventSource,position:T.position,pointerType:T.pointerType,button:T.button,buttons:T.buttons,originalEvent:T.originalEvent})}function L(T){var V,ie,ue,he,Se={tracker:T.eventSource,pointerType:T.pointerType,gesturePoints:T.gesturePoints,lastCenter:T.lastCenter,center:T.center,lastDistance:T.lastDistance,distance:T.distance,shift:T.shift,originalEvent:T.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",Se),this.viewport&&(V=this.gestureSettingsByDeviceType(T.pointerType),V.pinchToZoom&&(!Se.preventDefaultPanAction||!Se.preventDefaultZoomAction)&&(ie=this.viewport.pointFromPixel(T.center,!0),V.zoomToRefPoint&&!Se.preventDefaultPanAction&&(ue=this.viewport.pointFromPixel(T.lastCenter,!0),he=ue.minus(ie),this.panHorizontal||(he.x=0),this.panVertical||(he.y=0),this.viewport.panBy(he,!0)),Se.preventDefaultZoomAction||this.viewport.zoomBy(T.distance/T.lastDistance,ie,!0),this.viewport.applyConstraints()),V.pinchRotate&&!Se.preventDefaultRotateAction)){var de=Math.atan2(T.gesturePoints[0].currentPos.y-T.gesturePoints[1].currentPos.y,T.gesturePoints[0].currentPos.x-T.gesturePoints[1].currentPos.x),Pe=Math.atan2(T.gesturePoints[0].lastPos.y-T.gesturePoints[1].lastPos.y,T.gesturePoints[0].lastPos.x-T.gesturePoints[1].lastPos.x);ie=this.viewport.pointFromPixel(T.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(de-Pe)*(180/Math.PI),ie,!0)}}function j(T){this.raiseEvent("canvas-focus",{tracker:T.eventSource,originalEvent:T.originalEvent})}function F(T){this.raiseEvent("canvas-blur",{tracker:T.eventSource,originalEvent:T.originalEvent})}function B(T){var V,ie,ue,he,Se;he=n.now(),Se=he-this._lastScrollTime,Se>this.minScrollDeltaTime?(this._lastScrollTime=he,V={tracker:T.eventSource,position:T.position,scroll:T.scroll,shift:T.shift,originalEvent:T.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",V),!V.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(T.position.x=this.viewport.getContainerSize().x-T.position.x),ie=this.gestureSettingsByDeviceType(T.pointerType),ie.scrollToZoom&&(ue=Math.pow(this.zoomPerScroll,T.scroll),this.viewport.zoomBy(ue,ie.zoomToRefPoint?this.viewport.pointFromPixel(T.position,!0):null),this.viewport.applyConstraints())),T.preventDefault=V.preventDefault):T.preventDefault=!0}function Y(T){r[this.hash].mouseInside=!0,h(this),this.raiseEvent("container-enter",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,buttons:T.buttons,pointers:T.pointers,insideElementPressed:T.insideElementPressed,buttonDownAny:T.buttonDownAny,originalEvent:T.originalEvent})}function Z(T){T.pointers<1&&(r[this.hash].mouseInside=!1,r[this.hash].animating||d(this)),this.raiseEvent("container-exit",{tracker:T.eventSource,pointerType:T.pointerType,position:T.position,buttons:T.buttons,pointers:T.pointers,insideElementPressed:T.insideElementPressed,buttonDownAny:T.buttonDownAny,originalEvent:T.originalEvent})}function ne(T){le(T),T.isOpen()?T._updateRequestId=u(T,ne):T._updateRequestId=!1}function oe(T,V){var ie=T.viewport,ue=ie.getZoom(),he=ie.getCenter();ie.resize(V,T.preserveImageSizeOnResize),ie.panTo(he,!0);var Se;if(T.preserveImageSizeOnResize)Se=r[T.hash].prevContainerSize.x/V.x;else{var de=new n.Point(0,0),Pe=new n.Point(r[T.hash].prevContainerSize.x,r[T.hash].prevContainerSize.y).distanceTo(de),Ce=new n.Point(V.x,V.y).distanceTo(de);Se=Ce/Pe*r[T.hash].prevContainerSize.x/V.x}ie.zoomTo(ue*Se,null,!0),r[T.hash].prevContainerSize=V,r[T.hash].forceRedraw=!0,r[T.hash].needsResize=!1,r[T.hash].forceResize=!1}function le(T){if(!(T._opening||!r[T.hash])){if(T.autoResize||r[T.hash].forceResize){var V;if(T._autoResizePolling){V=s(T.container);var ie=r[T.hash].prevContainerSize;V.equals(ie)||(r[T.hash].needsResize=!0)}r[T.hash].needsResize&&oe(T,V||s(T.container))}var ue=T.viewport.update(),he=T.world.update(ue)||ue;ue&&T.raiseEvent("viewport-change"),T.referenceStrip&&(he=T.referenceStrip.update(T.viewport)||he);var Se=r[T.hash].animating;!Se&&he&&(T.raiseEvent("animation-start"),h(T));var de=Se&&!he;de&&(r[T.hash].animating=!1),(he||de||r[T.hash].forceRedraw||T.world.needsDraw())&&(Ee(T),T._drawOverlays(),T.navigator&&T.navigator.update(T.viewport),r[T.hash].forceRedraw=!1,he&&T.raiseEvent("animation")),de&&(T.raiseEvent("animation-finish"),r[T.hash].mouseInside||d(T)),r[T.hash].animating=he}}function Ee(T){T.imageLoader.clear(),T.world.draw(),T.raiseEvent("update-viewport",{})}function xe(T,V){return T?T+V:V}function Me(){r[this.hash].lastZoomTime=n.now(),r[this.hash].zoomFactor=this.zoomPerSecond,r[this.hash].zooming=!0,me(this)}function Ve(){r[this.hash].lastZoomTime=n.now(),r[this.hash].zoomFactor=1/this.zoomPerSecond,r[this.hash].zooming=!0,me(this)}function Ue(){r[this.hash].zooming=!1}function me(T){n.requestAnimationFrame(n.delegate(T,_e))}function _e(){var T,V,ie;r[this.hash].zooming&&this.viewport&&(T=n.now(),V=T-r[this.hash].lastZoomTime,ie=Math.pow(r[this.hash].zoomFactor,V/1e3),this.viewport.zoomBy(ie),this.viewport.applyConstraints(),r[this.hash].lastZoomTime=T,me(this))}function Te(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Ie(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function Ae(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function Q(){this.viewport&&this.viewport.goHome()}function J(){this.isFullPage()&&!n.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function ae(){if(this.viewport){var T=this.viewport.getRotation();this.viewport.flipped?T+=this.rotationIncrement:T-=this.rotationIncrement,this.viewport.setRotation(T)}}function we(){if(this.viewport){var T=this.viewport.getRotation();this.viewport.flipped?T-=this.rotationIncrement:T+=this.rotationIncrement,this.viewport.setRotation(T)}}function be(){this.viewport.toggleFlip()}n.determineDrawer=function(T){for(let V in t){const ie=t[V],ue=ie.prototype;if(ue&&ue instanceof t.DrawerBase&&n.isFunction(ue.getType)&&ue.getType.call(ie)===T)return ie}return null}}(t),function(n){n.Navigator=function(u){var c=u.viewer,d=this,f,h;u.element||u.id?(u.element?(u.id&&n.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),u.element.id?u.id=u.element.id:u.id="navigator-"+n.now(),this.element=u.element):this.element=document.getElementById(u.id),u.controlOptions={anchor:n.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(u.id="navigator-"+n.now(),this.element=n.makeNeutralElement("div"),u.controlOptions={anchor:n.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:u.autoFade},u.position&&(u.position==="BOTTOM_RIGHT"?u.controlOptions.anchor=n.ControlAnchor.BOTTOM_RIGHT:u.position==="BOTTOM_LEFT"?u.controlOptions.anchor=n.ControlAnchor.BOTTOM_LEFT:u.position==="TOP_RIGHT"?u.controlOptions.anchor=n.ControlAnchor.TOP_RIGHT:u.position==="TOP_LEFT"?u.controlOptions.anchor=n.ControlAnchor.TOP_LEFT:u.position==="ABSOLUTE"&&(u.controlOptions.anchor=n.ControlAnchor.ABSOLUTE,u.controlOptions.top=u.top,u.controlOptions.left=u.left,u.controlOptions.height=u.height,u.controlOptions.width=u.width))),this.element.id=u.id,this.element.className+=" navigator",u=n.extend(!0,{sizeRatio:n.DEFAULT_SETTINGS.navigatorSizeRatio},u,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:u.animationTime,autoResize:!1,minZoomImageRatio:1,background:u.background,opacity:u.opacity,borderColor:u.borderColor,displayRegionColor:u.displayRegionColor}),u.minPixelRatio=this.minPixelRatio=c.minPixelRatio,n.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new n.Point(1,1),this.totalBorderWidths=new n.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),u.controlOptions.anchor!==n.ControlAnchor.NONE&&function(g,v){g.margin="0px",g.border=v+"px solid "+u.borderColor,g.padding="0px",g.background=u.background,g.opacity=u.opacity,g.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=n.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(g,v){g.position="relative",g.top="0px",g.left="0px",g.fontSize="0px",g.overflow="hidden",g.border=v+"px solid "+u.displayRegionColor,g.margin="0px",g.padding="0px",g.background="transparent",g.float="left",g.cssFloat="left",g.zIndex=999999999,g.cursor="default",g.boxSizing="content-box"}(this.displayRegion.style,this.borderWidth),n.setElementPointerEventsNone(this.displayRegion),n.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=n.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",n.setElementPointerEventsNone(this.displayRegionContainer),n.setElementTouchActionNone(this.displayRegionContainer),c.addControl(this.element,u.controlOptions),this._resizeWithViewer=u.controlOptions.anchor!==n.ControlAnchor.ABSOLUTE&&u.controlOptions.anchor!==n.ControlAnchor.NONE,u.width&&u.height?(this.setWidth(u.width),this.setHeight(u.height)):this._resizeWithViewer&&(f=n.getElementSize(c.element),this.element.style.height=Math.round(f.y*u.sizeRatio)+"px",this.element.style.width=Math.round(f.x*u.sizeRatio)+"px",this.oldViewerSize=f,h=n.getElementSize(this.element),this.elementArea=h.x*h.y),this.oldContainerSize=new n.Point(0,0),n.Viewer.apply(this,[u]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function p(g,v){a(d.displayRegionContainer,g),a(d.displayRegion,-g),d.viewport.setRotation(g,v)}if(u.navigatorRotate){var m=u.viewer.viewport?u.viewer.viewport.getRotation():u.viewer.degrees||0;p(m,!0),u.viewer.addHandler("rotate",function(g){p(g.degrees,g.immediately)})}this.innerTracker.destroy(),this.innerTracker=new n.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:n.delegate(this,i),clickHandler:n.delegate(this,r),releaseHandler:n.delegate(this,s),scrollHandler:n.delegate(this,o),preProcessEventHandler:function(g){g.eventType==="wheel"&&(g.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",n.setElementPointerEventsNone(this.canvas),n.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){d.viewport&&d.viewport.goHome(!0)}),c.world.addHandler("item-index-change",function(g){window.setTimeout(function(){var v=d.world.getItemAt(g.previousIndex);d.world.setItemIndex(v,g.newIndex)},1)}),c.world.addHandler("remove-item",function(g){var v=g.item,w=d._getMatchingItem(v);w&&d.world.removeItem(w)}),this.update(c.viewport)},n.extend(n.Navigator.prototype,n.EventSource.prototype,n.Viewer.prototype,{updateSize:function(){if(this.viewport){var u=new n.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);u.equals(this.oldContainerSize)||(this.viewport.resize(u,!0),this.viewport.goHome(!0),this.oldContainerSize=u,this.world.update(),this.world.draw(),this.update(this.viewer.viewport))}},setWidth:function(u){this.width=u,this.element.style.width=typeof u=="number"?u+"px":u,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(u){this.height=u,this.element.style.height=typeof u=="number"?u+"px":u,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(u){return this.viewport.setFlip(u),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(u){l(this.canvas,u),l(this.element,u)},update:function(u){var c,d,f,h,p,m;if(u||(u=this.viewer.viewport),c=n.getElementSize(this.viewer.element),this._resizeWithViewer&&c.x&&c.y&&!c.equals(this.oldViewerSize)&&(this.oldViewerSize=c,this.maintainSizeRatio||!this.elementArea?(d=c.x*this.sizeRatio,f=c.y*this.sizeRatio):(d=Math.sqrt(this.elementArea*(c.x/c.y)),f=this.elementArea/d),this.element.style.width=Math.round(d)+"px",this.element.style.height=Math.round(f)+"px",this.elementArea||(this.elementArea=d*f),this.updateSize()),u&&this.viewport){if(h=u.getBoundsNoRotate(!0),p=this.viewport.pixelFromPointNoRotate(h.getTopLeft(),!1),m=this.viewport.pixelFromPointNoRotate(h.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var g=u.getRotation(!0);a(this.displayRegion,-g)}var v=this.displayRegion.style;v.display=this.world.getItemCount()?"block":"none",v.top=p.y.toFixed(2)+"px",v.left=p.x.toFixed(2)+"px";var w=m.x-p.x,b=m.y-p.y;v.width=Math.round(Math.max(w,0))+"px",v.height=Math.round(Math.max(b,0))+"px"}},addTiledImage:function(u){var c=this,d=u.originalTiledImage;delete u.original;var f=n.extend({},u,{success:function(h){var p=h.item;p._originalForNavigator=d,c._matchBounds(p,d,!0),c._matchOpacity(p,d),c._matchCompositeOperation(p,d);function m(){c._matchBounds(p,d)}function g(){c._matchOpacity(p,d)}function v(){c._matchCompositeOperation(p,d)}d.addHandler("bounds-change",m),d.addHandler("clip-change",m),d.addHandler("opacity-change",g),d.addHandler("composite-operation-change",v)}});return n.Viewer.prototype.addTiledImage.apply(this,[f])},destroy:function(){return n.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(u){for(var c=this.world.getItemCount(),d,f=0;f<c;f++)if(d=this.world.getItemAt(f),d._originalForNavigator===u)return d;return null},_matchBounds:function(u,c,d){var f=c.getBoundsNoRotate();u.setPosition(f.getTopLeft(),d),u.setWidth(f.width,d),u.setRotation(c.getRotation(),d),u.setClip(c.getClip()),u.setFlip(c.getFlip())},_matchOpacity:function(u,c){u.setOpacity(c.opacity)},_matchCompositeOperation:function(u,c){u.setCompositeOperation(c.compositeOperation)}});function r(u){var c={tracker:u.eventSource,position:u.position,quick:u.quick,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",c),!c.preventDefaultAction&&u.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(u.position.x=this.viewport.getContainerSize().x-u.position.x);var d=this.viewport.pointFromPixel(u.position);this.panVertical?this.panHorizontal||(d.x=this.viewer.viewport.getCenter(!0).x):d.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(d),this.viewer.viewport.applyConstraints()}}function i(u){var c={tracker:u.eventSource,position:u.position,delta:u.delta,speed:u.speed,direction:u.direction,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",c),!c.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(u.delta.x=0),this.panVertical||(u.delta.y=0),this.viewer.viewport.flipped&&(u.delta.x=-u.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(u.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function s(u){u.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function o(u){var c={tracker:u.eventSource,position:u.position,scroll:u.scroll,shift:u.shift,originalEvent:u.originalEvent,preventDefault:u.preventDefault};this.viewer.raiseEvent("navigator-scroll",c),u.preventDefault=c.preventDefault}function a(u,c){l(u,"rotate("+c+"deg)")}function l(u,c){u.style.webkitTransform=c,u.style.mozTransform=c,u.style.msTransform=c,u.style.oTransform=c,u.style.transform=c}}(t),function(n){var r={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};n.extend(n,{getString:function(i){var s=i.split("."),o=null,a=arguments,l=r,u;for(u=0;u<s.length-1;u++)l=l[s[u]]||{};return o=l[s[u]],typeof o!="string"&&(n.console.error("Untranslated source string:",i),o=""),o.replace(/\{\d+\}/g,function(c){var d=parseInt(c.match(/\d+/),10)+1;return d<a.length?a[d]:""})},setString:function(i,s){var o=i.split("."),a=r,l;for(l=0;l<o.length-1;l++)a[o[l]]||(a[o[l]]={}),a=a[o[l]];a[o[l]]=s}})}(t),function(n){n.Point=function(r,i){this.x=typeof r=="number"?r:0,this.y=typeof i=="number"?i:0},n.Point.prototype={clone:function(){return new n.Point(this.x,this.y)},plus:function(r){return new n.Point(this.x+r.x,this.y+r.y)},minus:function(r){return new n.Point(this.x-r.x,this.y-r.y)},times:function(r){return new n.Point(this.x*r,this.y*r)},divide:function(r){return new n.Point(this.x/r,this.y/r)},negate:function(){return new n.Point(-this.x,-this.y)},distanceTo:function(r){return Math.sqrt(Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2))},squaredDistanceTo:function(r){return Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2)},apply:function(r){return new n.Point(r(this.x),r(this.y))},equals:function(r){return r instanceof n.Point&&this.x===r.x&&this.y===r.y},rotate:function(r,i){i=i||new n.Point(0,0);var s,o;if(r%90===0){var a=n.positiveModulo(r,360);switch(a){case 0:s=1,o=0;break;case 90:s=0,o=1;break;case 180:s=-1,o=0;break;case 270:s=0,o=-1;break}}else{var l=r*Math.PI/180;s=Math.cos(l),o=Math.sin(l)}var u=s*(this.x-i.x)-o*(this.y-i.y)+i.x,c=o*(this.x-i.x)+s*(this.y-i.y)+i.y;return new n.Point(u,c)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}}(t),function(n){n.TileSource=function(i,s,o,a,l,u){var c=this,d=arguments,f,h;if(n.isPlainObject(i)?f=i:f={width:d[0],height:d[1],tileSize:d[2],tileOverlap:d[3],minLevel:d[4],maxLevel:d[5]},n.EventSource.call(this),n.extend(!0,this,f),!this.success){for(h=0;h<arguments.length;h++)if(n.isFunction(arguments[h])){this.success=arguments[h];break}}this.success&&this.addHandler("ready",function(p){c.success(p)}),n.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new n.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=f.width&&f.height?f.width/f.height:1,this.dimensions=new n.Point(f.width,f.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=f.tileOverlap?f.tileOverlap:0,this.minLevel=f.minLevel?f.minLevel:0,this.maxLevel=f.maxLevel!==void 0&&f.maxLevel!==null?f.maxLevel:f.width&&f.height?Math.ceil(Math.log(Math.max(f.width,f.height))/Math.log(2)):0,this.success&&n.isFunction(this.success)&&this.success(this))},n.TileSource.prototype={getTileSize:function(i){return n.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(i){return this._tileWidth?this._tileWidth:this.getTileSize(i)},getTileHeight:function(i){return this._tileHeight?this._tileHeight:this.getTileSize(i)},setMaxLevel:function(i){this.maxLevel=i,this._memoizeLevelScale()},getLevelScale:function(i){return this._memoizeLevelScale(),this.getLevelScale(i)},_memoizeLevelScale:function(){var i={},s;for(s=0;s<=this.maxLevel;s++)i[s]=1/Math.pow(2,this.maxLevel-s);this.getLevelScale=function(o){return i[o]}},getNumTiles:function(i){var s=this.getLevelScale(i),o=Math.ceil(s*this.dimensions.x/this.getTileWidth(i)),a=Math.ceil(s*this.dimensions.y/this.getTileHeight(i));return new n.Point(o,a)},getPixelRatio:function(i){var s=this.dimensions.times(this.getLevelScale(i)),o=1/s.x*n.pixelDensityRatio,a=1/s.y*n.pixelDensityRatio;return new n.Point(o,a)},getClosestLevel:function(){var i,s;for(i=this.minLevel+1;i<=this.maxLevel&&(s=this.getNumTiles(i),!(s.x>1||s.y>1));i++);return i-1},getTileAtPoint:function(i,s){var o=s.x>=0&&s.x<=1&&s.y>=0&&s.y<=1/this.aspectRatio;n.console.assert(o,"[TileSource.getTileAtPoint] must be called with a valid point.");var a=this.dimensions.x*this.getLevelScale(i),l=s.x*a,u=s.y*a,c=Math.floor(l/this.getTileWidth(i)),d=Math.floor(u/this.getTileHeight(i));s.x>=1&&(c=this.getNumTiles(i).x-1);var f=1e-15;return s.y>=1/this.aspectRatio-f&&(d=this.getNumTiles(i).y-1),new n.Point(c,d)},getTileBounds:function(i,s,o,a){var l=this.dimensions.times(this.getLevelScale(i)),u=this.getTileWidth(i),c=this.getTileHeight(i),d=s===0?0:u*s-this.tileOverlap,f=o===0?0:c*o-this.tileOverlap,h=u+(s===0?1:2)*this.tileOverlap,p=c+(o===0?1:2)*this.tileOverlap,m=1/l.x;return h=Math.min(h,l.x-d),p=Math.min(p,l.y-f),a?new n.Rect(0,0,h,p):new n.Rect(d*m,f*m,h*m,p*m)},getImageInfo:function(i){var s=this,o,a,l,u,c,d,f;i&&(c=i.split("/"),d=c[c.length-1],f=d.lastIndexOf("."),f>-1&&(c[c.length-1]=d.slice(0,f)));var h=null;if(this.splitHashDataForPost){var p=i.indexOf("#");p!==-1&&(h=i.substring(p+1),i=i.substr(0,p))}a=function(m){typeof m=="string"&&(m=n.parseXml(m));var g=n.TileSource.determineType(s,m,i);if(!g){s.raiseEvent("open-failed",{message:"Unable to load TileSource",source:i});return}u=g.prototype.configure.apply(s,[m,i,h]),u.ajaxWithCredentials===void 0&&(u.ajaxWithCredentials=s.ajaxWithCredentials),l=new g(u),s.ready=!0,s.raiseEvent("ready",{tileSource:l})},i.match(/\.js$/)?(o=i.split("/").pop().replace(".js",""),n.jsonp({url:i,async:!1,callbackName:o,callback:a})):n.makeAjaxRequest({url:i,postData:h,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(m){var g=r(m);a(g)},error:function(m,g){var v;try{v="HTTP "+m.status+" attempting to load TileSource: "+i}catch{var w;typeof g>"u"||!g.toString?w="Unknown error":w=g.toString(),v=w+" attempting to load TileSource: "+i}n.console.error(v),s.raiseEvent("open-failed",{message:v,source:i,postData:h})}})},supports:function(i,s){return!1},configure:function(i,s,o){throw new Error("Method not implemented.")},getTileUrl:function(i,s,o){throw new Error("Method not implemented.")},getTilePostData:function(i,s,o){return null},getTileAjaxHeaders:function(i,s,o){return{}},getTileHashKey:function(i,s,o,a,l,u){function c(d){return l?d+"+"+JSON.stringify(l):d}return c(typeof a!="string"?i+"/"+s+"_"+o:a)},tileExists:function(i,s,o){var a=this.getNumTiles(i);return i>=this.minLevel&&i<=this.maxLevel&&s>=0&&o>=0&&s<a.x&&o<a.y},hasTransparency:function(i,s,o,a){return!!i||s.match(".png")},downloadTileStart:function(i){var s=i.userData,o=new Image;s.image=o,s.request=null;var a=function(l){if(!o){i.finish(null,s.request,"Image load failed: undefined Image instance.");return}o.onload=o.onerror=o.onabort=null,i.finish(l?null:o,s.request,l)};o.onload=function(){a()},o.onabort=o.onerror=function(){a("Image load aborted.")},i.loadWithAjax?s.request=n.makeAjaxRequest({url:i.src,withCredentials:i.ajaxWithCredentials,headers:i.ajaxHeaders,responseType:"arraybuffer",postData:i.postData,success:function(l){var u;try{u=new window.Blob([l.response])}catch(f){var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(f.name==="TypeError"&&c){var d=new c;d.append(l.response),u=d.getBlob()}}u.size===0?a("Empty image response."):o.src=(window.URL||window.webkitURL).createObjectURL(u)},error:function(l){a("Image load aborted - XHR error")}}):(i.crossOriginPolicy!==!1&&(o.crossOrigin=i.crossOriginPolicy),o.src=i.src)},downloadTileAbort:function(i){i.userData.request&&i.userData.request.abort();var s=i.userData.image;i.userData.image&&(s.onload=s.onerror=s.onabort=null)},createTileCache:function(i,s,o){i._data=s},destroyTileCache:function(i){i._data=null,i._renderedContext=null},getTileCacheData:function(i){return i._data},getTileCacheDataAsImage:function(i){return i._data},getTileCacheDataAsContext2D:function(i){if(!i._renderedContext){var s=document.createElement("canvas");s.width=i._data.width,s.height=i._data.height,i._renderedContext=s.getContext("2d"),i._renderedContext.drawImage(i._data,0,0),i._data=null}return i._renderedContext}},n.extend(!0,n.TileSource.prototype,n.EventSource.prototype);function r(i){var s=i.responseText,o=i.status,a,l;if(i){if(i.status!==200&&i.status!==0)throw o=i.status,a=o===404?"Not Found":i.statusText,new Error(n.getString("Errors.Status",o,a))}else throw new Error(n.getString("Errors.Security"));if(s.match(/^\s*<.*/))try{l=i.responseXML&&i.responseXML.documentElement?i.responseXML:n.parseXml(s)}catch{l=i.responseText}else if(s.match(/\s*[{[].*/))try{l=n.parseJSON(s)}catch{l=s}else l=s;return l}n.TileSource.determineType=function(i,s,o){var a;for(a in t)if(a.match(/.+TileSource$/)&&n.isFunction(t[a])&&n.isFunction(t[a].prototype.supports)&&t[a].prototype.supports.call(i,s,o))return t[a];return n.console.error("No TileSource was able to open %s %s",o,s),null}}(t),function(n){n.DziTileSource=function(s,o,a,l,u,c,d,f,h){var p,m,g,v;if(n.isPlainObject(s)?v=s:v={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=v.tilesUrl,this.fileFormat=v.fileFormat,this.displayRects=v.displayRects,this.displayRects)for(p=this.displayRects.length-1;p>=0;p--)for(m=this.displayRects[p],g=m.minLevel;g<=m.maxLevel;g++)this._levelRects[g]||(this._levelRects[g]=[]),this._levelRects[g].push(m);n.TileSource.apply(this,[v])},n.extend(n.DziTileSource.prototype,n.TileSource.prototype,{supports:function(s,o){var a;return s.Image?a=s.Image.xmlns:s.documentElement&&(s.documentElement.localName==="Image"||s.documentElement.tagName==="Image")&&(a=s.documentElement.namespaceURI),a=(a||"").toLowerCase(),a.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||a.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(s,o,a){var l;return n.isPlainObject(s)?l=i(this,s):l=r(this,s),o&&!l.tilesUrl&&(l.tilesUrl=o.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),o.search(/\.(dzi|xml|js)\?/)!==-1?l.queryParams=o.match(/\?.*/):l.queryParams=""),l},getTileUrl:function(s,o,a){return[this.tilesUrl,s,"/",o,"_",a,".",this.fileFormat,this.queryParams].join("")},tileExists:function(s,o,a){var l=this._levelRects[s],u,c,d,f,h,p,m;if(this.minLevel&&s<this.minLevel||this.maxLevel&&s>this.maxLevel)return!1;if(!l||!l.length)return!0;for(m=l.length-1;m>=0;m--)if(u=l[m],!(s<u.minLevel||s>u.maxLevel)&&(c=this.getLevelScale(s),d=u.x*c,f=u.y*c,h=d+u.width*c,p=f+u.height*c,d=Math.floor(d/this._tileWidth),f=Math.floor(f/this._tileWidth),h=Math.ceil(h/this._tileWidth),p=Math.ceil(p/this._tileWidth),d<=o&&o<h&&f<=a&&a<p))return!0;return!1}});function r(s,o){if(!o||!o.documentElement)throw new Error(n.getString("Errors.Xml"));var a=o.documentElement,l=a.localName||a.tagName,u=o.documentElement.namespaceURI,c=null,d=[],f,h,p,m,g;if(l==="Image")try{if(m=a.getElementsByTagName("Size")[0],m===void 0&&(m=a.getElementsByTagNameNS(u,"Size")[0]),c={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:a.getAttribute("Url"),Format:a.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(a.getAttribute("Overlap"),10),TileSize:parseInt(a.getAttribute("TileSize"),10),Size:{Height:parseInt(m.getAttribute("Height"),10),Width:parseInt(m.getAttribute("Width"),10)}}},!n.imageFormatSupported(c.Image.Format))throw new Error(n.getString("Errors.ImageFormat",c.Image.Format.toUpperCase()));for(f=a.getElementsByTagName("DisplayRect"),f===void 0&&(f=a.getElementsByTagNameNS(u,"DisplayRect")[0]),g=0;g<f.length;g++)h=f[g],p=h.getElementsByTagName("Rect")[0],p===void 0&&(p=h.getElementsByTagNameNS(u,"Rect")[0]),d.push({Rect:{X:parseInt(p.getAttribute("X"),10),Y:parseInt(p.getAttribute("Y"),10),Width:parseInt(p.getAttribute("Width"),10),Height:parseInt(p.getAttribute("Height"),10),MinLevel:parseInt(h.getAttribute("MinLevel"),10),MaxLevel:parseInt(h.getAttribute("MaxLevel"),10)}});return d.length&&(c.Image.DisplayRect=d),i(s,c)}catch(b){throw b instanceof Error?b:new Error(n.getString("Errors.Dzi"))}else{if(l==="Collection")throw new Error(n.getString("Errors.Dzc"));if(l==="Error"){var v=a.getElementsByTagName("Message")[0],w=v.firstChild.nodeValue;throw new Error(w)}}throw new Error(n.getString("Errors.Dzi"))}function i(s,o){var a=o.Image,l=a.Url,u=a.Format,c=a.Size,d=a.DisplayRect||[],f=parseInt(c.Width,10),h=parseInt(c.Height,10),p=parseInt(a.TileSize,10),m=parseInt(a.Overlap,10),g=[],v,w;for(w=0;w<d.length;w++)v=d[w].Rect,g.push(new n.DisplayRect(parseInt(v.X,10),parseInt(v.Y,10),parseInt(v.Width,10),parseInt(v.Height,10),parseInt(v.MinLevel,10),parseInt(v.MaxLevel,10)));return n.extend(!0,{width:f,height:h,tileSize:p,tileOverlap:m,minLevel:null,maxLevel:null,tilesUrl:l,fileFormat:u,displayRects:g},o)}}(t),function(n){n.IIIFTileSource=function(a){if(n.extend(!0,this,a),this._id=this["@id"]||this.id||this.identifier||null,!(this.height&&this.width&&this._id))throw new Error("IIIF required parameters (width, height, or id) not provided.");if(a.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=a.version,this.tile_width&&this.tile_height)a.tileWidth=this.tile_width,a.tileHeight=this.tile_height;else if(this.tile_width)a.tileSize=this.tile_width;else if(this.tile_height)a.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)a.tileWidth=this.tiles[0].width,a.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var l=0;l<this.tiles.length;l++)for(var u=0;u<this.tiles[l].scaleFactors.length;u++){var c=this.tiles[l].scaleFactors[u];this.scale_factors.push(c),a.tileSizePerScaleFactor[c]={width:this.tiles[l].width,height:this.tiles[l].height||this.tiles[l].width}}}else if(r(a)){for(var d=Math.min(this.height,this.width),f=[256,512,1024],h=[],p=0;p<f.length;p++)f[p]<=d&&h.push(f[p]);h.length>0?a.tileSize=Math.max.apply(null,h):a.tileSize=d}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,a.levels=i(this),n.extend(!0,a,{width:a.levels[a.levels.length-1].width,height:a.levels[a.levels.length-1].height,tileSize:Math.max(a.height,a.width),tileOverlap:0,minLevel:0,maxLevel:a.levels.length-1}),this.levels=a.levels):n.console.error("Nothing in the info.json to construct image pyramids from");if(!a.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)a.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));else{var m=Math.max.apply(null,this.scale_factors);a.maxLevel=Math.round(Math.log(m)*Math.LOG2E)}if(this.sizes){var g=this.sizes.length;(g===a.maxLevel||g===a.maxLevel+1)&&(this.levelSizes=this.sizes.slice().sort((v,w)=>v.width-w.width),g===a.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}n.TileSource.apply(this,[a])},n.extend(n.IIIFTileSource.prototype,n.TileSource.prototype,{supports:function(a,l){return a.protocol&&a.protocol==="http://iiif.io/api/image"||a["@context"]&&(a["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||a["@context"]==="http://iiif.io/api/image/1/context.json")||a.profile&&a.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||a.identifier&&a.width&&a.height?!0:!!(a.documentElement&&a.documentElement.tagName==="info"&&a.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(a,l,u){if(n.isPlainObject(a)){if(!a["@context"])a["@context"]="http://iiif.io/api/image/1.0/context.json",a["@id"]=l.replace("/info.json",""),a.version=1;else{var d=a["@context"];if(Array.isArray(d)){for(var f=0;f<d.length;f++)if(typeof d[f]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(d[f])||d[f]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){d=d[f];break}}switch(d){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":a.version=1;break;case"http://iiif.io/api/image/2/context.json":a.version=2;break;case"http://iiif.io/api/image/3/context.json":a.version=3;break;default:n.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(a.preferredFormats){for(var h=0;h<a.preferredFormats.length;h++)if(t.imageFormatSupported(a.preferredFormats[h])){a.tileFormat=a.preferredFormats[h];break}}return a}else{var c=s(a);return c["@context"]="http://iiif.io/api/image/1.0/context.json",c["@id"]=l.replace("/info.xml",""),c.version=1,c}},getTileWidth:function(a){if(this.emulateLegacyImagePyramid)return n.TileSource.prototype.getTileWidth.call(this,a);var l=Math.pow(2,this.maxLevel-a);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[l]?this.tileSizePerScaleFactor[l].width:this._tileWidth},getTileHeight:function(a){if(this.emulateLegacyImagePyramid)return n.TileSource.prototype.getTileHeight.call(this,a);var l=Math.pow(2,this.maxLevel-a);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[l]?this.tileSizePerScaleFactor[l].height:this._tileHeight},getLevelScale:function(a){if(this.emulateLegacyImagePyramid){var l=NaN;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(l=this.levels[a].width/this.levels[this.maxLevel].width),l}return n.TileSource.prototype.getLevelScale.call(this,a)},getNumTiles:function(a){if(this.emulateLegacyImagePyramid){var l=this.getLevelScale(a);return l?new n.Point(1,1):new n.Point(0,0)}if(this.levelSizes){var u=this.levelSizes[a],c=Math.ceil(u.width/this.getTileWidth(a)),d=Math.ceil(u.height/this.getTileHeight(a));return new n.Point(c,d)}else return n.TileSource.prototype.getNumTiles.call(this,a)},getTileAtPoint:function(a,l){if(this.emulateLegacyImagePyramid)return new n.Point(0,0);if(this.levelSizes){var u=l.x>=0&&l.x<=1&&l.y>=0&&l.y<=1/this.aspectRatio;n.console.assert(u,"[TileSource.getTileAtPoint] must be called with a valid point.");var c=this.levelSizes[a].width,d=l.x*c,f=l.y*c,h=Math.floor(d/this.getTileWidth(a)),p=Math.floor(f/this.getTileHeight(a));l.x>=1&&(h=this.getNumTiles(a).x-1);var m=1e-15;return l.y>=1/this.aspectRatio-m&&(p=this.getNumTiles(a).y-1),new n.Point(h,p)}return n.TileSource.prototype.getTileAtPoint.call(this,a,l)},getTileUrl:function(a,l,u){if(this.emulateLegacyImagePyramid){var c=null;return this.levels.length>0&&a>=this.minLevel&&a<=this.maxLevel&&(c=this.levels[a].url),c}var d="0",f=Math.pow(.5,this.maxLevel-a),h,p,m,g,v,w,b,_,x,S,I,P,R,O,M,E;return this.levelSizes?(h=this.levelSizes[a].width,p=this.levelSizes[a].height):(h=Math.ceil(this.width*f),p=Math.ceil(this.height*f)),m=this.getTileWidth(a),g=this.getTileHeight(a),v=Math.round(m/f),w=Math.round(g/f),this.version===1?M="native."+this.tileFormat:M="default."+this.tileFormat,h<m&&p<g?(this.version===2&&h===this.width?P="full":this.version===3&&h===this.width&&p===this.height?P="max":this.version===3?P=h+","+p:P=h+",",b="full"):(_=l*v,x=u*w,S=Math.min(v,this.width-_),I=Math.min(w,this.height-x),l===0&&u===0&&S===this.width&&I===this.height?b="full":b=[_,x,S,I].join(","),R=Math.min(m,h-l*m),O=Math.min(g,p-u*g),this.version===2&&R===this.width?P="full":this.version===3&&R===this.width&&O===this.height?P="max":this.version===3?P=R+","+O:P=R+","),E=[this._id,b,P,d,M].join("/"),E},__testonly__:{canBeTiled:r,constructLevels:i}});function r(a){var l=["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"],u=Array.isArray(a.profile)?a.profile[0]:a.profile,c=l.indexOf(u)!==-1,d=!1;return a.version===2&&a.profile.length>1&&a.profile[1].supports&&(d=a.profile[1].supports.indexOf("sizeByW")!==-1),a.version===3&&a.extraFeatures&&(d=a.extraFeatures.indexOf("sizeByWh")!==-1),!c||d}function i(a){for(var l=[],u=0;u<a.sizes.length;u++)l.push({url:a._id+"/full/"+a.sizes[u].width+","+(a.version===3?a.sizes[u].height:"")+"/0/default."+a.tileFormat,width:a.sizes[u].width,height:a.sizes[u].height});return l.sort(function(c,d){return c.width-d.width})}function s(a){if(!a||!a.documentElement)throw new Error(n.getString("Errors.Xml"));var l=a.documentElement,u=l.tagName,c=null;if(u==="info")try{return c={},o(l,c),c}catch(d){throw d instanceof Error?d:new Error(n.getString("Errors.IIIF"))}throw new Error(n.getString("Errors.IIIF"))}function o(a,l,u){var c,d;if(a.nodeType===3&&u)d=a.nodeValue.trim(),d.match(/^\d*$/)&&(d=Number(d)),l[u]?(n.isArray(l[u])||(l[u]=[l[u]]),l[u].push(d)):l[u]=d;else if(a.nodeType===1)for(c=0;c<a.childNodes.length;c++)o(a.childNodes[c],l,a.nodeName)}}(t),function(n){n.OsmTileSource=function(r,i,s,o,a){var l;n.isPlainObject(r)?l=r:l={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!l.width||!l.height)&&(l.width=65572864,l.height=65572864),l.tileSize||(l.tileSize=256,l.tileOverlap=0),l.tilesUrl||(l.tilesUrl="http://tile.openstreetmap.org/"),l.minLevel=8,n.TileSource.apply(this,[l])},n.extend(n.OsmTileSource.prototype,n.TileSource.prototype,{supports:function(r,i){return r.type&&r.type==="openstreetmaps"},configure:function(r,i,s){return r},getTileUrl:function(r,i,s){return this.tilesUrl+(r-8)+"/"+i+"/"+s+".png"}})}(t),function(n){n.TmsTileSource=function(r,i,s,o,a){var l;n.isPlainObject(r)?l=r:l={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var u=Math.ceil(l.width/256)*256,c=Math.ceil(l.height/256)*256,d;u>c?d=u/256:d=c/256,l.maxLevel=Math.ceil(Math.log(d)/Math.log(2))-1,l.tileSize=256,l.width=u,l.height=c,n.TileSource.apply(this,[l])},n.extend(n.TmsTileSource.prototype,n.TileSource.prototype,{supports:function(r,i){return r.type&&r.type==="tiledmapservice"},configure:function(r,i,s){return r},getTileUrl:function(r,i,s){var o=this.getNumTiles(r).y-1;return this.tilesUrl+r+"/"+i+"/"+(o-s)+".png"}})}(t),function(n){n.ZoomifyTileSource=function(r){typeof r.tileSize>"u"&&(r.tileSize=256),typeof r.fileFormat>"u"&&(r.fileFormat="jpg",this.fileFormat=r.fileFormat);var i={x:r.width,y:r.height};for(r.imageSizes=[{x:r.width,y:r.height}],r.gridSize=[this._getGridSize(r.width,r.height,r.tileSize)];parseInt(i.x,10)>r.tileSize||parseInt(i.y,10)>r.tileSize;)i.x=Math.floor(i.x/2),i.y=Math.floor(i.y/2),r.imageSizes.push({x:i.x,y:i.y}),r.gridSize.push(this._getGridSize(i.x,i.y,r.tileSize));r.imageSizes.reverse(),r.gridSize.reverse(),r.minLevel=0,r.maxLevel=r.gridSize.length-1,t.TileSource.apply(this,[r])},n.extend(n.ZoomifyTileSource.prototype,n.TileSource.prototype,{_getGridSize:function(r,i,s){return{x:Math.ceil(r/s),y:Math.ceil(i/s)}},_calculateAbsoluteTileNumber:function(r,i,s){for(var o=0,a={},l=0;l<r;l++)a=this.gridSize[l],o+=a.x*a.y;return a=this.gridSize[r],o+=a.x*s+i,o},supports:function(r,i){return r.type&&r.type==="zoomifytileservice"},configure:function(r,i,s){return r},getTileUrl:function(r,i,s){var o=0,a=this._calculateAbsoluteTileNumber(r,i,s);return o=Math.floor(a/256),this.tilesUrl+"TileGroup"+o+"/"+r+"-"+i+"-"+s+"."+this.fileFormat}})}(t),function(n){n.LegacyTileSource=function(o){var a,l,u;n.isArray(o)&&(a={type:"legacy-image-pyramid",levels:o}),a.levels=r(a.levels),a.levels.length>0?(l=a.levels[a.levels.length-1].width,u=a.levels[a.levels.length-1].height):(l=0,u=0,n.console.error("No supported image formats found")),n.extend(!0,a,{width:l,height:u,tileSize:Math.max(u,l),tileOverlap:0,minLevel:0,maxLevel:a.levels.length>0?a.levels.length-1:0}),n.TileSource.apply(this,[a]),this.levels=a.levels},n.extend(n.LegacyTileSource.prototype,n.TileSource.prototype,{supports:function(o,a){return o.type&&o.type==="legacy-image-pyramid"||o.documentElement&&o.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(o,a,l){var u;return n.isPlainObject(o)?u=s(this,o):u=i(this,o),u},getLevelScale:function(o){var a=NaN;return this.levels.length>0&&o>=this.minLevel&&o<=this.maxLevel&&(a=this.levels[o].width/this.levels[this.maxLevel].width),a},getNumTiles:function(o){var a=this.getLevelScale(o);return a?new n.Point(1,1):new n.Point(0,0)},getTileUrl:function(o,a,l){var u=null;return this.levels.length>0&&o>=this.minLevel&&o<=this.maxLevel&&(u=this.levels[o].url),u}});function r(o){var a=[],l,u;for(u=0;u<o.length;u++)l=o[u],l.height&&l.width&&l.url?a.push({url:l.url,width:Number(l.width),height:Number(l.height)}):n.console.error("Unsupported image format: %s",l.url?l.url:"<no URL>");return a.sort(function(c,d){return c.height-d.height})}function i(o,a){if(!a||!a.documentElement)throw new Error(n.getString("Errors.Xml"));var l=a.documentElement,u=l.tagName,c=null,d=[],f,h;if(u==="image")try{for(c={type:l.getAttribute("type"),levels:[]},d=l.getElementsByTagName("level"),h=0;h<d.length;h++)f=d[h],c.levels.push({url:f.getAttribute("url"),width:parseInt(f.getAttribute("width"),10),height:parseInt(f.getAttribute("height"),10)});return s(o,c)}catch(p){throw p instanceof Error?p:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(u==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(u==="error")throw new Error("Error: "+a)}throw new Error("Unknown element "+u)}function s(o,a){return a.levels}}(t),function(n){n.ImageTileSource=function(r){r=n.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1},r),n.TileSource.apply(this,[r])},n.extend(n.ImageTileSource.prototype,n.TileSource.prototype,{supports:function(r,i){return r.type&&r.type==="image"},configure:function(r,i,s){return r},getImageInfo:function(r){var i=this._image=new Image,s=this;this.crossOriginPolicy&&(i.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(i.useCredentials=this.ajaxWithCredentials),n.addEvent(i,"load",function(){s.width=i.naturalWidth,s.height=i.naturalHeight,s.aspectRatio=s.width/s.height,s.dimensions=new n.Point(s.width,s.height),s._tileWidth=s.width,s._tileHeight=s.height,s.tileOverlap=0,s.minLevel=0,s.levels=s._buildLevels(),s.maxLevel=s.levels.length-1,s.ready=!0,s.raiseEvent("ready",{tileSource:s})}),n.addEvent(i,"error",function(){s.raiseEvent("open-failed",{message:"Error loading image at "+r,source:r})}),i.src=r},getLevelScale:function(r){var i=NaN;return r>=this.minLevel&&r<=this.maxLevel&&(i=this.levels[r].width/this.levels[this.maxLevel].width),i},getNumTiles:function(r){var i=this.getLevelScale(r);return i?new n.Point(1,1):new n.Point(0,0)},getTileUrl:function(r,i,s){var o=null;return r>=this.minLevel&&r<=this.maxLevel&&(o=this.levels[r].url),o},getContext2D:function(r,i,s){var o=null;return r>=this.minLevel&&r<=this.maxLevel&&(o=this.levels[r].context2D),o},destroy:function(r){this._freeupCanvasMemory(r)},_buildLevels:function(){var r=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!n.supportsCanvas)return delete this._image,r;var i=this._image.naturalWidth,s=this._image.naturalHeight,o=document.createElement("canvas"),a=o.getContext("2d");if(o.width=i,o.height=s,a.drawImage(this._image,0,0,i,s),r[0].context2D=a,delete this._image,n.isCanvasTainted(o))return r;for(;i>=2&&s>=2;){i=Math.floor(i/2),s=Math.floor(s/2);var l=document.createElement("canvas"),u=l.getContext("2d");l.width=i,l.height=s,u.drawImage(o,0,0,i,s),r.splice(0,0,{context2D:u,width:i,height:s}),o=l,a=u}return r},_freeupCanvasMemory:function(r){for(var i=0;i<this.levels.length;i++)this.levels[i].context2D&&(this.levels[i].context2D.canvas.height=0,this.levels[i].context2D.canvas.width=0,r&&r.raiseEvent("image-unloaded",{context2D:this.levels[i].context2D}))}})}(t),function(n){n.TileSourceCollection=function(r,i,s,o){n.console.error("TileSourceCollection is deprecated; use World instead")}}(t),function(n){n.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},n.Button=function(u){var c=this;n.EventSource.call(this),n.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:n.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:n.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},u),this.element=u.element||n.makeNeutralElement("div"),u.element||(this.imgRest=n.makeTransparentImage(this.srcRest),this.imgGroup=n.makeTransparentImage(this.srcGroup),this.imgHover=n.makeTransparentImage(this.srcHover),this.imgDown=n.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,n.setElementPointerEventsNone(this.imgRest),n.setElementPointerEventsNone(this.imgGroup),n.setElementPointerEventsNone(this.imgHover),n.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",n.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=n.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new n.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(d){d.insideElementPressed?(a(c,n.ButtonState.DOWN),c.raiseEvent("enter",{originalEvent:d.originalEvent})):d.buttonDownAny||a(c,n.ButtonState.HOVER)},focusHandler:function(d){c.tracker.enterHandler(d),c.raiseEvent("focus",{originalEvent:d.originalEvent})},leaveHandler:function(d){l(c,n.ButtonState.GROUP),d.insideElementPressed&&c.raiseEvent("exit",{originalEvent:d.originalEvent})},blurHandler:function(d){c.tracker.leaveHandler(d),c.raiseEvent("blur",{originalEvent:d.originalEvent})},pressHandler:function(d){a(c,n.ButtonState.DOWN),c.raiseEvent("press",{originalEvent:d.originalEvent})},releaseHandler:function(d){d.insideElementPressed&&d.insideElementReleased?(l(c,n.ButtonState.HOVER),c.raiseEvent("release",{originalEvent:d.originalEvent})):d.insideElementPressed?l(c,n.ButtonState.GROUP):a(c,n.ButtonState.HOVER)},clickHandler:function(d){d.quick&&c.raiseEvent("click",{originalEvent:d.originalEvent})},keyHandler:function(d){d.keyCode===13?(c.raiseEvent("click",{originalEvent:d.originalEvent}),c.raiseEvent("release",{originalEvent:d.originalEvent}),d.preventDefault=!0):d.preventDefault=!1}}),l(this,n.ButtonState.REST)},n.extend(n.Button.prototype,n.EventSource.prototype,{notifyGroupEnter:function(){a(this,n.ButtonState.GROUP)},notifyGroupExit:function(){l(this,n.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),n.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),n.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}});function r(u){n.requestAnimationFrame(function(){i(u)})}function i(u){var c,d,f;u.shouldFade&&(c=n.now(),d=c-u.fadeBeginTime,f=1-d/u.fadeLength,f=Math.min(1,f),f=Math.max(0,f),u.imgGroup&&n.setElementOpacity(u.imgGroup,f,!0),f>0&&r(u))}function s(u){u.shouldFade=!0,u.fadeBeginTime=n.now()+u.fadeDelay,window.setTimeout(function(){r(u)},u.fadeDelay)}function o(u){u.shouldFade=!1,u.imgGroup&&n.setElementOpacity(u.imgGroup,1,!0)}function a(u,c){u.element.disabled||(c>=n.ButtonState.GROUP&&u.currentState===n.ButtonState.REST&&(o(u),u.currentState=n.ButtonState.GROUP),c>=n.ButtonState.HOVER&&u.currentState===n.ButtonState.GROUP&&(u.imgHover&&(u.imgHover.style.visibility=""),u.currentState=n.ButtonState.HOVER),c>=n.ButtonState.DOWN&&u.currentState===n.ButtonState.HOVER&&(u.imgDown&&(u.imgDown.style.visibility=""),u.currentState=n.ButtonState.DOWN))}function l(u,c){u.element.disabled||(c<=n.ButtonState.HOVER&&u.currentState===n.ButtonState.DOWN&&(u.imgDown&&(u.imgDown.style.visibility="hidden"),u.currentState=n.ButtonState.HOVER),c<=n.ButtonState.GROUP&&u.currentState===n.ButtonState.HOVER&&(u.imgHover&&(u.imgHover.style.visibility="hidden"),u.currentState=n.ButtonState.GROUP),c<=n.ButtonState.REST&&u.currentState===n.ButtonState.GROUP&&(s(u),u.currentState=n.ButtonState.REST))}}(t),function(n){n.ButtonGroup=function(r){n.extend(!0,this,{buttons:[],clickTimeThreshold:n.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:n.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},r);var i=this.buttons.concat([]),s=this,o;if(this.element=r.element||n.makeNeutralElement("div"),!r.group)for(this.element.style.display="inline-block",o=0;o<i.length;o++)this.element.appendChild(i[o].element);n.setElementTouchActionNone(this.element),this.tracker=new n.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(a){var l;for(l=0;l<s.buttons.length;l++)s.buttons[l].notifyGroupEnter()},leaveHandler:function(a){var l;if(!a.insideElementPressed)for(l=0;l<s.buttons.length;l++)s.buttons[l].notifyGroupExit()}})},n.ButtonGroup.prototype={addButton:function(r){this.buttons.push(r),this.element.appendChild(r.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var r=this.buttons.pop();this.element.removeChild(r.element),r.destroy()}this.tracker.destroy(),this.element=null}}}(t),function(n){n.Rect=function(r,i,s,o,a){this.x=typeof r=="number"?r:0,this.y=typeof i=="number"?i:0,this.width=typeof s=="number"?s:0,this.height=typeof o=="number"?o:0,this.degrees=typeof a=="number"?a:0,this.degrees=n.positiveModulo(this.degrees,360);var l,u;this.degrees>=270?(l=this.getTopRight(),this.x=l.x,this.y=l.y,u=this.height,this.height=this.width,this.width=u,this.degrees-=270):this.degrees>=180?(l=this.getBottomRight(),this.x=l.x,this.y=l.y,this.degrees-=180):this.degrees>=90&&(l=this.getBottomLeft(),this.x=l.x,this.y=l.y,u=this.height,this.height=this.width,this.width=u,this.degrees-=90)},n.Rect.fromSummits=function(r,i,s){var o=r.distanceTo(i),a=r.distanceTo(s),l=i.minus(r),u=Math.atan(l.y/l.x);return l.x<0?u+=Math.PI:l.y<0&&(u+=2*Math.PI),new n.Rect(r.x,r.y,o,a,u/Math.PI*180)},n.Rect.prototype={clone:function(){return new n.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new n.Point(this.x,this.y)},getBottomRight:function(){return new n.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new n.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new n.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new n.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new n.Point(this.width,this.height)},equals:function(r){return r instanceof n.Rect&&this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height&&this.degrees===r.degrees},times:function(r){return new n.Rect(this.x*r,this.y*r,this.width*r,this.height*r,this.degrees)},translate:function(r){return new n.Rect(this.x+r.x,this.y+r.y,this.width,this.height,this.degrees)},union:function(r){var i=this.getBoundingBox(),s=r.getBoundingBox(),o=Math.min(i.x,s.x),a=Math.min(i.y,s.y),l=Math.max(i.x+i.width,s.x+s.width),u=Math.max(i.y+i.height,s.y+s.height);return new n.Rect(o,a,l-o,u-a)},intersection:function(r){var i=1e-10,s=[],o=this.getTopLeft();r.containsPoint(o,i)&&s.push(o);var a=this.getTopRight();r.containsPoint(a,i)&&s.push(a);var l=this.getBottomLeft();r.containsPoint(l,i)&&s.push(l);var u=this.getBottomRight();r.containsPoint(u,i)&&s.push(u);var c=r.getTopLeft();this.containsPoint(c,i)&&s.push(c);var d=r.getTopRight();this.containsPoint(d,i)&&s.push(d);var f=r.getBottomLeft();this.containsPoint(f,i)&&s.push(f);var h=r.getBottomRight();this.containsPoint(h,i)&&s.push(h);for(var p=this._getSegments(),m=r._getSegments(),g=0;g<p.length;g++)for(var v=p[g],w=0;w<m.length;w++){var b=m[w],_=x(v[0],v[1],b[0],b[1]);_&&s.push(_)}function x(E,L,j,F){var B=L.minus(E),Y=F.minus(j),Z=-Y.x*B.y+B.x*Y.y;if(Z===0)return null;var ne=(B.x*(E.y-j.y)-B.y*(E.x-j.x))/Z,oe=(Y.x*(E.y-j.y)-Y.y*(E.x-j.x))/Z;return-1e-10<=ne&&ne<=1-i&&-1e-10<=oe&&oe<=1-i?new n.Point(E.x+oe*B.x,E.y+oe*B.y):null}if(s.length===0)return null;for(var S=s[0].x,I=s[0].x,P=s[0].y,R=s[0].y,O=1;O<s.length;O++){var M=s[O];M.x<S&&(S=M.x),M.x>I&&(I=M.x),M.y<P&&(P=M.y),M.y>R&&(R=M.y)}return new n.Rect(S,P,I-S,R-P)},_getSegments:function(){var r=this.getTopLeft(),i=this.getTopRight(),s=this.getBottomLeft(),o=this.getBottomRight();return[[r,i],[i,o],[o,s],[s,r]]},rotate:function(r,i){if(r=n.positiveModulo(r,360),r===0)return this.clone();i=i||this.getCenter();var s=this.getTopLeft().rotate(r,i),o=this.getTopRight().rotate(r,i),a=o.minus(s);a=a.apply(function(u){var c=1e-15;return Math.abs(u)<c?0:u});var l=Math.atan(a.y/a.x);return a.x<0?l+=Math.PI:a.y<0&&(l+=2*Math.PI),new n.Rect(s.x,s.y,this.width,this.height,l/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var r=this.getTopLeft(),i=this.getTopRight(),s=this.getBottomLeft(),o=this.getBottomRight(),a=Math.min(r.x,i.x,s.x,o.x),l=Math.max(r.x,i.x,s.x,o.x),u=Math.min(r.y,i.y,s.y,o.y),c=Math.max(r.y,i.y,s.y,o.y);return new n.Rect(a,u,l-a,c-u)},getIntegerBoundingBox:function(){var r=this.getBoundingBox(),i=Math.floor(r.x),s=Math.floor(r.y),o=Math.ceil(r.width+r.x-i),a=Math.ceil(r.height+r.y-s);return new n.Rect(i,s,o,a)},containsPoint:function(r,i){i=i||0;var s=this.getTopLeft(),o=this.getTopRight(),a=this.getBottomLeft(),l=o.minus(s),u=a.minus(s);return(r.x-s.x)*l.x+(r.y-s.y)*l.y>=-i&&(r.x-o.x)*l.x+(r.y-o.y)*l.y<=i&&(r.x-s.x)*u.x+(r.y-s.y)*u.y>=-i&&(r.x-a.x)*u.x+(r.y-a.y)*u.y<=i},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(t),function(n){var r={};n.ReferenceStrip=function(f){var h=this,p=f.viewer,m=n.getElementSize(p.element),g,v,w;for(f.id||(f.id="referencestrip-"+n.now(),this.element=n.makeNeutralElement("div"),this.element.id=f.id,this.element.className="referencestrip"),f=n.extend(!0,{sizeRatio:n.DEFAULT_SETTINGS.referenceStripSizeRatio,position:n.DEFAULT_SETTINGS.referenceStripPosition,scroll:n.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:n.DEFAULT_SETTINGS.clickTimeThreshold},f,{element:this.element}),n.extend(this,f),r[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,v=this.element.style,v.marginTop="0px",v.marginRight="0px",v.marginBottom="0px",v.marginLeft="0px",v.left="0px",v.bottom="0px",v.border="0px",v.background="#000",v.position="relative",n.setElementTouchActionNone(this.element),n.setElementOpacity(this.element,.8),this.viewer=p,this.tracker=new n.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:n.delegate(this,i),dragHandler:n.delegate(this,s),scrollHandler:n.delegate(this,o),enterHandler:n.delegate(this,l),leaveHandler:n.delegate(this,u),keyDownHandler:n.delegate(this,c),keyHandler:n.delegate(this,d),preProcessEventHandler:function(b){b.eventType==="wheel"&&(b.preventDefault=!0)}}),f.width&&f.height?(this.element.style.width=f.width+"px",this.element.style.height=f.height+"px",p.addControl(this.element,{anchor:n.ControlAnchor.BOTTOM_LEFT})):f.scroll==="horizontal"?(this.element.style.width=m.x*f.sizeRatio*p.tileSources.length+12*p.tileSources.length+"px",this.element.style.height=m.y*f.sizeRatio+"px",p.addControl(this.element,{anchor:n.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=m.y*f.sizeRatio*p.tileSources.length+12*p.tileSources.length+"px",this.element.style.width=m.x*f.sizeRatio+"px",p.addControl(this.element,{anchor:n.ControlAnchor.TOP_LEFT})),this.panelWidth=m.x*this.sizeRatio+8,this.panelHeight=m.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},w=0;w<p.tileSources.length;w++)g=n.makeNeutralElement("div"),g.id=this.element.id+"-"+w,g.style.width=h.panelWidth+"px",g.style.height=h.panelHeight+"px",g.style.display="inline",g.style.float="left",g.style.cssFloat="left",g.style.padding="2px",n.setElementTouchActionNone(g),n.setElementPointerEventsNone(g),this.element.appendChild(g),g.activePanel=!1,this.panels.push(g);a(this,this.scroll==="vertical"?m.y:m.x,0),this.setFocus(0)},n.ReferenceStrip.prototype={setFocus:function(f){var h=this.element.querySelector("#"+this.element.id+"-"+f),p=n.getElementSize(this.viewer.canvas),m=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),v=-Number(this.element.style.marginLeft.replace("px","")),w=-Number(this.element.style.marginTop.replace("px","")),b;this.currentSelected!==h&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=h,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(b=Number(f)*(this.panelWidth+3),b>v+p.x-this.panelWidth?(b=Math.min(b,m-p.x),this.element.style.marginLeft=-b+"px",a(this,p.x,-b)):b<v&&(b=Math.max(0,b-p.x/2),this.element.style.marginLeft=-b+"px",a(this,p.x,-b))):(b=Number(f)*(this.panelHeight+3),b>w+p.y-this.panelHeight?(b=Math.min(b,g-p.y),this.element.style.marginTop=-b+"px",a(this,p.y,-b)):b<w&&(b=Math.max(0,b-p.y/2),this.element.style.marginTop=-b+"px",a(this,p.y,-b))),this.currentPage=f,l.call(this,{eventSource:this.tracker}))},update:function(){return!!r[this.id].animating},destroy:function(){if(this.miniViewers)for(var f in this.miniViewers)this.miniViewers[f].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function i(f){if(f.quick){var h;this.scroll==="horizontal"?h=Math.floor(f.position.x/(this.panelWidth+4)):h=Math.floor(f.position.y/this.panelHeight),this.viewer.goToPage(h)}this.element.focus()}function s(f){if(this.dragging=!0,this.element){var h=Number(this.element.style.marginLeft.replace("px","")),p=Number(this.element.style.marginTop.replace("px","")),m=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),v=n.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-f.delta.x>0?h>-(m-v.x)&&(this.element.style.marginLeft=h+f.delta.x*2+"px",a(this,v.x,h+f.delta.x*2)):-f.delta.x<0&&h<0&&(this.element.style.marginLeft=h+f.delta.x*2+"px",a(this,v.x,h+f.delta.x*2)):-f.delta.y>0?p>-(g-v.y)&&(this.element.style.marginTop=p+f.delta.y*2+"px",a(this,v.y,p+f.delta.y*2)):-f.delta.y<0&&p<0&&(this.element.style.marginTop=p+f.delta.y*2+"px",a(this,v.y,p+f.delta.y*2))}}function o(f){if(this.element){var h=Number(this.element.style.marginLeft.replace("px","")),p=Number(this.element.style.marginTop.replace("px","")),m=Number(this.element.style.width.replace("px","")),g=Number(this.element.style.height.replace("px","")),v=n.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?f.scroll>0?h>-(m-v.x)&&(this.element.style.marginLeft=h-f.scroll*60+"px",a(this,v.x,h-f.scroll*60)):f.scroll<0&&h<0&&(this.element.style.marginLeft=h-f.scroll*60+"px",a(this,v.x,h-f.scroll*60)):f.scroll<0?p>v.y-g&&(this.element.style.marginTop=p+f.scroll*60+"px",a(this,v.y,p+f.scroll*60)):f.scroll>0&&p<0&&(this.element.style.marginTop=p+f.scroll*60+"px",a(this,v.y,p+f.scroll*60)),f.preventDefault=!0}}function a(f,h,p){var m,g,v,w,b,_;for(f.scroll==="horizontal"?m=f.panelWidth:m=f.panelHeight,g=Math.ceil(h/m)+5,v=Math.ceil((Math.abs(p)+h)/m)+1,g=v-g,g=g<0?0:g,b=g;b<v&&b<f.panels.length;b++)if(_=f.panels[b],!_.activePanel){var x,S=f.viewer.tileSources[b];S.referenceStripThumbnailUrl?x={type:"image",url:S.referenceStripThumbnailUrl}:x=S,w=new n.Viewer({id:_.id,tileSources:[x],element:_,navigatorSizeRatio:f.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:f.viewer.loadTilesWithAjax,ajaxHeaders:f.viewer.ajaxHeaders,drawer:"canvas"}),n.setElementPointerEventsNone(w.canvas),n.setElementPointerEventsNone(w.container),w.innerTracker.setTracking(!1),w.outerTracker.setTracking(!1),f.miniViewers[_.id]=w,_.activePanel=!0}}function l(f){var h=f.eventSource.element;this.scroll==="horizontal"?h.style.marginBottom="0px":h.style.marginLeft="0px"}function u(f){var h=f.eventSource.element;this.scroll==="horizontal"?h.style.marginBottom="-"+n.getElementSize(h).y/2+"px":h.style.marginLeft="-"+n.getElementSize(h).x/2+"px"}function c(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 38:o.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 40:o.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 37:o.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 39:o.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}function d(f){if(!f.ctrl&&!f.alt&&!f.meta)switch(f.keyCode){case 61:o.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 45:o.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 48:case 119:case 87:o.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;case 115:case 83:o.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 97:o.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),f.preventDefault=!0;break;case 100:o.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),f.preventDefault=!0;break;default:f.preventDefault=!1;break}else f.preventDefault=!1}}(t),function(n){n.DisplayRect=function(r,i,s,o,a,l){n.Rect.apply(this,[r,i,s,o]),this.minLevel=a,this.maxLevel=l},n.extend(n.DisplayRect.prototype,n.Rect.prototype)}(t),function(n){n.Spring=function(i){var s=arguments;typeof i!="object"&&(i={initial:s.length&&typeof s[0]=="number"?s[0]:void 0,springStiffness:s.length>1?s[1].springStiffness:5,animationTime:s.length>1?s[1].animationTime:1.5}),n.console.assert(typeof i.springStiffness=="number"&&i.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),n.console.assert(typeof i.animationTime=="number"&&i.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),i.exponential&&(this._exponential=!0,delete i.exponential),n.extend(!0,this,i),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:n.now()},n.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},n.Spring.prototype={resetTo:function(i){n.console.assert(!this._exponential||i!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=i,this.start.time=this.target.time=this.current.time=n.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(i){n.console.assert(!this._exponential||i!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=i,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(i){this.start.value+=i,this.target.value+=i,this._exponential&&(n.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(i){this._exponential=i,this._exponential&&(n.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=n.now();let i,s;if(this._exponential?(i=this.start._logValue,s=this.target._logValue):(i=this.start.value,s=this.target.value),this.current.time>=this.target.time)this.current.value=this.target.value;else{let o=i+(s-i)*r(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time));this._exponential?this.current.value=Math.exp(o):this.current.value=o}return this.current.value!==this.target.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function r(i,s){return(1-Math.exp(i*-s))/(1-Math.exp(-i))}}(t),function(n){n.ImageJob=function(i){n.extend(!0,this,{timeout:n.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},i),this.data=null,this.userData={},this.errorMsg=null},n.ImageJob.prototype={start:function(){this.tries++;var i=this,s=this.abort;this.jobId=window.setTimeout(function(){i.finish(null,null,"Image load exceeded timeout ("+i.timeout+" ms)")},this.timeout),this.abort=function(){i.source.downloadTileAbort(i),typeof s=="function"&&s()},this.source.downloadTileStart(this)},finish:function(i,s,o){this.data=i,this.request=s,this.errorMsg=o,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},n.ImageLoader=function(i){n.extend(!0,this,{jobLimit:n.DEFAULT_SETTINGS.imageLoaderLimit,timeout:n.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},i)},n.ImageLoader.prototype={addJob:function(i){if(!i.source){n.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var s=n.TileSource.prototype;i.source={downloadTileStart:s.downloadTileStart,downloadTileAbort:s.downloadTileAbort}}var o=this,a=function(c){r(o,c,i.callback)},l={src:i.src,tile:i.tile||{},source:i.source,loadWithAjax:i.loadWithAjax,ajaxHeaders:i.loadWithAjax?i.ajaxHeaders:null,crossOriginPolicy:i.crossOriginPolicy,ajaxWithCredentials:i.ajaxWithCredentials,postData:i.postData,callback:a,abort:i.abort,timeout:this.timeout},u=new n.ImageJob(l);!this.jobLimit||this.jobsInProgress<this.jobLimit?(u.start(),this.jobsInProgress++):this.jobQueue.push(u)},clear:function(){for(var i=0;i<this.jobQueue.length;i++){var s=this.jobQueue[i];typeof s.abort=="function"&&s.abort()}this.jobQueue=[]}};function r(i,s,o){s.errorMsg!==""&&(s.data===null||s.data===void 0)&&s.tries<1+i.tileRetryMax&&i.failedTiles.push(s);var a;i.jobsInProgress--,(!i.jobLimit||i.jobsInProgress<i.jobLimit)&&i.jobQueue.length>0&&(a=i.jobQueue.shift(),a.start(),i.jobsInProgress++),i.tileRetryMax>0&&i.jobQueue.length===0&&(!i.jobLimit||i.jobsInProgress<i.jobLimit)&&i.failedTiles.length>0&&(a=i.failedTiles.shift(),setTimeout(function(){a.start()},i.tileRetryDelay),i.jobsInProgress++),o(s.data,s.errorMsg,s.request)}}(t),function(n){n.Tile=function(r,i,s,o,a,l,u,c,d,f,h,p){this.level=r,this.x=i,this.y=s,this.bounds=o,this.positionedBounds=new t.Rect(o.x,o.y,o.width,o.height),this.sourceBounds=f,this.exists=a,this._url=l,this.postData=h,this.context2D=u,this.loadWithAjax=c,this.ajaxHeaders=d,p===void 0&&(n.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),p=n.TileSource.prototype.getTileHashKey(r,i,s,l,d,h)),this.cacheKey=p,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.hasTransparency=!1,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},n.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."),!!this.context2D||this.getUrl().match(".png")},get image(){return n.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return n.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return typeof this._url=="function"?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord&&this.cacheImageRecord.getRenderedContext()},getScaleForEdgeSmoothing:function(){var r;if(this.cacheImageRecord)r=this.cacheImageRecord.getRenderedContext();else if(this.context2D)r=this.context2D;else return n.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return r.canvas.width/(this.size.x*n.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(r,i,s){var o=Math.max(1,Math.ceil((s.x-i.x)/2)),a=Math.max(1,Math.ceil((s.y-i.y)/2));return new n.Point(o,a).minus(this.position.times(n.pixelDensityRatio).times(r||1).apply(function(l){return l%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(t),function(n){n.OverlayPlacement=n.Placement,n.OverlayRotationMode=n.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),n.Overlay=function(r,i,s){var o;n.isPlainObject(r)?o=r:o={element:r,location:i,placement:s},this.elementWrapper=document.createElement("div"),this.element=o.element,this.elementWrapper.appendChild(this.element),this.element.id?this.elementWrapper.id="overlay-wrapper-"+this.element.id:this.elementWrapper.id="overlay-wrapper",this.style=this.elementWrapper.style,this._init(o)},n.Overlay.prototype={_init:function(r){this.location=r.location,this.placement=r.placement===void 0?n.Placement.TOP_LEFT:r.placement,this.onDraw=r.onDraw,this.checkResize=r.checkResize===void 0?!0:r.checkResize,this.width=r.width===void 0?null:r.width,this.height=r.height===void 0?null:r.height,this.rotationMode=r.rotationMode||n.OverlayRotationMode.EXACT,this.location instanceof n.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=n.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new n.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(r,i){var s=n.Placement.properties[this.placement];s&&(s.isHorizontallyCentered?r.x-=i.x/2:s.isRight&&(r.x-=i.x),s.isVerticallyCentered?r.y-=i.y/2:s.isBottom&&(r.y-=i.y))},destroy:function(){var r=this.elementWrapper,i=this.style;r.parentNode&&(r.parentNode.removeChild(r),r.prevElementParent&&(i.display="none",document.body.appendChild(r))),this.onDraw=null,i.top="",i.left="",i.position="",this.width!==null&&(i.width=""),this.height!==null&&(i.height="");var s=n.getCssPropertyWithVendorPrefix("transformOrigin"),o=n.getCssPropertyWithVendorPrefix("transform");s&&o&&(i[s]="",i[o]="")},drawHTML:function(r,i){var s=this.elementWrapper;s.parentNode!==r&&(s.prevElementParent=s.parentNode,s.prevNextSibling=s.nextSibling,r.appendChild(s),this.style.position="absolute",this.size=n.getElementSize(this.elementWrapper));var o=this._getOverlayPositionAndSize(i),a=o.position,l=this.size=o.size,u="";i.overlayPreserveContentDirection&&(u=i.flipped?" scaleX(-1)":" scaleX(1)");var c=i.flipped?-o.rotate:o.rotate,d=i.flipped?" scaleX(-1)":"";if(this.onDraw)this.onDraw(a,l,this.element);else{var f=this.style,h=this.element.style;h.display="block",f.left=a.x+"px",f.top=a.y+"px",this.width!==null&&(h.width=l.x+"px"),this.height!==null&&(h.height=l.y+"px");var p=n.getCssPropertyWithVendorPrefix("transformOrigin"),m=n.getCssPropertyWithVendorPrefix("transform");p&&m&&(c&&!i.flipped?(h[m]="",f[p]=this._getTransformOrigin(),f[m]="rotate("+c+"deg)"):!c&&i.flipped?(h[m]=u,f[p]=this._getTransformOrigin(),f[m]=d):c&&i.flipped?(h[m]=u,f[p]=this._getTransformOrigin(),f[m]="rotate("+c+"deg)"+d):(h[m]="",f[p]="",f[m]="")),f.display="flex"}},_getOverlayPositionAndSize:function(r){var i=r.pixelFromPoint(this.location,!0),s=this._getSizeInPixels(r);this.adjust(i,s);var o=0;if(r.getRotation(!0)&&this.rotationMode!==n.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===n.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var a=new n.Rect(i.x,i.y,s.x,s.y),l=this._getBoundingBox(a,r.getRotation(!0));i=l.getTopLeft(),s=l.getSize()}else o=r.getRotation(!0);return r.flipped&&(i.x=r.getContainerSize().x-i.x),{position:i,size:s,rotate:o}},_getSizeInPixels:function(r){var i=this.size.x,s=this.size.y;if(this.width!==null||this.height!==null){var o=r.deltaPixelsFromPointsNoRotate(new n.Point(this.width||0,this.height||0),!0);this.width!==null&&(i=o.x),this.height!==null&&(s=o.y)}if(this.checkResize&&(this.width===null||this.height===null)){var a=this.size=n.getElementSize(this.elementWrapper);this.width===null&&(i=a.x),this.height===null&&(s=a.y)}return new n.Point(i,s)},_getBoundingBox:function(r,i){var s=this._getPlacementPoint(r);return r.rotate(i,s).getBoundingBox()},_getPlacementPoint:function(r){var i=new n.Point(r.x,r.y),s=n.Placement.properties[this.placement];return s&&(s.isHorizontallyCentered?i.x+=r.width/2:s.isRight&&(i.x+=r.width),s.isVerticallyCentered?i.y+=r.height/2:s.isBottom&&(i.y+=r.height)),i},_getTransformOrigin:function(){var r="",i=n.Placement.properties[this.placement];return i&&(i.isLeft?r="left":i.isRight&&(r="right"),i.isTop?r+=" top":i.isBottom&&(r+=" bottom")),r},update:function(r,i){var s=n.isPlainObject(r)?r:{location:r,placement:i};this._init({location:s.location||this.location,placement:s.placement!==void 0?s.placement:this.placement,onDraw:s.onDraw||this.onDraw,checkResize:s.checkResize||this.checkResize,width:s.width!==void 0?s.width:this.width,height:s.height!==void 0?s.height:this.height,rotationMode:s.rotationMode||this.rotationMode})},getBounds:function(r){n.console.assert(r,"A viewport must now be passed to Overlay.getBounds.");var i=this.width,s=this.height;if(i===null||s===null){var o=r.deltaPointsFromPixelsNoRotate(this.size,!0);i===null&&(i=o.x),s===null&&(s=o.y)}var a=this.location.clone();return this.adjust(a,new n.Point(i,s)),this._adjustBoundsForRotation(r,new n.Rect(a.x,a.y,i,s))},_adjustBoundsForRotation:function(r,i){if(!r||r.getRotation(!0)===0||this.rotationMode===n.OverlayRotationMode.EXACT)return i;if(this.rotationMode===n.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return i;var s=this._getOverlayPositionAndSize(r);return r.viewerElementToViewportRectangle(new n.Rect(s.position.x,s.position.y,s.size.x,s.size.y))}return i.rotate(-r.getRotation(!0),this._getPlacementPoint(i))}}}(t),function(n){const r=n;r.DrawerBase=class{constructor(s){n.console.assert(s.viewer,"[Drawer] options.viewer is required"),n.console.assert(s.viewport,"[Drawer] options.viewport is required"),n.console.assert(s.element,"[Drawer] options.element is required"),this.viewer=s.viewer,this.viewport=s.viewport,this.debugGridColor=typeof s.debugGridColor=="string"?[s.debugGridColor]:s.debugGridColor||n.DEFAULT_SETTINGS.debugGridColor,this.options=s.options||{},this.container=n.getElement(s.element),this._renderingTarget=this._createDrawingElement(),this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",this.canvas.style.left="0",n.setElementOpacity(this.canvas,this.viewer.opacity,!0),n.setElementPointerEventsNone(this.canvas),n.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._checkForAPIOverrides()}get canvas(){return this._renderingTarget}get element(){return n.console.error("Drawer.element is deprecated. Use Drawer.container instead."),this.container}getType(){n.console.error("Drawer.getType must be implemented by child class")}static isSupported(){n.console.error("Drawer.isSupported must be implemented by child class")}_createDrawingElement(){return n.console.error("Drawer._createDrawingElement must be implemented by child class"),null}draw(s){n.console.error("Drawer.draw must be implemented by child class")}canRotate(){n.console.error("Drawer.canRotate must be implemented by child class")}destroy(){n.console.error("Drawer.destroy must be implemented by child class")}minimumOverlapRequired(s){return!1}setImageSmoothingEnabled(s){n.console.error("Drawer.setImageSmoothingEnabled must be implemented by child class")}drawDebuggingRect(s){n.console.warn("[drawer].drawDebuggingRect is not implemented by this drawer")}clear(){n.console.warn("[drawer].clear() is deprecated. The drawer is responsible for clearing itself as needed before drawing tiles.")}_checkForAPIOverrides(){if(this._createDrawingElement===n.DrawerBase.prototype._createDrawingElement)throw new Error("[drawer]._createDrawingElement must be implemented by child class");if(this.draw===n.DrawerBase.prototype.draw)throw new Error("[drawer].draw must be implemented by child class");if(this.canRotate===n.DrawerBase.prototype.canRotate)throw new Error("[drawer].canRotate must be implemented by child class");if(this.destroy===n.DrawerBase.prototype.destroy)throw new Error("[drawer].destroy must be implemented by child class");if(this.setImageSmoothingEnabled===n.DrawerBase.prototype.setImageSmoothingEnabled)throw new Error("[drawer].setImageSmoothingEnabled must be implemented by child class")}viewportToDrawerRectangle(s){var o=this.viewport.pixelFromPointNoRotate(s.getTopLeft(),!0),a=this.viewport.deltaPixelsFromPointsNoRotate(s.getSize(),!0);return new n.Rect(o.x*n.pixelDensityRatio,o.y*n.pixelDensityRatio,a.x*n.pixelDensityRatio,a.y*n.pixelDensityRatio)}viewportCoordToDrawerCoord(s){var o=this.viewport.pixelFromPointNoRotate(s,!0);return new n.Point(o.x*n.pixelDensityRatio,o.y*n.pixelDensityRatio)}_calculateCanvasSize(){var s=n.pixelDensityRatio,o=this.viewport.getContainerSize();return new r.Point(Math.round(o.x*s),Math.round(o.y*s))}_raiseTiledImageDrawnEvent(s,o){this.viewer&&this.viewer.raiseEvent("tiled-image-drawn",{tiledImage:s,tiles:o})}_raiseDrawerErrorEvent(s,o){this.viewer&&this.viewer.raiseEvent("drawer-error",{tiledImage:s,drawer:this,error:o})}}}(t),function(n){const r=n;class i extends r.DrawerBase{constructor(o){super(o),this.viewer.rejectEventHandler("tile-drawing","The HTMLDrawer does not raise the tile-drawing event"),this.viewer.allowEventHandler("tile-drawn")}static isSupported(){return!0}getType(){return"html"}minimumOverlapRequired(o){return!0}_createDrawingElement(){return n.makeNeutralElement("div")}draw(o){var a=this;this._prepareNewFrame(),o.forEach(function(l){l.opacity!==0&&a._drawTiles(l)})}canRotate(){return!1}destroy(){this.container.removeChild(this.canvas)}setImageSmoothingEnabled(){}_prepareNewFrame(){this.canvas.innerHTML=""}_drawTiles(o){var a=o.getTilesToDraw().map(c=>c.tile);if(!(o.opacity===0||a.length===0&&!o.placeholderFillStyle))for(var l=a.length-1;l>=0;l--){var u=a[l];this._drawTile(u),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:o,tile:u})}}_drawTile(o){n.console.assert(o,"[Drawer._drawTile] tile is required");let a=this.canvas;if(!o.cacheImageRecord){n.console.warn("[Drawer._drawTileToHTML] attempting to draw tile %s when it's not cached",o.toString());return}if(!o.loaded){n.console.warn("Attempting to draw tile %s when it's not yet loaded.",o.toString());return}if(!o.element){var l=o.getImage();if(!l)return;o.element=n.makeNeutralElement("div"),o.imgElement=l.cloneNode(),o.imgElement.style.msInterpolationMode="nearest-neighbor",o.imgElement.style.width="100%",o.imgElement.style.height="100%",o.style=o.element.style,o.style.position="absolute"}o.element.parentNode!==a&&a.appendChild(o.element),o.imgElement.parentNode!==o.element&&o.element.appendChild(o.imgElement),o.style.top=o.position.y+"px",o.style.left=o.position.x+"px",o.style.height=o.size.y+"px",o.style.width=o.size.x+"px",o.flipped&&(o.style.transform="scaleX(-1)"),n.setElementOpacity(o.element,o.opacity)}}n.HTMLDrawer=i}(t),function(n){const r=n;class i extends r.DrawerBase{constructor(c){super(c),this.context=this.canvas.getContext("2d"),this.sketchCanvas=null,this.sketchContext=null,this._imageSmoothingEnabled=!0,this.viewer.allowEventHandler("tile-drawn"),this.viewer.allowEventHandler("tile-drawing")}static isSupported(){return n.supportsCanvas}getType(){return"canvas"}_createDrawingElement(){let c=n.makeNeutralElement("canvas"),d=this._calculateCanvasSize();return c.width=d.x,c.height=d.y,c}draw(c){this._prepareNewFrame(),this.viewer.viewport.getFlip()!==this._viewportFlipped&&this._flip();for(const d of c)d.opacity!==0&&this._drawTiles(d)}canRotate(){return!0}destroy(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null,this.container.removeChild(this.canvas)}minimumOverlapRequired(c){return!0}setImageSmoothingEnabled(c){this._imageSmoothingEnabled=!!c,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw()}drawDebuggingRect(c){var d=this.context;d.save(),d.lineWidth=2*n.pixelDensityRatio,d.strokeStyle=this.debugGridColor[0],d.fillStyle=this.debugGridColor[0],d.strokeRect(c.x*n.pixelDensityRatio,c.y*n.pixelDensityRatio,c.width*n.pixelDensityRatio,c.height*n.pixelDensityRatio),d.restore()}get _viewportFlipped(){return this.context.getTransform().a<0}_raiseTileDrawingEvent(c,d,f,h){this.viewer.raiseEvent("tile-drawing",{tiledImage:c,context:d,tile:f,rendered:h})}_prepareNewFrame(){var c=this._calculateCanvasSize();if((this.canvas.width!==c.x||this.canvas.height!==c.y)&&(this.canvas.width=c.x,this.canvas.height=c.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var d=this._calculateSketchCanvasSize();this.sketchCanvas.width=d.x,this.sketchCanvas.height=d.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}_clear(c,d){var f=this._getContext(c);if(d)f.clearRect(d.x,d.y,d.width,d.height);else{var h=f.canvas;f.clearRect(0,0,h.width,h.height)}}_drawTiles(c){var d=c.getTilesToDraw().map(E=>E.tile);if(!(c.opacity===0||d.length===0&&!c.placeholderFillStyle)){var f=d[0],h;f&&(h=c.opacity<1||c.compositeOperation&&c.compositeOperation!=="source-over"||!c._isBottomItem()&&c.source.hasTransparency(f.context2D,f.getUrl(),f.ajaxHeaders,f.postData));var p,m,g=this.viewport.getZoom(!0),v=c.viewportToImageZoom(g);d.length>1&&v>c.smoothTileEdgesMinZoom&&!c.iOSDevice&&c.getRotation(!0)%360===0&&(h=!0,p=f.getScaleForEdgeSmoothing(),m=f.getTranslationForEdgeSmoothing(p,this._getCanvasSize(!1),this._getCanvasSize(!0)));var w;h&&(p||(w=this.viewport.viewportToViewerElementRectangle(c.getClippedBounds(!0)).getIntegerBoundingBox(),w=w.times(n.pixelDensityRatio)),this._clear(!0,w)),p||this._setRotations(c,h);var b=!1;if(c._clip){this._saveContext(h);var _=c.imageToViewportRectangle(c._clip,!0);_=_.rotate(-c.getRotation(!0),c._getRotationPoint(!0));var x=this.viewportToDrawerRectangle(_);p&&(x=x.times(p)),m&&(x=x.translate(m)),this._setClip(x,h),b=!0}if(c._croppingPolygons){var S=this;b||this._saveContext(h);try{var I=c._croppingPolygons.map(function(E){return E.map(function(L){var j=c.imageToViewportCoordinates(L.x,L.y,!0).rotate(-c.getRotation(!0),c._getRotationPoint(!0)),F=S.viewportCoordToDrawerCoord(j);return p&&(F=F.times(p)),m&&(F=F.plus(m)),F})});this._clipWithPolygons(I,h)}catch(E){n.console.error(E)}b=!0}if(c._hasOpaqueTile=!1,c.placeholderFillStyle&&c._hasOpaqueTile===!1){let E=this.viewportToDrawerRectangle(c.getBoundsNoRotate(!0));p&&(E=E.times(p)),m&&(E=E.translate(m));let L=null;typeof c.placeholderFillStyle=="function"?L=c.placeholderFillStyle(c,this.context):L=c.placeholderFillStyle,this._drawRectangle(E,L,h)}var P=l(c.subPixelRoundingForTransparency),R=!1;if(P===n.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)R=!0;else if(P===n.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var O=this.viewer&&this.viewer.isAnimating();R=!O}for(var M=0;M<d.length;M++)f=d[M],this._drawTile(f,c,h,p,m,R,c.source),this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:c,tile:f});b&&this._restoreContext(h),p||(c.getRotation(!0)%360!==0&&this._restoreRotationChanges(h),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(h)),h&&(p&&this._setRotations(c),this.blendSketch({opacity:c.opacity,scale:p,translate:m,compositeOperation:c.compositeOperation,bounds:w}),p&&(c.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(!1))),this._drawDebugInfo(c,d),this._raiseTiledImageDrawnEvent(c,d)}}_drawDebugInfo(c,d){if(c.debugMode)for(var f=d.length-1;f>=0;f--){var h=d[f];try{this._drawDebugInfoOnTile(h,d.length,f,c)}catch(p){n.console.error(p)}}}_clipWithPolygons(c,d){var f=this._getContext(d);f.beginPath();for(const h of c)for(const[p,m]of h.entries())f[p===0?"moveTo":"lineTo"](m.x,m.y);f.clip()}_drawTile(c,d,f,h,p,m,g){n.console.assert(c,"[Drawer._drawTile] tile is required"),n.console.assert(d,"[Drawer._drawTile] drawingHandler is required");var v=this._getContext(f);h=h||1,this._drawTileToCanvas(c,v,d,h,p,m,g)}_drawTileToCanvas(c,d,f,h,p,m,g){var v=c.position.times(n.pixelDensityRatio),w=c.size.times(n.pixelDensityRatio),b;if(!c.context2D&&!c.cacheImageRecord){n.console.warn("[Drawer._drawTileToCanvas] attempting to draw tile %s when it's not cached",c.toString());return}if(b=c.getCanvasContext(),!c.loaded||!b){n.console.warn("Attempting to draw tile %s when it's not yet loaded.",c.toString());return}d.save(),typeof h=="number"&&h!==1&&(v=v.times(h),w=w.times(h)),p instanceof n.Point&&(v=v.plus(p)),d.globalAlpha===1&&c.hasTransparency&&(m&&(v.x=Math.round(v.x),v.y=Math.round(v.y),w.x=Math.round(w.x),w.y=Math.round(w.y)),d.clearRect(v.x,v.y,w.x,w.y)),this._raiseTileDrawingEvent(f,d,c,b);var _,x;c.sourceBounds?(_=Math.min(c.sourceBounds.width,b.canvas.width),x=Math.min(c.sourceBounds.height,b.canvas.height)):(_=b.canvas.width,x=b.canvas.height),d.translate(v.x+w.x/2,0),c.flipped&&d.scale(-1,1),d.drawImage(b.canvas,0,0,_,x,-w.x/2,v.y,w.x,w.y),d.restore()}_getContext(c){var d=this.context;if(c){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var f=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=f.x,this.sketchCanvas.height=f.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var h=this;this.viewer.addHandler("rotate",function p(){if(h.viewport.getRotation()!==0){h.viewer.removeHandler("rotate",p);var m=h._calculateSketchCanvasSize();h.sketchCanvas.width=m.x,h.sketchCanvas.height=m.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}d=this.sketchContext}return d}_saveContext(c){this._getContext(c).save()}_restoreContext(c){this._getContext(c).restore()}_setClip(c,d){var f=this._getContext(d);f.beginPath(),f.rect(c.x,c.y,c.width,c.height),f.clip()}_drawRectangle(c,d,f){var h=this._getContext(f);h.save(),h.fillStyle=d,h.fillRect(c.x,c.y,c.width,c.height),h.restore()}blendSketch(c,d,f,h){var p=c;n.isPlainObject(p)||(p={opacity:c,scale:d,translate:f,compositeOperation:h}),c=p.opacity,h=p.compositeOperation;var m=p.bounds;if(this.context.save(),this.context.globalAlpha=c,h&&(this.context.globalCompositeOperation=h),m)m.x<0&&(m.width+=m.x,m.x=0),m.x+m.width>this.canvas.width&&(m.width=this.canvas.width-m.x),m.y<0&&(m.height+=m.y,m.y=0),m.y+m.height>this.canvas.height&&(m.height=this.canvas.height-m.y),this.context.drawImage(this.sketchCanvas,m.x,m.y,m.width,m.height,m.x,m.y,m.width,m.height);else{d=p.scale||1,f=p.translate;var g=f instanceof n.Point?f:new n.Point(0,0),v=0,w=0;if(f){var b=this.sketchCanvas.width-this.canvas.width,_=this.sketchCanvas.height-this.canvas.height;v=Math.round(b/2),w=Math.round(_/2)}this.context.drawImage(this.sketchCanvas,g.x-v*d,g.y-w*d,(this.canvas.width+2*v)*d,(this.canvas.height+2*w)*d,-v,-w,this.canvas.width+2*v,this.canvas.height+2*w)}this.context.restore()}_drawDebugInfoOnTile(c,d,f,h){var p=this.viewer.world.getIndexOfItem(h)%this.debugGridColor.length,m=this.context;m.save(),m.lineWidth=2*n.pixelDensityRatio,m.font="small-caps bold "+13*n.pixelDensityRatio+"px arial",m.strokeStyle=this.debugGridColor[p],m.fillStyle=this.debugGridColor[p],this._setRotations(h),this._viewportFlipped&&this._flip({point:c.position.plus(c.size.divide(2))}),m.strokeRect(c.position.x*n.pixelDensityRatio,c.position.y*n.pixelDensityRatio,c.size.x*n.pixelDensityRatio,c.size.y*n.pixelDensityRatio);var g=(c.position.x+c.size.x/2)*n.pixelDensityRatio,v=(c.position.y+c.size.y/2)*n.pixelDensityRatio;m.translate(g,v);const w=this.viewport.getRotation(!0);m.rotate(Math.PI/180*-w),m.translate(-g,-v),c.x===0&&c.y===0&&(m.fillText("Zoom: "+this.viewport.getZoom(),c.position.x*n.pixelDensityRatio,(c.position.y-30)*n.pixelDensityRatio),m.fillText("Pan: "+this.viewport.getBounds().toString(),c.position.x*n.pixelDensityRatio,(c.position.y-20)*n.pixelDensityRatio)),m.fillText("Level: "+c.level,(c.position.x+10)*n.pixelDensityRatio,(c.position.y+20)*n.pixelDensityRatio),m.fillText("Column: "+c.x,(c.position.x+10)*n.pixelDensityRatio,(c.position.y+30)*n.pixelDensityRatio),m.fillText("Row: "+c.y,(c.position.x+10)*n.pixelDensityRatio,(c.position.y+40)*n.pixelDensityRatio),m.fillText("Order: "+f+" of "+d,(c.position.x+10)*n.pixelDensityRatio,(c.position.y+50)*n.pixelDensityRatio),m.fillText("Size: "+c.size.toString(),(c.position.x+10)*n.pixelDensityRatio,(c.position.y+60)*n.pixelDensityRatio),m.fillText("Position: "+c.position.toString(),(c.position.x+10)*n.pixelDensityRatio,(c.position.y+70)*n.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),h.getRotation(!0)%360!==0&&this._restoreRotationChanges(),m.restore()}_updateImageSmoothingEnabled(c){c.msImageSmoothingEnabled=this._imageSmoothingEnabled,c.imageSmoothingEnabled=this._imageSmoothingEnabled}_getCanvasSize(c){var d=this._getContext(c).canvas;return new n.Point(d.width,d.height)}_getCanvasCenter(){return new n.Point(this.canvas.width/2,this.canvas.height/2)}_setRotations(c,d=!1){var f=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:d,saveContext:f}),f=!1),c.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:c.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(c._getRotationPoint(!0),!0),useSketch:d,saveContext:f})}_offsetForRotation(c){var d=c.point?c.point.times(n.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(c.useSketch);f.save(),f.translate(d.x,d.y),f.rotate(Math.PI/180*c.degrees),f.translate(-d.x,-d.y)}_flip(c){c=c||{};var d=c.point?c.point.times(n.pixelDensityRatio):this._getCanvasCenter(),f=this._getContext(c.useSketch);f.translate(d.x,0),f.scale(-1,1),f.translate(-d.x,0)}_restoreRotationChanges(c){var d=this._getContext(c);d.restore()}_calculateCanvasSize(){var c=n.pixelDensityRatio,d=this.viewport.getContainerSize();return{x:Math.round(d.x*c),y:Math.round(d.y*c)}}_calculateSketchCanvasSize(){var c=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return c;var d=Math.ceil(Math.sqrt(c.x*c.x+c.y*c.y));return{x:d,y:d}}}n.CanvasDrawer=i;var s=n.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function o(u){return u!==n.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&u!==n.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&u!==n.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function a(u){return o(u)?s:u}function l(u){if(typeof u=="number")return a(u);if(!u||!n.Browser)return s;var c=u[n.Browser.vendor];return o(c)&&(c=u["*"]),a(c)}}(t),function(n){const r=n;r.WebGLDrawer=class extends r.DrawerBase{constructor(s){super(s),this._destroyed=!1,this._TextureMap=new Map,this._TileMap=new Map,this._gl=null,this._firstPass=null,this._secondPass=null,this._glFrameBuffer=null,this._renderToTexture=null,this._glFramebufferToCanvasTransform=null,this._outputCanvas=null,this._outputContext=null,this._clippingCanvas=null,this._clippingContext=null,this._renderingCanvas=null,this._backupCanvasDrawer=null,this._imageSmoothingEnabled=!0,this._boundToTileReady=o=>this._tileReadyHandler(o),this._boundToImageUnloaded=o=>this._imageUnloadedHandler(o),this.viewer.addHandler("tile-ready",this._boundToTileReady),this.viewer.addHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.rejectEventHandler("tile-drawn","The WebGLDrawer does not raise the tile-drawn event"),this.viewer.rejectEventHandler("tile-drawing","The WebGLDrawer does not raise the tile-drawing event"),this._setupCanvases(),this._setupRenderer(),this.context=this._outputContext}destroy(){if(this._destroyed)return;let s=this._gl;var o=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS);for(let l=0;l<o;++l)s.activeTexture(s.TEXTURE0+l),s.bindTexture(s.TEXTURE_2D,null),s.bindTexture(s.TEXTURE_CUBE_MAP,null);s.bindBuffer(s.ARRAY_BUFFER,null),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,null),s.bindRenderbuffer(s.RENDERBUFFER,null),s.bindFramebuffer(s.FRAMEBUFFER,null),this._unloadTextures(),s.deleteBuffer(this._secondPass.bufferOutputPosition),s.deleteFramebuffer(this._glFrameBuffer),this._renderingCanvas.width=this._renderingCanvas.height=1,this._clippingCanvas.width=this._clippingCanvas.height=1,this._outputCanvas.width=this._outputCanvas.height=1,this._renderingCanvas=null,this._clippingCanvas=this._clippingContext=null,this._outputCanvas=this._outputContext=null;let a=s.getExtension("WEBGL_lose_context");a&&a.loseContext(),this.viewer.removeHandler("tile-ready",this._boundToTileReady),this.viewer.removeHandler("image-unloaded",this._boundToImageUnloaded),this.viewer.removeHandler("resize",this._resizeHandler),this._gl=null,this._backupCanvasDrawer&&(this._backupCanvasDrawer.destroy(),this._backupCanvasDrawer=null),this.container.removeChild(this.canvas),this.viewer.drawer===this&&(this.viewer.drawer=null),this._destroyed=!0}canRotate(){return!0}static isSupported(){let s=document.createElement("canvas"),o=n.isFunction(s.getContext)&&s.getContext("webgl"),a=o&&o.getExtension("WEBGL_lose_context");return a&&a.loseContext(),!!o}getType(){return"webgl"}minimumOverlapRequired(s){return s.isTainted()}_createDrawingElement(){let s=n.makeNeutralElement("canvas"),o=this._calculateCanvasSize();return s.width=o.x,s.height=o.y,s}_getBackupCanvasDrawer(){return this._backupCanvasDrawer||(this._backupCanvasDrawer=this.viewer.requestDrawer("canvas",{mainDrawer:!1}),this._backupCanvasDrawer.canvas.style.setProperty("visibility","hidden")),this._backupCanvasDrawer}draw(s){let o=this._gl;const a=this.viewport.getBoundsNoRotateWithMargins(!0);let l={bounds:a,center:new r.Point(a.x+a.width/2,a.y+a.height/2),rotation:this.viewport.getRotation(!0)*Math.PI/180},u=this.viewport.flipped?-1:1,c=n.Mat3.makeTranslation(-l.center.x,-l.center.y),d=n.Mat3.makeScaling(2/l.bounds.width*u,-2/l.bounds.height),f=n.Mat3.makeRotation(-l.rotation),h=d.multiply(f).multiply(c);o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT),this._outputContext.clearRect(0,0,this._outputCanvas.width,this._outputCanvas.height);let p=!1;s.forEach((m,g)=>{if(m.isTainted()){p&&(this._outputContext.drawImage(this._renderingCanvas,0,0),o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT),p=!1);const v=this._getBackupCanvasDrawer();v.draw([m]),this._outputContext.drawImage(v.canvas,0,0)}else{let v=m.getTilesToDraw();if(m.placeholderFillStyle&&m._hasOpaqueTile===!1&&this._drawPlaceholder(m),v.length===0||m.getOpacity()===0)return;let w=v[0],b=m.compositeOperation||this.viewer.compositeOperation||m._clip||m._croppingPolygons||m.debugMode,_=b||m.opacity<1||w.hasTransparency;b&&(p&&this._outputContext.drawImage(this._renderingCanvas,0,0),o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT)),o.useProgram(this._firstPass.shaderProgram),_?(o.bindFramebuffer(o.FRAMEBUFFER,this._glFrameBuffer),o.clear(o.COLOR_BUFFER_BIT)):o.bindFramebuffer(o.FRAMEBUFFER,null);let x=h,S=m.getRotation(!0);if(S%360!==0){let E=n.Mat3.makeRotation(-S*Math.PI/180),L=m.getBoundsNoRotate(!0).getCenter(),j=n.Mat3.makeTranslation(L.x,L.y),F=n.Mat3.makeTranslation(-L.x,-L.y),B=j.multiply(E).multiply(F);x=h.multiply(B)}let I=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);if(I<=0)throw new Error(`WegGL error: bad value for gl parameter MAX_TEXTURE_IMAGE_UNITS (${I}). This could happen if too many contexts have been created and not released, or there is another problem with the graphics card.`);let P=new Float32Array(I*12),R=new Array(I),O=new Array(I),M=new Array(I);for(let E=0;E<v.length;E++){let L=v[E].tile,j=E%I,F=j+1,B=L.getCanvasContext(),Y=B?this._TextureMap.get(B.canvas):null;if(Y||(this._tileReadyHandler({tile:L,tiledImage:m}),Y=B?this._TextureMap.get(B.canvas):null),Y&&this._getTileData(L,m,Y,x,j,P,R,O,M),F===I||E===v.length-1){for(let Z=0;Z<=F;Z++)o.activeTexture(o.TEXTURE0+Z),o.bindTexture(o.TEXTURE_2D,R[Z]);o.bindBuffer(o.ARRAY_BUFFER,this._firstPass.bufferTexturePosition),o.bufferData(o.ARRAY_BUFFER,P,o.DYNAMIC_DRAW),O.forEach((Z,ne)=>{o.uniformMatrix3fv(this._firstPass.uTransformMatrices[ne],!1,Z)}),o.uniform1fv(this._firstPass.uOpacities,new Float32Array(M)),o.bindBuffer(o.ARRAY_BUFFER,this._firstPass.bufferOutputPosition),o.vertexAttribPointer(this._firstPass.aOutputPosition,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ARRAY_BUFFER,this._firstPass.bufferTexturePosition),o.vertexAttribPointer(this._firstPass.aTexturePosition,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ARRAY_BUFFER,this._firstPass.bufferIndex),o.vertexAttribPointer(this._firstPass.aIndex,1,o.FLOAT,!1,0,0),o.drawArrays(o.TRIANGLES,0,6*F)}}_&&(o.useProgram(this._secondPass.shaderProgram),o.bindFramebuffer(o.FRAMEBUFFER,null),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._renderToTexture),this._gl.uniform1f(this._secondPass.uOpacityMultiplier,m.opacity),o.bindBuffer(o.ARRAY_BUFFER,this._secondPass.bufferTexturePosition),o.vertexAttribPointer(this._secondPass.aTexturePosition,2,o.FLOAT,!1,0,0),o.bindBuffer(o.ARRAY_BUFFER,this._secondPass.bufferOutputPosition),o.vertexAttribPointer(this._secondPass.aOutputPosition,2,o.FLOAT,!1,0,0),o.drawArrays(o.TRIANGLES,0,6)),p=!0,b&&(this._applyContext2dPipeline(m,v,g),p=!1,o.bindFramebuffer(o.FRAMEBUFFER,null),o.clear(o.COLOR_BUFFER_BIT)),g===0&&this._raiseTiledImageDrawnEvent(m,v.map(E=>E.tile))}}),p&&this._outputContext.drawImage(this._renderingCanvas,0,0)}setImageSmoothingEnabled(s){this._imageSmoothingEnabled!==s&&(this._imageSmoothingEnabled=s,this._unloadTextures(),this.viewer.world.draw())}drawDebuggingRect(s){let o=this._outputContext;o.save(),o.lineWidth=2*n.pixelDensityRatio,o.strokeStyle=this.debugGridColor[0],o.fillStyle=this.debugGridColor[0],o.strokeRect(s.x*n.pixelDensityRatio,s.y*n.pixelDensityRatio,s.width*n.pixelDensityRatio,s.height*n.pixelDensityRatio),o.restore()}_getTextureDataFromTile(s){return s.getCanvasContext().canvas}_applyContext2dPipeline(s,o,a){if(this._outputContext.save(),this._outputContext.globalCompositeOperation=a===0?null:s.compositeOperation||this.viewer.compositeOperation,s._croppingPolygons||s._clip?(this._renderToClippingCanvas(s),this._outputContext.drawImage(this._clippingCanvas,0,0)):this._outputContext.drawImage(this._renderingCanvas,0,0),this._outputContext.restore(),s.debugMode){const l=this.viewer.viewport.getFlip();l&&this._flip(),this._drawDebugInfo(o,s,l),l&&this._flip()}}_getTileData(s,o,a,l,u,c,d,f,h){let p=a.texture,m=a.position;c.set(m,u*12);let g=this._calculateOverlapFraction(s,o),v=s.positionedBounds.width*g.x,w=s.positionedBounds.height*g.y,b=s.positionedBounds.x+(s.x===0?0:v),_=s.positionedBounds.y+(s.y===0?0:w),x=s.positionedBounds.x+s.positionedBounds.width-(s.isRightMost?0:v),S=s.positionedBounds.y+s.positionedBounds.height-(s.isBottomMost?0:w),I=x-b,P=S-_,R=new n.Mat3([I,0,0,0,P,0,b,_,1]);if(s.flipped){let M=n.Mat3.makeTranslation(.5,0),E=n.Mat3.makeTranslation(-.5,0),L=M.multiply(n.Mat3.makeScaling(-1,1)).multiply(E);R=R.multiply(L)}let O=l.multiply(R);h[u]=s.opacity,d[u]=p,f[u]=O.values}_textureFilter(){return this._imageSmoothingEnabled?this._gl.LINEAR:this._gl.NEAREST}_setupRenderer(){let s=this._gl;s||n.console.error("_setupCanvases must be called before _setupRenderer"),this._unitQuad=this._makeQuadVertexBuffer(0,1,0,1),this._makeFirstPassShaderProgram(),this._makeSecondPassShaderProgram(),this._renderToTexture=s.createTexture(),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this._renderToTexture),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this._renderingCanvas.width,this._renderingCanvas.height,0,s.RGBA,s.UNSIGNED_BYTE,null),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,this._textureFilter()),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),this._glFrameBuffer=s.createFramebuffer(),s.bindFramebuffer(s.FRAMEBUFFER,this._glFrameBuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,this._renderToTexture,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)}_makeFirstPassShaderProgram(){let s=this._glNumTextures=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),o=()=>[...Array(s).keys()].map(p=>`uniform mat3 u_matrix_${p};`).join(` `),a=()=>[...Array(s).keys()].map(p=>`${p>0?"else ":""}if(int(a_index) == ${p}) { transform_matrix = u_matrix_${p}; }`).join(` `);const l=` attribute vec2 a_output_position; attribute vec2 a_texture_position; attribute float a_index; ${o()} // create a uniform mat3 for each potential tile to draw varying vec2 v_texture_position; varying float v_image_index; void main() { mat3 transform_matrix; // value will be set by the if/elses in makeConditional() ${a()} gl_Position = vec4(transform_matrix * vec3(a_output_position, 1), 1); v_texture_position = a_texture_position; v_image_index = a_index; } `,u=` precision mediump float; // our textures uniform sampler2D u_images[${s}]; // our opacities uniform float u_opacities[${s}]; // the varyings passed in from the vertex shader. varying vec2 v_texture_position; varying float v_image_index; void main() { // can't index directly with a variable, need to use a loop iterator hack for(int i = 0; i < ${s}; ++i){ if(i == int(v_image_index)){ gl_FragColor = texture2D(u_images[i], v_texture_position) * u_opacities[i]; } } } `;let c=this._gl,d=this.constructor.initShaderProgram(c,l,u);c.useProgram(d),this._firstPass={shaderProgram:d,aOutputPosition:c.getAttribLocation(d,"a_output_position"),aTexturePosition:c.getAttribLocation(d,"a_texture_position"),aIndex:c.getAttribLocation(d,"a_index"),uTransformMatrices:[...Array(this._glNumTextures).keys()].map(p=>c.getUniformLocation(d,`u_matrix_${p}`)),uImages:c.getUniformLocation(d,"u_images"),uOpacities:c.getUniformLocation(d,"u_opacities"),bufferOutputPosition:c.createBuffer(),bufferTexturePosition:c.createBuffer(),bufferIndex:c.createBuffer()},c.uniform1iv(this._firstPass.uImages,[...Array(s).keys()]);let f=new Float32Array(s*12);for(let p=0;p<s;++p)f.set(Float32Array.from(this._unitQuad),p*12);c.bindBuffer(c.ARRAY_BUFFER,this._firstPass.bufferOutputPosition),c.bufferData(c.ARRAY_BUFFER,f,c.STATIC_DRAW),c.enableVertexAttribArray(this._firstPass.aOutputPosition),c.bindBuffer(c.ARRAY_BUFFER,this._firstPass.bufferTexturePosition),c.enableVertexAttribArray(this._firstPass.aTexturePosition),c.bindBuffer(c.ARRAY_BUFFER,this._firstPass.bufferIndex);let h=[...Array(this._glNumTextures).keys()].map(p=>Array(6).fill(p)).flat();c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW),c.enableVertexAttribArray(this._firstPass.aIndex)}_makeSecondPassShaderProgram(){const s=` attribute vec2 a_output_position; attribute vec2 a_texture_position; uniform mat3 u_matrix; varying vec2 v_texture_position; void main() { gl_Position = vec4(u_matrix * vec3(a_output_position, 1), 1); v_texture_position = a_texture_position; } `,o=` precision mediump float; // our texture uniform sampler2D u_image; // the texCoords passed in from the vertex shader. varying vec2 v_texture_position; // the opacity multiplier for the image uniform float u_opacity_multiplier; void main() { gl_FragColor = texture2D(u_image, v_texture_position); gl_FragColor *= u_opacity_multiplier; } `;let a=this._gl,l=this.constructor.initShaderProgram(a,s,o);a.useProgram(l),this._secondPass={shaderProgram:l,aOutputPosition:a.getAttribLocation(l,"a_output_position"),aTexturePosition:a.getAttribLocation(l,"a_texture_position"),uMatrix:a.getUniformLocation(l,"u_matrix"),uImage:a.getUniformLocation(l,"u_image"),uOpacityMultiplier:a.getUniformLocation(l,"u_opacity_multiplier"),bufferOutputPosition:a.createBuffer(),bufferTexturePosition:a.createBuffer()},a.bindBuffer(a.ARRAY_BUFFER,this._secondPass.bufferOutputPosition),a.bufferData(a.ARRAY_BUFFER,this._unitQuad,a.STATIC_DRAW),a.enableVertexAttribArray(this._secondPass.aOutputPosition),a.bindBuffer(a.ARRAY_BUFFER,this._secondPass.bufferTexturePosition),a.bufferData(a.ARRAY_BUFFER,this._unitQuad,a.DYNAMIC_DRAW),a.enableVertexAttribArray(this._secondPass.aTexturePosition);let u=n.Mat3.makeScaling(2,2).multiply(n.Mat3.makeTranslation(-.5,-.5));a.uniformMatrix3fv(this._secondPass.uMatrix,!1,u.values)}_resizeRenderer(){let s=this._gl,o=this._renderingCanvas.width,a=this._renderingCanvas.height;s.viewport(0,0,o,a),s.deleteTexture(this._renderToTexture),this._renderToTexture=s.createTexture(),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this._renderToTexture),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,o,a,0,s.RGBA,s.UNSIGNED_BYTE,null),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,this._textureFilter()),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.bindFramebuffer(s.FRAMEBUFFER,this._glFrameBuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,this._renderToTexture,0)}_setupCanvases(){let s=this;this._outputCanvas=this.canvas,this._outputContext=this._outputCanvas.getContext("2d"),this._renderingCanvas=document.createElement("canvas"),this._clippingCanvas=document.createElement("canvas"),this._clippingContext=this._clippingCanvas.getContext("2d"),this._renderingCanvas.width=this._clippingCanvas.width=this._outputCanvas.width,this._renderingCanvas.height=this._clippingCanvas.height=this._outputCanvas.height,this._gl=this._renderingCanvas.getContext("webgl"),this._resizeHandler=function(){s._outputCanvas!==s.viewer.drawer.canvas&&(s._outputCanvas.style.width=s.viewer.drawer.canvas.clientWidth+"px",s._outputCanvas.style.height=s.viewer.drawer.canvas.clientHeight+"px");let o=s._calculateCanvasSize();(s._outputCanvas.width!==o.x||s._outputCanvas.height!==o.y)&&(s._outputCanvas.width=o.x,s._outputCanvas.height=o.y),s._renderingCanvas.style.width=s._outputCanvas.clientWidth+"px",s._renderingCanvas.style.height=s._outputCanvas.clientHeight+"px",s._renderingCanvas.width=s._clippingCanvas.width=s._outputCanvas.width,s._renderingCanvas.height=s._clippingCanvas.height=s._outputCanvas.height,s._resizeRenderer()},this.viewer.addHandler("resize",this._resizeHandler)}_makeQuadVertexBuffer(s,o,a,l){return new Float32Array([s,l,o,l,s,a,s,a,o,l,o,a])}_tileReadyHandler(s){let o=s.tile,a=s.tiledImage;if(a.isTainted())return;let l=o.getCanvasContext(),u=l&&l.canvas;if(!u||n.isCanvasTainted(u)){a.isTainted()||(a.setTainted(!0),n.console.warn("WebGL cannot be used to draw this TiledImage because it has tainted data. Does crossOriginPolicy need to be set?"),this._raiseDrawerErrorEvent(a,"Tainted data cannot be used by the WebGLDrawer. Falling back to CanvasDrawer for this TiledImage."));return}if(!this._TextureMap.get(u)){let d=this._gl,f=d.createTexture(),h,p=a.source.tileOverlap,m,g;if(o.sourceBounds?(m=Math.min(o.sourceBounds.width,u.width)/u.width,g=Math.min(o.sourceBounds.height,u.height)/u.height):(m=1,g=1),p>0){let w=this._calculateOverlapFraction(o,a),b=(o.x===0?0:w.x)*m,_=(o.y===0?0:w.y)*g,x=(o.isRightMost?1:1-w.x)*m,S=(o.isBottomMost?1:1-w.y)*g;h=this._makeQuadVertexBuffer(b,x,_,S)}else m===1&&g===1?h=this._unitQuad:h=this._makeQuadVertexBuffer(0,m,0,g);let v={texture:f,position:h};this._TextureMap.set(u,v),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,f),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,this._textureFilter()),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,this._textureFilter()),this._uploadImageData(l)}}_calculateOverlapFraction(s,o){let a=o.source.tileOverlap,l=s.sourceBounds.width,u=s.sourceBounds.height,c=(s.x===0?0:a)+(s.isRightMost?0:a),d=(s.y===0?0:a)+(s.isBottomMost?0:a),f=a/(l+c),h=a/(u+d);return{x:f,y:h}}_unloadTextures(){Array.from(this._TextureMap.keys()).forEach(o=>{this._cleanupImageData(o)})}_uploadImageData(s){let o=this._gl,a=s.canvas;try{if(!a)throw s;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,a)}catch(l){n.console.error("Error uploading image data to WebGL",l)}}_imageUnloadedHandler(s){let o=s.context2D.canvas;this._cleanupImageData(o)}_cleanupImageData(s){let o=this._TextureMap.get(s);this._TextureMap.delete(s),o&&this._gl.deleteTexture(o.texture)}_setClip(){}_renderToClippingCanvas(s){if(this._clippingContext.clearRect(0,0,this._clippingCanvas.width,this._clippingCanvas.height),this._clippingContext.save(),this.viewer.viewport.getFlip()){const o=new n.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(o.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-o.x,0)}if(s._clip){let a=[{x:s._clip.x,y:s._clip.y},{x:s._clip.x+s._clip.width,y:s._clip.y},{x:s._clip.x+s._clip.width,y:s._clip.y+s._clip.height},{x:s._clip.x,y:s._clip.y+s._clip.height}].map(l=>{let u=s.imageToViewportCoordinates(l.x,l.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(u)});this._clippingContext.beginPath(),a.forEach((l,u)=>{this._clippingContext[u===0?"moveTo":"lineTo"](l.x,l.y)}),this._clippingContext.clip(),this._setClip()}if(s._croppingPolygons){let o=s._croppingPolygons.map(a=>a.map(l=>{let u=s.imageToViewportCoordinates(l.x,l.y,!0).rotate(this.viewer.viewport.getRotation(!0),this.viewer.viewport.getCenter(!0));return this.viewportCoordToDrawerCoord(u)}));this._clippingContext.beginPath(),o.forEach(a=>{a.forEach((l,u)=>{this._clippingContext[u===0?"moveTo":"lineTo"](l.x,l.y)})}),this._clippingContext.clip()}if(this.viewer.viewport.getFlip()){const o=new n.Point(this.canvas.width/2,this.canvas.height/2);this._clippingContext.translate(o.x,0),this._clippingContext.scale(-1,1),this._clippingContext.translate(-o.x,0)}this._clippingContext.drawImage(this._renderingCanvas,0,0),this._clippingContext.restore()}_setRotations(s){var o=!1;this.viewport.getRotation(!0)%360!==0&&(this._offsetForRotation({degrees:this.viewport.getRotation(!0),saveContext:o}),o=!1),s.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:s.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(s._getRotationPoint(!0),!0),saveContext:o})}_offsetForRotation(s){var o=s.point?s.point.times(n.pixelDensityRatio):this._getCanvasCenter(),a=this._outputContext;a.save(),a.translate(o.x,o.y),a.rotate(Math.PI/180*s.degrees),a.translate(-o.x,-o.y)}_flip(s){s=s||{};var o=s.point?s.point.times(n.pixelDensityRatio):this._getCanvasCenter(),a=this._outputContext;a.translate(o.x,0),a.scale(-1,1),a.translate(-o.x,0)}_drawDebugInfo(s,o,a){for(var l=s.length-1;l>=0;l--){var u=s[l].tile;try{this._drawDebugInfoOnTile(u,s.length,l,o,a)}catch(c){n.console.error(c)}}}_drawDebugInfoOnTile(s,o,a,l,u){var c=this.viewer.world.getIndexOfItem(l)%this.debugGridColor.length,d=this.context;d.save(),d.lineWidth=2*n.pixelDensityRatio,d.font="small-caps bold "+13*n.pixelDensityRatio+"px arial",d.strokeStyle=this.debugGridColor[c],d.fillStyle=this.debugGridColor[c],this._setRotations(l),u&&this._flip({point:s.position.plus(s.size.divide(2))}),d.strokeRect(s.position.x*n.pixelDensityRatio,s.position.y*n.pixelDensityRatio,s.size.x*n.pixelDensityRatio,s.size.y*n.pixelDensityRatio);var f=(s.position.x+s.size.x/2)*n.pixelDensityRatio,h=(s.position.y+s.size.y/2)*n.pixelDensityRatio;d.translate(f,h);const p=this.viewport.getRotation(!0);d.rotate(Math.PI/180*-p),d.translate(-f,-h),s.x===0&&s.y===0&&(d.fillText("Zoom: "+this.viewport.getZoom(),s.position.x*n.pixelDensityRatio,(s.position.y-30)*n.pixelDensityRatio),d.fillText("Pan: "+this.viewport.getBounds().toString(),s.position.x*n.pixelDensityRatio,(s.position.y-20)*n.pixelDensityRatio)),d.fillText("Level: "+s.level,(s.position.x+10)*n.pixelDensityRatio,(s.position.y+20)*n.pixelDensityRatio),d.fillText("Column: "+s.x,(s.position.x+10)*n.pixelDensityRatio,(s.position.y+30)*n.pixelDensityRatio),d.fillText("Row: "+s.y,(s.position.x+10)*n.pixelDensityRatio,(s.position.y+40)*n.pixelDensityRatio),d.fillText("Order: "+a+" of "+o,(s.position.x+10)*n.pixelDensityRatio,(s.position.y+50)*n.pixelDensityRatio),d.fillText("Size: "+s.size.toString(),(s.position.x+10)*n.pixelDensityRatio,(s.position.y+60)*n.pixelDensityRatio),d.fillText("Position: "+s.position.toString(),(s.position.x+10)*n.pixelDensityRatio,(s.position.y+70)*n.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),l.getRotation(!0)%360!==0&&this._restoreRotationChanges(),d.restore()}_drawPlaceholder(s){const o=s.getBounds(!0),a=this.viewportToDrawerRectangle(s.getBounds(!0)),l=this._outputContext;let u;typeof s.placeholderFillStyle=="function"?u=s.placeholderFillStyle(s,l):u=s.placeholderFillStyle,this._offsetForRotation({degrees:this.viewer.viewport.getRotation(!0)}),l.fillStyle=u,l.translate(a.x,a.y),l.rotate(Math.PI/180*o.degrees),l.translate(-a.x,-a.y),l.fillRect(a.x,a.y,a.width,a.height),this._restoreRotationChanges()}_getCanvasCenter(){return new n.Point(this.canvas.width/2,this.canvas.height/2)}_restoreRotationChanges(){var s=this._outputContext;s.restore()}static initShaderProgram(s,o,a){function l(f,h,p){const m=f.createShader(h);return f.shaderSource(m,p),f.compileShader(m),f.getShaderParameter(m,f.COMPILE_STATUS)?m:(n.console.error(`An error occurred compiling the shaders: ${f.getShaderInfoLog(m)}`),f.deleteShader(m),null)}const u=l(s,s.VERTEX_SHADER,o),c=l(s,s.FRAGMENT_SHADER,a),d=s.createProgram();return s.attachShader(d,u),s.attachShader(d,c),s.linkProgram(d),s.getProgramParameter(d,s.LINK_STATUS)?d:(n.console.error(`Unable to initialize the shader program: ${s.getProgramInfoLog(d)}`),null)}}}(t),function(n){n.Viewport=function(r){var i=arguments;i.length&&i[0]instanceof n.Point&&(r={containerSize:i[0],contentSize:i[1],config:i[2]}),r.config&&(n.extend(!0,r,r.config),delete r.config),this._margins=n.extend({left:0,top:0,right:0,bottom:0},r.margins||{}),delete r.margins,r.initialDegrees=r.degrees,delete r.degrees,n.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot:null,viewer:null,springStiffness:n.DEFAULT_SETTINGS.springStiffness,animationTime:n.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:n.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:n.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:n.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:n.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:n.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:n.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:n.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:n.DEFAULT_SETTINGS.maxZoomLevel,initialDegrees:n.DEFAULT_SETTINGS.degrees,flipped:n.DEFAULT_SETTINGS.flipped,homeFillsViewer:n.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:n.DEFAULT_SETTINGS.silenceMultiImageWarnings},r),this._updateContainerInnerSize(),this.centerSpringX=new n.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new n.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new n.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.degreesSpring=new n.Spring({initial:r.initialDegrees,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new n.Rect(0,0,1,1),1),this.goHome(!0),this.update()},n.Viewport.prototype={get degrees(){return n.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(r){n.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(r)},resetContentSize:function(r){return n.console.assert(r,"[Viewport.resetContentSize] contentSize is required"),n.console.assert(r instanceof n.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),n.console.assert(r.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),n.console.assert(r.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new n.Rect(0,0,1,r.y/r.x),r.x),this},setHomeBounds:function(r,i){n.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(r,i)},_setContentBounds:function(r,i){n.console.assert(r,"[Viewport._setContentBounds] bounds is required"),n.console.assert(r instanceof n.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),n.console.assert(r.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),n.console.assert(r.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=r.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=r.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var r=this._contentAspectRatio/this.getAspectRatio(),i;return this.homeFillsViewer?i=r>=1?r:1:i=r>=1?1:r,i/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var r=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),s=i/this.getAspectRatio();return new n.Rect(r.x-i/2,r.y-s/2,i,s)},goHome:function(r){return this.viewer&&this.viewer.raiseEvent("home",{immediately:r}),this.fitBounds(this.getHomeBounds(),r)},getMinZoom:function(){var r=this.getHomeZoom(),i=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*r;return i},getMaxZoom:function(){var r=this.maxZoomLevel;return r||(r=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,r/=this._contentBounds.width),Math.max(r,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new n.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return n.extend({},this._margins)},setMargins:function(r){n.console.assert(n.type(r)==="object","[Viewport.setMargins] margins must be an object"),this._margins=n.extend({left:0,top:0,right:0,bottom:0},r),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(-this.getRotation(r))},getBoundsNoRotate:function(r){var i=this.getCenter(r),s=1/this.getZoom(r),o=s/this.getAspectRatio();return new n.Rect(i.x-s/2,i.y-o/2,s,o)},getBoundsWithMargins:function(r){return this.getBoundsNoRotateWithMargins(r).rotate(-this.getRotation(r),this.getCenter(r))},getBoundsNoRotateWithMargins:function(r){var i=this.getBoundsNoRotate(r),s=this._containerInnerSize.x*this.getZoom(r);return i.x-=this._margins.left/s,i.y-=this._margins.top/s,i.width+=(this._margins.left+this._margins.right)/s,i.height+=(this._margins.top+this._margins.bottom)/s,i},getCenter:function(r){var i=new n.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),s=new n.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),o,a,l,u,c,d,f,h;return r?i:this.zoomPoint?(o=this.pixelFromPoint(this.zoomPoint,!0),a=this.getZoom(),l=1/a,u=l/this.getAspectRatio(),c=new n.Rect(i.x-l/2,i.y-u/2,l,u),d=this._pixelFromPoint(this.zoomPoint,c),f=d.minus(o).rotate(-this.getRotation(!0)),h=f.divide(this._containerInnerSize.x*a),s.plus(h)):s},getZoom:function(r){return r?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(r){return Math.max(Math.min(r,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(r){var i=this.viewportToViewerElementRectangle(r).getBoundingBox(),s=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),o=!1,a=!1;if(!this.wrapHorizontal){var l=i.x+i.width,u=s.x+s.width,c,d,f;i.width>s.width?c=this.visibilityRatio*s.width:c=this.visibilityRatio*i.width,d=s.x-l+c,f=u-i.x-c,c>s.width?(i.x+=(d+f)/2,o=!0):f<0?(i.x+=f,o=!0):d>0&&(i.x+=d,o=!0)}if(!this.wrapVertical){var h=i.y+i.height,p=s.y+s.height,m,g,v;i.height>s.height?m=this.visibilityRatio*s.height:m=this.visibilityRatio*i.height,g=s.y-h+m,v=p-i.y-m,m>s.height?(i.y+=(g+v)/2,a=!0):v<0?(i.y+=v,a=!0):g>0&&(i.y+=g,a=!0)}var w=o||a,b=w?this.viewerElementToViewportRectangle(i):r.clone();return b.xConstrained=o,b.yConstrained=a,b.constraintApplied=w,b},_raiseConstraintsEvent:function(r){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:r})},applyConstraints:function(r){var i=this.getZoom(),s=this._applyZoomConstraints(i);i!==s&&this.zoomTo(s,this.zoomPoint,r);var o=this.getConstrainedBounds(!1);return o.constraintApplied&&(this.fitBounds(o,r),this._raiseConstraintsEvent(r)),this},ensureVisible:function(r){return this.applyConstraints(r)},_fitBounds:function(r,i){i=i||{};var s=i.immediately||!1,o=i.constraints||!1,a=this.getAspectRatio(),l=r.getCenter(),u=new n.Rect(r.x,r.y,r.width,r.height,r.degrees+this.getRotation()).getBoundingBox();u.getAspectRatio()>=a?u.height=u.width/a:u.width=u.height*a,u.x=l.x-u.width/2,u.y=l.y-u.height/2;var c=1/u.width;if(s)return this.panTo(l,!0),this.zoomTo(c,null,!0),o&&this.applyConstraints(!0),this;var d=this.getCenter(!0),f=this.getZoom(!0);this.panTo(d,!0),this.zoomTo(f,null,!0);var h=this.getBounds(),p=this.getZoom();if(p===0||Math.abs(c/p-1)<1e-8)return this.zoomTo(c,null,!0),this.panTo(l,s),o&&this.applyConstraints(!1),this;if(o){this.panTo(l,!1),c=this._applyZoomConstraints(c),this.zoomTo(c,null,!1);var m=this.getConstrainedBounds();this.panTo(d,!0),this.zoomTo(f,null,!0),this.fitBounds(m)}else{var g=u.rotate(-this.getRotation()),v=g.getTopLeft().times(c).minus(h.getTopLeft().times(p)).divide(c-p);this.zoomTo(c,v,s)}return this},fitBounds:function(r,i){return this._fitBounds(r,{immediately:i,constraints:!1})},fitBoundsWithConstraints:function(r,i){return this._fitBounds(r,{immediately:i,constraints:!0})},fitVertically:function(r){var i=new n.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,r)},fitHorizontally:function(r){var i=new n.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,r)},getConstrainedBounds:function(r){var i,s;return i=this.getBounds(r),s=this._applyBoundaryConstraints(i),s},panBy:function(r,i){var s=new n.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(s.plus(r),i)},panTo:function(r,i){return i?(this.centerSpringX.resetTo(r.x),this.centerSpringY.resetTo(r.y)):(this.centerSpringX.springTo(r.x),this.centerSpringY.springTo(r.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:r,immediately:i}),this},zoomBy:function(r,i,s){return this.zoomTo(this.zoomSpring.target.value*r,i,s)},zoomTo:function(r,i,s){var o=this;return this.zoomPoint=i instanceof n.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,s?this._adjustCenterSpringsForZoomPoint(function(){o.zoomSpring.resetTo(r)}):this.zoomSpring.springTo(r),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:r,refPoint:i,immediately:s}),this},setRotation:function(r,i){return this.rotateTo(r,null,i)},getRotation:function(r){return r?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(r,i,s){return this.rotateTo(r,i,s)},rotateTo:function(r,i,s){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===r&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=i instanceof n.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,s)if(this.rotationPivot){var o=r-this._oldDegrees;if(!o)return this.rotationPivot=null,this;this._rotateAboutPivot(r)}else this.degreesSpring.resetTo(r);else{var a=n.positiveModulo(this.degreesSpring.current.value,360),l=n.positiveModulo(r,360),u=l-a;u>180?l-=360:u<-180&&(l+=360);var c=a-l;this.degreesSpring.resetTo(r+c),this.degreesSpring.springTo(r)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:r,immediately:!!s,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(r,i,s){return this.rotateTo(this.degreesSpring.target.value+r,i,s)},resize:function(r,i){var s=this.getBoundsNoRotate(),o=s,a;this.containerSize.x=r.x,this.containerSize.y=r.y,this._updateContainerInnerSize(),i&&(a=r.x/this.containerSize.x,o.width=s.width*a,o.height=o.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:r,maintain:i});var l=this.fitBounds(o,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:r,maintain:i}),l},_updateContainerInnerSize:function(){this._containerInnerSize=new n.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var r=this;this._adjustCenterSpringsForZoomPoint(function(){r.zoomSpring.update()}),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var i=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value;var s=i||!this.zoomSpring.isAtTargetValue()||!this.centerSpringX.isAtTargetValue()||!this.centerSpringY.isAtTargetValue()||!this.degreesSpring.isAtTargetValue();return s},_rotateAboutPivot:function(r){var i=r===!0,s=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(s.x),this.centerSpringY.shiftBy(s.y),i?this.degreesSpring.update():this.degreesSpring.resetTo(r);var o=this.degreesSpring.current.value-this._oldDegrees,a=s.rotate(o*-1).times(-1);this.centerSpringX.shiftBy(a.x),this.centerSpringY.shiftBy(a.y)},_adjustCenterSpringsForZoomPoint:function(r){if(this.zoomPoint){var i=this.pixelFromPoint(this.zoomPoint,!0);r();var s=this.pixelFromPoint(this.zoomPoint,!0),o=s.minus(i),a=this.deltaPointsFromPixels(o,!0);this.centerSpringX.shiftBy(a.x),this.centerSpringY.shiftBy(a.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else r()},deltaPixelsFromPointsNoRotate:function(r,i){return r.times(this._containerInnerSize.x*this.getZoom(i))},deltaPixelsFromPoints:function(r,i){return this.deltaPixelsFromPointsNoRotate(r.rotate(this.getRotation(i)),i)},deltaPointsFromPixelsNoRotate:function(r,i){return r.divide(this._containerInnerSize.x*this.getZoom(i))},deltaPointsFromPixels:function(r,i){return this.deltaPointsFromPixelsNoRotate(r,i).rotate(-this.getRotation(i))},pixelFromPointNoRotate:function(r,i){return this._pixelFromPointNoRotate(r,this.getBoundsNoRotate(i))},pixelFromPoint:function(r,i){return this._pixelFromPoint(r,this.getBoundsNoRotate(i))},_pixelFromPointNoRotate:function(r,i){return r.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new n.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(r,i){return this._pixelFromPointNoRotate(r.rotate(this.getRotation(!0),this.getCenter(!0)),i)},pointFromPixelNoRotate:function(r,i){var s=this.getBoundsNoRotate(i);return r.minus(new n.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/s.width).plus(s.getTopLeft())},pointFromPixel:function(r,i){return this.pointFromPixelNoRotate(r,i).rotate(-this.getRotation(i),this.getCenter(i))},_viewportToImageDelta:function(r,i){var s=this._contentBoundsNoRotate.width;return new n.Point(r*this._contentSizeNoRotate.x/s,i*this._contentSizeNoRotate.x/s)},viewportToImageCoordinates:function(r,i){if(r instanceof n.Point)return this.viewportToImageCoordinates(r.x,r.y);if(this.viewer){var s=this.viewer.world.getItemCount();if(s>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(s===1){var o=this.viewer.world.getItemAt(0);return o.viewportToImageCoordinates(r,i,!0)}}return this._viewportToImageDelta(r-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(r,i){var s=this._contentBoundsNoRotate.width;return new n.Point(r/this._contentSizeNoRotate.x*s,i/this._contentSizeNoRotate.x*s)},imageToViewportCoordinates:function(r,i){if(r instanceof n.Point)return this.imageToViewportCoordinates(r.x,r.y);if(this.viewer){var s=this.viewer.world.getItemCount();if(s>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(s===1){var o=this.viewer.world.getItemAt(0);return o.imageToViewportCoordinates(r,i,!0)}}var a=this._imageToViewportDelta(r,i);return a.x+=this._contentBoundsNoRotate.x,a.y+=this._contentBoundsNoRotate.y,a},imageToViewportRectangle:function(r,i,s,o){var a=r;if(a instanceof n.Rect||(a=new n.Rect(r,i,s,o)),this.viewer){var l=this.viewer.world.getItemCount();if(l>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(l===1){var u=this.viewer.world.getItemAt(0);return u.imageToViewportRectangle(r,i,s,o,!0)}}var c=this.imageToViewportCoordinates(a.x,a.y),d=this._imageToViewportDelta(a.width,a.height);return new n.Rect(c.x,c.y,d.x,d.y,a.degrees)},viewportToImageRectangle:function(r,i,s,o){var a=r;if(a instanceof n.Rect||(a=new n.Rect(r,i,s,o)),this.viewer){var l=this.viewer.world.getItemCount();if(l>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(l===1){var u=this.viewer.world.getItemAt(0);return u.viewportToImageRectangle(r,i,s,o,!0)}}var c=this.viewportToImageCoordinates(a.x,a.y),d=this._viewportToImageDelta(a.width,a.height);return new n.Rect(c.x,c.y,d.x,d.y,a.degrees)},viewerElementToImageCoordinates:function(r){var i=this.pointFromPixel(r,!0);return this.viewportToImageCoordinates(i)},imageToViewerElementCoordinates:function(r){var i=this.imageToViewportCoordinates(r);return this.pixelFromPoint(i,!0)},windowToImageCoordinates:function(r){n.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=r.minus(n.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(r){n.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var i=this.imageToViewerElementCoordinates(r);return i.plus(n.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(r){return this.pointFromPixel(r,!0)},viewportToViewerElementCoordinates:function(r){return this.pixelFromPoint(r,!0)},viewerElementToViewportRectangle:function(r){return n.Rect.fromSummits(this.pointFromPixel(r.getTopLeft(),!0),this.pointFromPixel(r.getTopRight(),!0),this.pointFromPixel(r.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(r){return n.Rect.fromSummits(this.pixelFromPoint(r.getTopLeft(),!0),this.pixelFromPoint(r.getTopRight(),!0),this.pixelFromPoint(r.getBottomLeft(),!0))},windowToViewportCoordinates:function(r){n.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=r.minus(n.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(r){n.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var i=this.viewportToViewerElementCoordinates(r);return i.plus(n.getElementPosition(this.viewer.element))},viewportToImageZoom:function(r){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(i===1){var s=this.viewer.world.getItemAt(0);return s.viewportToImageZoom(r)}}var o=this._contentSizeNoRotate.x,a=this._containerInnerSize.x,l=this._contentBoundsNoRotate.width,u=a/o*l;return r*u},imageToViewportZoom:function(r){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||n.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image. Instead, use [TiledImage.imageToViewportZoom] for the specific image of interest");else if(i===1){var s=this.viewer.world.getItemAt(0);return s.imageToViewportZoom(r)}}var o=this._contentSizeNoRotate.x,a=this._containerInnerSize.x,l=this._contentBoundsNoRotate.width,u=o/a/l;return r*u},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(r){return this.flipped===r?this:(this.flipped=r,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:r}),this)},getMaxZoomPixelRatio:function(){return this.maxZoomPixelRatio},setMaxZoomPixelRatio:function(r,i=!0,s=!1){n.console.assert(!isNaN(r),"[Viewport.setMaxZoomPixelRatio] ratio must be a number"),!isNaN(r)&&(this.maxZoomPixelRatio=r,i&&this.getZoom()>this.getMaxZoom()&&this.applyConstraints(s))}}}(t),function(n){n.TiledImage=function(r){this._initialized=!1,n.console.assert(r.tileCache,"[TiledImage] options.tileCache is required"),n.console.assert(r.drawer,"[TiledImage] options.drawer is required"),n.console.assert(r.viewer,"[TiledImage] options.viewer is required"),n.console.assert(r.imageLoader,"[TiledImage] options.imageLoader is required"),n.console.assert(r.source,"[TiledImage] options.source is required"),n.console.assert(!r.clip||r.clip instanceof n.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),n.EventSource.call(this),this._tileCache=r.tileCache,delete r.tileCache,this._drawer=r.drawer,delete r.drawer,this._imageLoader=r.imageLoader,delete r.imageLoader,r.clip instanceof n.Rect&&(this._clip=r.clip.clone()),delete r.clip;var i=r.x||0;delete r.x;var s=r.y||0;delete r.y,this.normHeight=r.source.dimensions.y/r.source.dimensions.x,this.contentAspectX=r.source.dimensions.x/r.source.dimensions.y;var o=1;r.width?(o=r.width,delete r.width,r.height&&(n.console.error("specifying both width and height to a tiledImage is not supported"),delete r.height)):r.height&&(o=r.height/this.normHeight,delete r.height);var a=r.fitBounds;delete r.fitBounds;var l=r.fitBoundsPlacement||t.Placement.CENTER;delete r.fitBoundsPlacement;var u=r.degrees||0;delete r.degrees;var c=r.ajaxHeaders;delete r.ajaxHeaders,n.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_needsDraw:!0,_needsUpdate:!0,_hasOpaqueTile:!1,_tilesLoading:0,_tilesToDraw:[],_lastDrawn:[],_isBlending:!1,_wasBlending:!1,_isTainted:!1,springStiffness:n.DEFAULT_SETTINGS.springStiffness,animationTime:n.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:n.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:n.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:n.DEFAULT_SETTINGS.wrapVertical,immediateRender:n.DEFAULT_SETTINGS.immediateRender,blendTime:n.DEFAULT_SETTINGS.blendTime,alwaysBlend:n.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:n.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:n.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:n.DEFAULT_SETTINGS.iOSDevice,debugMode:n.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:n.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:n.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:n.DEFAULT_SETTINGS.placeholderFillStyle,opacity:n.DEFAULT_SETTINGS.opacity,preload:n.DEFAULT_SETTINGS.preload,compositeOperation:n.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:n.DEFAULT_SETTINGS.subPixelRoundingForTransparency,maxTilesPerFrame:n.DEFAULT_SETTINGS.maxTilesPerFrame},r),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new n.Spring({initial:i,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new n.Spring({initial:s,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new n.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new n.Spring({initial:u,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,l,!0),this._ownAjaxHeaders={},this.setAjaxHeaders(c,!1),this._initialized=!0},n.extend(n.TiledImage.prototype,n.EventSource.prototype,{needsDraw:function(){return this._needsDraw},redraw:function(){this._needsDraw=!0},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(r){r!==this._fullyLoaded&&(this._fullyLoaded=r,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=n.now(),this._needsDraw=!0},update:function(r){let i=this._xSpring.update(),s=this._ySpring.update(),o=this._scaleSpring.update(),a=this._degreesSpring.update(),l=i||s||o||a||this._needsUpdate;if(l||r||!this._fullyLoaded){let u=this._updateLevelsForViewport();this._setFullyLoaded(u)}return this._needsUpdate=!1,l?(this._updateForScale(),this._raiseBoundsChange(),this._needsDraw=!0,!0):!1},setDrawn:function(){return this._needsDraw=this._isBlending||this._wasBlending,this._needsDraw},setTainted(r){this._isTainted=r},isTainted(){return this._isTainted},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy(this.viewer)},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(this.getRotation(r),this._getRotationPoint(r))},getBoundsNoRotate:function(r){return r?new n.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new n.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return n.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(r){var i=this.getBoundsNoRotate(r);if(this._clip){var s=r?this._worldWidthCurrent:this._worldWidthTarget,o=s/this.source.dimensions.x,a=this._clip.times(o);i=new n.Rect(i.x+a.x,i.y+a.y,a.width,a.height)}return i.rotate(this.getRotation(r),this._getRotationPoint(r))},getTileBounds:function(r,i,s){var o=this.source.getNumTiles(r),a=(o.x+i%o.x)%o.x,l=(o.y+s%o.y)%o.y,u=this.source.getTileBounds(r,a,l);return this.getFlip()&&(u.x=Math.max(0,1-u.x-u.width)),u.x+=(i-a)/o.x,u.y+=this._worldHeightCurrent/this._worldWidthCurrent*((s-l)/o.y),u},getContentSize:function(){return new n.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var r=this.imageToWindowCoordinates(new n.Point(0,0)),i=this.imageToWindowCoordinates(this.getContentSize());return new n.Point(i.x-r.x,i.y-r.y)},_viewportToImageDelta:function(r,i,s){var o=s?this._scaleSpring.current.value:this._scaleSpring.target.value;return new n.Point(r*(this.source.dimensions.x/o),i*(this.source.dimensions.y*this.contentAspectX/o))},viewportToImageCoordinates:function(r,i,s){var o;return r instanceof n.Point?(s=i,o=r):o=new n.Point(r,i),o=o.rotate(-this.getRotation(s),this._getRotationPoint(s)),s?this._viewportToImageDelta(o.x-this._xSpring.current.value,o.y-this._ySpring.current.value):this._viewportToImageDelta(o.x-this._xSpring.target.value,o.y-this._ySpring.target.value)},_imageToViewportDelta:function(r,i,s){var o=s?this._scaleSpring.current.value:this._scaleSpring.target.value;return new n.Point(r/this.source.dimensions.x*o,i/this.source.dimensions.y/this.contentAspectX*o)},imageToViewportCoordinates:function(r,i,s){r instanceof n.Point&&(s=i,i=r.y,r=r.x);var o=this._imageToViewportDelta(r,i,s);return s?(o.x+=this._xSpring.current.value,o.y+=this._ySpring.current.value):(o.x+=this._xSpring.target.value,o.y+=this._ySpring.target.value),o.rotate(this.getRotation(s),this._getRotationPoint(s))},imageToViewportRectangle:function(r,i,s,o,a){var l=r;l instanceof n.Rect?a=i:l=new n.Rect(r,i,s,o);var u=this.imageToViewportCoordinates(l.getTopLeft(),a),c=this._imageToViewportDelta(l.width,l.height,a);return new n.Rect(u.x,u.y,c.x,c.y,l.degrees+this.getRotation(a))},viewportToImageRectangle:function(r,i,s,o,a){var l=r;r instanceof n.Rect?a=i:l=new n.Rect(r,i,s,o);var u=this.viewportToImageCoordinates(l.getTopLeft(),a),c=this._viewportToImageDelta(l.width,l.height,a);return new n.Rect(u.x,u.y,c.x,c.y,l.degrees-this.getRotation(a))},viewerElementToImageCoordinates:function(r){var i=this.viewport.pointFromPixel(r,!0);return this.viewportToImageCoordinates(i)},imageToViewerElementCoordinates:function(r){var i=this.imageToViewportCoordinates(r);return this.viewport.pixelFromPoint(i,!0)},windowToImageCoordinates:function(r){var i=r.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(r){var i=this.imageToViewerElementCoordinates(r);return i.plus(t.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(r){var i=this._scaleSpring.current.value;return r=r.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new n.Rect((r.x-this._xSpring.current.value)/i,(r.y-this._ySpring.current.value)/i,r.width/i,r.height/i,r.degrees)},viewportToImageZoom:function(r){var i=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return i*r},imageToViewportZoom:function(r){var i=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return r/i},setPosition:function(r,i){var s=this._xSpring.target.value===r.x&&this._ySpring.target.value===r.y;if(i){if(s&&this._xSpring.current.value===r.x&&this._ySpring.current.value===r.y)return;this._xSpring.resetTo(r.x),this._ySpring.resetTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}else{if(s)return;this._xSpring.springTo(r.x),this._ySpring.springTo(r.y),this._needsDraw=!0,this._needsUpdate=!0}s||this._raiseBoundsChange()},setWidth:function(r,i){this._setScale(r,i)},setHeight:function(r,i){this._setScale(r/this.normHeight,i)},setCroppingPolygons:function(r){var i=function(o){return o instanceof n.Point||typeof o.x=="number"&&typeof o.y=="number"},s=function(o){return o.map(function(a){try{if(i(a))return{x:a.x,y:a.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!n.isArray(r))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=r.map(function(o){return s(o)}),this._needsDraw=!0}catch(o){n.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),n.console.error(o),this.resetCroppingPolygons()}},resetCroppingPolygons:function(){this._croppingPolygons=null,this._needsDraw=!0},fitBounds:function(r,i,s){i=i||n.Placement.CENTER;var o=n.Placement.properties[i],a=this.contentAspectX,l=0,u=0,c=1,d=1;if(this._clip&&(a=this._clip.getAspectRatio(),c=this._clip.width/this.source.dimensions.x,d=this._clip.height/this.source.dimensions.y,r.getAspectRatio()>a?(l=this._clip.x/this._clip.height*r.height,u=this._clip.y/this._clip.height*r.height):(l=this._clip.x/this._clip.width*r.width,u=this._clip.y/this._clip.width*r.width)),r.getAspectRatio()>a){var f=r.height/d,h=0;o.isHorizontallyCentered?h=(r.width-r.height*a)/2:o.isRight&&(h=r.width-r.height*a),this.setPosition(new n.Point(r.x-l+h,r.y-u),s),this.setHeight(f,s)}else{var p=r.width/c,m=0;o.isVerticallyCentered?m=(r.height-r.width/a)/2:o.isBottom&&(m=r.height-r.width/a),this.setPosition(new n.Point(r.x-l,r.y-u+m),s),this.setWidth(p,s)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(r){n.console.assert(!r||r instanceof n.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),r instanceof n.Rect?this._clip=r.clone():this._clip=null,this._needsUpdate=!0,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return this.flipped},setFlip:function(r){this.flipped=r},get flipped(){return this._flipped},set flipped(r){let i=this._flipped!==!!r;this._flipped=!!r,i&&(this.update(!0),this._needsDraw=!0,this._raiseBoundsChange())},get wrapHorizontal(){return this._wrapHorizontal},set wrapHorizontal(r){let i=this._wrapHorizontal!==!!r;this._wrapHorizontal=!!r,this._initialized&&i&&(this.update(!0),this._needsDraw=!0)},get wrapVertical(){return this._wrapVertical},set wrapVertical(r){let i=this._wrapVertical!==!!r;this._wrapVertical=!!r,this._initialized&&i&&(this.update(!0),this._needsDraw=!0)},get debugMode(){return this._debugMode},set debugMode(r){this._debugMode=!!r,this._needsDraw=!0},getOpacity:function(){return this.opacity},setOpacity:function(r){this.opacity=r},get opacity(){return this._opacity},set opacity(r){r!==this.opacity&&(this._opacity=r,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(r){this._preload=!!r,this._needsDraw=!0},getRotation:function(r){return r?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(r,i){this._degreesSpring.target.value===r&&this._degreesSpring.isAtTargetValue()||(i?this._degreesSpring.resetTo(r):this._degreesSpring.springTo(r),this._needsDraw=!0,this._needsUpdate=!0,this._raiseBoundsChange())},getDrawArea:function(){if(this._opacity===0&&!this._preload)return!1;var r=this._viewportToTiledImageRectangle(this.viewport.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var i=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));r=r.intersection(i)}return r},getTilesToDraw:function(){let r=this._tilesToDraw.flat();return this._updateTilesInViewport(r),r=this._tilesToDraw.flat(),r.forEach(i=>{i.tile.beingDrawn=!0}),this._lastDrawn=r,r},_getRotationPoint:function(r){return this.getBoundsNoRotate(r).getCenter()},get compositeOperation(){return this._compositeOperation},set compositeOperation(r){r!==this._compositeOperation&&(this._compositeOperation=r,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this._compositeOperation}))},getCompositeOperation:function(){return this._compositeOperation},setCompositeOperation:function(r){this.compositeOperation=r},setAjaxHeaders:function(r,i){if(r===null&&(r={}),!n.isPlainObject(r)){console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}this._ownAjaxHeaders=r,this._updateAjaxHeaders(i)},_updateAjaxHeaders:function(r){if(r===void 0&&(r=!0),n.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=n.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,r){var i,s,o,a;for(var l in this.tilesMatrix){i=this.source.getNumTiles(l);for(var u in this.tilesMatrix[l]){s=(i.x+u%i.x)%i.x;for(var c in this.tilesMatrix[l][u])if(o=(i.y+c%i.y)%i.y,a=this.tilesMatrix[l][u][c],a.loadWithAjax=this.loadTilesWithAjax,a.loadWithAjax){var d=this.source.getTileAjaxHeaders(l,s,o);a.ajaxHeaders=n.extend({},this.ajaxHeaders,d)}else a.ajaxHeaders=null}}for(var f=0;f<this._imageLoader.jobQueue.length;f++){var h=this._imageLoader.jobQueue[f];h.loadWithAjax=h.tile.loadWithAjax,h.ajaxHeaders=h.tile.loadWithAjax?h.tile.ajaxHeaders:null}}},_setScale:function(r,i){var s=this._scaleSpring.target.value===r;if(i){if(s&&this._scaleSpring.current.value===r)return;this._scaleSpring.resetTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}else{if(s)return;this._scaleSpring.springTo(r),this._updateForScale(),this._needsDraw=!0,this._needsUpdate=!0}s||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var r=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),i=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,s=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(i/this.minPixelRatio)/Math.log(2))));return s=Math.max(s,this.source.minLevel||0),r=Math.min(r,s),{lowestLevel:r,highestLevel:s}},_updateLevelsForViewport:function(){var r=this._getLevelsInterval(),i=r.lowestLevel,s=r.highestLevel,o=[],a=this.getDrawArea(),l=n.now();if(this._lastDrawn.forEach(x=>{x.tile.beingDrawn=!1}),this._tilesToDraw=[],this._tilesLoading=0,this.loadingCoverage={},!a)return this._needsDraw=!1,this._fullyLoaded;var u=new Array(s-i+1);for(let x=0,S=s;S>=i;S--,x++)u[x]=S;for(let x=s+1;x<=this.source.maxLevel;x++){var c=this.tilesMatrix[x]&&this.tilesMatrix[x][0]&&this.tilesMatrix[x][0][0];if(c&&c.isBottomMost&&c.isRightMost&&c.loaded){u.push(x);break}}let d=!1;for(let x=0;x<u.length;x++){let S=u[x];var f=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(S),!0).x*this._scaleSpring.current.value;if(x===u.length-1||f>=this.minPixelRatio)d=!0;else if(!d)continue;var h=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(S),!1).x*this._scaleSpring.current.value,p=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,m=this.immediateRender?1:p,g=Math.min(1,(f-.5)/.5),v=m/Math.abs(m-h),w=this._updateLevel(S,g,v,a,l,o);o=w.bestTiles;var b=w.updatedTiles.filter(I=>I.loaded),_=function(I,P,R){return function(O){return{tile:O,level:I,levelOpacity:P,currentTime:R}}}(S,g,l);if(this._tilesToDraw[S]=b.map(_),this._providesCoverage(this.coverage,S))break}return o&&o.length>0?(o.forEach(function(x){x&&!x.context2D&&this._loadTile(x,l)},this),this._needsDraw=!0,!1):this._tilesLoading===0},_updateTilesInViewport:function(r){let i=n.now(),s=this;this._tilesLoading=0,this._wasBlending=this._isBlending,this._isBlending=!1,this.loadingCoverage={};let o=r.length?r[0].level:0;if(!this.getDrawArea())return;function l(c){let d=c.tile;if(d&&d.loaded){let f=s._blendTile(d,d.x,d.y,c.level,c.levelOpacity,i,o);s._isBlending=s._isBlending||f,s._needsDraw=s._needsDraw||f||s._wasBlending}}let u=0;for(let c=0;c<r.length;c++){let d=r[c];l(d),this._providesCoverage(this.coverage,d.level)&&(u=Math.max(u,d.level))}if(u>0)for(let c in this._tilesToDraw)c<u&&delete this._tilesToDraw[c]},_blendTile:function(r,i,s,o,a,l,u){let c=1e3*this.blendTime,d,f;return r.blendStart||(r.blendStart=l),d=l-r.blendStart,f=c?Math.min(1,d/c):1,o===u&&(f=1,d=c),this.alwaysBlend&&(f*=a),r.opacity=f,f===1&&(this._setCoverage(this.coverage,o,i,s,!0),this._hasOpaqueTile=!0),d<c},_updateLevel:function(r,i,s,o,a,l){var u=o.getBoundingBox().getTopLeft(),c=o.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:!0,level:r,opacity:i,visibility:s,drawArea:o,topleft:u,bottomright:c,currenttime:a,best:l}),this._resetCoverage(this.coverage,r),this._resetCoverage(this.loadingCoverage,r);var d=this._getCornerTiles(r,u,c),f=d.topLeft,h=d.bottomRight,p=this.source.getNumTiles(r),m=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(h.x+=1,this.wrapHorizontal||(h.x=Math.min(h.x,p.x-1)));for(var g=Math.max(0,(h.x-f.x)*(h.y-f.y)),v=new Array(g),w=0,b=f.x;b<=h.x;b++)for(var _=f.y;_<=h.y;_++){var x;if(this.getFlip()){var S=(p.x+b%p.x)%p.x;x=b+p.x-S-S-1}else x=b;if(o.intersection(this.getTileBounds(r,x,_))!==null){var I=this._updateTile(x,_,r,s,m,p,a,l);l=I.bestTiles,v[w]=I.tile,w+=1}}return{bestTiles:l,updatedTiles:v}},_positionTile:function(r,i,s,o,a){var l=r.bounds.getTopLeft();l.x*=this._scaleSpring.current.value,l.y*=this._scaleSpring.current.value,l.x+=this._xSpring.current.value,l.y+=this._ySpring.current.value;var u=r.bounds.getSize();u.x*=this._scaleSpring.current.value,u.y*=this._scaleSpring.current.value,r.positionedBounds.x=l.x,r.positionedBounds.y=l.y,r.positionedBounds.width=u.x,r.positionedBounds.height=u.y;var c=s.pixelFromPointNoRotate(l,!0),d=s.pixelFromPointNoRotate(l,!1),f=s.deltaPixelsFromPointsNoRotate(u,!0),h=s.deltaPixelsFromPointsNoRotate(u,!1),p=d.plus(h.divide(2)),m=o.squaredDistanceTo(p);this.viewer.drawer.minimumOverlapRequired(this)&&(i||(f=f.plus(new n.Point(1,1))),r.isRightMost&&this.wrapHorizontal&&(f.x+=.75),r.isBottomMost&&this.wrapVertical&&(f.y+=.75)),r.position=c,r.size=f,r.squaredDistance=m,r.visibility=a},_updateTile:function(r,i,s,o,a,l,u,c){var d=this._getTile(r,i,s,u,l);this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:d}),this._setCoverage(this.coverage,s,r,i,!1);var f=d.loaded||d.loading||this._isCovered(this.loadingCoverage,s,r,i);if(this._setCoverage(this.loadingCoverage,s,r,i,f),!d.exists)return{bestTiles:c,tile:d};if(d.loaded&&d.opacity===1&&this._setCoverage(this.coverage,s,r,i,!0),this._positionTile(d,this.source.tileOverlap,this.viewport,a,o),!d.loaded)if(d.context2D)this._setTileLoaded(d);else{var h=this._tileCache.getImageRecord(d.cacheKey);h&&this._setTileLoaded(d,h.getData())}return d.loading?this._tilesLoading++:f||(c=this._compareTiles(c,d,this.maxTilesPerFrame)),{bestTiles:c,tile:d}},_getCornerTiles:function(r,i,s){var o,a;this.wrapHorizontal?(o=n.positiveModulo(i.x,1),a=n.positiveModulo(s.x,1)):(o=Math.max(0,i.x),a=Math.min(1,s.x));var l,u,c=1/this.source.aspectRatio;this.wrapVertical?(l=n.positiveModulo(i.y,c),u=n.positiveModulo(s.y,c)):(l=Math.max(0,i.y),u=Math.min(c,s.y));var d=this.source.getTileAtPoint(r,new n.Point(o,l)),f=this.source.getTileAtPoint(r,new n.Point(a,u)),h=this.source.getNumTiles(r);return this.wrapHorizontal&&(d.x+=h.x*Math.floor(i.x),f.x+=h.x*Math.floor(s.x)),this.wrapVertical&&(d.y+=h.y*Math.floor(i.y/c),f.y+=h.y*Math.floor(s.y/c)),{topLeft:d,bottomRight:f}},_getTile:function(r,i,s,o,a){var l,u,c,d,f,h,p,m,g,v,w=this.tilesMatrix,b=this.source;return w[s]||(w[s]={}),w[s][r]||(w[s][r]={}),(!w[s][r][i]||!w[s][r][i].flipped!=!this.flipped)&&(l=(a.x+r%a.x)%a.x,u=(a.y+i%a.y)%a.y,c=this.getTileBounds(s,r,i),d=b.getTileBounds(s,l,u,!0),f=b.tileExists(s,l,u),h=b.getTileUrl(s,l,u),p=b.getTilePostData(s,l,u),this.loadTilesWithAjax?(m=b.getTileAjaxHeaders(s,l,u),n.isPlainObject(this.ajaxHeaders)&&(m=n.extend({},this.ajaxHeaders,m))):m=null,g=b.getContext2D?b.getContext2D(s,l,u):void 0,v=new n.Tile(s,r,i,c,f,h,g,this.loadTilesWithAjax,m,d,p,b.getTileHashKey(s,l,u,h,m,p)),this.getFlip()?l===0&&(v.isRightMost=!0):l===a.x-1&&(v.isRightMost=!0),u===a.y-1&&(v.isBottomMost=!0),v.flipped=this.flipped,w[s][r][i]=v),v=w[s][r][i],v.lastTouchTime=o,v},_loadTile:function(r,i){var s=this;r.loading=!0,this._imageLoader.addJob({src:r.getUrl(),tile:r,source:this.source,postData:r.postData,loadWithAjax:r.loadWithAjax,ajaxHeaders:r.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(o,a,l){s._onTileLoad(r,i,o,a,l)},abort:function(){r.loading=!1}})},_onTileLoad:function(r,i,s,o,a){if(s)r.exists=!0;else{n.console.error("Tile %s failed to load: %s - error: %s",r,r.getUrl(),o),this.viewer.raiseEvent("tile-load-failed",{tile:r,tiledImage:this,time:i,message:o,tileRequest:a}),r.loading=!1,r.exists=!1;return}if(i<this.lastResetTime){n.console.warn("Ignoring tile %s loaded before reset: %s",r,r.getUrl()),r.loading=!1;return}var l=this,u=function(){var c=l.source,d=c.getClosestLevel();l._setTileLoaded(r,s,d,a)};u()},_setTileLoaded:function(r,i,s,o){var a=0,l=!1,u=this;function c(){return l&&n.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),a++,d}function d(){a--,a===0&&(r.loading=!1,r.loaded=!0,r.hasTransparency=u.source.hasTransparency(r.context2D,r.getUrl(),r.ajaxHeaders,r.postData),r.context2D||u._tileCache.cacheTile({data:i,tile:r,cutoff:s,tiledImage:u}),u.viewer.raiseEvent("tile-ready",{tile:r,tiledImage:u,tileRequest:o}),u._needsDraw=!0)}var f=c();this.viewer.raiseEvent("tile-loaded",{tile:r,tiledImage:this,tileRequest:o,get image(){return n.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),i},data:i,getCompletionCallback:c}),l=!0,f()},_compareTiles:function(r,i,s){return r?(r.push(i),this._sortTiles(r),r.length>s&&r.pop(),r):[i]},_sortTiles:function(r){r.sort(function(i,s){return i===null?1:s===null?-1:i.visibility===s.visibility?i.squaredDistance-s.squaredDistance:s.visibility-i.visibility})},_providesCoverage:function(r,i,s,o){var a,l,u,c;if(!r[i])return!1;if(s===void 0||o===void 0){a=r[i];for(u in a)if(Object.prototype.hasOwnProperty.call(a,u)){l=a[u];for(c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&!l[c])return!1}return!0}return r[i][s]===void 0||r[i][s][o]===void 0||r[i][s][o]===!0},_isCovered:function(r,i,s,o){return s===void 0||o===void 0?this._providesCoverage(r,i+1):this._providesCoverage(r,i+1,2*s,2*o)&&this._providesCoverage(r,i+1,2*s,2*o+1)&&this._providesCoverage(r,i+1,2*s+1,2*o)&&this._providesCoverage(r,i+1,2*s+1,2*o+1)},_setCoverage:function(r,i,s,o,a){if(!r[i]){n.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",i);return}r[i][s]||(r[i][s]={}),r[i][s][o]=a},_resetCoverage:function(r,i){r[i]={}}})}(t),function(n){var r=function(s){n.console.assert(s,"[TileCache.cacheTile] options is required"),n.console.assert(s.tile,"[TileCache.cacheTile] options.tile is required"),n.console.assert(s.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=s.tile,this.tiledImage=s.tiledImage},i=function(s){n.console.assert(s,"[ImageRecord] options is required"),n.console.assert(s.data,"[ImageRecord] options.data is required"),this._tiles=[],s.create.apply(null,[this,s.data,s.ownerTile]),this._destroyImplementation=s.destroy.bind(null,this),this.getImage=s.getImage.bind(null,this),this.getData=s.getData.bind(null,this),this.getRenderedContext=s.getRenderedContext.bind(null,this)};i.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(s){n.console.assert(s,"[ImageRecord.addTile] tile is required"),this._tiles.push(s)},removeTile:function(s){for(var o=0;o<this._tiles.length;o++)if(this._tiles[o]===s){this._tiles.splice(o,1);return}n.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",s)},getTileCount:function(){return this._tiles.length}},n.TileCache=function(s){s=s||{},this._maxImageCacheCount=s.maxImageCacheCount||n.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},n.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(s){n.console.assert(s,"[TileCache.cacheTile] options is required"),n.console.assert(s.tile,"[TileCache.cacheTile] options.tile is required"),n.console.assert(s.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),n.console.assert(s.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var o=s.cutoff||0,a=this._tilesLoaded.length,l=this._imagesLoaded[s.tile.cacheKey];if(l||(s.data||(n.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),s.data=s.image),n.console.assert(s.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),l=this._imagesLoaded[s.tile.cacheKey]=new i({data:s.data,ownerTile:s.tile,create:s.tiledImage.source.createTileCache,destroy:s.tiledImage.source.destroyTileCache,getImage:s.tiledImage.source.getTileCacheDataAsImage,getData:s.tiledImage.source.getTileCacheData,getRenderedContext:s.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),l.addTile(s.tile),s.tile.cacheImageRecord=l,this._imagesLoadedCount>this._maxImageCacheCount){for(var u=null,c=-1,d=null,f,h,p,m,g,v,w=this._tilesLoaded.length-1;w>=0;w--)if(v=this._tilesLoaded[w],f=v.tile,!(f.level<=o||f.beingDrawn)){if(!u){u=f,c=w,d=v;continue}m=f.lastTouchTime,h=u.lastTouchTime,g=f.level,p=u.level,(m<h||m===h&&g>p)&&(u=f,c=w,d=v)}u&&c>=0&&(this._unloadTile(d),a=c)}this._tilesLoaded[a]=new r({tile:s.tile,tiledImage:s.tiledImage})},clearTilesFor:function(s){n.console.assert(s,"[TileCache.clearTilesFor] tiledImage is required");for(var o,a=0;a<this._tilesLoaded.length;++a)o=this._tilesLoaded[a],o.tiledImage===s&&(this._unloadTile(o),this._tilesLoaded.splice(a,1),a--)},getImageRecord:function(s){return n.console.assert(s,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[s]},_unloadTile:function(s){n.console.assert(s,"[TileCache._unloadTile] tileRecord is required");var o=s.tile,a=s.tiledImage;let l=o.getCanvasContext&&o.getCanvasContext();o.unload(),o.cacheImageRecord=null;var u=this._imagesLoaded[o.cacheKey];u&&(u.removeTile(o),u.getTileCount()||(u.destroy(),delete this._imagesLoaded[o.cacheKey],this._imagesLoadedCount--,l&&(l.canvas.width=0,l.canvas.height=0,a.viewer.raiseEvent("image-unloaded",{context2D:l,tile:o}))),a.viewer.raiseEvent("tile-unloaded",{tile:o,tiledImage:a}))}}}(t),function(n){n.World=function(r){var i=this;n.console.assert(r.viewer,"[World] options.viewer is required"),n.EventSource.call(this),this.viewer=r.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(s){i._autoRefigureSizes?i._figureSizes():i._needsSizesFigured=!0},this._figureSizes()},n.extend(n.World.prototype,n.EventSource.prototype,{addItem:function(r,i){if(n.console.assert(r,"[World.addItem] item is required"),n.console.assert(r instanceof n.TiledImage,"[World.addItem] only TiledImages supported at this time"),i=i||{},i.index!==void 0){var s=Math.max(0,Math.min(this._items.length,i.index));this._items.splice(s,0,r)}else this._items.push(r);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,r.addHandler("bounds-change",this._delegatedFigureSizes),r.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:r})},getItemAt:function(r){return n.console.assert(r!==void 0,"[World.getItemAt] index is required"),this._items[r]},getIndexOfItem:function(r){return n.console.assert(r,"[World.getIndexOfItem] item is required"),n.indexOf(this._items,r)},getItemCount:function(){return this._items.length},setItemIndex:function(r,i){n.console.assert(r,"[World.setItemIndex] item is required"),n.console.assert(i!==void 0,"[World.setItemIndex] index is required");var s=this.getIndexOfItem(r);if(i>=this._items.length)throw new Error("Index bigger than number of layers.");i===s||s===-1||(this._items.splice(s,1),this._items.splice(i,0,r),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:r,previousIndex:s,newIndex:i}))},removeItem:function(r){n.console.assert(r,"[World.removeItem] item is required");var i=n.indexOf(this._items,r);i!==-1&&(r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(r))},removeAll:function(){this.viewer._cancelPendingImages();var r,i;for(i=0;i<this._items.length;i++)r=this._items[i],r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy();var s=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,i=0;i<s.length;i++)r=s[i],this._raiseRemoveItem(r)},resetItems:function(){for(var r=0;r<this._items.length;r++)this._items[r].reset()},update:function(r){for(var i=!1,s=0;s<this._items.length;s++)i=this._items[s].update(r)||i;return i},draw:function(){this.viewer.drawer.draw(this._items),this._needsDraw=!1,this._items.forEach(r=>{this._needsDraw=r.setDrawn()||this._needsDraw})},needsDraw:function(){for(var r=0;r<this._items.length;r++)if(this._items[r].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(r){this._autoRefigureSizes=r,r&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(r){r=r||{};var i=r.immediately||!1,s=r.layout||n.DEFAULT_SETTINGS.collectionLayout,o=r.rows||n.DEFAULT_SETTINGS.collectionRows,a=r.columns||n.DEFAULT_SETTINGS.collectionColumns,l=r.tileSize||n.DEFAULT_SETTINGS.collectionTileSize,u=r.tileMargin||n.DEFAULT_SETTINGS.collectionTileMargin,c=l+u,d;!r.rows&&a?d=a:d=Math.ceil(this._items.length/o);var f=0,h=0,p,m,g,v,w;this.setAutoRefigureSizes(!1);for(var b=0;b<this._items.length;b++)b&&b%d===0&&(s==="horizontal"?(h+=c,f=0):(f+=c,h=0)),p=this._items[b],m=p.getBounds(),m.width>m.height?g=l:g=l*(m.width/m.height),v=g*(m.height/m.width),w=new n.Point(f+(l-g)/2,h+(l-v)/2),p.setPosition(w,i),p.setWidth(g,i),s==="horizontal"?f+=c:h+=c;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var r=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,s=this._contentFactor||0;if(!this._items.length)this._homeBounds=new n.Rect(0,0,1,1),this._contentSize=new n.Point(1,1),this._contentFactor=1;else{var o=this._items[0],a=o.getBounds();this._contentFactor=o.getContentSize().x/a.width;for(var l=o.getClippedBounds().getBoundingBox(),u=l.x,c=l.y,d=l.x+l.width,f=l.y+l.height,h=1;h<this._items.length;h++)o=this._items[h],a=o.getBounds(),this._contentFactor=Math.max(this._contentFactor,o.getContentSize().x/a.width),l=o.getClippedBounds().getBoundingBox(),u=Math.min(u,l.x),c=Math.min(c,l.y),d=Math.max(d,l.x+l.width),f=Math.max(f,l.y+l.height);this._homeBounds=new n.Rect(u,c,d-u,f-c),this._contentSize=new n.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==s||!this._homeBounds.equals(r)||!this._contentSize.equals(i))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(r){this.raiseEvent("remove-item",{item:r})}})}(t)}(gy)),gy.exports}jEe();const UEe={class:"flex fixed bottom-0 w-full bg-white justify-center sm:justify-end"},WEe={class:"flex items-center space-x-3 mx-2 rounded-2xl backdrop-blur-sm bg-white/70"},qEe={class:"text-sm text-gray-700"},CW=ee({__name:"ArtworkNavigationBar",props:{ovr:{},inventory:{}},setup(e){const t=e,n=Aa(),r=i=>{i.key==="ArrowLeft"&&t.inventory.previousInventoryId?n.replace({name:"ovr-view-artwork",params:{id:t.ovr.id,slug:t.ovr.slug,inventory_id:t.inventory.previousInventoryId}}):i.key==="ArrowRight"&&t.inventory.nextInventoryId&&n.replace({name:"ovr-view-artwork",params:{id:t.ovr.id,slug:t.ovr.slug,inventory_id:t.inventory.nextInventoryId}})};return nt(()=>{window.addEventListener("keydown",r)}),On(()=>{window.removeEventListener("keydown",r)}),(i,s)=>{var a,l,u;const o=En("RouterLink");return k(),W("footer",UEe,[A("div",WEe,[(a=i.inventory)!=null&&a.previousInventoryId?(k(),X(o,{key:0,to:{name:"ovr-view-artwork",params:{id:i.ovr.id,slug:i.ovr.slug,inventory_id:i.inventory.previousInventoryId}},class:"px-3 py-2",replace:""},{default:H(()=>[$(y(Gve),{class:"h-6 w-6 text-gray-700 hover:text-gray-900 cursor-pointer"})]),_:1},8,["to"])):fe("",!0),A("p",qEe,ye(i.inventory.currentItemIndex)+" of "+ye((l=i.ovr.inventory_set)==null?void 0:l.item_count),1),(u=i.inventory)!=null&&u.nextInventoryId?(k(),X(o,{key:1,to:{name:"ovr-view-artwork",params:{id:i.ovr.id,slug:i.ovr.slug,inventory_id:i.inventory.nextInventoryId}},class:"px-3 py-2",replace:""},{default:H(()=>[$(y(MN),{class:"h-6 w-6 text-gray-700 hover:text-gray-900 cursor-pointer"})]),_:1},8,["to"])):(k(),X(y(MN),{key:2,class:"h-6 w-6 text-white px-3 py-2"}))])])}}}),GEe={key:1,class:"w-full mx-auto py-4 bg-white"},KEe={class:"flex gap-4"},YEe={class:"w-1/2"},XEe={key:0,class:"text-red-500 text-sm"},JEe={class:"w-1/2"},QEe={key:0,class:"text-red-500 text-sm"},ZEe={class:"space-y-2"},eTe={key:0,class:"text-red-500 text-sm"},tTe={class:"space-y-2"},nTe={key:0,class:"space-y-2"},rTe={class:"block text-gray-600 text-sm"},iTe=["placeholder"],sTe={class:"ml-auto flex gap-10 items-center"},oTe=["disabled"],aTe={class:"flex items-center space-x-3"},lTe=["disabled"],uTe={key:2,class:"max-w-xl mx-auto text-center py-10 bg-white"},cTe={key:0,class:"text-gray-600 mb-6"},dTe={class:"italic"},fTe={class:"flex justify-center space-x-4"},vy=ee({__name:"InquireDrawer",props:{ovr:{},inventory:{}},setup(e){const t=U(""),n=U(""),r=U(""),i=U(""),s=U(`I am interested in purchasing ${e.inventory.title}. Could you please provide more information?`),o=U({}),a=U(!1),l=U(!1),u=te(()=>{var m,g,v;return((v=(g=(m=e.ovr)==null?void 0:m.settings)==null?void 0:g.layout)==null?void 0:v.inquire_btn)||{}}),c=te(()=>{const m={"background-color":u.value.bg_color,color:u.value.text_color},g={"background-color":u.value.bg_color,"border-color":u.value.outline_color,color:u.value.text_color,"border-width":"1px"};return u.value.variant==="solid"?m:g}),d=m=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(m).toLowerCase()),f=()=>{o.value={};let m=!0;return t.value.trim()||(o.value.firstName="First name is required",m=!1),n.value.trim()||(o.value.lastName="Last name is required",m=!1),r.value.trim()?d(r.value)||(o.value.email="Email is not valid",m=!1):(o.value.email="Email is required",m=!1),m},h=()=>{var m,g;if(l.value=!0,f()){a.value=!1;const v={email:r.value,inventorySetUrl:(g=(m=e.ovr)==null?void 0:m.inventory_set)==null?void 0:g.public_url,inventoryId:e.inventory.id,firstName:t.value,lastName:n.value,phone:i.value,note:s.value,submitted:!0,sessionId:sessionStorage.getItem("session_id")||null};Rn.post("https://api.arternal.com/roominquiry",v).then(()=>{a.value=!0,p()}).catch(w=>{a.value=!1,console.error("Error submitting inquiry",w)}).finally(()=>{l.value=!1})}else console.log("Form is invalid"),l.value=!1},p=()=>{t.value="",n.value="",r.value="",i.value="",s.value="",o.value={}};return(m,g)=>(k(),X(y(cR),null,{default:H(()=>[$(y(kbe),{class:"bg-gray-800 hover:bg-gray-600 hover:opacity-80 transition-all ease-in-out text-white px-5 py-2 rounded uppercase",style:xn(c.value)},{default:H(()=>g[5]||(g[5]=[Ye(" Inquire ")])),_:1},8,["style"]),$(y(dR),{class:"p-6 w-11/12 sm:max-w-xl overflow-auto max-h-[90vh]"},{default:H(()=>{var v;return[a.value?fe("",!0):(k(),X(y(fR),{key:0},{default:H(()=>[$(y(hR),null,{default:H(()=>[Ye("Submit an inquiry for "+ye(m.inventory.title),1)]),_:1}),$(y(d4),null,{default:H(()=>[Ye(" Enter your details below to allow us to contact you about "+ye(m.inventory.title)+" as soon as possible. ",1)]),_:1})]),_:1})),a.value?(k(),W("div",uTe,[g[14]||(g[14]=A("h4",{class:"text-2xl font-semibold mb-4"},"Thank you for your inquiry",-1)),m.ovr.organization?(k(),W("p",cTe,[g[11]||(g[11]=Ye(" Your inquiry has been received by ")),A("span",dTe,ye(m.ovr.organization.name),1),g[12]||(g[12]=Ye(" and we will get back to you soon. "))])):fe("",!0),A("div",fTe,[$(y(GN),null,{default:H(()=>g[13]||(g[13]=[A("button",{type:"button",class:"border border-gray-400 text-gray-600 px-4 py-2 rounded-md hover:bg-gray-100"}," Close ",-1)])),_:1})])])):(k(),W("div",GEe,[A("form",{onSubmit:lt(h,["prevent"]),class:"space-y-4"},[A("div",KEe,[A("div",YEe,[g[6]||(g[6]=A("label",{class:"block text-gray-600 text-sm"},"First Name",-1)),At(A("input",{"onUpdate:modelValue":g[0]||(g[0]=w=>t.value=w),type:"text",placeholder:"First Name",class:Le(["w-full mt-1 p-2 border rounded-md",{"border-red-500":o.value.firstName}]),required:""},null,2),[[pi,t.value]]),o.value.firstName?(k(),W("span",XEe,ye(o.value.firstName),1)):fe("",!0)]),A("div",JEe,[g[7]||(g[7]=A("label",{class:"block ext-gray-600 text-sm"},"Last Name",-1)),At(A("input",{"onUpdate:modelValue":g[1]||(g[1]=w=>n.value=w),type:"text",placeholder:"Last Name",class:Le(["w-full mt-1 p-2 border rounded-md",{"border-red-500":o.value.lastName}]),required:""},null,2),[[pi,n.value]]),o.value.lastName?(k(),W("span",QEe,ye(o.value.lastName),1)):fe("",!0)])]),A("div",ZEe,[g[8]||(g[8]=A("label",{class:"block text-gray-600 text-sm"},"Email",-1)),At(A("input",{"onUpdate:modelValue":g[2]||(g[2]=w=>r.value=w),type:"email",placeholder:"Email address",class:Le(["w-full mt-1 p-2 border rounded-md",{"border-red-500":o.value.email}]),required:""},null,2),[[pi,r.value]]),o.value.email?(k(),W("span",eTe,ye(o.value.email),1)):fe("",!0)]),A("div",tTe,[g[9]||(g[9]=A("label",{class:"block text-gray-600 text-sm"},"Phone Number (optional)",-1)),At(A("input",{"onUpdate:modelValue":g[3]||(g[3]=w=>i.value=w),type:"tel",placeholder:"Phone number",class:"w-full mt-1 p-2 border rounded-md text-"},null,512),[[pi,i.value]])]),(v=m.ovr)!=null&&v.organization?(k(),W("div",nTe,[A("label",rTe,"Note to "+ye(m.ovr.organization.name)+" (optional)",1),At(A("textarea",{"onUpdate:modelValue":g[4]||(g[4]=w=>s.value=w),placeholder:`I am interested in purchasing ${m.inventory.title}. Could you please provide more information?`,class:"w-full mt-1 p-2 h-48 border rounded-md text-sm",rows:"4"},null,8,iTe),[[pi,s.value]])])):fe("",!0),$(y(Tbe),null,{default:H(()=>[A("div",sTe,[$(y(GN),null,{default:H(()=>[A("button",{type:"button",onClick:p,class:"text-gray-600 hover:text-gray-800"}," Cancel ")]),_:1}),A("button",{type:"submit",class:"bg-gray-800 hover:bg-black transition-all ease-in-out px-5 py-2 rounded text-white",disabled:l.value},[A("div",aTe,[l.value?(k(),W("div",{key:0,disabled:l.value,class:"w-4 h-4 border-t-2 border-b-2 border-gray-200 rounded-full animate-spin mr-2"},null,8,lTe)):fe("",!0),g[10]||(g[10]=Ye(" Submit "))])],8,oTe)])]),_:1})],32)]))]}),_:1})]),_:1}))}}),IR=z5("fonts",{state:()=>({fonts:[],fontsLoaded:!1}),actions:{getFontsList(){return this.fonts},setFonts(e){this.fonts=e},setFontLoadedStatus(e){this.fontsLoaded=e}}}),hTe={class:"flex-auto"},pTe={key:0,class:"mt-1 absolute w-full bg-white border rounded-md shadow overflow-auto z-10 max-h-96"},mTe={class:"border-b border-gray-300 p-2 bg-white sticky top-0"},gTe={key:0},vTe=["onClick"],yTe={key:1},bTe=ee({__name:"FontSelectionInput",props:{modelValue:{},buttonClasses:{default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,s=[...IR().getFontsList().map(m=>m.family),"Inter","Roboto","Open Sans","Lato","Montserrat","Oswald","Raleway","Poppins","Source Sans Pro","Playfair Display","Merriweather","Plus Jakarta Sans","Ubuntu","Noto Sans","Rubik","Work Sans","Nunito","Quicksand","Outfit","Bebas Neue","Josefin Sans","Comfortaa","Libre Baskerville","Vollkorn","Anton","Fira Sans","DM Sans","Bitter","Inconsolata","DM Serif Display","PT Serif","Lora","Abril Fatface","Cormorant Garamond","Varela Round","Zilla Slab","Karla","Urbanist","Crimson Text","Spectral","Space Grotesk","Asap","Catamaran","Muli","Manrope","Questrial","Yanone Kaffeesatz","Slabo","Geist"].sort(),o=U(s),a=U(null),l=U(!1),u=U(""),c=U(n.modelValue),d=U(null);LB(()=>{setTimeout(()=>{d.value&&d.value.focus()},50)}),bU(a,()=>{l.value=!1});function f(){u.value!==""&&(o.value=s.filter(m=>m!==c.value&&m.toLowerCase().includes(u.value.toLowerCase())))}function h(m){c.value=m,r("update:modelValue",c.value),l.value=!1}const p=()=>{u.value="",l.value=!l.value,o.value=s.filter(m=>m!==c.value)};return(m,g)=>(k(),W("div",{ref_key:"target",ref:a,class:"relative w-full max-w-md"},[A("button",{type:"button",class:Le(y(st)("flex items-center space-x-3 px-3 py-2 border border-slate-300 rounded-md w-full hover:bg-slate-100 transition-all",n.buttonClasses,l.value?"bg-slate-100":"")),onClick:p},[A("span",hTe,ye(c.value||"Select Font..."),1),$(y(pW),{class:"h-5 w-5 shrink-0 opacity-50"})],2),$(is,{"enter-active-class":"duration-200 ease-out","enter-from-class":"opacity-0 translate-y-5","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-5"},{default:H(()=>[l.value?(k(),W("div",pTe,[A("div",mTe,[At(A("input",{ref_key:"searchInput",ref:d,"onUpdate:modelValue":g[0]||(g[0]=v=>u.value=v),type:"text",placeholder:"Search...",class:"w-full focus:outline-none border-0",onInput:f},null,544),[[pi,u.value]])]),y(s).length?(k(),W("ul",gTe,[(k(!0),W(je,null,Ot(o.value.slice(0,y(s).length),(v,w)=>(k(),W("li",{key:w,class:"flex items-start px-3 py-2 hover:bg-gray-100 cursor-pointer text-[14px]",onClick:b=>h(v)},ye(v),9,vTe))),128))])):(k(),W("div",yTe,g[1]||(g[1]=[A("p",{class:"p-3 text-center text-gray-500"},"No fonts found",-1)])))])):fe("",!0)]),_:1})],512))}}),mx=Ei(bTe,[["__scopeId","data-v-6dc3fe3b"]]),wTe={class:"text-base font-semibold flex-auto text-left"},_Te={class:"ml-auto"},STe=ee({__name:"InventoryCard",props:{inventory:{},title:{}},setup(e){const[t,n]=QO(!1),r=U("overflow-hidden"),i=async()=>{t.value?r.value="overflow-hidden":setTimeout(()=>{r.value="overflow-visible"},250),await vt(),n()};return(s,o)=>(k(),W("div",null,[A("button",{type:"button",class:"relative px-2 flex items-center space-x-3 w-full py-4 border-b",onClick:i},[A("h2",wTe,ye(s.title),1),A("div",_Te,[$(y(ZO),{class:Le(["w-5 h-5 transition-transform duration-250 ease-linear",y(t)?"rotate-180":"rotate-0"])},null,8,["class"])])]),$(is,{name:"collapse","enter-active-class":"transition-[max-height] duration-250 ease-linear","enter-from-class":"max-h-0","enter-to-class":"max-h-screen","leave-active-class":"transition-[max-height] duration-250 ease-linear","leave-from-class":"max-h-screen","leave-to-class":"max-h-0"},{default:H(()=>[y(t)?(k(),W("div",{key:0,class:Le(r.value)},[ce(s.$slots,"default",Pt(Ft(s.inventory)))],2)):fe("",!0)]),_:3})]))}}),xTe=[{id:"provenance",key:"provenance",title:"Provenance",setting:"provenance"},{id:"exhibition_history",key:"exhibition_history",title:"Exhibition History",setting:"exhibition"},{id:"collections",key:"collections",title:"Collections",setting:"collections"},{id:"literature",key:"literature",title:"Literature",setting:"literature"},{id:"publications",key:"publications",title:"Publications",setting:"publications"},{id:"credits",key:null,title:"Credits",setting:"credit_line"}],ETe={key:0,class:"p-4 space-y-2"},TTe={key:0,class:"flex justify-between items-center"},kTe={key:1,class:"flex justify-between items-center"},CTe={key:2,class:"flex justify-between items-center"},OTe={key:1,class:"p-3"},RTe=["innerHTML"],ITe=ee({__name:"InventoryMiscAccordion",props:{inventory:{},ovr:{}},setup(e){const t=te(()=>xTe.filter(r=>{var i,s;return r.id==="credits"?n.value:r.key&&e.inventory[r.key]&&((s=(i=e.ovr)==null?void 0:i.settings)==null?void 0:s.artwork[r.setting])})),n=te(()=>{var r,i;return((i=(r=e.ovr)==null?void 0:r.settings)==null?void 0:i.artwork.credit_line)&&(e.inventory.courtesy||e.inventory.photo_credit||e.inventory.copyright)});return(r,i)=>(k(),W("div",null,[(k(!0),W(je,null,Ot(t.value,s=>(k(),X(y(STe),{key:s.id,inventory:r.inventory,title:s.title},{default:H(()=>[A("div",null,[s.id==="credits"?(k(),W("div",ETe,[r.inventory.courtesy?(k(),W("div",TTe,[i[0]||(i[0]=A("label",{class:"font-bold"}," Courtesy / Credit ",-1)),A("p",null,ye(r.inventory.courtesy),1)])):fe("",!0),r.inventory.photo_credit?(k(),W("div",kTe,[i[1]||(i[1]=A("label",{class:"font-bold"}," Photo Credit ",-1)),A("p",null,ye(r.inventory.photo_credit),1)])):fe("",!0),r.inventory.copyright?(k(),W("div",CTe,[i[2]||(i[2]=A("label",{class:"font-bold"}," Copyright ",-1)),A("p",null,ye(r.inventory.copyright),1)])):fe("",!0)])):s.key&&r.inventory[s.key]?(k(),W("div",OTe,[A("p",{innerHTML:r.inventory[s.key]},null,8,RTe)])):fe("",!0)])]),_:2},1032,["inventory","title"]))),128))]))}});function _r(e){this.content=e}_r.prototype={constructor:_r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),s=r.content.slice();return i==-1?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new _r(s)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new _r(n)},addToStart:function(e,t){return new _r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new _r(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),s=r.find(e);return i.splice(s==-1?i.length:s,0,t,n),new _r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=_r.from(e),e.size?new _r(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=_r.from(e),e.size?new _r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=_r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};_r.from=function(e){if(e instanceof _r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new _r(t)};function OW(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),s=t.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=OW(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function RW(e,t,n,r){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=e.child(--i),a=t.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;u<c&&o.text[o.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let u=RW(o.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Be{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,s){for(let o=0,a=0;a<n;o++){let l=this.content[o],u=a+l.nodeSize;if(u>t&&r(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let s="",o=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<t.content.length;s++)i.push(t.content[s]);return new Be(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let s=0,o=0;o<n;s++){let a=this.content[s],l=o+a.nodeSize;l>t&&((o<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,t-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new Be(r,i)}cutByIndex(t,n){return t==n?Be.empty:t==0&&n==this.content.length?this:new Be(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Be(i,s)}addToStart(t){return new Be([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Be(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return OW(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return RW(this,t,n,r)}findIndex(t,n=-1){if(t==0)return vv(0,t);if(t==this.size)return vv(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=t)return o==t||n>0?vv(r+1,o):vv(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Be.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Be(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Be.empty;let n,r=0;for(let i=0;i<t.length;i++){let s=t[i];r+=s.nodeSize,i&&s.isText&&t[i-1].sameMarkup(s)?(n||(n=t.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new Be(n||t,r)}static from(t){if(!t)return Be.empty;if(t instanceof Be)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Be([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Be.empty=new Be([],0);const gx={index:0,offset:0};function vv(e,t){return gx.index=e,gx.offset=t,gx}function $b(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!$b(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!$b(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let dn=class BT{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let s=t[i];if(this.eq(s))return t;if(this.type.excludes(s.type))n||(n=t.slice(0,i));else{if(s.type.excludes(this.type))return t;!r&&s.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&$b(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return BT.none;if(t instanceof BT)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};dn.none=[];class Hb extends Error{}class Xe{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=AW(this.content,t+this.openStart,n);return r&&new Xe(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Xe(IW(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Xe.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Xe(Be.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new Xe(t,r,i)}}Xe.empty=new Xe(Be.empty,0,0);function IW(e,t,n){let{index:r,offset:i}=e.findIndex(t),s=e.maybeChild(r),{index:o,offset:a}=e.findIndex(n);if(i==t||s.isText){if(a!=n&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(r,s.copy(IW(s.content,t-i-1,n-i-1)))}function AW(e,t,n,r){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return e.cut(0,t).append(n).append(e.cut(t));let a=AW(o.content,t-s-1,n);return a&&e.replaceChild(i,o.copy(a))}function ATe(e,t,n){if(n.openStart>e.depth)throw new Hb("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Hb("Inconsistent open depths");return PW(e,t,n,0)}function PW(e,t,n,r){let i=e.index(r),s=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=PW(e,t,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let o=e.parent,a=o.content;return rc(o,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:o,end:a}=PTe(n,e);return rc(s,DW(e,o,a,t,r))}else return rc(s,Vb(e,t,r))}function MW(e,t){if(!t.type.compatibleContent(e.type))throw new Hb("Cannot join "+t.type.name+" onto "+e.type.name)}function zT(e,t,n){let r=e.node(n);return MW(r,t.node(n)),r}function nc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Rp(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(nc(e.nodeAfter,r),s++));for(let a=s;a<o;a++)nc(i.child(a),r);t&&t.depth==n&&t.textOffset&&nc(t.nodeBefore,r)}function rc(e,t){return e.type.checkContent(t),e.copy(t)}function DW(e,t,n,r,i){let s=e.depth>i&&zT(e,t,i+1),o=r.depth>i&&zT(n,r,i+1),a=[];return Rp(null,e,i,a),s&&o&&t.index(i)==n.index(i)?(MW(s,o),nc(rc(s,DW(e,t,n,r,i+1)),a)):(s&&nc(rc(s,Vb(e,t,i+1)),a),Rp(t,n,i,a),o&&nc(rc(o,Vb(n,r,i+1)),a)),Rp(r,null,i,a),new Be(a)}function Vb(e,t,n){let r=[];if(Rp(null,e,n,r),e.depth>n){let i=zT(e,t,n+1);nc(rc(i,Vb(e,t,n+1)),r)}return Rp(t,null,n,r),new Be(r)}function PTe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let s=n-1;s>=0;s--)i=t.node(s).copy(Be.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class ym{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<t;s++)i+=r.child(s).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return dn.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new jb(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=t;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(r.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new ym(n,r,s)}static resolveCached(t,n){let r=LL.get(t);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else LL.set(t,r=new MTe);let i=r.elts[r.i]=ym.resolve(t,n);return r.i=(r.i+1)%DTe,i}}class MTe{constructor(){this.elts=[],this.i=0}}const DTe=12,LL=new WeakMap;class jb{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const NTe=Object.create(null);let El=class $T{constructor(t,n,r,i=dn.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||Be.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&$b(this.attrs,n||t.defaultAttrs||NTe)&&dn.sameSet(this.marks,r||dn.none)}copy(t=null){return t==this.content?this:new $T(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new $T(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return Xe.empty;let i=this.resolve(t),s=this.resolve(n),o=r?0:i.sharedDepth(n),a=i.start(o),u=i.node(o).content.cut(i.pos-a,s.pos-a);return new Xe(u,i.depth-o,s.depth-o)}replace(t,n,r){return ATe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return ym.resolveCached(this,t)}resolveNoCache(t){return ym.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),NW(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Be.empty,i=0,s=r.childCount){let o=this.contentMatchAt(t).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(t).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=dn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!dn.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=Be.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};El.prototype.text=void 0;class Ub extends El{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):NW(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Ub(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Ub(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function NW(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Tc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new LTe(t,n);if(r.next==null)return Tc.empty;let i=LW(r);r.next&&r.err("Unexpected trailing text");let s=jTe(VTe(i));return UTe(s,r),s}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(t.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(t,r);if(l&&(!n||l.validEnd))return Be.from(a.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:d}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,a.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(t)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+t.indexOf(r.next[o].next);return s}).join(` `)}}Tc.empty=new Tc(!0);class LTe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function LW(e){let t=[];do t.push(FTe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function FTe(e){let t=[];do t.push(BTe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function BTe(e){let t=HTe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=zTe(e,t);else break;return t}function FL(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function zTe(e,t){let n=FL(e),r=n;return e.eat(",")&&(e.next!="}"?r=FL(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $Te(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(t)&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function HTe(e){if(e.eat("(")){let t=LW(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=$Te(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function VTe(e){let t=[[]];return i(s(e,0),n()),t;function n(){return t.push([])-1}function r(o,a,l){let u={term:l,to:a};return t[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=n())}else if(o.type=="star"){let l=n();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u<o.min;u++){let c=n();i(s(o.expr,l),c),l=c}if(o.max==-1)i(s(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let c=n();r(l,c),i(s(o.expr,l),c),l=c}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function FW(e,t){return t-e}function BL(e,t){let n=[];return r(t),n.sort(FW);function r(i){let s=e[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&n.indexOf(l)==-1&&r(l)}}}function jTe(e){let t=Object.create(null);return n(BL(e,0));function n(r){let i=[];r.forEach(o=>{e[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<i.length;c++)i[c][0]==a&&(u=i[c][1]);BL(e,l).forEach(c=>{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=t[r.join(",")]=new Tc(r.indexOf(e.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(FW);s.next.push({type:i[o][0],next:t[a.join(",")]||n(a)})}return s}}function UTe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function BW(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function zW(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let s=e[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function $W(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let s=e[i];s.validate&&s.validate(t[i])}}function HW(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new qTe(e,r,t[r]);return n}let zL=class VW{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=HW(t,r.attrs),this.defaultAttrs=BW(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Tc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:zW(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new El(this,this.computeAttrs(t),Be.from(n),dn.setFrom(r))}createChecked(t=null,n,r){return n=Be.from(n),this.checkContent(n),new El(this,this.computeAttrs(t),n,dn.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Be.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(Be.empty,!0);return s?new El(this,t,n.append(s),dn.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){$W(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:dn.none:t}static compile(t,n){let r=Object.create(null);t.forEach((s,o)=>r[s]=new VW(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function WTe(e,t,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${s}`)}}class qTe{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?WTe(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class i_{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=HW(t,i.attrs),this.excluded=null;let s=BW(this.attrs);this.instance=s?new dn(this,s):null}create(t=null){return!t&&this.instance?this.instance:new dn(this,zW(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((s,o)=>r[s]=new i_(s,i++,n,o)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){$W(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class jW{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=_r.from(t.nodes),n.marks=_r.from(t.marks||{}),this.nodes=zL.compile(this.spec.nodes,this),this.marks=i_.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Tc.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?$L(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:$L(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof zL){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Ub(r,r.defaultAttrs,t,dn.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return El.fromJSON(this,t)}markFromJSON(t){return dn.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function $L(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let a in e.marks){let l=e.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function GTe(e){return e.tag!=null}function KTe(e){return e.style!=null}let Ip=class HT{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(GTe(i))this.tags.push(i);else if(KTe(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=t.nodes[i.node];return s.contentMatch.matchType(s)})}parse(t,n={}){let r=new VL(this,n,!1);return r.addAll(t,dn.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new VL(this,n,!0);return r.addAll(t,dn.none,n.from,n.to),Xe.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(JTe(t,s.tag)&&(s.namespace===void 0||t.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(t);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(t,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(t)!=0||o.context&&!r.matchesContext(o.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(t){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<s)break}n.splice(o,0,i)}for(let i in t.marks){let s=t.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=jL(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=jL(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new HT(t,HT.schemaRules(t)))}};const UW={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},YTe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},WW={ol:!0,ul:!0},bm=1,VT=2,yy=4;function HL(e,t,n){return t!=null?(t?bm:0)|(t==="full"?VT:0):e&&e.whitespace=="pre"?bm|VT:n&-5}class yv{constructor(t,n,r,i,s,o){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=dn.none,this.match=s||(o&yy?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Be.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&bm)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=Be.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Be.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!UW.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class VL{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=HL(null,n.preserveWhitespace,0)|(r?yy:0);i?s=new yv(i.type,i.attrs,dn.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new yv(null,null,dn.none,!0,null,o):s=new yv(t.schema.topNodeType,null,dn.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,s=i.options&VT?"full":this.localPreserveWS||(i.options&bm)>0;if(s==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(s)s!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,` `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],a=t.previousSibling;(!o||a&&a.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,s=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),a;WW.hasOwnProperty(o)&&this.parser.normalizeLists&&XTe(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:YTe.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if(UW.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(s),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(s,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}s&&this.sync(a)&&this.open--}addAll(t,n,r,i){let s=r||0;for(let o=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(o,n);this.findAtPoint(t,s)}findPlace(t,n){let r,i;for(let s=this.open;s>=0;s--){let o=this.nodes[s],a=o.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=o,!a.length)||o.solid)break}if(!r)return null;this.sync(i);for(let s=0;s<r.length;s++)n=this.enterInner(r[s],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let s=dn.none;for(let o of r.concat(t.marks))(i.type?i.type.allowsMarkType(o.type):UL(o.type,t.type))&&(s=o.addToSet(s));return i.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let s=this.findPlace(t.create(n),r);return s&&(s=this.enterInner(t,n,r,!0,i)),s}enterInner(t,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let a=HL(t,s,o.options);o.options&yy&&o.content.length==0&&(a|=yy);let l=dn.none;return r=r.filter(u=>(o.type?o.type.allowsMarkType(u.type):UL(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new yv(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=bm)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function XTe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&WW.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function JTe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function jL(e){let t={};for(let n in e)t[n]=e[n];return t}function UL(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==t||s.indexOf(c)<0&&o(c))return!0}};if(o(i.contentMatch))return!0}}class zc{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=vx(n).createDocumentFragment());let i=r,s=[];return t.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(s[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)i=s.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],c=this.serializeMark(u,o.isInline,n);c&&(s.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=by(vx(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&by(vx(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return by(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new zc(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=WL(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return WL(t.marks)}}function WL(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function vx(e){return e.document||window.document}const qL=new WeakMap;function QTe(e){let t=qL.get(e);return t===void 0&&qL.set(e,t=ZTe(e)),t}function ZTe(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function by(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=QTe(r))&&s.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a,l=n?e.createElementNS(n,i):e.createElement(i),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):l.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=by(e,f,n,r);if(l.appendChild(h),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const qW=65535,GW=Math.pow(2,16);function eke(e,t){return e+t*GW}function GL(e){return e&qW}function tke(e){return(e-(e&qW))/GW}const KW=1,YW=2,wy=4,XW=8;class jT{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&XW)>0}get deletedBefore(){return(this.delInfo&(KW|wy))>0}get deletedAfter(){return(this.delInfo&(YW|wy))>0}get deletedAcross(){return(this.delInfo&wy)>0}}class Ri{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Ri.empty)return Ri.empty}recover(t){let n=0,r=GL(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+tke(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let u=this.ranges[a+s],c=this.ranges[a+o],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,h=l+i+(f<0?0:c);if(r)return h;let p=t==(n<0?l:d)?null:eke(a/3,t-l),m=t==l?YW:t==d?KW:wy;return(n<0?t!=l:t!=d)&&(m|=XW),new jT(h,m,p)}i+=c-u}return r?t+i:new jT(t+i,0,null)}touches(t,n){let r=0,i=GL(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[a+s],c=l+u;if(t<=c&&a==i*3)return!0;r+=this.ranges[a+o]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),u=this.ranges[i+n],c=this.ranges[i+r];t(a,a+u,l,l+c),s+=c-u}}invert(){return new Ri(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Ri.empty:new Ri(t<0?[0,-t,0]:[0,0,t])}}Ri.empty=new Ri([]);class Gd{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Gd(this.maps,this.mirror,t,n)}copy(){return new Gd(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Gd;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this.maps[s],a=o.mapResult(t,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,t=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new jT(t,i,null)}}const yx=Object.create(null);class Wr{getMap(){return Ri.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=yx[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in yx)throw new RangeError("Duplicate use of step JSON ID "+t);return yx[t]=n,n.prototype.jsonID=t,n}}class Kn{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Kn(t,null)}static fail(t){return new Kn(null,t)}static fromReplace(t,n,r,i){try{return Kn.ok(t.replace(n,r,i))}catch(s){if(s instanceof Hb)return Kn.fail(s.message);throw s}}}function AR(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let s=e.child(i);s.content.size&&(s=s.copy(AR(s.content,t,s))),s.isInline&&(s=t(s,n,i)),r.push(s)}return Be.fromArray(r)}class pl extends Wr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new Xe(AR(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return Kn.fromReplace(t,this.from,this.to,s)}invert(){return new uo(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new pl(n.pos,r.pos,this.mark)}merge(t){return t instanceof pl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new pl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new pl(n.from,n.to,t.markFromJSON(n.mark))}}Wr.jsonID("addMark",pl);class uo extends Wr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Xe(AR(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Kn.fromReplace(t,this.from,this.to,r)}invert(){return new pl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new uo(n.pos,r.pos,this.mark)}merge(t){return t instanceof uo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new uo(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new uo(n.from,n.to,t.markFromJSON(n.mark))}}Wr.jsonID("removeMark",uo);class ml extends Wr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Kn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Kn.fromReplace(t,this.pos,this.pos+1,new Xe(Be.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new ml(this.pos,n.marks[i]);return new ml(this.pos,this.mark)}}return new Tf(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ml(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ml(n.pos,t.markFromJSON(n.mark))}}Wr.jsonID("addNodeMark",ml);class Tf extends Wr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Kn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Kn.fromReplace(t,this.pos,this.pos+1,new Xe(Be.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ml(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Tf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Tf(n.pos,t.markFromJSON(n.mark))}}Wr.jsonID("removeNodeMark",Tf);class fr extends Wr{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&UT(t,this.from,this.to)?Kn.fail("Structure replace would overwrite content"):Kn.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Ri([this.from,this.to-this.from,this.slice.size])}invert(t){return new fr(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new fr(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof fr)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Xe.empty:new Xe(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new fr(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Xe.empty:new Xe(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new fr(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new fr(n.from,n.to,Xe.fromJSON(t,n.slice),!!n.structure)}}Wr.jsonID("replace",fr);class pr extends Wr{constructor(t,n,r,i,s,o,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=a}apply(t){if(this.structure&&(UT(t,this.from,this.gapFrom)||UT(t,this.gapTo,this.to)))return Kn.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Kn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Kn.fromReplace(t,this.from,this.to,r):Kn.fail("Content does not fit in gap")}getMap(){return new Ri([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new pr(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new pr(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new pr(n.from,n.to,n.gapFrom,n.gapTo,Xe.fromJSON(t,n.slice),n.insert,!!n.structure)}}Wr.jsonID("replaceAround",pr);function UT(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function nke(e,t,n,r){let i=[],s=[],o,a;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,t),h=Math.min(u+l.nodeSize,n),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:i.push(o=new uo(f,h,d[m])));a&&a.to==f?a.to=h:s.push(a=new pl(f,h,r))}}),i.forEach(l=>e.step(l)),s.forEach(l=>e.step(l))}function rke(e,t,n,r){let i=[],s=0;e.doc.nodesBetween(t,n,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof i_){let u=o.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=u,f.step=s):i.push({style:d,from:Math.max(a,t),to:u,step:s})}}}),i.forEach(o=>e.step(new uo(o.from,o.to,o.style)))}function PR(e,t,n,r=n.contentMatch,i=!0){let s=e.doc.nodeAt(t),o=[],a=t+1;for(let l=0;l<s.childCount;l++){let u=s.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(!d)o.push(new fr(a,c,Xe.empty));else{r=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new uo(a,c,u.marks[f]));if(i&&u.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(u.text);)p||(p=new Xe(Be.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),o.push(new fr(a+f.index,a+f.index+f[0].length,p))}}a=c}if(!r.validEnd){let l=r.fillBefore(Be.empty,!0);e.replace(a,a,new Xe(l,0,0))}for(let l=o.length-1;l>=0;l--)e.step(o[l])}function ike(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function uh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),s=e.$from.index(r),o=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(s,o,n))return r;if(r==0||i.type.spec.isolating||!ike(i,s,o))break}return null}function ske(e,t,n){let{$from:r,$to:i,depth:s}=t,o=r.before(s+1),a=i.after(s+1),l=o,u=a,c=Be.empty,d=0;for(let p=s,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,c=Be.from(r.node(p).copy(c)),d++):l--;let f=Be.empty,h=0;for(let p=s,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=Be.from(i.node(p).copy(f)),h++):u++;e.step(new pr(l,u,o,a,new Xe(c.append(f),d,h),c.size-d,!0))}function MR(e,t,n=null,r=e){let i=oke(e,t),s=i&&ake(r,t);return s?i.map(KL).concat({type:t,attrs:n}).concat(s.map(KL)):null}function KL(e){return{type:e,attrs:null}}function oke(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}function ake(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:t).contentMatch;for(let u=r;l&&u<i;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:o}function lke(e,t,n){let r=Be.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Be.from(n[o].type.create(n[o].attrs,r))}let i=t.start,s=t.end;e.step(new pr(i,s,i,s,new Xe(r,0,0),n.length,!0))}function uke(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&cke(e.doc,e.mapping.slice(s).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?u=!1:!h&&p&&(u=!0)}u===!1&&QW(e,o,a,s),PR(e,e.mapping.slice(s).map(a,1),r,void 0,u===null);let c=e.mapping.slice(s),d=c.map(a,1),f=c.map(a+o.nodeSize,1);return e.step(new pr(d,f,d+1,f-1,new Xe(Be.from(r.create(l,null,o.marks)),0,0),1,!0)),u===!0&&JW(e,o,a,s),!1}})}function JW(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function QW(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+s);e.replaceWith(o,o+1,t.type.schema.text(` `))}})}function cke(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function dke(e,t,n,r,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let o=n.create(r,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new pr(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Xe(Be.from(o),0,0),1,!0))}function Kd(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>s;u--,c--){let d=i.node(u),f=i.index(u);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[c+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function fke(e,t,n=1,r){let i=e.doc.resolve(t),s=Be.empty,o=Be.empty;for(let a=i.depth,l=i.depth-n,u=n-1;a>l;a--,u--){s=Be.from(i.node(a).copy(s));let c=r&&r[u];o=Be.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}e.step(new fr(t,t,new Xe(s.append(o),n,n),!0))}function cu(e,t){let n=e.resolve(t),r=n.index();return ZW(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function hke(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}function ZW(e,t){return!!(e&&t&&!e.isLeaf&&hke(e,t))}function s_(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let s,o,a=r.index(i);if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):n>0?(s=r.node(i+1),a++,o=r.node(i).maybeChild(a)):(s=r.node(i).maybeChild(a-1),o=r.node(i+1)),s&&!s.isTextblock&&ZW(s,o)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function pke(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,s=e.doc.resolve(t-n),o=s.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=e.steps.length;if(r===!1){let c=e.doc.resolve(t+n);QW(e,c.node(),c.before(),a)}o.inlineContent&&PR(e,t+n-1,o,s.node().contentMatchAt(s.index()),r==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new fr(u,l.map(t+n,-1),Xe.empty,!0)),r===!0){let c=e.doc.resolve(u);JW(e,c.node(),c.before(),e.steps.length)}return e}function mke(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function e6(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),u=r.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let d=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function o_(e,t,n=t,r=Xe.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),s=e.resolve(n);return t6(i,s,r)?new fr(t,n,r):new gke(i,s,r).fit()}function t6(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class gke{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Be.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=Be.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let s=this.placed,o=r.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new Xe(s,o,a);return t>-1?new pr(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new fr(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){t=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=bx(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(o?u.matchType(o.type)||(d=u.fillBefore(Be.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:d};if(n==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=bx(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Xe(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=bx(t,n);if(i.childCount<=1&&n>0){let s=t.size-n<=n+i.size;this.unplaced=new Xe(Wh(t,n-1,1),n-1,s?n-1:r)}else this.unplaced=new Xe(Wh(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let h=a.size+t-(o.content.size-o.openEnd);for(;u<a.childCount;){let m=a.child(u),g=d.matchType(m.type);if(!g)break;u++,(u>1||l==0||m.content.size)&&(d=g,c.push(n6(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?h:-1)))}let p=u==a.childCount;p||(h=-1),this.placed=qh(this.placed,n,Be.from(c)),this.frontier[n].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m<h;m++){let v=g.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),g=v.content}this.unplaced=p?t==0?Xe.empty:new Xe(Wh(o.content,t-1,1),t-1,h<0?o.openEnd:t-1):new Xe(Wh(o.content,t,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!wx(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),o=wx(t,n,i,r,s);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=wx(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:o,move:s?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=qh(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=qh(this.placed,this.depth,Be.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Be.empty,!0);n.childCount&&(this.placed=qh(this.placed,this.frontier.length,n))}}function Wh(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Wh(e.firstChild.content,t-1,n)))}function qh(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(qh(e.lastChild.content,t-1,n)))}function bx(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function n6(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,n6(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Be.empty,!0)))),e.copy(r)}function wx(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!vke(n,s.content,o)?a:null}function vke(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function yke(e){return e.spec.defining||e.spec.definingForContent}function bke(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),s=e.doc.resolve(n);if(t6(i,s,r))return e.step(new fr(t,n,r));let o=i6(i,e.doc.resolve(n));o[o.length-1]==0&&o.pop();let a=-(i.depth+1);o.unshift(a);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?a=f:i.before(f)==h&&o.splice(1,0,-f)}let l=o.indexOf(a),u=[],c=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(u.push(p),h==r.openStart)break;f=p.content}for(let f=c-1;f>=0;f--){let h=u[f],p=yke(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+c+1)%(r.openStart+1),p=u[h];if(p)for(let m=0;m<o.length;m++){let g=o[(m+l)%o.length],v=!0;g<0&&(v=!1,g=-g);let w=i.node(g-1),b=i.index(g-1);if(w.canReplaceWith(b,b,p.type,p.marks))return e.replace(i.before(g),v?s.after(g):n,new Xe(r6(r.content,0,r.openStart,h),h,r.openEnd))}}let d=e.steps.length;for(let f=o.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let h=o[f];h<0||(t=i.before(h),n=s.after(h))}}function r6(e,t,n,r,i){if(t<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(r6(s.content,t+1,n,r,s)))}if(t>r){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(Be.empty,!0))}return e}function wke(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=mke(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Xe(Be.from(r),0,0))}function _ke(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),s=i6(r,i);for(let o=0;o<s.length;o++){let a=s[o],l=o==s.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}function i6(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let s=e.start(i);if(s<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&n.push(i)}return n}class Yd extends Wr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Kn.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Kn.fromReplace(t,this.pos,this.pos+1,new Xe(Be.from(i),0,n.isLeaf?0:1))}getMap(){return Ri.empty}invert(t){return new Yd(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Yd(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Yd(n.pos,n.attr,n.value)}}Wr.jsonID("attr",Yd);class wm extends Wr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Kn.ok(r)}getMap(){return Ri.empty}invert(t){return new wm(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new wm(n.attr,n.value)}}Wr.jsonID("docAttr",wm);let kf=class extends Error{};kf=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};kf.prototype=Object.create(Error.prototype);kf.prototype.constructor=kf;kf.prototype.name="TransformError";class s6{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Gd}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new kf(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Xe.empty){let i=o_(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Xe(Be.from(r),0,0))}delete(t,n){return this.replace(t,n,Xe.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return bke(this,t,n,r),this}replaceRangeWith(t,n,r){return wke(this,t,n,r),this}deleteRange(t,n){return _ke(this,t,n),this}lift(t,n){return ske(this,t,n),this}join(t,n=1){return pke(this,t,n),this}wrap(t,n){return lke(this,t,n),this}setBlockType(t,n=t,r,i=null){return uke(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return dke(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new Yd(t,n,r)),this}setDocAttribute(t,n){return this.step(new wm(t,n)),this}addNodeMark(t,n){return this.step(new ml(t,n)),this}removeNodeMark(t,n){if(!(n instanceof dn)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Tf(t,n)),this}split(t,n=1,r){return fke(this,t,n,r),this}addMark(t,n,r){return nke(this,t,n,r),this}removeMark(t,n,r){return rke(this,t,n,r),this}clearIncompatible(t,n,r){return PR(this,t,n,r),this}}const _x=Object.create(null);class Et{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ske(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Xe.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let s=t.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:u}=o[a],c=t.mapping.slice(s);t.replaceRange(c.map(l.pos),c.map(u.pos),a?Xe.empty:n),a==0&&JL(t,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:o,$to:a}=i[s],l=t.mapping.slice(r),u=l.map(o.pos),c=l.map(a.pos);s?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),JL(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new bt(t):dd(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let s=t.depth-1;s>=0;s--){let o=n<0?dd(t.node(0),t.node(s),t.before(s+1),t.index(s),n,r):dd(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,r);if(o)return o}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ts(t.node(0))}static atStart(t){return dd(t,t,0,0,1)||new ts(t)}static atEnd(t){return dd(t,t,t.content.size,t.childCount,-1)||new ts(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=_x[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in _x)throw new RangeError("Duplicate use of selection JSON ID "+t);return _x[t]=n,n.prototype.jsonID=t,n}getBookmark(){return bt.between(this.$anchor,this.$head).getBookmark()}}Et.prototype.visible=!0;class Ske{constructor(t,n){this.$from=t,this.$to=n}}let YL=!1;function XL(e){!YL&&!e.parent.inlineContent&&(YL=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class bt extends Et{constructor(t,n=t){XL(t),XL(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Et.near(r);let i=t.resolve(n.map(this.anchor));return new bt(i.parent.inlineContent?i:r,r)}replace(t,n=Xe.empty){if(super.replace(t,n),n==Xe.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof bt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new a_(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new bt(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=Et.findFrom(n,r,!0)||Et.findFrom(n,-r,!0);if(s)n=s.$head;else return Et.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Et.findFrom(t,-r,!0)||Et.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new bt(t,n)}}Et.jsonID("text",bt);class a_{constructor(t,n){this.anchor=t,this.head=n}map(t){return new a_(t.map(this.anchor),t.map(this.head))}resolve(t){return bt.between(t.resolve(this.anchor),t.resolve(this.head))}}class ot extends Et{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=t.resolve(i);return r?Et.near(s):new ot(s)}content(){return new Xe(Be.from(this.node),0,0)}eq(t){return t instanceof ot&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new DR(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ot(t.resolve(n.anchor))}static create(t,n){return new ot(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ot.prototype.visible=!1;Et.jsonID("node",ot);class DR{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new a_(r,r):new DR(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ot.isSelectable(r)?new ot(n):Et.near(n)}}class ts extends Et{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Xe.empty){if(n==Xe.empty){t.delete(0,t.doc.content.size);let r=Et.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new ts(t)}map(t){return new ts(t)}eq(t){return t instanceof ts}getBookmark(){return xke}}Et.jsonID("all",ts);const xke={map(){return this},resolve(e){return new ts(e)}};function dd(e,t,n,r,i,s=!1){if(t.inlineContent)return bt.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let a=t.child(o);if(a.isAtom){if(!s&&ot.isSelectable(a))return ot.create(e,n-(i<0?a.nodeSize:0))}else{let l=dd(e,a,n+i,i<0?a.childCount:0,i,s);if(l)return l}n+=a.nodeSize*i}return null}function JL(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof fr||i instanceof pr))return;let s=e.mapping.maps[r],o;s.forEach((a,l,u,c)=>{o==null&&(o=c)}),e.setSelection(Et.near(e.doc.resolve(o),n))}const QL=1,ZL=2,e2=4;class Eke extends s6{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|QL)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&QL)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=ZL,this}ensureMarks(t){return dn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ZL)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||dn.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(n);s=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,s)),this.selection.empty||this.setSelection(Et.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=e2,this}get scrolledIntoView(){return(this.updated&e2)>0}}function t2(e,t){return!t||!e?e:e.bind(t)}class Gh{constructor(t,n,r){this.name=t,this.init=t2(n.init,r),this.apply=t2(n.apply,r)}}const Tke=[new Gh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Gh("selection",{init(e,t){return e.selection||Et.atStart(t.doc)},apply(e){return e.selection}}),new Gh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Gh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Sx{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Tke.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Gh(r.key,r.spec.state,r))})}}class Id{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=i?i[o].n:0,u=i?i[o].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<o?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),s=!0}i&&(i[o]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Id(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(t,this[s.name],this,n)}return n}get tr(){return new Eke(this)}static create(t){let n=new Sx(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Id(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new Sx(this.schema,t.plugins),r=n.fields,i=new Id(n);for(let s=0;s<r.length;s++){let o=r[s].name;i[o]=this.hasOwnProperty(o)?this[o]:r[s].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new Sx(t.schema,t.plugins),s=new Id(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=El.fromJSON(t.schema,n.doc);else if(o.name=="selection")s.selection=Et.fromJSON(s.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[o.name]=u.fromJSON.call(l,t,n[a],s);return}}s[o.name]=o.init(t,s)}}),s}}function o6(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=o6(i,t,{})),n[r]=i}return n}class or{constructor(t){this.spec=t,this.props={},t.props&&o6(t.props,this,this.props),this.key=t.key?t.key.key:a6("plugin")}getState(t){return t[this.key]}}const xx=Object.create(null);function a6(e){return e in xx?e+"$"+ ++xx[e]:(xx[e]=0,e+"$")}class li{constructor(t="key"){this.key=a6(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Tr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},_m=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let WT=null;const Xo=function(e,t,n){let r=WT||(WT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},kke=function(){WT=null},kc=function(e,t,n,r){return n&&(n2(e,t,n,r,-1)||n2(e,t,n,r,1))},Cke=/^(img|br|input|textarea|hr)$/i;function n2(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Yi(e))){let s=e.parentNode;if(!s||s.nodeType!=1||ug(e)||Cke.test(e.nodeName)||e.contentEditable=="false")return!1;t=Tr(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Yi(e):0}else return!1}}function Yi(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Oke(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Yi(e)}else if(e.parentNode&&!ug(e))t=Tr(e),e=e.parentNode;else return null}}function Rke(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!ug(e))t=Tr(e)+1,e=e.parentNode;else return null}}function Ike(e,t,n){for(let r=t==0,i=t==Yi(e);r||i;){if(e==n)return!0;let s=Tr(e);if(e=e.parentNode,!e)return!1;r=r&&s==0,i=i&&s==Yi(e)}}function ug(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const l_=function(e){return e.focusNode&&kc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Au(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Ake(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Pke(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Yi(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Yi(r.startContainer),r.startOffset)}}}const To=typeof navigator<"u"?navigator:null,r2=typeof document<"u"?document:null,du=To&&To.userAgent||"",qT=/Edge\/(\d+)/.exec(du),l6=/MSIE \d/.exec(du),GT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(du),wi=!!(l6||GT||qT),Tl=l6?document.documentMode:GT?+GT[1]:qT?+qT[1]:0,Bs=!wi&&/gecko\/(\d+)/i.test(du);Bs&&+(/Firefox\/(\d+)/.exec(du)||[0,0])[1];const KT=!wi&&/Chrome\/(\d+)/.exec(du),zr=!!KT,u6=KT?+KT[1]:0,ii=!wi&&!!To&&/Apple Computer/.test(To.vendor),Cf=ii&&(/Mobile\/\w+/.test(du)||!!To&&To.maxTouchPoints>2),qi=Cf||(To?/Mac/.test(To.platform):!1),Mke=To?/Win/.test(To.platform):!1,sa=/Android \d/.test(du),cg=!!r2&&"webkitFontSmoothing"in r2.documentElement.style,Dke=cg?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Nke(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function $o(e,t){return typeof e=="number"?e:e[t]}function Lke(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function i2(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=n||e.dom;o;o=_m(o)){if(o.nodeType!=1)continue;let a=o,l=a==s.body,u=l?Nke(s):Lke(a),c=0,d=0;if(t.top<u.top+$o(r,"top")?d=-(u.top-t.top+$o(i,"top")):t.bottom>u.bottom-$o(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+$o(i,"top")-u.top:t.bottom-u.bottom+$o(i,"bottom")),t.left<u.left+$o(r,"left")?c=-(u.left-t.left+$o(i,"left")):t.right>u.right-$o(r,"right")&&(c=t.right-u.right+$o(i,"right")),c||d)if(l)s.defaultView.scrollBy(c,d);else{let f=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let p=a.scrollLeft-f,m=a.scrollTop-h;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function Fke(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let s=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let a=e.root.elementFromPoint(s,o);if(!a||a==e.dom||!e.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:c6(e.dom)}}function c6(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=_m(r));return t}function Bke({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;d6(n,r==0?0:r-t)}function d6(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:s}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=s&&(r.scrollLeft=s)}}let Yc=null;function zke(e){if(e.setActive)return e.setActive();if(Yc)return e.focus(Yc);let t=c6(e);e.focus(Yc==null?{get preventScroll(){return Yc={preventScroll:!0},!0}}:void 0),Yc||(Yc=!1,d6(t,0))}function f6(e,t){let n,r=2e8,i,s=0,o=t.top,a=t.top,l,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=Xo(c).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(m<r){n=c,r=m,i=m&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,c.nodeType==1&&m&&(s=d+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=d+1)}}return!n&&l&&(n=l,i=u,r=0),n&&n.nodeType==3?$ke(n,i):!n||r&&n.nodeType==1?{node:e,offset:s}:f6(n,i)}function $ke(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let s=Wa(r,1);if(s.top!=s.bottom&&NR(t,s))return{node:e,offset:i+(t.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function NR(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Hke(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Vke(e,t,n){let{node:r,offset:i}=f6(t,n),s=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();s=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(r,i,s)}function jke(e,t,n,r){let i=-1;for(let s=t,o=!1;s!=e.dom;){let a=e.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!o&&l.left>r.left||l.top>r.top?i=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(i=a.posAfter),o=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;s=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function h6(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let o=e.childNodes[s];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(NR(t,u))return h6(o,t,u)}}if((s=(s+1)%r)==i)break}return e}function Uke(e,t){let n=e.dom.ownerDocument,r,i=0,s=Pke(n,t.left,t.top);s&&({node:r,offset:i}=s);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!o||!e.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=e.dom.getBoundingClientRect();if(!NR(t,u)||(o=h6(e.dom,t,u),!o))return null}if(ii)for(let u=o;r&&u;u=_m(u))u.draggable&&(r=void 0);if(o=Hke(o,t),r){if(Bs&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&i++}let u;cg&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=jke(e,r,i,t))}a==null&&(a=Vke(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function s2(e){return e.top<e.bottom||e.left<e.right}function Wa(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(s2(r))return r}return Array.prototype.find.call(n,s2)||e.getBoundingClientRect()}const Wke=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function p6(e,t,n){let{node:r,offset:i,atom:s}=e.docView.domFromPos(t,n<0?-1:1),o=cg||Bs;if(r.nodeType==3)if(o&&(Wke.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=Wa(Xo(r,i,i),n);if(Bs&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=Wa(Xo(r,i-1,i-1),-1);if(u.top==l.top){let c=Wa(Xo(r,i,i+1),-1);if(c.top!=l.top)return Ah(c,c.left<u.left)}}return l}else{let l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==r.nodeValue.length?(l--,c=1):n<0?l--:u++,Ah(Wa(Xo(r,l,u),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==Yi(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return Ex(l.getBoundingClientRect(),!1)}if(s==null&&i<Yi(r)){let l=r.childNodes[i];if(l.nodeType==1)return Ex(l.getBoundingClientRect(),!0)}return Ex(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==Yi(r))){let l=r.childNodes[i-1],u=l.nodeType==3?Xo(l,Yi(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Ah(Wa(u,1),!1)}if(s==null&&i<Yi(r)){let l=r.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Xo(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return Ah(Wa(u,-1),!0)}return Ah(Wa(r.nodeType==3?Xo(r):r,-n),n>=0)}function Ah(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ex(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function m6(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function qke(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return m6(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=p6(e,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Xo(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const Gke=/[\u0590-\u08ac]/;function Kke(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=e.domSelection();return a?!Gke.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:o:m6(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:p,focusOffset:m}=e.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let o2=null,a2=null,l2=!1;function Yke(e,t,n){return o2==t&&a2==n?l2:(o2=t,a2=n,l2=n=="up"||n=="down"?qke(e,t,n):Kke(e,t,n))}const ns=0,u2=1,Hu=2,ko=3;class dg{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=ns,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let s,o;if(t==this.contentDOM)s=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(t==this.contentDOM)s=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>Tr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!n||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))r=!1;else return s}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==t&&s!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(t<s)return i.descAt(t-r-i.border);r=s}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let o=this.children[r],a=s+o.size;if(a>t||o instanceof v6){i=t-s;break}s=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof g6&&s.side>=0;r--);if(n<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&n&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?Tr(s.dom)+1:0}}else{let s,o=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?Tr(s.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let o=r,a=0;;a++){let l=this.children[a],u=o+l.size;if(i==-1&&t<=u){let c=o+l.border;if(t>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=o;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Tr(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Tr(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:s}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let s=Math.min(t,n),o=Math.max(t,n);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(s>p&&o<g)return m.setSelection(t-p-m.border,n-p-m.border,r,i);p=g}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Bs||ii)&&t==n){let{node:h,offset:p}=a;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==` `),d&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(a=l={node:g.parentNode,offset:Tr(g)+1});break}let v=m.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let m=h.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Bs&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||d&&ii)&&kc(a.node,a.offset,c.anchorNode,c.anchorOffset)&&kc(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||t==n)&&!d){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let p=a;a=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],o=r+s.size;if(r==o?t<=o&&n>=r:t<o&&n>r){let a=r+s.border,l=o-s.border;if(t>=a&&n<=l){this.dirty=t==r||n==o?Hu:u2,t==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ko:s.markDirty(t-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Hu:ko}r=o}this.dirty=Hu}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Hu:u2;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class g6 extends dg{constructor(t,n,r,i){let s,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=n,this.widget=n,s=this}matchesWidget(t){return this.dirty==ns&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Xke extends dg{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Cc extends dg{constructor(t,n,r,i,s){super(t,[],r,i),this.mark=n,this.spec=s}static create(t,n,r,i){let s=i.nodeViews[n.type.name],o=s&&s(n,i,r);return(!o||!o.dom)&&(o=zc.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Cc(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ko||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=ko&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=ns){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ns}}slice(t,n,r){let i=Cc.create(this.parent,this.mark,!0,r),s=this.children,o=this.size;n<o&&(s=XT(s,n,o,r)),t>0&&(s=XT(s,0,t,r));for(let a=0;a<s.length;a++)s[a].parent=i;return i.children=s,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class kl extends dg{constructor(t,n,r,i,s,o,a,l,u){super(t,[],s,o),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,s,o){let a=s.nodeViews[n.type.name],l,u=a&&a(n,s,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=zc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=w6(c,r,n),u?l=new Jke(t,n,r,i,c,d||null,f,u,s,o+1):n.isText?new u_(t,n,r,i,c,f,s):new kl(t,n,r,i,c,d||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Be.empty)}return t}matchesNode(t,n,r){return this.dirty==ns&&t.eq(this.node)&&Wb(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,s=t.composing?this.localCompositionInfo(t,n):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new Zke(this,o&&o.node,t);nCe(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?dn.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,i)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,t);let h;l.findNodeMatch(u,c,d,f)||a&&t.state.selection.from>i&&t.state.selection.to<i+u.nodeSize&&(h=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(u,c,d,h,t)||l.updateNextNode(u,c,d,t,f,i)||l.addNode(u,c,d,t,i),i+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Hu)&&(o&&this.protectLocalComposition(t,o),y6(this.contentDOM,this.children,t),Cf&&rCe(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof bt)||r<n||i>n+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=iCe(this.node.content,o,r-n,i-n);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new Xke(this,s,n,i);t.input.compositionNodes.push(o),this.children=XT(this.children,r,r+i.length,t,o)}update(t,n,r,i){return this.dirty==ko||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=ns}updateOuterDeco(t){if(Wb(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=b6(this.dom,this.nodeDOM,YT(this.outerDeco,this.node,n),YT(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function c2(e,t,n,r,i){w6(r,t,e);let s=new kl(void 0,e,t,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class u_ extends kl{constructor(t,n,r,i,s,o,a){super(t,n,r,i,s,null,o,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==ko||this.dirty!=ns&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ns||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=ns,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),s=document.createTextNode(i.text);return new u_(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ko)}get domAtom(){return!1}isText(t){return this.node.text==t}}class v6 extends dg{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==ns&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Jke extends kl{constructor(t,n,r,i,s,o,a,l,u,c){super(t,n,r,i,s,o,a,u,c),this.spec=l}update(t,n,r,i){if(this.dirty==ko)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let s=this.spec.update(t,n,r);return s&&this.updateInner(t,n,r,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function y6(e,t,n){let r=e.firstChild,i=!1;for(let s=0;s<t.length;s++){let o=t[s],a=o.dom;if(a.parentNode==e){for(;a!=r;)r=d2(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(o instanceof Cc){let l=r?r.previousSibling:e.lastChild;y6(o.contentDOM,o.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=d2(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Ap=function(e){e&&(this.nodeName=e)};Ap.prototype=Object.create(null);const Vu=[new Ap];function YT(e,t,n){if(e.length==0)return Vu;let r=n?Vu[0]:new Ap,i=[r];for(let s=0;s<e.length;s++){let o=e[s].type.attrs;if(o){o.nodeName&&i.push(r=new Ap(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&i.length==1&&i.push(r=new Ap(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function b6(e,t,n,r){if(n==Vu&&r==Vu)return t;let i=t;for(let s=0;s<r.length;s++){let o=r[s],a=n[s];if(s){let l;a&&a.nodeName==o.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Vu[0]),i=l}Qke(i,a||Vu[0],o)}return i}function Qke(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&e.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&e.classList.add(i[s]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function w6(e,t,n){return b6(e,e,Vu,YT(t,n,e.nodeType!=1))}function Wb(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function d2(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Zke{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=eCe(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let i=0,s=this.stack.length>>1,o=Math.min(s,t.length);for(;i<o&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&t[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=ns,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(t[s])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Cc.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(t,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,r,i,s){let o=this.top.children[i];return o.dirty==ko&&o.dom==o.contentDOM&&(o.dirty=Hu),o.update(t,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,s,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof kl){let u=this.preMatch.matched.get(l);if(u!=null&&u!=s)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=ko&&Wb(n,l.outerDeco));if(!f&&l.update(t,n,r,i))return this.destroyBetween(this.index,a),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,r,i,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Hu,d.updateChildren(i,o+1),d.dirty=ns),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,s,o){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Wb(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=kl.create(this.top,n,r,i,s,o);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,n,r,i,s){let o=kl.create(this.top,t,n,r,i,s);o.contentDOM&&o.updateChildren(i,s+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new g6(this.top,t,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Cc;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof u_)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((ii||zr)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new v6(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function eCe(e,t){let n=t,r=n.children.length,i=e.childCount,s=new Map,o=[];e:for(;i>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof Cc)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function tCe(e,t){return e.type.side-t.type.side}function nCe(e,t,n,r){let i=t.locals(e),s=0;if(i.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);r(c,i,t.forChild(s,c),u),s+=c.nodeSize}return}let o=0,a=[],l=null;for(let u=0;;){let c,d;for(;o<i.length&&i[o].to==s;){let g=i[o++];g.widget&&(c?(d||(d=[c])).push(g):c=g)}if(c)if(d){d.sort(tCe);for(let g=0;g<d.length;g++)n(d[g],u,!!l)}else n(c,u,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(u<e.childCount)h=u,f=e.child(u++);else break;for(let g=0;g<a.length;g++)a[g].to<=s&&a.splice(g--,1);for(;o<i.length&&i[o].from<=s&&i[o].to>s;)a.push(i[o++]);let p=s+f.nodeSize;if(f.isText){let g=p;o<i.length&&i[o].from<g&&(g=i[o].from);for(let v=0;v<a.length;v++)a[v].to<g&&(g=a[v].to);g<p&&(l=f.cut(g-s),f=f.cut(0,g-s),p=g,h=-1)}else for(;o<i.length&&i[o].to<p;)o++;let m=f.isInline&&!f.isLeaf?a.filter(g=>!g.inline):a.slice();r(f,m,t.forChild(s,f),h),s=p}}function rCe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function iCe(e,t,n,r){for(let i=0,s=0;i<e.childCount&&s<=r;){let o=e.child(i++),a=s;if(s+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<e.childCount;){let u=e.child(i++);if(s+=u.nodeSize,!u.isText)break;l+=u.text}if(s>=n){if(s>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a<r?l.lastIndexOf(t,r-a-1):-1;if(u>=0&&u+t.length+a>=n)return a+u;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function XT(e,t,n,r,i){let s=[];for(let o=0,a=0;o<e.length;o++){let l=e[o],u=a,c=a+=l.size;u>=n||c<=t?s.push(l):(u<t&&s.push(l.slice(0,t-u,r)),i&&(s.push(i),i=void 0),c>n&&s.push(l.slice(n-u,l.size,r)))}return s}function LR(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,u;if(l_(n)){for(l=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&ot.isSelectable(d)&&i.parent&&!(d.isInline&&Ike(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;u=new ot(o==f?a:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=o,f=o;for(let h=0;h<n.rangeCount;h++){let p=n.getRangeAt(h);d=Math.min(d,e.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(d<0)return null;[l,o]=f==e.state.selection.anchor?[f,d]:[d,f],a=r.resolve(o)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=r.resolve(l);if(!u){let d=t=="pointer"||e.state.selection.head<a.pos&&!s?1:-1;u=FR(e,c,a,d)}return u}function _6(e){return e.editable?e.hasFocus():x6(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ha(e,t=!1){let n=e.state.selection;if(S6(e,n),!!_6(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&zr){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&kc(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)oCe(e);else{let{anchor:r,head:i}=n,s,o;f2&&!(n instanceof bt)&&(n.$from.parent.inlineContent||(s=h2(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=h2(e,n.to))),e.docView.setSelection(r,i,e,t),f2&&(s&&p2(s),o&&p2(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&sCe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const f2=ii||zr&&u6<63;function h2(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(ii&&i&&i.contentEditable=="false")return Tx(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return Tx(i);if(s)return Tx(s)}}function Tx(e){return e.contentEditable="true",ii&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function p2(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function sCe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!_6(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function oCe(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Tr(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&wi&&Tl<=11&&(r.disabled=!0,r.disabled=!1)}function S6(e,t){if(t instanceof ot){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(m2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else m2(e)}function m2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function FR(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||bt.between(t,n,r)}function g2(e){return e.editable&&!e.hasFocus()?!1:x6(e)}function x6(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function aCe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return kc(t.node,t.offset,n.anchorNode,n.anchorOffset)}function JT(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&Et.findFrom(s,t)}function il(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function v2(e,t,n){let r=e.state.selection;if(r instanceof bt)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return il(e,new bt(r.$anchor,o))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=JT(e.state,t);return i&&i instanceof ot?il(e,i):!1}else if(!(qi&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM?ot.isSelectable(s)?il(e,new ot(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):cg?il(e,new bt(e.state.doc.resolve(t<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ot&&r.node.isInline)return il(e,new bt(t>0?r.$to:r.$from));{let i=JT(e.state,t);return i?il(e,i):!1}}}function qb(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Pp(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Xc(e,t){return t<0?lCe(e):uCe(e)}function lCe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,s,o=!1;for(Bs&&n.nodeType==1&&r<qb(n)&&Pp(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Pp(a,-1))i=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(E6(n))break;{let a=n.previousSibling;for(;a&&Pp(a,-1);)i=n.parentNode,s=Tr(a),a=a.previousSibling;if(a)n=a,r=qb(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}o?QT(e,n,r):i&&QT(e,i,s)}function uCe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=qb(n),s,o;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Pp(a,1))s=n,o=++r;else break}else{if(E6(n))break;{let a=n.nextSibling;for(;a&&Pp(a,1);)s=a.parentNode,o=Tr(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=qb(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}s&&QT(e,s,o)}function E6(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function cCe(e,t){for(;e&&t==e.childNodes.length&&!ug(e);)t=Tr(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function dCe(e,t){for(;e&&!t&&!ug(e);)t=Tr(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function QT(e,t,n){if(t.nodeType!=3){let s,o;(o=cCe(t,n))?(t=o,n=0):(s=dCe(t,n))&&(t=s,n=s.nodeValue.length)}let r=e.domSelection();if(!r)return;if(l_(r)){let s=document.createRange();s.setEnd(t,n),s.setStart(t,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&ha(e)},50)}function y2(e,t){let n=e.state.doc.resolve(t);if(!(zr||Mke)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let s=e.coordsAtPos(t-1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(t<n.end()){let s=e.coordsAtPos(t+1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function b2(e,t,n){let r=e.state.selection;if(r instanceof bt&&!r.empty||n.indexOf("s")>-1||qi&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=JT(e.state,t);if(o&&o instanceof ot)return il(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,a=r instanceof ts?Et.near(o,t):Et.findFrom(o,t);return a?il(e,a):!1}return!1}function w2(e,t){if(!(e.state.selection instanceof bt))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(n.pos-s.nodeSize,n.pos):o.delete(n.pos,n.pos+s.nodeSize),e.dispatch(o),!0}return!1}function _2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function fCe(e){if(!ii||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;_2(e,r,"true"),setTimeout(()=>_2(e,r,"false"),20)}return!1}function hCe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function pCe(e,t){let n=t.keyCode,r=hCe(t);if(n==8||qi&&n==72&&r=="c")return w2(e,-1)||Xc(e,-1);if(n==46&&!t.shiftKey||qi&&n==68&&r=="c")return w2(e,1)||Xc(e,1);if(n==13||n==27)return!0;if(n==37||qi&&n==66&&r=="c"){let i=n==37?y2(e,e.state.selection.from)=="ltr"?-1:1:-1;return v2(e,i,r)||Xc(e,i)}else if(n==39||qi&&n==70&&r=="c"){let i=n==39?y2(e,e.state.selection.from)=="ltr"?1:-1:1;return v2(e,i,r)||Xc(e,i)}else{if(n==38||qi&&n==80&&r=="c")return b2(e,-1,r)||Xc(e,-1);if(n==40||qi&&n==78&&r=="c")return fCe(e)||b2(e,1,r)||Xc(e,1);if(r==(qi?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function T6(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=e.someProp("clipboardSerializer")||zc.fromSchema(e.state.schema),a=A6(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=I6[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let p=a.createElement(c[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` `);return{dom:l,text:f,slice:t}}function k6(e,t,n,r,i){let s=i.parent.type.spec.code,o,a;if(!n&&!t)return null;let l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,s||r,e)}),s)return t?new Xe(Be.from(e.state.schema.text(t.replace(/\r\n?/g,` `))),0,0):Xe.empty;let d=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(d)a=d;else{let f=i.marks(),{schema:h}=e.state,p=zc.fromSchema(h);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),o=yCe(n),cg&&bCe(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Ip.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!mCe.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=wCe(S2(a,+c[1],+c[2]),c[4]);else if(a=Xe.maxOpen(gCe(a.content,i),!0),a.openStart||a.openEnd){let d=0,f=0;for(let h=a.content.firstChild;d<a.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=a.content.lastChild;f<a.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);a=S2(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e)}),a}const mCe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function gCe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),s,o=[];if(e.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&O6(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=R6(o[o.length-1],s.length));let c=C6(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return Be.from(o)}return e}function C6(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Be.from(e));return e}function O6(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let s=O6(e,t,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Be.from(C6(n,e,i+1))))}}function R6(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,R6(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Be.empty,!0);return e.copy(n.append(r))}function ZT(e,t,n,r,i,s){let o=t<0?e.firstChild:e.lastChild,a=o.content;return e.childCount>1&&(s=0),i<r-1&&(a=ZT(a,t,n,r,i+1,s)),i>=n&&(a=t<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(Be.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(a))}function S2(e,t,n){return t<e.openStart&&(e=new Xe(ZT(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Xe(ZT(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const I6={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let x2=null;function A6(){return x2||(x2=document.implementation.createHTMLDocument("title"))}let kx=null;function vCe(e){let t=window.trustedTypes;return t?(kx||(kx=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),kx.createHTML(e)):e}function yCe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=A6().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&I6[r[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=vCe(e),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function bCe(e){let t=e.querySelectorAll(zr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function wCe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:s,openEnd:o}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=Be.from(l.create(r[a+1],i)),s++,o++}return new Xe(i,s,o)}const si={},oi={},_Ce={touchstart:!0,touchmove:!0};class SCe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function xCe(e){for(let t in si){let n=si[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{TCe(e,r)&&!BR(e,r)&&(e.editable||!(r.type in oi))&&n(e,r)},_Ce[t]?{passive:!0}:void 0)}ii&&e.dom.addEventListener("input",()=>null),ek(e)}function gl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ECe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function ek(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>BR(e,r))})}function BR(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function TCe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function kCe(e,t){!BR(e,t)&&si[t.type]&&(e.editable||!(t.type in oi))&&si[t.type](e,t)}oi.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!M6(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(sa&&zr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Cf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Au(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||pCe(e,n)?n.preventDefault():gl(e,"key")};oi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};oi.keypress=(e,t)=>{let n=t;if(M6(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||qi&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof bt)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function c_(e){return{left:e.clientX,top:e.clientY}}function CCe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function zR(e,t,n,r,i){if(r==-1)return!1;let s=e.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,a=>o>s.depth?a(e,n,s.nodeAfter,s.before(o),i,!0):a(e,n,s.node(o),s.before(o),i,!1)))return!0;return!1}function Xd(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function OCe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&ot.isSelectable(r)?(Xd(e,new ot(n)),!0):!1}function RCe(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof ot&&(r=n.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(ot.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(o);break}}return i!=null?(Xd(e,ot.create(e.state.doc,i)),!0):!1}function ICe(e,t,n,r,i){return zR(e,"handleClickOn",t,n,r)||e.someProp("handleClick",s=>s(e,t,r))||(i?RCe(e,n):OCe(e,n))}function ACe(e,t,n,r){return zR(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function PCe(e,t,n,r){return zR(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||MCe(e,n,r)}function MCe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Xd(e,bt.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)Xd(e,bt.create(r,a+1,a+1+o.content.size));else if(ot.isSelectable(o))Xd(e,ot.create(r,a));else continue;return!0}}function $R(e){return Gb(e)}const P6=qi?"metaKey":"ctrlKey";si.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=$R(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&CCe(n,e.input.lastClick)&&!n[P6]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s};let o=e.posAtCoords(c_(n));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new DCe(e,o,n,!!r)):(s=="doubleClick"?ACe:PCe)(e,o.pos,o.inside,n)?n.preventDefault():gl(e,"pointer"))};class DCe{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[P6],this.allowDefault=r.shiftKey;let s,o;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),o=n.inside;else{let c=t.state.doc.resolve(n.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=t.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof ot&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Bs&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),gl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ha(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(c_(t))),this.updateAllowDefault(t),this.allowDefault||!n?gl(this.view,"pointer"):ICe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ii&&this.mightDrag&&!this.mightDrag.node.isAtom||zr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Xd(this.view,Et.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):gl(this.view,"pointer")}move(t){this.updateAllowDefault(t),gl(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}si.touchstart=e=>{e.input.lastTouch=Date.now(),$R(e),gl(e,"pointer")};si.touchmove=e=>{e.input.lastTouch=Date.now(),gl(e,"pointer")};si.contextmenu=e=>$R(e);function M6(e,t){return e.composing?!0:ii&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const NCe=sa?5e3:-1;oi.compositionstart=oi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof bt&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Gb(e,!0),e.markCursor=null;else if(Gb(e,!t.selection.empty),Bs&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=e.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}D6(e,NCe)};oi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,D6(e,20))};function D6(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Gb(e),t))}function N6(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=FCe());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function LCe(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Oke(t.focusNode,t.focusOffset),r=Rke(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function FCe(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Gb(e,t=!1){if(!(sa&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),N6(e),t||e.docView&&e.docView.dirty){let n=LR(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function BCe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Sm=wi&&Tl<15||Cf&&Dke<604;si.copy=oi.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let s=Sm?null:n.clipboardData,o=r.content(),{dom:a,text:l}=T6(e,o);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):BCe(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function zCe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function $Ce(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?xm(e,r.value,null,i,t):xm(e,r.textContent,r.innerHTML,i,t)},50)}function xm(e,t,n,r,i){let s=k6(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||Xe.empty)))return!0;if(!s)return!1;let o=zCe(s),a=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function L6(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}oi.paste=(e,t)=>{let n=t;if(e.composing&&!sa)return;let r=Sm?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&xm(e,L6(r),r.getData("text/html"),i,n)?n.preventDefault():$Ce(e,n)};class F6{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const B6=qi?"altKey":"ctrlKey";si.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(c_(n)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof ot?i.to-1:i.to))){if(r&&r.mightDrag)o=ot.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(o=ot.create(e.state.doc,d.posBefore))}}let a=(o||e.state.selection).content(),{dom:l,text:u,slice:c}=T6(e,a);(!n.dataTransfer.files.length||!zr||u6>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Sm?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Sm||n.dataTransfer.setData("text/plain",u),e.dragging=new F6(c,!n[B6],o)};si.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};oi.dragover=oi.dragenter=(e,t)=>t.preventDefault();oi.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(c_(n));if(!i)return;let s=e.state.doc.resolve(i.pos),o=r&&r.slice;o?e.someProp("transformPasted",p=>{o=p(o,e)}):o=k6(e,L6(n.dataTransfer),Sm?null:n.dataTransfer.getData("text/html"),!1,s);let a=!!(r&&!n[B6]);if(e.someProp("handleDrop",p=>p(e,n,o||Xe.empty,a))){n.preventDefault();return}if(!o)return;n.preventDefault();let l=o?e6(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let u=e.state.tr;if(a){let{node:p}=r;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=u.doc;if(d?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(f))return;let h=u.doc.resolve(c);if(d&&ot.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new ot(h));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,g,v,w)=>p=w),u.setSelection(FR(e,h,u.doc.resolve(p)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};si.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ha(e)},20))};si.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};si.beforeinput=(e,t)=>{if(zr&&sa&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,Au(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in oi)si[e]=oi[e];function Em(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Kb{constructor(t,n){this.toDOM=t,this.spec=n||ic,this.side=this.spec.side||0}map(t,n,r,i){let{pos:s,deleted:o}=t.mapResult(n.from+i,this.side<0?-1:1);return o?null:new Ai(s-r,s-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Kb&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Em(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Cl{constructor(t,n){this.attrs=t,this.spec=n||ic}map(t,n,r,i){let s=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,o=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new Ai(s,o,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Cl&&Em(this.attrs,t.attrs)&&Em(this.spec,t.spec)}static is(t){return t.type instanceof Cl}destroy(){}}class HR{constructor(t,n){this.attrs=t,this.spec=n||ic}map(t,n,r,i){let s=t.mapResult(n.from+i,1);if(s.deleted)return null;let o=t.mapResult(n.to+i,-1);return o.deleted||o.pos<=s.pos?null:new Ai(s.pos-r,o.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),s;return i==n.from&&!(s=t.child(r)).isText&&i+s.nodeSize==n.to}eq(t){return this==t||t instanceof HR&&Em(this.attrs,t.attrs)&&Em(this.spec,t.spec)}destroy(){}}class Ai{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Ai(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Ai(t,t,new Kb(n,r))}static inline(t,n,r,i){return new Ai(t,n,new Cl(r,i))}static node(t,n,r,i){return new Ai(t,n,new HR(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Cl}get widget(){return this.type instanceof Kb}}const fd=[],ic={};class qn{constructor(t,n){this.local=t.length?t:fd,this.children=n.length?n:fd}static create(t,n){return n.length?Yb(n,t,0,ic):Mr}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,s){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=t&&(!s||s(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>t){let a=this.children[o]+1;this.children[o+2].findInner(t-a,n-a,r,i+a,s)}}map(t,n,r){return this==Mr||t.maps.length==0?this:this.mapInner(t,n,0,0,r||ic)}mapInner(t,n,r,i,s){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,r,i);l&&l.type.valid(n,l)?(o||(o=[])).push(l):s.onRemove&&s.onRemove(this.local[a].spec)}return this.children.length?HCe(this.children,o||[],t,n,r,i,s):o?new qn(o.sort(sc),fd):Mr}add(t,n){return n.length?this==Mr?qn.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,s=0;t.forEach((a,l)=>{let u=l+r,c;if(c=$6(n,a,u)){for(i||(i=this.children.slice());s<i.length&&i[s]<l;)s+=3;i[s]==l?i[s+2]=i[s+2].addInner(a,c,u+1):i.splice(s,0,l,l+a.nodeSize,Yb(c,a,u+1,ic)),s+=3}});let o=z6(s?H6(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(t,o[a])||o.splice(a--,1);return new qn(o.length?this.local.concat(o).sort(sc):this.local,i||this.children)}remove(t){return t.length==0||this==Mr?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let o,a=r[s]+n,l=r[s+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<l&&(t[c]=null,(o||(o=[])).push(d));if(!o)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(o,a+1);u!=Mr?r[s+2]=u:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,o;s<t.length;s++)if(o=t[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new qn(i,r):Mr}forChild(t,n){if(this==Mr)return this;if(n.isLeaf)return qn.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let s=t+1,o=s+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>s&&l.type instanceof Cl){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new qn(i.sort(sc),fd);return r?new ll([a,r]):a}return r||Mr}eq(t){if(this==t)return!0;if(!(t instanceof qn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return VR(this.localsInner(t))}localsInner(t){if(this==Mr)return fd;if(t.inlineContent||!this.local.some(Cl.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Cl||n.push(this.local[r]);return n}forEachSet(t){t(this)}}qn.empty=new qn([],[]);qn.removeOverlap=VR;const Mr=qn.empty;class ll{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,ic));return ll.from(r)}forChild(t,n){if(n.isLeaf)return qn.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(t,n);s!=Mr&&(s instanceof ll?r=r.concat(s.members):r.push(s))}return ll.from(r)}eq(t){if(!(t instanceof ll)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(t);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let o=0;o<s.length;o++)n.push(s[o])}}return n?VR(r?n:n.sort(sc)):fd}static from(t){switch(t.length){case 0:return Mr;case 1:return t[0];default:return new ll(t.every(n=>n instanceof qn)?t:t.reduce((n,r)=>n.concat(r instanceof qn?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function HCe(e,t,n,r,i,s,o){let a=e.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,h,p,m)=>{let g=m-p-(h-f);for(let v=0;v<a.length;v+=3){let w=a[v+1];if(w<0||f>w+c-d)continue;let b=a[v]+c-d;h>=b?a[v+1]=f<=b?-2:-1:f>=c&&g&&(a[v]+=g,a[v+1]+=g)}d+=g}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let c=n.map(e[u]+s),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(e[u+1]+s,-1),h=f-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let v=a[u+2].mapInner(n,g,c+1,e[u]+s+1,o);v!=Mr?(a[u]=d,a[u+1]=h,a[u+2]=v):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=VCe(a,e,t,n,i,s,o),c=Yb(u,r,0,o);t=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let h=c.children[d];for(;f<a.length&&a[f]<h;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new qn(t.sort(sc),a)}function z6(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Ai(i.from+t,i.to+t,i.type))}return n}function VCe(e,t,n,r,i,s,o){function a(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(r,i,u);d?n.push(d):o.onRemove&&o.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)a(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&a(e[l+2],t[l]+s+1);return n}function $6(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let s=0,o;s<e.length;s++)(o=e[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[s]=null);return i}function H6(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Yb(e,t,n,r){let i=[],s=!1;t.forEach((a,l)=>{let u=$6(e,a,l+n);if(u){s=!0;let c=Yb(u,a,n+l+1,r);c!=Mr&&i.push(l,l+a.nodeSize,c)}});let o=z6(s?H6(e):e,-n).sort(sc);for(let a=0;a<o.length;a++)o[a].type.valid(t,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||i.length?new qn(o,i):Mr}function sc(e,t){return e.from-t.from||e.to-t.to}function VR(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let s=t[i];if(s.from==r.from){s.to!=r.to&&(t==e&&(t=e.slice()),t[i]=s.copy(s.from,r.to),E2(t,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,s.from),E2(t,i,r.copy(s.from,r.to)));break}}}return t}function E2(e,t,n){for(;t<e.length&&sc(n,e[t])>0;)t++;e.splice(t,0,n)}function Cx(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Mr&&t.push(r)}),e.cursorWrapper&&t.push(qn.create(e.state.doc,[e.cursorWrapper.deco])),ll.from(t)}const jCe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},UCe=wi&&Tl<=11;class WCe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class qCe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new WCe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);wi&&Tl<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),UCe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,jCe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(g2(this.view)){if(this.suppressingSelectionUpdates)return ha(this.view);if(wi&&Tl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&kc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let s=t.focusNode;s;s=_m(s))n.add(s);for(let s=t.anchorNode;s;s=_m(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&g2(t)&&!this.ignoreSelectionChange(r),s=-1,o=-1,a=!1,l=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(s=s<0?d.from:Math.min(d.from,s),o=o<0?d.to:Math.max(d.to,o),d.typeOver&&(a=!0))}if(Bs&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||YCe(t,d)!=h)&&f.remove()}}}let u=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&l_(r)&&(u=LR(t))&&u.eq(Et.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,ha(t),this.currentSelection.set(r),t.scrollToSelection()):(s>-1||i)&&(s>-1&&(t.docView.markDirty(s,o),GCe(t)),this.handleDOMChange(s,o,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ha(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,s=t.nextSibling;if(wi&&Tl<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(i=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(s=f)}let o=i&&i.parentNode==t.target?Tr(i)+1:0,a=r.localPosFromDOM(t.target,o,-1),l=s&&s.parentNode==t.target?Tr(s):t.target.childNodes.length,u=r.localPosFromDOM(t.target,l,1);return{from:a,to:u}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let T2=new WeakMap,k2=!1;function GCe(e){if(!T2.has(e)&&(T2.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Bs,k2)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),k2=!0}}function C2(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,s=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return kc(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function KCe(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return C2(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?C2(e,n):null}function YCe(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function XCe(e,t,n){let{node:r,fromOffset:i,toOffset:s,from:o,to:a}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,c=l.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],l_(l)||u.push({node:l.focusNode,offset:l.focusOffset})),zr&&e.input.lastKeyCode===8)for(let g=s;g>i;g--){let v=r.childNodes[g-1],w=v.pmViewDesc;if(v.nodeName=="BR"&&!w){s=g;break}if(!w||w.size)break}let d=e.state.doc,f=e.someProp("domParser")||Ip.fromSchema(e.state.schema),h=d.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:JCe,context:h});if(u&&u[0].pos!=null){let g=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=g),p={anchor:g+o,head:v+o}}return{doc:m,sel:p,from:o,to:a}}function JCe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(ii&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||ii&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const QCe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ZCe(e,t,n,r,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let R=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,O=LR(e,R);if(O&&!e.state.selection.eq(O)){if(zr&&sa&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",E=>E(e,Au(13,"Enter"))))return;let M=e.state.tr.setSelection(O);R=="pointer"?M.setMeta("pointer",!0):R=="key"&&M.scrollIntoView(),s&&M.setMeta("composition",s),e.dispatch(M)}return}let o=e.state.doc.resolve(t),a=o.sharedDepth(n);t=o.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,u=XCe(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let p=nOe(d.content,u.doc.content,u.from,f,h);if(p&&e.input.domChangeCount++,(Cf&&e.input.lastIOSEnter>Date.now()-225||sa)&&i.some(R=>R.nodeType==1&&!QCe.test(R.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",R=>R(e,Au(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof bt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let R=O2(e,e.state.doc,u.sel);if(R&&!R.eq(e.state.selection)){let O=e.state.tr.setSelection(R);s&&O.setMeta("composition",s),e.dispatch(O)}}return}e.state.selection.from<e.state.selection.to&&p.start==p.endB&&e.state.selection instanceof bt&&(p.start>e.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?p.start=e.state.selection.from:p.endA<e.state.selection.to&&p.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),wi&&Tl<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=u.doc.resolveNoCache(p.start-u.from),g=u.doc.resolveNoCache(p.endB-u.from),v=c.resolve(p.start),w=m.sameParent(g)&&m.parent.inlineContent&&v.end()>=p.endA,b;if((Cf&&e.input.lastIOSEnter>Date.now()-225&&(!w||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!w&&m.pos<u.doc.content.size&&!m.sameParent(g)&&(b=Et.findFrom(u.doc.resolve(m.pos+1),1,!0))&&b.head==g.pos)&&e.someProp("handleKeyDown",R=>R(e,Au(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&tOe(c,p.start,p.endA,m,g)&&e.someProp("handleKeyDown",R=>R(e,Au(8,"Backspace")))){sa&&zr&&e.domObserver.suppressSelectionUpdates();return}zr&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),sa&&!w&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,g=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(R){return R(e,Au(13,"Enter"))})},20));let _=p.start,x=p.endA,S,I,P;if(w){if(m.pos==g.pos)wi&&Tl<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ha(e),20)),S=e.state.tr.delete(_,x),I=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(P=eOe(m.parent.content.cut(m.parentOffset,g.parentOffset),v.parent.content.cut(v.parentOffset,p.endA-v.start()))))S=e.state.tr,P.type=="add"?S.addMark(_,x,P.mark):S.removeMark(_,x,P.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let R=m.parent.textBetween(m.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",O=>O(e,_,x,R)))return;S=e.state.tr.insertText(R,_,x)}}if(S||(S=e.state.tr.replace(_,x,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let R=O2(e,S.doc,u.sel);R&&!(zr&&e.composing&&R.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(R.head==_||R.head==S.mapping.map(x)-1)||wi&&R.empty&&R.head==_)&&S.setSelection(R)}I&&S.ensureMarks(I),s&&S.setMeta("composition",s),e.dispatch(S.scrollIntoView())}function O2(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:FR(e,t.resolve(n.anchor),t.resolve(n.head))}function eOe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,s=r,o,a,l;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)s=n[c].removeFromSet(s);if(i.length==1&&s.length==0)a=i[0],o="add",l=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(l(t.child(c)));if(Be.from(u).eq(e))return{mark:a,type:o}}function tOe(e,t,n,r,i){if(n-t<=i.pos-r.pos||Ox(r,!0,!1)<i.pos)return!1;let s=e.resolve(t);if(!r.parent.isTextblock){let a=s.nodeAfter;return a!=null&&n==t+a.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let o=e.resolve(Ox(s,!0,!0));return!o.parent.isTextblock||o.pos>n||Ox(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Ox(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let s=e.node(r).maybeChild(e.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function nOe(e,t,n,r,i){let s=e.findDiffStart(t,n);if(s==null)return null;let{a:o,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));r-=o+l-s}if(o<s&&e.size<t.size){let l=r<=s&&r>=o?s-r:0;s-=l,s&&s<t.size&&R2(t.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-o),o=s}else if(a<s){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<e.size&&R2(e.textBetween(s-1,s+1))&&(s+=l?1:-1),o=s+(o-a),a=s}return{start:s,endA:o,endB:a}}function R2(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class rOe{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new SCe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(D2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=P2(this),A2(this),this.nodeViews=M2(this),this.docView=c2(this.state.doc,I2(this),Cx(this),this.dom,this),this.domObserver=new qCe(this,(r,i,s,o)=>ZCe(this,r,i,s,o)),this.domObserver.start(),xCe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&ek(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(D2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(N6(this),o=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=M2(this);sOe(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&ek(this),this.editable=P2(this),A2(this);let l=Cx(this),u=I2(this),c=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(i.selection))&&(o=!0);let f=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Fke(this);if(o){this.domObserver.stop();let h=d&&(wi||zr)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&iOe(i.selection,t.selection);if(d){let p=zr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=LCe(this)),(s||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=c2(t.doc,u,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&aCe(this))?ha(this,h):(S6(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&Bke(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ot){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&i2(this,n.getBoundingClientRect(),t)}else i2(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new F6(t.slice,t.move,i<0?void 0:ot.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[t];if(a!=null&&(i=n?n(a):a))return i}let s=this.state.plugins;if(s)for(let o=0;o<s.length;o++){let a=s[o].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(wi){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&zke(this.dom),ha(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return Uke(this,t)}coordsAtPos(t,n=1){return p6(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return Yke(this,n||this.state,t)}pasteHTML(t,n){return xm(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return xm(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(ECe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Cx(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,kke())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return kCe(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?ii&&this.root.nodeType===11&&Ake(this.dom.ownerDocument)==this.dom&&KCe(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function I2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Ai.node(0,e.state.doc.content.size,t)]}function A2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ai.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function P2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function iOe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function M2(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function sOe(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function D2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Wl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Xb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oOe=typeof navigator<"u"&&/Mac/.test(navigator.platform),aOe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var kr=0;kr<10;kr++)Wl[48+kr]=Wl[96+kr]=String(kr);for(var kr=1;kr<=24;kr++)Wl[kr+111]="F"+kr;for(var kr=65;kr<=90;kr++)Wl[kr]=String.fromCharCode(kr+32),Xb[kr]=String.fromCharCode(kr);for(var Rx in Wl)Xb.hasOwnProperty(Rx)||(Xb[Rx]=Wl[Rx]);function lOe(e){var t=oOe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||aOe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Xb:Wl)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const uOe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function cOe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<t.length-1;a++){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))uOe?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),o&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function dOe(e){let t=Object.create(null);for(let n in e)t[cOe(n)]=e[n];return t}function Ix(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function fOe(e){return new or({props:{handleKeyDown:V6(e)}})}function V6(e){let t=dOe(e);return function(n,r){let i=lOe(r),s,o=t[Ix(i,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[Ix(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(s=Wl[r.keyCode])&&s!=i){let a=t[Ix(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const hOe=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function j6(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const pOe=(e,t,n)=>{let r=j6(e,n);if(!r)return!1;let i=jR(r);if(!i){let o=r.blockRange(),a=o&&uh(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(G6(e,i,t,-1))return!0;if(r.parent.content.size==0&&(Of(s,"end")||ot.isSelectable(s)))for(let o=r.depth;;o--){let a=o_(e.doc,r.before(o),r.after(o),Xe.empty);if(a&&a.slice.size<a.to-a.from){if(t){let l=e.tr.step(a);l.setSelection(Of(s,"end")?Et.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):ot.create(l.doc,i.pos-s.nodeSize)),t(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},mOe=(e,t,n)=>{let r=j6(e,n);if(!r)return!1;let i=jR(r);return i?U6(e,i,t):!1},gOe=(e,t,n)=>{let r=W6(e,n);if(!r)return!1;let i=UR(r);return i?U6(e,i,t):!1};function U6(e,t,n){let r=t.nodeBefore,i=r,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=t.nodeAfter,a=o,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=o_(e.doc,s,l,Xe.empty);if(!u||u.from!=s||u instanceof fr&&u.slice.size>=l-s)return!1;if(n){let c=e.tr.step(u);c.setSelection(bt.create(c.doc,s)),n(c.scrollIntoView())}return!0}function Of(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const vOe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=jR(r)}let o=s&&s.nodeBefore;return!o||!ot.isSelectable(o)?!1:(t&&t(e.tr.setSelection(ot.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function jR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function W6(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const yOe=(e,t,n)=>{let r=W6(e,n);if(!r)return!1;let i=UR(r);if(!i)return!1;let s=i.nodeAfter;if(G6(e,i,t,1))return!0;if(r.parent.content.size==0&&(Of(s,"start")||ot.isSelectable(s))){let o=o_(e.doc,r.before(),r.after(),Xe.empty);if(o&&o.slice.size<o.to-o.from){if(t){let a=e.tr.step(o);a.setSelection(Of(s,"start")?Et.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):ot.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},bOe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=UR(r)}let o=s&&s.nodeAfter;return!o||!ot.isSelectable(o)?!1:(t&&t(e.tr.setSelection(ot.create(e.doc,s.pos)).scrollIntoView()),!0)};function UR(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const wOe=(e,t)=>{let n=e.selection,r=n instanceof ot,i;if(r){if(n.node.isTextblock||!cu(e.doc,n.from))return!1;i=n.from}else if(i=s_(e.doc,n.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);r&&s.setSelection(ot.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},_Oe=(e,t)=>{let n=e.selection,r;if(n instanceof ot){if(n.node.isTextblock||!cu(e.doc,n.to))return!1;r=n.to}else if(r=s_(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},SOe=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),s=i&&uh(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},xOe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` `).scrollIntoView()),!0)};function q6(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const EOe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),o=q6(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,o.createAndFill());l.setSelection(Et.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},TOe=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ts||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=q6(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(o,s.createAndFill());a.setSelection(bt.create(a.doc,o+1)),t(a.scrollIntoView())}return!0},kOe=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(Kd(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&uh(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},COe=(e,t)=>{let{$from:n,to:r}=e.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),t&&t(e.tr.setSelection(ot.create(e.doc,i))),!0)};function OOe(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,s=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||cu(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function G6(e,t,n,r){let i=t.nodeBefore,s=t.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&OOe(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(n){let h=t.pos+s.nodeSize,p=Be.empty;for(let v=o.length-1;v>=0;v--)p=Be.from(o[v].create(null,p));p=Be.from(i.copy(p));let m=e.tr.step(new pr(t.pos-1,h,t.pos,h,new Xe(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&cu(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||r>0&&l?null:Et.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&uh(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&Of(s,"start",!0)&&Of(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let v=Be.empty;for(let b=p.length-1;b>=0;b--)v=Be.from(p[b].copy(v));let w=e.tr.step(new pr(t.pos-p.length,t.pos+s.nodeSize,t.pos+g,t.pos+s.nodeSize-g,new Xe(v,p.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function K6(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(t.tr.setSelection(bt.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const ROe=K6(-1),IOe=K6(1);function AOe(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),a=o&&MR(o,e,t);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function N2(e,t=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[s];n.doc.nodesBetween(o,a,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let c=n.doc.resolve(u),d=c.index();i=c.parent.canReplaceWith(d,d+1,e)}})}if(!i)return!1;if(r){let s=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];s.setBlockType(a,l,e,t)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function POe(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s);if(!o)return!1;let a=r?n.tr:null;return MOe(a,o,e,t)?(r&&r(a.scrollIntoView()),!0):!1}}function MOe(e,t,n,r=null){let i=!1,s=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=o.resolve(t.start-2);s=new jb(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new jb(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let a=MR(s,n,r,t);return a?(e&&DOe(e,t,a,i,n),!0):!1}function DOe(e,t,n,r,i){let s=Be.empty;for(let c=n.length-1;c>=0;c--)s=Be.from(n[c].type.create(n[c].attrs,s));e.step(new pr(t.start-(r?2:0),t.end,t.start,t.end,new Xe(s,0,0),n.length,!0));let o=0;for(let c=0;c<n.length;c++)n[c].type==i&&(o=c+1);let a=n.length-o,l=t.start+n.length-(r?2:0),u=t.parent;for(let c=t.startIndex,d=t.endIndex,f=!0;c<d;c++,f=!1)!f&&Kd(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return e}function NOe(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,o=>o.childCount>0&&o.firstChild.type==e);return s?n?r.node(s.depth-1).type==e?LOe(t,n,e,s):FOe(t,n,s):!0:!1}}function LOe(e,t,n,r){let i=e.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new pr(s-1,o,s,o,new Xe(Be.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new jb(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));const a=uh(r);if(a==null)return!1;i.lift(r,a);let l=i.mapping.map(s,-1)-1;return cu(i.doc,l)&&i.join(l),t(i.scrollIntoView()),!0}function FOe(e,t,n){let r=e.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?Be.empty:Be.from(i))))return!1;let d=s.pos,f=d+o.nodeSize;return r.step(new pr(d-(a?1:0),f+(l?1:0),d+1,f-1,new Xe((a?Be.empty:Be.from(i.copy(Be.empty))).append(l?Be.empty:Be.from(i.copy(Be.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function BOe(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=Be.from(u?e.create():null),d=new Xe(Be.from(e.create(null,Be.from(a.type.create(null,c)))),u?3:1,0),f=s.start,h=s.end;n(t.tr.step(new pr(f-(u?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function d_(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}class f_{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:i}=n,{tr:s}=r,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{const d=l(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:s}=this,{view:o}=i,a=[],l=!!t,u=t||s.tr,c=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{const g=this.buildProps(u,n),v=h(...m)(g);return a.push(v),d}])),run:c};return d}createCan(t){const{rawCommands:n,state:r}=this,i=!1,s=t||r.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:s}=this,{view:o}=i,a={tr:t,editor:i,view:o,state:d_({state:s,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class zOe{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(i=>i.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(i=>i!==n):delete this.callbacks[t]),this}once(t,n){const r=(...i)=>{this.off(t,r),n.apply(this,i)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}}function Ze(e,t,n){return e.config[t]===void 0&&e.parent?Ze(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ze(e.parent,t,n):null}):e.config[t]}function h_(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Y6(e){const t=[],{nodeExtensions:n,markExtensions:r}=h_(e),i=[...n,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:i},l=Ze(o,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,h])=>{t.push({type:d,name:f,attribute:{...s,...h}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=Ze(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,d])=>{const f={...s,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,t.push({type:o.name,name:c,attribute:f})})}),t}function gr(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function sr(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const a=s?String(s).split(" "):[],l=r[i]?r[i].split(" "):[],u=a.filter(c=>!l.includes(c));r[i]=[...l,...u].join(" ")}else if(i==="style"){const a=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],l=r[i]?r[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[d,f]=c.split(":").map(h=>h.trim());u.set(d,f)}),a.forEach(c=>{const[d,f]=c.split(":").map(h=>h.trim());u.set(d,f)}),r[i]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[i]=s}),r},{})}function tk(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>sr(n,r),{})}function X6(e){return typeof e=="function"}function Ct(e,t=void 0,...n){return X6(e)?t?e.bind(t)(...n):e(...n):e}function $Oe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function HOe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function L2(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):HOe(n.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...r,...i}}}}function F2(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&$Oe(n)?!1:n!=null))}function VOe(e,t){var n;const r=Y6(e),{nodeExtensions:i,markExtensions:s}=h_(e),o=(n=i.find(u=>Ze(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(i.map(u=>{const c=r.filter(v=>v.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((v,w)=>{const b=Ze(w,"extendNodeSchema",d);return{...v,...b?b(u):{}}},{}),h=F2({...f,content:Ct(Ze(u,"content",d)),marks:Ct(Ze(u,"marks",d)),group:Ct(Ze(u,"group",d)),inline:Ct(Ze(u,"inline",d)),atom:Ct(Ze(u,"atom",d)),selectable:Ct(Ze(u,"selectable",d)),draggable:Ct(Ze(u,"draggable",d)),code:Ct(Ze(u,"code",d)),whitespace:Ct(Ze(u,"whitespace",d)),linebreakReplacement:Ct(Ze(u,"linebreakReplacement",d)),defining:Ct(Ze(u,"defining",d)),isolating:Ct(Ze(u,"isolating",d)),attrs:Object.fromEntries(c.map(v=>{var w;return[v.name,{default:(w=v==null?void 0:v.attribute)===null||w===void 0?void 0:w.default}]}))}),p=Ct(Ze(u,"parseHTML",d));p&&(h.parseDOM=p.map(v=>L2(v,c)));const m=Ze(u,"renderHTML",d);m&&(h.toDOM=v=>m({node:v,HTMLAttributes:tk(v,c)}));const g=Ze(u,"renderText",d);return g&&(h.toText=g),[u.name,h]})),l=Object.fromEntries(s.map(u=>{const c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,v)=>{const w=Ze(v,"extendMarkSchema",d);return{...g,...w?w(u):{}}},{}),h=F2({...f,inclusive:Ct(Ze(u,"inclusive",d)),excludes:Ct(Ze(u,"excludes",d)),group:Ct(Ze(u,"group",d)),spanning:Ct(Ze(u,"spanning",d)),code:Ct(Ze(u,"code",d)),attrs:Object.fromEntries(c.map(g=>{var v;return[g.name,{default:(v=g==null?void 0:g.attribute)===null||v===void 0?void 0:v.default}]}))}),p=Ct(Ze(u,"parseHTML",d));p&&(h.parseDOM=p.map(g=>L2(g,c)));const m=Ze(u,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:tk(g,c)})),[u.name,h]}));return new jW({topNode:o,nodes:a,marks:l})}function Ax(e,t){return t.nodes[e]||t.marks[e]||null}function B2(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function WR(e,t){const n=zc.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}const jOe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,r-s))}),n};function qR(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class p_{constructor(t){this.find=t.find,this.handler=t.handler}}const UOe=(e,t)=>{if(qR(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function bv(e){var t;const{editor:n,from:r,to:i,text:s,rules:o,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1;const d=jOe(u)+s;return o.forEach(f=>{if(c)return;const h=UOe(d,f.find);if(!h)return;const p=l.state.tr,m=d_({state:l.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:v,chain:w,can:b}=new f_({editor:n,state:m});f.handler({state:m,range:g,match:h,commands:v,chain:w,can:b})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:r,to:i,text:s}),l.dispatch(p),c=!0)}),c}function WOe(e){const{editor:t,rules:n}=e,r=new or({state:{init(){return null},apply(i,s,o){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=WR(Be.from(c),o.schema);const{from:d}=l,f=d+c.length;bv({editor:t,from:d,to:f,text:c,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return bv({editor:t,from:s,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&bv({editor:t,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?bv({editor:t,from:o.pos,to:o.pos,text:` `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function qOe(e){return Object.prototype.toString.call(e).slice(8,-1)}function wv(e){return qOe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function m_(e,t){const n={...e};return wv(e)&&wv(t)&&Object.keys(t).forEach(r=>{wv(t[r])&&wv(e[r])?n[r]=m_(e[r],t[r]):n[r]=t[r]}),n}class zs{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ct(Ze(this,"addOptions",{name:this.name}))),this.storage=Ct(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new zs(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>m_(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new zs(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ct(Ze(n,"addOptions",{name:n.name})),n.storage=Ct(Ze(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}function GOe(e){return typeof e=="number"}class KOe{constructor(t){this.find=t.find,this.handler=t.handler}}const YOe=(e,t,n)=>{if(qR(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function XOe(e){const{editor:t,state:n,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=e,{commands:l,chain:u,can:c}=new f_({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),g=Math.min(i,p+h.content.size),v=h.textBetween(m-p,g-p,void 0,"");YOe(v,s.find,o).forEach(b=>{if(b.index===void 0)return;const _=m+b.index+1,x=_+b[0].length,S={from:n.tr.mapping.map(_),to:n.tr.mapping.map(x)},I=s.handler({state:n,range:S,match:b,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});d.push(I)})}),d.every(h=>h!==null)}let _v=null;const JOe=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function QOe(e){const{editor:t,rules:n}=e;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:d,to:f,rule:h,pasteEvt:p})=>{const m=c.tr,g=d_({state:c,transaction:m});if(!(!XOe({editor:t,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new or({view(d){const f=p=>{var m;r=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?d.dom.parentElement:null,r&&(_v=t)},h=()=>{_v&&(_v=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,a=f,!s){const h=_v;h&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return o=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,v=p.getMeta("applyPasteRules"),w=!!v;if(!m&&!g&&!w)return;if(w){let{text:x}=v;typeof x=="string"?x=x:x=WR(Be.from(x),h.schema);const{from:S}=v,I=S+x.length,P=JOe(x);return l({rule:c,state:h,from:S,to:{b:I},pasteEvt:P})}const b=f.doc.content.findDiffStart(h.doc.content),_=f.doc.content.findDiffEnd(h.doc.content);if(!(!GOe(b)||!_||b===_.b))return l({rule:c,state:h,from:b,to:_,pasteEvt:o})}}))}function ZOe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class Ad{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Ad.resolve(t),this.schema=VOe(this.extensions,n),this.setupExtensions()}static resolve(t){const n=Ad.sort(Ad.flatten(t)),r=ZOe(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=Ze(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((r,i)=>{const s=Ze(r,"priority")||100,o=Ze(i,"priority")||100;return s>o?-1:s<o?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Ax(n.name,this.schema)},i=Ze(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=Ad.sort([...this.extensions].reverse()),r=[],i=[],s=n.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:t,type:Ax(o.name,this.schema)},l=[],u=Ze(o,"addKeyboardShortcuts",a);let c={};if(o.type==="mark"&&Ze(o,"exitable",a)&&(c.ArrowRight=()=>zs.handleExit({editor:t,mark:o})),u){const m=Object.fromEntries(Object.entries(u()).map(([g,v])=>[g,()=>v({editor:t})]));c={...c,...m}}const d=fOe(c);l.push(d);const f=Ze(o,"addInputRules",a);B2(o,t.options.enableInputRules)&&f&&r.push(...f());const h=Ze(o,"addPasteRules",a);B2(o,t.options.enablePasteRules)&&h&&i.push(...h());const p=Ze(o,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[WOe({editor:t,rules:r}),...QOe({editor:t,rules:i}),...s]}get attributes(){return Y6(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=h_(this.extensions);return Object.fromEntries(n.filter(r=>!!Ze(r,"addNodeView")).map(r=>{const i=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:t,type:gr(r.name,this.schema)},o=Ze(r,"addNodeView",s);if(!o)return[];const a=(l,u,c,d,f)=>{const h=tk(l,i);return o()({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:t,extension:r,HTMLAttributes:h})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Ax(t.name,this.schema)};t.type==="mark"&&(!((n=Ct(Ze(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const i=Ze(t,"onBeforeCreate",r),s=Ze(t,"onCreate",r),o=Ze(t,"onUpdate",r),a=Ze(t,"onSelectionUpdate",r),l=Ze(t,"onTransaction",r),u=Ze(t,"onFocus",r),c=Ze(t,"onBlur",r),d=Ze(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}}class vr{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ct(Ze(this,"addOptions",{name:this.name}))),this.storage=Ct(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new vr(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>m_(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new vr({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ct(Ze(n,"addOptions",{name:n.name})),n.storage=Ct(Ze(n,"addStorage",{name:n.name,options:n.options})),n}}function J6(e,t,n){const{from:r,to:i}=t,{blockSeparator:s=` `,textSerializers:o={}}=n||{};let a="";return e.nodesBetween(r,i,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(a+=s);const h=o==null?void 0:o[l.type.name];if(h)return c&&(a+=h({node:l,pos:u,parent:c,index:d,range:t})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,u)-u,i-u))}),a}function Q6(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const eRe=vr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new or({key:new li("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=Q6(n);return J6(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),tRe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),nRe=(e=!1)=>({commands:t})=>t.setContent("",e),rRe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=uh(h);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(h.start,m)}(p||p===0)&&t.lift(h,p)})}),!0},iRe=e=>t=>e(t),sRe=()=>({state:e,dispatch:t})=>TOe(e,t),oRe=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const o=r.mapping.map(t);return r.insert(o,s.content),r.setSelection(new bt(r.doc.resolve(o-1))),!0},aRe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(t){const a=i.before(s),l=i.after(s);e.delete(a,l).scrollIntoView()}return!0}return!1},lRe=e=>({tr:t,state:n,dispatch:r})=>{const i=gr(e,n.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const l=s.before(o),u=s.after(o);t.delete(l,u).scrollIntoView()}return!0}return!1},uRe=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},cRe=()=>({state:e,dispatch:t})=>hOe(e,t),dRe=()=>({commands:e})=>e.keyboardShortcut("Enter"),fRe=()=>({state:e,dispatch:t})=>EOe(e,t);function Jb(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:qR(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function Z6(e,t,n={}){return e.find(r=>r.type===t&&Jb(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function z2(e,t,n={}){return!!Z6(e,t,n)}function GR(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===t)||(n=n||((r=i.node.marks[0])===null||r===void 0?void 0:r.attrs),!Z6([...i.node.marks],t,n)))return;let o=i.index,a=e.start()+i.offset,l=o+1,u=a+i.node.nodeSize;for(;o>0&&z2([...e.parent.child(o-1).marks],t,n);)o-=1,a-=e.parent.child(o).nodeSize;for(;l<e.parent.childCount&&z2([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function fu(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const hRe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const s=fu(e,r.schema),{doc:o,selection:a}=n,{$from:l,from:u,to:c}=a;if(i){const d=GR(l,s,t);if(d&&d.from<=u&&d.to>=c){const f=bt.create(o,d.from,d.to);n.setSelection(f)}}return!0},pRe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function KR(e){return e instanceof bt}function oa(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function eq(e,t=null){if(!t)return null;const n=Et.atStart(e),r=Et.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,s=r.to;return t==="all"?bt.create(e,oa(0,i,s),oa(e.content.size,i,s)):bt.create(e,oa(t,i,s),oa(t,i,s))}const mRe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!KR(n.state.selection))return o(),!0;const a=eq(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},gRe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),vRe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),tq=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&tq(r)}return e};function Sv(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return tq(n)}function Qb(e,t,n){if(e instanceof El||e instanceof Be)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return Be.fromArray(e.map(a=>t.nodeFromJSON(a)));const o=t.nodeFromJSON(e);return n.errorOnInvalidContent&&o.check(),o}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),Qb("",t,n)}if(i){if(n.errorOnInvalidContent){let o=!1,a="";const l=new jW({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Ip.fromSchema(l).parseSlice(Sv(e),n.parseOptions):Ip.fromSchema(l).parse(Sv(e),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Ip.fromSchema(t);return n.slice?s.parseSlice(Sv(e),n.parseOptions).content:s.parse(Sv(e),n.parseOptions)}return Qb("",t,n)}function yRe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof fr||i instanceof pr))return;const s=e.mapping.maps[r];let o=0;s.forEach((a,l,u,c)=>{o===0&&(o=c)}),e.setSelection(Et.near(e.doc.resolve(o),n))}const bRe=e=>!("type"in e),wRe=(e,t,n)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=Qb(t,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(o=n.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(p){return s.emit("contentError",{editor:s,error:p,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,d=!0;if((bRe(a)?a:[a]).forEach(p=>{p.check(),c=c?p.isText&&p.marks.length===0:!1,d=d?p.isBlock:!1}),l===u&&d){const{parent:p}=r.doc.resolve(l);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(l-=1,u+=1)}let h;if(c){if(Array.isArray(t))h=t.map(p=>p.text||"").join("");else if(t instanceof Be){let p="";t.forEach(m=>{m.text&&(p+=m.text)}),h=p}else typeof t=="object"&&t&&t.text?h=t.text:h=t;r.insertText(h,l,u)}else h=a,r.replaceWith(l,u,h);n.updateSelection&&yRe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:h})}return!0},_Re=()=>({state:e,dispatch:t})=>wOe(e,t),SRe=()=>({state:e,dispatch:t})=>_Oe(e,t),xRe=()=>({state:e,dispatch:t})=>pOe(e,t),ERe=()=>({state:e,dispatch:t})=>yOe(e,t),TRe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=s_(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},kRe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=s_(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},CRe=()=>({state:e,dispatch:t})=>mOe(e,t),ORe=()=>({state:e,dispatch:t})=>gOe(e,t);function nq(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function rq(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function RRe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<t.length-1;a+=1){const l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))nq()||rq()?o=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}const IRe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const s=RRe(e).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const c=u.map(r.mapping);c&&i&&r.maybeStep(c)}),!0};function Tm(e,t,n={}){const{from:r,to:i,empty:s}=e.selection,o=t?gr(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=i-r,u=a.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>Jb(d.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}const ARe=(e,t={})=>({state:n,dispatch:r})=>{const i=gr(e,n.schema);return Tm(n,i,t)?SOe(n,r):!1},PRe=()=>({state:e,dispatch:t})=>kOe(e,t),MRe=e=>({state:t,dispatch:n})=>{const r=gr(e,t.schema);return NOe(r)(t,n)},DRe=()=>({state:e,dispatch:t})=>xOe(e,t);function g_(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function $2(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const NRe=(e,t)=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=g_(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(s=gr(e,r.schema)),a==="mark"&&(o=fu(e,r.schema)),i&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{s&&s===u.type&&n.setNodeMarkup(c,void 0,$2(u.attrs,t)),o&&u.marks.length&&u.marks.forEach(d=>{o===d.type&&n.addMark(c,c+u.nodeSize,o.create($2(d.attrs,t)))})})}),!0):!1},LRe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),FRe=()=>({tr:e,dispatch:t})=>{if(t){const n=new ts(e.doc);e.setSelection(n)}return!0},BRe=()=>({state:e,dispatch:t})=>vOe(e,t),zRe=()=>({state:e,dispatch:t})=>bOe(e,t),$Re=()=>({state:e,dispatch:t})=>COe(e,t),HRe=()=>({state:e,dispatch:t})=>IOe(e,t),VRe=()=>({state:e,dispatch:t})=>ROe(e,t);function nk(e,t,n={},r={}){return Qb(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const jRe=(e,t=!1,n={},r={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{var l,u;const{doc:c}=s;if(n.preserveWhitespace!=="full"){const d=nk(e,i.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!t),!0}return o&&s.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:c.content.size},e,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function iq(e,t){const n=fu(t,e.schema),{from:r,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function URe(e,t){const n=new s6(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function WRe(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function qRe(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function GRe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function YR(e){return t=>GRe(t.$from,e)}function KRe(e,t){const n={from:0,to:e.content.size};return J6(e,n,t)}function YRe(e,t){const n=gr(t,e.schema),{from:r,to:i}=e.selection,s=[];e.doc.nodesBetween(r,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function sq(e,t){const n=g_(typeof t=="string"?t:t.name,e.schema);return n==="node"?YRe(e,t):n==="mark"?iq(e,t):{}}function XRe(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function JRe(e){const t=XRe(e);return t.length===1?t:t.filter((n,r)=>!t.filter((s,o)=>o!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function QRe(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const u=t.slice(s).map(a,-1),c=t.slice(s).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),JRe(r)}function XR(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const s=n.resolve(e),o=GR(s,i.type);o&&r.push({mark:i,...o})}):n.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}function _y(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(s=>s.type===t&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}function rk(e,t,n={}){const{empty:r,ranges:i}=e.selection,s=t?fu(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>Jb(d.attrs,n,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;e.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;const v=Math.max(h,g),w=Math.min(p,g+m.nodeSize),b=w-v;o+=b,a.push(...m.marks.map(_=>({mark:_,from:v,to:w})))})}),o===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>Jb(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=o}function ZRe(e,t,n={}){if(!t)return Tm(e,null,n)||rk(e,null,n);const r=g_(t,e.schema);return r==="node"?Tm(e,t,n):r==="mark"?rk(e,t,n):!1}function H2(e,t){const{nodeExtensions:n}=h_(t),r=n.find(o=>o.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=Ct(Ze(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function v_(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(s=>{i!==!1&&(v_(s,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function oq(e){return e instanceof ot}function eIe(e,t,n){const i=e.state.doc.content.size,s=oa(t,0,i),o=oa(n,0,i),a=e.coordsAtPos(s),l=e.coordsAtPos(o,-1),u=Math.min(a.top,l.top),c=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),h=f-d,p=c-u,v={top:u,bottom:c,left:d,right:f,width:h,height:p,x:d,y:u};return{...v,toJSON:()=>v}}function tIe(e,t,n){var r;const{selection:i}=t;let s=null;if(KR(i)&&(s=i.$cursor),s){const a=(r=e.storedMarks)!==null&&r!==void 0?r:s.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){const h=!f||f.type.allowsMarkType(n),p=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=h&&p}return!u}),u})}const nIe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:o,ranges:a}=s,l=fu(e,r.schema);if(i)if(o){const u=iq(r,l);n.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,h)=>{const p=Math.max(h,c),m=Math.min(h+f.nodeSize,d);f.marks.find(v=>v.type===l)?f.marks.forEach(v=>{l===v.type&&n.addMark(p,m,l.create({...v.attrs,...t}))}):n.addMark(p,m,l.create(t))})});return tIe(r,n,l)},rIe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),iIe=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const s=gr(e,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>N2(s,{...o,...t})(n)?!0:a.clearNodes()).command(({state:a})=>N2(s,{...o,...t})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},sIe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=oa(e,0,r.content.size),s=ot.create(r,i);t.setSelection(s)}return!0},oIe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=bt.atStart(r).from,a=bt.atEnd(r).to,l=oa(i,o,a),u=oa(s,o,a),c=bt.create(r,l,u);t.setSelection(c)}return!0},aIe=e=>({state:t,dispatch:n})=>{const r=gr(e,t.schema);return BOe(r)(t,n)};function V2(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const lIe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:o}=t,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=_y(u,a.node().type.name,a.node().attrs);if(s instanceof ot&&s.node.isBlock)return!a.parentOffset||!Kd(o,a.pos)?!1:(r&&(e&&V2(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:WRe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=d&&f?[{type:f,attrs:c}]:void 0,p=Kd(t.doc,t.mapping.map(a.pos),1,h);if(!h&&!p&&Kd(t.doc,t.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:c}]:void 0),r){if(p&&(s instanceof bt&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,h),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const m=t.mapping.map(a.before()),g=t.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(a.before()),f)}e&&V2(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return p},uIe=(e,t={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var o;const a=gr(e,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==a)return!1;const f=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let v=Be.empty;const w=l.index(-1)?1:l.index(-2)?2:3;for(let P=l.depth-w;P>=l.depth-3;P-=1)v=Be.from(l.node(P).copy(v));const b=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,_={..._y(f,l.node().type.name,l.node().attrs),...t},x=((o=a.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(_))||void 0;v=v.append(Be.from(a.createAndFill(null,x)||void 0));const S=l.before(l.depth-(w-1));n.replace(S,l.after(-b),new Xe(v,4-w,0));let I=-1;n.doc.nodesBetween(S,n.doc.content.size,(P,R)=>{if(I>-1)return!1;P.isTextblock&&P.content.size===0&&(I=R+1)}),I>-1&&n.setSelection(bt.near(n.doc.resolve(I))),n.scrollIntoView()}return!0}const h=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,p={..._y(f,d.type.name,d.attrs),...t},m={..._y(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);const g=h?[{type:a,attrs:p},{type:h,attrs:m}]:[{type:a,attrs:p}];if(!Kd(n.doc,l.pos,2))return!1;if(i){const{selection:v,storedMarks:w}=r,{splittableMarks:b}=s.extensionManager,_=w||v.$to.parentOffset&&v.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!_||!i)return!0;const x=_.filter(S=>b.includes(S.type.name));n.ensureMarks(x)}return!0},Px=(e,t)=>{const n=YR(o=>o.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&cu(e.doc,n.pos)&&e.join(n.pos),!0},Mx=(e,t)=>{const n=YR(o=>o.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&cu(e.doc,r)&&e.join(r),!0},cIe=(e,t,n,r={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:d,splittableMarks:f}=i.extensionManager,h=gr(e,o.schema),p=gr(t,o.schema),{selection:m,storedMarks:g}=o,{$from:v,$to:w}=m,b=v.blockRange(w),_=g||m.$to.parentOffset&&m.$from.marks();if(!b)return!1;const x=YR(S=>H2(S.type.name,d))(m);if(b.depth>=1&&x&&b.depth-x.depth<=1){if(x.node.type===h)return u.liftListItem(p);if(H2(x.node.type.name,d)&&h.validContent(x.node.content)&&a)return l().command(()=>(s.setNodeMarkup(x.pos,h),!0)).command(()=>Px(s,h)).command(()=>Mx(s,h)).run()}return!n||!_||!a?l().command(()=>c().wrapInList(h,r)?!0:u.clearNodes()).wrapInList(h,r).command(()=>Px(s,h)).command(()=>Mx(s,h)).run():l().command(()=>{const S=c().wrapInList(h,r),I=_.filter(P=>f.includes(P.type.name));return s.ensureMarks(I),S?!0:u.clearNodes()}).wrapInList(h,r).command(()=>Px(s,h)).command(()=>Mx(s,h)).run()},dIe=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,o=fu(e,r.schema);return rk(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},fIe=(e,t,n={})=>({state:r,commands:i})=>{const s=gr(e,r.schema),o=gr(t,r.schema),a=Tm(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...n})},hIe=(e,t={})=>({state:n,commands:r})=>{const i=gr(e,n.schema);return Tm(n,i,t)?r.lift(i):r.wrapIn(i,t)},pIe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(e))){if(t){const o=e.tr,a=s.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},mIe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},gIe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:a}=n,l=fu(e,r.schema),{$from:u,empty:c,ranges:d}=a;if(!i)return!0;if(c&&o){let{from:f,to:h}=a;const p=(s=u.marks().find(g=>g.type===l))===null||s===void 0?void 0:s.attrs,m=GR(u,l,p);m&&(f=m.from,h=m.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},vIe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=g_(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(s=gr(e,r.schema)),a==="mark"&&(o=fu(e,r.schema)),i&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;let d,f,h,p;n.selection.empty?r.doc.nodesBetween(u,c,(m,g)=>{s&&s===m.type&&(h=Math.max(g,u),p=Math.min(g+m.nodeSize,c),d=g,f=m)}):r.doc.nodesBetween(u,c,(m,g)=>{g<u&&s&&s===m.type&&(h=Math.max(g,u),p=Math.min(g+m.nodeSize,c),d=g,f=m),g>=u&&g<=c&&(s&&s===m.type&&n.setNodeMarkup(g,void 0,{...m.attrs,...t}),o&&m.marks.length&&m.marks.forEach(v=>{if(o===v.type){const w=Math.max(g,u),b=Math.min(g+m.nodeSize,c);n.addMark(w,b,o.create({...v.attrs,...t}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...t}),o&&f.marks.length&&f.marks.forEach(m=>{o===m.type&&n.addMark(h,p,o.create({...m.attrs,...t}))}))}),!0):!1},yIe=(e,t={})=>({state:n,dispatch:r})=>{const i=gr(e,n.schema);return AOe(i,t)(n,r)},bIe=(e,t={})=>({state:n,dispatch:r})=>{const i=gr(e,n.schema);return POe(i,t)(n,r)};var wIe=Object.freeze({__proto__:null,blur:tRe,clearContent:nRe,clearNodes:rRe,command:iRe,createParagraphNear:sRe,cut:oRe,deleteCurrentNode:aRe,deleteNode:lRe,deleteRange:uRe,deleteSelection:cRe,enter:dRe,exitCode:fRe,extendMarkRange:hRe,first:pRe,focus:mRe,forEach:gRe,insertContent:vRe,insertContentAt:wRe,joinBackward:xRe,joinDown:SRe,joinForward:ERe,joinItemBackward:TRe,joinItemForward:kRe,joinTextblockBackward:CRe,joinTextblockForward:ORe,joinUp:_Re,keyboardShortcut:IRe,lift:ARe,liftEmptyBlock:PRe,liftListItem:MRe,newlineInCode:DRe,resetAttributes:NRe,scrollIntoView:LRe,selectAll:FRe,selectNodeBackward:BRe,selectNodeForward:zRe,selectParentNode:$Re,selectTextblockEnd:HRe,selectTextblockStart:VRe,setContent:jRe,setMark:nIe,setMeta:rIe,setNode:iIe,setNodeSelection:sIe,setTextSelection:oIe,sinkListItem:aIe,splitBlock:lIe,splitListItem:uIe,toggleList:cIe,toggleMark:dIe,toggleNode:fIe,toggleWrap:hIe,undoInputRule:pIe,unsetAllMarks:mIe,unsetMark:gIe,updateAttributes:vIe,wrapIn:yIe,wrapInList:bIe});const _Ie=vr.create({name:"commands",addCommands(){return{...wIe}}}),SIe=vr.create({name:"drop",addProseMirrorPlugins(){return[new or({key:new li("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),xIe=vr.create({name:"editable",addProseMirrorPlugins(){return[new or({key:new li("editable"),props:{editable:()=>this.editor.options.editable}})]}}),EIe=vr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new or({key:new li("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),TIe=vr.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,v=m&&p.parent.childCount===1?g===d.pos:Et.atStart(u).from===f;return!c||!h.type.isTextblock||h.textContent.length||!v||v&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return nq()||rq()?s:i},addProseMirrorPlugins(){return[new or({key:new li("clearDocument"),appendTransaction:(e,t,n)=>{const r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),i=e.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:a}=t.selection,l=Et.atStart(t.doc).from,u=Et.atEnd(t.doc).to;if(s||!(o===l&&a===u)||!v_(n.doc))return;const f=n.tr,h=d_({state:n,transaction:f}),{commands:p}=new f_({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),kIe=vr.create({name:"paste",addProseMirrorPlugins(){return[new or({key:new li("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),CIe=vr.create({name:"tabindex",addProseMirrorPlugins(){return[new or({key:new li("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Pu{get name(){return this.node.type.name}constructor(t,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=i}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Pu(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Pu(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Pu(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,o=this.pos+r+(s?0:1),a=this.resolvedPos.doc.resolve(o);if(!i&&a.depth<=this.depth)return;const l=new Pu(a,this.editor,i,i?n:null);i&&(l.actualDepth=this.depth+1),t.push(new Pu(a,this.editor,i,i?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===t)if(Object.keys(n).length>0){const s=i.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(s[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(o=>{r&&i.length>0||(o.node.type.name===t&&s.every(l=>n[l]===o.node.attrs[l])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,n,r))))}),i}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}}const OIe=`.ProseMirror { position: relative; } .ProseMirror { word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror [contenteditable="false"] { white-space: normal; } .ProseMirror [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } .ProseMirror pre { white-space: pre-wrap; } img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; width: 0 !important; height: 0 !important; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; margin: 0; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection * { caret-color: transparent; } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 }`;function RIe(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let IIe=class extends zOe{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=RIe(OIe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=X6(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;r=n.filter(a=>!a.key.startsWith(o))}),n.length===r.length)return;const i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[xIe,eRe.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),_Ie,EIe,TIe,CIe,SIe,kIe].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Ad(i,this)}createCommandManager(){this.commandManager=new f_({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=nk(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=nk(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=eq(n,this.options.autofocus);this.view=new rOe(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Id.create({doc:n,selection:r||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),s=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return sq(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,i=typeof t=="string"?n:t;return ZRe(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return WR(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` `,textSerializers:r={}}=t||{};return KRe(this.state.doc,{blockSeparator:n,textSerializers:{...Q6(this.schema),...r}})}get isEmpty(){return v_(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Pu(n,this)}get $doc(){return this.$pos(0)}};function Oc(e){return new p_({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ct(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=t,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),u=n.from+a.indexOf(o),c=u+o.length;if(XR(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(m=>m===e.type&&m!==h.mark.type)).filter(h=>h.to>u).length)return null;c<n.to&&s.delete(c,n.to),u>n.from&&s.delete(n.from+l,u);const f=n.from+l+o.length;s.addMark(n.from+l,f,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}function AIe(e){return new p_({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ct(e.getAttributes,void 0,r)||{},{tr:s}=t,o=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=o+u;c>a?c=a:a=c+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(c,a,l)}else if(r[0]){const u=e.type.isInline?o:o-1;s.insert(u,e.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()}})}function ik(e){return new p_({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),s=Ct(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,s)}})}function km(e){return new p_({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const s=Ct(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),u=l&&MR(l,e.type,s);if(!u)return null;if(o.wrap(l,u),e.keepMarks&&e.editor){const{selection:d,storedMarks:f}=t,{splittableMarks:h}=e.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}const c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&cu(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&o.join(n.from-1)}})}let Us=class sk{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ct(Ze(this,"addOptions",{name:this.name}))),this.storage=Ct(Ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new sk(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>m_(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new sk(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ct(Ze(n,"addOptions",{name:n.name})),n.storage=Ct(Ze(n,"addStorage",{name:n.name,options:n.options})),n}};function ql(e){return new KOe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const s=Ct(e.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=t,a=r[r.length-1],l=r[0];let u=n.to;if(a){const c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(XR(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(g=>g===e.type&&g!==p.mark.type)).filter(p=>p.to>d).length)return null;f<n.to&&o.delete(f,n.to),d>n.from&&o.delete(n.from+c,d),u=n.from+c+a.length,o.addMark(n.from+c,u,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}var _i="top",ss="bottom",as="right",Si="left",JR="auto",fg=[_i,ss,as,Si],Rf="start",Cm="end",PIe="clippingParents",aq="viewport",Ph="popper",MIe="reference",j2=fg.reduce(function(e,t){return e.concat([t+"-"+Rf,t+"-"+Cm])},[]),lq=[].concat(fg,[JR]).reduce(function(e,t){return e.concat([t,t+"-"+Rf,t+"-"+Cm])},[]),DIe="beforeRead",NIe="read",LIe="afterRead",FIe="beforeMain",BIe="main",zIe="afterMain",$Ie="beforeWrite",HIe="write",VIe="afterWrite",jIe=[DIe,NIe,LIe,FIe,BIe,zIe,$Ie,HIe,VIe];function Co(e){return e?(e.nodeName||"").toLowerCase():null}function Fi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Rc(e){var t=Fi(e).Element;return e instanceof t||e instanceof Element}function rs(e){var t=Fi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function QR(e){if(typeof ShadowRoot>"u")return!1;var t=Fi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function UIe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},s=t.elements[n];!rs(s)||!Co(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function WIe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],s=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=o.reduce(function(l,u){return l[u]="",l},{});!rs(i)||!Co(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const uq={name:"applyStyles",enabled:!0,phase:"write",fn:UIe,effect:WIe,requires:["computeStyles"]};function vo(e){return e.split("-")[0]}var oc=Math.max,Zb=Math.min,If=Math.round;function ok(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function cq(){return!/^((?!chrome|android).)*safari/i.test(ok())}function Af(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,s=1;t&&rs(e)&&(i=e.offsetWidth>0&&If(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&If(r.height)/e.offsetHeight||1);var o=Rc(e)?Fi(e):window,a=o.visualViewport,l=!cq()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/s,d=r.width/i,f=r.height/s;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function ZR(e){var t=Af(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dq(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&QR(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ka(e){return Fi(e).getComputedStyle(e)}function qIe(e){return["table","td","th"].indexOf(Co(e))>=0}function hu(e){return((Rc(e)?e.ownerDocument:e.document)||window.document).documentElement}function y_(e){return Co(e)==="html"?e:e.assignedSlot||e.parentNode||(QR(e)?e.host:null)||hu(e)}function U2(e){return!rs(e)||ka(e).position==="fixed"?null:e.offsetParent}function GIe(e){var t=/firefox/i.test(ok()),n=/Trident/i.test(ok());if(n&&rs(e)){var r=ka(e);if(r.position==="fixed")return null}var i=y_(e);for(QR(i)&&(i=i.host);rs(i)&&["html","body"].indexOf(Co(i))<0;){var s=ka(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function hg(e){for(var t=Fi(e),n=U2(e);n&&qIe(n)&&ka(n).position==="static";)n=U2(n);return n&&(Co(n)==="html"||Co(n)==="body"&&ka(n).position==="static")?t:n||GIe(e)||t}function eI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Mp(e,t,n){return oc(e,Zb(t,n))}function KIe(e,t,n){var r=Mp(e,t,n);return r>n?n:r}function fq(){return{top:0,right:0,bottom:0,left:0}}function hq(e){return Object.assign({},fq(),e)}function pq(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var YIe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hq(typeof t!="number"?t:pq(t,fg))};function XIe(e){var t,n=e.state,r=e.name,i=e.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=vo(n.placement),l=eI(a),u=[Si,as].indexOf(a)>=0,c=u?"height":"width";if(!(!s||!o)){var d=YIe(i.padding,n),f=ZR(s),h=l==="y"?_i:Si,p=l==="y"?ss:as,m=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],v=hg(s),w=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,b=m/2-g/2,_=d[h],x=w-f[c]-d[p],S=w/2-f[c]/2+b,I=Mp(_,S,x),P=l;n.modifiersData[r]=(t={},t[P]=I,t.centerOffset=I-S,t)}}function JIe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||dq(t.elements.popper,i)&&(t.elements.arrow=i))}const QIe={name:"arrow",enabled:!0,phase:"main",fn:XIe,effect:JIe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pf(e){return e.split("-")[1]}var ZIe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eAe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:If(n*i)/i||0,y:If(r*i)/i||0}}function W2(e){var t,n=e.popper,r=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=o.x,h=f===void 0?0:f,p=o.y,m=p===void 0?0:p,g=typeof c=="function"?c({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var v=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),b=Si,_=_i,x=window;if(u){var S=hg(n),I="clientHeight",P="clientWidth";if(S===Fi(n)&&(S=hu(n),ka(S).position!=="static"&&a==="absolute"&&(I="scrollHeight",P="scrollWidth")),S=S,i===_i||(i===Si||i===as)&&s===Cm){_=ss;var R=d&&S===x&&x.visualViewport?x.visualViewport.height:S[I];m-=R-r.height,m*=l?1:-1}if(i===Si||(i===_i||i===ss)&&s===Cm){b=as;var O=d&&S===x&&x.visualViewport?x.visualViewport.width:S[P];h-=O-r.width,h*=l?1:-1}}var M=Object.assign({position:a},u&&ZIe),E=c===!0?eAe({x:h,y:m},Fi(n)):{x:h,y:m};if(h=E.x,m=E.y,l){var L;return Object.assign({},M,(L={},L[_]=w?"0":"",L[b]=v?"0":"",L.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",L))}return Object.assign({},M,(t={},t[_]=w?m+"px":"",t[b]=v?h+"px":"",t.transform="",t))}function tAe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:vo(t.placement),variation:Pf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,W2(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,W2(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nAe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:tAe,data:{}};var xv={passive:!0};function rAe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=Fi(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",n.update,xv)}),a&&l.addEventListener("resize",n.update,xv),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",n.update,xv)}),a&&l.removeEventListener("resize",n.update,xv)}}const iAe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rAe,data:{}};var sAe={left:"right",right:"left",bottom:"top",top:"bottom"};function Sy(e){return e.replace(/left|right|bottom|top/g,function(t){return sAe[t]})}var oAe={start:"end",end:"start"};function q2(e){return e.replace(/start|end/g,function(t){return oAe[t]})}function tI(e){var t=Fi(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nI(e){return Af(hu(e)).left+tI(e).scrollLeft}function aAe(e,t){var n=Fi(e),r=hu(e),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var u=cq();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+nI(e),y:l}}function lAe(e){var t,n=hu(e),r=tI(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=oc(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=oc(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+nI(e),l=-r.scrollTop;return ka(i||n).direction==="rtl"&&(a+=oc(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function rI(e){var t=ka(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function mq(e){return["html","body","#document"].indexOf(Co(e))>=0?e.ownerDocument.body:rs(e)&&rI(e)?e:mq(y_(e))}function Dp(e,t){var n;t===void 0&&(t=[]);var r=mq(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=Fi(r),o=i?[s].concat(s.visualViewport||[],rI(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(Dp(y_(o)))}function ak(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function uAe(e,t){var n=Af(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function G2(e,t,n){return t===aq?ak(aAe(e,n)):Rc(t)?uAe(t,n):ak(lAe(hu(e)))}function cAe(e){var t=Dp(y_(e)),n=["absolute","fixed"].indexOf(ka(e).position)>=0,r=n&&rs(e)?hg(e):e;return Rc(r)?t.filter(function(i){return Rc(i)&&dq(i,r)&&Co(i)!=="body"}):[]}function dAe(e,t,n,r){var i=t==="clippingParents"?cAe(e):[].concat(t),s=[].concat(i,[n]),o=s[0],a=s.reduce(function(l,u){var c=G2(e,u,r);return l.top=oc(c.top,l.top),l.right=Zb(c.right,l.right),l.bottom=Zb(c.bottom,l.bottom),l.left=oc(c.left,l.left),l},G2(e,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function gq(e){var t=e.reference,n=e.element,r=e.placement,i=r?vo(r):null,s=r?Pf(r):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case _i:l={x:o,y:t.y-n.height};break;case ss:l={x:o,y:t.y+t.height};break;case as:l={x:t.x+t.width,y:a};break;case Si:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?eI(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Rf:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Cm:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function Om(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,s=n.strategy,o=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?PIe:a,u=n.rootBoundary,c=u===void 0?aq:u,d=n.elementContext,f=d===void 0?Ph:d,h=n.altBoundary,p=h===void 0?!1:h,m=n.padding,g=m===void 0?0:m,v=hq(typeof g!="number"?g:pq(g,fg)),w=f===Ph?MIe:Ph,b=e.rects.popper,_=e.elements[p?w:f],x=dAe(Rc(_)?_:_.contextElement||hu(e.elements.popper),l,c,o),S=Af(e.elements.reference),I=gq({reference:S,element:b,strategy:"absolute",placement:i}),P=ak(Object.assign({},b,I)),R=f===Ph?P:S,O={top:x.top-R.top+v.top,bottom:R.bottom-x.bottom+v.bottom,left:x.left-R.left+v.left,right:R.right-x.right+v.right},M=e.modifiersData.offset;if(f===Ph&&M){var E=M[i];Object.keys(O).forEach(function(L){var j=[as,ss].indexOf(L)>=0?1:-1,F=[_i,ss].indexOf(L)>=0?"y":"x";O[L]+=E[F]*j})}return O}function fAe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?lq:l,c=Pf(r),d=c?a?j2:j2.filter(function(p){return Pf(p)===c}):fg,f=d.filter(function(p){return u.indexOf(p)>=0});f.length===0&&(f=d);var h=f.reduce(function(p,m){return p[m]=Om(e,{placement:m,boundary:i,rootBoundary:s,padding:o})[vo(m)],p},{});return Object.keys(h).sort(function(p,m){return h[p]-h[m]})}function hAe(e){if(vo(e)===JR)return[];var t=Sy(e);return[q2(e),t,q2(t)]}function pAe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,m=n.allowedAutoPlacements,g=t.options.placement,v=vo(g),w=v===g,b=l||(w||!p?[Sy(g)]:hAe(g)),_=[g].concat(b).reduce(function(Me,Ve){return Me.concat(vo(Ve)===JR?fAe(t,{placement:Ve,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:m}):Ve)},[]),x=t.rects.reference,S=t.rects.popper,I=new Map,P=!0,R=_[0],O=0;O<_.length;O++){var M=_[O],E=vo(M),L=Pf(M)===Rf,j=[_i,ss].indexOf(E)>=0,F=j?"width":"height",B=Om(t,{placement:M,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),Y=j?L?as:Si:L?ss:_i;x[F]>S[F]&&(Y=Sy(Y));var Z=Sy(Y),ne=[];if(s&&ne.push(B[E]<=0),a&&ne.push(B[Y]<=0,B[Z]<=0),ne.every(function(Me){return Me})){R=M,P=!1;break}I.set(M,ne)}if(P)for(var oe=p?3:1,le=function(Ve){var Ue=_.find(function(me){var _e=I.get(me);if(_e)return _e.slice(0,Ve).every(function(Te){return Te})});if(Ue)return R=Ue,"break"},Ee=oe;Ee>0;Ee--){var xe=le(Ee);if(xe==="break")break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}}const mAe={name:"flip",enabled:!0,phase:"main",fn:pAe,requiresIfExists:["offset"],data:{_skip:!1}};function K2(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Y2(e){return[_i,as,ss,Si].some(function(t){return e[t]>=0})}function gAe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=Om(t,{elementContext:"reference"}),a=Om(t,{altBoundary:!0}),l=K2(o,r),u=K2(a,i,s),c=Y2(l),d=Y2(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const vAe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:gAe};function yAe(e,t,n){var r=vo(e),i=[Si,_i].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Si,as].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function bAe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,s=i===void 0?[0,0]:i,o=lq.reduce(function(c,d){return c[d]=yAe(d,t.rects,s),c},{}),a=o[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}const wAe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bAe};function _Ae(e){var t=e.state,n=e.name;t.modifiersData[n]=gq({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const SAe={name:"popperOffsets",enabled:!0,phase:"read",fn:_Ae,data:{}};function xAe(e){return e==="x"?"y":"x"}function EAe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,p=n.tetherOffset,m=p===void 0?0:p,g=Om(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=vo(t.placement),w=Pf(t.placement),b=!w,_=eI(v),x=xAe(_),S=t.modifiersData.popperOffsets,I=t.rects.reference,P=t.rects.popper,R=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,O=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(S){if(s){var L,j=_==="y"?_i:Si,F=_==="y"?ss:as,B=_==="y"?"height":"width",Y=S[_],Z=Y+g[j],ne=Y-g[F],oe=h?-P[B]/2:0,le=w===Rf?I[B]:P[B],Ee=w===Rf?-P[B]:-I[B],xe=t.elements.arrow,Me=h&&xe?ZR(xe):{width:0,height:0},Ve=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:fq(),Ue=Ve[j],me=Ve[F],_e=Mp(0,I[B],Me[B]),Te=b?I[B]/2-oe-_e-Ue-O.mainAxis:le-_e-Ue-O.mainAxis,Ie=b?-I[B]/2+oe+_e+me+O.mainAxis:Ee+_e+me+O.mainAxis,Ae=t.elements.arrow&&hg(t.elements.arrow),Q=Ae?_==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,J=(L=M==null?void 0:M[_])!=null?L:0,ae=Y+Te-J-Q,we=Y+Ie-J,be=Mp(h?Zb(Z,ae):Z,Y,h?oc(ne,we):ne);S[_]=be,E[_]=be-Y}if(a){var T,V=_==="x"?_i:Si,ie=_==="x"?ss:as,ue=S[x],he=x==="y"?"height":"width",Se=ue+g[V],de=ue-g[ie],Pe=[_i,Si].indexOf(v)!==-1,Ce=(T=M==null?void 0:M[x])!=null?T:0,re=Pe?Se:ue-I[he]-P[he]-Ce+O.altAxis,pe=Pe?ue+I[he]+P[he]-Ce-O.altAxis:de,De=h&&Pe?KIe(re,ue,pe):Mp(h?re:Se,ue,h?pe:de);S[x]=De,E[x]=De-ue}t.modifiersData[r]=E}}const TAe={name:"preventOverflow",enabled:!0,phase:"main",fn:EAe,requiresIfExists:["offset"]};function kAe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function CAe(e){return e===Fi(e)||!rs(e)?tI(e):kAe(e)}function OAe(e){var t=e.getBoundingClientRect(),n=If(t.width)/e.offsetWidth||1,r=If(t.height)/e.offsetHeight||1;return n!==1||r!==1}function RAe(e,t,n){n===void 0&&(n=!1);var r=rs(t),i=rs(t)&&OAe(t),s=hu(t),o=Af(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Co(t)!=="body"||rI(s))&&(a=CAe(t)),rs(t)?(l=Af(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=nI(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function IAe(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||i(s)}),r}function AAe(e){var t=IAe(e);return jIe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function PAe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function MAe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var X2={placement:"bottom",modifiers:[],strategy:"absolute"};function J2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function DAe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,s=i===void 0?X2:i;return function(a,l,u){u===void 0&&(u=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},X2,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:c,setOptions:function(v){var w=typeof v=="function"?v(c.options):v;m(),c.options=Object.assign({},s,c.options,w),c.scrollParents={reference:Rc(a)?Dp(a):a.contextElement?Dp(a.contextElement):[],popper:Dp(l)};var b=AAe(MAe([].concat(r,c.options.modifiers)));return c.orderedModifiers=b.filter(function(_){return _.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var v=c.elements,w=v.reference,b=v.popper;if(J2(w,b)){c.rects={reference:RAe(w,hg(b),c.options.strategy==="fixed"),popper:ZR(b)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(O){return c.modifiersData[O.name]=Object.assign({},O.data)});for(var _=0;_<c.orderedModifiers.length;_++){if(c.reset===!0){c.reset=!1,_=-1;continue}var x=c.orderedModifiers[_],S=x.fn,I=x.options,P=I===void 0?{}:I,R=x.name;typeof S=="function"&&(c=S({state:c,options:P,name:R,instance:h})||c)}}}},update:PAe(function(){return new Promise(function(g){h.forceUpdate(),g(c)})}),destroy:function(){m(),f=!0}};if(!J2(a,l))return h;h.setOptions(u).then(function(g){!f&&u.onFirstUpdate&&u.onFirstUpdate(g)});function p(){c.orderedModifiers.forEach(function(g){var v=g.name,w=g.options,b=w===void 0?{}:w,_=g.effect;if(typeof _=="function"){var x=_({state:c,name:v,instance:h,options:b}),S=function(){};d.push(x||S)}})}function m(){d.forEach(function(g){return g()}),d=[]}return h}}var NAe=[iAe,SAe,nAe,uq,wAe,mAe,TAe,QIe,vAe],LAe=DAe({defaultModifiers:NAe}),FAe="tippy-box",vq="tippy-content",BAe="tippy-backdrop",yq="tippy-arrow",bq="tippy-svg-arrow",ku={passive:!0,capture:!0},wq=function(){return document.body};function Dx(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function iI(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function _q(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Q2(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function zAe(e){return e.split(/\s+/).filter(Boolean)}function hd(e){return[].concat(e)}function Z2(e,t){e.indexOf(t)===-1&&e.push(t)}function $Ae(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function HAe(e){return e.split("-")[0]}function ew(e){return[].slice.call(e)}function eF(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Np(){return document.createElement("div")}function b_(e){return["Element","Fragment"].some(function(t){return iI(e,t)})}function VAe(e){return iI(e,"NodeList")}function jAe(e){return iI(e,"MouseEvent")}function UAe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function WAe(e){return b_(e)?[e]:VAe(e)?ew(e):Array.isArray(e)?e:ew(document.querySelectorAll(e))}function Nx(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function tF(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function qAe(e){var t,n=hd(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function GAe(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var s=i.popperRect,o=i.popperState,a=i.props,l=a.interactiveBorder,u=HAe(o.placement),c=o.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,f=u==="top"?c.bottom.y:0,h=u==="right"?c.left.x:0,p=u==="left"?c.right.x:0,m=s.top-r+d>l,g=r-s.bottom-f>l,v=s.left-n+h>l,w=n-s.right-p>l;return m||g||v||w})}function Lx(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function nF(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ro={isTouch:!1},rF=0;function KAe(){ro.isTouch||(ro.isTouch=!0,window.performance&&document.addEventListener("mousemove",Sq))}function Sq(){var e=performance.now();e-rF<20&&(ro.isTouch=!1,document.removeEventListener("mousemove",Sq)),rF=e}function YAe(){var e=document.activeElement;if(UAe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function XAe(){document.addEventListener("touchstart",KAe,ku),window.addEventListener("blur",YAe)}var JAe=typeof window<"u"&&typeof document<"u",QAe=JAe?!!window.msCrypto:!1,ZAe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ePe={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ks=Object.assign({appendTo:wq,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ZAe,ePe),tPe=Object.keys(ks),nPe=function(t){var n=Object.keys(t);n.forEach(function(r){ks[r]=t[r]})};function xq(e){var t=e.plugins||[],n=t.reduce(function(r,i){var s=i.name,o=i.defaultValue;if(s){var a;r[s]=e[s]!==void 0?e[s]:(a=ks[s])!=null?a:o}return r},{});return Object.assign({},e,n)}function rPe(e,t){var n=t?Object.keys(xq(Object.assign({},ks,{plugins:t}))):tPe,r=n.reduce(function(i,s){var o=(e.getAttribute("data-tippy-"+s)||"").trim();if(!o)return i;if(s==="content")i[s]=o;else try{i[s]=JSON.parse(o)}catch{i[s]=o}return i},{});return r}function iF(e,t){var n=Object.assign({},t,{content:_q(t.content,[e])},t.ignoreAttributes?{}:rPe(e,t.plugins));return n.aria=Object.assign({},ks.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var iPe=function(){return"innerHTML"};function lk(e,t){e[iPe()]=t}function sF(e){var t=Np();return e===!0?t.className=yq:(t.className=bq,b_(e)?t.appendChild(e):lk(t,e)),t}function oF(e,t){b_(t.content)?(lk(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?lk(e,t.content):e.textContent=t.content)}function uk(e){var t=e.firstElementChild,n=ew(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(vq)}),arrow:n.find(function(r){return r.classList.contains(yq)||r.classList.contains(bq)}),backdrop:n.find(function(r){return r.classList.contains(BAe)})}}function Eq(e){var t=Np(),n=Np();n.className=FAe,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Np();r.className=vq,r.setAttribute("data-state","hidden"),oF(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(s,o){var a=uk(t),l=a.box,u=a.content,c=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&oF(u,e.props),o.arrow?c?s.arrow!==o.arrow&&(l.removeChild(c),l.appendChild(sF(o.arrow))):l.appendChild(sF(o.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:i}}Eq.$$tippy=!0;var sPe=1,Ev=[],Fx=[];function oPe(e,t){var n=iF(e,Object.assign({},ks,xq(eF(t)))),r,i,s,o=!1,a=!1,l=!1,u=!1,c,d,f,h=[],p=Q2(ae,n.interactiveDebounce),m,g=sPe++,v=null,w=$Ae(n.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:g,reference:e,popper:Np(),popperInstance:v,props:n,state:b,plugins:w,clearDelayTimeouts:re,setProps:pe,setContent:De,show:N,hide:D,hideWithInteractivity:q,enable:Pe,disable:Ce,unmount:C,destroy:G};if(!n.render)return _;var x=n.render(_),S=x.popper,I=x.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+_.id,_.popper=S,e._tippy=_,S._tippy=_;var P=w.map(function(K){return K.fn(_)}),R=e.hasAttribute("aria-expanded");return Ae(),oe(),Y(),Z("onCreate",[_]),n.showOnCreate&&Se(),S.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&j().addEventListener("mousemove",p)}),_;function O(){var K=_.props.touch;return Array.isArray(K)?K:[K,0]}function M(){return O()[0]==="hold"}function E(){var K;return!!((K=_.props.render)!=null&&K.$$tippy)}function L(){return m||e}function j(){var K=L().parentNode;return K?qAe(K):document}function F(){return uk(S)}function B(K){return _.state.isMounted&&!_.state.isVisible||ro.isTouch||c&&c.type==="focus"?0:Dx(_.props.delay,K?0:1,ks.delay)}function Y(K){K===void 0&&(K=!1),S.style.pointerEvents=_.props.interactive&&!K?"":"none",S.style.zIndex=""+_.props.zIndex}function Z(K,se,ve){if(ve===void 0&&(ve=!0),P.forEach(function(ze){ze[K]&&ze[K].apply(ze,se)}),ve){var ke;(ke=_.props)[K].apply(ke,se)}}function ne(){var K=_.props.aria;if(K.content){var se="aria-"+K.content,ve=S.id,ke=hd(_.props.triggerTarget||e);ke.forEach(function(ze){var Je=ze.getAttribute(se);if(_.state.isVisible)ze.setAttribute(se,Je?Je+" "+ve:ve);else{var ut=Je&&Je.replace(ve,"").trim();ut?ze.setAttribute(se,ut):ze.removeAttribute(se)}})}}function oe(){if(!(R||!_.props.aria.expanded)){var K=hd(_.props.triggerTarget||e);K.forEach(function(se){_.props.interactive?se.setAttribute("aria-expanded",_.state.isVisible&&se===L()?"true":"false"):se.removeAttribute("aria-expanded")})}}function le(){j().removeEventListener("mousemove",p),Ev=Ev.filter(function(K){return K!==p})}function Ee(K){if(!(ro.isTouch&&(l||K.type==="mousedown"))){var se=K.composedPath&&K.composedPath()[0]||K.target;if(!(_.props.interactive&&nF(S,se))){if(hd(_.props.triggerTarget||e).some(function(ve){return nF(ve,se)})){if(ro.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else Z("onClickOutside",[_,K]);_.props.hideOnClick===!0&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||Ue())}}}function xe(){l=!0}function Me(){l=!1}function Ve(){var K=j();K.addEventListener("mousedown",Ee,!0),K.addEventListener("touchend",Ee,ku),K.addEventListener("touchstart",Me,ku),K.addEventListener("touchmove",xe,ku)}function Ue(){var K=j();K.removeEventListener("mousedown",Ee,!0),K.removeEventListener("touchend",Ee,ku),K.removeEventListener("touchstart",Me,ku),K.removeEventListener("touchmove",xe,ku)}function me(K,se){Te(K,function(){!_.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&se()})}function _e(K,se){Te(K,se)}function Te(K,se){var ve=F().box;function ke(ze){ze.target===ve&&(Lx(ve,"remove",ke),se())}if(K===0)return se();Lx(ve,"remove",d),Lx(ve,"add",ke),d=ke}function Ie(K,se,ve){ve===void 0&&(ve=!1);var ke=hd(_.props.triggerTarget||e);ke.forEach(function(ze){ze.addEventListener(K,se,ve),h.push({node:ze,eventType:K,handler:se,options:ve})})}function Ae(){M()&&(Ie("touchstart",J,{passive:!0}),Ie("touchend",we,{passive:!0})),zAe(_.props.trigger).forEach(function(K){if(K!=="manual")switch(Ie(K,J),K){case"mouseenter":Ie("mouseleave",we);break;case"focus":Ie(QAe?"focusout":"blur",be);break;case"focusin":Ie("focusout",be);break}})}function Q(){h.forEach(function(K){var se=K.node,ve=K.eventType,ke=K.handler,ze=K.options;se.removeEventListener(ve,ke,ze)}),h=[]}function J(K){var se,ve=!1;if(!(!_.state.isEnabled||T(K)||a)){var ke=((se=c)==null?void 0:se.type)==="focus";c=K,m=K.currentTarget,oe(),!_.state.isVisible&&jAe(K)&&Ev.forEach(function(ze){return ze(K)}),K.type==="click"&&(_.props.trigger.indexOf("mouseenter")<0||o)&&_.props.hideOnClick!==!1&&_.state.isVisible?ve=!0:Se(K),K.type==="click"&&(o=!ve),ve&&!ke&&de(K)}}function ae(K){var se=K.target,ve=L().contains(se)||S.contains(se);if(!(K.type==="mousemove"&&ve)){var ke=he().concat(S).map(function(ze){var Je,ut=ze._tippy,Wt=(Je=ut.popperInstance)==null?void 0:Je.state;return Wt?{popperRect:ze.getBoundingClientRect(),popperState:Wt,props:n}:null}).filter(Boolean);GAe(ke,K)&&(le(),de(K))}}function we(K){var se=T(K)||_.props.trigger.indexOf("click")>=0&&o;if(!se){if(_.props.interactive){_.hideWithInteractivity(K);return}de(K)}}function be(K){_.props.trigger.indexOf("focusin")<0&&K.target!==L()||_.props.interactive&&K.relatedTarget&&S.contains(K.relatedTarget)||de(K)}function T(K){return ro.isTouch?M()!==K.type.indexOf("touch")>=0:!1}function V(){ie();var K=_.props,se=K.popperOptions,ve=K.placement,ke=K.offset,ze=K.getReferenceClientRect,Je=K.moveTransition,ut=E()?uk(S).arrow:null,Wt=ze?{getBoundingClientRect:ze,contextElement:ze.contextElement||L()}:e,sn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(cs){var Da=cs.state;if(E()){var n8=F(),__=n8.box;["placement","reference-hidden","escaped"].forEach(function(vg){vg==="placement"?__.setAttribute("data-placement",Da.placement):Da.attributes.popper["data-popper-"+vg]?__.setAttribute("data-"+vg,""):__.removeAttribute("data-"+vg)}),Da.attributes.popper={}}}},pn=[{name:"offset",options:{offset:ke}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Je}},sn];E()&&ut&&pn.push({name:"arrow",options:{element:ut,padding:3}}),pn.push.apply(pn,(se==null?void 0:se.modifiers)||[]),_.popperInstance=LAe(Wt,S,Object.assign({},se,{placement:ve,onFirstUpdate:f,modifiers:pn}))}function ie(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ue(){var K=_.props.appendTo,se,ve=L();_.props.interactive&&K===wq||K==="parent"?se=ve.parentNode:se=_q(K,[ve]),se.contains(S)||se.appendChild(S),_.state.isMounted=!0,V()}function he(){return ew(S.querySelectorAll("[data-tippy-root]"))}function Se(K){_.clearDelayTimeouts(),K&&Z("onTrigger",[_,K]),Ve();var se=B(!0),ve=O(),ke=ve[0],ze=ve[1];ro.isTouch&&ke==="hold"&&ze&&(se=ze),se?r=setTimeout(function(){_.show()},se):_.show()}function de(K){if(_.clearDelayTimeouts(),Z("onUntrigger",[_,K]),!_.state.isVisible){Ue();return}if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(K.type)>=0&&o)){var se=B(!1);se?i=setTimeout(function(){_.state.isVisible&&_.hide()},se):s=requestAnimationFrame(function(){_.hide()})}}function Pe(){_.state.isEnabled=!0}function Ce(){_.hide(),_.state.isEnabled=!1}function re(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(s)}function pe(K){if(!_.state.isDestroyed){Z("onBeforeUpdate",[_,K]),Q();var se=_.props,ve=iF(e,Object.assign({},se,eF(K),{ignoreAttributes:!0}));_.props=ve,Ae(),se.interactiveDebounce!==ve.interactiveDebounce&&(le(),p=Q2(ae,ve.interactiveDebounce)),se.triggerTarget&&!ve.triggerTarget?hd(se.triggerTarget).forEach(function(ke){ke.removeAttribute("aria-expanded")}):ve.triggerTarget&&e.removeAttribute("aria-expanded"),oe(),Y(),I&&I(se,ve),_.popperInstance&&(V(),he().forEach(function(ke){requestAnimationFrame(ke._tippy.popperInstance.forceUpdate)})),Z("onAfterUpdate",[_,K])}}function De(K){_.setProps({content:K})}function N(){var K=_.state.isVisible,se=_.state.isDestroyed,ve=!_.state.isEnabled,ke=ro.isTouch&&!_.props.touch,ze=Dx(_.props.duration,0,ks.duration);if(!(K||se||ve||ke)&&!L().hasAttribute("disabled")&&(Z("onShow",[_],!1),_.props.onShow(_)!==!1)){if(_.state.isVisible=!0,E()&&(S.style.visibility="visible"),Y(),Ve(),_.state.isMounted||(S.style.transition="none"),E()){var Je=F(),ut=Je.box,Wt=Je.content;Nx([ut,Wt],0)}f=function(){var pn;if(!(!_.state.isVisible||u)){if(u=!0,S.offsetHeight,S.style.transition=_.props.moveTransition,E()&&_.props.animation){var qr=F(),cs=qr.box,Da=qr.content;Nx([cs,Da],ze),tF([cs,Da],"visible")}ne(),oe(),Z2(Fx,_),(pn=_.popperInstance)==null||pn.forceUpdate(),Z("onMount",[_]),_.props.animation&&E()&&_e(ze,function(){_.state.isShown=!0,Z("onShown",[_])})}},ue()}}function D(){var K=!_.state.isVisible,se=_.state.isDestroyed,ve=!_.state.isEnabled,ke=Dx(_.props.duration,1,ks.duration);if(!(K||se||ve)&&(Z("onHide",[_],!1),_.props.onHide(_)!==!1)){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,o=!1,E()&&(S.style.visibility="hidden"),le(),Ue(),Y(!0),E()){var ze=F(),Je=ze.box,ut=ze.content;_.props.animation&&(Nx([Je,ut],ke),tF([Je,ut],"hidden"))}ne(),oe(),_.props.animation?E()&&me(ke,_.unmount):_.unmount()}}function q(K){j().addEventListener("mousemove",p),Z2(Ev,p),p(K)}function C(){_.state.isVisible&&_.hide(),_.state.isMounted&&(ie(),he().forEach(function(K){K._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),Fx=Fx.filter(function(K){return K!==_}),_.state.isMounted=!1,Z("onHidden",[_]))}function G(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Q(),delete e._tippy,_.state.isDestroyed=!0,Z("onDestroy",[_]))}}function pg(e,t){t===void 0&&(t={});var n=ks.plugins.concat(t.plugins||[]);XAe();var r=Object.assign({},t,{plugins:n}),i=WAe(e),s=i.reduce(function(o,a){var l=a&&oPe(a,r);return l&&o.push(l),o},[]);return b_(e)?s[0]:s}pg.defaultProps=ks;pg.setDefaultProps=nPe;pg.currentInput=ro;Object.assign({},uq,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});pg.setDefaultProps({render:Eq});class aPe{constructor({editor:t,element:n,view:r,tippyOptions:i={},updateDelay:s=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:u,to:c})=>{const{doc:d,selection:f}=l,{empty:h}=f,p=!d.textBetween(u,c).length&&KR(l.selection),m=this.element.contains(document.activeElement);return!(!(a.hasFocus()||m)||h||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const u=!(l!=null&&l.selection.eq(a.state.selection)),c=!(l!=null&&l.doc.eq(a.state.doc));!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,u,c,l)},this.updateDelay))},this.updateHandler=(a,l,u,c)=>{var d,f,h;const{state:p,composing:m}=a,{selection:g}=p;if(m||!l&&!u)return;this.createTooltip();const{ranges:w}=g,b=Math.min(...w.map(S=>S.$from.pos)),_=Math.max(...w.map(S=>S.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,element:this.element,view:a,state:p,oldState:c,from:b,to:_}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((h=this.tippyOptions)===null||h===void 0?void 0:h.getReferenceClientRect)||(()=>{if(oq(p.selection)){let S=a.nodeDOM(b);if(S){const I=S.dataset.nodeViewWrapper?S:S.querySelector("[data-node-view-wrapper]");if(I&&(S=I.firstChild),S)return S.getBoundingClientRect()}}return eIe(a,b,_)})}),this.show()},this.editor=t,this.element=n,this.view=r,this.updateDelay=s,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=pg(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){const{state:r}=t,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(t,n);return}const s=!(n!=null&&n.selection.eq(t.state.selection)),o=!(n!=null&&n.doc.eq(t.state.doc));this.updateHandler(t,s,o,n)}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;!((t=this.tippy)===null||t===void 0)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Tq=e=>new or({key:typeof e.pluginKey=="string"?new li(e.pluginKey):e.pluginKey,view:t=>new aPe({view:t,...e})});vr.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Tq({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});const aF=ee({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:t}){const n=U(null);return nt(()=>{const{updateDelay:r,editor:i,pluginKey:s,shouldShow:o,tippyOptions:a}=e;i.registerPlugin(Tq({updateDelay:r,editor:i,element:n.value,pluginKey:s,shouldShow:o,tippyOptions:a}))}),yr(()=>{const{pluginKey:r,editor:i}=e;i.unregisterPlugin(r)}),()=>{var r;return We("div",{ref:n},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});function lF(e){return Dk((t,n)=>({get(){return t(),e},set(r){e=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class lPe extends IIe{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=lF(this.view.state),this.reactiveExtensionStorage=lF(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),Mm(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,n){const r=super.registerPlugin(t,n);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(t){const n=super.unregisterPlugin(t);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const uPe=ee({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=U(),n=Jn();return Mt(()=>{const r=e.editor;r&&r.options.element&&t.value&&vt(()=>{if(!t.value||!r.options.element.firstChild)return;const i=y(t.value);t.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),yr(()=>{const r=e.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:t}},render(){return We("div",{ref:e=>{this.rootEl=e}})}}),cPe=/^\s*>\s$/,dPe=Us.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[km({find:cPe,type:this.type})]}}),fPe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,hPe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,pPe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,mPe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,gPe=zs.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Oc({find:fPe,type:this.type}),Oc({find:pPe,type:this.type})]},addPasteRules(){return[ql({find:hPe,type:this.type}),ql({find:mPe,type:this.type})]}}),vPe="listItem",uF="textStyle",cF=/^\s*([-+*])\s$/,yPe=Us.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(vPe,this.editor.getAttributes(uF)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=km({find:cF,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=km({find:cF,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(uF),editor:this.editor})),[e]}}),bPe=/(^|[^`])`([^`]+)`(?!`)/,wPe=/(^|[^`])`([^`]+)`(?!`)/g,_Pe=zs.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Oc({find:bPe,type:this.type})]},addPasteRules(){return[ql({find:wPe,type:this.type})]}}),SPe=/^```([a-z]+)?[\s\n]$/,xPe=/^~~~([a-z]+)?[\s\n]$/,EPe=Us.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,s=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",sr(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` `);return!s||!o?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:u})=>(u.setSelection(Et.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[ik({find:SPe,type:this.type,getAttributes:e=>({language:e[1]})}),ik({find:xPe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new or({key:new li("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:o,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` `));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(bt.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}}),TPe=Us.create({name:"doc",topNode:!0,content:"block+"});function kPe(e={}){return new or({view(t){return new CPe(t,e)}})}class CPe{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return t.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let c=u.getBoundingClientRect(),d=a?c.bottom:c.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:c.left,right:c.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,o;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,o=-pageYOffset;else{let a=i.getBoundingClientRect();s=a.left-i.scrollLeft,o=a.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=e6(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const OPe=vr.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[kPe(this.options)]}});class Ln extends Et{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Ln.valid(r)?new Ln(r):Et.near(r)}content(){return Xe.empty}eq(t){return t instanceof Ln&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Ln(t.resolve(n.pos))}getBookmark(){return new sI(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!RPe(t)||!IPe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Ln.valid(t))return t;let i=t.pos,s=null;for(let o=t.depth;;o--){let a=t.node(o);if(n>0?t.indexAfter(o)<a.childCount:t.index(o)>0){s=a.child(n>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;i+=n;let l=t.doc.resolve(i);if(Ln.valid(l))return l}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!ot.isSelectable(s)){t=t.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let a=t.doc.resolve(i);if(Ln.valid(a))return a}return null}}}Ln.prototype.visible=!1;Ln.findFrom=Ln.findGapCursorFrom;Et.jsonID("gapcursor",Ln);class sI{constructor(t){this.pos=t}map(t){return new sI(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Ln.valid(n)?new Ln(n):Et.near(n)}}function RPe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function IPe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function APe(){return new or({props:{decorations:NPe,createSelectionBetween(e,t,n){return t.pos==n.pos&&Ln.valid(n)?new Ln(n):null},handleClick:MPe,handleKeyDown:PPe,handleDOMEvents:{beforeinput:DPe}}})}const PPe=V6({ArrowLeft:Tv("horiz",-1),ArrowRight:Tv("horiz",1),ArrowUp:Tv("vert",-1),ArrowDown:Tv("vert",1)});function Tv(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,s){let o=r.selection,a=t>0?o.$to:o.$from,l=o.empty;if(o instanceof bt){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Ln.findGapCursorFrom(a,t,l);return u?(i&&i(r.tr.setSelection(new Ln(u))),!0):!1}}function MPe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Ln.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&ot.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Ln(r))),!0)}function DPe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Ln))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=Be.empty;for(let o=r.length-1;o>=0;o--)i=Be.from(r[o].createAndFill(null,i));let s=e.state.tr.replace(n.pos,n.pos,new Xe(i,0,0));return s.setSelection(bt.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function NPe(e){if(!(e.selection instanceof Ln))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",qn.create(e.doc,[Ai.widget(e.selection.head,t,{key:"gapcursor"})])}const LPe=vr.create({name:"gapCursor",addProseMirrorPlugins(){return[APe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ct(Ze(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),FPe=Us.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",sr(this.options.HTMLAttributes,e)]},renderText(){return` `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&o){const d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),BPe=Us.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,sr(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>ik({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var tw=200,mr=function(){};mr.prototype.append=function(t){return t.length?(t=mr.from(t),!this.length&&t||t.length<tw&&this.leafAppend(t)||this.length<tw&&t.leafPrepend(this)||this.appendInner(t)):this};mr.prototype.prepend=function(t){return t.length?mr.from(t).append(this):this};mr.prototype.appendInner=function(t){return new zPe(this,t)};mr.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?mr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};mr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};mr.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};mr.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(t(s,o))},n,r),i};mr.from=function(t){return t instanceof mr?t:t&&t.length?new kq(t):mr.empty};var kq=function(e){function t(r){e.call(this),this.values=r}t.__proto__=e,t.prototype=Object.create(e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new t(this.values.slice(i,s))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,s,o,a){for(var l=s;l<o;l++)if(i(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(i,s,o,a){for(var l=s-1;l>=o;l--)if(i(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=tw)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=tw)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(mr);mr.empty=new kq([]);var zPe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t.__proto__=e,t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,s,o){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(s,a),o)===!1||s>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(s,a)-a,o+a)===!1||s<a&&this.left.forEachInvertedInner(r,Math.min(i,a),s,o)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(mr);const $Pe=500;class Ts{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=t.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,c.push(d);return}if(i){c.push(new Xs(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new Xs(p,void 0,void 0,u.length+c.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(s)):d.selection,l=new Ts(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(t,n,r,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new Xs(t.mapping.maps[c],d,n),h;(h=l&&l.merge(f))&&(f=h,c?s.pop():a=a.slice(0,a.length-1)),s.push(f),n&&(o++,n=void 0),i||(l=f)}let u=o-r.depth;return u>VPe&&(a=HPe(a,u),o-=u),new Ts(a.append(s),o)}remapping(t,n){let r=new Gd;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},t,n),r}addMaps(t){return this.eventCount==0?this:new Ts(this.items.append(t.map(n=>new Xs(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=t.mapping,o=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},i);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let m=t.steps[h].invert(t.docs[h]),g=f.selection&&f.selection.map(s.slice(l+1,h));g&&a++,r.push(new Xs(p,m,g))}else r.push(new Xs(p))},i);let u=[];for(let f=n;f<o;f++)u.push(new Xs(s.maps[f]));let c=this.items.slice(0,i).append(u).append(r),d=new Ts(c,a);return d.emptyItemCount()>$Pe&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=t)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=o.selection&&o.selection.map(n.slice(r));c&&s++;let d=new Xs(u.invert(),l,c),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new Ts(mr.from(i.reverse()),s)}}Ts.empty=new Ts(mr.empty,0);function HPe(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class Xs{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Xs(n.getMap().invert(),n,this.selection)}}}class sl{constructor(t,n,r,i,s){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const VPe=20;function jPe(e,t,n,r){let i=n.getMeta(ac),s;if(i)return i.historyState;n.getMeta(qPe)&&(e=new sl(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(ac))return o.getMeta(ac).redo?new sl(e.done.addTransform(n,void 0,r,xy(t)),e.undone,dF(n.mapping.maps),e.prevTime,e.prevComposition):new sl(e.done,e.undone.addTransform(n,void 0,r,xy(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!o&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!UPe(n,e.prevRanges)),u=o?Bx(e.prevRanges,n.mapping):dF(n.mapping.maps);return new sl(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,xy(t)),Ts.empty,u,n.time,a??e.prevComposition)}else return(s=n.getMeta("rebased"))?new sl(e.done.rebased(n,s),e.undone.rebased(n,s),Bx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new sl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Bx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function UPe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<t.length;s+=2)r<=t[s+1]&&i>=t[s]&&(n=!0)}),n}function dF(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,s,o)=>t.push(s,o));return t}function Bx(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}function WPe(e,t,n){let r=xy(t),i=ac.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new sl(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(ac,{redo:n,historyState:l})}let zx=!1,fF=null;function xy(e){let t=e.plugins;if(fF!=t){zx=!1,fF=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){zx=!0;break}}return zx}const ac=new li("history"),qPe=new li("closeHistory");function GPe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new or({key:ac,state:{init(){return new sl(Ts.empty,Ts.empty,null,0,-1)},apply(t,n,r){return jPe(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?Oq:r=="historyRedo"?Rq:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function Cq(e,t){return(n,r)=>{let i=ac.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let s=WPe(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}const Oq=Cq(!1,!0),Rq=Cq(!0,!0),KPe=vr.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Oq(e,t),redo:()=>({state:e,dispatch:t})=>Rq(e,t)}},addProseMirrorPlugins(){return[GPe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),YPe=Us.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",sr(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:i}=n,s=e();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):oq(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:o,dispatch:a})=>{var l;if(a){const{$to:u}=o.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(bt.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(ot.create(o.doc,u.pos)):o.setSelection(bt.create(o.doc,u.pos));else{const d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(o.insert(c,d),o.setSelection(bt.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[AIe({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),XPe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,JPe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,QPe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,ZPe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,eMe=zs.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Oc({find:XPe,type:this.type}),Oc({find:QPe,type:this.type})]},addPasteRules(){return[ql({find:JPe,type:this.type}),ql({find:ZPe,type:this.type})]}}),tMe=Us.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",sr(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),nMe="listItem",hF="textStyle",pF=/^(\d+)\.\s$/,rMe=Us.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",sr(this.options.HTMLAttributes,n),0]:["ol",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(nMe,this.editor.getAttributes(hF)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=km({find:pF,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=km({find:pF,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(hF)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),iMe=Us.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),sMe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,oMe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,aMe=zs.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Oc({find:sMe,type:this.type})]},addPasteRules(){return[ql({find:oMe,type:this.type})]}}),lMe=Us.create({name:"text",group:"inline"}),uMe=vr.create({name:"starterKit",addExtensions(){var e,t,n,r,i,s,o,a,l,u,c,d,f,h,p,m,g,v;const w=[];return this.options.bold!==!1&&w.push(gPe.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.blockquote!==!1&&w.push(dPe.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bulletList!==!1&&w.push(yPe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&w.push(_Pe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&w.push(EPe.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&w.push(TPe.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&w.push(OPe.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&w.push(LPe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&w.push(FPe.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&w.push(BPe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&w.push(KPe.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&w.push(YPe.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&w.push(eMe.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&w.push(tMe.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&w.push(rMe.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&w.push(iMe.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&w.push(aMe.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&w.push(lMe.configure((v=this.options)===null||v===void 0?void 0:v.text)),w}}),cMe=vr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new or({key:new li("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const s=this.editor.isEmpty;return e.descendants((o,a)=>{const l=r>=a&&r<=a+o.nodeSize,u=!o.isLeaf&&v_(o);if((l||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];s&&c.push(this.options.emptyEditorClass);const d=Ai.node(a,a+o.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),qn.create(e,i)}}})]}}),dMe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,fMe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,hMe=zs.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Oc({find:dMe,type:this.type})]},addPasteRules(){return[ql({find:fMe,type:this.type})]}}),pMe=vr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),mMe=zs.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",sr(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),gMe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",vMe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Mf=(e,t)=>{for(const n in t)e[n]=t[n];return e},ck="numeric",dk="ascii",fk="alpha",Lp="asciinumeric",Kh="alphanumeric",hk="domain",Iq="emoji",yMe="scheme",bMe="slashscheme",$x="whitespace";function wMe(e,t){return e in t||(t[e]=[]),t[e]}function ju(e,t,n){t[ck]&&(t[Lp]=!0,t[Kh]=!0),t[dk]&&(t[Lp]=!0,t[fk]=!0),t[Lp]&&(t[Kh]=!0),t[fk]&&(t[Kh]=!0),t[Kh]&&(t[hk]=!0),t[Iq]&&(t[hk]=!0);for(const r in t){const i=wMe(r,n);i.indexOf(e)<0&&i.push(e)}}function _Me(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function hi(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}hi.groups={};hi.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const i=t.jr[r][0],s=t.jr[r][1];if(s&&i.test(e))return s}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r=r||hi.groups;let i;return t&&t.j?i=t:(i=new hi(t),n&&r&&ju(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const s=e.length;if(!s)return i;for(let o=0;o<s-1;o++)i=i.tt(e[o]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){r=r||hi.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const s=t;let o,a=i.go(e);if(a?(o=new hi,Mf(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new hi,s){if(r)if(o.t&&typeof o.t=="string"){const l=Mf(_Me(o.t,r),n);ju(s,l,r)}else n&&ju(s,n,r);o.t=s}return i.j[e]=o,o}};const Tt=(e,t,n,r,i)=>e.ta(t,n,r,i),Mn=(e,t,n,r,i)=>e.tr(t,n,r,i),mF=(e,t,n,r,i)=>e.ts(t,n,r,i),$e=(e,t,n,r,i)=>e.tt(t,n,r,i),Wo="WORD",pk="UWORD",Aq="ASCIINUMERICAL",Pq="ALPHANUMERICAL",Rm="LOCALHOST",mk="TLD",gk="UTLD",Ey="SCHEME",pd="SLASH_SCHEME",oI="NUM",vk="WS",aI="NL",Fp="OPENBRACE",Bp="CLOSEBRACE",nw="OPENBRACKET",rw="CLOSEBRACKET",iw="OPENPAREN",sw="CLOSEPAREN",ow="OPENANGLEBRACKET",aw="CLOSEANGLEBRACKET",lw="FULLWIDTHLEFTPAREN",uw="FULLWIDTHRIGHTPAREN",cw="LEFTCORNERBRACKET",dw="RIGHTCORNERBRACKET",fw="LEFTWHITECORNERBRACKET",hw="RIGHTWHITECORNERBRACKET",pw="FULLWIDTHLESSTHAN",mw="FULLWIDTHGREATERTHAN",gw="AMPERSAND",lI="APOSTROPHE",vw="ASTERISK",ol="AT",yw="BACKSLASH",bw="BACKTICK",ww="CARET",ul="COLON",uI="COMMA",_w="DOLLAR",Js="DOT",Sw="EQUALS",cI="EXCLAMATION",Wi="HYPHEN",zp="PERCENT",xw="PIPE",Ew="PLUS",Tw="POUND",$p="QUERY",dI="QUOTE",Mq="FULLWIDTHMIDDLEDOT",fI="SEMI",Qs="SLASH",Hp="TILDE",kw="UNDERSCORE",Dq="EMOJI",Cw="SYM";var Nq=Object.freeze({__proto__:null,WORD:Wo,UWORD:pk,ASCIINUMERICAL:Aq,ALPHANUMERICAL:Pq,LOCALHOST:Rm,TLD:mk,UTLD:gk,SCHEME:Ey,SLASH_SCHEME:pd,NUM:oI,WS:vk,NL:aI,OPENBRACE:Fp,CLOSEBRACE:Bp,OPENBRACKET:nw,CLOSEBRACKET:rw,OPENPAREN:iw,CLOSEPAREN:sw,OPENANGLEBRACKET:ow,CLOSEANGLEBRACKET:aw,FULLWIDTHLEFTPAREN:lw,FULLWIDTHRIGHTPAREN:uw,LEFTCORNERBRACKET:cw,RIGHTCORNERBRACKET:dw,LEFTWHITECORNERBRACKET:fw,RIGHTWHITECORNERBRACKET:hw,FULLWIDTHLESSTHAN:pw,FULLWIDTHGREATERTHAN:mw,AMPERSAND:gw,APOSTROPHE:lI,ASTERISK:vw,AT:ol,BACKSLASH:yw,BACKTICK:bw,CARET:ww,COLON:ul,COMMA:uI,DOLLAR:_w,DOT:Js,EQUALS:Sw,EXCLAMATION:cI,HYPHEN:Wi,PERCENT:zp,PIPE:xw,PLUS:Ew,POUND:Tw,QUERY:$p,QUOTE:dI,FULLWIDTHMIDDLEDOT:Mq,SEMI:fI,SLASH:Qs,TILDE:Hp,UNDERSCORE:kw,EMOJI:Dq,SYM:Cw});const Ho=/[a-z]/,Mh=new RegExp("\\p{L}","u"),Hx=new RegExp("\\p{Emoji}","u"),Vo=/\d/,Vx=/\s/,gF="\r",jx=` `,SMe="️",xMe="",Ux="";let kv=null,Cv=null;function EMe(e=[]){const t={};hi.groups=t;const n=new hi;kv==null&&(kv=vF(gMe)),Cv==null&&(Cv=vF(vMe)),$e(n,"'",lI),$e(n,"{",Fp),$e(n,"}",Bp),$e(n,"[",nw),$e(n,"]",rw),$e(n,"(",iw),$e(n,")",sw),$e(n,"<",ow),$e(n,">",aw),$e(n,"(",lw),$e(n,")",uw),$e(n,"「",cw),$e(n,"」",dw),$e(n,"『",fw),$e(n,"』",hw),$e(n,"<",pw),$e(n,">",mw),$e(n,"&",gw),$e(n,"*",vw),$e(n,"@",ol),$e(n,"`",bw),$e(n,"^",ww),$e(n,":",ul),$e(n,",",uI),$e(n,"$",_w),$e(n,".",Js),$e(n,"=",Sw),$e(n,"!",cI),$e(n,"-",Wi),$e(n,"%",zp),$e(n,"|",xw),$e(n,"+",Ew),$e(n,"#",Tw),$e(n,"?",$p),$e(n,'"',dI),$e(n,"/",Qs),$e(n,";",fI),$e(n,"~",Hp),$e(n,"_",kw),$e(n,"\\",yw),$e(n,"・",Mq);const r=Mn(n,Vo,oI,{[ck]:!0});Mn(r,Vo,r);const i=Mn(r,Ho,Aq,{[Lp]:!0}),s=Mn(r,Mh,Pq,{[Kh]:!0}),o=Mn(n,Ho,Wo,{[dk]:!0});Mn(o,Vo,i),Mn(o,Ho,o),Mn(i,Vo,i),Mn(i,Ho,i);const a=Mn(n,Mh,pk,{[fk]:!0});Mn(a,Ho),Mn(a,Vo,s),Mn(a,Mh,a),Mn(s,Vo,s),Mn(s,Ho),Mn(s,Mh,s);const l=$e(n,jx,aI,{[$x]:!0}),u=$e(n,gF,vk,{[$x]:!0}),c=Mn(n,Vx,vk,{[$x]:!0});$e(n,Ux,c),$e(u,jx,l),$e(u,Ux,c),Mn(u,Vx,c),$e(c,gF),$e(c,jx),Mn(c,Vx,c),$e(c,Ux,c);const d=Mn(n,Hx,Dq,{[Iq]:!0});$e(d,"#"),Mn(d,Hx,d),$e(d,SMe,d);const f=$e(d,xMe);$e(f,"#"),Mn(f,Hx,d);const h=[[Ho,o],[Vo,i]],p=[[Ho,null],[Mh,a],[Vo,s]];for(let m=0;m<kv.length;m++)za(n,kv[m],mk,Wo,h);for(let m=0;m<Cv.length;m++)za(n,Cv[m],gk,pk,p);ju(mk,{tld:!0,ascii:!0},t),ju(gk,{utld:!0,alpha:!0},t),za(n,"file",Ey,Wo,h),za(n,"mailto",Ey,Wo,h),za(n,"http",pd,Wo,h),za(n,"https",pd,Wo,h),za(n,"ftp",pd,Wo,h),za(n,"ftps",pd,Wo,h),ju(Ey,{scheme:!0,ascii:!0},t),ju(pd,{slashscheme:!0,ascii:!0},t),e=e.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<e.length;m++){const g=e[m][0],w=e[m][1]?{[yMe]:!0}:{[bMe]:!0};g.indexOf("-")>=0?w[hk]=!0:Ho.test(g)?Vo.test(g)?w[Lp]=!0:w[dk]=!0:w[ck]=!0,mF(n,g,g,w)}return mF(n,"localhost",Rm,{ascii:!0}),n.jd=new hi(Cw),{start:n,tokens:Mf({groups:t},Nq)}}function Lq(e,t){const n=TMe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let s=0,o=0;for(;o<r;){let a=e,l=null,u=0,c=null,d=-1,f=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(d=0,f=0,c=a):d>=0&&(d+=n[o].length,f++),u+=n[o].length,s+=n[o].length,o++;s-=d,o-=f,u-=d,i.push({t:c.t,v:t.slice(s-u,s),s:s-u,e:s})}return i}function TMe(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),s,o=i<55296||i>56319||r+1===n||(s=e.charCodeAt(r+1))<56320||s>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function za(e,t,n,r,i){let s;const o=t.length;for(let a=0;a<o-1;a++){const l=t[a];e.j[l]?s=e.j[l]:(s=new hi(r),s.jr=i.slice(),e.j[l]=s),e=s}return s=new hi(n),s.jr=i.slice(),e.j[t[o-1]]=s,s}function vF(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let s=0;for(;i.indexOf(e[r+s])>=0;)s++;if(s>0){t.push(n.join(""));for(let o=parseInt(e.substring(r,r+s),10);o>0;o--)n.pop();r+=s}else n.push(e[r]),r++}return t}const Im={defaultProtocol:"http",events:null,format:yF,formatHref:yF,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function hI(e,t=null){let n=Mf({},Im);e&&(n=Mf(n,e instanceof hI?e.o:e));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}hI.prototype={o:Im,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Im[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function yF(e){return e}function Fq(e,t){this.t="token",this.v=e,this.tk=t}Fq.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Im.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),s=this.toFormattedString(e),o={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return o.href=r,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),c&&Mf(o,c),{tagName:i,attributes:o,content:s,eventListeners:d}}};function w_(e,t){class n extends Fq{constructor(i,s){super(i,s),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const bF=w_("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),wF=w_("text"),kMe=w_("nl"),Ov=w_("url",{isLink:!0,toHref(e=Im.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Rm&&e[1].t===ul}}),Ui=e=>new hi(e);function CMe({groups:e}){const t=e.domain.concat([gw,vw,ol,yw,bw,ww,_w,Sw,Wi,oI,zp,xw,Ew,Tw,Qs,Cw,Hp,kw]),n=[ul,uI,Js,cI,zp,$p,dI,fI,ow,aw,Fp,Bp,rw,nw,iw,sw,lw,uw,cw,dw,fw,hw,pw,mw],r=[gw,lI,vw,yw,bw,ww,_w,Sw,Wi,Fp,Bp,zp,xw,Ew,Tw,$p,Qs,Cw,Hp,kw],i=Ui(),s=$e(i,Hp);Tt(s,r,s),Tt(s,e.domain,s);const o=Ui(),a=Ui(),l=Ui();Tt(i,e.domain,o),Tt(i,e.scheme,a),Tt(i,e.slashscheme,l),Tt(o,r,s),Tt(o,e.domain,o);const u=$e(o,ol);$e(s,ol,u),$e(a,ol,u),$e(l,ol,u);const c=$e(s,Js);Tt(c,r,s),Tt(c,e.domain,s);const d=Ui();Tt(u,e.domain,d),Tt(d,e.domain,d);const f=$e(d,Js);Tt(f,e.domain,d);const h=Ui(bF);Tt(f,e.tld,h),Tt(f,e.utld,h),$e(u,Rm,h);const p=$e(d,Wi);$e(p,Wi,p),Tt(p,e.domain,d),Tt(h,e.domain,d),$e(h,Js,f),$e(h,Wi,p);const m=$e(h,ul);Tt(m,e.numeric,bF);const g=$e(o,Wi),v=$e(o,Js);$e(g,Wi,g),Tt(g,e.domain,o),Tt(v,r,s),Tt(v,e.domain,o);const w=Ui(Ov);Tt(v,e.tld,w),Tt(v,e.utld,w),Tt(w,e.domain,o),Tt(w,r,s),$e(w,Js,v),$e(w,Wi,g),$e(w,ol,u);const b=$e(w,ul),_=Ui(Ov);Tt(b,e.numeric,_);const x=Ui(Ov),S=Ui();Tt(x,t,x),Tt(x,n,S),Tt(S,t,x),Tt(S,n,S),$e(w,Qs,x),$e(_,Qs,x);const I=$e(a,ul),P=$e(l,ul),R=$e(P,Qs),O=$e(R,Qs);Tt(a,e.domain,o),$e(a,Js,v),$e(a,Wi,g),Tt(l,e.domain,o),$e(l,Js,v),$e(l,Wi,g),Tt(I,e.domain,x),$e(I,Qs,x),$e(I,$p,x),Tt(O,e.domain,x),Tt(O,t,x),$e(O,Qs,x);const M=[[Fp,Bp],[nw,rw],[iw,sw],[ow,aw],[lw,uw],[cw,dw],[fw,hw],[pw,mw]];for(let E=0;E<M.length;E++){const[L,j]=M[E],F=$e(x,L);$e(S,L,F),$e(F,j,x);const B=Ui(Ov);Tt(F,t,B);const Y=Ui();Tt(F,n),Tt(B,t,B),Tt(B,n,Y),Tt(Y,t,B),Tt(Y,n,Y),$e(B,j,x),$e(Y,j,x)}return $e(i,Rm,w),$e(i,aI,kMe),{start:i,tokens:Nq}}function OMe(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=e,l=null,u=null,c=0,d=null,f=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(u=l||a.go(n[i].t));)l=null,a=u,a.accepts()?(f=0,d=a):f>=0&&f++,i++,c++;if(f<0)i-=c,i<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(Wx(wF,t,o)),o=[]),i-=f,c-=f;const h=d.t,p=n.slice(i-c,i);s.push(Wx(h,t,p))}}return o.length>0&&s.push(Wx(wF,t,o)),s}function Wx(e,t,n){const r=n[0].s,i=n[n.length-1].e,s=t.slice(r,i);return new e(s,n)}const RMe=typeof console<"u"&&console&&console.warn||(()=>{}),IMe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Sn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function AMe(){return hi.groups={},Sn.scanner=null,Sn.parser=null,Sn.tokenQueue=[],Sn.pluginQueue=[],Sn.customSchemes=[],Sn.initialized=!1,Sn}function _F(e,t=!1){if(Sn.initialized&&RMe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${IMe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 1. Must only contain digits, lowercase ASCII letters or "-" 2. Cannot start or end with "-" 3. "-" cannot repeat`);Sn.customSchemes.push([e,t])}function PMe(){Sn.scanner=EMe(Sn.customSchemes);for(let e=0;e<Sn.tokenQueue.length;e++)Sn.tokenQueue[e][1]({scanner:Sn.scanner});Sn.parser=CMe(Sn.scanner.tokens);for(let e=0;e<Sn.pluginQueue.length;e++)Sn.pluginQueue[e][1]({scanner:Sn.scanner,parser:Sn.parser});return Sn.initialized=!0,Sn}function pI(e){return Sn.initialized||PMe(),OMe(Sn.parser.start,e,Lq(Sn.scanner.start,e))}pI.scan=Lq;function Bq(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new hI(n),i=pI(e),s=[];for(let o=0;o<i.length;o++){const a=i[o];a.isLink&&(!t||a.t===t)&&r.check(a)&&s.push(a.toFormattedObject(r))}return s}function MMe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function DMe(e){return new or({key:new li("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),s=t.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,a=URe(n.doc,[...t]);if(QRe(a).forEach(({newRange:u})=>{const c=qRe(r.doc,u,h=>h.isTextblock);let d,f;if(c.length>1?(d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):c.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")),d&&f){const h=f.split(" ").filter(v=>v!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;const g=pI(p).map(v=>v.toObject(e.defaultProtocol));if(!MMe(g))return!1;g.filter(v=>v.isLink).map(v=>({...v,from:m+v.start+1,to:m+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>e.validate(v.value)).filter(v=>e.shouldAutoLink(v.value)).forEach(v=>{XR(v.from,v.to,r.doc).some(w=>w.mark.type===e.type)||o.addMark(v.from,v.to,e.type.create({href:v.href}))})}}),!!o.steps.length)return o}})}function NMe(e){return new or({key:new li("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,s;if(r.button!==0||!t.editable)return!1;let o=r.target;const a=[];for(;o.nodeName!=="DIV";)a.push(o),o=o.parentNode;if(!a.find(f=>f.nodeName==="A"))return!1;const l=sq(t.state,e.type.name),u=r.target,c=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,d=(s=u==null?void 0:u.target)!==null&&s!==void 0?s:l.target;return u&&c?(window.open(c,d),!0):!1}}})}function LMe(e){return new or({key:new li("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:s}=i,{empty:o}=s;if(o)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=Bq(a,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}const FMe=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function _u(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(FMe,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const SF=zs.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){_F(e);return}_F(e.scheme,e.optionalSlashes)})},onDestroy(){AMe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!_u(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!_u(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!_u(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",sr(this.options.HTMLAttributes,e),0]:["a",sr(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_u(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_u(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ql({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,i=Bq(e).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!_u(o,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>t.push({text:s.value,data:{href:s.href},index:s.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(DMe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!_u(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(NMe({type:this.type})),this.options.linkOnPaste&&e.push(LMe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),BMe={class:"bubble-menu flex bg-black rounded-md text-[14px] text-white space-x-1"},zMe=ee({__name:"InlineTextEditor",props:{class:{},content:{},editable:{type:Boolean},enableHeading:{type:Boolean},style:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,i=u=>u?Object.entries(u).reduce((c,[d,f])=>(typeof f=="string"||typeof f=="number"?c[d]=f:c[d]=String(f),c),{}):{},s=U();nt(()=>{s.value=new lPe({extensions:[uMe,cMe.configure({placeholder:"Write something...",emptyEditorClass:"is-editor-empty",showOnlyWhenEditable:!0}),aF,hMe,pMe.configure({types:["heading","paragraph"]}),mMe,SF.configure({HTMLAttributes:{class:"underline"},shouldAutoLink:u=>u.startsWith("https://")||u.startsWith("http://")})],enablePasteRules:[SF,"horizontalRule"],editorProps:{attributes:{class:`${n.editable?"prose prose-sm sm:prose-base lg:prose-lg xl:prose-2xl focus:outline-none bg-inherit/50 0 focus:bg-white/25 ease-in-out duration-150 rounded-md border border-dashed border-gray-200 hover:border-gray-300 p-3 -m-3":""}`},transformPastedText(u){return u.trim()}},parseOptions:{preserveWhitespace:"full"},onUpdate:({editor:u})=>{r("update:modelValue",u.getHTML())},content:n.content,editable:n.editable})}),yr(()=>{s.value.destroy()});const o=u=>{s.value.chain().focus().toggleHeading({level:u}).run()},a=u=>{s.value.chain().focus().setTextAlign(u).run()},l=()=>{const u=s.value.getAttributes("link").href,c=window.prompt("URL",u);if(c===null)return;if(c===""){s.value.chain().focus().extendMarkRange("link").unsetLink().run();return}if(!(f=>{try{const h=new URL(f);return["http:","https:"].includes(h.protocol)}catch{return!1}})(c)){alert("Invalid URL. Please enter a valid URL."),l();return}s.value.chain().focus().extendMarkRange("link").setLink({href:c}).run()};return(u,c)=>(k(),W("div",{class:Le(["editor",n.class]),style:xn(i(n.style))},[s.value?(k(),X(y(aF),{key:0,editor:s.value,"tippy-options":{duration:100}},{default:H(()=>[A("div",BMe,[u.enableHeading?(k(),W("button",{key:0,type:"button",onClick:c[0]||(c[0]=d=>o(1))},"H1")):fe("",!0),u.enableHeading?(k(),W("button",{key:1,type:"button",onClick:c[1]||(c[1]=d=>o(2))},"H2")):fe("",!0),u.enableHeading?(k(),W("button",{key:2,type:"button",onClick:c[2]||(c[2]=d=>o(3))},"H3")):fe("",!0),A("button",{type:"button",class:Le({"is-active":s.value.isActive("bold")}),onClick:c[3]||(c[3]=d=>s.value.chain().focus().toggleBold().run())},[$(y(ny),{class:"w-4 h-4"})],2),A("button",{type:"button",class:Le({"is-active":s.value.isActive("italic")}),onClick:c[4]||(c[4]=d=>s.value.chain().focus().toggleItalic().run())},[$(y(ry),{class:"w-4 h-4"})],2),A("button",{type:"button",class:Le({"is-active":s.value.isActive("underline")}),onClick:c[5]||(c[5]=d=>s.value.chain().focus().toggleUnderline().run())},[$(y(xfe),{class:"w-4 h-4"})],2),A("button",{type:"button",onClick:c[6]||(c[6]=d=>a("left"))},[$(y(xO),{class:"w-4 h-4"})]),A("button",{type:"button",onClick:c[7]||(c[7]=d=>a("center"))},[$(y(SO),{class:"w-4 h-4"})]),A("button",{type:"button",onClick:c[8]||(c[8]=d=>a("right"))},[$(y(OV),{class:"w-4 h-4"})]),A("button",{onClick:l,class:Le({"is-active":s.value.isActive("link")})},[$(y(fb),{class:"w-4 h-4"})],2)])]),_:1},8,["editor"])):fe("",!0),$(y(uPe),{editor:s.value,class:""},null,8,["editor"])],6))}}),$Me=Ei(zMe,[["__scopeId","data-v-bd31e10a"]]),aa=ee({__name:"InlineTextContainer",props:{class:{},style:{},content:{},editable:{type:Boolean},enableHeading:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,i=s=>{const o={class:n.class,content:s};r("update:modelValue",o)};return(s,o)=>(k(),X($Me,Fe(n,{"onUpdate:modelValue":i}),null,16))}});async function HMe(e){if(navigator.share)try{return await navigator.share(e),!0}catch{return!1}return!1}const zq=ee({__name:"ShareLinkButton",emits:["copy"],setup(e,{emit:t}){const n=()=>/Mobi|Android/i.test(navigator.userAgent),r=Ur(),i=U(null),s=U(!1),o=t,a=async()=>{const u=window.location.href;o("copy",u),await navigator.clipboard.writeText(u),i.value&&(s.value=!0,setTimeout(()=>{s.value=!1},2e3)),r.track("Link copied - artwork preview")},l=async()=>{n()?HMe({url:window.location.href}):a()};return(u,c)=>(k(),X(y(H4),null,{default:H(()=>[$(y(z4),null,{default:H(()=>[$(y(V4),null,{default:H(()=>[$(y(gt),{class:"flex items-center gap-1 px-3 py-5 text-sm text-primary rounded-xl bg-white/10 hover:bg-slate-100",variant:"default",size:"xs",ref_key:"button",ref:i,outline:"",onClick:lt(l,["stop"])},{default:H(()=>[s.value?(k(),X(y(qve),{key:0,class:"w-6"})):(k(),X(y(Wve),{key:1,class:"w-6"}))]),_:1},512)]),_:1}),$(y($4),{side:"bottom",class:"bg-black text-white border-black"},{default:H(()=>[Ye(ye(u.$t("actions.copyLink")),1)]),_:1})]),_:1})]),_:1}))}}),{t:Rv}=L0.global,Iv=j0(),VMe=[{id:"title",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Iv.track("OVR tracking - link tracking view - sort by link name")}},()=>[Rv("tables.ListLinkTable.headers.title"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>We("span",{class:"text-sm max-w-sm break-words"},e.original.title||"(no title)")},{id:"visits_count",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Iv.track("OVR tracking - link tracking view - sort by visits")}},()=>[Rv("tables.ListLinkTable.headers.visits_count"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>We("span",{class:"flex items-center"},[We(j4,{class:"w-6 mr-1 p-1 text-purple-500 bg-purple-100 rounded-full"}),We("span",{class:"ml-1"},e.original.visits_count||0)])},{id:"user_full_name",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Iv.track("OVR tracking - link tracking view - sort by creator")}},()=>[Rv("tables.ListLinkTable.headers.user_full_name"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},accessorFn:(e,t)=>e.user&&`${e.user.first_name} ${e.user.last_name}`||"(no name)"},{id:"link_created_at",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Iv.track("OVR tracking - link tracking view - sort by creation date")}},()=>[Rv("tables.ListLinkTable.headers.link_created_at"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},accessorFn:(e,t)=>pR(e.created_at)}],{t:Dh}=L0.global,Nh=j0(),jMe=[{id:"list_name",header:({column:e})=>{const t=!!e.getIsSorted(),n=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Nh.track("OVR tracking - link tracking view - sort by list")}},()=>[Dh("tables.LinkTable.headers.list_name"),t?We(n,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>{var r,i,s;const t=(i=(r=e.original.inventory_set)==null?void 0:r.cover_inventory)==null?void 0:i.url,n=We("img",{src:t?Pb(t,"https://www.inventory.gallery/fit-in",800,800):"/images/artwork-placeholder.svg",class:"w-11 h-full object-cover rounded-md"});return We("div",{class:"flex items-center gap-3 w-auto h-11"},[n,We("span",{class:"text-sm"},((s=e.original.inventory_set)==null?void 0:s.name)||"(no title)")])}},{id:"title",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Nh.track("OVR tracking - link tracking view - sort by link name")}},()=>[Dh("tables.LinkTable.headers.title"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>We("span",{class:"text-sm max-w-sm break-words"},e.original.title||"(no title)")},{id:"visits_count",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Nh.track("OVR tracking - link tracking view - sort by visits")}},()=>[Dh("tables.LinkTable.headers.visits_count"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},cell:({row:e})=>We("span",{class:"flex items-center"},[We(j4,{class:"w-6 mr-1 p-1 text-purple-500 bg-purple-100 rounded-full"}),We("span",{class:"ml-1"},e.original.visits_count||0)])},{id:"user_full_name",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Nh.track("OVR tracking - link tracking view - sort by creator")}},()=>[Dh("tables.LinkTable.headers.user_full_name"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},accessorFn:(e,t)=>e.user&&`${e.user.first_name} ${e.user.last_name}`},{id:"last_visited_at",header:({column:e})=>{const t=!!e.getIsSorted(),r=e.getIsSorted()==="asc"?xs:Ss;return We(gt,{variant:"ghost",class:"p-0 hover:bg-transparent",onClick:()=>{Es(e),e.getIsSorted()&&Nh.track("OVR tracking - link tracking view - sort by last visited")}},()=>[Dh("tables.LinkTable.headers.last_visited_at"),t?We(r,{class:"ml-2 h-4 w-4"}):null])},accessorFn:(e,t)=>e.last_visited_at?pR(e.last_visited_at):"Not visited yet"}];ln` mutation CreateOvr($input: CreateOvrDto!) { createOvr(input: $input) { id title slug enabled tracking_enabled settings created_at updated_at } } `;const UMe=ln` mutation DeleteOvr($id: Int!) { deleteOvr(id: $id) } `,WMe=ln` mutation toggleOvr($id: Int!, $enabled: Boolean!) { toggleOvr(id: $id, enabled: $enabled) } `,qMe=ln` mutation SaveDefaultOVRSettings($settings: JSON!) { saveDefaultOVRSettings(settings: $settings) } `,GMe={key:1,class:"mb-4 font-semibold"},KMe={class:"justify-between md:flex flex-row w-full min-h-[76px] py-4 px-4 rounded-md my-4 text-wrap col-span-full flex justify-between bg-blue-100 xl:max-w-full"},YMe={class:"flex items-center"},XMe={key:3,class:"flex justify-center items-center h-96"},Jc=ee({__name:"View",setup(e){const{t}=ls(),n=Ir(),{toast:r}=$s(),i=Ur(),{resolveClient:s}=Ac(),o=s(),{ovr_link_id:a}=Ir().query,l=U("");He(()=>n.params.id,ne=>{typeof ne=="string"&&(l.value=ne)},{immediate:!0});const u=te(()=>!l.value),c=te(()=>n.query.enabled==="true"),d=te(()=>n.query.enabled==="false"),f=te(()=>l.value?VMe:jMe),h=U(c.value?t("pages.activeViewingRoomLinks.title"):d.value?t("pages.disabledViewingRoomLinks.title"):t("pages.allViewingRoomLinks.title")),p=()=>{l.value&&o.query({query:vW,variables:{id:parseInt(l.value)}}).then(({data:ne})=>{h.value=ne.getInventorySetById.name})},m=te(()=>l.value?`/inventory/set/${l.value}`:"/viewingRoomLists");nt(p);const g=Mve(),v=Math.floor(g.height.value/100),w=U([]),b=U(),_=U(null),x=U(!0),S=(ne,oe="",le=null)=>{var _e,Te,Ie,Ae;x.value=!0;const Ee=((_e=_.value)==null?void 0:_e.pagination.pageIndex)??0,xe=ne??Ee,Me=((Te=_.value)==null?void 0:Te.pagination.pageSize)??v,Ve=oe||((Ie=_.value)==null?void 0:Ie.searchString)||"",Ue=le||((Ae=_.value)==null?void 0:Ae.sorting)||[],me={list_id:parseInt(l.value),offset:xe*Me,limit:Me,search:Ve,filters:{},order:Ue};if(n.query.enabled){const Q=n.query.enabled==="true";me.filters.enabled=Q}o.query({query:USe,variables:me}).then(({data:Q})=>{w.value=Q.getOvrsForList.ovrs,b.value=Q.getOvrsForList.count,x.value=!1})};nt(S);const I=U(),P=ne=>{I.value=w.value.find(oe=>oe.id===ne),I.value&&i.track("OVR tracking - link tracking view")},R=()=>{I.value=void 0};nt(()=>{a&&typeof a=="string"&&o.query({query:WSe,variables:{id:parseInt(a)}}).then(({data:ne})=>{I.value=ne.getOvrById}).catch(ne=>{r({description:t("messages.ovrLinkNotFound")})})});const O=U(!1),M=U(null),E=ne=>{M.value=ne,O.value=!0},L=()=>{M.value=null,O.value=!1},j=U(!1),F=()=>{j.value=!0},B=()=>{j.value=!1},Y=(ne,oe)=>{o.mutate({mutation:WMe,variables:{id:ne,enabled:!oe}}).then(()=>S()),R(),r({title:t(oe?"messages.linkDisabled":"messages.linkEnabled"),variant:"success"}),i.track(`OVR Tracking - ${oe?"Link disabled":"Link enabled"}`)},Z=()=>{M.value&&o.mutate({mutation:UMe,variables:{id:M.value}}).then(()=>{S(),L(),R(),r({title:t("messages.linkDeleted"),variant:"success"}),i.track("OVR Tracking - Link deleted")})};return(ne,oe)=>{const le=En("useHead");return k(),W(je,null,[$(le,null,{default:H(()=>[A("title",null,ye(h.value),1)]),_:1}),A("div",null,[u.value?(k(),W("h3",GMe,ye(c.value?y(t)("pages.activeViewingRoomLinks.title"):d.value?y(t)("pages.disabledViewingRoomLinks.title"):y(t)("pages.allViewingRoomLinks.title")),1)):(k(),X(y(Dve),{key:0,class:"mb-4"},{default:H(()=>[$(y(Lve),{class:"text-md"},{default:H(()=>[$(y(AN),null,{default:H(()=>[$(y(Nve),{href:m.value,onClick:oe[0]||(oe[0]=Ee=>y(i).track("OVR tracking - list button"))},{default:H(()=>[Ye(ye(h.value),1)]),_:1},8,["href"])]),_:1}),$(y(Bve)),$(y(AN),null,{default:H(()=>[$(y(Fve),null,{default:H(()=>[Ye(ye(ne.$t("misc.viewingRoomLinks")),1)]),_:1})]),_:1})]),_:1})]),_:1})),A("div",KMe,[A("div",YMe,[$(y(Sfe),{class:"w-6 h-6 mr-3 text-blue-900"}),oe[4]||(oe[4]=A("div",null,[A("p",{class:"font-semibold text-blue-900 mb-1"},"New Online Viewing Rooms with Tracking"),A("p",{class:"text-sm text-blue-900"},"Create stunning, customizable OVRs to showcase your art—and track exactly who’s viewing and what’s capturing their attention.")],-1))]),A("a",{href:"https://intercom.help/arternal/en/articles/11030532-online-viewing-room-2-0-ovr-2-0",target:"_blank",rel:"noopener noreferrer",class:"ml-auto bg-black text-white px-4 py-2 rounded-lg hover:opacity-75 min-h-10 my-auto w-32 flex items-center justify-center text-center hover:no-underline",onClick:oe[1]||(oe[1]=Ee=>y(i).track("OVR tracking - release banner - learn more"))},oe[5]||(oe[5]=[A("span",{class:"w-full text-center text-white text-sm"}," Learn More ",-1)]))]),b.value!==void 0?(k(),X(y(c1e),{key:2,ref_key:"linkTableRef",ref:_,columns:f.value,data:w.value,"data-count":b.value,loading:x.value,"list-id":l.value,"page-size":y(v),onLinkClicked:P,onSearch:oe[2]||(oe[2]=Ee=>S(0,Ee)),onCreateLink:F,onToggleLink:Y,onDeleteLink:E,onFetchMore:S,onSortBy:oe[3]||(oe[3]=Ee=>S(0,"",Ee))},null,8,["columns","data","data-count","loading","list-id","page-size"])):(k(),W("div",XMe,[$(y(Ul))]))]),I.value?(k(),X(y(yxe),{key:0,"selected-link":I.value,onClose:R,onToggleLink:Y,onDeleteLink:E},null,8,["selected-link"])):fe("",!0),M.value?(k(),X(y(Cxe),{key:1,"is-open":O.value,"link-id":M.value,onCancel:L,onConfirm:Z},null,8,["is-open","link-id"])):fe("",!0),j.value?(k(),X(y(ySe),{key:2,open:j.value,onClose:B},null,8,["open"])):fe("",!0)],64)}}}),JMe={class:"mx-auto max-w-md rounded border p-5"},QMe={class:"mb-8 text-center"},ZMe={class:"mb-3 flex items-center justify-center"},eDe=ee({__name:"Callback",setup(e){const t=Aa();try{t.replace({name:"home"})}catch(n){console.log("e",n==null?void 0:n.message)}return(n,r)=>(k(),W("div",JMe,[A("header",QMe,[A("h1",null,ye(n.$t("pages.callback.title")),1)]),r[0]||(r[0]=A("hr",{class:"mb-8"},null,-1)),A("div",ZMe,[$(y(Ul),{class:"mr-2"}),A("div",null,ye(n.$t("messages.wait")),1)])]))}}),qx=ee({__name:"Slider",props:{name:{},defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Wce),Fe({class:y(st)("relative flex w-full touch-none select-none items-center data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full",n.class)},y(s)),{default:H(()=>[$(y(Kce),{class:"relative h-2 w-full data-[orientation=vertical]:w-2 grow overflow-hidden rounded-full bg-slate-100 dark:bg-slate-800"},{default:H(()=>[$(y(Yce),{class:"absolute h-full data-[orientation=vertical]:w-full bg-slate-900 dark:bg-slate-50"})]),_:1}),(k(!0),W(je,null,Ot(o.modelValue,(l,u)=>(k(),X(y(Gce),{key:u,class:"block h-5 w-5 rounded-full border-2 border-slate-900 bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-slate-50 dark:bg-slate-950 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300"}))),128))]),_:1},16,["class"]))}}),tDe=ee({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(cue),Fe(y(s),{class:y(st)("peer h-4 w-4 shrink-0 rounded-sm border border-slate-200 border-slate-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=checked]:text-slate-50 dark:border-slate-800 dark:border-slate-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300 dark:data-[state=checked]:bg-slate-50 dark:data-[state=checked]:text-slate-900",n.class)}),{default:H(()=>[$(y(due),{class:"flex h-full w-full items-center justify-center text-current"},{default:H(()=>[ce(o.$slots,"default",{},()=>[$(y(RV),{class:"h-4 w-4"})])]),_:3})]),_:3},16,["class"]))}}),nDe={class:"pb-5"},rDe={class:"mb-4 flex justify-between items-center"},iDe={for:"display_banner",class:"text-sm cursor-pointer"},sDe={key:0,class:"flex flex-col gap-3"},oDe={class:"mb-4"},aDe={class:"flex items-center justify-between"},lDe={class:"px-3 py-2 pointer-events-none rounded-md border border-gray-200"},uDe={class:"mb-4"},cDe=["disabled"],dDe={class:"mb-4 flex justify-between items-center"},fDe={key:0,class:"mb-4"},hDe={class:"flex justify-between items-center mb-4"},pDe={key:1},mDe={class:"mb-4 flex justify-between items-center"},gDe=["disabled"],vDe={class:"mb-4"},yDe={class:"flex items-center justify-between"},bDe={class:"px-3 py-2 pointer-events-none rounded-md border border-gray-200"},wDe={key:1,class:"space-y-3"},_De={class:"space-y-3 mb-4"},SDe={class:"flex items-center space-x-2"},xDe={key:2,class:"space-y-3 mb-4"},EDe={class:"flex items-center space-x-3"},TDe={class:"flex items-center gap-2"},kDe={id:"modals"},CDe=20,ODe=100,RDe=1,IDe=ee({__name:"EditHeader",props:{ovr:{}},emits:["update:settings"],setup(e,{emit:t}){const{header:n}=e.ovr.settings,{user:r}=fU(),{toast:i}=$s(),s=Ur(),o=t,a=U([n.height]),l=U(n.bg_image),u=U(n.bg_image_uncropped),c=U(n.image_orientation),d=U(n.overlay),f=U(n.overlay_color),h=U([n.overlay_opacity]),p=U(n.display_banner),m=U([n.banner_vertical_position]),g=U(n.display_date),v=U(n.scroll_effect),w=U(n.text_vertical_align),b=U(n.text_horizontal_align),_=te(()=>l.value?l.value&&l.value.includes("blob:")?l.value:`${"https://www.inventory.gallery/fit-in".trim("/")}/1600x1600/${l.value}`:""),x=te(()=>{if(!u.value&&!l.value)return"";const ne="https://www.inventory.gallery".replace(/https{0,1}:\/\//,""),oe=u.value||l.value;return oe&&oe.includes("blob:")?oe:`https://s3.amazonaws.com/${ne}/${oe}`}),S=()=>{l.value="",u.value="",s.track("OVR edit header - remove image")},I=U(null),P=ne=>{O(ne[0])},R=ne=>{const oe=ne.target;oe.files&&O(oe.files[0])},O=(ne,oe=!1)=>{if(!ne.type.startsWith("image/")){console.error("Received file is not an image");return}if(ne){l.value=URL.createObjectURL(ne),oe||(u.value=l.value);const Ee=`${r.value["https://arternal.com/claims"].user_id}/ovr/${e.ovr.id}/${r_(ne.name,{lower:!0})}`;C0e(ne,Ee).then(()=>{const xe=Pb(Ee,"https://www.inventory.gallery/fit-in",1600,1600);fetch(xe,{method:"GET",mode:"no-cors"}).finally(()=>{l.value=Ee,oe?s.track("OVR edit header - crop image"):(u.value=l.value,s.track("OVR edit header - add image")),i({description:"Cover image uploaded"})})})}},M=()=>{var ne;(ne=I.value)==null||ne.click()},E=U(!1),L=()=>{E.value=!0},j=()=>{E.value=!1},F=ne=>{const oe=ne.type.lastIndexOf("/"),le=oe>-1?ne.type.slice(oe+1):"png";let Ee=null;if(_.value){const Ve=_.value.lastIndexOf("/")+1,Ue=_.value.lastIndexOf(".");Ee=_.value.slice(Ve,Ue)+`-${Math.random()*2e3}`}const xe=[Ee,le].join("."),Me=new File([ne],xe,{type:ne.type});O(Me,!0)},B=Os(()=>s.track("OVR edit header - banner height"),500),Y=Os(()=>s.track("OVR edit header - vertical position"),500),Z=Os(()=>s.track("OVR edit header - overlay opacity"),500);return He([a,l,c,d,f,h,p,m,g,v,w,b],()=>{o("update:settings",{...e.ovr.settings,header:{...e.ovr.settings.header,height:a.value[0],bg_image:l.value,bg_image_uncropped:u.value,image_orientation:c.value,overlay:d.value,overlay_color:f.value,overlay_opacity:h.value[0],display_banner:p.value,banner_vertical_position:m.value[0],display_date:g.value,scroll_effect:v.value,text_vertical_align:w.value,text_horizontal_align:b.value}})},{deep:!0}),He([b,w],(ne,oe)=>{const[le,Ee]=oe;b.value!==le?s.track("OVR edit header - horizontal alignment"):s.track("OVR edit header - vertical alignment")}),(ne,oe)=>(k(),W("section",nDe,[A("div",rDe,[A("label",iDe,ye(ne.$t("actions.displayBanner")),1),$(y(Wd),{id:"display_banner",class:Le({"!bg-success-500":p.value}),checked:p.value,"onUpdate:checked":oe[0]||(oe[0]=le=>{p.value=le,le&&y(s).track("OVR edit header - display banner")})},null,8,["class","checked"])]),p.value?(k(),W("div",sDe,[A("div",oDe,[oe[16]||(oe[16]=A("h2",{class:"text-sm mb-3"},"Banner Height",-1)),A("div",aDe,[$(y(qx),{modelValue:a.value,"onUpdate:modelValue":[oe[1]||(oe[1]=le=>a.value=le),y(B)],class:Le(["w-3/4",{"opacity-50":!p.value}]),min:CDe,max:ODe,step:RDe,disabled:!p.value},null,8,["modelValue","class","disabled","onUpdate:modelValue"]),A("div",lDe,ye(y(XN)(a.value[0]/100)),1)])]),A("div",uDe,[A("label",{for:"bg_image",class:Le(["block text-sm mb-3 cursor-pointer",{"pointer-events-none":!p.value}])},"Cover Image",2),$(y(X_e),{modelValue:_.value,"onUpdate:modelValue":oe[2]||(oe[2]=le=>_.value=le),class:"rounded-xl hover:bg-secondary-100",disabled:!p.value,onFiles:P,onClick:M,onDelete:S,onCrop:L},{default:H(()=>[A("input",{id:"bg_image",ref_key:"fileInput",ref:I,type:"file",accept:"image/*",class:"hidden",disabled:!p.value,onChange:R},null,40,cDe)]),_:1},8,["modelValue","disabled"])]),A("div",dDe,[oe[17]||(oe[17]=A("label",{for:"scroll_effect",class:"text-sm cursor-pointer"},"Enable Scroll Effect",-1)),$(y(Wd),{id:"scroll_effect",class:Le({"!bg-success-500":v.value}),checked:v.value,"onUpdate:checked":oe[3]||(oe[3]=le=>{v.value=le,le&&y(s).track("OVR edit header - enable scroll effect")})},null,8,["class","checked"])]),v.value?fe("",!0):(k(),W("div",fDe,[oe[18]||(oe[18]=A("h2",{class:"text-sm mb-3"},"Vertical Position",-1)),$(y(qx),{modelValue:m.value,"onUpdate:modelValue":[oe[4]||(oe[4]=le=>m.value=le),y(Y)],min:0,max:100,step:1},null,8,["modelValue","onUpdate:modelValue"])])),A("div",hDe,[oe[19]||(oe[19]=A("label",{for:"overlay",class:"text-sm cursor-pointer"},"Overlay",-1)),$(y(Wd),{id:"overlay",class:Le({"!bg-success-500":d.value}),checked:d.value,"onUpdate:checked":oe[5]||(oe[5]=le=>{d.value=le,le&&y(s).track("OVR edit header - overlay")})},null,8,["class","checked"])]),d.value?(k(),W("div",pDe,[A("div",mDe,[A("label",{for:"colorInput",class:Le(["block text-sm flex-auto cursor-pointer",{"pointer-events-none":!d.value}])},"Color Overlay",2),A("label",{for:"colorInput",class:Le(["w-6 h-6 rounded-full cursor-pointer shadow shadow-gray-800/30",{"pointer-events-none opacity-20":!d.value}]),style:xn({"background-color":f.value||"#000000"})},[At(A("input",{id:"colorInput","onUpdate:modelValue":oe[6]||(oe[6]=le=>f.value=le),class:"invisible",type:"color",disabled:!d.value,onChange:oe[7]||(oe[7]=le=>y(s).track("OVR edit header - overlay color"))},null,40,gDe),[[pi,f.value]])],6)]),A("div",vDe,[oe[20]||(oe[20]=A("label",{class:"block text-sm mb-3"},"Opacity",-1)),A("div",yDe,[$(y(qx),{modelValue:h.value,"onUpdate:modelValue":[oe[8]||(oe[8]=le=>h.value=le),y(Z)],class:Le(["w-3/4",{"opacity-50":!d.value}]),step:.01,min:.1,max:1,disabled:!d.value},null,8,["modelValue","class","disabled","onUpdate:modelValue"]),A("div",bDe,ye(y(XN)(h.value[0])),1)])])])):fe("",!0),oe[21]||(oe[21]=A("hr",{class:"mb-4"},null,-1))])):fe("",!0),p.value?(k(),W("div",wDe,[A("div",_De,[oe[22]||(oe[22]=A("label",{class:"text-sm mb-2"},"Horizontal Text Alignment",-1)),A("div",SDe,[$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":b.value==="left"}]),onClick:oe[9]||(oe[9]=le=>b.value="left")},{default:H(()=>[$(y(xO),{class:"h-5 w-5 text-black"})]),_:1},8,["class"]),$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":b.value==="center"}]),onClick:oe[10]||(oe[10]=le=>b.value="center")},{default:H(()=>[$(y(SO),{class:"h-5 w-5 text-black"})]),_:1},8,["class"]),$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":b.value==="right"}]),onClick:oe[11]||(oe[11]=le=>b.value="right")},{default:H(()=>[$(y(OV),{class:"h-5 w-5 text-black"})]),_:1},8,["class"])])])])):fe("",!0),p.value?(k(),W("div",xDe,[oe[23]||(oe[23]=A("label",{class:"text-sm mb-2"},"Vertical Text Alignment",-1)),A("div",EDe,[$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":w.value==="top"}]),onClick:oe[12]||(oe[12]=le=>w.value="top")},{default:H(()=>[$(y(gfe),{class:"h-5 w-5 text-black"})]),_:1},8,["class"]),$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":w.value==="middle"}]),onClick:oe[13]||(oe[13]=le=>w.value="middle")},{default:H(()=>[$(y(pfe),{class:"h-5 w-5 text-black"})]),_:1},8,["class"]),$(y(gt),{type:"button",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":w.value==="bottom"}]),onClick:oe[14]||(oe[14]=le=>w.value="bottom")},{default:H(()=>[$(y(mfe),{class:"h-5 w-5 text-black"})]),_:1},8,["class"])])])):fe("",!0),oe[25]||(oe[25]=A("hr",{class:"mb-4"},null,-1)),A("div",TDe,[$(y(tDe),{id:"display_date",class:"rounded data-[state=checked]:bg-info-500 data-[state=checked]:border-0 data-[state=checked]:ring-info-500",checked:g.value,"onUpdate:checked":oe[15]||(oe[15]=le=>{g.value=le,le&&y(s).track("OVR edit header - display date")})},null,8,["checked"]),oe[24]||(oe[24]=A("label",{for:"display_date",class:"text-sm cursor-pointer"},"Display Date",-1))]),A("div",kDe,[x.value?(k(),X(y(Aye),{key:0,open:E.value,"img-src":x.value,onCrop:F,onCancel:j,onClose:j},null,8,["open","img-src"])):fe("",!0)])]))}}),ADe=Ei(IDe,[["__scopeId","data-v-4827d5b9"]]);function Gx(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function PDe(e){return(...t)=>!e(...t)}function MDe(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function $q(e,t,n,r){return t?e.filter(i=>MDe(r(i,n),t)).sort((i,s)=>r(i,n).length-r(s,n).length):e}function DDe(e){return e.filter(t=>!t.$isLabel)}function Kx(e,t){return n=>n.reduce((r,i)=>i[e]&&i[e].length?(r.push({$groupLabel:i[t],$isLabel:!0}),r.concat(i[e])):r,[])}function NDe(e,t,n,r,i){return s=>s.map(o=>{if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const a=$q(o[n],e,t,i);return a.length?{[r]:o[r],[n]:a}:[]})}const xF=(...e)=>t=>e.reduce((n,r)=>r(n),t);var LDe={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Gx(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):$q(n,t,this.label,this.customLabel):n=this.groupValues?Kx(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(PDe(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return xF(NDe(t,n,this.groupValues,this.groupLabel,this.customLabel),Kx(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return xF(Kx(this.groupValues,this.groupLabel),DDe)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Gx(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Gx(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.internalValue.filter(r=>t[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",n)}else{let n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},FDe={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},Hq={name:"vue-multiselect",mixins:[LDe,FDe],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const BDe={ref:"tags",class:"multiselect__tags"},zDe={class:"multiselect__tags-wrap"},$De={class:"multiselect__spinner"},HDe={key:0},VDe={class:"multiselect__option"},jDe={class:"multiselect__option"},UDe=Ye("No elements found. Consider changing the search query."),WDe={class:"multiselect__option"},qDe=Ye("List is empty.");function GDe(e,t,n,r,i,s){return k(),X("div",{tabindex:e.searchable?-1:n.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":s.isAbove,"multiselect--has-options-group":s.hasOptionGroup},"multiselect"],onFocus:t[14]||(t[14]=o=>e.activate()),onBlur:t[15]||(t[15]=o=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=fi(lt(o=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=fi(lt(o=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=fi(lt(o=>e.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=fi(o=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[ce(e.$slots,"caret",{toggle:e.toggle},()=>[$("div",{onMousedown:t[1]||(t[1]=lt(o=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),ce(e.$slots,"clear",{search:e.search}),$("div",BDe,[ce(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:s.visibleValues,isOpen:e.isOpen},()=>[At($("div",zDe,[(k(!0),X(je,null,Ot(s.visibleValues,(o,a)=>ce(e.$slots,"tag",{option:o,search:e.search,remove:e.removeElement},()=>[(k(),X("span",{class:"multiselect__tag",key:a},[$("span",{textContent:ye(e.getOptionLabel(o))},null,8,["textContent"]),$("i",{tabindex:"1",onKeypress:fi(lt(l=>e.removeElement(o),["prevent"]),["enter"]),onMousedown:lt(l=>e.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[Cu,s.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?ce(e.$slots,"limit",{key:0},()=>[$("strong",{class:"multiselect__strong",textContent:ye(n.limitText(e.internalValue.length-n.limit))},null,8,["textContent"])]):fe("v-if",!0)]),$(is,{name:"multiselect__loading"},{default:H(()=>[ce(e.$slots,"loading",{},()=>[At($("div",$De,null,512),[[Cu,n.loading]])])]),_:3}),e.searchable?(k(),X("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:!1,placeholder:e.placeholder,style:s.inputStyle,value:e.search,disabled:n.disabled,tabindex:n.tabindex,onInput:t[2]||(t[2]=o=>e.updateSearch(o.target.value)),onFocus:t[3]||(t[3]=lt(o=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=lt(o=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=fi(o=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=fi(lt(o=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=fi(lt(o=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=fi(lt(o=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=fi(lt(o=>e.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):fe("v-if",!0),s.isSingleLabelVisible?(k(),X("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=lt((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[ce(e.$slots,"singleLabel",{option:s.singleValue},()=>[Ye(ye(e.currentOptionLabel),1)])],32)):fe("v-if",!0),s.isPlaceholderVisible?(k(),X("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=lt((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[ce(e.$slots,"placeholder",{},()=>[Ye(ye(e.placeholder),1)])],32)):fe("v-if",!0)],512),$(is,{name:"multiselect"},{default:H(()=>[At($("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...o)=>e.activate&&e.activate(...o)),tabindex:"-1",onMousedown:t[13]||(t[13]=lt(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[$("ul",{class:"multiselect__content",style:s.contentStyle,role:"listbox",id:"listbox-"+e.id},[ce(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(k(),X("li",HDe,[$("span",VDe,[ce(e.$slots,"maxElements",{},()=>[Ye("Maximum of "+ye(e.max)+" options selected. First remove a selected option to select another.",1)])])])):fe("v-if",!0),!e.max||e.internalValue.length<e.max?(k(!0),X(je,{key:1},Ot(e.filteredOptions,(o,a)=>(k(),X("li",{class:"multiselect__element",key:a,id:e.id+"-"+a,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?fe("v-if",!0):(k(),X("span",{key:0,class:[e.optionHighlight(a,o),"multiselect__option"],onClick:lt(l=>e.select(o),["stop"]),onMouseenter:lt(l=>e.pointerSet(a),["self"]),"data-select":o&&o.isTag?e.tagPlaceholder:s.selectLabelText,"data-selected":s.selectedLabelText,"data-deselect":s.deselectLabelText},[ce(e.$slots,"option",{option:o,search:e.search,index:a},()=>[$("span",null,ye(e.getOptionLabel(o)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),o&&(o.$isLabel||o.$isDisabled)?(k(),X("span",{key:1,"data-select":e.groupSelect&&s.selectGroupLabelText,"data-deselect":e.groupSelect&&s.deselectGroupLabelText,class:[e.groupHighlight(a,o),"multiselect__option"],onMouseenter:lt(l=>e.groupSelect&&e.pointerSet(a),["self"]),onMousedown:lt(l=>e.selectGroup(o),["prevent"])},[ce(e.$slots,"option",{option:o,search:e.search,index:a},()=>[$("span",null,ye(e.getOptionLabel(o)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):fe("v-if",!0)],8,["id","role"]))),128)):fe("v-if",!0),At($("li",null,[$("span",jDe,[ce(e.$slots,"noResult",{search:e.search},()=>[UDe])])],512),[[Cu,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),At($("li",null,[$("span",WDe,[ce(e.$slots,"noOptions",{},()=>[qDe])])],512),[[Cu,n.showNoOptions&&(e.options.length===0||s.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!n.loading]]),ce(e.$slots,"afterList")],12,["id"])],36),[[Cu,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}Hq.render=GDe;const KDe={class:"space-y-5 mb-5"},YDe={class:"space-y-3"},XDe={class:"text-sm flex flex-col mt-2 space-y-2"},JDe={class:"inline-flex items-center"},QDe={class:"inline-flex items-center"},ZDe={class:"inline-flex items-center"},eNe={class:"mb-3 inline-flex items-center"},tNe={key:0,class:"flex items-center justify-between"},nNe={class:"flex items-center space-x-2"},rNe={class:"space-y-3"},iNe={class:"text-sm flex flex-col space-y-2"},sNe={class:"inline-flex items-center"},oNe={class:"inline-flex items-center"},aNe={class:"inline-flex items-center"},lNe={class:"inline-flex items-center"},uNe={class:"inline-flex items-center"},cNe={class:"inline-flex items-center"},dNe={key:0,class:"w-full p-3 text-center"},fNe={key:1,class:"space-y-3"},hNe={class:"flex flex-col mt-2 space-y-2"},pNe=ee({__name:"EditArtworkSettings",props:{ovr:{}},emits:["update:settings","saveAndRefetchOvr"],setup(e,{emit:t}){const n=t,r=Ur(),{t:i}=ls(),{toast:s}=$s(),{artwork:o,custom_fields:a}=e.ovr.settings,l=U([]),u=U(o.showPrice),c=U(o.showVAT),d=U(o.showStatus),f=U(o.statusStyle),h=U(o.showPricesWhenSold),p=U(o.provenance),m=U(o.collections),g=U(o.literature),v=U(o.exhibition),w=U(o.publications),b=U(o.credit_line),_=U(!1),x=ln` query getInfo($module: String!, $excludeTypes: [String!]) { getOrganizationCustomFields(module: $module, excludeTypes: $excludeTypes) { id attributes } } `,{onResult:S,loading:I}=Ro(x,{module:"inventory",excludeTypes:["tags","checkbox"]}),P=U([]),R=te(()=>P.value.map(M=>{var E;return(E=M==null?void 0:M.attributes)==null?void 0:E.label})),O=()=>{n("saveAndRefetchOvr"),_.value=!1,r.track("OVR edit artwork settings - apply custom fields button"),s({description:i("messages.captionsApplySuccess")})};return He(()=>a,()=>{l.value=a||[]},{deep:!0,immediate:!0}),S(M=>{var E;P.value=((E=M.data)==null?void 0:E.getOrganizationCustomFields)||[]}),He([u,c,d,f,h,p,m,g,v,w,b,l],()=>{n("update:settings",{...e.ovr.settings,artwork:{...e.ovr.settings.artwork,showPrice:u.value,showVAT:c.value,showStatus:d.value,statusStyle:f.value,showPricesWhenSold:h.value,provenance:p.value,collections:m.value,literature:g.value,exhibition:v.value,publications:w.value,credit_line:b.value},custom_fields:l.value}),_.value=!0},{deep:!0}),He([f],()=>r.track("OVR edit artwork settings - status style")),(M,E)=>(k(),W("section",KDe,[A("div",YDe,[E[32]||(E[32]=A("h3",{class:"text-sm text-secondary-600"},"Show in caption",-1)),A("div",XDe,[A("label",JDe,[At(A("input",{"onUpdate:modelValue":[E[0]||(E[0]=L=>u.value=L),E[1]||(E[1]=L=>{L&&y(r).track("OVR edit artwork settings - show price")})],type:"checkbox"},null,512),[[Ti,u.value]]),E[25]||(E[25]=A("span",{class:"ml-2"},"Show price",-1))]),A("label",QDe,[At(A("input",{"onUpdate:modelValue":[E[2]||(E[2]=L=>h.value=L),E[3]||(E[3]=L=>{L&&y(r).track("OVR edit artwork settings - show price when sold")})],type:"checkbox"},null,512),[[Ti,h.value]]),E[26]||(E[26]=A("span",{class:"ml-2"},"Show prices when sold",-1))]),A("label",ZDe,[At(A("input",{"onUpdate:modelValue":[E[4]||(E[4]=L=>c.value=L),E[5]||(E[5]=L=>{L&&y(r).track("OVR edit artwork settings - show VAT status")})],type:"checkbox"},null,512),[[Ti,c.value]]),E[27]||(E[27]=A("span",{class:"ml-2"},"Show VAT status",-1))]),A("div",null,[A("label",eNe,[At(A("input",{"onUpdate:modelValue":[E[6]||(E[6]=L=>d.value=L),E[7]||(E[7]=L=>{L&&y(r).track("OVR edit artwork settings - show status")})],type:"checkbox"},null,512),[[Ti,d.value]]),E[28]||(E[28]=A("span",{class:"ml-2"},"Show status indicator",-1))]),d.value?(k(),W("div",tNe,[A("div",nNe,[$(y(gt),{type:"button",variant:"outline",class:Le(["p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":f.value==="text"}]),onClick:E[8]||(E[8]=L=>f.value="text")},{default:H(()=>E[29]||(E[29]=[Ye(" Text ")])),_:1},8,["class"]),$(y(gt),{type:"button",variant:"outline",class:Le(["p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":f.value==="icon"}]),onClick:E[9]||(E[9]=L=>f.value="icon")},{default:H(()=>E[30]||(E[30]=[Ye(" Icon ")])),_:1},8,["class"]),$(y(gt),{type:"button",variant:"outline",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":f.value==="both"}]),onClick:E[10]||(E[10]=L=>f.value="both")},{default:H(()=>E[31]||(E[31]=[Ye(" Both ")])),_:1},8,["class"])])])):fe("",!0)])])]),A("div",rNe,[E[39]||(E[39]=A("h3",{class:"text-sm text-secondary-600"},"Show in detail view",-1)),A("div",iNe,[A("label",sNe,[At(A("input",{"onUpdate:modelValue":[E[11]||(E[11]=L=>p.value=L),E[12]||(E[12]=L=>{L&&y(r).track("OVR edit artwork settings - show provenance")})],type:"checkbox"},null,512),[[Ti,p.value]]),E[33]||(E[33]=A("span",{class:"ml-2"},"Provenance",-1))]),A("label",oNe,[At(A("input",{"onUpdate:modelValue":[E[13]||(E[13]=L=>v.value=L),E[14]||(E[14]=L=>{L&&y(r).track("OVR edit artwork settings - show exhibition")})],type:"checkbox"},null,512),[[Ti,v.value]]),E[34]||(E[34]=A("span",{class:"ml-2"},"Exhibition History",-1))]),A("label",aNe,[At(A("input",{"onUpdate:modelValue":[E[15]||(E[15]=L=>m.value=L),E[16]||(E[16]=L=>{L&&y(r).track("OVR edit artwork settings - show collections")})],type:"checkbox"},null,512),[[Ti,m.value]]),E[35]||(E[35]=A("span",{class:"ml-2"},"Collections",-1))]),A("label",lNe,[At(A("input",{"onUpdate:modelValue":[E[17]||(E[17]=L=>g.value=L),E[18]||(E[18]=L=>{L&&y(r).track("OVR edit artwork settings - show literature")})],type:"checkbox"},null,512),[[Ti,g.value]]),E[36]||(E[36]=A("span",{class:"ml-2"},"Literature",-1))]),A("label",uNe,[At(A("input",{"onUpdate:modelValue":[E[19]||(E[19]=L=>w.value=L),E[20]||(E[20]=L=>{L&&y(r).track("OVR edit artwork settings - show publications")})],type:"checkbox"},null,512),[[Ti,w.value]]),E[37]||(E[37]=A("span",{class:"ml-2"},"Publications",-1))]),A("label",cNe,[At(A("input",{"onUpdate:modelValue":[E[21]||(E[21]=L=>b.value=L),E[22]||(E[22]=L=>{L&&y(r).track("OVR edit artwork settings - show credits")})],type:"checkbox"},null,512),[[Ti,b.value]]),E[38]||(E[38]=A("span",{class:"ml-2"},"Credits",-1))])])]),y(I)?(k(),W("div",dNe,[$(y(Ul),{class:"w-5 h-5"})])):P.value.length?(k(),W("div",fNe,[E[40]||(E[40]=A("label",{class:"font-medium text-base"},"Display Custom Fields",-1)),E[41]||(E[41]=A("p",{class:"text-[0.8rem] text-secondary-500"}," Choose custom fields to show in captions when viewing artwork details. ",-1)),A("div",hNe,[$(y(Hq),{modelValue:l.value,"onUpdate:modelValue":[E[23]||(E[23]=L=>l.value=L),E[24]||(E[24]=L=>y(r).track("OVR edit artwork settings - apply custom fields dropdown"))],options:R.value,"select-label":"","hide-selected":!0,placeholder:"Select a custom field",multiple:""},null,8,["modelValue","options"])])])):fe("",!0),$(y(gt),{type:"button",class:"w-full",disabled:!_.value,onClick:lt(O,["stop"])},{default:H(()=>E[42]||(E[42]=[Ye(" Apply Custom Fields ")])),_:1},8,["disabled"])]))}}),mNe=Ei(pNe,[["__scopeId","data-v-b49c917a"]]),gNe=["for"],vNe=["id","disabled"],ea=ee({__name:"ColourPicker",props:{id:{},modelValue:{},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,r=t,i=U(n.modelValue);He(()=>n.modelValue,o=>{i.value=o});const s=Os(o=>{const a=o.target.value;r("update:modelValue",a)},500);return(o,a)=>(k(),W("label",{for:o.id,class:Le(["block w-6 h-6 rounded-full cursor-pointer shadow shadow-gray-800/30",{"pointer-events-none opacity-20":o.disabled}]),style:xn({"background-color":i.value||"#ffffff"})},[At(A("input",{id:o.id,"onUpdate:modelValue":a[0]||(a[0]=l=>i.value=l),class:"invisible",type:"color",disabled:o.disabled,onInput:a[1]||(a[1]=(...l)=>y(s)&&y(s)(...l)),onChange:a[2]||(a[2]=l=>o.$emit("change"))},null,40,vNe),[[pi,i.value]])],14,gNe))}}),yNe=ee({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const i=hn(e,t);return(s,o)=>(k(),X(y(uce),Pt(Ft(y(i))),{default:H(()=>[ce(s.$slots,"default")]),_:3},16))}}),bNe={id:"radix-css-container"},wNe=ee({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(hce),null,{default:H(()=>[A("div",bNe,[$(y(_ce),Fe({...y(s),...o.$attrs},{class:y(st)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border border-slate-200 bg-white text-slate-950 shadow-md 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-[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 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",o.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:H(()=>[$(y(TNe)),$(y(Oce),{class:Le(y(st)("p-1",o.position==="popper"&&"h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]"))},{default:H(()=>[ce(o.$slots,"default")]),_:3},8,["class"]),$(y(ENe))]),_:3},16,["class"])])]),_:3}))}}),_Ne=ee({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:r,...i}=t;return i});return(r,i)=>(k(),X(y(kce),Fe({class:y(st)("p-1 w-full",t.class)},n.value),{default:H(()=>[ce(r.$slots,"default")]),_:3},16,["class"]))}}),SNe={class:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},xNe=ee({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(xce),Fe(y(r),{class:y(st)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",t.class)}),{default:H(()=>[A("span",SNe,[$(y(Ece),null,{default:H(()=>[$(y(RV),{class:"h-4 w-4"})]),_:1})]),$(y(Cce),null,{default:H(()=>[ce(i.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ENe=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(Ice),Fe(y(r),{class:y(st)("flex cursor-default items-center justify-center py-1",t.class)}),{default:H(()=>[ce(i.$slots,"default",{},()=>[$(y(IV),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),TNe=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(Rce),Fe(y(r),{class:y(st)("flex cursor-default items-center justify-center py-1",t.class)}),{default:H(()=>[ce(i.$slots,"default",{},()=>[$(y(yfe),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),kNe=ee({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(fce),Fe(y(r),{class:y(st)("flex h-10 w-full items-center justify-between rounded-md border border-slate-200 bg-white px-3 py-2 text-sm ring-offset-white data-[placeholder]:text-slate-500 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start dark:border-slate-800 dark:bg-slate-950 dark:ring-offset-slate-950 dark:data-[placeholder]:text-slate-400 dark:focus:ring-slate-300",t.class)}),{default:H(()=>[ce(i.$slots,"default"),$(y(Pce),{"as-child":""},{default:H(()=>[$(y(IV),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),CNe=ee({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,r)=>(k(),X(y(Ace),Pt(Ft(t)),{default:H(()=>[ce(n.$slots,"default")]),_:3},16))}}),Ty=ee({__name:"NumberSelect",props:{modelValue:{},values:{},placeholder:{default:"Select a number"},triggerClass:{default:""}},emits:["update:modelValue"],setup(e){const t=e,n=U(t.modelValue.toString());return He(()=>t.modelValue,r=>{n.value=r.toString()}),(r,i)=>(k(),X(y(yNe),{modelValue:n.value,"onUpdate:modelValue":[i[0]||(i[0]=s=>n.value=s),i[1]||(i[1]=s=>r.$emit("update:modelValue",parseInt(n.value)))]},{default:H(()=>[$(y(kNe),{class:Le(r.triggerClass)},{default:H(()=>[$(y(CNe),{placeholder:r.placeholder},null,8,["placeholder"])]),_:1},8,["class"]),$(y(wNe),null,{default:H(()=>[$(y(_Ne),null,{default:H(()=>[(k(!0),W(je,null,Ot(r.values,s=>(k(),X(y(xNe),{key:s,value:s.toString()},{default:H(()=>[Ye(ye(s),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),ONe=ee({__name:"RadioGroup",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean},name:{},required:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Jue),Fe({class:y(st)("grid gap-2",n.class)},y(s)),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"]))}}),EF=ee({__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean},required:{type:Boolean},name:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=te(()=>{const{class:i,...s}=t;return s}),r=ai(n);return(i,s)=>(k(),X(y(nce),Fe(y(r),{class:y(st)("aspect-square h-4 w-4 rounded-full border border-slate-200 border-slate-900 text-slate-900 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:border-slate-50 dark:text-slate-50 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",t.class)}),{default:H(()=>[$(y(rce),{class:"flex items-center justify-center"},{default:H(()=>[$(y(wfe),{class:"h-2.5 w-2.5 fill-current text-current"})]),_:1})]),_:1},16,["class"]))}}),RNe={class:"pb-5"},INe={class:"mb-4 flex justify-between items-center gap-2"},ANe={class:"mb-4 space-y-2"},PNe={key:0},MNe={class:"space-y-5"},DNe={class:"flex items-center gap-1"},NNe={class:"flex items-center gap-1"},LNe={class:"mb-4 flex justify-between items-center gap-2"},FNe={class:"mb-4 flex justify-between items-center gap-2"},BNe={key:0,class:"mb-4 flex justify-between items-center gap-2"},zNe=ee({__name:"EditLayoutBackground",props:{ovr:{}},emits:["update:settings"],setup(e,{emit:t}){var u,c,d,f,h,p,m,g,v,w,b,_,x,S,I,P,R,O;const n=Ur(),r=t,i=U({columns:((c=(u=e.ovr.settings)==null?void 0:u.layout)==null?void 0:c.columns)||3,bg_color:((f=(d=e.ovr.settings)==null?void 0:d.layout)==null?void 0:f.bg_color)||"#ffffff"}),s=U({variant:((m=(p=(h=e.ovr.settings)==null?void 0:h.layout)==null?void 0:p.inquire_btn)==null?void 0:m.variant)||"outline",bg_color:((w=(v=(g=e.ovr.settings)==null?void 0:g.layout)==null?void 0:v.inquire_btn)==null?void 0:w.bg_color)||"#ffffff",text_color:((x=(_=(b=e.ovr.settings)==null?void 0:b.layout)==null?void 0:_.inquire_btn)==null?void 0:x.text_color)||"#000000",outline_color:((P=(I=(S=e.ovr.settings)==null?void 0:S.layout)==null?void 0:I.inquire_btn)==null?void 0:P.outline_color)||"#000000"}),o=U(((O=(R=e.ovr.settings)==null?void 0:R.layout)==null?void 0:O.artworkAlignment)||"center"),a=[1,2,3,4],l=te(()=>{var M;return(M=e.ovr.settings)==null?void 0:M.showInquire});return He([i,o,s],()=>{var M;r("update:settings",{...e.ovr.settings,layout:{...e.ovr.settings.layout,...i.value,artworkAlignment:o.value,inquire_btn:{...(M=e.ovr.settings.layout)==null?void 0:M.inquire_btn,...s.value}}})},{deep:!0}),He(()=>o.value,()=>n.track("OVR edit layout - artwork alignment")),(M,E)=>(k(),W("section",RNe,[A("div",INe,[E[14]||(E[14]=A("label",{for:"bg_color",class:"text-sm"},"Background Color",-1)),$(y(ea),{id:"bg_color",modelValue:i.value.bg_color,"onUpdate:modelValue":E[0]||(E[0]=L=>i.value.bg_color=L),onChange:E[1]||(E[1]=L=>y(n).track("OVR edit layout - background colour"))},null,8,["modelValue"])]),A("div",ANe,[E[15]||(E[15]=A("label",{for:"grid_columns",class:"text-sm"},"Grid Columns",-1)),$(y(Ty),{id:"grid_columns",modelValue:i.value.columns,"onUpdate:modelValue":[E[2]||(E[2]=L=>i.value.columns=L),E[3]||(E[3]=L=>y(n).track("OVR edit layout - grid columns"))],values:a},null,8,["modelValue"])]),E[25]||(E[25]=A("h2",{class:"text-sm mb-2"},"Artwork Alignment",-1)),A("div",{class:Le(["flex items-center space-x-5",{"mb-4":l.value}])},[A("label",{class:Le(["flex items-center space-x-1 py-2 px-3 rounded-md cursor-pointer border-2 border-secondary-100 hover:bg-slate-100",{"!bg-slate-200":o.value==="left"}])},[At(A("input",{type:"radio",name:"artworkAlignment",class:"hidden",value:"left","onUpdate:modelValue":E[4]||(E[4]=L=>o.value=L)},null,512),[[iA,o.value]]),$(y(xO),{class:"h-5 w-5 mr-2"}),E[16]||(E[16]=A("span",null,"Left",-1))],2),A("label",{class:Le(["flex items-center space-x-1 py-2 px-3 rounded-md cursor-pointer border-2 border-secondary-100 hover:bg-slate-100",{"!bg-slate-200":o.value==="center"}])},[At(A("input",{type:"radio",name:"artworkAlignment",class:"hidden",value:"center","onUpdate:modelValue":E[5]||(E[5]=L=>o.value=L)},null,512),[[iA,o.value]]),$(y(SO),{class:"h-5 w-5 mr-2"}),E[17]||(E[17]=A("span",null,"Center",-1))],2)],2),l.value?(k(),W("div",PNe,[E[23]||(E[23]=A("hr",{class:"mb-4"},null,-1)),E[24]||(E[24]=A("h2",{class:"mb-4 text-sm text-secondary-500 font-medium"},"Inquire Button",-1)),A("div",MNe,[$(y(ONe),{modelValue:s.value.variant,"onUpdate:modelValue":[E[6]||(E[6]=L=>s.value.variant=L),E[7]||(E[7]=L=>y(n).track("OVR edit layout - inquire button variant"))],class:"flex items-center gap-4"},{default:H(()=>[A("div",DNe,[$(y(EF),{id:"inquire-outline",value:"outline"}),E[18]||(E[18]=A("label",{for:"inquire-outline",class:"text-sm cursor-pointer"},"Outline",-1))]),A("div",NNe,[$(y(EF),{id:"inquire-solid",value:"solid"}),E[19]||(E[19]=A("label",{for:"inquire-solid",class:"text-sm cursor-pointer"},"Solid",-1))])]),_:1},8,["modelValue"]),A("div",LNe,[E[20]||(E[20]=A("label",{for:"inquire-btn-bg-color",class:"text-sm"},"Button Color",-1)),$(y(ea),{id:"inquire-btn-bg-color",modelValue:s.value.bg_color,"onUpdate:modelValue":E[8]||(E[8]=L=>s.value.bg_color=L),onChange:E[9]||(E[9]=L=>y(n).track("OVR edit layout - inquire button colour"))},null,8,["modelValue"])]),A("div",FNe,[E[21]||(E[21]=A("label",{for:"inquire-btn-text-color",class:"text-sm"},"Text Color",-1)),$(y(ea),{id:"inquire-btn-text-color",modelValue:s.value.text_color,"onUpdate:modelValue":E[10]||(E[10]=L=>s.value.text_color=L),onChange:E[11]||(E[11]=L=>y(n).track("OVR edit layout - inquire button text colour"))},null,8,["modelValue"])]),s.value.variant==="outline"?(k(),W("div",BNe,[E[22]||(E[22]=A("label",{for:"inquire-btn-outline-color",class:"text-sm"},"Outline Color",-1)),$(y(ea),{id:"inquire-btn-outline-color",modelValue:s.value.outline_color,"onUpdate:modelValue":E[12]||(E[12]=L=>s.value.outline_color=L),onChange:E[13]||(E[13]=L=>y(n).track("OVR edit layout - inquire button outline colour"))},null,8,["modelValue"])])):fe("",!0)])])):fe("",!0)]))}}),$Ne=Ei(zNe,[["__scopeId","data-v-2ddc0a6b"]]),Yx=ee({__name:"ToggleGroup",props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},type:{},modelValue:{},defaultValue:{},class:{},variant:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t;Yn("toggleGroup",{variant:n.variant,size:n.size});const i=te(()=>{const{class:o,...a}=n;return a}),s=hn(i,r);return(o,a)=>(k(),X(y(Sde),Fe(y(s),{class:y(st)("flex items-center justify-center gap-1",n.class)}),{default:H(()=>[ce(o.$slots,"default")]),_:3},16,["class"]))}}),Qc=ee({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},variant:{},size:{}},setup(e){const t=e,n=Lt("toggleGroup"),r=te(()=>{const{class:s,variant:o,size:a,...l}=t;return l}),i=ai(r);return(s,o)=>{var a,l;return k(),X(y(xde),Fe(y(i),{class:y(st)(y(Fbe)({variant:((a=y(n))==null?void 0:a.variant)||s.variant,size:((l=y(n))==null?void 0:l.size)||s.size}),t.class)}),{default:H(()=>[ce(s.$slots,"default")]),_:3},16,["class"])}}}),HNe={class:"space-y-7 pb-5"},VNe={class:"space-y-5"},jNe={class:"space-y-2"},UNe={class:"flex items-center gap-3"},WNe={class:"space-y-2"},qNe={class:"flex items-center gap-3"},GNe={class:"space-y-2"},KNe={class:"flex items-center gap-3"},YNe=ee({__name:"EditTextFormatting",props:{ovr:{}},emits:["update:settings"],setup(e,{emit:t}){const{text:n,header:r}=e.ovr.settings,i=t,s=Ur(),o="https://app.arternal.com/settings/custom-fonts",a=U({header:n?n.font.header:"Open Sans",subheading:n?n.font.subheading:"Roboto",body:n?n.font.body:"Roboto"}),l=U({header:n?n.size.header:48,subheading:n?n.size.subheading:22,body:n?n.size.body:12}),u=U({header:n?n.color.header:"#FFFFFF",headerNoBanner:n?n.color.headerNoBanner:"#000000",subheading:n?n.color.subheading:"#333333",subheadingNoBanner:n?n.color.subheadingNoBanner:"#000000",body:n?n.color.body:"#333333"}),c=U([n!=null&&n.bold.header?"bold":"",n!=null&&n.italic.header?"italic":""].filter(Boolean)),d=U([n!=null&&n.bold.subheading?"bold":"",n!=null&&n.italic.subheading?"italic":""].filter(Boolean)),f=U([n!=null&&n.bold.body?"bold":"",n!=null&&n.italic.body?"italic":""].filter(Boolean)),h=[44,48,60,64,72,80,96],p=[18,20,22,24,28],m=[11,12,14,15,16],g=U(r.display_banner);return He(()=>e.ovr.settings.header.display_banner,v=>{g.value=v}),He([a.value,l.value,u.value,c,d,f],()=>{i("update:settings",{...e.ovr.settings,text:{font:{...a.value},size:{...l.value},color:{...u.value},bold:{header:c.value.includes("bold"),subheading:d.value.includes("bold"),body:f.value.includes("bold")},italic:{header:c.value.includes("italic"),subheading:d.value.includes("italic"),body:f.value.includes("italic")}}})}),He(()=>c.value,(v,w)=>{c.value.includes("bold")&&!w.includes("bold")&&s.track("OVR edit text - header font bold"),c.value.includes("italic")&&!w.includes("italic")&&s.track("OVR edit text - header font italics")}),He(()=>d.value,(v,w)=>{d.value.includes("bold")&&!w.includes("bold")&&s.track("OVR edit text - subheading font bold"),d.value.includes("italic")&&!w.includes("italic")&&s.track("OVR edit text - subheading font italics")}),He(()=>f.value,(v,w)=>{f.value.includes("bold")&&!w.includes("bold")&&s.track("OVR edit text - body font bold"),f.value.includes("italic")&&!w.includes("italic")&&s.track("OVR edit text - body font italics")}),(v,w)=>(k(),W("section",HNe,[A("div",VNe,[A("div",jNe,[w[26]||(w[26]=A("label",{class:"block text-sm"},"Header",-1)),$(y(mx),{modelValue:a.value.header,"onUpdate:modelValue":[w[0]||(w[0]=b=>a.value.header=b),w[1]||(w[1]=b=>y(s).track("OVR edit text - header font"))],"button-classes":"text-left"},null,8,["modelValue"]),A("div",UNe,[g.value?(k(),X(y(ea),{key:0,id:"header-colour",modelValue:u.value.header,"onUpdate:modelValue":w[2]||(w[2]=b=>u.value.header=b),onChange:w[3]||(w[3]=b=>y(s).track("OVR edit text - header font colour"))},null,8,["modelValue"])):(k(),X(y(ea),{key:1,id:"header-bannerless-colour",modelValue:u.value.headerNoBanner,"onUpdate:modelValue":w[4]||(w[4]=b=>u.value.headerNoBanner=b),onChange:w[5]||(w[5]=b=>y(s).track("OVR edit text - header font colour (no banner)"))},null,8,["modelValue"])),$(y(Ty),{modelValue:l.value.header,"onUpdate:modelValue":[w[6]||(w[6]=b=>l.value.header=b),w[7]||(w[7]=b=>y(s).track("OVR edit text - header font size"))],values:h,class:"w-1/3"},null,8,["modelValue"]),$(y(Yx),{modelValue:c.value,"onUpdate:modelValue":w[8]||(w[8]=b=>c.value=b),type:"multiple"},{default:H(()=>[$(y(Qc),{value:"bold","aria-label":"Toggle bold",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ny),{class:"w-4"})]),_:1}),$(y(Qc),{value:"italic","aria-label":"Toggle italic",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ry),{class:"w-4"})]),_:1})]),_:1},8,["modelValue"])])]),A("div",WNe,[w[27]||(w[27]=A("label",{class:"block text-sm"},"Subheading",-1)),$(y(mx),{modelValue:a.value.subheading,"onUpdate:modelValue":[w[9]||(w[9]=b=>a.value.subheading=b),w[10]||(w[10]=b=>y(s).track("OVR edit text - subheading font"))],class:"!text-left","button-classes":"text-left"},null,8,["modelValue"]),A("div",qNe,[g.value?(k(),X(y(ea),{key:0,id:"subheading-colour",modelValue:u.value.subheading,"onUpdate:modelValue":w[11]||(w[11]=b=>u.value.subheading=b),onChange:w[12]||(w[12]=b=>y(s).track("OVR edit text - subheading font colour"))},null,8,["modelValue"])):(k(),X(y(ea),{key:1,id:"subheading-bannerless-colour",modelValue:u.value.subheadingNoBanner,"onUpdate:modelValue":w[13]||(w[13]=b=>u.value.subheadingNoBanner=b),onChange:w[14]||(w[14]=b=>y(s).track("OVR edit text - subheading font colour (no banner)"))},null,8,["modelValue"])),$(y(Ty),{modelValue:l.value.subheading,"onUpdate:modelValue":[w[15]||(w[15]=b=>l.value.subheading=b),w[16]||(w[16]=b=>y(s).track("OVR edit text - subheading font size"))],values:p,class:"w-1/3"},null,8,["modelValue"]),$(y(Yx),{modelValue:d.value,"onUpdate:modelValue":w[17]||(w[17]=b=>d.value=b),type:"multiple"},{default:H(()=>[$(y(Qc),{value:"bold","aria-label":"Toggle bold",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ny),{class:"w-4"})]),_:1}),$(y(Qc),{value:"italic","aria-label":"Toggle italic",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ry),{class:"w-4"})]),_:1})]),_:1},8,["modelValue"])])]),A("div",GNe,[w[28]||(w[28]=A("label",{class:"block text-sm"},"Body",-1)),$(y(mx),{modelValue:a.value.body,"onUpdate:modelValue":[w[18]||(w[18]=b=>a.value.body=b),w[19]||(w[19]=b=>y(s).track("OVR edit text - body font"))],class:"!text-left","button-classes":"text-left"},null,8,["modelValue"]),A("div",KNe,[$(y(ea),{id:"body-colour",modelValue:u.value.body,"onUpdate:modelValue":w[20]||(w[20]=b=>u.value.body=b),onChange:w[21]||(w[21]=b=>y(s).track("OVR edit text - body font colour"))},null,8,["modelValue"]),$(y(Ty),{modelValue:l.value.body,"onUpdate:modelValue":[w[22]||(w[22]=b=>l.value.body=b),w[23]||(w[23]=b=>y(s).track("OVR edit text - body font size"))],values:m,class:"w-1/3"},null,8,["modelValue"]),$(y(Yx),{modelValue:f.value,"onUpdate:modelValue":w[24]||(w[24]=b=>f.value=b),type:"multiple"},{default:H(()=>[$(y(Qc),{value:"bold","aria-label":"Toggle bold",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ny),{class:"w-4"})]),_:1}),$(y(Qc),{value:"italic","aria-label":"Toggle italic",class:"border-2 border-secondary-100"},{default:H(()=>[$(y(ry),{class:"w-4"})]),_:1})]),_:1},8,["modelValue"])])]),A("div",null,[A("a",{href:o,target:"_blank",onClick:w[25]||(w[25]=b=>y(s).track("OVR edit text - add custom fonts"))},"Add custom fonts")])])]))}}),XNe=Ei(YNe,[["__scopeId","data-v-72341b64"]]),JNe={class:"space-y-3"},QNe={class:"flex flex-col mt-2 space-y-2"},ZNe={class:"mb-4 flex justify-between items-center"},eLe={for:"link_privacy",class:"text-sm cursor-pointer flex items-center gap-2"},tLe={key:0,class:"ml-4"},nLe={class:"mb-4 inline-flex items-center"},rLe={class:"inline-flex items-start"},iLe={class:"ml-2 text-sm cursor-pointer"},sLe={class:"font-normal text-[0.8rem] text-secondary-500"},oLe=ee({__name:"EditLinkSettings",props:{ovr:{}},emits:["update:settings","update:ovr-type"],setup(e,{emit:t}){var s;const n=t,r=U(((s=e.ovr.settings)==null?void 0:s.askEmail)||!1),i=U(e.ovr.type==="pvr");return He([r],()=>{n("update:settings",{...e.ovr.settings,askEmail:r.value})}),He(i,o=>{n("update:ovr-type",o?"pvr":"ovr")}),(o,a)=>(k(),W("div",JNe,[A("div",QNe,[A("div",ZNe,[A("label",eLe,[$(y(_fe),{class:"w-5"}),a[2]||(a[2]=A("span",null,"Make Link Private",-1))]),$(y(Wd),{id:"link_privacy",class:Le({"!bg-success-500":i.value}),checked:i.value,"onUpdate:checked":a[0]||(a[0]=l=>i.value=l)},null,8,["class","checked"])]),i.value?(k(),W("div",tLe,[A("label",nLe,[At(A("input",{"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),type:"checkbox"},null,512),[[Ti,r.value]]),a[3]||(a[3]=A("span",{class:"text-sm ml-2"},"Ask for email address on entry",-1))]),A("label",rLe,[A("div",iLe,[A("div",null,ye(o.$t("forms.newLink.collectPersonalInfo")),1),A("div",sLe,ye(o.$t("forms.newLink.collectPersonalInfoDetail")),1)])])])):fe("",!0)])]))}}),aLe=Ei(oLe,[["__scopeId","data-v-f9b66214"]]),lLe={class:"space-y-5"},uLe={class:"flex justify-between items-center mb-4"},cLe={class:"flex justify-between items-center mb-4"},dLe={key:0,class:"flex items-center justify-between"},fLe={class:"flex items-center space-x-2"},hLe=ee({__name:"EditDocumentsInstallations",props:{ovr:{}},emits:["update:settings","saveAndRefetchOvr"],setup(e,{emit:t}){var c,d;const n=t,r=Ir(),i=Ur(),{documentsInstallations:s}=e.ovr.settings,o=U((d=(c=e.ovr.settings)==null?void 0:c.documentsInstallations)==null?void 0:d.showInstallations),a=U((s==null?void 0:s.showInstallations)??!1),l=U((s==null?void 0:s.showDocs)??!1),u=U((s==null?void 0:s.installation)??"bottom");return He([a,l,u],()=>{n("update:settings",{...e.ovr.settings,documentsInstallations:{...e.ovr.settings.documentsInstallations,showInstallations:a.value,showDocs:l.value,installation:u.value}})},{deep:!0}),He(()=>u.value,()=>{switch(u.value){case"bottom":i.track("OVR edit docs installations - installation view bottom");break;case"top":i.track("OVR edit docs installations - installation view top");break;case"in tab":i.track("OVR edit docs installations - installation view in tab");break}}),Eve(()=>a.value,()=>{a.value&&!o.value&&r.name==="ovr-edit"&&(n("saveAndRefetchOvr"),o.value=!0)},{debounce:500}),(f,h)=>(k(),W("section",lLe,[A("div",uLe,[h[5]||(h[5]=A("label",{for:"documents-overlay",class:"text-sm cursor-pointer"},"Show Documents Tab",-1)),$(y(Wd),{id:"documents-overlay",class:Le({"!bg-success-500":l.value}),checked:l.value,"onUpdate:checked":h[0]||(h[0]=p=>{l.value=p,p&&y(i).track("OVR edit docs installations - show docs")})},null,8,["class","checked"])]),A("div",cLe,[h[6]||(h[6]=A("label",{for:"installation-views-overlay",class:"text-sm cursor-pointer"},"Show Installation Views",-1)),$(y(Wd),{id:"installation-views-overlay",class:Le({"!bg-success-500":a.value}),checked:a.value,"onUpdate:checked":h[1]||(h[1]=p=>{a.value=p,p&&y(i).track("OVR edit docs installations - show installation view")})},null,8,["class","checked"])]),a.value?(k(),W("div",dLe,[A("div",fLe,[$(y(gt),{type:"button",variant:"outline",class:Le(["p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":u.value==="bottom"}]),onClick:h[2]||(h[2]=p=>u.value="bottom")},{default:H(()=>h[7]||(h[7]=[Ye(" Bottom ")])),_:1},8,["class"]),$(y(gt),{type:"button",variant:"outline",class:Le(["p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":u.value==="top"}]),onClick:h[3]||(h[3]=p=>u.value="top")},{default:H(()=>h[8]||(h[8]=[Ye(" Top ")])),_:1},8,["class"]),$(y(gt),{type:"button",variant:"outline",class:Le(["flex items-center space-x-1 p-2 rounded-md cursor-pointer bg-white border border-secondary-200 hover:bg-secondary-100",{"bg-secondary-100":u.value==="in tab"}]),onClick:h[4]||(h[4]=p=>u.value="in tab")},{default:H(()=>h[9]||(h[9]=[Ye(" In Tab ")])),_:1},8,["class"])])])):fe("",!0)]))}}),pLe=Ei(hLe,[["__scopeId","data-v-2921b024"]]),Vq=e=>{const t=["https://preview.arternal.com"];return e.id&&t.push(e.id),e.slug&&e.slug.length&&t.push(e.slug),!e.slug&&e.title&&e.title.length&&t.push(r_(e.title,{lower:!0,strict:!0})),t.join("/")};function mLe(e){return new DOMParser().parseFromString(e,"text/html").body.textContent||""}const gLe={class:"ml-auto"},vLe={class:"p-4 space-y-5"},yLe={class:"space-y-1"},bLe={key:0,class:"text-red-500 text-sm"},wLe={class:"space-y-1"},_Le={class:"space-y-1"},SLe=["href"],xLe={key:0,class:"space-y-1"},ELe=["href"],TLe={for:"askEmail",class:"mb-4 inline-flex items-center"},kLe={for:"showInquire",class:"mb-4 inline-flex items-center"},jq=ee({__name:"EditGeneral",props:{ovr:{}},emits:["update:ovr"],setup(e,{expose:t,emit:n}){var b,_;const r=n,i=Ur(),[s,o]=QO(!1),a=U("overflow-hidden"),l=U(e.ovr.title),u=U(e.ovr.slug||""),c=U(((b=e.ovr.settings)==null?void 0:b.askEmail)||!1),d=U(((_=e.ovr.settings)==null?void 0:_.showInquire)||!1),f=te(()=>Vq(e.ovr)),h=te(()=>{var S,I;const x=(I=(S=e.ovr)==null?void 0:S.inventory_set)==null?void 0:I.id;return x?`/inventory/set/${x}`:""}),p={title:U("")},m=async()=>{s.value?a.value="overflow-hidden":setTimeout(()=>{a.value="overflow-visible"},250),await vt(),o()},g=()=>{r("update:ovr")},v=(x,S)=>{x in p&&(p[x].value=S)};He(()=>l.value,x=>{if(x){p.title.value="";const S=x.replace(/(\r\n|\n|\r)/gm,"").replace(/\s\s+/g," ");x!==S&&(l.value=S)}});const w=Os(()=>i.track("OVR edit general - title"),1e3);return t({title:l,slug:u,askEmail:c,showInquire:d,setErrors:v,toggleTab:m,isOpen:s}),(x,S)=>(k(),W("div",null,[A("button",{class:"px-2 flex items-center space-x-3 w-full py-4 border-b",onClick:lt(m,["prevent"])},[S[9]||(S[9]=A("h2",{class:"text-base font-semibold flex-auto text-left"},"General",-1)),A("div",gLe,[$(y(ZO),{class:Le(["w-5 h-5 transition-transform duration-250 ease-linear",y(s)?"rotate-180":"rotate-0"])},null,8,["class"])])]),$(is,{name:"collapse","enter-active-class":"transition-[max-height] duration-250 ease-linear","enter-from-class":"max-h-0","enter-to-class":"max-h-screen","leave-active-class":"transition-[max-height] duration-250 ease-linear","leave-from-class":"max-h-screen","leave-to-class":"max-h-0"},{default:H(()=>{var I,P,R;return[y(s)?(k(),W("div",{key:0,class:Le(a.value)},[A("div",vLe,[A("div",yLe,[S[10]||(S[10]=A("label",{for:"ovr-title",class:"text-sm font-medium cursor-pointer"},"Link name",-1)),At(A("input",{id:"ovr-title","onUpdate:modelValue":S[0]||(S[0]=O=>l.value=O),class:Le(["w-full p-2 border border-gray-300 rounded resize",{"border-red-500":p.title.value}]),placeholder:"Title",maxlength:"200",onInput:S[1]||(S[1]=O=>{g(),y(w)()})},null,34),[[pi,l.value,void 0,{trim:!0}]]),p.title.value?(k(),W("span",bLe,ye(p.title),1)):fe("",!0)]),A("div",wLe,[S[11]||(S[11]=A("label",{class:"text-sm font-medium"},"URL slug",-1)),At(A("input",{"onUpdate:modelValue":S[2]||(S[2]=O=>u.value=O),class:"w-full p-2 border border-gray-300 rounded bg-secondary-100",disabled:""},null,512),[[pi,u.value,void 0,{trim:!0}]])]),A("div",_Le,[S[12]||(S[12]=A("label",{class:"block text-sm font-medium"},"Inventory List",-1)),A("a",{href:h.value,target:"_blank",class:"w-full text-sm cursor-pointer",onClick:S[3]||(S[3]=O=>y(i).track("OVR edit general - list button"))},ye((I=x.ovr.inventory_set)==null?void 0:I.name),9,SLe)]),(P=x.ovr)!=null&&P.id&&((R=x.ovr)==null?void 0:R.title)!==""?(k(),W("div",xLe,[S[13]||(S[13]=A("label",{class:"block text-sm font-medium"},"Link",-1)),A("a",{href:f.value,target:"_blank",class:"w-full text-sm cursor-pointer",onClick:S[4]||(S[4]=O=>y(i).track("OVR edit general - link button"))},ye(f.value),9,ELe)])):fe("",!0),A("div",null,[A("label",TLe,[At(A("input",{id:"askEmail","onUpdate:modelValue":S[5]||(S[5]=O=>c.value=O),type:"checkbox",onChange:S[6]||(S[6]=O=>{g(),y(i).track("OVR edit general - ask for email")})},null,544),[[Ti,c.value]]),S[14]||(S[14]=A("span",{class:"text-sm ml-2"},"Ask for email address on entry",-1))]),A("label",kLe,[At(A("input",{id:"showInquire","onUpdate:modelValue":S[7]||(S[7]=O=>d.value=O),type:"checkbox",onChange:S[8]||(S[8]=O=>{g(),y(i).track("OVR edit general - show inquire button")})},null,544),[[Ti,d.value]]),S[15]||(S[15]=A("span",{class:"text-sm ml-2"},"Show inquire button next to artworks",-1))])])])],2)):fe("",!0)]}),_:1})]))}}),CLe={EditHeader:ADe,EditArtworkSettings:mNe,EditLayoutBackground:$Ne,EditTextFormatting:XNe,EditLinkSettings:aLe,EditDocumentsInstallations:pLe,EditGeneral:jq},OLe={class:"text-base font-semibold flex-auto text-left"},RLe={class:"ml-auto"},ILe=ee({__name:"EditableCard",props:{ovr:{},component:{}},emits:["update:settings","saveAndRefetchOvr"],setup(e,{emit:t}){const n=CLe,r=t,[i,s]=QO(!1),o=U(e.ovr.settings),a=U("overflow-hidden"),l=async()=>{i.value?a.value="overflow-hidden":setTimeout(()=>{a.value="overflow-visible"},250),await vt(),s()};return He(()=>o.value,u=>{r("update:settings",{...e.ovr.settings,...u})},{deep:!0}),(u,c)=>(k(),W("div",null,[A("button",{type:"button",class:"relative px-2 flex items-center space-x-3 w-full py-4 border-b",onClick:l},[A("h2",OLe,ye(u.component.name),1),A("div",RLe,[$(y(ZO),{class:Le(["w-5 h-5 transition-transform duration-250 ease-linear",y(i)?"rotate-180":"rotate-0"])},null,8,["class"])])]),$(is,{name:"collapse","enter-active-class":"transition-[max-height] duration-250 ease-linear","enter-from-class":"max-h-0","enter-to-class":"max-h-screen","leave-active-class":"transition-[max-height] duration-250 ease-linear","leave-from-class":"max-h-screen","leave-to-class":"max-h-0"},{default:H(()=>[y(i)?(k(),W("div",{key:0,class:Le(a.value)},[(k(),X(Rr(y(n)[u.component.component]),{settings:o.value,"onUpdate:settings":c[0]||(c[0]=d=>o.value=d),ovr:u.ovr,class:"p-4",onSaveAndRefetchOvr:c[1]||(c[1]=d=>r("saveAndRefetchOvr"))},null,40,["settings","ovr"]))],2)):fe("",!0)]),_:1})]))}}),ALe={class:"flex items-center justify-between p-4 border-b"},PLe={class:"flex items-center gap-2 text-xs"},MLe={class:"sm:hidden flex"},DLe={class:"flex flex-col gap-3 w-full"},NLe={class:"flex items-center gap-2 justify-stretch"},mI=ee({__name:"OvrEditPanel",props:{ovr:{},autofocusGeneral:{type:Boolean},isSubmitting:{type:Boolean}},emits:["update:ovr","onSave","saveAndRefetchOvr","scrollToTop","copy"],setup(e,{emit:t}){const n=t,r="SSPA"in window,i=Aa(),s=Ir(),{resolveClient:o}=Ac(),a=o(),{toast:l}=$s(),{t:u}=ls(),c=te(()=>Vq(e.ovr)),d=Ur(),f=U(e.ovr.settings),h=U(!1),p=[{name:"Header",component:"EditHeader"},{name:"Layout & Background",component:"EditLayoutBackground"},{name:"Artwork Settings",component:"EditArtworkSettings"},{name:"Text Formatting",component:"EditTextFormatting"},{name:"Documents & Installations",component:"EditDocumentsInstallations"}],m=U(null),g=()=>{var M,E,L;n("update:ovr",{...e.ovr,title:(M=m.value)==null?void 0:M.title,settings:{...e.ovr.settings,askEmail:(E=m.value)==null?void 0:E.askEmail,showInquire:(L=m.value)==null?void 0:L.showInquire}})},v=async M=>(M&&typeof M!="boolean"&&M.preventDefault(),h.value=!0,w()?(g(),n("onSave"),M!==!1&&(d.track("OVR edit - publish"),l({title:u("messages.linkPublished")})),!0):!1),w=()=>{var L,j,F;let M=!0;const E=((L=m.value)==null?void 0:L.title)||"";return E.length===0?((j=m.value)==null||j.setErrors("title","Please enter a title"),M=!1):E.length>200&&((F=m.value)==null||F.setErrors("title","Link name is too long"),M=!1),!M&&m.value&&(m.value.isOpen||m.value.toggleTab(),n("scrollToTop")),M},b=async()=>{var E,L;await v(!1)&&((L=(E=e.ovr.settings)==null?void 0:E.header)!=null&&L.bg_image.startsWith("blob:")?window.confirm("Cover image upload is still in progress. It may not appear properly on the preview")&&_():_())},_=()=>{window.open(c.value,"_blank"),d.track("OVR edit - preview url")},x=U(!1),S=()=>{x.value=!0},I=()=>{x.value=!1},P=()=>{var L,j;const{header:M,...E}=f.value;a.mutate({mutation:qMe,variables:{settings:{...E,header:{...M,bg_image:"",bg_image_uncropped:""},askEmail:(L=m.value)==null?void 0:L.askEmail,showInquire:(j=m.value)==null?void 0:j.showInquire}}}).then(({data:F})=>{(F==null?void 0:F.saveDefaultOVRSettings)?(d.track("OVR edit - save styles"),l({title:u("messages.stylesSaved")})):l({title:u("messages.errorSavingStyles")})})};He(()=>f.value,M=>{n("update:ovr",{...e.ovr,settings:M})},{deep:!0}),nt(()=>{m.value&&e.autofocusGeneral&&m.value.toggleTab()});const R=async()=>{n("copy",c.value),await navigator.clipboard.writeText(c.value),d.track("OVR edit - copy"),l({title:u("messages.linkCopied")})},O=async()=>{var M,E;window.history.state.back?i.back():s.name==="ovr-artwork-edit"?i.push({name:"ovr-edit",params:{id:e.ovr.id}}):(M=e.ovr)!=null&&M.inventory_set_id?i.push({name:"lists-view",params:{id:(E=e.ovr)==null?void 0:E.inventory_set_id}}):i.push({name:"lists-index"})};return(M,E)=>{var L,j,F,B,Y,Z;return k(),W(je,null,[A("header",{class:Le(["hidden sm:block fixed w-full top-0 left-0 z-10 bg-[#FCFCFE]",{"ml-[4.3125rem] !w-[calc(100vw_-_5.3125rem)]":r}])},[A("div",ALe,[$(y(gt),{class:"flex items-center gap-2 bg-white text-black border border-secondary-500 hover:bg-secondary-100",onClick:O},{default:H(()=>[$(y(Uve),{class:"h-4 w-4"}),Ye(" "+ye(M.$t("actions.back")),1)]),_:1}),A("div",PLe,[(L=M.ovr)!=null&&L.id?(k(),X(y(gt),{key:0,type:"button",class:"flex items-center gap-2 bg-white border border-secondary-500 text-black hover:bg-secondary-100",onClick:b},{default:H(()=>[$(y(PN),{class:"h-4 w-4"}),Ye(" "+ye(M.$t("actions.previewLink")),1)]),_:1})):fe("",!0),(j=M.ovr)!=null&&j.id?(k(),X(y(gt),{key:1,class:"flex items-center gap-2 bg-secondary-100 text-black hover:bg-secondary-200",onClick:S},{default:H(()=>[$(y(lD),{class:"w-4"}),Ye(" "+ye(M.$t("actions.saveStyles")),1)]),_:1})):fe("",!0),(F=M.ovr)!=null&&F.id?(k(),X(y(gt),{key:2,type:"button",class:"flex items-center gap-2 mr-2 bg-secondary-100 text-black hover:bg-secondary-200",onClick:R},{default:H(()=>[$(y(oT),{class:"h-4 w-4"}),Ye(" "+ye(M.$t("actions.copy")),1)]),_:1})):fe("",!0),$(y(gt),{type:"button",class:"flex items-center gap-2",onClick:v},{default:H(()=>{var ne;return[Ye(ye((ne=M.ovr)!=null&&ne.id?M.$t("actions.publish"):M.$t("actions.create"))+" ",1),M.isSubmitting?(k(),X(Ul,{key:0})):fe("",!0)]}),_:1})])])],2),A("form",{class:"p-3 sm:pb-64 mt-16 space-y-5 select-none bg-[#FCFCFE]",onSubmit:lt(v,["prevent"])},[A("div",null,[$(jq,{ref_key:"generalRef",ref:m,ovr:M.ovr,"onUpdate:ovr":g},null,8,["ovr"]),(k(),W(je,null,Ot(p,(ne,oe)=>$(ILe,{key:oe,settings:f.value,"onUpdate:settings":E[0]||(E[0]=le=>f.value=le),ovr:M.ovr,component:ne,onUpdated:g,onSaveAndRefetchOvr:E[1]||(E[1]=le=>n("saveAndRefetchOvr"))},null,8,["settings","ovr","component"])),64))]),A("div",MLe,[A("div",DLe,[A("div",NLe,[(B=M.ovr)!=null&&B.id?(k(),X(y(gt),{key:0,class:"flex items-center gap-2 bg-secondary-100 text-black hover:bg-secondary-200 w-full",onClick:S},{default:H(()=>[$(y(lD),{class:"w-4"}),Ye(" "+ye(M.$t("actions.saveStyles")),1)]),_:1})):fe("",!0),(Y=M.ovr)!=null&&Y.id?(k(),X(y(gt),{key:1,type:"button",class:"flex items-center gap-2 bg-secondary-100 text-black hover:bg-secondary-200 w-full",onClick:R},{default:H(()=>[$(y(oT),{class:"h-4 w-4"}),Ye(" "+ye(M.$t("actions.copy")),1)]),_:1})):fe("",!0),(Z=M.ovr)!=null&&Z.id?(k(),X(y(gt),{key:2,type:"button",class:"flex items-center gap-2 bg-white border border-secondary-500 text-black hover:bg-secondary-100 w-full",onClick:b},{default:H(()=>[$(y(PN),{class:"h-4 w-4"}),Ye(" "+ye(M.$t("actions.previewLink")),1)]),_:1})):fe("",!0)]),$(y(gt),{type:"button",class:"flex items-center gap-2 w-full",onClick:v},{default:H(()=>{var ne;return[Ye(ye((ne=M.ovr)!=null&&ne.id?M.$t("actions.publish"):M.$t("actions.create"))+" ",1),M.isSubmitting?(k(),X(Ul,{key:0})):fe("",!0)]}),_:1})])])],32),$(Dye,{"is-open":x.value,onCancel:I,onConfirm:E[2]||(E[2]=ne=>(P(),I()))},null,8,["is-open"])],64)}}}),LLe={class:"flex items-stretch min-h-screen"},FLe=ee({__name:"Create",setup(e){const t=Aa(),{toast:n}=$s(),{t:r}=ls(),{resolveClient:i}=Ac(),s=i(),{list_id:o,title:a,type:l}=Ir().query,u=U(!1),c=U({title:"",type:typeof l=="string"?l:"ovr",enabled:!0,tracking_enabled:!0,content:{},settings:{layout:{bg_color:"#ffffff",columns:3,artworkAlignment:"center",inquire_btn:{variant:"outline",bg_color:"#ffffff",text_color:"#000000",outline_color:"#000000"}},header:{bg_color:"#eeeeee",bg_image:"",bg_image_uncropped:"",height:70,image_orientation:"vertical",overlay:!0,overlay_color:"#000000",overlay_opacity:.4,text_horizontal_align:"left",text_vertical_align:"bottom",display_banner:!0,banner_vertical_position:50,display_date:!0,scroll_effect:!0},artwork:{showVAT:!1,showPrice:!1,showStatus:!1,statusStyle:"both",createContact:!1,artworkAlignment:"center",showPricesWhenSold:!1,provenance:!1,collections:!1,history:!1,literature:!1,exhibition:!1,publications:!1,credit_line:!1},text:{font:{header:"Inter",subheading:"Inter",body:"Inter"},size:{header:44,subheading:18,body:14},color:{header:"#FFFFFF",headerNoBanner:"#000000",subheading:"#FFFFFF",subheadingNoBanner:"#000000",body:"#111111"},bold:{header:!1,subheading:!1,body:!1},italic:{header:!1,subheading:!1,body:!1}},documentsInstallations:{showDocs:!0,showInstallations:!0,installation:"bottom"},askEmail:!1,showInquire:!1,custom_fields:[]}}),d=ln` mutation CreateOvr($input: CreateOvrDto!) { createOvr(input: $input) { id title slug enabled type tracking_enabled settings created_at updated_at } } `,{mutate:f,onDone:h,loading:p}=mC(d),m=async()=>{const _=await s.query({query:qSe}).then(({data:x})=>x==null?void 0:x.getDefaultOVRSettings);_&&(c.value.settings=_)};h(_=>{var x;c.value=((x=_.data)==null?void 0:x.createOvr)||c.value,u.value=!1,c.value&&c.value.id&&t.replace({name:"ovr-edit",params:{id:c.value.id}})});const g=async()=>{const{created_at:_,updated_at:x,slug:S,id:I,...P}=c.value;await f({input:P,...c.value.id&&{id:c.value.id}}),n({title:r("messages.linkCreated"),variant:"success"}),u.value=!1},v=U(null),w=()=>{v.value&&(v.value.scrollTop=0)};nt(async()=>{await m(),o&&typeof o=="string"&&(c.value.inventory_set_id=parseInt(o,10),s.query({query:vW,variables:{id:parseInt(o,10)}}).then(({data:_})=>{const x=_==null?void 0:_.getInventorySetById;c.value.title=a&&typeof a=="string"?a:(x==null?void 0:x.name)||"Inventory List",x!=null&&x.description&&(c.value.content={after_header:{content:`<p>${x.description.replace(/\n/g,"</p><p>")}</p>`,class:"leading-relaxed"}}),g()}))});const b=_=>{u.value&&(_.preventDefault(),_.returnValue=!0)};return Zm(()=>{if(u.value&&!window.confirm(r("messages.unsavedChanges")))return!1}),window.addEventListener("beforeunload",b),yr(()=>b),(_,x)=>{const S=En("UseHead");return k(),W(je,null,[$(S,null,{default:H(()=>x[2]||(x[2]=[A("title",null,"Create OVR",-1)])),_:1}),A("main",LLe,[x[3]||(x[3]=A("div",{id:"preview",class:"w-2/3 xl:w-3/4"},null,-1)),A("div",{id:"editor",ref_key:"editorRef",ref:v,class:"relative z-[1] w-1/3 xl:w-1/4 border-l-2 sticky top-0 h-screen overflow-y-scroll overflow-visible"},[$(mI,{ovr:c.value,"onUpdate:ovr":[x[0]||(x[0]=I=>c.value=I),x[1]||(x[1]=I=>u.value=!0)],"is-submitting":y(p),"autofocus-general":"",onOnSave:g,onScrollToTop:w},null,8,["ovr","is-submitting"])],512)])],64)}}}),gI="data:image/svg+xml,%3csvg%20role='img'%20class='fill-gray-500'%20aria-label='ARTERNAL'%20width='100'%20height='12'%20viewBox='0%200%20573%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.0307%2060H0L21.3786%200H38.2516L59.5999%2060H45.5695L30.0572%2013.7109H29.5732L14.0307%2060ZM13.1537%2036.416H46.295V46.3185H13.1537V36.416ZM84.0842%2060V0H108.517C113.194%200%20117.185%200.810546%20120.491%202.43164C123.818%204.03321%20126.347%206.30859%20128.081%209.25783C129.835%2012.1875%20130.712%2015.6348%20130.712%2019.5996C130.712%2023.584%20129.825%2027.0118%20128.051%2029.8828C126.277%2032.7343%20123.707%2034.9219%20120.34%2036.4454C116.994%2037.9687%20112.942%2038.7304%20108.184%2038.7304H91.8253V28.535H106.067C108.567%2028.535%20110.644%2028.2031%20112.297%2027.539C113.95%2026.875%20115.18%2025.8789%20115.986%2024.5508C116.812%2023.2227%20117.225%2021.5723%20117.225%2019.5996C117.225%2017.6074%20116.812%2015.9277%20115.986%2014.5605C115.18%2013.1934%20113.94%2012.1582%20112.266%2011.4551C110.613%2010.7324%20108.527%2010.3711%20106.007%2010.3711H97.1773V60H84.0842ZM117.528%2032.6953L132.919%2060H118.465L103.406%2032.6953H117.528ZM154.637%2010.459V0H205.498V10.459H186.538V60H173.596V10.459H154.637ZM230.904%2060V0H272.633V10.459H243.997V24.7559H270.486V35.2148H243.997V49.5409H272.754V60H230.904ZM300.072%2060V0H324.505C329.183%200%20333.173%200.810546%20336.48%202.43164C339.807%204.03321%20342.336%206.30859%20344.07%209.25783C345.824%2012.1875%20346.701%2015.6348%20346.701%2019.5996C346.701%2023.584%20345.813%2027.0118%20344.039%2029.8828C342.265%2032.7343%20339.696%2034.9219%20336.33%2036.4454C332.983%2037.9687%20328.93%2038.7304%20324.173%2038.7304H307.815V28.535H322.055C324.556%2028.535%20326.634%2028.2031%20328.286%2027.539C329.938%2026.875%20331.169%2025.8789%20331.975%2024.5508C332.801%2023.2227%20333.216%2021.5723%20333.216%2019.5996C333.216%2017.6074%20332.801%2015.9277%20331.975%2014.5605C331.169%2013.1934%20329.929%2012.1582%20328.254%2011.4551C326.602%2010.7324%20324.516%2010.3711%20321.996%2010.3711H313.166V60H300.072ZM333.517%2032.6953L348.909%2060H334.453L319.396%2032.6953H333.517ZM424.782%200V60H413.474L386.532%2022.2363H386.078V60H372.985V0H384.474L411.206%2037.7344H411.751V0H424.782ZM463.305%2060H449.275L470.653%200H487.525L508.875%2060H494.845L479.33%2013.7109H478.848L463.305%2060ZM462.428%2036.416H495.569V46.3185H462.428V36.416ZM533.359%2060V0H546.453V49.5409H573V60H533.359Z'%20fill='gray'%20/%3e%3c/svg%3e";var Xx={exports:{}},TF;function BLe(){return TF||(TF=1,function(e){(function(){function t(C,G,K){return C.call.apply(C.bind,arguments)}function n(C,G,K){if(!C)throw Error();if(2<arguments.length){var se=Array.prototype.slice.call(arguments,2);return function(){var ve=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(ve,se),C.apply(G,ve)}}return function(){return C.apply(G,arguments)}}function r(C,G,K){return r=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?t:n,r.apply(null,arguments)}var i=Date.now||function(){return+new Date};function s(C,G){this.a=C,this.o=G||C,this.c=this.o.document}var o=!!window.FontFace;function a(C,G,K,se){if(G=C.c.createElement(G),K)for(var ve in K)K.hasOwnProperty(ve)&&(ve=="style"?G.style.cssText=K[ve]:G.setAttribute(ve,K[ve]));return se&&G.appendChild(C.c.createTextNode(se)),G}function l(C,G,K){C=C.c.getElementsByTagName(G)[0],C||(C=document.documentElement),C.insertBefore(K,C.lastChild)}function u(C){C.parentNode&&C.parentNode.removeChild(C)}function c(C,G,K){G=G||[],K=K||[];for(var se=C.className.split(/\s+/),ve=0;ve<G.length;ve+=1){for(var ke=!1,ze=0;ze<se.length;ze+=1)if(G[ve]===se[ze]){ke=!0;break}ke||se.push(G[ve])}for(G=[],ve=0;ve<se.length;ve+=1){for(ke=!1,ze=0;ze<K.length;ze+=1)if(se[ve]===K[ze]){ke=!0;break}ke||G.push(se[ve])}C.className=G.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(C,G){for(var K=C.className.split(/\s+/),se=0,ve=K.length;se<ve;se++)if(K[se]==G)return!0;return!1}function f(C){return C.o.location.hostname||C.a.location.hostname}function h(C,G,K){function se(){Je&&ve&&ke&&(Je(ze),Je=null)}G=a(C,"link",{rel:"stylesheet",href:G,media:"all"});var ve=!1,ke=!0,ze=null,Je=K||null;o?(G.onload=function(){ve=!0,se()},G.onerror=function(){ve=!0,ze=Error("Stylesheet failed to load"),se()}):setTimeout(function(){ve=!0,se()},0),l(C,"head",G)}function p(C,G,K,se){var ve=C.c.getElementsByTagName("head")[0];if(ve){var ke=a(C,"script",{src:G}),ze=!1;return ke.onload=ke.onreadystatechange=function(){ze||this.readyState&&this.readyState!="loaded"&&this.readyState!="complete"||(ze=!0,K&&K(null),ke.onload=ke.onreadystatechange=null,ke.parentNode.tagName=="HEAD"&&ve.removeChild(ke))},ve.appendChild(ke),setTimeout(function(){ze||(ze=!0,K&&K(Error("Script load timeout")))},se||5e3),ke}return null}function m(){this.a=0,this.c=null}function g(C){return C.a++,function(){C.a--,w(C)}}function v(C,G){C.c=G,w(C)}function w(C){C.a==0&&C.c&&(C.c(),C.c=null)}function b(C){this.a=C||"-"}b.prototype.c=function(C){for(var G=[],K=0;K<arguments.length;K++)G.push(arguments[K].replace(/[\W_]+/g,"").toLowerCase());return G.join(this.a)};function _(C,G){this.c=C,this.f=4,this.a="n";var K=(G||"n4").match(/^([nio])([1-9])$/i);K&&(this.a=K[1],this.f=parseInt(K[2],10))}function x(C){return P(C)+" "+(C.f+"00")+" 300px "+S(C.c)}function S(C){var G=[];C=C.split(/,\s*/);for(var K=0;K<C.length;K++){var se=C[K].replace(/['"]/g,"");se.indexOf(" ")!=-1||/^\d/.test(se)?G.push("'"+se+"'"):G.push(se)}return G.join(",")}function I(C){return C.a+C.f}function P(C){var G="normal";return C.a==="o"?G="oblique":C.a==="i"&&(G="italic"),G}function R(C){var G=4,K="n",se=null;return C&&((se=C.match(/(normal|oblique|italic)/i))&&se[1]&&(K=se[1].substr(0,1).toLowerCase()),(se=C.match(/([1-9]00|normal|bold)/i))&&se[1]&&(/bold/i.test(se[1])?G=7:/[1-9]00/.test(se[1])&&(G=parseInt(se[1].substr(0,1),10)))),K+G}function O(C,G){this.c=C,this.f=C.o.document.documentElement,this.h=G,this.a=new b("-"),this.j=G.events!==!1,this.g=G.classes!==!1}function M(C){C.g&&c(C.f,[C.a.c("wf","loading")]),L(C,"loading")}function E(C){if(C.g){var G=d(C.f,C.a.c("wf","active")),K=[],se=[C.a.c("wf","loading")];G||K.push(C.a.c("wf","inactive")),c(C.f,K,se)}L(C,"inactive")}function L(C,G,K){C.j&&C.h[G]&&(K?C.h[G](K.c,I(K)):C.h[G]())}function j(){this.c={}}function F(C,G,K){var se=[],ve;for(ve in G)if(G.hasOwnProperty(ve)){var ke=C.c[ve];ke&&se.push(ke(G[ve],K))}return se}function B(C,G){this.c=C,this.f=G,this.a=a(this.c,"span",{"aria-hidden":"true"},this.f)}function Y(C){l(C.c,"body",C.a)}function Z(C){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+S(C.c)+";"+("font-style:"+P(C)+";font-weight:"+(C.f+"00")+";")}function ne(C,G,K,se,ve,ke){this.g=C,this.j=G,this.a=se,this.c=K,this.f=ve||3e3,this.h=ke||void 0}ne.prototype.start=function(){var C=this.c.o.document,G=this,K=i(),se=new Promise(function(ze,Je){function ut(){i()-K>=G.f?Je():C.fonts.load(x(G.a),G.h).then(function(Wt){1<=Wt.length?ze():setTimeout(ut,25)},function(){Je()})}ut()}),ve=null,ke=new Promise(function(ze,Je){ve=setTimeout(Je,G.f)});Promise.race([ke,se]).then(function(){ve&&(clearTimeout(ve),ve=null),G.g(G.a)},function(){G.j(G.a)})};function oe(C,G,K,se,ve,ke,ze){this.v=C,this.B=G,this.c=K,this.a=se,this.s=ze||"BESbswy",this.f={},this.w=ve||3e3,this.u=ke||null,this.m=this.j=this.h=this.g=null,this.g=new B(this.c,this.s),this.h=new B(this.c,this.s),this.j=new B(this.c,this.s),this.m=new B(this.c,this.s),C=new _(this.a.c+",serif",I(this.a)),C=Z(C),this.g.a.style.cssText=C,C=new _(this.a.c+",sans-serif",I(this.a)),C=Z(C),this.h.a.style.cssText=C,C=new _("serif",I(this.a)),C=Z(C),this.j.a.style.cssText=C,C=new _("sans-serif",I(this.a)),C=Z(C),this.m.a.style.cssText=C,Y(this.g),Y(this.h),Y(this.j),Y(this.m)}var le={D:"serif",C:"sans-serif"},Ee=null;function xe(){if(Ee===null){var C=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);Ee=!!C&&(536>parseInt(C[1],10)||parseInt(C[1],10)===536&&11>=parseInt(C[2],10))}return Ee}oe.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=i(),Ve(this)};function Me(C,G,K){for(var se in le)if(le.hasOwnProperty(se)&&G===C.f[le[se]]&&K===C.f[le[se]])return!0;return!1}function Ve(C){var G=C.g.a.offsetWidth,K=C.h.a.offsetWidth,se;(se=G===C.f.serif&&K===C.f["sans-serif"])||(se=xe()&&Me(C,G,K)),se?i()-C.A>=C.w?xe()&&Me(C,G,K)&&(C.u===null||C.u.hasOwnProperty(C.a.c))?me(C,C.v):me(C,C.B):Ue(C):me(C,C.v)}function Ue(C){setTimeout(r(function(){Ve(this)},C),50)}function me(C,G){setTimeout(r(function(){u(this.g.a),u(this.h.a),u(this.j.a),u(this.m.a),G(this.a)},C),0)}function _e(C,G,K){this.c=C,this.a=G,this.f=0,this.m=this.j=!1,this.s=K}var Te=null;_e.prototype.g=function(C){var G=this.a;G.g&&c(G.f,[G.a.c("wf",C.c,I(C).toString(),"active")],[G.a.c("wf",C.c,I(C).toString(),"loading"),G.a.c("wf",C.c,I(C).toString(),"inactive")]),L(G,"fontactive",C),this.m=!0,Ie(this)},_e.prototype.h=function(C){var G=this.a;if(G.g){var K=d(G.f,G.a.c("wf",C.c,I(C).toString(),"active")),se=[],ve=[G.a.c("wf",C.c,I(C).toString(),"loading")];K||se.push(G.a.c("wf",C.c,I(C).toString(),"inactive")),c(G.f,se,ve)}L(G,"fontinactive",C),Ie(this)};function Ie(C){--C.f==0&&C.j&&(C.m?(C=C.a,C.g&&c(C.f,[C.a.c("wf","active")],[C.a.c("wf","loading"),C.a.c("wf","inactive")]),L(C,"active")):E(C.a))}function Ae(C){this.j=C,this.a=new j,this.h=0,this.f=this.g=!0}Ae.prototype.load=function(C){this.c=new s(this.j,C.context||this.j),this.g=C.events!==!1,this.f=C.classes!==!1,J(this,new O(this.c,C),C)};function Q(C,G,K,se,ve){var ke=--C.h==0;(C.f||C.g)&&setTimeout(function(){var ze=ve||null,Je=se||null||{};if(K.length===0&&ke)E(G.a);else{G.f+=K.length,ke&&(G.j=ke);var ut,Wt=[];for(ut=0;ut<K.length;ut++){var sn=K[ut],pn=Je[sn.c],qr=G.a,cs=sn;if(qr.g&&c(qr.f,[qr.a.c("wf",cs.c,I(cs).toString(),"loading")]),L(qr,"fontloading",cs),qr=null,Te===null)if(window.FontFace){var cs=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),Da=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);Te=cs?42<parseInt(cs[1],10):!Da}else Te=!1;Te?qr=new ne(r(G.g,G),r(G.h,G),G.c,sn,G.s,pn):qr=new oe(r(G.g,G),r(G.h,G),G.c,sn,G.s,ze,pn),Wt.push(qr)}for(ut=0;ut<Wt.length;ut++)Wt[ut].start()}},0)}function J(C,G,K){var ve=[],se=K.timeout;M(G);var ve=F(C.a,K,C.c),ke=new _e(C.c,G,se);for(C.h=ve.length,G=0,K=ve.length;G<K;G++)ve[G].load(function(ze,Je,ut){Q(C,ke,ze,Je,ut)})}function ae(C,G){this.c=C,this.a=G}ae.prototype.load=function(C){function G(){if(ke["__mti_fntLst"+se]){var ze=ke["__mti_fntLst"+se](),Je=[],ut;if(ze)for(var Wt=0;Wt<ze.length;Wt++){var sn=ze[Wt].fontfamily;ze[Wt].fontStyle!=null&&ze[Wt].fontWeight!=null?(ut=ze[Wt].fontStyle+ze[Wt].fontWeight,Je.push(new _(sn,ut))):Je.push(new _(sn))}C(Je)}else setTimeout(function(){G()},50)}var K=this,se=K.a.projectId,ve=K.a.version;if(se){var ke=K.c.o;p(this.c,(K.a.api||"https://fast.fonts.net/jsapi")+"/"+se+".js"+(ve?"?v="+ve:""),function(ze){ze?C([]):(ke["__MonotypeConfiguration__"+se]=function(){return K.a},G())}).id="__MonotypeAPIScript__"+se}else C([])};function we(C,G){this.c=C,this.a=G}we.prototype.load=function(C){var G,K,se=this.a.urls||[],ve=this.a.families||[],ke=this.a.testStrings||{},ze=new m;for(G=0,K=se.length;G<K;G++)h(this.c,se[G],g(ze));var Je=[];for(G=0,K=ve.length;G<K;G++)if(se=ve[G].split(":"),se[1])for(var ut=se[1].split(","),Wt=0;Wt<ut.length;Wt+=1)Je.push(new _(se[0],ut[Wt]));else Je.push(new _(se[0]));v(ze,function(){C(Je,ke)})};function be(C,G){C?this.c=C:this.c=T,this.a=[],this.f=[],this.g=G||""}var T="https://fonts.googleapis.com/css";function V(C,G){for(var K=G.length,se=0;se<K;se++){var ve=G[se].split(":");ve.length==3&&C.f.push(ve.pop());var ke="";ve.length==2&&ve[1]!=""&&(ke=":"),C.a.push(ve.join(ke))}}function ie(C){if(C.a.length==0)throw Error("No fonts to load!");if(C.c.indexOf("kit=")!=-1)return C.c;for(var G=C.a.length,K=[],se=0;se<G;se++)K.push(C.a[se].replace(/ /g,"+"));return G=C.c+"?family="+K.join("%7C"),0<C.f.length&&(G+="&subset="+C.f.join(",")),0<C.g.length&&(G+="&text="+encodeURIComponent(C.g)),G}function ue(C){this.f=C,this.a=[],this.c={}}var he={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Se={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},de={i:"i",italic:"i",n:"n",normal:"n"},Pe=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function Ce(C){for(var G=C.f.length,K=0;K<G;K++){var se=C.f[K].split(":"),ve=se[0].replace(/\+/g," "),ke=["n4"];if(2<=se.length){var ze,Je=se[1];if(ze=[],Je)for(var Je=Je.split(","),ut=Je.length,Wt=0;Wt<ut;Wt++){var sn;if(sn=Je[Wt],sn.match(/^[\w-]+$/)){var pn=Pe.exec(sn.toLowerCase());if(pn==null)sn="";else{if(sn=pn[2],sn=sn==null||sn==""?"n":de[sn],pn=pn[1],pn==null||pn=="")pn="4";else var qr=Se[pn],pn=qr||(isNaN(pn)?"4":pn.substr(0,1));sn=[sn,pn].join("")}}else sn="";sn&&ze.push(sn)}0<ze.length&&(ke=ze),se.length==3&&(se=se[2],ze=[],se=se?se.split(","):ze,0<se.length&&(se=he[se[0]])&&(C.c[ve]=se))}for(C.c[ve]||(se=he[ve])&&(C.c[ve]=se),se=0;se<ke.length;se+=1)C.a.push(new _(ve,ke[se]))}}function re(C,G){this.c=C,this.a=G}var pe={Arimo:!0,Cousine:!0,Tinos:!0};re.prototype.load=function(C){var G=new m,K=this.c,se=new be(this.a.api,this.a.text),ve=this.a.families;V(se,ve);var ke=new ue(ve);Ce(ke),h(K,ie(se),g(G)),v(G,function(){C(ke.a,ke.c,pe)})};function De(C,G){this.c=C,this.a=G}De.prototype.load=function(C){var G=this.a.id,K=this.c.o;G?p(this.c,(this.a.api||"https://use.typekit.net")+"/"+G+".js",function(se){if(se)C([]);else if(K.Typekit&&K.Typekit.config&&K.Typekit.config.fn){se=K.Typekit.config.fn;for(var ve=[],ke=0;ke<se.length;ke+=2)for(var ze=se[ke],Je=se[ke+1],ut=0;ut<Je.length;ut++)ve.push(new _(ze,Je[ut]));try{K.Typekit.load({events:!1,classes:!1,async:!0})}catch{}C(ve)}},2e3):C([])};function N(C,G){this.c=C,this.f=G,this.a=[]}N.prototype.load=function(C){var G=this.f.id,K=this.c.o,se=this;G?(K.__webfontfontdeckmodule__||(K.__webfontfontdeckmodule__={}),K.__webfontfontdeckmodule__[G]=function(ve,ke){for(var ze=0,Je=ke.fonts.length;ze<Je;++ze){var ut=ke.fonts[ze];se.a.push(new _(ut.name,R("font-weight:"+ut.weight+";font-style:"+ut.style)))}C(se.a)},p(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+f(this.c)+"/"+G+".js",function(ve){ve&&C([])})):C([])};var D=new Ae(window);D.a.c.custom=function(C,G){return new we(G,C)},D.a.c.fontdeck=function(C,G){return new N(G,C)},D.a.c.monotype=function(C,G){return new ae(G,C)},D.a.c.typekit=function(C,G){return new De(G,C)},D.a.c.google=function(C,G){return new re(G,C)};var q={load:r(D.load,D)};e.exports?e.exports=q:(window.WebFont=q,window.WebFontConfig&&D.load(window.WebFontConfig))})()}(Xx)),Xx.exports}var zLe=BLe();const vI=e0(zLe),$Le={key:0,class:"fixed top-0 p-5 w-full bg-white h-16 z-10 shadow shadow-800/20"},HLe=["src"],VLe={class:"container mx-auto px-5 py-16 md:py-24 transition ease-in-out duration-150 tracking-tight"},jLe={class:"ovr-heading",style:{"font-display":"block","word-break":"break-word"}},ULe={class:"relative w-full h-full"},WLe={class:"container mx-auto px-5 py-10 space-y-5"},qLe={key:0,class:"mb-8"},GLe=["src"],KLe={class:"text-3xl font-medium plain-ovr-heading"},kF=`'Inter', -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif`,YLe=ee({__name:"OvrHeader",props:{ovr:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=Ir(),i=Ur(),s=U(!1),o=U(null),a=U(null),l=U(null);let u=0;const c=U(!1),d=()=>{c.value=window.innerWidth<=768},f=te(()=>{var Y,Z;const F=((Y=e.ovr.organization)==null?void 0:Y.json_setting)&&((Z=e.ovr.organization.json_setting.ovr_header)==null?void 0:Z.default);if(!F)return null;const B=RegExp(/src=["']([^"']+)["']/).exec(F);return B?B&&B[1].replaceAll("\\",""):F}),h=te(()=>{var F,B,Y;return(Y=(B=(F=e.ovr.organization)==null?void 0:F.json_setting)==null?void 0:B.ovr_header_link)==null?void 0:Y.default}),p=te(()=>{const{start:F,end:B}=e.ovr.inventory_set||{},Y=F&&new Date(F)||null,Z=B&&new Date(B)||null;return Y&&Z?m(Y,Z):Y?Ua(Y):Z?Ua(Z):""}),m=(F,B)=>{if(!F)return Ua(B);if(!B)return Ua(F);const Y=F.getFullYear(),Z=B.getFullYear(),ne=F.getMonth(),oe=B.getMonth(),le=F.getDate(),Ee=B.getDate();return Y===Z&&ne===oe&&le===Ee?Ua(F):Y===Z&&ne===oe?`${F.toLocaleString("default",{month:"long"})} ${le}-${Ee}, ${Y}`:`${Ua(F)} - ${Ua(B)}`},g=te(()=>{const F={backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},{header:B}=e.ovr.settings;return B!=null&&B.bg_color&&(F.backgroundColor=B.bg_color||"transparent"),B!=null&&B.bg_image&&(F.backgroundImage=B.bg_image&&B.bg_image.includes("blob:")?`url('${B.bg_image}')`:`url('${"https://www.inventory.gallery/fit-in".trim("/")}/1600x1600/${B.bg_image}')`),!isNaN(B==null?void 0:B.banner_vertical_position)&&!(B!=null&&B.scroll_effect)&&(F.backgroundPosition=`center bottom ${B.banner_vertical_position}%`),B!=null&&B.scroll_effect&&(F.backgroundAttachment="fixed"),B!=null&&B.overlay_color&&(F.overlayColor=B.overlay_color),B!=null&&B.overlay_opacity&&(F.overlayOpacity=B.overlay_opacity),B!=null&&B.height&&(F.height=`${B.height}vh`),F}),v=te(()=>{const{text_horizontal_align:F,text_vertical_align:B}=e.ovr.settings.header,Y={display:"grid"};if(F&&(Y.textAlign=`${F}`),B)switch(B){case"top":Y.alignItems="start",u=3;break;case"middle":Y.alignItems="center",u=2;break;case"bottom":Y.alignItems="end",u=1;break}return Y}),w=te(()=>{const{header:F}=e.ovr.settings;return{backgroundColor:F.overlay_color||"transparent",opacity:F.overlay_opacity||0}}),b=te(()=>{const{text:F,header:B}=e.ovr.settings;return F?{color:B!=null&&B.display_banner?F.color.header||"#333333":F.color.headerNoBanner||"#000000",fontFamily:`${F.font.header}, ${kF}`,fontSize:c.value?"2.25rem":`${F.size.header||48}px`,fontWeight:F.bold&&F.bold.header?"bold":"normal",fontStyle:F.italic&&F.italic.header?"italic":"normal"}:{}}),_=te(()=>{const{text:F,header:B}=e.ovr.settings;return F?{color:B!=null&&B.display_banner?F.color.subheading||"#333333":F.color.subheadingNoBanner||"#000000",fontFamily:`${F.font.subheading}, ${kF}`,fontSize:`${F.size.subheading||24}px`,fontWeight:F.bold&&F.bold.subheading?"bold":"normal",fontStyle:F.italic&&F.italic.subheading?"italic":"normal"}:{}}),x=te(()=>o.value?(o.value.offsetTop+o.value.offsetHeight||0)-73:0),S=te(()=>a.value?(a.value.offsetTop+a.value.offsetHeight||0)-73:0),I=te(()=>{var B,Y,Z,ne,oe,le,Ee;let F={content:e.ovr.title,class:""};return(B=e.ovr)!=null&&B.content&&((Z=(Y=e.ovr)==null?void 0:Y.content)!=null&&Z.title)&&(oe=(ne=e.ovr)==null?void 0:ne.content)!=null&&oe.title&&(F=(Ee=(le=e.ovr)==null?void 0:le.content)==null?void 0:Ee.title),F}),P=te(()=>{var B,Y,Z,ne;let F={content:"",class:""};return(B=e.ovr)!=null&&B.content&&((Y=e.ovr)!=null&&Y.content.header)&&(F=(ne=(Z=e.ovr)==null?void 0:Z.content)==null?void 0:ne.header),F}),R=()=>{var B,Y;x.value&&((B=e.ovr.settings)!=null&&B.header.display_banner)?window.scrollY>x.value?s.value=!0:s.value=!1:S.value&&!((Y=e.ovr.settings)!=null&&Y.header.display_banner)&&(window.scrollY>S.value?s.value=!0:s.value=!1);const{header:F}=e.ovr.settings;if(o.value&&(F!=null&&F.scroll_effect)){const Z=window.scrollY,oe=o.value.offsetHeight/3;Z>=oe?o.value.style.setProperty("--blur","blur(8px)"):o.value.style.setProperty("--blur","blur(0px)")}if(o.value&&l.value){const Z=window.scrollY,ne=o.value.offsetHeight,oe=0,le=ne/u;if(Z>=oe&&Z<=le){const Ee=1-(Z-oe)/(le-oe);l.value.style.opacity=Ee.toString()}else Z<oe?l.value.style.opacity="1":l.value.style.opacity="0"}},O=()=>{h.value&&window.open(h.value,"_blank")};nt(()=>{r.fullPath.includes("/editor")||document.addEventListener("scroll",R),d(),window.addEventListener("resize",d)}),On(()=>{window.removeEventListener("resize",d)}),yr(()=>{document.removeEventListener("scroll",R),window.removeEventListener("resize",d)});const M=F=>{n("update:modelValue",{...e.ovr,content:{...e.ovr.content,title:F}}),L()},E=F=>{n("update:modelValue",{...e.ovr,content:{...e.ovr.content,header:F}}),j()},L=Os(()=>i.track("OVR edit - inline header"),1e3),j=Os(()=>i.track("OVR edit - inline subheading"),1e3);return(F,B)=>{var Z,ne,oe,le,Ee,xe,Me,Ve;const Y=En("aos-vue");return k(),W("div",null,[$(is,{name:"slide","enter-active-class":"duration-250 ease-linear","enter-from-class":"-translate-y-full","enter-to-class":"translate-y-0","leave-active-class":"duration-250 ease-linear","leave-from-class":"translate-y-0","leave-to-class":"-translate-y-full"},{default:H(()=>{var Ue;return[F.ovr.id&&s.value?(k(),W("div",$Le,[f.value?(k(),W("img",{key:0,src:f.value,alt:"Organization Logo",class:Le(["h-full",{"cursor-pointer":h.value}]),onClick:O},null,10,HLe)):(k(),W("h1",{key:1,class:Le(["font-normal text-2xl",b.value]),onClick:O},ye(((Ue=F.ovr.organization)==null?void 0:Ue.name)||"(no name)"),3))])):fe("",!0)]}),_:1}),(Z=F.ovr.settings)!=null&&Z.header.display_banner?(k(),W("header",{key:0,id:"hero-image",ref_key:"banner",ref:o,class:"w-full relative mb-16 lg:mb-16 unfix-ios",style:xn(g.value)},[(oe=(ne=F.ovr.settings)==null?void 0:ne.header)!=null&&oe.overlay?(k(),W("div",{key:0,id:"header-overlay",style:xn(w.value),class:"w-full h-full absolute top-0 z-[1]"},null,4)):fe("",!0),A("div",{ref_key:"textHeader",ref:l,class:"relative z-[1] top-0 h-full w-full overflow-hidden",style:xn(v.value)},[A("div",VLe,[$(Y,{animation:"fade-in",duration:500,offset:-200,delay:500,once:!0,class:"space-y-5"},{default:H(()=>{var Ue,me,_e,Te;return[A("div",jLe,[(Ue=I.value.content)!=null&&Ue.length||F.editable?(k(),X(y(aa),Fe({key:0,editable:F.editable},I.value,{style:b.value,"onUpdate:modelValue":M}),null,16,["editable","style"])):fe("",!0)]),A("div",{style:xn([_.value,{"word-break":"break-word"}]),class:"ovr-subheading"},[(me=P.value.content)!=null&&me.length||F.editable?(k(),X(y(aa),Fe({key:0},P.value,{editable:F.editable,"onUpdate:modelValue":E}),null,16,["editable"])):fe("",!0)],4),(Te=(_e=F.ovr.settings)==null?void 0:_e.header)!=null&&Te.display_date?(k(),W("p",{key:0,class:"ovr-date",style:xn(_.value)},ye(p.value),5)):fe("",!0)]}),_:1})])],4)],4)):(k(),W("header",{key:1,ref_key:"header",ref:a,class:"w-full space-y-5 relative"},[A("div",ULe,[A("div",WLe,[F.ovr?(k(),W("div",qLe,[f.value?(k(),W("img",{key:0,src:f.value,alt:"Organization Logo",class:Le(["max-w-xs mb-4",{"cursor-pointer":h.value}]),onClick:O},null,10,GLe)):(k(),W("h1",{key:1,class:Le(["mb-4 font-normal text-2xl",b.value]),onClick:O},ye(((le=F.ovr.organization)==null?void 0:le.name)||"(no name)"),3)),B[0]||(B[0]=A("hr",{class:"bg-secondary-500 border"},null,-1))])):fe("",!0),A("div",KLe,[(Ee=I.value.content)!=null&&Ee.length||F.editable?(k(),X(y(aa),Fe({key:0,editable:F.editable},I.value,{style:b.value,"onUpdate:modelValue":M}),null,16,["editable","style"])):fe("",!0)]),A("div",{style:xn(_.value)},[(xe=P.value.content)!=null&&xe.length||F.editable?(k(),X(y(aa),Fe({key:0},P.value,{editable:F.editable,"onUpdate:modelValue":E}),null,16,["editable"])):fe("",!0)],4),(Ve=(Me=F.ovr.settings)==null?void 0:Me.header)!=null&&Ve.display_date?(k(),W("p",{key:1,style:xn(_.value)},ye(p.value),5)):fe("",!0)])])],512))])}}}),XLe=Ei(YLe,[["__scopeId","data-v-fbd0ea1b"]]);var CF=function(){return Math.random().toString(36).substring(2)},Gl=ee({name:"ContentLoader",props:{width:{type:[Number,String]},height:{type:[Number,String]},viewBox:{type:String},preserveAspectRatio:{type:String,default:"xMidYMid meet"},speed:{type:Number,default:2},baseUrl:{type:String,default:""},primaryColor:{type:String,default:"#f9f9f9"},secondaryColor:{type:String,default:"#ecebeb"},primaryOpacity:{type:Number,default:1},secondaryOpacity:{type:Number,default:1},uniqueKey:{type:String},animate:{type:Boolean,default:!0}},setup:function(t){var n=te(function(){return t.uniqueKey?"".concat(t.uniqueKey,"-idClip"):CF()}),r=te(function(){return t.uniqueKey?"".concat(t.uniqueKey,"-idGradient"):CF()}),i=te(function(){var a;return(a=t.width)!==null&&a!==void 0?a:400}),s=te(function(){var a;return(a=t.height)!==null&&a!==void 0?a:130}),o=te(function(){var a;return(a=t.viewBox)!==null&&a!==void 0?a:"0 0 ".concat(i.value," ").concat(s.value)});return{idClip:n,idGradient:r,computedViewBox:o}},render:function(){return $("svg",{width:this.width,height:this.height,viewBox:this.computedViewBox,version:"1.1",preserveAspectRatio:this.preserveAspectRatio},[$("rect",{style:{fill:"url(".concat(this.baseUrl,"#").concat(this.idGradient,")")},"clip-path":"url(".concat(this.baseUrl,"#").concat(this.idClip,")"),x:"0",y:"0",width:"100%",height:"100%"},null),$("defs",null,[$("clipPath",{id:this.idClip},[this.$slots.default?this.$slots.default():$("rect",{x:"0",y:"0",rx:"5",ry:"5",width:"100%",height:"100%"},null)]),$("linearGradient",{id:this.idGradient},[$("stop",{offset:"0%","stop-color":this.primaryColor,"stop-opacity":this.primaryOpacity},[this.animate?$("animate",{attributeName:"offset",values:"-2; 1",dur:"".concat(this.speed,"s"),repeatCount:"indefinite"},null):null]),$("stop",{offset:"50%","stop-color":this.secondaryColor,"stop-opacity":this.secondaryOpacity},[this.animate?$("animate",{attributeName:"offset",values:"-1.5; 1.5",dur:"".concat(this.speed,"s"),repeatCount:"indefinite"},null):null]),$("stop",{offset:"100%","stop-color":this.primaryColor,"stop-opacity":this.primaryOpacity},[this.animate?$("animate",{attributeName:"offset",values:"-1; 2",dur:"".concat(this.speed,"s"),repeatCount:"indefinite"},null):null])])])])}});const JLe={class:"opacity-0 transition-opacity duration-100 animate-fade-in"},QLe={key:0,class:"space-y-3"},ZLe={key:1},e2e={key:0,class:"space-y-6 flex flex-col gap-6"},t2e=["innerHTML"],n2e={key:1,class:"mt-2 flex items-center gap-2"},r2e={key:1,class:"capitalize"},i2e={key:2,class:"my-6"},s2e={key:1},o2e={class:"sm:hidden space-y-6 flex flex-col"},a2e=["innerHTML"],l2e={key:1,class:"mt-2 flex items-center gap-2"},u2e={key:1,class:"capitalize"},c2e={key:2,class:"my-6"},d2e={class:"hidden sm:block"},f2e={class:"grid grid-cols-2 sm:gap-12 md:gap-24 items-center"},h2e=["innerHTML"],p2e={key:1,class:"mt-2 flex items-center gap-2"},m2e={key:1,class:"capitalize"},g2e={key:2,class:"my-6"},OF=ee({__name:"ArtworkCard",props:{ovr:{},inventory:{},loading:{type:Boolean},editable:{type:Boolean}},setup(e){const t=te(()=>{var s;return(s=e.ovr.settings)==null?void 0:s.artwork}),n=te(()=>{var s;return(s=e.ovr.settings)==null?void 0:s.showInquire}),r=te(()=>e.ovr.settings.layout.columns),i=te(()=>e.ovr.settings.layout.artworkAlignment);return(s,o)=>{const a=En("RouterLink"),l=En("aos-vue");return k(),X(l,{animation:"fade-in",offset:-300,once:!0},{default:H(()=>[A("div",JLe,[s.loading?(k(),W("div",QLe,[$(y(Gl),{viewBox:"0 0 150 140",class:"space-y-2"},{default:H(()=>o[0]||(o[0]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"150",height:"150"},null,-1),A("rect",{x:"0",y:"85",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"98",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"110",rx:"3",ry:"3",width:"70",height:"15"},null,-1)])),_:1})])):s.inventory?(k(),W("div",ZLe,[r.value>1?(k(),W("div",e2e,[$(a,{to:{name:`${s.editable?"ovr-artwork-edit":"ovr-view-artwork"}`,params:{id:s.ovr.id,slug:s.ovr.slug,inventory_id:s.inventory.id}}},{default:H(()=>{var u,c,d;return[s.inventory.imagePreviewUrl?(k(),X(y(Cp),{key:0,"low-res-src":(u=s.inventory)==null?void 0:u.imagePreviewUrl,"high-res-src":(c=s.inventory)==null?void 0:c.largeImagePreviewUrl,alt:(d=s.inventory)==null?void 0:d.title,class:"sm:!h-[26rem] md:!h-[30rem] flex flex-col justify-end transform hover:scale-105 transition duration-280 ease-in cursor-pointer","img-class":{"h-full":r.value<3,"sm:max-w-80":!0,"sm:max-h-[26rem]":!0,"md:max-w-96":r.value>2,"md:max-h-[30rem]":r.value>2,"object-contain":!0,"object-left":i.value==="left"},lazy:!0},null,8,["low-res-src","high-res-src","alt","img-class"])):fe("",!0)]}),_:1},8,["to"]),A("div",null,[s.inventory.formattedCaption?(k(),W("p",{key:0,innerHTML:s.inventory.formattedCaption},null,8,t2e)):fe("",!0),t.value.showStatus?(k(),W("div",n2e,[t.value.statusStyle!=="text"?(k(),W("p",{key:0,class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(s.inventory.status)}`)},null,2)):fe("",!0),t.value.statusStyle!=="icon"?(k(),W("p",r2e,ye(s.inventory.status),1)):fe("",!0)])):fe("",!0),n.value?(k(),W("div",i2e,[$(y(vy),{ovr:s.ovr,inventory:s.inventory},null,8,["ovr","inventory"])])):fe("",!0)])])):(k(),W("div",s2e,[A("div",o2e,[$(a,{to:{name:`${s.editable?"ovr-artwork-edit":"ovr-view-artwork"}`,params:{id:s.ovr.id,slug:s.ovr.slug,inventory_id:s.inventory.id}}},{default:H(()=>{var u,c,d;return[s.inventory.imagePreviewUrl?(k(),X(y(Cp),{key:0,"low-res-src":(u=s.inventory)==null?void 0:u.imagePreviewUrl,"high-res-src":(c=s.inventory)==null?void 0:c.largeImagePreviewUrl,alt:(d=s.inventory)==null?void 0:d.title,class:"transform hover:scale-105 transition duration-280 ease-in cursor-pointer",lazy:!0},null,8,["low-res-src","high-res-src","alt"])):fe("",!0)]}),_:1},8,["to"]),A("div",null,[s.inventory.formattedCaption?(k(),W("p",{key:0,innerHTML:s.inventory.formattedCaption},null,8,a2e)):fe("",!0),t.value.showStatus?(k(),W("div",l2e,[t.value.statusStyle!=="text"?(k(),W("p",{key:0,class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(s.inventory.status)}`)},null,2)):fe("",!0),t.value.statusStyle!=="icon"?(k(),W("p",u2e,ye(s.inventory.status),1)):fe("",!0)])):fe("",!0),n.value?(k(),W("div",c2e,[$(y(vy),{ovr:s.ovr,inventory:s.inventory},null,8,["ovr","inventory"])])):fe("",!0)])]),A("div",d2e,[A("div",f2e,[$(a,{to:{name:`${s.editable?"ovr-artwork-edit":"ovr-view-artwork"}`,params:{id:s.ovr.id,slug:s.ovr.slug,inventory_id:s.inventory.id}}},{default:H(()=>{var u,c,d;return[A("div",null,[$(y(Cp),{"low-res-src":(u=s.inventory)==null?void 0:u.imagePreviewUrl,"high-res-src":(c=s.inventory)==null?void 0:c.largeImagePreviewUrl,alt:(d=s.inventory)==null?void 0:d.title,class:"transform hover:scale-105 transition duration-280 ease-in cursor-pointer",lazy:!0},null,8,["low-res-src","high-res-src","alt"])])]}),_:1},8,["to"]),A("div",null,[s.inventory.formattedCaption?(k(),W("p",{key:0,innerHTML:s.inventory.formattedCaption},null,8,h2e)):fe("",!0),t.value.showStatus?(k(),W("div",p2e,[t.value.statusStyle!=="text"?(k(),W("p",{key:0,class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(s.inventory.status)}`)},null,2)):fe("",!0),t.value.statusStyle!=="icon"?(k(),W("p",m2e,ye(s.inventory.status),1)):fe("",!0)])):fe("",!0),n.value?(k(),W("div",g2e,[$(y(vy),{ovr:s.ovr,inventory:s.inventory},null,8,["ovr","inventory"])])):fe("",!0)])])])]))])):fe("",!0)])]),_:1})}}}),Jx=Rn.create({baseURL:"https://api.arternal.com/ovr/2.0",timeout:3e4,headers:{"Content-Type":"application/json","x-arternal-service":"ovr"}}),yI=z5("trackingSession",{state:()=>({session_id:sessionStorage.getItem("session_id")||"",trackingQueue:[],isProcessingQueue:!1}),actions:{ignoreEditorMode(){const e=!!("NO_TRACK"in window&&window.NO_TRACK);return e&&document.body&&document.body.setAttribute("data-no-track","true"),window.location.href.includes("/editor/")||window.location.href.includes("/artist/")||e},async register(e,t){if(this.ignoreEditorMode()||this.session_id!=="")return;const n={ovr_id:e,offer_id:t,domain:window.location.hostname};await Jx.post("tracking/session",n).then(r=>{var i,s;this.session_id=(i=r.data)==null?void 0:i.session_id,sessionStorage.setItem("session_id",(s=r.data)==null?void 0:s.session_id)}).catch(r=>{console.error("Failed to register session:",r)})},async track(e){if(!this.ignoreEditorMode()){this.session_id||await this.register(Number(e.id),e.offer_id);try{this.trackBeacon(e)}catch{this.trackApi(e)}}},async trackApi(e){const t={...e,timestamp:new Date,session_id:this.session_id};this.trackingQueue.push(t),this.isProcessingQueue||this.processQueue()},trackBeacon(e){const t={...e,timestamp:new Date,session_id:this.session_id};navigator.sendBeacon(`${Jx.defaults.baseURL}/tracking`,JSON.stringify({...t,beacon:!0}))},async processQueue(){for(this.isProcessingQueue=!0;this.trackingQueue.length>0;){const e=this.trackingQueue.shift();e&&await Jx.post("tracking",e).catch(t=>{console.error("Server failed:",t)})}this.isProcessingQueue=!1}}}),v2e={class:"opacity-0 transition-opacity duration-100 animate-fade-in"},y2e={key:0,class:"space-y-3"},b2e={key:1},w2e={key:0,class:"space-y-6 flex flex-col gap-6"},_2e={key:0,class:"sm:h-[26rem] md:h-[30rem] flex flex-col justify-end"},S2e=["src","alt"],x2e={key:1,class:"sm:max-w-64 sm:max-h-[13rem] md:max-w-96 md:max-h-[28rem] text-center bg-slate-200 py-16 transform hover:scale-105 transition duration-280 ease-in"},E2e={key:0,class:"space-y-3 text-gray-800"},T2e={key:1},k2e={class:"display-block sm:hidden space-y-6 flex flex-col"},C2e={key:0,class:"sm:h-[26rem] md:h-[30rem] flex flex-col justify-end"},O2e=["src","alt"],R2e={key:1,class:"sm:max-w-64 sm:max-h-[13rem] md:max-w-96 md:max-h-[28rem] text-center bg-slate-200 py-16 transform hover:scale-105 transition duration-280 ease-in"},I2e={key:0,class:"space-y-3 text-gray-800"},A2e={class:"hidden sm:block"},P2e={class:"grid grid-cols-2 sm:gap-12 md:gap-24 items-center"},M2e={key:0},D2e=["src","alt"],N2e={key:1,class:"sm:max-w-64 sm:max-h-[13rem] md:max-w-96 md:max-h-[28rem] text-center bg-slate-200 py-16 transform hover:scale-105 transition duration-280 ease-in"},L2e={key:0,class:"space-y-3 text-gray-800"},F2e=ee({__name:"DocumentCard",props:{ovr:{},inventory:{},loading:{type:Boolean}},setup(e){const t=te(()=>e.ovr.settings.layout.columns),n=te(()=>e.ovr.settings.layout.artworkAlignment),r=yI(),i=()=>{var l;e.ovr.id&&((l=e.inventory)!=null&&l.id)&&r.track({event:"open",id:e.ovr.id,inventory_id:e.inventory.id,uri:e.inventory.imagePreviewUrl})},s=te(()=>{var l,u;return((l=e.inventory)==null?void 0:l.imagePreviewUrl)&&((u=e.inventory)==null?void 0:u.imagePreviewUrl.includes("pdf"))}),o=()=>{var l;return(l=e.inventory)!=null&&l.imagePreviewUrl?e.inventory.imagePreviewUrl.replace(".pdf",".png")+`?ts=${Date.now()}`:""},a=()=>{var l;window.open((l=e.inventory)==null?void 0:l.imagePreviewUrl,"_blank"),i()};return(l,u)=>{const c=En("aos-vue");return k(),X(c,{animation:"fade-in",offset:-300,once:!0},{default:H(()=>[A("div",v2e,[l.loading?(k(),W("div",y2e,[$(y(Gl),{viewBox:"0 0 150 140",class:"space-y-2"},{default:H(()=>u[0]||(u[0]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"150",height:"150"},null,-1),A("rect",{x:"0",y:"85",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"98",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"110",rx:"3",ry:"3",width:"70",height:"15"},null,-1)])),_:1})])):l.inventory?(k(),W("div",b2e,[t.value>1?(k(),W("div",w2e,[A("a",{class:"mb-8 flex flex-col gap-6 cursor-pointer",onClick:a},[s.value?(k(),W("div",_2e,[A("img",{src:o(),alt:l.inventory.title,loading:"lazy",class:Le(["object-contain transform hover:scale-105 transition duration-280 ease-in",{"w-full":t.value<3,"h-full":t.value<3,"sm:max-w-80":t.value>2,"sm:max-h-[26rem]":t.value>2,"md:max-w-96":t.value>2,"md:max-h-[30rem]":t.value>2,"object-left":n.value==="left"}])},null,10,S2e)])):(k(),W("div",x2e,[$(y(jS),{class:"w-10 h-10 text-gray-500 mx-auto"})]))]),A("div",null,[A("a",{onClick:a,class:"cursor-pointer"},[l.inventory?(k(),W("div",E2e,[A("p",null,ye(l.inventory.title),1)])):fe("",!0)])])])):(k(),W("div",T2e,[A("div",k2e,[A("a",{class:"mb-8 rounded-sm flex flex-col gap-6 cursor-pointer",onClick:a},[s.value?(k(),W("div",C2e,[A("img",{src:o(),alt:l.inventory.title,loading:"lazy",class:Le(["object-contain transform hover:scale-105 transition duration-280 ease-in h-full w-full",{"object-left":n.value==="left"}])},null,10,O2e)])):(k(),W("div",R2e,[$(y(jS),{class:"w-10 h-10 text-gray-500 mx-auto"})]))]),A("div",null,[A("a",{onClick:a,class:"cursor-pointer"},[l.inventory?(k(),W("div",I2e,[A("p",null,ye(l.inventory.title),1)])):fe("",!0)])])]),A("div",A2e,[A("div",P2e,[A("a",{class:"mb-8 rounded-sm flex flex-col gap-6 cursor-pointer",onClick:a},[s.value?(k(),W("div",M2e,[A("img",{src:o(),alt:l.inventory.title,loading:"lazy",class:"object-contain transform hover:scale-105 transition duration-280 ease-in h-full w-full"},null,8,D2e)])):(k(),W("div",N2e,[$(y(jS),{class:"w-10 h-10 text-gray-500 mx-auto"})]))]),A("div",null,[A("a",{onClick:a,class:"cursor-pointer"},[l.inventory?(k(),W("div",L2e,[A("p",null,ye(l.inventory.title),1)])):fe("",!0)])])])])]))])):fe("",!0)])]),_:1})}}}),B2e={class:"opacity-0 transition-opacity duration-100 animate-fade-in"},z2e={key:0,class:"space-y-3"},$2e={key:1,class:"space-y-3 flex flex-col gap-6"},H2e={key:0,class:"sm:h-[13rem] md:h-[15rem] flex items-center"},V2e=["src","alt"],j2e=ee({__name:"InstallationViewCard",props:{ovr:{},inventory:{},loading:{type:Boolean}},setup(e){return(t,n)=>{const r=En("aos-vue");return k(),X(r,{animation:"fade-in",offset:-300,once:!0},{default:H(()=>{var i;return[A("div",B2e,[t.loading?(k(),W("div",z2e,[$(y(Gl),{viewBox:"0 0 150 140",class:"space-y-2"},{default:H(()=>n[0]||(n[0]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"150",height:"150"},null,-1),A("rect",{x:"0",y:"85",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"98",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"110",rx:"3",ry:"3",width:"70",height:"15"},null,-1)])),_:1})])):t.inventory?(k(),W("div",$2e,[t.inventory.imagePreviewUrl?(k(),W("div",H2e,[A("img",{src:(i=t.inventory)==null?void 0:i.imagePreviewUrl,alt:t.inventory.title,class:Le(["w-full sm:max-w-80 sm:max-h-[13rem] md:max-w-96 md:max-h-[15rem] object-contain transform hover:scale-105 transition duration-280 ease-in",{"object-left":t.ovr.settings.layout.artworkAlignment=="left","object-center":t.ovr.settings.layout.artworkAlignment=="center"}])},null,10,V2e)])):fe("",!0)])):fe("",!0)])]}),_:1})}}}),U2e={key:0,class:"container"},W2e={key:0,class:"mb-12"},q2e={class:"grid grid-cols-1 grid-gap-5 gap-6 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"},G2e={class:"hidden"},yk=ee({__name:"InstallationViewsList",props:{ovr:{},installationViews:{},loading:{type:Boolean},hideTitle:{type:Boolean}},setup(e){const t=e,{ovr:n}=fn(t),r=U(null),i=s=>{var o;(o=r.value)==null||o.openImage(s)};return(s,o)=>{var a,l;return k(),W(je,null,[s.installationViews.length&&((l=(a=y(n).settings)==null?void 0:a.documentsInstallations)!=null&&l.showInstallations)?(k(),W("section",U2e,[s.hideTitle?fe("",!0):(k(),W("h3",W2e,"Installation Views")),A("section",q2e,[(k(!0),W(je,null,Ot(s.installationViews,u=>(k(),X(j2e,{key:u.id,ovr:y(n),inventory:u,loading:s.loading,class:"mb-24 cursor-pointer",onClick:c=>i(u.id)},null,8,["ovr","inventory","loading","onClick"]))),128))])])):fe("",!0),A("div",G2e,[$(y(RR),{id:"installation-view-gallery",ref_key:"installationViewGallery",ref:r,inventories:s.installationViews},null,8,["inventories"])])],64)}}}),K2e={class:"container"},Y2e={key:0,class:"flex items-center mb-16"},X2e={class:"flex items-center text-lg space-x-5"},J2e={key:1},Q2e={key:2},Z2e={key:4},eFe={key:0,class:"container max-w-4xl mx-auto my-10 lg:mb-16"},tFe=ee({__name:"ArtworksList",props:{ovr:{},inventoryItems:{},installationViews:{},beforeInstallationViewsTextContent:{},loading:{type:Boolean},editable:{type:Boolean}},emits:["updateOvrBeforeInstallationViews"],setup(e){const t=e,{ovr:n}=fn(t),r=te(()=>n.value.settings.layout.columns),i=te(()=>t.inventoryItems.filter(d=>["inventory","edition","master edition"].includes(d.type))),s=te(()=>t.inventoryItems.filter(d=>d.type==="doc")),o=te(()=>{var d,f;return((f=(d=t.ovr.settings)==null?void 0:d.documentsInstallations)==null?void 0:f.showDocs)&&s.value.length}),a=te(()=>{var d,f,h,p,m;return((f=(d=t.ovr.settings)==null?void 0:d.documentsInstallations)==null?void 0:f.showInstallations)&&((m=(p=(h=t.ovr)==null?void 0:h.settings)==null?void 0:p.documentsInstallations)==null?void 0:m.installation)==="in tab"&&t.installationViews.length}),l=U("works"),u=d=>{l.value=d},c=Array.from({length:6},()=>[]);return He(()=>{var d;return(d=t.ovr.settings)==null?void 0:d.documentsInstallations},d=>{const f=!(d!=null&&d.showInstallations)||(d==null?void 0:d.installation)!=="in tab",h=!(d!=null&&d.showDocs);f&&l.value==="installation-views"&&u("works"),h&&l.value==="docs"&&u("works")}),(d,f)=>{var h;return k(),W(je,null,[f[6]||(f[6]=A("div",{class:"w-0 h-0"},[A("div",{class:"grid-cols-1 grid-cols-2 grid-cols-3 grid-cols-4 grid-cols-5"})],-1)),A("main",K2e,[o.value||a.value?(k(),W("header",Y2e,[A("div",X2e,[A("button",{type:"button",class:Le(["py-3 cursor-pointer transition-opacity hover:opacity-60 rounded-md",{"font-semibold":l.value==="works","opacity-70":l.value!=="works"}]),onClick:f[0]||(f[0]=p=>u("works"))},"Artworks",2),f[4]||(f[4]=A("div",{class:"w-[1px]"}," ",-1)),o.value?(k(),W("button",{key:0,type:"button",class:Le(["py-3 cursor-pointer transition-opacity hover:opacity-60 rounded-md",{"font-semibold":l.value==="docs","opacity-70":l.value!=="docs"}]),onClick:f[1]||(f[1]=p=>u("docs"))},"Documents",2)):fe("",!0),f[5]||(f[5]=A("div",{class:"w-[1px]"}," ",-1)),a.value?(k(),W("button",{key:1,type:"button",class:Le(["py-3 cursor-pointer transition-opacity hover:opacity-60 rounded-md",{"font-semibold":l.value==="installation-views","opacity-70":l.value!=="installation-views"}]),onClick:f[2]||(f[2]=p=>u("installation-views"))},"Installation Views",2)):fe("",!0)])])):fe("",!0),d.loading?(k(),W("section",J2e,[A("div",{class:Le(["grid grid-cols-1",{"grid-gap-5 gap-6":r.value>1,"sm:grid-cols-2":r.value>1,"md:grid-cols-3":r.value>2,"md:grid-cols-3 lg:grid-cols-4":r.value===4}])},[(k(!0),W(je,null,Ot(y(c),(p,m)=>(k(),X(OF,{key:m,ovr:y(n),loading:d.loading,class:"mb-24"},null,8,["ovr","loading"]))),128))],2)])):fe("",!0),l.value==="works"?(k(),W("section",Q2e,[A("div",{class:Le(["grid grid-cols-1",{"grid-gap-5 gap-6":r.value>1,"sm:grid-cols-2":r.value>1,"md:grid-cols-3":r.value>2,"md:grid-cols-3 lg:grid-cols-4":r.value===4}])},[(k(!0),W(je,null,Ot(i.value,p=>(k(),X(OF,{key:p.id,ovr:y(n),inventory:p,editable:d.editable,loading:d.loading,class:"mb-24"},null,8,["ovr","inventory","editable","loading"]))),128))],2)])):fe("",!0),l.value==="docs"?(k(),W("section",{key:3,class:Le(["grid grid-cols-1 items-end",{"grid-gap-5 gap-6":r.value>1,"sm:grid-cols-2":r.value>1,"md:grid-cols-3":r.value>2,"md:grid-cols-3 lg:grid-cols-4":r.value===4}])},[(k(!0),W(je,null,Ot(s.value,p=>(k(),X(F2e,{key:p.id,ovr:y(n),inventory:p,loading:d.loading,class:"mb-24"},null,8,["ovr","inventory","loading"]))),128))],2)):fe("",!0),l.value==="installation-views"?(k(),W("section",Z2e,[(h=d.beforeInstallationViewsTextContent.content)!=null&&h.length||d.editable?(k(),W("div",eFe,[$(aa,Fe(d.beforeInstallationViewsTextContent,{editable:d.editable,"enable-heading":!0,class:"leading-relaxed","onUpdate:modelValue":f[3]||(f[3]=p=>d.$emit("updateOvrBeforeInstallationViews",p))}),null,16,["editable"])])):fe("",!0),y(n)&&y(n).id?(k(),X(yk,{key:1,ovr:y(n),"installation-views":d.installationViews,loading:d.loading,"hide-title":""},null,8,["ovr","installation-views","loading"])):fe("",!0)])):fe("",!0)])],64)}}}),nFe={key:0,class:"container max-w-4xl mx-auto my-10 lg:mb-16"},rFe={key:0},iFe={key:0,class:"container max-w-4xl mx-auto my-10 lg:mb-16"},sFe={key:2},oFe={key:0,class:"container max-w-4xl mx-auto my-10 lg:mb-16"},aFe={key:3,class:"container max-w-4xl mx-auto my-10"},lFe={class:"container mt-10 md:mt-16 lg:mt-24 mx-auto py-5 border-t border-slate-300"},uFe={key:0,class:"mt-4 p-4"},cFe=["innerHTML"],dFe={key:1,class:"container py-8"},fFe={key:0,id:"modals"},Uq=ee({__name:"OvrPreview",props:{ovr:{},editable:{type:Boolean}},emits:["onUpdateOvr"],setup(e,{expose:t,emit:n}){var j;const r=n,i=IR(),s=Ur(),o=Ir(),a=ln` query ovrPreview($id: Int!, $inventory_set_id: Int!, $organization_id: Int!, $fetchFonts: Boolean!) { gettArtworksByOvrId (id: $id, inventory_set_id: $inventory_set_id) { inventoryItems { id title price price_currency status type imagePreviewUrl largeImagePreviewUrl formattedCaption } installationViews { id title type imagePreviewUrl largeImagePreviewUrl } } getGalleryFonts (organization_id: $organization_id) @include(if: $fetchFonts) { family style weight } } `,{result:l,loading:u,refetch:c,onResult:d}=Ro(a,{id:e.ovr.id||0,inventory_set_id:e.ovr.inventory_set_id||0,organization_id:((j=e.ovr.organization)==null?void 0:j.id)||0,fetchFonts:!i.fontsLoaded});d(()=>{var F;i.setFonts(((F=l==null?void 0:l.value)==null?void 0:F.getGalleryFonts)||[]),L()});const f=te(()=>{var F,B;return((B=(F=l==null?void 0:l.value)==null?void 0:F.gettArtworksByOvrId)==null?void 0:B.inventoryItems)||[]}),h=te(()=>{var F,B;return((B=(F=l==null?void 0:l.value)==null?void 0:F.gettArtworksByOvrId)==null?void 0:B.installationViews)||[]}),p=te(()=>{var F,B;return((B=(F=l==null?void 0:l.value)==null?void 0:F.getGalleryFonts)==null?void 0:B.map(Y=>Y.family))||[]});He(()=>e.ovr.inventory_set_id,F=>{var B;F!=null&&c({id:e.ovr.id||0,inventory_set_id:Number(F),organization_id:Number((B=e.ovr.organization)==null?void 0:B.id),fetchFonts:!i.fontsLoaded})});const m=te(()=>{const{layout:F,text:B}=e.ovr.settings,Y={backgroundColor:(F==null?void 0:F.bg_color)||"#ffffff"};return B&&(Y.color=B==null?void 0:B.color.body,Y.fontFamily=`${B==null?void 0:B.font.body}, Inter, sans-serif`,Y.fontSize=`${(B==null?void 0:B.size.body)||24}px`,Y.fontWeight=B!=null&&B.bold&&(B!=null&&B.bold.body)?"600":"400",Y.fontStyle=B!=null&&B.italic&&(B!=null&&B.italic.body)?"italic":"normal"),Y}),g=te(()=>{var B,Y,Z,ne;let F={};return(B=e.ovr)!=null&&B.content&&((Y=e.ovr)!=null&&Y.content.after_header)&&(F=(ne=(Z=e.ovr)==null?void 0:Z.content)==null?void 0:ne.after_header),F}),v=te(()=>{var B,Y,Z,ne;let F={};return(B=e.ovr)!=null&&B.content&&((Y=e.ovr)!=null&&Y.content.before_installation_views)&&(F=(ne=(Z=e.ovr)==null?void 0:Z.content)==null?void 0:ne.before_installation_views),F}),w=te(()=>{var B,Y,Z,ne;let F={};return(B=e.ovr)!=null&&B.content&&((Y=e.ovr)!=null&&Y.content.before_footer)&&(F=(ne=(Z=e.ovr)==null?void 0:Z.content)==null?void 0:ne.before_footer),F}),b=te(()=>{var B,Y;const F=((B=e.ovr.organization)==null?void 0:B.json_setting)&&((Y=e.ovr.organization.json_setting.ovr_footer)==null?void 0:Y.default);return F||null}),_=te(()=>{var F;return((F=e.ovr.settings)==null?void 0:F.askEmail)&&!g1e("emailCollected")||!1}),x=te(()=>o.fullPath.includes("/editor")),S=F=>{r("onUpdateOvr",F)},I=F=>{r("onUpdateOvr",{...e.ovr,content:{...e.ovr.content,after_header:F}}),O()},P=F=>{r("onUpdateOvr",{...e.ovr,content:{...e.ovr.content,before_footer:F}}),M()},R=F=>{r("onUpdateOvr",{...e.ovr,content:{...e.ovr.content,before_installation_views:F}}),E()},O=Os(()=>s.track("OVR edit - inline body"),1e3),M=Os(()=>s.track("OVR edit - inline footer"),1e3),E=Os(()=>s.track("OVR edit - inline installation views"),1e3);t({refetch:c});function L(F=!1){var Z;const{text:B}=e.ovr.settings,Y=["Inter"];B!=null&&B.font&&Y.push(...Array.from(new Set(Object.values(B.font)))),(!i.fontsLoaded||F)&&(vI.load({google:{families:Y},custom:{families:p.value,urls:[`https://api.arternal.com/fonts/${(Z=e.ovr.organization)==null?void 0:Z.id}/fonts.css`]}}),i.setFontLoadedStatus(!0))}return He(()=>{var F,B;return(B=(F=e.ovr.settings)==null?void 0:F.text)==null?void 0:B.font},(F,B)=>{Object.keys(F).filter(Z=>{const ne=Z;return F[ne]!==B[ne]}).length&&L(!0)},{deep:!0}),(F,B)=>{var Z,ne,oe,le,Ee,xe,Me,Ve,Ue,me,_e,Te,Ie;const Y=En("aos-vue");return k(),W(je,null,[A("main",{id:"ovr-preview",style:xn(m.value)},[$(XLe,{ovr:F.ovr,class:Le({"mt-[72px]":x.value}),editable:F.editable,"onUpdate:modelValue":S},null,8,["ovr","class","editable"]),$(Y,{animation:"fade-in",duration:500,offset:-1e3,delay:1e3,once:!0},{default:H(()=>{var Ae;return[(Ae=g.value.content)!=null&&Ae.length||F.editable?(k(),W("div",nFe,[$(y(aa),Fe(g.value,{editable:F.editable,"enable-heading":!0,class:"leading-relaxed","onUpdate:modelValue":I}),null,16,["editable"])])):fe("",!0)]}),_:1}),h.value.length&&((ne=(Z=F.ovr.settings)==null?void 0:Z.documentsInstallations)!=null&&ne.showInstallations)&&((le=(oe=F.ovr.settings)==null?void 0:oe.documentsInstallations)==null?void 0:le.installation)==="top"?(k(),W("div",rFe,[(Ee=v.value.content)!=null&&Ee.length||F.editable?(k(),W("div",iFe,[$(y(aa),Fe(v.value,{editable:F.editable,"enable-heading":!0,class:"leading-relaxed","onUpdate:modelValue":R}),null,16,["editable"])])):fe("",!0),F.ovr&&F.ovr.id?(k(),X(yk,{key:1,ovr:F.ovr,"installation-views":h.value,loading:y(u)},null,8,["ovr","installation-views","loading"])):fe("",!0)])):fe("",!0),F.ovr&&F.ovr.id?(k(),X(tFe,{key:1,ovr:F.ovr,"inventory-items":f.value,"installation-views":h.value,"before-installation-views-text-content":v.value,editable:F.editable,loading:y(u),onUpdateOvrBeforeInstallationViews:R},null,8,["ovr","inventory-items","installation-views","before-installation-views-text-content","editable","loading"])):fe("",!0),h.value.length&&((Me=(xe=F.ovr.settings)==null?void 0:xe.documentsInstallations)!=null&&Me.showInstallations)&&((Ue=(Ve=F.ovr.settings)==null?void 0:Ve.documentsInstallations)==null?void 0:Ue.installation)==="bottom"?(k(),W("div",sFe,[(me=v.value.content)!=null&&me.length||F.editable?(k(),W("div",oFe,[$(y(aa),Fe(v.value,{editable:F.editable,"enable-heading":!0,class:"leading-relaxed","onUpdate:modelValue":R}),null,16,["editable"])])):fe("",!0),F.ovr&&F.ovr.id?(k(),X(yk,{key:1,ovr:F.ovr,"installation-views":h.value,loading:y(u)},null,8,["ovr","installation-views","loading"])):fe("",!0)])):fe("",!0),(_e=w.value.content)!=null&&_e.length||F.editable?(k(),W("div",aFe,[$(y(aa),Fe(w.value,{editable:F.editable,"enable-heading":!0,class:"leading-relaxed","onUpdate:modelValue":P}),null,16,["editable"])])):fe("",!0),A("footer",lFe,[b.value?(k(),W("div",uFe,[A("div",{class:"text-black",innerHTML:b.value},null,8,cFe)])):fe("",!0),(Ie=(Te=F.ovr.organization)==null?void 0:Te.json_setting)!=null&&Ie.ovr_white_label_enabled?fe("",!0):(k(),W("div",dFe,B[0]||(B[0]=[A("a",{href:"https://arternal.com",target:"_blank",class:"cursor-pointer"},[A("div",{class:"text-xs text-gray-800 flex flex-col sm:flex-row gap-3 sm:gap-1.5 items-center justify-center"},[A("div",null,"Viewing Rooms Powered by"),A("img",{src:gI,alt:"ARTERNAL"})])],-1)])))])],4),x.value?fe("",!0):(k(),W("div",fFe,[_.value?(k(),X(E1e,{key:0,ovr:F.ovr},null,8,["ovr"])):fe("",!0)]))],64)}}}),hFe={key:0,class:"flex items-stretch min-h-screen"},pFe={id:"preview",class:"hidden sm:block w-3/4 lg:w-3/4 xl:w-full"},mFe=ee({__name:"Edit",setup(e){const{id:t}=Ir().params,n=U({}),r=U(!1),i=U(!1),{toast:s}=$s(),{t:o}=ls(),a=U(),{user:l}=fU(),u=ln` query getOvr($id: Int!) { getOvrById(id: $id) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings created_at updated_at content inventory_set { id name public_url description start end } organization { id name json_setting } } } `,{onResult:c,onError:d}=Ro(u,{id:Number(t)});c(P=>{var R,O,M,E,L;if(P!=null&&P.data){const j=(R=l.value)==null?void 0:R["https://arternal.com/claims"];Number(j==null?void 0:j.organization_id)!==Number((E=(M=(O=P==null?void 0:P.data)==null?void 0:O.getOvrById)==null?void 0:M.organization)==null?void 0:E.id)&&Df.push("/ovr/404"),n.value=((L=P==null?void 0:P.data)==null?void 0:L.getOvrById)||{}}}),d(P=>{console.error(P),Df.push("/ovr/404")});const f=ln` mutation updateOvr($id: Int!, $input: UpdateOvrDto!) { updateOvr(id: $id, input: $input) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings content created_at updated_at } } `,{mutate:h,onDone:p,onError:m,loading:g}=mC(f);p(P=>{var R;P.data&&((R=P.data)!=null&&R.updateOvr)}),m(P=>{console.error(P),s({title:o("messages.errorPublishingOVR"),variant:"destructive"})});const v=async()=>{const{created_at:P,updated_at:R,slug:O,...M}=n.value;"inventory_set"in M&&(M==null||delete M.inventory_set),"organization"in M&&(M==null||delete M.organization),await h({input:M,...n.value.id&&{id:n.value.id}}),r.value=!1},w=P=>{n.value=P,r.value=!0},b=P=>{var O,M;r.value=!0;const R=(M=(O=P.settings)==null?void 0:O.header)==null?void 0:M.bg_image;R&&R.startsWith("blob:")?i.value=!0:i.value=!1},_=async()=>{a.value?(await v(),await a.value.refetch({id:n.value.id,inventory_set_id:n.value.inventory_set_id})):s({title:o("messages.errorSavingOvr")})},x=U(null),S=()=>{x.value&&(x.value.scrollTop=0)},I=P=>{(r.value||i.value)&&(P.preventDefault(),P.returnValue=!0)};return Zm(()=>{if(i.value){if(!window.confirm("Cover image has not been fully uploaded yet. Are you sure you want to leave?"))return!1}else if(r.value&&!window.confirm(o("messages.unsavedChanges")))return!1}),window.addEventListener("beforeunload",I),yr(()=>{window.removeEventListener("beforeunload",I)}),(P,R)=>{var M;const O=En("UseHead");return k(),W(je,null,[$(O,null,{default:H(()=>{var E;return[A("title",null,ye(`${n.value.title} | ${(E=n.value.organization)==null?void 0:E.name}`),1)]}),_:1}),(M=n.value)!=null&&M.id?(k(),W("main",hFe,[A("div",pFe,[n.value.id?(k(),X(Uq,{key:0,ref_key:"previewRef",ref:a,ovr:n.value,editable:!0,onOnUpdateOvr:w},null,8,["ovr"])):fe("",!0)]),A("div",{id:"editor",ref_key:"editorRef",ref:x,class:"w-full relative z-[1] sm:w-1/2 lg:w-1/3 xl:w-1/4 sm:max-w-[460px] border-l-2 sticky top-0 h-screen overflow-y-scroll overflow-visible !bg-[#FCFCFE]"},[$(mI,{ovr:n.value,"onUpdate:ovr":[R[0]||(R[0]=E=>n.value=E),b],"is-submitting":y(g),onOnSave:v,onSaveAndRefetchOvr:_,onScrollToTop:S},null,8,["ovr","is-submitting"])],512)])):fe("",!0)],64)}}}),gFe={key:1,class:"h-screen container flex flex-col justify-center items-center text-center"},vFe={class:"mb-4"},yFe={class:"mb-16 text-sm text-secondary-500"},bFe=ee({__name:"View",setup(e){const t=Ir(),{id:n}=t.params,{offer_id:r}=Ir().query,i=yI(),s=()=>{document.visibilityState==="hidden"?i.track({event:"close",id:Number(n),uri:t.fullPath}):i.track({event:"open",id:Number(n),uri:t.fullPath})};nt(()=>{document.addEventListener("visibilitychange",s);const d=typeof r=="string"?parseInt(r):void 0;i.track({event:"open",id:Number(n),uri:t.fullPath,offer_id:d})}),yr(()=>{document.removeEventListener("visibilitychange",s)}),Zm((d,f,h)=>{i.track({event:"close",id:Number(n),uri:f.fullPath}),h()});const o=ln` query getOvr($id: Int!, $slug: String!) { getOvrViewById(id: $id, slug: $slug) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings created_at updated_at content inventory_set { id name public_url description start end } organization { id name json_setting } } } `,{result:a,loading:l,onResult:u}=Ro(o,{id:Number(n),slug:t.params.slug}),c=te(()=>{var d;return(d=a==null?void 0:a.value)==null?void 0:d.getOvrViewById});return u(()=>{var m,g,v,w,b,_,x,S,I,P,R,O,M;const d=`${(m=c.value)==null?void 0:m.title} | ${(v=(g=c.value)==null?void 0:g.organization)==null?void 0:v.name}`,f=`${mLe(((_=(b=(w=c.value)==null?void 0:w.content)==null?void 0:b.title)==null?void 0:_.content)||((x=c.value)==null?void 0:x.title))} | ${(I=(S=c.value)==null?void 0:S.organization)==null?void 0:I.name}`,h=(R=(P=c.value.settings)==null?void 0:P.header)!=null&&R.bg_image?`${"https://www.inventory.gallery/fit-in".trim("/")}/1600x1600/${(M=(O=c.value.settings)==null?void 0:O.header)==null?void 0:M.bg_image}`:"",p=[{property:"og:title",content:f},{property:"og:url",content:window.location.href},{property:"og:site_name",content:"Arternal"}];h.length&&(p.push({property:"og:image",content:h}),p.push({property:"og:image:width",content:"1600"}),p.push({property:"og:image:height",content:"1600"})),n0({title:d,meta:p})}),(d,f)=>{var h;return!y(l)&&((h=c.value)!=null&&h.enabled)?(k(),X(Uq,{key:0,ovr:c.value},null,8,["ovr"])):y(l)?fe("",!0):(k(),W("div",gFe,[A("h2",vFe,ye(d.$t("messages.roomNotFound")),1),A("p",yFe,ye(d.$t("messages.roomDisabledByOwner")),1),f[0]||(f[0]=A("img",{src:gI,class:"w-36",alt:"ARTERNAL"},null,-1))]))}}}),wFe={class:"flex flex-row fixed z-10 right-4 top-4 items-center gap-4"},_Fe={class:"mx-auto pt-16 md:pt-16 pb-24 md:pb-0"},SFe={class:"flex flex-col md:flex-row items-start justify-center md:h-[calc(100vh_-_100px)]"},xFe={class:"flex flex-1 justify-center md:mt-24"},EFe={key:0,class:"overflow-hidden flex justify-center"},TFe={key:0,controls:"",autoplay:"",muted:""},kFe=["src"],CFe={class:"flex flex-1 w-full"},OFe={class:"mt-6 space-y-10 md:py-24 md:px-10 lg:px-16 w-full"},RFe={class:"space-y-6 !text-base"},IFe=["innerHTML"],AFe={key:1,class:"mt-2 flex items-center gap-2"},PFe={key:1,class:"capitalize"},MFe={class:"flex gap-4 items-center"},DFe={key:0},NFe={class:"flex flex-wrap gap-4 items-center py-5"},LFe=["onClick"],FFe={key:0},BFe=["src"],zFe=["src"],$Fe=["for"],HFe=["id","href"],VFe=["id"],jFe=["id"],UFe={key:1,id:"art-loading"},WFe={class:"container mx-auto mt-16 md:mt-40"},qFe={class:"flex flex-col md:flex-row space-x-10 justify-start md:h-[calc(100vh_-_100px)]"},GFe={class:"flex-auto"},KFe={class:"overflow-hidden"},YFe={class:"w-full md:w-1/2 pt-16"},XFe={class:"hidden"},Wq=ee({__name:"OvrArtworkPreview",props:{ovr:{},editable:{type:Boolean}},setup(e,{expose:t}){var I;const n=Ir(),r=Aa(),{id:i,inventory_id:s}=n.params,o=IR(),a=P=>{var R;(R=w.value)==null||R.openImage(P)},l=ln` query ($ovr_id: Int!, $inventory_id: Int!, $organization_id: Int!, $fetchFonts: Boolean!) { getInventoryById(id: $inventory_id, ovr_id: $ovr_id) { id title description status price price_currency artist year type formattedCaption provenance exhibition_history collections literature publications courtesy photo_credit copyright video_url imagePreviewUrl largeImagePreviewUrl alt_views { id video_url imagePreviewUrl largeImagePreviewUrl } custom_fields previousInventoryId nextInventoryId currentItemIndex } getGalleryFonts (organization_id: $organization_id) @include(if: $fetchFonts) { family style weight } } `,{result:u,refetch:c,loading:d,onResult:f}=Ro(l,{ovr_id:Number(i),inventory_id:Number(s),slug:n.params.slug,organization_id:(I=e.ovr.organization)==null?void 0:I.id,fetchFonts:!o.fontsLoaded}),h=te(()=>{var P;return((P=u==null?void 0:u.value)==null?void 0:P.getInventoryById)||{}}),p=te(()=>{var P;return(P=e.ovr.settings)==null?void 0:P.showInquire}),m=te(()=>{var P,R;return((R=(P=u==null?void 0:u.value)==null?void 0:P.getGalleryFonts)==null?void 0:R.map(O=>O.family))||[]});f(()=>{var O,M;const P=()=>{var L;const E=[];return E.push(h.value.artist?`${h.value.artist} |`:""),E.push(h.value.title),E.push(h.value.year?`(${h.value.year})`:""),E.push("|"),E.push((L=e.ovr.organization)==null?void 0:L.name),E.filter(j=>j==null?void 0:j.length).join(" ")},R=[{property:"og:title",content:P},{property:"og:url",content:window.location.href},{property:"og:site_name",content:"Arternal"}];h.value&&((O=h.value)!=null&&O.description&&(R.push({property:"og:description",content:h.value.description}),R.push({name:"description",content:h.value.description})),h.value.imagePreviewUrl&&(R.push({property:"og:image",content:h.value.imagePreviewUrl}),R.push({property:"og:image:width",content:"800"}),R.push({property:"og:image:height",content:"800"}))),o.setFonts(((M=u==null?void 0:u.value)==null?void 0:M.getGalleryFonts)||[]),S(),n0({title:P,meta:R})});const g=te(()=>{const{alt_views:P}=h.value;return P?[h.value,...P]:[h.value]}),v=te(()=>{var R,O;return((R=e.ovr.settings.custom_fields)==null?void 0:R.length)?((O=h.value.custom_fields)==null?void 0:O.filter(M=>{const{label:E}=M.attributes;return e.ovr.settings.custom_fields.includes(E)&&M.value}))||[]:[]}),w=U(null);He(()=>{var P;return(P=n.params)==null?void 0:P.inventory_id},P=>{var R;c({ovr_id:Number(i),inventory_id:Number(P),slug:n.params.slug,organization_id:(R=e.ovr.organization)==null?void 0:R.id,fetchFonts:!o.fontsLoaded})});const b=te(()=>{const{layout:P,text:R}=e.ovr.settings,O={backgroundColor:(P==null?void 0:P.bg_color)||"#ffffff"};return R&&(O.color=R==null?void 0:R.color.body,O.fontFamily=`${R==null?void 0:R.font.body}, Inter, sans-serif`,O.fontSize=`${(R==null?void 0:R.size.body)||24}px`,O.fontWeight=R!=null&&R.bold&&(R!=null&&R.bold.body)?"bold":"400",O.fontStyle=R!=null&&R.italic&&(R!=null&&R.italic.body)?"italic":"normal"),O}),_=window.location.href;t({refetchInventory:()=>{var P;c({ovr_id:Number(i),inventory_id:Number(s),slug:n.params.slug,organization_id:(P=e.ovr.organization)==null?void 0:P.id,fetchFonts:!o.fontsLoaded})}});function S(P=!1){var M;const{text:R}=e.ovr.settings,O=["Inter"];R!=null&&R.font&&O.push(...Array.from(new Set(Object.values(R.font)))),(!o.fontsLoaded||P)&&(vI.load({google:{families:O},custom:{families:m.value,urls:[`https://api.arternal.com/fonts/${(M=e.ovr.organization)==null?void 0:M.id}/fonts.css`]}}),o.setFontLoadedStatus(!0))}return He(()=>{var P,R;return(R=(P=e.ovr.settings)==null?void 0:P.text)==null?void 0:R.font},(P,R)=>{Object.keys(P).filter(M=>{const E=M;return P[E]!==R[E]}).length&&S(!0)},{deep:!0}),(P,R)=>{var O,M,E,L,j,F,B,Y,Z,ne,oe;return k(),W(je,null,[A("div",wFe,[P.editable?fe("",!0):(k(),W("button",{key:0,type:"button",class:"btn btn-outline-success rounded-full p-2.5 bg-white/80 ring-offset-background transition-opacity focus:outline-none hover:bg-gray-100 hover:shadow-lg",onClick:R[0]||(R[0]=(...le)=>y(r).back&&y(r).back(...le))},[$(y(TU),{class:"w-6 h-6 text-gray-700 cursor-pointer"}),R[2]||(R[2]=A("span",{class:"sr-only"},"Close",-1))]))]),y(d)?(k(),W("div",UFe,[A("div",WFe,[A("div",qFe,[A("div",GFe,[A("div",KFe,[$(y(Gl),{viewBox:"0 0 250 250",class:"space-y-3"})])]),A("div",YFe,[$(y(Gl),{viewBox:"0 0 150 70",class:"space-y-3"},{default:H(()=>R[3]||(R[3]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"10",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"20",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"30",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"40",rx:"3",ry:"3",width:"120",height:"6"},null,-1)])),_:1})])])])])):(k(),W("div",{key:0,style:xn(b.value),class:Le(["overflow-auto p-4",{"mt-[73px]":P.editable}])},[A("div",_Fe,[A("div",SFe,[A("div",xFe,[h.value.imagePreviewUrl?(k(),W("div",EFe,[h.value.video_url?(k(),W("video",TFe,[A("source",{src:h.value.video_url},null,8,kFe)])):(k(),X(y(Cp),{key:1,"low-res-src":h.value.imagePreviewUrl,"high-res-src":h.value.largeImagePreviewUrl,class:"!max-h-fit overflow-hidden object-contain cursor-zoom-in","img-class":"max-h-[75vh]",onClick:R[1]||(R[1]=le=>a(h.value.id))},null,8,["low-res-src","high-res-src"]))])):fe("",!0)]),A("div",CFe,[A("div",OFe,[A("div",RFe,[h.value.formattedCaption?(k(),W("p",{key:0,innerHTML:h.value.formattedCaption},null,8,IFe)):fe("",!0),(M=(O=P.ovr.settings)==null?void 0:O.artwork)!=null&&M.showStatus?(k(),W("div",AFe,[((L=(E=P.ovr.settings)==null?void 0:E.artwork)==null?void 0:L.statusStyle)!=="text"?(k(),W("p",{key:0,class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(h.value.status)}`)},null,2)):fe("",!0),((F=(j=P.ovr.settings)==null?void 0:j.artwork)==null?void 0:F.statusStyle)!=="icon"?(k(),W("p",PFe,ye(h.value.status),1)):fe("",!0)])):fe("",!0),A("div",MFe,[h.value&&p.value?(k(),X(y(vy),{key:0,ovr:P.ovr,inventory:h.value},null,8,["ovr","inventory"])):fe("",!0),$(y(zq),{style:xn(`color: ${((Z=(Y=(B=P.ovr.settings)==null?void 0:B.text)==null?void 0:Y.color)==null?void 0:Z.body)||"#000000"};`),content:y(_)},null,8,["style","content"])])]),(oe=(ne=h.value)==null?void 0:ne.alt_views)!=null&&oe.length?(k(),W("div",DFe,[A("div",NFe,[(k(!0),W(je,null,Ot(h.value.alt_views,le=>(k(),W("div",{key:le.id,class:"flex cursor-pointer border border-slate-300 object-contain rounded-md w-[94px] h-[94px] overflow-hidden text-center justify-center",onClick:Ee=>a(le.id)},[le.video_url?(k(),W("video",FFe,[A("source",{src:le.video_url},null,8,BFe)])):(k(),W("img",{key:1,src:le.imagePreviewUrl,alt:"Thumbnail",class:"w-full h-full object-cover",loading:"lazy"},null,8,zFe))],8,LFe))),128))])])):fe("",!0),(k(!0),W(je,null,Ot(v.value,le=>{var Ee,xe,Me,Ve,Ue,me,_e,Te,Ie,Ae;return k(),W("div",{key:le.id},[A("label",{for:(Ee=le==null?void 0:le.attributes)==null?void 0:Ee.label,class:"block mb-2 font-semibold"},ye((xe=le==null?void 0:le.attributes)==null?void 0:xe.label),9,$Fe),((Me=le==null?void 0:le.attributes)==null?void 0:Me.type)==="Link"&&le.value?(k(),W("a",{key:0,id:(Ve=le.attributes)==null?void 0:Ve.label,href:le.value.toString(),class:"font-light text-sm leading-relaxed",target:"_blank"},ye((Ue=le==null?void 0:le.inventoryAttributes)==null?void 0:Ue.link),9,HFe)):((me=le==null?void 0:le.attributes)==null?void 0:me.type)==="Price"?(k(),W("p",{key:1,id:(_e=le.attributes)==null?void 0:_e.label,class:"font-light text-sm leading-relaxed"},ye(y(Ybe)(Number(le.value)*100,{currency:((Ie=(Te=le.inventoryAttributes)==null?void 0:Te.currency)==null?void 0:Ie.toString())||"USD"})),9,VFe)):(k(),W("p",{key:2,id:(Ae=le.attributes)==null?void 0:Ae.label,class:"font-light text-sm leading-relaxed"},ye(le.value),9,jFe))])}),128)),A("div",null,[$(y(ITe),{inventory:h.value,ovr:P.ovr},null,8,["inventory","ovr"])])])])])]),P.editable?fe("",!0):(k(),X(y(CW),{key:0,ovr:P.ovr,inventory:h.value},null,8,["ovr","inventory"]))],6)),A("div",XFe,[$(y(RR),{ref_key:"photoSwipeGallery",ref:w,id:"photoswipe-gallery",inventories:g.value},null,8,["inventories"])])],64)}}}),JFe=ee({__name:"ArtworkView",setup(e){const t=Ir(),{id:n,slug:r,inventory_id:i}=t.params,{offer_id:s}=t.query,o=yI(),a=()=>{document.visibilityState==="hidden"?o.track({event:"close",id:Number(n),uri:t.fullPath}):o.track({event:"open",id:Number(n),uri:t.fullPath})};nt(()=>{document.addEventListener("visibilitychange",a);const d=typeof s=="string"?parseInt(s):void 0;o.track({event:"open",id:Number(n),inventory_id:Number(i),uri:t.fullPath,offer_id:d})}),yr(()=>{document.removeEventListener("visibilitychange",a)}),Zm((d,f,h)=>{const{inventory_id:p}=f.params;o.track({event:"close",id:Number(n),inventory_id:Number(p),uri:f.fullPath}),h()}),He(()=>{var d;return(d=t.params)==null?void 0:d.inventory_id},(d,f)=>{o.track({event:"close",id:Number(n),inventory_id:Number(f),uri:`/${n}/${r}/art/${f}`}),o.track({event:"open",id:Number(n),inventory_id:Number(d),uri:`/${n}/${r}/art/${d}`})});const l=ln` query getOvr($id: Int!) { getOvrById(id: $id) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings created_at updated_at content inventory_set { id name public_url item_count description start end } organization { id name json_setting } } } `,u=U({}),{onResult:c}=Ro(l,{id:Number(n)});return c(d=>{var f;d!=null&&d.data&&(u.value=((f=d==null?void 0:d.data)==null?void 0:f.getOvrById)||{})}),(d,f)=>u.value.id?(k(),X(Wq,{key:0,ovr:u.value},null,8,["ovr"])):fe("",!0)}}),QFe={key:0,class:"flex items-stretch min-h-screen"},ZFe={id:"preview",class:"hidden sm:block w-3/4 lg:w-3/4 xl:w-full relative"},eBe=ee({__name:"EditArtworkView",setup(e){const{id:t}=Ir().params,n=U({}),r=U(!1),{toast:i}=$s(),{t:s}=ls(),o=U(),a=ln` query getOvr($id: Int!) { getOvrById(id: $id) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings created_at updated_at content inventory_set { id name public_url description start end } organization { id name json_setting } } } `,{onResult:l}=Ro(a,{id:Number(t)});l(b=>{var _;b!=null&&b.data&&(n.value=((_=b==null?void 0:b.data)==null?void 0:_.getOvrById)||{})});const u=ln` mutation updateOvr($id: Int!, $input: UpdateOvrDto!) { updateOvr(id: $id, input: $input) { id title type slug inventory_set_id contact_id enabled tracking_enabled settings content created_at updated_at } } `,{mutate:c,onDone:d,onError:f,loading:h}=mC(u);d(b=>{var _;b.data&&((_=b.data)!=null&&_.updateOvr)}),f(b=>{console.error(b),i({title:s("messages.errorPublishingOVR"),variant:"destructive"})});const p=async()=>{const{created_at:b,updated_at:_,slug:x,...S}=n.value;"inventory_set"in S&&(S==null||delete S.inventory_set),"organization"in S&&(S==null||delete S.organization),await c({input:S,...n.value.id&&{id:n.value.id}}),r.value=!1},m=async()=>{o.value?(await p(),await o.value.refetchInventory()):i({title:s("messages.errorSavingOvr")})},g=U(null),v=()=>{g.value&&(g.value.scrollTop=0)},w=b=>{r.value&&(b.preventDefault(),b.returnValue=!0)};return Zm(()=>{if(r.value&&!window.confirm(s("messages.unsavedChanges")))return!1}),window.addEventListener("beforeunload",w),yr(()=>window.removeEventListener("beforeunload",w)),(b,_)=>{var x;return(x=n.value)!=null&&x.id?(k(),W("main",QFe,[A("div",ZFe,[n.value.id?(k(),X(Wq,{key:0,ref_key:"previewRef",ref:o,ovr:n.value,editable:!0},null,8,["ovr"])):fe("",!0)]),A("div",{id:"editor",ref_key:"editorRef",ref:g,class:"w-full relative z-[1] sm:w-1/2 lg:w-1/3 xl:w-1/4 sm:max-w-[460px] border-l-2 sticky top-0 h-screen overflow-y-scroll overflow-visible"},[$(mI,{ovr:n.value,"onUpdate:ovr":[_[0]||(_[0]=S=>n.value=S),_[1]||(_[1]=S=>r.value=!0)],"is-submitting":y(h),onOnSave:p,onSaveAndRefetchOvr:m,onScrollToTop:v},null,8,["ovr","is-submitting"])],512)])):fe("",!0)}}}),tBe={class:"opacity-0 transition-opacity duration-100 animate-fade-in"},nBe={key:0,class:"space-y-3"},rBe={key:1,class:"space-y-3 flex flex-col gap-6"},iBe={key:0,class:"sm:h-[18rem] md:h-[20rem] lg:h-[24rem] flex flex-col justify-end"},sBe=["src","alt"],oBe={class:"space-y-3"},aBe=["innerHTML"],lBe={key:1,class:"mt-2 flex items-center gap-2"},uBe={class:"capitalize text-gray-500"},RF=ee({__name:"ArtistArtworkCard",props:{artist:{},inventory:{},loading:{type:Boolean},editable:{type:Boolean}},setup(e){const t=te(()=>({showStatus:!1}));return(n,r)=>{const i=En("RouterLink"),s=En("aos-vue");return k(),X(s,{animation:"fade-in",offset:-300,once:!0},{default:H(()=>[A("div",tBe,[n.loading?(k(),W("div",nBe,[$(y(Gl),{viewBox:"0 0 150 140",class:"space-y-2"},{default:H(()=>r[0]||(r[0]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"150",height:"150"},null,-1),A("rect",{x:"0",y:"85",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"98",rx:"3",ry:"3",width:"150",height:"8"},null,-1),A("rect",{x:"0",y:"110",rx:"3",ry:"3",width:"70",height:"15"},null,-1)])),_:1})])):n.inventory?(k(),W("div",rBe,[$(i,{to:{name:"ovr-view-artist-artwork",params:{id:n.artist.id,slug:y(r_)(n.artist.name,{lower:!0}),inventory_id:n.inventory.id}},class:"overflow-hidden rounded-sm"},{default:H(()=>{var o;return[n.inventory.imagePreviewUrl?(k(),W("div",iBe,[A("img",{src:(o=n.inventory)==null?void 0:o.imagePreviewUrl,alt:n.inventory.title,loading:"lazy",class:Le(["w-full sm:max-w-80 sm:max-h-[18rem] md:max-w-96 md:max-h-[24rem] object-contain transform hover:scale-105 transition duration-280 ease-in",{}])},null,8,sBe)])):fe("",!0)]}),_:1},8,["to"]),A("div",oBe,[n.inventory.formattedCaption?(k(),W("p",{key:0,innerHTML:n.inventory.formattedCaption},null,8,aBe)):fe("",!0),t.value.showStatus?(k(),W("div",lBe,[A("p",{class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(n.inventory.status)}`)},null,2),A("p",uBe,ye(n.inventory.status),1)])):fe("",!0)])])):fe("",!0)])]),_:1})}}}),cBe={class:"fixed top-0 w-full bg-white z-10 shadow shadow-800/20"},dBe={key:0,class:"container mx-auto h-16 py-5"},fBe=["src"],hBe={key:0,class:"container mx-auto space-y-10 xl:space-y-16 mb-5 mt-24 lg:mt-36"},pBe={class:"flex-col justify-center items-start inline-flex"},mBe={key:0,class:"text-[#111111] text-5xl font-semibold leading-normal capitalize",style:{fontFamily:"Albra Sans"}},gBe={key:1,class:"text-[#333333] text-lg font-medium font-['Inter'] leading-normal"},vBe={key:2,class:"text-[#333333] text-lg font-medium font-['Inter'] leading-normal"},yBe={key:0,class:"text-[#111111] text-sm font-normal font-['Open Sans'] leading-normal"},bBe={key:1,class:"w-full justify-start items-center gap-9 inline-flex"},wBe={class:"w-full flex items-center gap-9"},_Be={class:"flex-col justify-start items-start gap-16 inline-flex"},SBe={key:0,class:"grid grid-cols-1 lg:grid-cols-3 gap-16"},xBe={key:1,class:"grid grid-cols-1 lg:grid-cols-3 gap-16"},EBe={class:"container mt-10 md:mt-16 lg:mt-24 mx-auto py-5 border-t border-slate-300"},TBe={key:0,class:"mt-4 p-4"},kBe=["innerHTML"],CBe=ee({__name:"ArtistView",setup(e){vI.load({google:{families:["Albra Sans:500,600"]}});const t=ln` query artist($id: Int!, $organization_id: Int!) { getArtistById (id: $id) { id name birth_year death_year bio alias } getOrganizationById (id: $organization_id) { id name json_setting } getArtworksByArtistId (id: $id) { inventoryItems { id title price price_currency status type imagePreviewUrl formattedCaption } } } `,n=Ir(),{organization_id:r,id:i}=n.params,s=U("artworks"),{result:o,loading:a}=Ro(t,{id:Number(i),organization_id:Number(r)}),l=te(()=>{var v;return(v=o.value)==null?void 0:v.getArtistById}),u=te(()=>{var v;return(v=o.value)==null?void 0:v.getOrganizationById}),c=te(()=>{var v,w,b;return(b=(w=(v=u.value)==null?void 0:v.json_setting)==null?void 0:w.ovr_header_link)==null?void 0:b.default}),d=te(()=>{var v,w;return((w=(v=o.value)==null?void 0:v.getArtworksByArtistId)==null?void 0:w.inventoryItems.filter(b=>["inventory","edition","master edition"].includes(b.type)))||[]}),f=te(()=>{var v,w;return((w=(v=o.value)==null?void 0:v.getArtworksByArtistId)==null?void 0:w.inventoryItems.filter(b=>b.type==="doc"))||[]}),h=te(()=>{var b,_,x;const v=((b=u.value)==null?void 0:b.json_setting)&&((x=(_=u.value)==null?void 0:_.json_setting.ovr_header)==null?void 0:x.default);if(!v)return null;const w=RegExp(/src=["']([^"']+)["']/).exec(v);return w?w&&w[1].replaceAll("\\",""):v}),p=()=>{c.value&&window.open(c.value,"_blank")},m=te(()=>{var b,_;const v=(b=u==null?void 0:u.value)==null?void 0:b.json_setting,w=v&&((_=v.ovr_footer)==null?void 0:_.default);return w||null}),g=v=>({"font-semibold text-gray-800":s.value===v,"font-normal text-gray-500":s.value!==v});return(v,w)=>{var b;return k(),W(je,null,[A("div",cBe,[l.value?(k(),W("div",dBe,[h.value?(k(),W("img",{key:0,src:h.value,alt:"Organization Logo",class:Le(["h-full",{"cursor-pointer":c.value}]),onClick:p},null,10,fBe)):(k(),W("h1",{key:1,class:"font-normal text-2xl",onClick:p},ye(((b=u.value)==null?void 0:b.name)||"(no name)"),1))])):fe("",!0)]),l.value?(k(),W("section",hBe,[A("div",pBe,[l.value.name?(k(),W("div",mBe,ye(l.value.name),1)):fe("",!0),l.value.birth_year?(k(),W("div",gBe,"b. "+ye(l.value.birth_year),1)):fe("",!0),l.value.birth_year&&l.value.death_year?(k(),W("div",vBe,"b. "+ye(l.value.birth_year)+" - "+ye(l.value.death_year),1)):fe("",!0)]),l.value.bio?(k(),W("div",yBe,ye(l.value.bio),1)):fe("",!0),f.value.length?(k(),W("div",bBe,[A("div",wBe,[A("button",{type:"button",onClick:w[0]||(w[0]=_=>s.value="artworks"),class:Le(["text-base font-['Inter'] leading-normal",g("artworks")])}," Artworks ",2),A("button",{type:"button",onClick:w[1]||(w[1]=_=>s.value="docs"),class:Le(["text-base font-['Inter'] leading-normal",g("docs")])}," Documents ",2)])])):fe("",!0),A("div",_Be,[s.value==="artworks"?(k(),W("div",SBe,[(k(!0),W(je,null,Ot(d.value,_=>(k(),X(RF,{key:_.id,inventory:_,artist:l.value,loading:y(a)},null,8,["inventory","artist","loading"]))),128))])):fe("",!0),s.value==="docs"?(k(),W("div",xBe,[(k(!0),W(je,null,Ot(f.value,_=>(k(),X(RF,{key:_.id,inventory:_,artist:l.value,loading:y(a)},null,8,["inventory","artist","loading"]))),128))])):fe("",!0)]),A("footer",EBe,[m.value?(k(),W("div",TBe,[A("div",{class:"text-black",innerHTML:m.value},null,8,kBe)])):fe("",!0),w[2]||(w[2]=A("div",{class:"container py-8"},[A("a",{href:"https://arternal.com",target:"_blank",class:"cursor-pointer"},[A("div",{class:"text-sm text-gray-700 flex flex-row gap-1.5 items-center justify-center"},[A("div",null,"Powered by"),A("img",{src:gI,alt:"ARTERNAL"})])])],-1))])])):fe("",!0)],64)}}}),OBe={class:"flex flex-row fixed z-10 right-4 top-4 items-center gap-4"},RBe={key:0},IBe={class:"container mx-auto pt-16 md:pt-16 pb-24 md:pb-0"},ABe={class:"flex flex-col md:flex-row items-start justify-center md:h-[calc(100vh_-_100px)]"},PBe={class:"flex flex-1 justify-center md:mt-24"},MBe={key:0,class:"overflow-hidden flex justify-center"},DBe={class:"flex flex-1 w-full"},NBe={class:"mt-6 space-y-10 md:py-24 md:px-10 lg:px-16"},LBe={class:"space-y-6 !text-base"},FBe=["innerHTML"],BBe={key:1,class:"mt-2 flex items-center gap-2"},zBe={class:"capitalize"},$Be={class:"flex gap-4 items-center"},HBe={key:0},VBe={class:"flex flex-wrap gap-4 items-center py-5"},jBe=["onClick"],UBe=["src"],WBe=["for"],qBe=["id"],GBe={key:1,id:"art-loading"},KBe={class:"container mx-auto mt-16"},YBe={class:"flex flex-col md:flex-row space-x-10 justify-start md:items-center md:h-[calc(100vh_-_100px)]"},XBe={class:"flex-auto"},JBe={class:"overflow-hidden"},QBe={class:"w-full md:w-1/2 pt-16"},ZBe={class:"hidden"},eze=ee({__name:"ArtistArtworkView",props:{editable:{type:Boolean}},setup(e,{expose:t}){const n=Ir(),r=Aa(),{id:i,inventory_id:s,organization_id:o}=n.params,a=U(!0),l=U({id:Number(i)}),u=S=>{var I;(I=b.value)==null||I.openImage(S)},c=ln` query ($artist_id: Int!, $inventory_id: Int!, $organization_id: Int!) { getOrganizationById (id: $organization_id) { id name json_setting } getArtistArtworkById(id: $inventory_id, artist_id: $artist_id) { id title description status price price_currency artist year type formattedCaption imagePreviewUrl largeImagePreviewUrl alt_views { id imagePreviewUrl largeImagePreviewUrl } custom_fields previousInventoryId nextInventoryId currentItemIndex } } `,{result:d,refetch:f,loading:h,onResult:p}=Ro(c,{artist_id:Number(i),inventory_id:Number(s),organization_id:Number(o)}),m=te(()=>{var S;return((S=d==null?void 0:d.value)==null?void 0:S.getArtistArtworkById)||{}}),g=te(()=>{var S;return((S=d==null?void 0:d.value)==null?void 0:S.getArtistArtworkById)||{}});p(()=>{var P;const S=()=>{var O;const R=[];return R.push(m.value.artist?`${m.value.artist} |`:""),R.push(m.value.title),R.push(m.value.year?`(${m.value.year})`:""),R.push("|"),R.push((O=g.value)==null?void 0:O.name),R.filter(M=>M==null?void 0:M.length).join(" ")},I=[{property:"og:title",content:S},{property:"og:url",content:window.location.href},{property:"og:site_name",content:"Arternal"}];m.value&&((P=m.value)!=null&&P.description&&(I.push({property:"og:description",content:m.value.description}),I.push({name:"description",content:m.value.description})),m.value.imagePreviewUrl&&(I.push({property:"og:image",content:m.value.imagePreviewUrl}),I.push({property:"og:image:width",content:"800"}),I.push({property:"og:image:height",content:"800"}))),n0({title:S,meta:I})});const v=te(()=>{const{alt_views:S}=m.value;return S?[m.value,...S]:[m.value]}),w=te(()=>{var S;return((S=m.value.custom_fields)==null?void 0:S.filter(I=>{const{type:P}=I.attributes;return P.toLowerCase()==="text"&&I.value}))||[]}),b=U(null);He(()=>{var S;return(S=n.params)==null?void 0:S.inventory_id},S=>{f({artist_id:Number(i),inventory_id:Number(S),organization_id:Number(o)})});const _=window.location.href;return t({refetchInventory:()=>{f({artist_id:Number(i),inventory_id:Number(s),organization_id:Number(o)})}}),(S,I)=>{var P,R;return k(),W(je,null,[A("div",OBe,[S.editable?fe("",!0):(k(),W("button",{key:0,type:"button",class:"btn btn-outline-success rounded-full p-2.5 bg-white/80 ring-offset-background transition-opacity focus:outline-none hover:bg-gray-100 hover:shadow-lg",onClick:I[0]||(I[0]=(...O)=>y(r).back&&y(r).back(...O))},[$(y(TU),{class:"w-7 h-7 text-gray-700 cursor-pointer"}),I[2]||(I[2]=A("span",{class:"sr-only"},"Close",-1))]))]),y(h)?(k(),W("div",GBe,[A("div",KBe,[A("div",YBe,[A("div",XBe,[A("div",JBe,[$(y(Gl),{viewBox:"0 0 250 250",class:"space-y-3"})])]),A("div",QBe,[$(y(Gl),{viewBox:"0 0 150 70",class:"space-y-3"},{default:H(()=>I[3]||(I[3]=[A("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"10",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"20",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"30",rx:"3",ry:"3",width:"120",height:"6"},null,-1),A("rect",{x:"0",y:"40",rx:"3",ry:"3",width:"120",height:"6"},null,-1)])),_:1})])])])])):(k(),W("div",RBe,[A("div",IBe,[A("div",ABe,[A("div",PBe,[m.value.imagePreviewUrl?(k(),W("div",MBe,[$(y(Cp),{"low-res-src":m.value.imagePreviewUrl,"high-res-src":m.value.largeImagePreviewUrl,class:"!max-h-fit overflow-hidden object-contain cursor-zoom-in",onClick:I[1]||(I[1]=O=>u(m.value.id))},null,8,["low-res-src","high-res-src"])])):fe("",!0)]),A("div",DBe,[A("div",NBe,[A("div",LBe,[m.value.formattedCaption?(k(),W("p",{key:0,innerHTML:m.value.formattedCaption},null,8,FBe)):fe("",!0),a.value?(k(),W("div",BBe,[A("p",{class:Le(`mt-1 rounded-full w-3 h-3 ${y(qd)(m.value.status)}`)},null,2),A("p",zBe,ye(m.value.status),1)])):fe("",!0),A("div",$Be,[$(y(zq),{style:"color: #000000;",content:y(_)},null,8,["content"])])]),(R=(P=m.value)==null?void 0:P.alt_views)!=null&&R.length?(k(),W("div",HBe,[A("div",VBe,[(k(!0),W(je,null,Ot(m.value.alt_views,O=>(k(),W("div",{key:O.id,class:"flex cursor-pointer border border-slate-300 object-contain rounded-md w-[94px] h-[94px] overflow-hidden text-center justify-center",onClick:M=>u(O.id)},[A("img",{src:O.imagePreviewUrl,alt:"Thumbnail",class:"w-full h-full object-cover",loading:"lazy"},null,8,UBe)],8,jBe))),128))])])):fe("",!0),(k(!0),W(je,null,Ot(w.value,O=>{var M,E,L;return k(),W("div",{key:O.id},[A("label",{for:(M=O==null?void 0:O.attributes)==null?void 0:M.label,class:"block mb-2 font-semibold"},ye((E=O==null?void 0:O.attributes)==null?void 0:E.label),9,WBe),A("p",{id:(L=O.attributes)==null?void 0:L.label,class:"font-light text-sm leading-relaxed"},ye(O.value),9,qBe)])}),128))])])])]),S.editable?fe("",!0):(k(),X(y(CW),{key:0,ovr:l.value,inventory:m.value},null,8,["ovr","inventory"]))])),A("div",ZBe,[$(y(RR),{ref_key:"photoSwipeGallery",ref:b,id:"photoswipe-gallery",inventories:v.value},null,8,["inventories"])])],64)}}}),tze={class:"flex h-full flex-col justify-between"},nze={class:"mt-4"},rze={class:"container-fluid mx-auto px-5 py-10 lg:px-10"},ize=ee({__name:"AppLayout",setup(e){const t=Ir(),n=U("");return He(()=>t.params.id,r=>{typeof r=="string"&&(n.value=r)},{immediate:!0}),(r,i)=>{const s=En("router-view");return k(),W("div",null,[$(y($Ee),{"sidebar-class":"bg-white border-r-2 !border-gray-100"},{aside:H(()=>[A("div",tze,[A("nav",nze,[n.value?(k(),W(je,{key:1},[$(y(Kc),{to:{name:"lists-view",params:{id:n.value}},icon:y(fb)},{default:H(()=>[Ye(ye(r.$t("nav.allLinks")),1)]),_:1},8,["to","icon"]),$(y(Kc),{to:{name:"lists-view-active",params:{id:n.value},query:{enabled:"true"}},icon:y(aD)},{default:H(()=>[Ye(ye(r.$t("nav.activeLinks")),1)]),_:1},8,["to","icon"]),$(y(Kc),{to:{name:"lists-view-disabled",params:{id:n.value},query:{enabled:"false"}},icon:y(oD)},{default:H(()=>[Ye(ye(r.$t("nav.disabledLinks")),1)]),_:1},8,["to","icon"])],64)):(k(),W(je,{key:0},[$(y(Kc),{to:{name:"lists-index"},icon:y(fb)},{default:H(()=>[Ye(ye(r.$t("nav.allLinks")),1)]),_:1},8,["icon"]),$(y(Kc),{to:{name:"lists-index-active",query:{enabled:"true"}},icon:y(aD)},{default:H(()=>[Ye(ye(r.$t("nav.activeLinks")),1)]),_:1},8,["icon"]),$(y(Kc),{to:{name:"lists-index-disabled",query:{enabled:"false"}},icon:y(oD)},{default:H(()=>[Ye(ye(r.$t("nav.disabledLinks")),1)]),_:1},8,["icon"])],64))])])]),default:H(()=>[A("main",rze,[(k(),X(I9,null,{default:H(()=>[$(s,null,{default:H(({Component:o,route:a})=>[(k(),X(Rr(o),{key:a.path}))]),_:1})]),_:1}))])]),_:1})])}}}),sze=ee({__name:"404",setup(e){return(t,n)=>{const r=En("UseHead");return k(),W(je,null,[$(r,null,{default:H(()=>[A("title",null,ye(t.$t("pages.notFound.title")),1)]),_:1}),$(y(nEe),null,{header:H(()=>[A("h1",null,ye(t.$t("pages.notFound.title")),1)]),default:H(()=>[A("p",null,ye(t.$t("pages.notFound.message")),1)]),_:1})],64)}}}),Df=Kpe({history:xpe(),scrollBehavior(e,t,n){const r=sessionStorage.getItem(`${e.fullPath} scroll`),i=r?JSON.parse(r):n;return i?new Promise(s=>{vt(()=>{setTimeout(()=>{s(i)},1e3)})}):{top:0}},routes:[{path:"/ovr",children:[{path:"",component:ize,children:[{path:"",redirect:{name:"lists-index"},name:"home"},{path:"/callback",component:eDe,name:"callback"},{path:"lists",children:[{path:"",component:Jc,name:"lists-index"},{path:"active",component:Jc,name:"lists-index-active"},{path:"disabled",component:Jc,name:"lists-index-disabled"},{path:":id",component:Jc,name:"lists-view"},{path:":id/active",component:Jc,name:"lists-view-active"},{path:":id/disabled",component:Jc,name:"lists-view-disabled"}]}]},{path:"editor",children:[{path:":id(\\d+)",component:mFe,name:"ovr-edit"},{path:":id(\\d+)/:slug/art/:inventory_id(\\d+)",component:eBe,name:"ovr-artwork-edit"},{path:"create",component:FLe,name:"ovr-create"}]}]},{path:"/:id(\\d+)/:slug",component:bFe,name:"ovr-view"},{path:"/:id(\\d+)/:slug/art/:inventory_id(\\d+)",component:JFe,name:"ovr-view-artwork"},{path:"/artist/:organization_id(\\d+)/:id(\\d+)/:artist_slug",component:CBe,name:"ovr-view-artist"},{path:"/artist/:organization_id(\\d+)/:id(\\d+)/:artist_slug/art/:inventory_id(\\d+)",component:eze,name:"ovr-view-artist-artwork"},{path:"/:pathMatch(.*)*",component:sze,name:"404"}]}),Qx=j0();Df.beforeEach((e,t)=>{t.name&&(e.name==="lists-index-active"||e.name==="lists-view-active"?Qx.track("OVR tracking - link tracking view - view active links"):e.name==="lists-index-disabled"||e.name==="lists-view-disabled"?Qx.track("OVR tracking - link tracking view - view disabled links"):(e.name==="lists-index"||e.name==="lists-view")&&Qx.track("OVR tracking - link tracking view - view all links"))});Df.beforeEach((e,t)=>{t&&t.fullPath!==e.fullPath&&sessionStorage.setItem(`${t.fullPath} scroll`,JSON.stringify({top:window.scrollY,left:window.scrollX}))});const oze={install(e,{detectedClass:t="feat-hidden-scrollbar"}={}){const n=document.createElement("div");n.setAttribute("style","position: fixed; top: -100; left: 100; z-index: -1; width: 100px; height: 100px; overflow: scroll;"),document.body.appendChild(n),n.offsetWidth===n.clientWidth&&document.documentElement.classList.add(t),n.remove()}},aze=Symbol("toaster"),lze={variant:"secondary",position:"top-right",timeout:5e3,showTimeout:!0,showIcon:!0,icon:R0e,clickToClose:!0,closeButton:!0};function uze(e){const t=U([]),n={...lze,...e},r=(s,o={})=>{const a={...n,...o},l=Math.random().toString(36).substring(2);t.value.push({id:l,message:s,toaster:"default",options:a}),o.timeout!==0&&setTimeout(()=>i(l),a.timeout)},i=s=>{t.value=t.value.filter(o=>o.id!==s)};return{toasts:t,toast:r,remove:i,options:n}}const cze=()=>({install(e,t){e.provide(aze,uze(t))}});function dze(e={}){return{install:async()=>{var t,n,r,i;e.app_id&&window.location.href.includes("/ovr/")&&(await mi.checkSession(),mi.isAuthenticated.value&&(e.email=(t=mi.user.value)==null?void 0:t.email,e.name=(n=mi.user.value)==null?void 0:n.name,e.user_id=(i=(r=mi.user.value)==null?void 0:r["https://arternal.com/claims"])==null?void 0:i.user_id,window.intercomSettings=e),function(){const s=window,o=s.Intercom;if(typeof o=="function")o("reattach_activator"),o("update",s.intercomSettings);else{const a=document,l=function(...c){l.c(c)};l.q=[],l.c=function(c){l.q.push(c)},s.Intercom=l;const u=function(){const c=a.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://widget.intercom.io/widget/"+e.app_id;const d=a.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)};document.readyState==="complete"?u():s.attachEvent?s.attachEvent("onload",u):s.addEventListener("load",u,!1)}}())}}}function fze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function IF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IF(Object(n),!0).forEach(function(r){la(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bk(e){"@babel/helpers - typeof";return bk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bk(e)}function mg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yq(r.key),r)}}function gg(e,t,n){return t&&hze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function la(e,t,n){return t=Yq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wk(e,t)}function xr(e){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xr(e)}function wk(e,t){return wk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wk(e,t)}function pze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mze(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uu(e)}function Gq(e){var t=pze();return function(){var r=xr(e),i;if(t){var s=xr(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return mze(this,i)}}function gze(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=xr(e),e!==null););return e}function Jr(){return typeof Reflect<"u"&&Reflect.get?Jr=Reflect.get.bind():Jr=function(t,n,r){var i=gze(t,n);if(i){var s=Object.getOwnPropertyDescriptor(i,n);return s.get?s.get.call(arguments.length<3?t:r):s.value}},Jr.apply(this,arguments)}function AF(e,t){return bze(e)||fze(e,t)||Kq(e,t)||Sze()}function vze(e){return yze(e)||wze(e)||Kq(e)||_ze()}function yze(e){if(Array.isArray(e))return _k(e)}function bze(e){if(Array.isArray(e))return e}function wze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kq(e,t){if(e){if(typeof e=="string")return _k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _k(e,t)}}function _k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _ze(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xze(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Yq(e){var t=xze(e,"string");return typeof t=="symbol"?t:String(t)}function Xq(e,t,n){var r=n||{},i=r.noTrailing,s=i===void 0?!1:i,o=r.noLeading,a=o===void 0?!1:o,l=r.debounceMode,u=l===void 0?void 0:l,c,d=!1,f=0;function h(){c&&clearTimeout(c)}function p(g){var v=g||{},w=v.upcomingOnly,b=w===void 0?!1:w;h(),d=!b}function m(){for(var g=arguments.length,v=new Array(g),w=0;w<g;w++)v[w]=arguments[w];var b=this,_=Date.now()-f;if(d)return;function x(){f=Date.now(),t.apply(b,v)}function S(){c=void 0}!a&&u&&!c&&x(),h(),u===void 0&&_>e?a?(f=Date.now(),s||(c=setTimeout(u?S:x,e))):x():s!==!0&&(c=setTimeout(u?S:x,u===void 0?e-_:e))}return m.cancel=p,m}function Eze(e,t,n){var r=n||{},i=r.atBegin,s=i===void 0?!1:i;return Xq(e,t,{debounceMode:s!==!1})}var Jq=Object.freeze({__proto__:null,debounce:Eze,throttle:Xq});function Qq(e){return function(t,n){return e(n,t)}}var PF=Qq(Jq.throttle),MF=Qq(Jq.debounce),Sk=function(t,n){for(;typeof t=="function";)t=t.call(n);return t},xk=function(t,n){return Object.entries(t).filter(function(r){var i=AF(r,1),s=i[0];return!n.includes(s)}).reduce(function(r,i){var s=AF(i,2),o=s[0],a=s[1];return r[o]=a,r},{})},DF=function(t){t.graphQLErrors&&t.graphQLErrors.length&&(t.gqlError=t.graphQLErrors[0])},co=typeof window>"u",Tze={query:"_skipAllQueries",subscription:"_skipAllSubscriptions"},Zq=function(){function e(t,n,r){mg(this,e),la(this,"type",null),la(this,"vueApolloSpecialKeys",[]),this.vm=t,this.key=n,this.initialOptions=r,this.options=Object.assign({},r),this._skip=!1,this._pollInterval=null,this._watchers=[],this._destroyed=!1,this.lastApolloOptions=null}return gg(e,[{key:"autostart",value:function(){var n=this;typeof this.options.skip=="function"?this._skipWatcher=this.vm.$watch(function(){return n.options.skip.call(n.vm,n.vm,n.key)},this.skipChanged.bind(this),{immediate:!0,deep:this.options.deep}):!this.options.skip&&!this.allSkip?this.start():this._skip=!0,typeof this.options.pollInterval=="function"&&(this._pollWatcher=this.vm.$watch(this.options.pollInterval.bind(this.vm),this.pollIntervalChanged.bind(this),{immediate:!0}))}},{key:"pollIntervalChanged",value:function(n,r){n!==r&&(this.pollInterval=n,n==null?this.stopPolling():this.startPolling(n))}},{key:"skipChanged",value:function(n,r){n!==r&&(this.skip=n)}},{key:"pollInterval",get:function(){return this._pollInterval},set:function(n){this._pollInterval=n}},{key:"skip",get:function(){return this._skip},set:function(n){n||this.allSkip?this.stop():this.start(),this._skip=n}},{key:"allSkip",get:function(){return this.vm.$apollo[Tze[this.type]]}},{key:"refresh",value:function(){this._skip||(this.stop(),this.start())}},{key:"start",value:function(){var n=this;this.starting=!0;for(var r=function(){var l=s[i];if(typeof n.initialOptions[l]=="function"){var u=n.initialOptions[l].bind(n.vm);n.options[l]=u();var c=function(f){n._destroyed||(n.options[l]=f,n.refresh())};co||(c=n.options.throttle?PF(c,n.options.throttle):c,c=n.options.debounce?MF(c,n.options.debounce):c),n._watchers.push(n.vm.$watch(u,c,{deep:n.options.deep}))}},i=0,s=["query","document","context"];i<s.length;i++)r();if(typeof this.options.variables=="function"){var o=this.executeApollo.bind(this);co||(o=this.options.throttle?PF(o,this.options.throttle):o,o=this.options.debounce?MF(o,this.options.debounce):o),this._watchers.push(this.vm.$watch(function(){return typeof n.options.variables=="function"?n.options.variables.call(n.vm):n.options.variables},o,{immediate:!0,deep:this.options.deep}))}else this.executeApollo(this.options.variables)}},{key:"stop",value:function(){for(var n=0,r=this._watchers;n<r.length;n++){var i=r[n];i()}this.sub&&(this.sub.unsubscribe(),this.sub=null)}},{key:"generateApolloOptions",value:function(n){var r=xk(this.options,this.vueApolloSpecialKeys);return r.variables=n,this.lastApolloOptions=r,r}},{key:"executeApollo",value:function(n){this.starting=!1}},{key:"nextResult",value:function(n){var r=n.error;r&&DF(r)}},{key:"callHandlers",value:function(n){for(var r=!1,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];for(var a=0;a<n.length;a++){var l=n[a];if(l){r=!0;var u=l.apply(this.vm,s);if(typeof u<"u"&&!u)break}}return r}},{key:"errorHandler",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.callHandlers.apply(this,[[this.options.error,this.vm.$apollo.error,this.vm.$apollo.provider.errorHandler]].concat(r))}},{key:"catchError",value:function(n){DF(n);var r=this.errorHandler(n,this.vm,this.key,this.type,this.lastApolloOptions);if(!r)if(n.graphQLErrors&&n.graphQLErrors.length!==0){console.error("GraphQL execution errors for ".concat(this.type," '").concat(this.key,"'"));for(var i=0,s=n.graphQLErrors;i<s.length;i++){var o=s[i];console.error(o)}}else if(n.networkError)console.error("Error sending the ".concat(this.type," '").concat(this.key,"'"),n.networkError);else if(console.error("[vue-apollo] An error has occurred for ".concat(this.type," '").concat(this.key,"'")),Array.isArray(n)){var a;(a=console).error.apply(a,vze(n))}else console.error(n)}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.stop(),this._skipWatcher&&this._skipWatcher())}}]),e}(),kze=["variables","watch","update","result","error","loadingKey","watchLoading","skip","throttle","debounce","subscribeToMore","prefetch","manual"],Cze=function(e){qq(n,e);var t=Gq(n);function n(r,i,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return mg(this,n),r.$data.$apolloData&&!r.$data.$apolloData.queries[i]&&(r.$data.$apolloData.queries[i]={loading:!1}),o=t.call(this,r,i,s),la(Uu(o),"type","query"),la(Uu(o),"vueApolloSpecialKeys",kze),la(Uu(o),"_loading",!1),la(Uu(o),"_linkedSubscriptions",[]),co&&(o.firstRun=new Promise(function(l,u){o._firstRunResolve=l,o._firstRunReject=u})),co&&(o.options.fetchPolicy="network-only"),s.manual||(o.hasDataField=Object.prototype.hasOwnProperty.call(o.vm.$data,i),o.hasDataField?Object.defineProperty(o.vm.$data.$apolloData.data,i,{get:function(){return o.vm.$data[i]},enumerable:!0,configurable:!0}):Object.defineProperty(o.vm.$data,i,{get:function(){return o.vm.$data.$apolloData.data[i]},enumerable:!0,configurable:!0})),a&&o.autostart(),o}return gg(n,[{key:"client",get:function(){return this.vm.$apollo.getClient(this.options)}},{key:"loading",get:function(){return this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]?this.vm.$data.$apolloData.queries[this.key].loading:this._loading},set:function(i){this._loading!==i&&(this._loading=i,this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]&&(this.vm.$data.$apolloData.queries[this.key].loading=i,this.vm.$data.$apolloData.loading+=i?1:-1))}},{key:"stop",value:function(){Jr(xr(n.prototype),"stop",this).call(this),this.loadingDone(),this.observer&&(this.observer.stopPolling(),this.observer=null)}},{key:"generateApolloOptions",value:function(i){var s=Jr(xr(n.prototype),"generateApolloOptions",this).call(this,i);return this.vm.$isServer&&delete s.pollInterval,s}},{key:"executeApollo",value:function(i){if(!this._destroyed){var s=JSON.stringify(i);if(this.sub){if(s===this.previousVariablesJson)return;this.sub.unsubscribe();for(var o=0,a=this._linkedSubscriptions;o<a.length;o++){var l=a[o];l.stop()}}if(this.previousVariablesJson=s,this.observer=this.vm.$apollo.watchQuery(this.generateApolloOptions(i)),this.startQuerySubscription(),this.options.fetchPolicy!=="no-cache"||this.options.notifyOnNetworkStatusChange){var u=this.retrieveCurrentResult();(this.options.notifyOnNetworkStatusChange||this.observer.getCurrentResult&&!u.loading)&&this.nextResult(u)}Jr(xr(n.prototype),"executeApollo",this).call(this,i);for(var c=0,d=this._linkedSubscriptions;c<d.length;c++){var f=d[c];f.start()}}}},{key:"startQuerySubscription",value:function(){this.sub&&!this.sub.closed||(this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)}))}},{key:"retrieveCurrentResult",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult();return(i||s.loading)&&(this.loading||this.applyLoadingModifier(1),this.loading=!0),s}},{key:"nextResult",value:function(i){Jr(xr(n.prototype),"nextResult",this).call(this,i);var s=i.data,o=i.loading,a=i.error,l=i.errors,u=l&&l.length;if((a||u)&&this.firstRunReject(a),o||this.loadingDone(),!a&&u){var c=new Error("GraphQL error: ".concat(l.map(function(f){return f.message}).join(" | ")));Object.assign(c,{graphQLErrors:l,networkError:null}),Jr(xr(n.prototype),"catchError",this).call(this,c)}if(!(this.observer.options.errorPolicy==="none"&&(a||u))){var d=typeof this.options.result=="function";s==null||(this.options.manual?d||console.error("".concat(this.key," query must have a 'result' hook in manual mode")):typeof this.options.update=="function"?this.setData(this.options.update.call(this.vm,s)):typeof s[this.key]>"u"&&Object.keys(s).length?console.error("Missing ".concat(this.key," attribute on result"),s):this.setData(s[this.key])),d&&this.options.result.call(this.vm,i,this.key)}}},{key:"setData",value:function(i){var s=this.hasDataField?this.vm.$data:this.vm.$data.$apolloData.data;s[this.key]=i}},{key:"catchError",value:function(i){Jr(xr(n.prototype),"catchError",this).call(this,i),this.firstRunReject(i),this.loadingDone(i),this.nextResult(this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult()),this.resubscribeToQuery()}},{key:"resubscribeToQuery",value:function(){var i=this.observer.getLastError(),s=this.observer.getLastResult();this.observer.resetLastResults(),this.startQuerySubscription(),Object.assign(this.observer,{lastError:i,lastResult:s})}},{key:"loadingKey",get:function(){return this.options.loadingKey||this.vm.$apollo.loadingKey}},{key:"watchLoading",value:function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return this.callHandlers.apply(this,[[this.options.watchLoading,this.vm.$apollo.watchLoading,this.vm.$apollo.provider.watchLoading]].concat(s,[this]))}},{key:"applyLoadingModifier",value:function(i){var s=this.loadingKey;s&&typeof this.vm[s]=="number"&&(this.vm[s]+=i),this.watchLoading(i===1,i)}},{key:"loadingDone",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.loading&&this.applyLoadingModifier(-1),this.loading=!1,i||this.firstRunResolve()}},{key:"fetchMore",value:function(){var i=this;if(this.observer){var s;return this.retrieveCurrentResult(!0),(s=this.observer).fetchMore.apply(s,arguments).then(function(o){return o.loading||i.loadingDone(),o})}}},{key:"subscribeToMore",value:function(){if(this.observer){var i;return{unsubscribe:(i=this.observer).subscribeToMore.apply(i,arguments)}}}},{key:"refetch",value:function(i){var s=this;if(i&&(this.options.variables=i),this.observer){var o=this.observer.refetch(i).then(function(a){return a.loading||s.loadingDone(),a});return this.retrieveCurrentResult(),o}}},{key:"setVariables",value:function(i,s){if(this.options.variables=i,this.observer){var o=this.observer.setVariables(i,s);return this.retrieveCurrentResult(),o}}},{key:"setOptions",value:function(i){if(Object.assign(this.options,i),this.observer){var s=this.observer.setOptions(i);return this.retrieveCurrentResult(),s}}},{key:"startPolling",value:function(){if(this.observer){var i;return(i=this.observer).startPolling.apply(i,arguments)}}},{key:"stopPolling",value:function(){if(this.observer){var i;return(i=this.observer).stopPolling.apply(i,arguments)}}},{key:"firstRunResolve",value:function(){this._firstRunResolve&&(this._firstRunResolve(),this._firstRunResolve=null)}},{key:"firstRunReject",value:function(i){this._firstRunReject&&(this._firstRunReject(i),this._firstRunReject=null)}},{key:"destroy",value:function(){Jr(xr(n.prototype),"destroy",this).call(this),this.loading&&this.watchLoading(!1,-1),this.loading=!1}}]),n}(Zq),Oze=5,Rze=500,Ize=function(e){qq(n,e);var t=Gq(n);function n(r,i,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return mg(this,n),o=t.call(this,r,i,s),la(Uu(o),"type","subscription"),la(Uu(o),"vueApolloSpecialKeys",["variables","result","error","throttle","debounce","linkedQuery"]),o.attempts=0,a&&o.autostart(),o}return gg(n,[{key:"generateApolloOptions",value:function(i){var s=Jr(xr(n.prototype),"generateApolloOptions",this).call(this,i);return s.onError=this.catchError.bind(this),s}},{key:"executeApollo",value:function(i){if(!this._destroyed){var s=JSON.stringify(i);if(this.sub){if(s===this.previousVariablesJson)return;this.sub.unsubscribe()}this.previousVariablesJson=s;var o=this.generateApolloOptions(i);if(typeof o.updateQuery=="function"&&(o.updateQuery=o.updateQuery.bind(this.vm)),this.options.linkedQuery){if(typeof this.options.result=="function"){var a=this.options.result.bind(this.vm),l=o.updateQuery&&o.updateQuery.bind(this.vm);o.updateQuery=function(){return a.apply(void 0,arguments),l&&l.apply(void 0,arguments)}}this.sub=this.options.linkedQuery.subscribeToMore(o)}else this.observer=this.vm.$apollo.subscribe(o),this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)});Jr(xr(n.prototype),"executeApollo",this).call(this,i)}}},{key:"nextResult",value:function(i){Jr(xr(n.prototype),"nextResult",this).call(this,i),this.attempts=0,typeof this.options.result=="function"&&this.options.result.call(this.vm,i,this.key)}},{key:"catchError",value:function(i){Jr(xr(n.prototype),"catchError",this).call(this,i),!(this.skip||this.attempts>=Oze)&&(this.stop(),this.retryTimeout=setTimeout(this.start.bind(this),Math.pow(2,this.attempts)*Rze),this.attempts++)}},{key:"stop",value:function(){Jr(xr(n.prototype),"stop",this).call(this),clearTimeout(this.retryTimeout)}}]),n}(Zq),Aze=function(){function e(t,n){mg(this,e),this._apolloSubscriptions=[],this._watchers=[],this.vm=t,this.provider=n,this.queries={},this.subscriptions={},this.client=void 0,this.loadingKey=void 0,this.error=void 0}return gg(e,[{key:"getClient",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!n||!n.client){if(bk(this.client)==="object")return this.client;if(this.client)if(this.provider.clients){var r=this.provider.clients[this.client];if(!r)throw new Error("[vue-apollo] Missing client '".concat(this.client,"' in 'apolloProvider'"));return r}else throw new Error("[vue-apollo] Missing 'clients' options in 'apolloProvider'");return this.provider.defaultClient}var i=this.provider.clients[n.client];if(!i)throw new Error("[vue-apollo] Missing client '".concat(n.client,"' in 'apolloProvider'"));return i}},{key:"query",value:function(n){return this.getClient(n).query(n)}},{key:"watchQuery",value:function(n){var r=this,i=this.getClient(n).watchQuery(n),s=i.subscribe.bind(i);return i.subscribe=function(o){var a=s(o);return r._apolloSubscriptions.push(a),a},i}},{key:"mutate",value:function(n){return this.getClient(n).mutate(n)}},{key:"subscribe",value:function(n){var r=this;if(!co){var i=this.getClient(n).subscribe(n),s=i.subscribe.bind(i);return i.subscribe=function(o){var a=s(o);return r._apolloSubscriptions.push(a),a},i}}},{key:"loading",get:function(){return this.vm.$data.$apolloData.loading!==0}},{key:"data",get:function(){return this.vm.$data.$apolloData.data}},{key:"addSmartQuery",value:function(n,r){var i=this,s=Sk(r,this.vm);if(!s.query){var o=s;s={query:o}}var a=this.vm.$options.apollo,l=this.provider.defaultOptions,u;if(l&&l.$query&&(u=l.$query),a&&a.$query&&(u=Zc(Zc({},u||{}),a.$query)),u)for(var c in u)typeof s[c]>"u"&&(s[c]=u[c]);var d=this.queries[n]=new Cze(this.vm,n,s,!1);if((!co||s.prefetch!==!1)&&d.autostart(),!co){var f=s.subscribeToMore;f&&(Array.isArray(f)?f.forEach(function(h,p){i.addSmartSubscription("".concat(n).concat(p),Zc(Zc({},h),{},{linkedQuery:d}))}):this.addSmartSubscription(n,Zc(Zc({},f),{},{linkedQuery:d})))}return d}},{key:"addSmartSubscription",value:function(n,r){if(!co){r=Sk(r,this.vm);var i=this.subscriptions[n]=new Ize(this.vm,n,r,!1);if(i.autostart(),r.linkedQuery){var s=r.linkedQuery._linkedSubscriptions.findIndex(function(o){return o.key===n});s!==-1?r.linkedQuery._linkedSubscriptions[s]=i:r.linkedQuery._linkedSubscriptions.push(i)}return i}}},{key:"defineReactiveSetter",value:function(n,r,i){var s=this;this._watchers.push(this.vm.$watch(r,function(o){s[n]=o},{immediate:!0,deep:i}))}},{key:"skipAllQueries",set:function(n){this._skipAllQueries=n;for(var r in this.queries)this.queries[r].skip=n}},{key:"skipAllSubscriptions",set:function(n){this._skipAllSubscriptions=n;for(var r in this.subscriptions)this.subscriptions[r].skip=n}},{key:"skipAll",set:function(n){this.skipAllQueries=n,this.skipAllSubscriptions=n}},{key:"destroy",value:function(){for(var n=0,r=this._watchers;n<r.length;n++){var i=r[n];i()}for(var s in this.queries)this.queries[s].destroy();for(var o in this.subscriptions)this.subscriptions[o].destroy();this._apolloSubscriptions.forEach(function(a){a.unsubscribe()}),this._apolloSubscriptions=null,this.vm=null}}]),e}();function Zx(e,t){return typeof e<"u"&&Object.prototype.hasOwnProperty.call(e,t)}function Pze(){var e=this,t=this.$apolloProvider;if(!(this._apolloLaunched||!t)){this._apolloLaunched=!0;var n=this.$options.apollo;if(n){this.$_apolloPromises=[],n.$init||(n.$init=!0,t.defaultOptions&&(n=this.$options.apollo=Object.assign({},t.defaultOptions,n))),Su(this.$apollo,"skipAll",n.$skipAll,n.$deep),Su(this.$apollo,"skipAllQueries",n.$skipAllQueries,n.$deep),Su(this.$apollo,"skipAllSubscriptions",n.$skipAllSubscriptions,n.$deep),Su(this.$apollo,"client",n.$client,n.$deep),Su(this.$apollo,"loadingKey",n.$loadingKey,n.$deep),Su(this.$apollo,"error",n.$error,n.$deep),Su(this.$apollo,"watchLoading",n.$watchLoading,n.$deep),Object.defineProperty(this,"$apolloData",{get:function(){return e.$data.$apolloData},enumerable:!0,configurable:!0});for(var r in n)if(r.charAt(0)!=="$"){var i=n[r],s=this.$apollo.addSmartQuery(r,i);co&&(i=Sk(i,this),t.prefetch!==!1&&i.prefetch!==!1&&n.$prefetch!==!1&&!s.skip&&this.$_apolloPromises.push(s.firstRun))}if(n.subscribe&&console.warn("vue-apollo -> `subscribe` option is deprecated. Use the `$subscribe` option instead."),n.$subscribe)for(var o in n.$subscribe)this.$apollo.addSmartSubscription(o,n.$subscribe[o])}}}function Su(e,t,n,r){typeof n<"u"&&(typeof n=="function"?e.defineReactiveSetter(t,n,r):e[t]=n)}function Av(){this.$apollo&&(this.$apollo.destroy(),this.$apollo=null)}function Mze(e,t){e.mixin({data:function(){var r={$apolloData:{queries:{},loading:0,data:{}}},i=this.$options.apollo;if(i){for(var s in i)if(s.charAt(0)!=="$"){var o=i[s];!o.manual&&!Zx(this.$options.props,s)&&!Zx(this.$options.computed,s)&&!Zx(this.$options.methods,s)&&(r[s]=null)}}return r},beforeCreate:function(){var r=this;if(this.$apollo=new Aze(this,t),co){var i=this.$options.ssrRender;if(!i||i.__IS_VUE_APOLLO_WRAPPED)return;this.$options.ssrRender=function(s){var o=i.call(r,s);return Av.call(r),o},this.$options.ssrRender.__IS_VUE_APOLLO_WRAPPED=!0}},serverPrefetch:function(){var r=this;if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises).then(function(){var i={vm:r,provider:r.$apollo.provider,loading:!1,queries:{},subscriptions:{}};Av.call(r),r.$apollo=i}).catch(function(i){return Av.call(r),Promise.reject(i)})},created:Pze,unmounted:Av})}var Pv=["$subscribe"],Dze=function(){function e(t){if(mg(this,e),!t)throw new Error("Options argument required");this.clients=t.clients||{},t.defaultClient&&(this.clients.defaultClient=this.defaultClient=t.defaultClient),this.defaultOptions=t.defaultOptions,this.watchLoading=t.watchLoading,this.errorHandler=t.errorHandler,this.prefetch=t.prefetch}return gg(e,[{key:"install",value:function(n){n.config.optionMergeStrategies.apollo=function(r,i,s){if(!r)return i;if(!i)return r;for(var o=Object.assign({},xk(r,Pv),r.data),a=Object.assign({},xk(i,Pv),i.data),l={},u=0;u<Pv.length;u++){var c=Pv[u];l[c]=NF(r[c],i[c])}return Object.assign(l,NF(o,a))},n.config.globalProperties.$apolloProvider=this,Mze(n,this)}}]),e}();function NF(e,t){return e?Object.assign(Object.assign(Object.create(null),e),t):t}function Nze(e){return new Dze(e)}const e8=new Vf(async(e,t)=>{const n=await hU(),r={"x-arternal-service":"ovr"};return n&&(r.authorization=`Bearer ${n}`),e.setContext({headers:r}),t(e)}),Lze=new aC({uri:"https://api.arternal.com/graphql"}),Fze=new aC({uri:void 0}),Ow=new pC({name:"ovr-web",connectToDevTools:!1,cache:new hC({addTypename:!1}),link:e8.concat(Lze),defaultOptions:{watchQuery:{fetchPolicy:"no-cache"},query:{fetchPolicy:"no-cache"}}});new pC({connectToDevTools:!1,cache:new hC({addTypename:!1}),link:e8.concat(Fze)});Nze({defaultClient:Ow});var Bze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Hze=$ze(function(e,t){(function(n,r){e.exports=r()})(Bze,function(){return function(n){function r(s){if(i[s])return i[s].exports;var o=i[s]={exports:{},id:s,loaded:!1};return n[s].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var i={};return r.m=n,r.c=i,r.p="dist/",r(0)}([function(n,r,i){function s(j){return j&&j.__esModule?j:{default:j}}var o=Object.assign||function(j){for(var F=1;F<arguments.length;F++){var B=arguments[F];for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(j[Y]=B[Y])}return j},a=i(1),l=(s(a),i(6)),u=s(l),c=i(7),d=s(c),f=i(8),h=s(f),p=i(9),m=s(p),g=i(10),v=s(g),w=i(11),b=s(w),_=i(14),x=s(_),S=[],I=!1,P={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},R=function(){var j=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(j&&(I=!0),I)return S=(0,b.default)(S,P),(0,v.default)(S,P.once),S},O=function(){S=(0,x.default)(),R()},M=function(){S.forEach(function(j,F){j.node.removeAttribute("data-aos"),j.node.removeAttribute("data-aos-easing"),j.node.removeAttribute("data-aos-duration"),j.node.removeAttribute("data-aos-delay")})},E=function(j){return j===!0||j==="mobile"&&m.default.mobile()||j==="phone"&&m.default.phone()||j==="tablet"&&m.default.tablet()||typeof j=="function"&&j()===!0},L=function(j){P=o(P,j),S=(0,x.default)();var F=document.all&&!window.atob;return E(P.disable)||F?M():(P.disableMutationObserver||h.default.isSupported()||(console.info(` aos: MutationObserver is not supported on this browser, code mutations observing has been disabled. You may have to call "refreshHard()" by yourself. `),P.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",P.easing),document.querySelector("body").setAttribute("data-aos-duration",P.duration),document.querySelector("body").setAttribute("data-aos-delay",P.delay),P.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?R(!0):P.startEvent==="load"?window.addEventListener(P.startEvent,function(){R(!0)}):document.addEventListener(P.startEvent,function(){R(!0)}),window.addEventListener("resize",(0,d.default)(R,P.debounceDelay,!0)),window.addEventListener("orientationchange",(0,d.default)(R,P.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,v.default)(S,P.once)},P.throttleDelay)),P.disableMutationObserver||h.default.ready("[data-aos]",O),S)};n.exports={init:L,refresh:R,refreshHard:O}},function(n,r){},,,,,function(n,r){(function(i){function s(E,L,j){function F(ae){var we=Me,be=Ve;return Me=Ve=void 0,Ie=ae,me=E.apply(be,we)}function B(ae){return Ie=ae,_e=setTimeout(ne,L),Ae?F(ae):me}function Y(ae){var we=ae-Te,be=ae-Ie,T=L-we;return Q?O(T,Ue-be):T}function Z(ae){var we=ae-Te,be=ae-Ie;return Te===void 0||we>=L||we<0||Q&&be>=Ue}function ne(){var ae=M();return Z(ae)?oe(ae):void(_e=setTimeout(ne,Y(ae)))}function oe(ae){return _e=void 0,J&&Me?F(ae):(Me=Ve=void 0,me)}function le(){_e!==void 0&&clearTimeout(_e),Ie=0,Me=Te=Ve=_e=void 0}function Ee(){return _e===void 0?me:oe(M())}function xe(){var ae=M(),we=Z(ae);if(Me=arguments,Ve=this,Te=ae,we){if(_e===void 0)return B(Te);if(Q)return _e=setTimeout(ne,L),F(Te)}return _e===void 0&&(_e=setTimeout(ne,L)),me}var Me,Ve,Ue,me,_e,Te,Ie=0,Ae=!1,Q=!1,J=!0;if(typeof E!="function")throw new TypeError(f);return L=c(L)||0,a(j)&&(Ae=!!j.leading,Q="maxWait"in j,Ue=Q?R(c(j.maxWait)||0,L):Ue,J="trailing"in j?!!j.trailing:J),xe.cancel=le,xe.flush=Ee,xe}function o(E,L,j){var F=!0,B=!0;if(typeof E!="function")throw new TypeError(f);return a(j)&&(F="leading"in j?!!j.leading:F,B="trailing"in j?!!j.trailing:B),s(E,L,{leading:F,maxWait:L,trailing:B})}function a(E){var L=typeof E>"u"?"undefined":d(E);return!!E&&(L=="object"||L=="function")}function l(E){return!!E&&(typeof E>"u"?"undefined":d(E))=="object"}function u(E){return(typeof E>"u"?"undefined":d(E))=="symbol"||l(E)&&P.call(E)==p}function c(E){if(typeof E=="number")return E;if(u(E))return h;if(a(E)){var L=typeof E.valueOf=="function"?E.valueOf():E;E=a(L)?L+"":L}if(typeof E!="string")return E===0?E:+E;E=E.replace(m,"");var j=v.test(E);return j||w.test(E)?b(E.slice(2),j?2:8):g.test(E)?h:+E}var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},f="Expected a function",h=NaN,p="[object Symbol]",m=/^\s+|\s+$/g,g=/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,w=/^0o[0-7]+$/i,b=parseInt,_=(typeof i>"u"?"undefined":d(i))=="object"&&i&&i.Object===Object&&i,x=(typeof self>"u"?"undefined":d(self))=="object"&&self&&self.Object===Object&&self,S=_||x||Function("return this")(),I=Object.prototype,P=I.toString,R=Math.max,O=Math.min,M=function(){return S.Date.now()};n.exports=o}).call(r,function(){return this}())},function(n,r){(function(i){function s(M,E,L){function j(J){var ae=xe,we=Me;return xe=Me=void 0,Te=J,Ue=M.apply(we,ae)}function F(J){return Te=J,me=setTimeout(Z,E),Ie?j(J):Ue}function B(J){var ae=J-_e,we=J-Te,be=E-ae;return Ae?R(be,Ve-we):be}function Y(J){var ae=J-_e,we=J-Te;return _e===void 0||ae>=E||ae<0||Ae&&we>=Ve}function Z(){var J=O();return Y(J)?ne(J):void(me=setTimeout(Z,B(J)))}function ne(J){return me=void 0,Q&&xe?j(J):(xe=Me=void 0,Ue)}function oe(){me!==void 0&&clearTimeout(me),Te=0,xe=_e=Me=me=void 0}function le(){return me===void 0?Ue:ne(O())}function Ee(){var J=O(),ae=Y(J);if(xe=arguments,Me=this,_e=J,ae){if(me===void 0)return F(_e);if(Ae)return me=setTimeout(Z,E),j(_e)}return me===void 0&&(me=setTimeout(Z,E)),Ue}var xe,Me,Ve,Ue,me,_e,Te=0,Ie=!1,Ae=!1,Q=!0;if(typeof M!="function")throw new TypeError(d);return E=u(E)||0,o(L)&&(Ie=!!L.leading,Ae="maxWait"in L,Ve=Ae?P(u(L.maxWait)||0,E):Ve,Q="trailing"in L?!!L.trailing:Q),Ee.cancel=oe,Ee.flush=le,Ee}function o(M){var E=typeof M>"u"?"undefined":c(M);return!!M&&(E=="object"||E=="function")}function a(M){return!!M&&(typeof M>"u"?"undefined":c(M))=="object"}function l(M){return(typeof M>"u"?"undefined":c(M))=="symbol"||a(M)&&I.call(M)==h}function u(M){if(typeof M=="number")return M;if(l(M))return f;if(o(M)){var E=typeof M.valueOf=="function"?M.valueOf():M;M=o(E)?E+"":E}if(typeof M!="string")return M===0?M:+M;M=M.replace(p,"");var L=g.test(M);return L||v.test(M)?w(M.slice(2),L?2:8):m.test(M)?f:+M}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},d="Expected a function",f=NaN,h="[object Symbol]",p=/^\s+|\s+$/g,m=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,w=parseInt,b=(typeof i>"u"?"undefined":c(i))=="object"&&i&&i.Object===Object&&i,_=(typeof self>"u"?"undefined":c(self))=="object"&&self&&self.Object===Object&&self,x=b||_||Function("return this")(),S=Object.prototype,I=S.toString,P=Math.max,R=Math.min,O=function(){return x.Date.now()};n.exports=s}).call(r,function(){return this}())},function(n,r){function i(c){var d=void 0,f=void 0;for(d=0;d<c.length;d+=1)if(f=c[d],f.dataset&&f.dataset.aos||f.children&&i(f.children))return!0;return!1}function s(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function o(){return!!s()}function a(c,d){var f=window.document,h=s(),p=new h(l);u=d,p.observe(f.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function l(c){c&&c.forEach(function(d){var f=Array.prototype.slice.call(d.addedNodes),h=Array.prototype.slice.call(d.removedNodes),p=f.concat(h);if(i(p))return u()})}Object.defineProperty(r,"__esModule",{value:!0});var u=function(){};r.default={isSupported:o,ready:a}},function(n,r){function i(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}function s(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function f(h,p){for(var m=0;m<p.length;m++){var g=p[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}return function(h,p,m){return p&&f(h.prototype,p),m&&f(h,m),h}}(),a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,l=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,d=function(){function f(){i(this,f)}return o(f,[{key:"phone",value:function(){var h=s();return!(!a.test(h)&&!l.test(h.substr(0,4)))}},{key:"mobile",value:function(){var h=s();return!(!u.test(h)&&!c.test(h.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),f}();r.default=new d},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var i=function(o,a,l){var u=o.node.getAttribute("data-aos-once");a>o.position?o.node.classList.add("aos-animate"):typeof u<"u"&&(u==="false"||!l&&u!=="true")&&o.node.classList.remove("aos-animate")},s=function(o,a){var l=window.pageYOffset,u=window.innerHeight;o.forEach(function(c,d){i(c,u+l,a)})};r.default=s},function(n,r,i){function s(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),a=s(o),l=function(u,c){return u.forEach(function(d,f){d.node.classList.add("aos-init"),d.position=(0,a.default)(d.node,c.offset)}),u};r.default=l},function(n,r,i){function s(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(r,"__esModule",{value:!0});var o=i(13),a=s(o),l=function(u,c){var d=0,f=0,h=window.innerHeight,p={offset:u.getAttribute("data-aos-offset"),anchor:u.getAttribute("data-aos-anchor"),anchorPlacement:u.getAttribute("data-aos-anchor-placement")};switch(p.offset&&!isNaN(p.offset)&&(f=parseInt(p.offset)),p.anchor&&document.querySelectorAll(p.anchor)&&(u=document.querySelectorAll(p.anchor)[0]),d=(0,a.default)(u).top,p.anchorPlacement){case"top-bottom":break;case"center-bottom":d+=u.offsetHeight/2;break;case"bottom-bottom":d+=u.offsetHeight;break;case"top-center":d+=h/2;break;case"bottom-center":d+=h/2+u.offsetHeight;break;case"center-center":d+=h/2+u.offsetHeight/2;break;case"top-top":d+=h;break;case"bottom-top":d+=u.offsetHeight+h;break;case"center-top":d+=u.offsetHeight/2+h}return p.anchorPlacement||p.offset||isNaN(c)||(f=c),d+f};r.default=l},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var i=function(s){for(var o=0,a=0;s&&!isNaN(s.offsetLeft)&&!isNaN(s.offsetTop);)o+=s.offsetLeft-(s.tagName!="BODY"?s.scrollLeft:0),a+=s.offsetTop-(s.tagName!="BODY"?s.scrollTop:0),s=s.offsetParent;return{top:a,left:o}};r.default=i},function(n,r){Object.defineProperty(r,"__esModule",{value:!0});var i=function(s){return s=s||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(s,function(o){return{node:o}})};r.default=i}])})}),LF=zze(Hze);function Vze(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var jze='[data-aos][data-aos][data-aos-duration="50"],body[data-aos-duration="50"] [data-aos]{transition-duration:50ms}[data-aos][data-aos][data-aos-delay="50"],body[data-aos-delay="50"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="50"].aos-animate,body[data-aos-delay="50"] [data-aos].aos-animate{transition-delay:50ms}[data-aos][data-aos][data-aos-duration="100"],body[data-aos-duration="100"] [data-aos]{transition-duration:.1s}[data-aos][data-aos][data-aos-delay="100"],body[data-aos-delay="100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="100"].aos-animate,body[data-aos-delay="100"] [data-aos].aos-animate{transition-delay:.1s}[data-aos][data-aos][data-aos-duration="150"],body[data-aos-duration="150"] [data-aos]{transition-duration:.15s}[data-aos][data-aos][data-aos-delay="150"],body[data-aos-delay="150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="150"].aos-animate,body[data-aos-delay="150"] [data-aos].aos-animate{transition-delay:.15s}[data-aos][data-aos][data-aos-duration="200"],body[data-aos-duration="200"] [data-aos]{transition-duration:.2s}[data-aos][data-aos][data-aos-delay="200"],body[data-aos-delay="200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="200"].aos-animate,body[data-aos-delay="200"] [data-aos].aos-animate{transition-delay:.2s}[data-aos][data-aos][data-aos-duration="250"],body[data-aos-duration="250"] [data-aos]{transition-duration:.25s}[data-aos][data-aos][data-aos-delay="250"],body[data-aos-delay="250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="250"].aos-animate,body[data-aos-delay="250"] [data-aos].aos-animate{transition-delay:.25s}[data-aos][data-aos][data-aos-duration="300"],body[data-aos-duration="300"] [data-aos]{transition-duration:.3s}[data-aos][data-aos][data-aos-delay="300"],body[data-aos-delay="300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="300"].aos-animate,body[data-aos-delay="300"] [data-aos].aos-animate{transition-delay:.3s}[data-aos][data-aos][data-aos-duration="350"],body[data-aos-duration="350"] [data-aos]{transition-duration:.35s}[data-aos][data-aos][data-aos-delay="350"],body[data-aos-delay="350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="350"].aos-animate,body[data-aos-delay="350"] [data-aos].aos-animate{transition-delay:.35s}[data-aos][data-aos][data-aos-duration="400"],body[data-aos-duration="400"] [data-aos]{transition-duration:.4s}[data-aos][data-aos][data-aos-delay="400"],body[data-aos-delay="400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="400"].aos-animate,body[data-aos-delay="400"] [data-aos].aos-animate{transition-delay:.4s}[data-aos][data-aos][data-aos-duration="450"],body[data-aos-duration="450"] [data-aos]{transition-duration:.45s}[data-aos][data-aos][data-aos-delay="450"],body[data-aos-delay="450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="450"].aos-animate,body[data-aos-delay="450"] [data-aos].aos-animate{transition-delay:.45s}[data-aos][data-aos][data-aos-duration="500"],body[data-aos-duration="500"] [data-aos]{transition-duration:.5s}[data-aos][data-aos][data-aos-delay="500"],body[data-aos-delay="500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="500"].aos-animate,body[data-aos-delay="500"] [data-aos].aos-animate{transition-delay:.5s}[data-aos][data-aos][data-aos-duration="550"],body[data-aos-duration="550"] [data-aos]{transition-duration:.55s}[data-aos][data-aos][data-aos-delay="550"],body[data-aos-delay="550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="550"].aos-animate,body[data-aos-delay="550"] [data-aos].aos-animate{transition-delay:.55s}[data-aos][data-aos][data-aos-duration="600"],body[data-aos-duration="600"] [data-aos]{transition-duration:.6s}[data-aos][data-aos][data-aos-delay="600"],body[data-aos-delay="600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="600"].aos-animate,body[data-aos-delay="600"] [data-aos].aos-animate{transition-delay:.6s}[data-aos][data-aos][data-aos-duration="650"],body[data-aos-duration="650"] [data-aos]{transition-duration:.65s}[data-aos][data-aos][data-aos-delay="650"],body[data-aos-delay="650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="650"].aos-animate,body[data-aos-delay="650"] [data-aos].aos-animate{transition-delay:.65s}[data-aos][data-aos][data-aos-duration="700"],body[data-aos-duration="700"] [data-aos]{transition-duration:.7s}[data-aos][data-aos][data-aos-delay="700"],body[data-aos-delay="700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="700"].aos-animate,body[data-aos-delay="700"] [data-aos].aos-animate{transition-delay:.7s}[data-aos][data-aos][data-aos-duration="750"],body[data-aos-duration="750"] [data-aos]{transition-duration:.75s}[data-aos][data-aos][data-aos-delay="750"],body[data-aos-delay="750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="750"].aos-animate,body[data-aos-delay="750"] [data-aos].aos-animate{transition-delay:.75s}[data-aos][data-aos][data-aos-duration="800"],body[data-aos-duration="800"] [data-aos]{transition-duration:.8s}[data-aos][data-aos][data-aos-delay="800"],body[data-aos-delay="800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="800"].aos-animate,body[data-aos-delay="800"] [data-aos].aos-animate{transition-delay:.8s}[data-aos][data-aos][data-aos-duration="850"],body[data-aos-duration="850"] [data-aos]{transition-duration:.85s}[data-aos][data-aos][data-aos-delay="850"],body[data-aos-delay="850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="850"].aos-animate,body[data-aos-delay="850"] [data-aos].aos-animate{transition-delay:.85s}[data-aos][data-aos][data-aos-duration="900"],body[data-aos-duration="900"] [data-aos]{transition-duration:.9s}[data-aos][data-aos][data-aos-delay="900"],body[data-aos-delay="900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="900"].aos-animate,body[data-aos-delay="900"] [data-aos].aos-animate{transition-delay:.9s}[data-aos][data-aos][data-aos-duration="950"],body[data-aos-duration="950"] [data-aos]{transition-duration:.95s}[data-aos][data-aos][data-aos-delay="950"],body[data-aos-delay="950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="950"].aos-animate,body[data-aos-delay="950"] [data-aos].aos-animate{transition-delay:.95s}[data-aos][data-aos][data-aos-duration="1000"],body[data-aos-duration="1000"] [data-aos]{transition-duration:1s}[data-aos][data-aos][data-aos-delay="1000"],body[data-aos-delay="1000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1000"].aos-animate,body[data-aos-delay="1000"] [data-aos].aos-animate{transition-delay:1s}[data-aos][data-aos][data-aos-duration="1050"],body[data-aos-duration="1050"] [data-aos]{transition-duration:1.05s}[data-aos][data-aos][data-aos-delay="1050"],body[data-aos-delay="1050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1050"].aos-animate,body[data-aos-delay="1050"] [data-aos].aos-animate{transition-delay:1.05s}[data-aos][data-aos][data-aos-duration="1100"],body[data-aos-duration="1100"] [data-aos]{transition-duration:1.1s}[data-aos][data-aos][data-aos-delay="1100"],body[data-aos-delay="1100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1100"].aos-animate,body[data-aos-delay="1100"] [data-aos].aos-animate{transition-delay:1.1s}[data-aos][data-aos][data-aos-duration="1150"],body[data-aos-duration="1150"] [data-aos]{transition-duration:1.15s}[data-aos][data-aos][data-aos-delay="1150"],body[data-aos-delay="1150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1150"].aos-animate,body[data-aos-delay="1150"] [data-aos].aos-animate{transition-delay:1.15s}[data-aos][data-aos][data-aos-duration="1200"],body[data-aos-duration="1200"] [data-aos]{transition-duration:1.2s}[data-aos][data-aos][data-aos-delay="1200"],body[data-aos-delay="1200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1200"].aos-animate,body[data-aos-delay="1200"] [data-aos].aos-animate{transition-delay:1.2s}[data-aos][data-aos][data-aos-duration="1250"],body[data-aos-duration="1250"] [data-aos]{transition-duration:1.25s}[data-aos][data-aos][data-aos-delay="1250"],body[data-aos-delay="1250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1250"].aos-animate,body[data-aos-delay="1250"] [data-aos].aos-animate{transition-delay:1.25s}[data-aos][data-aos][data-aos-duration="1300"],body[data-aos-duration="1300"] [data-aos]{transition-duration:1.3s}[data-aos][data-aos][data-aos-delay="1300"],body[data-aos-delay="1300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1300"].aos-animate,body[data-aos-delay="1300"] [data-aos].aos-animate{transition-delay:1.3s}[data-aos][data-aos][data-aos-duration="1350"],body[data-aos-duration="1350"] [data-aos]{transition-duration:1.35s}[data-aos][data-aos][data-aos-delay="1350"],body[data-aos-delay="1350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1350"].aos-animate,body[data-aos-delay="1350"] [data-aos].aos-animate{transition-delay:1.35s}[data-aos][data-aos][data-aos-duration="1400"],body[data-aos-duration="1400"] [data-aos]{transition-duration:1.4s}[data-aos][data-aos][data-aos-delay="1400"],body[data-aos-delay="1400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1400"].aos-animate,body[data-aos-delay="1400"] [data-aos].aos-animate{transition-delay:1.4s}[data-aos][data-aos][data-aos-duration="1450"],body[data-aos-duration="1450"] [data-aos]{transition-duration:1.45s}[data-aos][data-aos][data-aos-delay="1450"],body[data-aos-delay="1450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1450"].aos-animate,body[data-aos-delay="1450"] [data-aos].aos-animate{transition-delay:1.45s}[data-aos][data-aos][data-aos-duration="1500"],body[data-aos-duration="1500"] [data-aos]{transition-duration:1.5s}[data-aos][data-aos][data-aos-delay="1500"],body[data-aos-delay="1500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1500"].aos-animate,body[data-aos-delay="1500"] [data-aos].aos-animate{transition-delay:1.5s}[data-aos][data-aos][data-aos-duration="1550"],body[data-aos-duration="1550"] [data-aos]{transition-duration:1.55s}[data-aos][data-aos][data-aos-delay="1550"],body[data-aos-delay="1550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1550"].aos-animate,body[data-aos-delay="1550"] [data-aos].aos-animate{transition-delay:1.55s}[data-aos][data-aos][data-aos-duration="1600"],body[data-aos-duration="1600"] [data-aos]{transition-duration:1.6s}[data-aos][data-aos][data-aos-delay="1600"],body[data-aos-delay="1600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1600"].aos-animate,body[data-aos-delay="1600"] [data-aos].aos-animate{transition-delay:1.6s}[data-aos][data-aos][data-aos-duration="1650"],body[data-aos-duration="1650"] [data-aos]{transition-duration:1.65s}[data-aos][data-aos][data-aos-delay="1650"],body[data-aos-delay="1650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1650"].aos-animate,body[data-aos-delay="1650"] [data-aos].aos-animate{transition-delay:1.65s}[data-aos][data-aos][data-aos-duration="1700"],body[data-aos-duration="1700"] [data-aos]{transition-duration:1.7s}[data-aos][data-aos][data-aos-delay="1700"],body[data-aos-delay="1700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1700"].aos-animate,body[data-aos-delay="1700"] [data-aos].aos-animate{transition-delay:1.7s}[data-aos][data-aos][data-aos-duration="1750"],body[data-aos-duration="1750"] [data-aos]{transition-duration:1.75s}[data-aos][data-aos][data-aos-delay="1750"],body[data-aos-delay="1750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1750"].aos-animate,body[data-aos-delay="1750"] [data-aos].aos-animate{transition-delay:1.75s}[data-aos][data-aos][data-aos-duration="1800"],body[data-aos-duration="1800"] [data-aos]{transition-duration:1.8s}[data-aos][data-aos][data-aos-delay="1800"],body[data-aos-delay="1800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1800"].aos-animate,body[data-aos-delay="1800"] [data-aos].aos-animate{transition-delay:1.8s}[data-aos][data-aos][data-aos-duration="1850"],body[data-aos-duration="1850"] [data-aos]{transition-duration:1.85s}[data-aos][data-aos][data-aos-delay="1850"],body[data-aos-delay="1850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1850"].aos-animate,body[data-aos-delay="1850"] [data-aos].aos-animate{transition-delay:1.85s}[data-aos][data-aos][data-aos-duration="1900"],body[data-aos-duration="1900"] [data-aos]{transition-duration:1.9s}[data-aos][data-aos][data-aos-delay="1900"],body[data-aos-delay="1900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1900"].aos-animate,body[data-aos-delay="1900"] [data-aos].aos-animate{transition-delay:1.9s}[data-aos][data-aos][data-aos-duration="1950"],body[data-aos-duration="1950"] [data-aos]{transition-duration:1.95s}[data-aos][data-aos][data-aos-delay="1950"],body[data-aos-delay="1950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1950"].aos-animate,body[data-aos-delay="1950"] [data-aos].aos-animate{transition-delay:1.95s}[data-aos][data-aos][data-aos-duration="2000"],body[data-aos-duration="2000"] [data-aos]{transition-duration:2s}[data-aos][data-aos][data-aos-delay="2000"],body[data-aos-delay="2000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2000"].aos-animate,body[data-aos-delay="2000"] [data-aos].aos-animate{transition-delay:2s}[data-aos][data-aos][data-aos-duration="2050"],body[data-aos-duration="2050"] [data-aos]{transition-duration:2.05s}[data-aos][data-aos][data-aos-delay="2050"],body[data-aos-delay="2050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2050"].aos-animate,body[data-aos-delay="2050"] [data-aos].aos-animate{transition-delay:2.05s}[data-aos][data-aos][data-aos-duration="2100"],body[data-aos-duration="2100"] [data-aos]{transition-duration:2.1s}[data-aos][data-aos][data-aos-delay="2100"],body[data-aos-delay="2100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2100"].aos-animate,body[data-aos-delay="2100"] [data-aos].aos-animate{transition-delay:2.1s}[data-aos][data-aos][data-aos-duration="2150"],body[data-aos-duration="2150"] [data-aos]{transition-duration:2.15s}[data-aos][data-aos][data-aos-delay="2150"],body[data-aos-delay="2150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2150"].aos-animate,body[data-aos-delay="2150"] [data-aos].aos-animate{transition-delay:2.15s}[data-aos][data-aos][data-aos-duration="2200"],body[data-aos-duration="2200"] [data-aos]{transition-duration:2.2s}[data-aos][data-aos][data-aos-delay="2200"],body[data-aos-delay="2200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2200"].aos-animate,body[data-aos-delay="2200"] [data-aos].aos-animate{transition-delay:2.2s}[data-aos][data-aos][data-aos-duration="2250"],body[data-aos-duration="2250"] [data-aos]{transition-duration:2.25s}[data-aos][data-aos][data-aos-delay="2250"],body[data-aos-delay="2250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2250"].aos-animate,body[data-aos-delay="2250"] [data-aos].aos-animate{transition-delay:2.25s}[data-aos][data-aos][data-aos-duration="2300"],body[data-aos-duration="2300"] [data-aos]{transition-duration:2.3s}[data-aos][data-aos][data-aos-delay="2300"],body[data-aos-delay="2300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2300"].aos-animate,body[data-aos-delay="2300"] [data-aos].aos-animate{transition-delay:2.3s}[data-aos][data-aos][data-aos-duration="2350"],body[data-aos-duration="2350"] [data-aos]{transition-duration:2.35s}[data-aos][data-aos][data-aos-delay="2350"],body[data-aos-delay="2350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2350"].aos-animate,body[data-aos-delay="2350"] [data-aos].aos-animate{transition-delay:2.35s}[data-aos][data-aos][data-aos-duration="2400"],body[data-aos-duration="2400"] [data-aos]{transition-duration:2.4s}[data-aos][data-aos][data-aos-delay="2400"],body[data-aos-delay="2400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2400"].aos-animate,body[data-aos-delay="2400"] [data-aos].aos-animate{transition-delay:2.4s}[data-aos][data-aos][data-aos-duration="2450"],body[data-aos-duration="2450"] [data-aos]{transition-duration:2.45s}[data-aos][data-aos][data-aos-delay="2450"],body[data-aos-delay="2450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2450"].aos-animate,body[data-aos-delay="2450"] [data-aos].aos-animate{transition-delay:2.45s}[data-aos][data-aos][data-aos-duration="2500"],body[data-aos-duration="2500"] [data-aos]{transition-duration:2.5s}[data-aos][data-aos][data-aos-delay="2500"],body[data-aos-delay="2500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2500"].aos-animate,body[data-aos-delay="2500"] [data-aos].aos-animate{transition-delay:2.5s}[data-aos][data-aos][data-aos-duration="2550"],body[data-aos-duration="2550"] [data-aos]{transition-duration:2.55s}[data-aos][data-aos][data-aos-delay="2550"],body[data-aos-delay="2550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2550"].aos-animate,body[data-aos-delay="2550"] [data-aos].aos-animate{transition-delay:2.55s}[data-aos][data-aos][data-aos-duration="2600"],body[data-aos-duration="2600"] [data-aos]{transition-duration:2.6s}[data-aos][data-aos][data-aos-delay="2600"],body[data-aos-delay="2600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2600"].aos-animate,body[data-aos-delay="2600"] [data-aos].aos-animate{transition-delay:2.6s}[data-aos][data-aos][data-aos-duration="2650"],body[data-aos-duration="2650"] [data-aos]{transition-duration:2.65s}[data-aos][data-aos][data-aos-delay="2650"],body[data-aos-delay="2650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2650"].aos-animate,body[data-aos-delay="2650"] [data-aos].aos-animate{transition-delay:2.65s}[data-aos][data-aos][data-aos-duration="2700"],body[data-aos-duration="2700"] [data-aos]{transition-duration:2.7s}[data-aos][data-aos][data-aos-delay="2700"],body[data-aos-delay="2700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2700"].aos-animate,body[data-aos-delay="2700"] [data-aos].aos-animate{transition-delay:2.7s}[data-aos][data-aos][data-aos-duration="2750"],body[data-aos-duration="2750"] [data-aos]{transition-duration:2.75s}[data-aos][data-aos][data-aos-delay="2750"],body[data-aos-delay="2750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2750"].aos-animate,body[data-aos-delay="2750"] [data-aos].aos-animate{transition-delay:2.75s}[data-aos][data-aos][data-aos-duration="2800"],body[data-aos-duration="2800"] [data-aos]{transition-duration:2.8s}[data-aos][data-aos][data-aos-delay="2800"],body[data-aos-delay="2800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2800"].aos-animate,body[data-aos-delay="2800"] [data-aos].aos-animate{transition-delay:2.8s}[data-aos][data-aos][data-aos-duration="2850"],body[data-aos-duration="2850"] [data-aos]{transition-duration:2.85s}[data-aos][data-aos][data-aos-delay="2850"],body[data-aos-delay="2850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2850"].aos-animate,body[data-aos-delay="2850"] [data-aos].aos-animate{transition-delay:2.85s}[data-aos][data-aos][data-aos-duration="2900"],body[data-aos-duration="2900"] [data-aos]{transition-duration:2.9s}[data-aos][data-aos][data-aos-delay="2900"],body[data-aos-delay="2900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2900"].aos-animate,body[data-aos-delay="2900"] [data-aos].aos-animate{transition-delay:2.9s}[data-aos][data-aos][data-aos-duration="2950"],body[data-aos-duration="2950"] [data-aos]{transition-duration:2.95s}[data-aos][data-aos][data-aos-delay="2950"],body[data-aos-delay="2950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2950"].aos-animate,body[data-aos-delay="2950"] [data-aos].aos-animate{transition-delay:2.95s}[data-aos][data-aos][data-aos-duration="3000"],body[data-aos-duration="3000"] [data-aos]{transition-duration:3s}[data-aos][data-aos][data-aos-delay="3000"],body[data-aos-delay="3000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="3000"].aos-animate,body[data-aos-delay="3000"] [data-aos].aos-animate{transition-delay:3s}[data-aos][data-aos][data-aos-easing=linear],body[data-aos-easing=linear] [data-aos]{transition-timing-function:cubic-bezier(.25,.25,.75,.75)}[data-aos][data-aos][data-aos-easing=ease],body[data-aos-easing=ease] [data-aos]{transition-timing-function:ease}[data-aos][data-aos][data-aos-easing=ease-in],body[data-aos-easing=ease-in] [data-aos]{transition-timing-function:ease-in}[data-aos][data-aos][data-aos-easing=ease-out],body[data-aos-easing=ease-out] [data-aos]{transition-timing-function:ease-out}[data-aos][data-aos][data-aos-easing=ease-in-out],body[data-aos-easing=ease-in-out] [data-aos]{transition-timing-function:ease-in-out}[data-aos][data-aos][data-aos-easing=ease-in-back],body[data-aos-easing=ease-in-back] [data-aos]{transition-timing-function:cubic-bezier(.6,-.28,.735,.045)}[data-aos][data-aos][data-aos-easing=ease-out-back],body[data-aos-easing=ease-out-back] [data-aos]{transition-timing-function:cubic-bezier(.175,.885,.32,1.275)}[data-aos][data-aos][data-aos-easing=ease-in-out-back],body[data-aos-easing=ease-in-out-back] [data-aos]{transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}[data-aos][data-aos][data-aos-easing=ease-in-sine],body[data-aos-easing=ease-in-sine] [data-aos]{transition-timing-function:cubic-bezier(.47,0,.745,.715)}[data-aos][data-aos][data-aos-easing=ease-out-sine],body[data-aos-easing=ease-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.39,.575,.565,1)}[data-aos][data-aos][data-aos-easing=ease-in-out-sine],body[data-aos-easing=ease-in-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.445,.05,.55,.95)}[data-aos][data-aos][data-aos-easing=ease-in-quad],body[data-aos-easing=ease-in-quad] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quad],body[data-aos-easing=ease-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quad],body[data-aos-easing=ease-in-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-cubic],body[data-aos-easing=ease-in-cubic] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-cubic],body[data-aos-easing=ease-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-cubic],body[data-aos-easing=ease-in-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-quart],body[data-aos-easing=ease-in-quart] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quart],body[data-aos-easing=ease-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quart],body[data-aos-easing=ease-in-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos^=fade][data-aos^=fade]{opacity:0;transition-property:opacity,transform}[data-aos^=fade][data-aos^=fade].aos-animate{opacity:1;transform:translateZ(0)}[data-aos=fade-up]{transform:translate3d(0,100px,0)}[data-aos=fade-down]{transform:translate3d(0,-100px,0)}[data-aos=fade-right]{transform:translate3d(-100px,0,0)}[data-aos=fade-left]{transform:translate3d(100px,0,0)}[data-aos=fade-up-right]{transform:translate3d(-100px,100px,0)}[data-aos=fade-up-left]{transform:translate3d(100px,100px,0)}[data-aos=fade-down-right]{transform:translate3d(-100px,-100px,0)}[data-aos=fade-down-left]{transform:translate3d(100px,-100px,0)}[data-aos^=zoom][data-aos^=zoom]{opacity:0;transition-property:opacity,transform}[data-aos^=zoom][data-aos^=zoom].aos-animate{opacity:1;transform:translateZ(0) scale(1)}[data-aos=zoom-in]{transform:scale(.6)}[data-aos=zoom-in-up]{transform:translate3d(0,100px,0) scale(.6)}[data-aos=zoom-in-down]{transform:translate3d(0,-100px,0) scale(.6)}[data-aos=zoom-in-right]{transform:translate3d(-100px,0,0) scale(.6)}[data-aos=zoom-in-left]{transform:translate3d(100px,0,0) scale(.6)}[data-aos=zoom-out]{transform:scale(1.2)}[data-aos=zoom-out-up]{transform:translate3d(0,100px,0) scale(1.2)}[data-aos=zoom-out-down]{transform:translate3d(0,-100px,0) scale(1.2)}[data-aos=zoom-out-right]{transform:translate3d(-100px,0,0) scale(1.2)}[data-aos=zoom-out-left]{transform:translate3d(100px,0,0) scale(1.2)}[data-aos^=slide][data-aos^=slide]{transition-property:transform}[data-aos^=slide][data-aos^=slide].aos-animate{transform:translateZ(0)}[data-aos=slide-up]{transform:translate3d(0,100%,0)}[data-aos=slide-down]{transform:translate3d(0,-100%,0)}[data-aos=slide-right]{transform:translate3d(-100%,0,0)}[data-aos=slide-left]{transform:translate3d(100%,0,0)}[data-aos^=flip][data-aos^=flip]{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition-property:transform}[data-aos=flip-left]{transform:perspective(2500px) rotateY(-100deg)}[data-aos=flip-left].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-right]{transform:perspective(2500px) rotateY(100deg)}[data-aos=flip-right].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-up]{transform:perspective(2500px) rotateX(-100deg)}[data-aos=flip-up].aos-animate{transform:perspective(2500px) rotateX(0)}[data-aos=flip-down]{transform:perspective(2500px) rotateX(100deg)}[data-aos=flip-down].aos-animate{transform:perspective(2500px) rotateX(0)}';Vze(jze);var t8=ee({name:"AosVue",mounted(){LF.init(),LF.refresh()},props:{animation:{type:String,required:!0},offset:{type:Number,required:!1,default:0},duration:{type:Number,required:!1,default:400},easing:{type:String,required:!1,default:"ease-in-out"},delay:{type:Number,required:!1,default:0},anchor:{type:String,required:!1,default:null},placement:{type:String,required:!1,default:"top-center"},once:{type:Boolean,required:!1,default:!1}}});function Uze(e,t,n,r,i,s){return k(),X("div",{"data-aos":e.animation,"data-aos-duration":e.duration,"data-aos-easing":e.easing,"data-aos-once":e.once,"data-aos-offset":e.offset,"data-aos-delay":e.delay,"data-aos-anchor":e.anchor,"data-aos-anchor-placement":e.placement},[ce(e.$slots,"default")],8,["data-aos","data-aos-duration","data-aos-easing","data-aos-once","data-aos-offset","data-aos-delay","data-aos-anchor","data-aos-anchor-placement"])}t8.render=Uze;var Wze=(()=>{const e=t8;return e.install=t=>{t.component("AosVue",e)},e})();const qze="SSPA"in window,Gze=!!("NO_TRACK"in window&&window.NO_TRACK);YY({default:Ow,auth:mi});const FF=e=>{if(e.use(Df),e.use(L0),e.use(nX()),e.use(Wze),e.use(rJ({})),e.use(oze),e.use(cze(),{variant:"primary"}),!Gze){e.use(mi),e.use(hve({token:"2cad545503eecd68753dc83fb215cb02",config:{debug:!1,disable:!1}})),e.use(dze({app_id:"pecxj1ed",vertical_padding:20}));try{Uoe({app:e,dsn:"https://73e3e70af9656118ee267143a42115cf@o1298277.ingest.us.sentry.io/4508848320872449",integrations:[Goe({router:Df}),moe()],tracesSampleRate:.2,tracePropagationTargets:["localhost","api.arternal.com",/^\//],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1})}catch(t){console.log("Sentry error",t)}}e.component("UseHead",oJ),e.component("PageHeader",C1e)};let Mv;qze?Mv=dX({createApp:aA,appOptions:{name:"@arternal/ovr",setup(){Yn(H1,{default:Ow,auth:mi})},render(){return We(fD,{name:"@arternal/ovr"})}},handleInstance:FF}):(Mv=aA({name:"@arternal/ovr",setup(){Yn(H1,{default:Ow,auth:mi})},render:()=>We(fD)}),FF(Mv),Mv.mount("#app"))});export default Kze();