@photonhealth/elements 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";const hr={};function h$(e){hr.context=e}const p$=(e,t)=>e===t,$r=Symbol("solid-proxy"),_u=Symbol("solid-track"),gs={equals:p$};let Rg=zg;const Vr=1,bs=2,Fg={owned:null,cleanups:null,context:null,owner:null};var it=null;let Cn=null,Ge=null,yt=null,Ar=null,th=0;function $a(e,t){const r=Ge,n=it,i=e.length===0,o=i?Fg:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},a=i?e:()=>e(()=>V(()=>Dl(o)));it=o,Ge=null;try{return Ti(a,!0)}finally{Ge=r,it=n}}function F(e,t){t=t?Object.assign({},gs,t):gs;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),jg(r,i));return[Mg.bind(r),n]}function m$(e,t,r){const n=Al(e,t,!0,Vr);Pi(n)}function W(e,t,r){const n=Al(e,t,!1,Vr);Pi(n)}function me(e,t,r){Rg=_$;const n=Al(e,t,!1,Vr);n.user=!0,Ar?Ar.push(n):Pi(n)}function pe(e,t,r){r=r?Object.assign({},gs,r):gs;const n=Al(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Pi(n),Mg.bind(n)}function v$(e){return Ti(e,!1)}function V(e){if(Ge===null)return e();const t=Ge;Ge=null;try{return e()}finally{Ge=t}}function Tt(e){me(()=>V(e))}function Il(e){return it===null||(it.cleanups===null?it.cleanups=[e]:it.cleanups.push(e)),e}function Lg(){return Ge}function P(){return it}function y$(e,t){const r=Symbol("context");return{id:r,Provider:S$(r),defaultValue:e}}function g$(e){let t;return(t=Bg(it,e.id))!==void 0?t:e.defaultValue}function b$(e){const t=pe(e),r=pe(()=>xu(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function Mg(){const e=Cn;if(this.sources&&(this.state||e))if(this.state===Vr||e)Pi(this);else{const t=yt;yt=null,Ti(()=>ws(this),!1),yt=t}if(Ge){const t=this.observers?this.observers.length:0;Ge.sources?(Ge.sources.push(this),Ge.sourceSlots.push(t)):(Ge.sources=[this],Ge.sourceSlots=[t]),this.observers?(this.observers.push(Ge),this.observerSlots.push(Ge.sources.length-1)):(this.observers=[Ge],this.observerSlots=[Ge.sources.length-1])}return this.value}function jg(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Ti(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],a=Cn&&Cn.running;a&&Cn.disposed.has(o),(a&&!o.tState||!a&&!o.state)&&(o.pure?yt.push(o):Ar.push(o),o.observers&&Ug(o)),a||(o.state=Vr)}if(yt.length>1e6)throw yt=[],new Error},!1)),t}function Pi(e){if(!e.fn)return;Dl(e);const t=it,r=Ge,n=th;Ge=it=e,$$(e,e.value,n),Ge=r,it=t}function $$(e,t,r){let n;try{n=e.fn(t)}catch(i){e.pure&&(e.state=Vr,e.owned&&e.owned.forEach(Dl),e.owned=null),Vg(i)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?jg(e,n):e.value=n,e.updatedAt=r)}function Al(e,t,r,n=Vr,i){const o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:it,context:null,pure:r};return it===null||it!==Fg&&(it.owned?it.owned.push(o):it.owned=[o]),o}function $s(e){const t=Cn;if(e.state===0||t)return;if(e.state===bs||t)return ws(e);if(e.suspense&&V(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<th);)(e.state||t)&&r.push(e);for(let n=r.length-1;n>=0;n--)if(e=r[n],e.state===Vr||t)Pi(e);else if(e.state===bs||t){const i=yt;yt=null,Ti(()=>ws(e,r[0]),!1),yt=i}}function Ti(e,t){if(yt)return e();let r=!1;t||(yt=[]),Ar?r=!0:Ar=[],th++;try{const n=e();return w$(r),n}catch(n){r||(Ar=null),yt=null,Vg(n)}}function w$(e){if(yt&&(zg(yt),yt=null),e)return;const t=Ar;Ar=null,t.length&&Ti(()=>Rg(t),!1)}function zg(e){for(let t=0;t<e.length;t++)$s(e[t])}function _$(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:$s(n)}for(hr.context&&h$(),t=0;t<r;t++)$s(e[t])}function ws(e,t){const r=Cn;e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];i.sources&&(i.state===Vr||r?i!==t&&$s(i):(i.state===bs||r)&&ws(i,t))}}function Ug(e){const t=Cn;for(let r=0;r<e.observers.length;r+=1){const n=e.observers[r];(!n.state||t)&&(n.state=bs,n.pure?yt.push(n):Ar.push(n),n.observers&&Ug(n))}}function Dl(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),i=r.observers;if(i&&i.length){const o=i.pop(),a=r.observerSlots.pop();n<i.length&&(o.sourceSlots[a]=n,i[n]=o,r.observerSlots[n]=a)}}if(e.owned){for(t=0;t<e.owned.length;t++)Dl(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function x$(e){return e instanceof Error||typeof e=="string"?e:new Error("Unknown error")}function Vg(e){throw e=x$(e),e}function Bg(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Bg(e.owner,t):void 0}function xu(e){if(typeof e=="function"&&!e.length)return xu(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=xu(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function S$(e,t){return function(n){let i;return W(()=>i=V(()=>(it.context={[e]:n.value},b$(()=>n.children))),void 0),i}}const k$=Symbol("fallback");function $p(e){for(let t=0;t<e.length;t++)e[t]()}function E$(e,t,r={}){let n=[],i=[],o=[],a=0,s=t.length>1?[]:null;return Il(()=>$p(o)),()=>{let c=e()||[],l,u;return c[_u],V(()=>{let f=c.length,h,p,m,v,y,b,g,w,x;if(f===0)a!==0&&($p(o),o=[],n=[],i=[],a=0,s&&(s=[])),r.fallback&&(n=[k$],i[0]=$a(E=>(o[0]=E,r.fallback())),a=1);else if(a===0){for(i=new Array(f),u=0;u<f;u++)n[u]=c[u],i[u]=$a(d);a=f}else{for(m=new Array(f),v=new Array(f),s&&(y=new Array(f)),b=0,g=Math.min(a,f);b<g&&n[b]===c[b];b++);for(g=a-1,w=f-1;g>=b&&w>=b&&n[g]===c[w];g--,w--)m[w]=i[g],v[w]=o[g],s&&(y[w]=s[g]);for(h=new Map,p=new Array(w+1),u=w;u>=b;u--)x=c[u],l=h.get(x),p[u]=l===void 0?-1:l,h.set(x,u);for(l=b;l<=g;l++)x=n[l],u=h.get(x),u!==void 0&&u!==-1?(m[u]=i[l],v[u]=o[l],s&&(y[u]=s[l]),u=p[u],h.set(x,u)):o[l]();for(u=b;u<f;u++)u in m?(i[u]=m[u],o[u]=v[u],s&&(s[u]=y[u],s[u](u))):i[u]=$a(d);i=i.slice(0,a=f),n=c.slice(0)}return i});function d(f){if(o[u]=f,s){const[h,p]=F(u);return s[u]=p,t(c[u],h)}return t(c[u])}}}function z(e,t){return V(()=>e(t||{}))}function Yo(){return!0}const O$={get(e,t,r){return t===$r?r:e.get(t)},has(e,t){return t===$r?!0:e.has(t)},set:Yo,deleteProperty:Yo,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Yo,deleteProperty:Yo}},ownKeys(e){return e.keys()}};function uc(e){return(e=typeof e=="function"?e():e)?e:{}}function Su(...e){let t=!1;for(let n=0;n<e.length;n++){const i=e[n];t=t||!!i&&$r in i,e[n]=typeof i=="function"?(t=!0,pe(i)):i}if(t)return new Proxy({get(n){for(let i=e.length-1;i>=0;i--){const o=uc(e[i])[n];if(o!==void 0)return o}},has(n){for(let i=e.length-1;i>=0;i--)if(n in uc(e[i]))return!0;return!1},keys(){const n=[];for(let i=0;i<e.length;i++)n.push(...Object.keys(uc(e[i])));return[...new Set(n)]}},O$);const r={};for(let n=e.length-1;n>=0;n--)if(e[n]){const i=Object.getOwnPropertyDescriptors(e[n]);for(const o in i)o in r||Object.defineProperty(r,o,{enumerable:!0,get(){for(let a=e.length-1;a>=0;a--){const s=(e[a]||{})[o];if(s!==void 0)return s}}})}return r}function Rl(e){const t="fallback"in e&&{fallback:()=>e.fallback};return pe(E$(()=>e.each,e.children,t||void 0))}function re(e){let t=!1;const r=e.keyed,n=pe(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return pe(()=>{const i=n();if(i){const o=e.children,a=typeof o=="function"&&o.length>0;return t=r||a,a?V(()=>o(i)):o}return e.fallback},void 0,void 0)}function C$(e,t,r){let n=r.length,i=t.length,o=n,a=0,s=0,c=t[i-1].nextSibling,l=null;for(;a<i||s<o;){if(t[a]===r[s]){a++,s++;continue}for(;t[i-1]===r[o-1];)i--,o--;if(i===a){const u=o<n?s?r[s-1].nextSibling:r[o-s]:c;for(;s<o;)e.insertBefore(r[s++],u)}else if(o===s)for(;a<i;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[o-1]&&r[s]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--o],u),t[i]=r[o]}else{if(!l){l=new Map;let d=s;for(;d<o;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<o){let d=a,f=1,h;for(;++d<i&&d<o&&!((h=l.get(t[d]))==null||h!==u+f);)f++;if(f>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}const wp="_$DX_DELEGATE";function O(e,t,r){const n=document.createElement("template");n.innerHTML=e;let i=n.content.firstChild;return r&&(i=i.firstChild),i}function Ni(e,t=window.document){const r=t[wp]||(t[wp]=new Set);for(let n=0,i=e.length;n<i;n++){const o=e[n];r.has(o)||(r.add(o),t.addEventListener(o,I$))}}function P$(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function _p(e,t){t==null?e.removeAttribute("class"):e.className=t}function T$(e,t,r={}){const n=Object.keys(t||{}),i=Object.keys(r);let o,a;for(o=0,a=i.length;o<a;o++){const s=i[o];!s||s==="undefined"||t[s]||(xp(e,s,!1),delete r[s])}for(o=0,a=n.length;o<a;o++){const s=n[o],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(xp(e,s,!0),r[s]=c)}return r}function N$(e,t,r){if(!t)return r?P$(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let i,o;for(o in r)t[o]==null&&n.removeProperty(o),delete r[o];for(o in t)i=t[o],i!==r[o]&&(n.setProperty(o,i),r[o]=i);return r}function ee(e,t,r){return V(()=>e(t,r))}function _(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return _s(e,t,n,r);W(i=>_s(e,t(),i,r),n)}function xp(e,t,r){const n=t.trim().split(/\s+/);for(let i=0,o=n.length;i<o;i++)e.classList.toggle(n[i],r)}function I$(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),hr.registry&&!hr.done&&(hr.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+e;){let i=n.nextSibling;n.remove(),n=i}n&&n.remove()}));r;){const n=r[t];if(n&&!r.disabled){const i=r[`${t}Data`];if(i!==void 0?n.call(r,i,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function _s(e,t,r,n,i){for(hr.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(hr.context)return r;if(o==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Wn(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(hr.context)return r;r=Wn(e,r,n)}else{if(o==="function")return W(()=>{let s=t();for(;typeof s=="function";)s=s();r=_s(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(ku(s,t,r,i))return W(()=>r=_s(e,s,r,n,!0)),()=>r;if(hr.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Wn(e,r,n),a)return r}else c?r.length===0?Sp(e,s,n):C$(e,r,s):(r&&Wn(e),Sp(e,s));r=s}else if(t instanceof Node){if(hr.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Wn(e,r,n,t);Wn(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function ku(e,t,r,n){let i=!1;for(let o=0,a=t.length;o<a;o++){let s=t[o],c=r&&r[o];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))i=ku(e,s,c)||i;else if(typeof s=="function")if(n){for(;typeof s=="function";)s=s();i=ku(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||i}else e.push(s),i=!0;else{const l=String(s);c&&c.nodeType===3&&c.data===l?e.push(c):e.push(document.createTextNode(l))}}return i}function Sp(e,t,r=null){for(let n=0,i=t.length;n<i;n++)e.insertBefore(t[n],r)}function Wn(e,t,r,n){if(r===void 0)return e.textContent="";const i=n||document.createTextNode("");if(t.length){let o=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(i!==s){const c=s.parentNode===e;!o&&!a?c?e.replaceChild(i,s):e.insertBefore(i,r):c&&s.remove()}else o=!0}}else e.insertBefore(i,r);return[i]}function A$(e){return Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Object.assign({},i),qg(i.value)&&!M$(i.value)&&!Array.isArray(i.value)&&(r[n].value=Object.assign({},i.value)),Array.isArray(i.value)&&(r[n].value=i.value.slice(0)),r},{})}function D$(e){return e?Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=qg(i)&&"value"in i?i:{value:i},r[n].attribute||(r[n].attribute=L$(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function R$(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function F$(e,t){const r=A$(t);return Object.keys(t).forEach(i=>{const o=r[i],a=e.getAttribute(o.attribute),s=e[i];a&&(o.value=o.parse?Wg(a):a),s!=null&&(o.value=Array.isArray(s)?s.slice(0):s),o.reflect&&kp(e,o.attribute,o.value),Object.defineProperty(e,i,{get(){return o.value},set(c){const l=o.value;o.value=c,o.reflect&&kp(this,o.attribute,o.value);for(let u=0,d=this.__propertyChangedCallbacks.length;u<d;u++)this.__propertyChangedCallbacks[u](i,c,l)},enumerable:!0,configurable:!0})}),r}function Wg(e){if(!!e)try{return JSON.parse(e)}catch{return e}}function kp(e,t,r){if(r==null||r===!1)return e.removeAttribute(t);let n=JSON.stringify(r);e.__updating[t]=!0,n==="true"&&(n=""),e.setAttribute(t,n),Promise.resolve().then(()=>delete e.__updating[t])}function L$(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function qg(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function M$(e){return Object.prototype.toString.call(e)==="[object Function]"}function j$(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let dc;function z$(e,t){const r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=F$(this,t);const i=R$(this.props),o=this.Component,a=dc;try{dc=this,this.__initialized=!0,j$(o)?new o(i,{element:this}):o(i,{element:this})}finally{dc=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,o,a){if(!!this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(a==null&&!this[i])return;this[i]=t[i].parse?Wg(a):a}}lookupProp(i){if(!!t)return r.find(o=>i===o||i===t[o].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function U$(e,t={},r={}){const{BaseElement:n=HTMLElement,extension:i}=r;return o=>{if(!e)throw new Error("tag is required to register a Component");let a=customElements.get(e);return a?(a.prototype.Component=o,a):(a=z$(n,D$(t)),a.prototype.Component=o,a.prototype.registeredTag=e,customElements.define(e,a,i),a)}}function V$(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const[i,o]=F(e[t[n]]);Object.defineProperty(r,t[n],{get:i,set(a){o(()=>a)}})}return r}function B$(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function W$(e){return(t,r)=>{const{element:n}=r;return $a(i=>{const o=V$(t);n.addPropertyChangedCallback((s,c)=>o[s]=c),n.addReleaseCallback(()=>{n.renderRoot.textContent="",i()});const a=e(o,r);return _(n.renderRoot,a)},B$(n))}}function $e(e,t,r){return arguments.length===2&&(r=t,t={}),U$(e,t)(W$(r))}const Hg=y$(),rt=()=>g$(Hg),q$=(e,t)=>{const r=[];return t.forEach(n=>{(!Object.keys(e).includes(n)||e[n]==null)&&r.push(`photon-client requires ${n}, but no value was provided`)}),r.forEach(n=>console.warn(n)),r},H$=/[?&]code=[^&]+/,G$=/[?&]state=[^&]+/,Q$=/[?&]error=[^&]+/,K$=(e=window.location.search)=>(H$.test(e)||Q$.test(e))&&G$.test(e),Ep=e=>e.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),Y$=e=>/^\d+$/.test(e)&&e.length>=5;var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Eu(e,t)};function cr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Eu(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var C=function(){return C=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},C.apply(this,arguments)};function sn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function ie(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function Yr(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function xs(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Ou=function(e,t){return Ou=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ou(e,t)};function zn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ou(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var se=function(){return se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function At(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ve(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function s(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof r?u:new r(function(d){d(u)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function ye(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(u[0]===6&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(d){u=[6,d],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}}function vi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Cu(e,t,r){if(r||arguments.length===2)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e,t){return e(t={exports:{}},t.exports),t.exports}var Wr,wa,Xo=function(e){return e&&e.Math==Math&&e},le=Xo(typeof globalThis=="object"&&globalThis)||Xo(typeof window=="object"&&window)||Xo(typeof self=="object"&&self)||Xo(typeof yr=="object"&&yr)||function(){return this}()||Function("return this")(),Ae=function(e){try{return!!e()}catch{return!0}},Ee=!Ae(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Lo=!Ae(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,kt=Lo?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},Op={}.propertyIsEnumerable,Cp=Object.getOwnPropertyDescriptor,X$=Cp&&!Op.call({1:2},1)?function(e){var t=Cp(this,e);return!!t&&t.enumerable}:Op,nh={f:X$},An=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Gg=Function,Qg=Gg.prototype,Z$=Qg.bind,Pu=Qg.call,J$=Lo&&Z$.bind(Pu,Pu),fe=function(e){return e instanceof Gg?Lo?J$(e):function(){return Pu.apply(e,arguments)}:void 0},ew=fe({}.toString),tw=fe("".slice),Dr=function(e){return tw(ew(e),8,-1)},fc=Object,rw=fe("".split),Kg=Ae(function(){return!fc("z").propertyIsEnumerable(0)})?function(e){return Dr(e)=="String"?rw(e,""):fc(e)}:fc,Ai=function(e){return e==null},nw=TypeError,Mo=function(e){if(Ai(e))throw nw("Can't call method on "+e);return e},Er=function(e){return Kg(Mo(e))},hc=typeof document=="object"&&document.all,Fl={all:hc,IS_HTMLDDA:hc===void 0&&hc!==void 0},iw=Fl.all,Te=Fl.IS_HTMLDDA?function(e){return typeof e=="function"||e===iw}:function(e){return typeof e=="function"},ow=Fl.all,Le=Fl.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Te(e)||e===ow}:function(e){return typeof e=="object"?e!==null:Te(e)},aw=function(e){return Te(e)?e:void 0},ur=function(e,t){return arguments.length<2?aw(le[e]):le[e]&&le[e][t]},Dn=fe({}.isPrototypeOf),pc=ur("navigator","userAgent")||"",Pp=le.process,Tp=le.Deno,Np=Pp&&Pp.versions||Tp&&Tp.version,Ip=Np&&Np.v8;Ip&&(wa=(Wr=Ip.split("."))[0]>0&&Wr[0]<4?1:+(Wr[0]+Wr[1])),!wa&&pc&&(!(Wr=pc.match(/Edge\/(\d+)/))||Wr[1]>=74)&&(Wr=pc.match(/Chrome\/(\d+)/))&&(wa=+Wr[1]);var Ss=wa,qt=!!Object.getOwnPropertySymbols&&!Ae(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ss&&Ss<41}),ih=qt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",sw=Object,yi=ih?function(e){return typeof e=="symbol"}:function(e){var t=ur("Symbol");return Te(t)&&Dn(t.prototype,sw(e))},lw=String,Di=function(e){try{return lw(e)}catch{return"Object"}},cw=TypeError,oh=function(e){if(Te(e))return e;throw cw(Di(e)+" is not a function")},ks=function(e,t){var r=e[t];return Ai(r)?void 0:oh(r)},uw=TypeError,dw=Object.defineProperty,ah=function(e,t){try{dw(le,e,{value:t,configurable:!0,writable:!0})}catch{le[e]=t}return t},rn=le["__core-js_shared__"]||ah("__core-js_shared__",{}),yn=Ii(function(e){(e.exports=function(t,r){return rn[t]||(rn[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.25.4",mode:"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE",source:"https://github.com/zloirock/core-js"})}),fw=Object,Ri=function(e){return fw(Mo(e))},hw=fe({}.hasOwnProperty),J=Object.hasOwn||function(e,t){return hw(Ri(e),t)},pw=0,mw=Math.random(),vw=fe(1 .toString),gi=function(e){return"Symbol("+(e===void 0?"":e)+")_"+vw(++pw+mw,36)},Hi=yn("wks"),Pn=le.Symbol,Ap=Pn&&Pn.for,yw=ih?Pn:Pn&&Pn.withoutSetter||gi,Xe=function(e){if(!J(Hi,e)||!qt&&typeof Hi[e]!="string"){var t="Symbol."+e;qt&&J(Pn,e)?Hi[e]=Pn[e]:Hi[e]=ih&&Ap?Ap(t):yw(t)}return Hi[e]},gw=TypeError,bw=Xe("toPrimitive"),$w=function(e,t){if(!Le(e)||yi(e))return e;var r,n=ks(e,bw);if(n){if(t===void 0&&(t="default"),r=kt(n,e,t),!Le(r)||yi(r))return r;throw gw("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,s;if(o==="string"&&Te(a=i.toString)&&!Le(s=kt(a,i))||Te(a=i.valueOf)&&!Le(s=kt(a,i))||o!=="string"&&Te(a=i.toString)&&!Le(s=kt(a,i)))return s;throw uw("Can't convert object to primitive value")}(e,t)},Rn=function(e){var t=$w(e,"string");return yi(t)?t:t+""},Tu=le.document,ww=Le(Tu)&&Le(Tu.createElement),Yg=function(e){return ww?Tu.createElement(e):{}},Xg=!Ee&&!Ae(function(){return Object.defineProperty(Yg("div"),"a",{get:function(){return 7}}).a!=7}),Dp=Object.getOwnPropertyDescriptor,jo={f:Ee?Dp:function(e,t){if(e=Er(e),t=Rn(t),Xg)try{return Dp(e,t)}catch{}if(J(e,t))return An(!kt(nh.f,e,t),e[t])}},Zg=Ee&&Ae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),_w=String,xw=TypeError,ut=function(e){if(Le(e))return e;throw xw(_w(e)+" is not an object")},Sw=TypeError,mc=Object.defineProperty,kw=Object.getOwnPropertyDescriptor,$t={f:Ee?Zg?function(e,t,r){if(ut(e),t=Rn(t),ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&"writable"in r&&!r.writable){var n=kw(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return mc(e,t,r)}:mc:function(e,t,r){if(ut(e),t=Rn(t),ut(r),Xg)try{return mc(e,t,r)}catch{}if("get"in r||"set"in r)throw Sw("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ll=Ee?function(e,t,r){return $t.f(e,t,An(1,r))}:function(e,t,r){return e[t]=r,e},Jg=Function.prototype,Ew=Ee&&Object.getOwnPropertyDescriptor,vc=J(Jg,"name"),sh={EXISTS:vc,PROPER:vc&&function(){}.name==="something",CONFIGURABLE:vc&&(!Ee||Ee&&Ew(Jg,"name").configurable)},Ow=fe(Function.toString);Te(rn.inspectSource)||(rn.inspectSource=function(e){return Ow(e)});var Es,ho,Os,eb=rn.inspectSource,Rp=le.WeakMap,Cw=Te(Rp)&&/native code/.test(String(Rp)),Fp=yn("keys"),Ml=function(e){return Fp[e]||(Fp[e]=gi(e))},Fi={},Nu=le.TypeError,Pw=le.WeakMap;if(Cw||rn.state){var bn=rn.state||(rn.state=new Pw),Tw=fe(bn.get),Lp=fe(bn.has),Nw=fe(bn.set);Es=function(e,t){if(Lp(bn,e))throw Nu("Object already initialized");return t.facade=e,Nw(bn,e,t),t},ho=function(e){return Tw(bn,e)||{}},Os=function(e){return Lp(bn,e)}}else{var qn=Ml("state");Fi[qn]=!0,Es=function(e,t){if(J(e,qn))throw Nu("Object already initialized");return t.facade=e,Ll(e,qn,t),t},ho=function(e){return J(e,qn)?e[qn]:{}},Os=function(e){return J(e,qn)}}var Yt={set:Es,get:ho,has:Os,enforce:function(e){return Os(e)?ho(e):Es(e,{})},getterFor:function(e){return function(t){var r;if(!Le(t)||(r=ho(t)).type!==e)throw Nu("Incompatible receiver, "+e+" required");return r}}},Iw=Ii(function(e){var t=sh.CONFIGURABLE,r=Yt.enforce,n=Yt.get,i=Object.defineProperty,o=Ee&&!Ae(function(){return i(function(){},"length",{value:8}).length!==8}),a=String(String).split("String"),s=e.exports=function(c,l,u){String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(l="get "+l),u&&u.setter&&(l="set "+l),(!J(c,"name")||t&&c.name!==l)&&(Ee?i(c,"name",{value:l,configurable:!0}):c.name=l),o&&u&&J(u,"arity")&&c.length!==u.arity&&i(c,"length",{value:u.arity});try{u&&J(u,"constructor")&&u.constructor?Ee&&i(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var d=r(c);return J(d,"source")||(d.source=a.join(typeof l=="string"?l:"")),c};Function.prototype.toString=s(function(){return Te(this)&&n(this).source||eb(this)},"toString")}),Ot=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(Te(r)&&Iw(r,o,n),n.global)i?e[t]=r:ah(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:$t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Aw=Math.ceil,Dw=Math.floor,Rw=Math.trunc||function(e){var t=+e;return(t>0?Dw:Aw)(t)},lh=function(e){var t=+e;return t!=t||t===0?0:Rw(t)},Fw=Math.max,Lw=Math.min,Iu=function(e,t){var r=lh(e);return r<0?Fw(r+t,0):Lw(r,t)},Mw=Math.min,tb=function(e){return e>0?Mw(lh(e),9007199254740991):0},Li=function(e){return tb(e.length)},Mp=function(e){return function(t,r,n){var i,o=Er(t),a=Li(o),s=Iu(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},rb={includes:Mp(!0),indexOf:Mp(!1)},jw=rb.indexOf,jp=fe([].push),nb=function(e,t){var r,n=Er(e),i=0,o=[];for(r in n)!J(Fi,r)&&J(n,r)&&jp(o,r);for(;t.length>i;)J(n,r=t[i++])&&(~jw(o,r)||jp(o,r));return o},Cs=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zw=Cs.concat("length","prototype"),wo={f:Object.getOwnPropertyNames||function(e){return nb(e,zw)}},jl={f:Object.getOwnPropertySymbols},Uw=fe([].concat),Vw=ur("Reflect","ownKeys")||function(e){var t=wo.f(ut(e)),r=jl.f;return r?Uw(t,r(e)):t},ib=function(e,t,r){for(var n=Vw(t),i=$t.f,o=jo.f,a=0;a<n.length;a++){var s=n[a];J(e,s)||r&&J(r,s)||i(e,s,o(t,s))}},Bw=/#|\.prototype\./,zo=function(e,t){var r=qw[Ww(e)];return r==Gw||r!=Hw&&(Te(t)?Ae(t):!!t)},Ww=zo.normalize=function(e){return String(e).replace(Bw,".").toLowerCase()},qw=zo.data={},Hw=zo.NATIVE="N",Gw=zo.POLYFILL="P",Au=zo,Qw=jo.f,dt=function(e,t){var r,n,i,o,a,s=e.target,c=e.global,l=e.stat;if(r=c?le:l?le[s]||ah(s,{}):(le[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=Qw(r,n))&&a.value:r[n],!Au(c?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;ib(o,i)}(e.sham||i&&i.sham)&&Ll(o,"sham",!0),Ot(r,n,o,e)}},ob={};ob[Xe("toStringTag")]="z";var yc,ch=String(ob)==="[object z]",Kw=Xe("toStringTag"),Yw=Object,Xw=Dr(function(){return arguments}())=="Arguments",Un=ch?Dr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=Yw(e),Kw))=="string"?r:Xw?Dr(t):(n=Dr(t))=="Object"&&Te(t.callee)?"Arguments":n},Zw=String,Fr=function(e){if(Un(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Zw(e)},Jw=Xe("match"),e_=TypeError,ab=function(e){if(function(t){var r;return Le(t)&&((r=t[Jw])!==void 0?!!r:Dr(t)=="RegExp")}(e))throw e_("The method doesn't accept regular expressions");return e},t_=Xe("match"),sb=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[t_]=!1,"/./"[e](t)}catch{}}return!1},r_=jo.f,zp=fe("".startsWith),n_=fe("".slice),i_=Math.min,lb=sb("startsWith"),o_=!(lb||(yc=r_(String.prototype,"startsWith"),!yc||yc.writable));dt({target:"String",proto:!0,forced:!o_&&!lb},{startsWith:function(e){var t=Fr(Mo(this));ab(e);var r=tb(i_(arguments.length>1?arguments[1]:void 0,t.length)),n=Fr(e);return zp?zp(t,n,r):n_(t,r,r+n.length)===n}});var uh=function(e,t){return fe(le[e].prototype[t])};uh("String","startsWith");var Ps=Array.isArray||function(e){return Dr(e)=="Array"},a_=TypeError,Up=function(e){if(e>9007199254740991)throw a_("Maximum allowed index exceeded");return e},_o=function(e,t,r){var n=Rn(t);n in e?$t.f(e,n,An(0,r)):e[n]=r},cb=function(){},s_=[],ub=ur("Reflect","construct"),dh=/^\s*(?:class|function)\b/,l_=fe(dh.exec),c_=!dh.exec(cb),Gi=function(e){if(!Te(e))return!1;try{return ub(cb,s_,e),!0}catch{return!1}},db=function(e){if(!Te(e))return!1;switch(Un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c_||!!l_(dh,eb(e))}catch{return!0}};db.sham=!0;var Vp,fh=!ub||Ae(function(){var e;return Gi(Gi.call)||!Gi(Object)||!Gi(function(){e=!0})||e})?db:Gi,u_=Xe("species"),Bp=Array,fb=function(e,t){return new(function(r){var n;return Ps(r)&&(n=r.constructor,(fh(n)&&(n===Bp||Ps(n.prototype))||Le(n)&&(n=n[u_])===null)&&(n=void 0)),n===void 0?Bp:n}(e))(t===0?0:t)},d_=Xe("species"),hb=Xe("isConcatSpreadable"),f_=Ss>=51||!Ae(function(){var e=[];return e[hb]=!1,e.concat()[0]!==e}),h_=(Vp="concat",Ss>=51||!Ae(function(){var e=[];return(e.constructor={})[d_]=function(){return{foo:1}},e[Vp](Boolean).foo!==1})),p_=function(e){if(!Le(e))return!1;var t=e[hb];return t!==void 0?!!t:Ps(e)};dt({target:"Array",proto:!0,arity:1,forced:!f_||!h_},{concat:function(e){var t,r,n,i,o,a=Ri(this),s=fb(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(p_(o=t===-1?a:arguments[t]))for(i=Li(o),Up(c+i),r=0;r<i;r++,c++)r in o&&_o(s,c,o[r]);else Up(c+1),_o(s,c++,o);return s.length=c,s}});var m_=ch?{}.toString:function(){return"[object "+Un(this)+"]"};ch||Ot(Object.prototype,"toString",m_,{unsafe:!0});var Jo,hh=Object.keys||function(e){return nb(e,Cs)},v_=Ee&&!Zg?Object.defineProperties:function(e,t){ut(e);for(var r,n=Er(t),i=hh(t),o=i.length,a=0;o>a;)$t.f(e,r=i[a++],n[r]);return e},pb={f:v_},y_=ur("document","documentElement"),mb=Ml("IE_PROTO"),gc=function(){},vb=function(e){return"<script>"+e+"<\/script>"},Wp=function(e){e.write(vb("")),e.close();var t=e.parentWindow.Object;return e=null,t},_a=function(){try{Jo=new ActiveXObject("htmlfile")}catch{}var e,t;_a=typeof document<"u"?document.domain&&Jo?Wp(Jo):((t=Yg("iframe")).style.display="none",y_.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(vb("document.F=Object")),e.close(),e.F):Wp(Jo);for(var r=Cs.length;r--;)delete _a.prototype[Cs[r]];return _a()};Fi[mb]=!0;var ln=Object.create||function(e,t){var r;return e!==null?(gc.prototype=ut(e),r=new gc,gc.prototype=null,r[mb]=e):r=_a(),t===void 0?r:pb.f(r,t)},g_=Array,b_=Math.max,yb=wo.f,gb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$_=function(e){try{return yb(e)}catch{return function(r,n,i){for(var o=Li(r),a=Iu(n,o),s=Iu(i===void 0?o:i,o),c=g_(b_(s-a,0)),l=0;a<s;a++,l++)_o(c,l,r[a]);return c.length=l,c}(gb)}},ph={f:function(e){return gb&&Dr(e)=="Window"?$_(e):yb(Er(e))}},bb={f:Xe},xo=le,w_=$t.f,Dt=function(e){var t=xo.Symbol||(xo.Symbol={});J(t,e)||w_(t,e,{value:bb.f(e)})},$b=function(){var e=ur("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Xe("toPrimitive");t&&!t[n]&&Ot(t,n,function(i){return kt(r,this)},{arity:1})},__=$t.f,qp=Xe("toStringTag"),tn=function(e,t,r){e&&!r&&(e=e.prototype),e&&!J(e,qp)&&__(e,qp,{configurable:!0,value:t})},x_=fe(fe.bind),zl=function(e,t){return oh(e),t===void 0?e:Lo?x_(e,t):function(){return e.apply(t,arguments)}},Hp=fe([].push),qr=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(c,l,u,d){for(var f,h,p=Ri(c),m=Kg(p),v=zl(l,u),y=Li(m),b=0,g=d||fb,w=t?g(c,y):r||a?g(c,0):void 0;y>b;b++)if((s||b in m)&&(h=v(f=m[b],b,p),e))if(t)w[b]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return b;case 2:Hp(w,f)}else switch(e){case 4:return!1;case 7:Hp(w,f)}return o?-1:n||i?i:w}},Ul={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)}.forEach,Rt=Ml("hidden"),S_=Yt.set,Gp=Yt.getterFor("Symbol"),Gt=Object.prototype,ni=le.Symbol,lo=ni&&ni.prototype,k_=le.TypeError,bc=le.QObject,wb=jo.f,Jr=$t.f,_b=ph.f,E_=nh.f,xb=fe([].push),Lr=yn("symbols"),Uo=yn("op-symbols"),O_=yn("wks"),$c=!bc||!bc.prototype||!bc.prototype.findChild,Du=Ee&&Ae(function(){return ln(Jr({},"a",{get:function(){return Jr(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=wb(Gt,t);n&&delete Gt[t],Jr(e,t,r),n&&e!==Gt&&Jr(Gt,t,n)}:Jr,wc=function(e,t){var r=Lr[e]=ln(lo);return S_(r,{type:"Symbol",tag:e,description:t}),Ee||(r.description=t),r},Ts=function(e,t,r){e===Gt&&Ts(Uo,t,r),ut(e);var n=Rn(t);return ut(r),J(Lr,n)?(r.enumerable?(J(e,Rt)&&e[Rt][n]&&(e[Rt][n]=!1),r=ln(r,{enumerable:An(0,!1)})):(J(e,Rt)||Jr(e,Rt,An(1,{})),e[Rt][n]=!0),Du(e,n,r)):Jr(e,n,r)},_c=function(e,t){ut(e);var r=Er(t),n=hh(r).concat(Sb(r));return Ul(n,function(i){Ee&&!kt(Ru,r,i)||Ts(e,i,r[i])}),e},Ru=function(e){var t=Rn(e),r=kt(E_,this,t);return!(this===Gt&&J(Lr,t)&&!J(Uo,t))&&(!(r||!J(this,t)||!J(Lr,t)||J(this,Rt)&&this[Rt][t])||r)},Qp=function(e,t){var r=Er(e),n=Rn(t);if(r!==Gt||!J(Lr,n)||J(Uo,n)){var i=wb(r,n);return!i||!J(Lr,n)||J(r,Rt)&&r[Rt][n]||(i.enumerable=!0),i}},Kp=function(e){var t=_b(Er(e)),r=[];return Ul(t,function(n){J(Lr,n)||J(Fi,n)||xb(r,n)}),r},Sb=function(e){var t=e===Gt,r=_b(t?Uo:Er(e)),n=[];return Ul(r,function(i){!J(Lr,i)||t&&!J(Gt,i)||xb(n,Lr[i])}),n};qt||(lo=(ni=function(){if(Dn(lo,this))throw k_("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?Fr(arguments[0]):void 0,t=gi(e),r=function(n){this===Gt&&kt(r,Uo,n),J(this,Rt)&&J(this[Rt],t)&&(this[Rt][t]=!1),Du(this,t,An(1,n))};return Ee&&$c&&Du(Gt,t,{configurable:!0,set:r}),wc(t,e)}).prototype,Ot(lo,"toString",function(){return Gp(this).tag}),Ot(ni,"withoutSetter",function(e){return wc(gi(e),e)}),nh.f=Ru,$t.f=Ts,pb.f=_c,jo.f=Qp,wo.f=ph.f=Kp,jl.f=Sb,bb.f=function(e){return wc(Xe(e),e)},Ee&&(Jr(lo,"description",{configurable:!0,get:function(){return Gp(this).description}}),Ot(Gt,"propertyIsEnumerable",Ru,{unsafe:!0}))),dt({global:!0,constructor:!0,wrap:!0,forced:!qt,sham:!qt},{Symbol:ni}),Ul(hh(O_),function(e){Dt(e)}),dt({target:"Symbol",stat:!0,forced:!qt},{useSetter:function(){$c=!0},useSimple:function(){$c=!1}}),dt({target:"Object",stat:!0,forced:!qt,sham:!Ee},{create:function(e,t){return t===void 0?ln(e):_c(ln(e),t)},defineProperty:Ts,defineProperties:_c,getOwnPropertyDescriptor:Qp}),dt({target:"Object",stat:!0,forced:!qt},{getOwnPropertyNames:Kp}),$b(),tn(ni,"Symbol"),Fi[Rt]=!0;var kb=qt&&!!Symbol.for&&!!Symbol.keyFor,xc=yn("string-to-symbol-registry"),C_=yn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!kb},{for:function(e){var t=Fr(e);if(J(xc,t))return xc[t];var r=ur("Symbol")(t);return xc[t]=r,C_[r]=t,r}});var Yp=yn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!kb},{keyFor:function(e){if(!yi(e))throw TypeError(Di(e)+" is not a symbol");if(J(Yp,e))return Yp[e]}});var Eb=Function.prototype,Xp=Eb.apply,Zp=Eb.call,Ob=typeof Reflect=="object"&&Reflect.apply||(Lo?Zp.bind(Xp):function(){return Zp.apply(Xp,arguments)}),mh=fe([].slice),nn=ur("JSON","stringify"),ea=fe(/./.exec),Jp=fe("".charAt),P_=fe("".charCodeAt),T_=fe("".replace),N_=fe(1 .toString),I_=/[\uD800-\uDFFF]/g,e0=/^[\uD800-\uDBFF]$/,t0=/^[\uDC00-\uDFFF]$/,r0=!qt||Ae(function(){var e=ur("Symbol")();return nn([e])!="[null]"||nn({a:e})!="{}"||nn(Object(e))!="{}"}),n0=Ae(function(){return nn("\uDF06\uD834")!=='"\\udf06\\ud834"'||nn("\uDEAD")!=='"\\udead"'}),A_=function(e,t){var r=mh(arguments),n=t;if((Le(t)||e!==void 0)&&!yi(e))return Ps(t)||(t=function(i,o){if(Te(n)&&(o=kt(n,this,i,o)),!yi(o))return o}),r[1]=t,Ob(nn,null,r)},D_=function(e,t,r){var n=Jp(r,t-1),i=Jp(r,t+1);return ea(e0,e)&&!ea(t0,i)||ea(t0,e)&&!ea(e0,n)?"\\u"+N_(P_(e,0),16):e};nn&&dt({target:"JSON",stat:!0,arity:3,forced:r0||n0},{stringify:function(e,t,r){var n=mh(arguments),i=Ob(r0?A_:nn,null,n);return n0&&typeof i=="string"?T_(i,I_,D_):i}});var R_=!qt||Ae(function(){jl.f(1)});dt({target:"Object",stat:!0,forced:R_},{getOwnPropertySymbols:function(e){var t=jl.f;return t?t(Ri(e)):[]}}),Dt("asyncIterator");var F_=$t.f,Tr=le.Symbol,$n=Tr&&Tr.prototype;if(Ee&&Te(Tr)&&(!("description"in $n)||Tr().description!==void 0)){var i0={},ta=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:Fr(arguments[0]),t=Dn($n,this)?new Tr(e):e===void 0?Tr():Tr(e);return e===""&&(i0[t]=!0),t};ib(ta,Tr),ta.prototype=$n,$n.constructor=ta;var L_=String(Tr("test"))=="Symbol(test)",M_=fe($n.valueOf),j_=fe($n.toString),z_=/^Symbol\((.*)\)[^)]+$/,U_=fe("".replace),V_=fe("".slice);F_($n,"description",{configurable:!0,get:function(){var e=M_(this);if(J(i0,e))return"";var t=j_(e),r=L_?V_(t,7,-1):U_(t,z_,"$1");return r===""?void 0:r}}),dt({global:!0,constructor:!0,forced:!0},{Symbol:ta})}Dt("hasInstance"),Dt("isConcatSpreadable"),Dt("iterator"),Dt("match"),Dt("matchAll"),Dt("replace"),Dt("search"),Dt("species"),Dt("split"),Dt("toPrimitive"),$b(),Dt("toStringTag"),tn(ur("Symbol"),"Symbol"),Dt("unscopables"),tn(le.JSON,"JSON",!0),tn(Math,"Math",!0),dt({global:!0},{Reflect:{}}),tn(le.Reflect,"Reflect",!0),xo.Symbol;var Tn,o0,a0,B_=fe("".charAt),s0=fe("".charCodeAt),W_=fe("".slice),l0=function(e){return function(t,r){var n,i,o=Fr(Mo(t)),a=lh(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=s0(o,a))<55296||n>56319||a+1===s||(i=s0(o,a+1))<56320||i>57343?e?B_(o,a):n:e?W_(o,a,a+2):i-56320+(n-55296<<10)+65536}},q_={codeAt:l0(!1),charAt:l0(!0)},H_=!Ae(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),c0=Ml("IE_PROTO"),Fu=Object,G_=Fu.prototype,cn=H_?Fu.getPrototypeOf:function(e){var t=Ri(e);if(J(t,c0))return t[c0];var r=t.constructor;return Te(r)&&t instanceof r?r.prototype:t instanceof Fu?G_:null},Lu=Xe("iterator"),Cb=!1;[].keys&&("next"in(a0=[].keys())?(o0=cn(cn(a0)))!==Object.prototype&&(Tn=o0):Cb=!0);var Q_=!Le(Tn)||Ae(function(){var e={};return Tn[Lu].call(e)!==e});Q_&&(Tn={}),Te(Tn[Lu])||Ot(Tn,Lu,function(){return this});var vh={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Cb},bi={},K_=vh.IteratorPrototype,Y_=function(){return this},X_=String,Z_=TypeError,wr=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return ut(n),function(o){if(typeof o=="object"||Te(o))return o;throw Z_("Can't set "+X_(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),J_=sh.PROPER,e3=sh.CONFIGURABLE,u0=vh.IteratorPrototype,ra=vh.BUGGY_SAFARI_ITERATORS,Qi=Xe("iterator"),t3=function(){return this},yh=function(e,t,r,n,i,o,a){(function(y,b,g,w){var x=b+" Iterator";y.prototype=ln(K_,{next:An(+!w,g)}),tn(y,x,!1),bi[x]=Y_})(r,t,n);var s,c,l,u=function(y){if(y===i&&m)return m;if(!ra&&y in h)return h[y];switch(y){case"keys":case"values":case"entries":return function(){return new r(this,y)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Qi]||h["@@iterator"]||i&&h[i],m=!ra&&p||u(i),v=t=="Array"&&h.entries||p;if(v&&(s=cn(v.call(new e)))!==Object.prototype&&s.next&&(cn(s)!==u0&&(wr?wr(s,u0):Te(s[Qi])||Ot(s,Qi,t3)),tn(s,d,!0)),J_&&i=="values"&&p&&p.name!=="values"&&(e3?Ll(h,"name","values"):(f=!0,m=function(){return kt(p,this)})),i)if(c={values:u("values"),keys:o?m:u("keys"),entries:u("entries")},a)for(l in c)(ra||f||!(l in h))&&Ot(h,l,c[l]);else dt({target:t,proto:!0,forced:ra||f},c);return h[Qi]!==m&&Ot(h,Qi,m,{name:i}),bi[t]=m,c},$i=function(e,t){return{value:e,done:t}},r3=q_.charAt,n3=Yt.set,i3=Yt.getterFor("String Iterator");yh(String,"String",function(e){n3(this,{type:"String Iterator",string:Fr(e),index:0})},function(){var e,t=i3(this),r=t.string,n=t.index;return n>=r.length?$i(void 0,!0):(e=r3(r,n),t.index+=e.length,$i(e,!1))});var Mu=function(e,t,r){var n,i;ut(e);try{if(!(n=ks(e,"return"))){if(t==="throw")throw r;return r}n=kt(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return ut(n),r},o3=function(e,t,r,n){try{return n?t(ut(r)[0],r[1]):t(r)}catch(i){Mu(e,"throw",i)}},a3=Xe("iterator"),s3=Array.prototype,Pb=function(e){return e!==void 0&&(bi.Array===e||s3[a3]===e)},l3=Xe("iterator"),gh=function(e){if(!Ai(e))return ks(e,l3)||ks(e,"@@iterator")||bi[Un(e)]},c3=TypeError,Tb=function(e,t){var r=arguments.length<2?gh(e):t;if(oh(r))return ut(kt(r,e));throw c3(Di(e)+" is not iterable")},d0=Array,Nb=Xe("iterator"),Ib=!1;try{var u3=0,f0={next:function(){return{done:!!u3++}},return:function(){Ib=!0}};f0[Nb]=function(){return this},Array.from(f0,function(){throw 2})}catch{}var Ab=function(e,t){if(!t&&!Ib)return!1;var r=!1;try{var n={};n[Nb]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},d3=!Ab(function(e){Array.from(e)});dt({target:"Array",stat:!0,forced:d3},{from:function(e){var t=Ri(e),r=fh(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=zl(i,n>2?arguments[2]:void 0));var a,s,c,l,u,d,f=gh(t),h=0;if(!f||this===d0&&Pb(f))for(a=Li(t),s=r?new this(a):d0(a);a>h;h++)d=o?i(t[h],h):t[h],_o(s,h,d);else for(u=(l=Tb(t,f)).next,s=r?new this:[];!(c=kt(u,l)).done;h++)d=o?o3(l,i,[c.value,h],!0):c.value,_o(s,h,d);return s.length=h,s}}),xo.Array.from;var Ft,ci,Ns,f3=typeof ArrayBuffer<"u"&&typeof DataView<"u",h3=$t.f,Db=Yt.enforce,p3=Yt.get,Is=le.Int8Array,ju=Is&&Is.prototype,h0=le.Uint8ClampedArray,p0=h0&&h0.prototype,pr=Is&&cn(Is),ir=ju&&cn(ju),m3=Object.prototype,zu=le.TypeError,m0=Xe("toStringTag"),Uu=gi("TYPED_ARRAY_TAG"),Rr=f3&&!!wr&&Un(le.opera)!=="Opera",Rb=!1,Nr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bh={BigInt64Array:8,BigUint64Array:8},Fb=function(e){var t=cn(e);if(Le(t)){var r=p3(t);return r&&J(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Fb(t)}},v0=function(e){if(!Le(e))return!1;var t=Un(e);return J(Nr,t)||J(bh,t)};for(Ft in Nr)(Ns=(ci=le[Ft])&&ci.prototype)?Db(Ns).TypedArrayConstructor=ci:Rr=!1;for(Ft in bh)(Ns=(ci=le[Ft])&&ci.prototype)&&(Db(Ns).TypedArrayConstructor=ci);if((!Rr||!Te(pr)||pr===Function.prototype)&&(pr=function(){throw zu("Incorrect invocation")},Rr))for(Ft in Nr)le[Ft]&&wr(le[Ft],pr);if((!Rr||!ir||ir===m3)&&(ir=pr.prototype,Rr))for(Ft in Nr)le[Ft]&&wr(le[Ft].prototype,ir);if(Rr&&cn(p0)!==ir&&wr(p0,ir),Ee&&!J(ir,m0))for(Ft in Rb=!0,h3(ir,m0,{get:function(){return Le(this)?this[Uu]:void 0}}),Nr)le[Ft]&&Ll(le[Ft],Uu,Ft);var Vl={NATIVE_ARRAY_BUFFER_VIEWS:Rr,TYPED_ARRAY_TAG:Rb&&Uu,aTypedArray:function(e){if(v0(e))return e;throw zu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(Te(e)&&(!wr||Dn(pr,e)))return e;throw zu(Di(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(Ee){if(r)for(var i in Nr){var o=le[i];if(o&&J(o.prototype,e))try{delete o.prototype[e]}catch{try{o.prototype[e]=t}catch{}}}ir[e]&&!r||Ot(ir,e,r?t:Rr&&ju[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(Ee){if(wr){if(r){for(n in Nr)if((i=le[n])&&J(i,e))try{delete i[e]}catch{}}if(pr[e]&&!r)return;try{return Ot(pr,e,r?t:Rr&&pr[e]||t)}catch{}}for(n in Nr)!(i=le[n])||i[e]&&!r||Ot(i,e,t)}},getTypedArrayConstructor:Fb,isView:function(e){if(!Le(e))return!1;var t=Un(e);return t==="DataView"||J(Nr,t)||J(bh,t)},isTypedArray:v0,TypedArray:pr,TypedArrayPrototype:ir},v3=TypeError,y3=Xe("species"),g3=function(e,t){var r,n=ut(e).constructor;return n===void 0||Ai(r=ut(n)[y3])?t:function(i){if(fh(i))return i;throw v3(Di(i)+" is not a constructor")}(r)},b3=Vl.aTypedArrayConstructor,$3=Vl.getTypedArrayConstructor,w3=Vl.aTypedArray;(0,Vl.exportTypedArrayMethod)("slice",function(e,t){for(var r,n=mh(w3(this),e,t),i=b3(g3(r=this,$3(r))),o=0,a=n.length,s=new i(a);a>o;)s[o]=n[o++];return s},Ae(function(){new Int8Array(1).slice()}));var _3=$t.f,Vu=Xe("unscopables"),Bu=Array.prototype;Bu[Vu]==null&&_3(Bu,Vu,{configurable:!0,value:ln(null)});var xa=function(e){Bu[Vu][e]=!0},x3=rb.includes,S3=Ae(function(){return!Array(1).includes()});dt({target:"Array",proto:!0,forced:S3},{includes:function(e){return x3(this,e,arguments.length>1?arguments[1]:void 0)}}),xa("includes"),uh("Array","includes");var k3=fe("".indexOf);dt({target:"String",proto:!0,forced:!sb("includes")},{includes:function(e){return!!~k3(Fr(Mo(this)),Fr(ab(e)),arguments.length>1?arguments[1]:void 0)}}),uh("String","includes");var E3=$t.f,O3=Yt.set,C3=Yt.getterFor("Array Iterator");yh(Array,"Array",function(e,t){O3(this,{type:"Array Iterator",target:Er(e),index:0,kind:t})},function(){var e=C3(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,$i(void 0,!0)):$i(r=="keys"?n:r=="values"?t[n]:[n,t[n]],!1)},"values");var y0=bi.Arguments=bi.Array;if(xa("keys"),xa("values"),xa("entries"),Ee&&y0.name!=="values")try{E3(y0,"name",{value:"values"})}catch{}var g0=Ae(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),na=Object.isExtensible,Sc=Ae(function(){na(1)})||g0?function(e){return!!Le(e)&&(!g0||Dr(e)!="ArrayBuffer")&&(!na||na(e))}:na,P3=!Ae(function(){return Object.isExtensible(Object.preventExtensions({}))}),ii=Ii(function(e){var t=$t.f,r=!1,n=gi("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=wo.f,c=fe([].splice),l={};l[n]=1,s(l).length&&(wo.f=function(u){for(var d=s(u),f=0,h=d.length;f<h;f++)if(d[f]===n){c(d,f,1);break}return d},dt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ph.f}))},fastKey:function(s,c){if(!Le(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!J(s,n)){if(!Sc(s))return"F";if(!c)return"E";o(s)}return s[n].objectID},getWeakData:function(s,c){if(!J(s,n)){if(!Sc(s))return!0;if(!c)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return P3&&r&&Sc(s)&&!J(s,n)&&o(s),s}};Fi[n]=!0});ii.enable,ii.fastKey,ii.getWeakData,ii.onFreeze;var T3=TypeError,Sa=function(e,t){this.stopped=e,this.result=t},b0=Sa.prototype,Lb=function(e,t,r){var n,i,o,a,s,c,l,u=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=zl(t,u),v=function(b){return n&&Mu(n,"normal",b),new Sa(!0,b)},y=function(b){return d?(ut(b),p?m(b[0],b[1],v):m(b[0],b[1])):p?m(b,v):m(b)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=gh(e)))throw T3(Di(e)+" is not iterable");if(Pb(i)){for(o=0,a=Li(e);a>o;o++)if((s=y(e[o]))&&Dn(b0,s))return s;return new Sa(!1)}n=Tb(e,i)}for(c=f?e.next:n.next;!(l=kt(c,n)).done;){try{s=y(l.value)}catch(b){Mu(n,"throw",b)}if(typeof s=="object"&&s&&Dn(b0,s))return s}return new Sa(!1)},N3=TypeError,Mb=function(e,t){if(Dn(t,e))return e;throw N3("Incorrect invocation")},$0=function(e,t,r){for(var n in t)Ot(e,n,t[n],r);return e},w0=Xe("species"),I3=$t.f,_0=ii.fastKey,x0=Yt.set,kc=Yt.getterFor,A3={getConstructor:function(e,t,r,n){var i=e(function(l,u){Mb(l,o),x0(l,{type:t,index:ln(null),first:void 0,last:void 0,size:0}),Ee||(l.size=0),Ai(u)||Lb(u,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=kc(t),s=function(l,u,d){var f,h,p=a(l),m=c(l,u);return m?m.value=d:(p.last=m={index:h=_0(u,!0),key:u,value:d,previous:f=p.last,next:void 0,removed:!1},p.first||(p.first=m),f&&(f.next=m),Ee?p.size++:l.size++,h!=="F"&&(p.index[h]=m)),l},c=function(l,u){var d,f=a(l),h=_0(u);if(h!=="F")return f.index[h];for(d=f.first;d;d=d.next)if(d.key==u)return d};return $0(o,{clear:function(){for(var l=a(this),u=l.index,d=l.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete u[d.index],d=d.next;l.first=l.last=void 0,Ee?l.size=0:this.size=0},delete:function(l){var u=this,d=a(u),f=c(u,l);if(f){var h=f.next,p=f.previous;delete d.index[f.index],f.removed=!0,p&&(p.next=h),h&&(h.previous=p),d.first==f&&(d.first=h),d.last==f&&(d.last=p),Ee?d.size--:u.size--}return!!f},forEach:function(l){for(var u,d=a(this),f=zl(l,arguments.length>1?arguments[1]:void 0);u=u?u.next:d.first;)for(f(u.value,u.key,this);u&&u.removed;)u=u.previous},has:function(l){return!!c(this,l)}}),$0(o,r?{get:function(l){var u=c(this,l);return u&&u.value},set:function(l,u){return s(this,l===0?0:l,u)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),Ee&&I3(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=kc(t),o=kc(n);yh(e,t,function(a,s){x0(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,c=a.last;c&&c.removed;)c=c.previous;return a.target&&(a.last=c=c?c.next:a.state.first)?$i(s=="keys"?c.key:s=="values"?c.value:[c.key,c.value],!1):(a.target=void 0,$i(void 0,!0))},r?"entries":"values",!r,!0),function(a){var s=ur(a),c=$t.f;Ee&&s&&!s[w0]&&c(s,w0,{configurable:!0,get:function(){return this}})}(t)}};function jb(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function zb(e){return new this(function(t,r){if(!e||e.length===void 0)return r(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},function(u){n[s]={status:"rejected",reason:u},--i==0&&t(n)})}n[s]={status:"fulfilled",value:c},--i==0&&t(n)}for(var a=0;a<n.length;a++)o(a,n[a])})}(function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=le[e],s=a&&a.prototype,c=a,l={},u=function(v){var y=fe(s[v]);Ot(s,v,v=="add"?function(b){return y(this,b===0?0:b),this}:v=="delete"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:v=="get"?function(b){return i&&!Le(b)?void 0:y(this,b===0?0:b)}:v=="has"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:function(b,g){return y(this,b===0?0:b,g),this})};if(Au(e,!Te(a)||!(i||s.forEach&&!Ae(function(){new a().entries().next()}))))c=r.getConstructor(t,e,n,o),ii.enable();else if(Au(e,!0)){var d=new c,f=d[o](i?{}:-0,1)!=d,h=Ae(function(){d.has(1)}),p=Ab(function(v){new a(v)}),m=!i&&Ae(function(){for(var v=new a,y=5;y--;)v[o](y,y);return!v.has(-0)});p||((c=t(function(v,y){Mb(v,s);var b=function(g,w,x){var E,S;return wr&&Te(E=w.constructor)&&E!==x&&Le(S=E.prototype)&&S!==x.prototype&&wr(g,S),g}(new a,v,c);return Ai(y)||Lb(y,b[o],{that:b,AS_ENTRIES:n}),b})).prototype=s,s.constructor=c),(h||m)&&(u("delete"),u("has"),n&&u("get")),(m||f)&&u(o),i&&s.clear&&delete s.clear}l[e]=c,dt({global:!0,constructor:!0,forced:c!=a},l),tn(c,e),i||r.setStrong(c,e,n)})("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},A3),xo.Set;var D3=setTimeout;function S0(e){return Boolean(e&&e.length!==void 0)}function R3(){}function Ve(e){if(!(this instanceof Ve))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Vb(e,this)}function Ub(e,t){for(;e._state===3;)e=e._value;e._state!==0?(e._handled=!0,Ve._immediateFn(function(){var r=e._state===1?t.onFulfilled:t.onRejected;if(r!==null){var n;try{n=r(e._value)}catch(i){return void So(t.promise,i)}Wu(t.promise,n)}else(e._state===1?Wu:So)(t.promise,e._value)})):e._deferreds.push(t)}function Wu(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&(typeof t=="object"||typeof t=="function")){var r=t.then;if(t instanceof Ve)return e._state=3,e._value=t,void qu(e);if(typeof r=="function")return void Vb((n=r,i=t,function(){n.apply(i,arguments)}),e)}e._state=1,e._value=t,qu(e)}catch(o){So(e,o)}var n,i}function So(e,t){e._state=2,e._value=t,qu(e)}function qu(e){e._state===2&&e._deferreds.length===0&&Ve._immediateFn(function(){e._handled||Ve._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)Ub(e,e._deferreds[t]);e._deferreds=null}function F3(e,t,r){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.promise=r}function Vb(e,t){var r=!1;try{e(function(n){r||(r=!0,Wu(t,n))},function(n){r||(r=!0,So(t,n))})}catch(n){if(r)return;r=!0,So(t,n)}}Ve.prototype.catch=function(e){return this.then(null,e)},Ve.prototype.then=function(e,t){var r=new this.constructor(R3);return Ub(this,new F3(e,t,r)),r},Ve.prototype.finally=jb,Ve.all=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){try{if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},r)}n[s]=c,--i==0&&t(n)}catch(u){r(u)}}for(var a=0;a<n.length;a++)o(a,n[a])})},Ve.allSettled=zb,Ve.resolve=function(e){return e&&typeof e=="object"&&e.constructor===Ve?e:new Ve(function(t){t(e)})},Ve.reject=function(e){return new Ve(function(t,r){r(e)})},Ve.race=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.race accepts an array"));for(var n=0,i=e.length;n<i;n++)Ve.resolve(e[n]).then(t,r)})},Ve._immediateFn=typeof setImmediate=="function"&&function(e){setImmediate(e)}||function(e){D3(e,0)},Ve._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Hn=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();typeof Hn.Promise!="function"?Hn.Promise=Ve:(Hn.Promise.prototype.finally||(Hn.Promise.prototype.finally=jb),Hn.Promise.allSettled||(Hn.Promise.allSettled=zb)),function(e){function t(h){for(var p=0,m=Math.min(65536,h.length+1),v=new Uint16Array(m),y=[],b=0;;){var g=p<h.length;if(!g||b>=m-1){var w=v.subarray(0,b);if(y.push(String.fromCharCode.apply(null,w)),!g)return y.join("");h=h.subarray(p),p=0,b=0}var x=h[p++];if((128&x)==0)v[b++]=x;else if((224&x)==192){var E=63&h[p++];v[b++]=(31&x)<<6|E}else if((240&x)==224){E=63&h[p++];var S=63&h[p++];v[b++]=(31&x)<<12|E<<6|S}else if((248&x)==240){var T=(7&x)<<18|(E=63&h[p++])<<12|(S=63&h[p++])<<6|63&h[p++];T>65535&&(T-=65536,v[b++]=T>>>10&1023|55296,T=56320|1023&T),v[b++]=T}}}var r="Failed to ",n=function(h,p,m){if(h)throw new Error("".concat(r).concat(p,": the '").concat(m,"' option is unsupported."))},i=typeof Buffer=="function"&&Buffer.from,o=i?function(h){return Buffer.from(h)}:function(h){for(var p=0,m=h.length,v=0,y=Math.max(32,m+(m>>>1)+7),b=new Uint8Array(y>>>3<<3);p<m;){var g=h.charCodeAt(p++);if(g>=55296&&g<=56319){if(p<m){var w=h.charCodeAt(p);(64512&w)==56320&&(++p,g=((1023&g)<<10)+(1023&w)+65536)}if(g>=55296&&g<=56319)continue}if(v+4>b.length){y+=8,y=(y*=1+p/h.length*2)>>>3<<3;var x=new Uint8Array(y);x.set(b),b=x}if((4294967168&g)!=0){if((4294965248&g)==0)b[v++]=g>>>6&31|192;else if((4294901760&g)==0)b[v++]=g>>>12&15|224,b[v++]=g>>>6&63|128;else{if((4292870144&g)!=0)continue;b[v++]=g>>>18&7|240,b[v++]=g>>>12&63|128,b[v++]=g>>>6&63|128}b[v++]=63&g|128}else b[v++]=g}return b.slice?b.slice(0,v):b.subarray(0,v)};function a(){this.encoding="utf-8"}a.prototype.encode=function(h,p){return n(p&&p.stream,"encode","stream"),o(h)};var s=!i&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",c=["utf-8","utf8","unicode-1-1-utf-8"],l=t;i?l=function(h,p){return(h instanceof Buffer?h:Buffer.from(h.buffer,h.byteOffset,h.byteLength)).toString(p)}:s&&(l=function(h){try{return function(p){var m;try{var v=new Blob([p],{type:"text/plain;charset=UTF-8"});m=URL.createObjectURL(v);var y=new XMLHttpRequest;return y.open("GET",m,!1),y.send(),y.responseText}finally{m&&URL.revokeObjectURL(m)}}(h)}catch{return t(h)}});var u="construct 'TextDecoder'",d="".concat(r," ").concat(u,": the ");function f(h,p){if(n(p&&p.fatal,u,"fatal"),h=h||"utf-8",!(i?Buffer.isEncoding(h):c.indexOf(h.toLowerCase())!==-1))throw new RangeError("".concat(d," encoding label provided ('").concat(h,"') is invalid."));this.encoding=h,this.fatal=!1,this.ignoreBOM=!1}f.prototype.decode=function(h,p){var m;return n(p&&p.stream,"decode","stream"),m=h instanceof Uint8Array?h:h.buffer instanceof ArrayBuffer?new Uint8Array(h.buffer):new Uint8Array(h),l(m,this.encoding)},e.TextEncoder=e.TextEncoder||a,e.TextDecoder=e.TextDecoder||f}(typeof window<"u"?window:yr),function(){function e(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function t(v,y){for(var b=0;b<y.length;b++){var g=y[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}function r(v,y,b){return y&&t(v.prototype,y),b&&t(v,b),v}function n(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&o(v,y)}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},i(v)}function o(v,y){return o=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},o(v,y)}function a(){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 s(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function c(v,y){return!y||typeof y!="object"&&typeof y!="function"?s(v):y}function l(v){var y=a();return function(){var b,g=i(v);if(y){var w=i(this).constructor;b=Reflect.construct(g,arguments,w)}else b=g.apply(this,arguments);return c(this,b)}}function u(v,y){for(;!Object.prototype.hasOwnProperty.call(v,y)&&(v=i(v))!==null;);return v}function d(v,y,b){return d=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(g,w,x){var E=u(g,w);if(E){var S=Object.getOwnPropertyDescriptor(E,w);return S.get?S.get.call(x):S.value}},d(v,y,b||v)}var f=function(){function v(){e(this,v),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(v,[{key:"addEventListener",value:function(y,b,g){y in this.listeners||(this.listeners[y]=[]),this.listeners[y].push({callback:b,options:g})}},{key:"removeEventListener",value:function(y,b){if(y in this.listeners){for(var g=this.listeners[y],w=0,x=g.length;w<x;w++)if(g[w].callback===b)return void g.splice(w,1)}}},{key:"dispatchEvent",value:function(y){if(y.type in this.listeners){for(var b=this.listeners[y.type].slice(),g=0,w=b.length;g<w;g++){var x=b[g];try{x.callback.call(this,y)}catch(E){Promise.resolve().then(function(){throw E})}x.options&&x.options.once&&this.removeEventListener(y.type,x.callback)}return!y.defaultPrevented}}}]),v}(),h=function(v){n(b,v);var y=l(b);function b(){var g;return e(this,b),(g=y.call(this)).listeners||f.call(s(g)),Object.defineProperty(s(g),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(g),"onabort",{value:null,writable:!0,configurable:!0}),g}return r(b,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(g){g.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,g)),d(i(b.prototype),"dispatchEvent",this).call(this,g)}}]),b}(f),p=function(){function v(){e(this,v),Object.defineProperty(this,"signal",{value:new h,writable:!0,configurable:!0})}return r(v,[{key:"abort",value:function(){var y;try{y=new Event("abort")}catch{typeof document<"u"?document.createEvent?(y=document.createEvent("Event")).initEvent("abort",!1,!1):(y=document.createEventObject()).type="abort":y={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(y)}},{key:"toString",value:function(){return"[object AbortController]"}}]),v}();function m(v){return v.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof v.Request=="function"&&!v.Request.prototype.hasOwnProperty("signal")||!v.AbortController}typeof Symbol<"u"&&Symbol.toStringTag&&(p.prototype[Symbol.toStringTag]="AbortController",h.prototype[Symbol.toStringTag]="AbortSignal"),function(v){m(v)&&(v.AbortController=p,v.AbortSignal=h)}(typeof self<"u"?self:yr)}();var _n=Ii(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var i=this;this.locked=new Map,this.addToLocked=function(o,a){var s=i.locked.get(o);s===void 0?a===void 0?i.locked.set(o,[]):i.locked.set(o,[a]):a!==void 0&&(s.unshift(a),i.locked.set(o,s))},this.isLocked=function(o){return i.locked.has(o)},this.lock=function(o){return new Promise(function(a,s){i.isLocked(o)?i.addToLocked(o,a):(i.addToLocked(o),a())})},this.unlock=function(o){var a=i.locked.get(o);if(a!==void 0&&a.length!==0){var s=a.pop();i.locked.set(o,a),s!==void 0&&setTimeout(s,0)}else i.locked.delete(o)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});rh(_n);var L3=Ii(function(e,t){var r=yr&&yr.__awaiter||function(c,l,u,d){return new(u||(u=Promise))(function(f,h){function p(y){try{v(d.next(y))}catch(b){h(b)}}function m(y){try{v(d.throw(y))}catch(b){h(b)}}function v(y){y.done?f(y.value):new u(function(b){b(y.value)}).then(p,m)}v((d=d.apply(c,l||[])).next())})},n=yr&&yr.__generator||function(c,l){var u,d,f,h,p={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(v){return function(y){return function(b){if(u)throw new TypeError("Generator is already executing.");for(;p;)try{if(u=1,d&&(f=2&b[0]?d.return:b[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,b[1])).done)return f;switch(d=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return p.label++,{value:b[1],done:!1};case 5:p.label++,d=b[1],b=[0];continue;case 7:b=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!((f=f.length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){p=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]<f[3])){p.label=b[1];break}if(b[0]===6&&p.label<f[1]){p.label=f[1],f=b;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(b);break}f[2]&&p.ops.pop(),p.trys.pop();continue}b=l.call(c,p)}catch(g){b=[6,g],d=0}finally{u=f=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([v,y])}}};Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key";function o(c){return new Promise(function(l){return setTimeout(l,c)})}function a(c){for(var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",u="",d=0;d<c;d++)u+=l[Math.floor(Math.random()*l.length)];return u}var s=function(){function c(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+a(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),c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(l,u){return u===void 0&&(u=5e3),r(this,void 0,void 0,function(){var d,f,h,p,m,v;return n(this,function(y){switch(y.label){case 0:d=Date.now()+a(4),f=Date.now()+u,h=i+"-"+l,p=window.localStorage,y.label=1;case 1:return Date.now()<f?[4,o(30)]:[3,8];case 2:return y.sent(),p.getItem(h)!==null?[3,5]:(m=this.id+"-"+l+"-"+d,[4,o(Math.floor(25*Math.random()))]);case 3:return y.sent(),p.setItem(h,JSON.stringify({id:this.id,iat:d,timeoutKey:m,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return y.sent(),(v=p.getItem(h))!==null&&(v=JSON.parse(v)).id===this.id&&v.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(h,d),[2,!0]):[3,7];case 5:return c.lockCorrector(),[4,this.waitForSomethingToChange(f)];case 6:y.sent(),y.label=7;case 7:return d=Date.now()+a(4),[3,1];case 8:return[2,!1]}})})},c.prototype.refreshLockWhileAcquired=function(l,u){return r(this,void 0,void 0,function(){var d=this;return n(this,function(f){return setTimeout(function(){return r(d,void 0,void 0,function(){var h,p;return n(this,function(m){switch(m.label){case 0:return[4,_n.default().lock(u)];case 1:return m.sent(),this.acquiredIatSet.has(u)?(h=window.localStorage,(p=h.getItem(l))===null?(_n.default().unlock(u),[2]):((p=JSON.parse(p)).timeRefreshed=Date.now(),h.setItem(l,JSON.stringify(p)),_n.default().unlock(u),this.refreshLockWhileAcquired(l,u),[2])):(_n.default().unlock(u),[2])}})})},1e3),[2]})})},c.prototype.waitForSomethingToChange=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,new Promise(function(d){var f=!1,h=Date.now(),p=!1;function m(){if(p||(window.removeEventListener("storage",m),c.removeFromWaiting(m),clearTimeout(v),p=!0),!f){f=!0;var y=50-(Date.now()-h);y>0?setTimeout(d,y):d()}}window.addEventListener("storage",m),c.addToWaiting(m);var v=setTimeout(m,Math.max(0,l-Date.now()))})];case 1:return u.sent(),[2]}})})},c.addToWaiting=function(l){this.removeFromWaiting(l),c.waiters!==void 0&&c.waiters.push(l)},c.removeFromWaiting=function(l){c.waiters!==void 0&&(c.waiters=c.waiters.filter(function(u){return u!==l}))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach(function(l){return l()})},c.prototype.releaseLock=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,this.releaseLock__private__(l)];case 1:return[2,u.sent()]}})})},c.prototype.releaseLock__private__=function(l){return r(this,void 0,void 0,function(){var u,d,f;return n(this,function(h){switch(h.label){case 0:return u=window.localStorage,d=i+"-"+l,(f=u.getItem(d))===null?[2]:(f=JSON.parse(f)).id!==this.id?[3,2]:[4,_n.default().lock(f.iat)];case 1:h.sent(),this.acquiredIatSet.delete(f.iat),u.removeItem(d),_n.default().unlock(f.iat),c.notifyWaiters(),h.label=2;case 2:return[2]}})})},c.lockCorrector=function(){for(var l=Date.now()-5e3,u=window.localStorage,d=Object.keys(u),f=!1,h=0;h<d.length;h++){var p=d[h];if(p.includes(i)){var m=u.getItem(p);m!==null&&((m=JSON.parse(m)).timeRefreshed===void 0&&m.timeAcquired<l||m.timeRefreshed!==void 0&&m.timeRefreshed<l)&&(u.removeItem(p),f=!0)}}f&&c.notifyWaiters()},c.waiters=void 0,c}();t.default=s}),M3=rh(L3),j3={timeoutInSeconds:60},z3=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Bb={name:"auth0-spa-js",version:"1.22.6"},Wb=function(){return Date.now()},Mr=function(e){function t(r,n){var i=e.call(this,n)||this;return i.error=r,i.error_description=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t.fromPayload=function(r){return new t(r.error,r.error_description)},t}(Error),U3=function(e){function t(r,n,i,o){o===void 0&&(o=null);var a=e.call(this,r,n)||this;return a.state=i,a.appState=o,Object.setPrototypeOf(a,t.prototype),a}return zn(t,e),t}(Mr),Hu=function(e){function t(){var r=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(r,t.prototype),r}return zn(t,e),t}(Mr),V3=function(e){function t(r){var n=e.call(this)||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Hu),B3=function(e){function t(r){var n=e.call(this,"cancelled","Popup closed")||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Mr),W3=function(e){function t(r,n,i){var o=e.call(this,r,n)||this;return o.mfa_token=i,Object.setPrototypeOf(o,t.prototype),o}return zn(t,e),t}(Mr),q3=function(e){function t(r,n){var i=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(E0(r,["default"]),"', scope: '").concat(E0(n),"')"))||this;return i.audience=r,i.scope=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t}(Mr),H3=function(e){return new Promise(function(t,r){var n,i=setInterval(function(){e.popup&&e.popup.closed&&(clearInterval(i),clearTimeout(o),window.removeEventListener("message",n,!1),r(new B3(e.popup)))},1e3),o=setTimeout(function(){clearInterval(i),r(new V3(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(a){if(a.data&&a.data.type==="authorization_response"){if(clearTimeout(o),clearInterval(i),window.removeEventListener("message",n,!1),e.popup.close(),a.data.response.error)return r(Mr.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",n)})},$h=function(){return window.crypto||window.msCrypto},qb=function(){var e=$h();return e.subtle||e.webkitSubtle},Cr=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from($h().getRandomValues(new Uint8Array(43))).forEach(function(r){return t+=e[r%e.length]}),t},Gn=function(e){return btoa(e)},Gu=function(e){return Object.keys(e).filter(function(t){return e[t]!==void 0}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},Ec=function(e){return ve(void 0,void 0,void 0,function(){var t;return ye(this,function(r){switch(r.label){case 0:return t=qb().digest({name:"SHA-256"},new TextEncoder().encode(e)),window.msCrypto?[2,new Promise(function(n,i){t.oncomplete=function(o){n(o.target.result)},t.onerror=function(o){i(o.error)},t.onabort=function(){i("The digest operation was aborted")}})]:[4,t];case 1:return[2,r.sent()]}})})},k0=function(e){return function(t){return decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},Oc=function(e){var t=new Uint8Array(e);return function(r){var n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,function(i){return n[i]})}(window.btoa(String.fromCharCode.apply(String,Cu([],vi(Array.from(t)),!1))))};function E0(e,t){return t===void 0&&(t=[]),e&&!t.includes(e)?e:""}var G3=function(e,t){return ve(void 0,void 0,void 0,function(){var r,n;return ye(this,function(i){switch(i.label){case 0:return[4,(o=e,a=t,a=a||{},new Promise(function(s,c){var l=new XMLHttpRequest,u=[],d=[],f={},h=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:h,headers:{keys:function(){return u},entries:function(){return d},get:function(m){return f[m.toLowerCase()]},has:function(m){return m.toLowerCase()in f}}}};for(var p in l.open(a.method||"get",o,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(m,v,y){u.push(v=v.toLowerCase()),d.push([v,y]),f[v]=f[v]?f[v]+","+y:y}),s(h())},l.onerror=c,l.withCredentials=a.credentials=="include",a.headers)l.setRequestHeader(p,a.headers[p]);l.send(a.body||null)}))];case 1:return r=i.sent(),n={ok:r.ok},[4,r.json()];case 2:return[2,(n.json=i.sent(),n)]}var o,a})})},Q3=function(e,t,r){return ve(void 0,void 0,void 0,function(){var n,i;return ye(this,function(o){return n=new AbortController,t.signal=n.signal,[2,Promise.race([G3(e,t),new Promise(function(a,s){i=setTimeout(function(){n.abort(),s(new Error("Timeout when executing 'fetch'"))},r)})]).finally(function(){clearTimeout(i)})]})})},K3=function(e,t,r,n,i,o,a){return ve(void 0,void 0,void 0,function(){return ye(this,function(s){return[2,(c={auth:{audience:t,scope:r},timeout:i,fetchUrl:e,fetchOptions:n,useFormData:a},l=o,new Promise(function(u,d){var f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?d(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))];var c,l})})},Y3=function(e,t,r,n,i,o,a){return a===void 0&&(a=1e4),ve(void 0,void 0,void 0,function(){return ye(this,function(s){return i?[2,K3(e,t,r,n,a,i,o)]:[2,Q3(e,n,a)]})})};function X3(e,t,r,n,i,o,a){return ve(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m;return ye(this,function(v){switch(v.label){case 0:s=null,l=0,v.label=1;case 1:if(!(l<3))return[3,6];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,Y3(e,r,n,i,o,a,t)];case 3:return c=v.sent(),s=null,[3,6];case 4:return u=v.sent(),s=u,[3,5];case 5:return l++,[3,1];case 6:if(s)throw s.message=s.message||"Failed to fetch",s;if(d=c.json,f=d.error,h=d.error_description,p=At(d,["error","error_description"]),!c.ok)throw m=h||"HTTP error. Unable to fetch ".concat(e),f==="mfa_required"?new W3(f,m,p.mfa_token):new Mr(f||"request_error",m);return[2,p]}})})}function ia(e,t){var r=e.baseUrl,n=e.timeout,i=e.audience,o=e.scope,a=e.auth0Client,s=e.useFormData,c=At(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return ve(this,void 0,void 0,function(){var l;return ye(this,function(u){switch(u.label){case 0:return l=s?Gu(c):JSON.stringify(c),[4,X3("".concat(r,"/oauth/token"),n,i||"default",o,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||Bb))}},t,s)];case 1:return[2,u.sent()]}})})}var Z3=function(e){return Array.from(new Set(e))},Hr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Z3(e.join(" ").trim().split(/\s+/)).join(" ")},En=function(){function e(t,r){r===void 0&&(r="@@auth0spajs@@"),this.prefix=r,this.client_id=t.client_id,this.scope=t.scope,this.audience=t.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var r=vi(t.split("::"),4),n=r[0],i=r[1],o=r[2];return new e({client_id:i,scope:r[3],audience:o},n)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),J3=function(){function e(){}return e.prototype.set=function(t,r){localStorage.setItem(t,JSON.stringify(r))},e.prototype.get=function(t){var r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}},e.prototype.remove=function(t){localStorage.removeItem(t)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter(function(t){return t.startsWith("@@auth0spajs@@")})},e}(),e4=function(){var e;this.enclosedCache=(e={},{set:function(t,r){e[t]=r},get:function(t){var r=e[t];if(r)return r},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},t4=function(){function e(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n,this.nowProvider=this.nowProvider||Wb}return e.prototype.get=function(t,r){var n;return r===void 0&&(r=0),ve(this,void 0,void 0,function(){var i,o,a,s,c;return ye(this,function(l){switch(l.label){case 0:return[4,this.cache.get(t.toKey())];case 1:return(i=l.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=l.sent())?(a=this.matchExistingCacheKey(t,o))?[4,this.cache.get(a)]:[3,4]:[2];case 3:i=l.sent(),l.label=4;case 4:return i?[4,this.nowProvider()]:[2];case 5:return s=l.sent(),c=Math.floor(s/1e3),i.expiresAt-r<c?i.body.refresh_token?(i.body={refresh_token:i.body.refresh_token},[4,this.cache.set(t.toKey(),i)]):[3,7]:[3,10];case 6:return l.sent(),[2,i.body];case 7:return[4,this.cache.remove(t.toKey())];case 8:return l.sent(),[4,(n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey())];case 9:return l.sent(),[2];case 10:return[2,i.body]}})})},e.prototype.set=function(t){var r;return ve(this,void 0,void 0,function(){var n,i;return ye(this,function(o){switch(o.label){case 0:return n=new En({client_id:t.client_id,scope:t.scope,audience:t.audience}),[4,this.wrapCacheEntry(t)];case 1:return i=o.sent(),[4,this.cache.set(n.toKey(),i)];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey())];case 3:return o.sent(),[2]}})})},e.prototype.clear=function(t){var r;return ve(this,void 0,void 0,function(){var n,i=this;return ye(this,function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=o.sent())?[4,n.filter(function(a){return!t||a.includes(t)}).reduce(function(a,s){return ve(i,void 0,void 0,function(){return ye(this,function(c){switch(c.label){case 0:return[4,a];case 1:return c.sent(),[4,this.cache.remove(s)];case 2:return c.sent(),[2]}})})},Promise.resolve())]:[2];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.clear()];case 3:return o.sent(),[2]}})})},e.prototype.clearSync=function(t){var r=this,n=this.cache.allKeys();n&&n.filter(function(i){return!t||i.includes(t)}).forEach(function(i){r.cache.remove(i)})},e.prototype.wrapCacheEntry=function(t){return ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),n=Math.floor(r/1e3)+t.expires_in,i=Math.min(n,t.decodedToken.claims.exp),[2,{body:t,expiresAt:i}]}})})},e.prototype.getCacheKeys=function(){var t;return ve(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return r=(t=n.sent())===null||t===void 0?void 0:t.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.matchExistingCacheKey=function(t,r){return r.filter(function(n){var i=En.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),a=t.scope.split(" "),s=i.scope&&a.reduce(function(c,l){return c&&o.has(l)},!0);return i.prefix==="@@auth0spajs@@"&&i.client_id===t.client_id&&i.audience===t.audience&&s})[0]},e}(),r4=function(){function e(t,r){this.storage=t,this.clientId=r,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(t){this.transaction=t,this.storage.save(this.storageKey,t,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Ki=function(e){return typeof e=="number"},n4=["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"],i4=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(s){var c=s.split("."),l=vi(c,3),u=l[0],d=l[1],f=l[2];if(c.length!==3||!u||!d||!f)throw new Error("ID token could not be decoded");var h=JSON.parse(k0(d)),p={__raw:s},m={};return Object.keys(h).forEach(function(v){p[v]=h[v],n4.includes(v)||(m[v]=h[v])}),{encoded:{header:u,payload:d,signature:f},header:JSON.parse(k0(u)),claims:p,user:m}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.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(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Ki(t.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(!Ki(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ki(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var r=e.leeway||60,n=new Date(e.now||Date.now()),i=new Date(0),o=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),i.setUTCSeconds(t.claims.exp+r),o.setUTCSeconds(t.claims.nbf-r),n>i)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(i,")"));if(Ki(t.claims.nbf)&&n<o)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(n,") is before ").concat(o));if(Ki(t.claims.auth_time)&&n>a)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. Currrent time (".concat(n,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},On=Ii(function(e,t){var r=yr&&yr.__assign||function(){return r=Object.assign||function(c){for(var l,u=1,d=arguments.length;u<d;u++)for(var f in l=arguments[u])Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f]);return c},r.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function i(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).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 n("Expires",d.expires?d.expires.toUTCString():"")+n("Domain",d.domain)+n("Path",d.path)+n("Secure",d.secure)+n("SameSite",d.sameSite)}(u)}function o(c){for(var l={},u=c?c.split("; "):[],d=/(%[\dA-F]{2})+/gi,f=0;f<u.length;f++){var h=u[f].split("="),p=h.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{l[h[0].replace(d,decodeURIComponent)]=p.replace(d,decodeURIComponent)}catch{}}return l}function a(){return o(document.cookie)}function s(c,l,u){document.cookie=i(c,l,r({path:"/"},u))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(c){return a()[c]},t.set=s,t.remove=function(c,l){s(c,"",r(r({},l),{expires:-1}))}});rh(On),On.encode,On.parse,On.getAll;var o4=On.get,Hb=On.set,Gb=On.remove,Jn={get:function(e){var t=o4(e);if(t!==void 0)return JSON.parse(t)},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),Hb(e,JSON.stringify(t),n)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Gb(e,r)}},a4={get:function(e){var t=Jn.get(e);return t||Jn.get("".concat("_legacy_").concat(e))},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),Hb("".concat("_legacy_").concat(e),JSON.stringify(t),n),Jn.save(e,t,r)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Gb(e,r),Jn.remove(e,t),Jn.remove("".concat("_legacy_").concat(e),t)}},s4={get:function(e){if(typeof sessionStorage<"u"){var t=sessionStorage.getItem(e);if(t!==void 0)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function l4(e,t,r){var n=t===void 0?null:t,i=function(c,l){var u=atob(c);if(l){for(var d=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)d[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return u}(e,r!==void 0&&r),o=i.indexOf(`
1
+ "use strict";const hr={};function h$(e){hr.context=e}const p$=(e,t)=>e===t,$r=Symbol("solid-proxy"),_u=Symbol("solid-track"),gs={equals:p$};let Rg=zg;const Vr=1,bs=2,Fg={owned:null,cleanups:null,context:null,owner:null};var it=null;let Cn=null,et=null,mt=null,Ar=null,th=0;function $a(e,t){const r=et,n=it,i=e.length===0,o=i?Fg:{owned:null,cleanups:null,context:null,owner:t||n},a=i?e:()=>e(()=>V(()=>Dl(o)));it=o,et=null;try{return Ti(a,!0)}finally{et=r,it=n}}function F(e,t){t=t?Object.assign({},gs,t):gs;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),jg(r,i));return[Mg.bind(r),n]}function m$(e,t,r){const n=Al(e,t,!0,Vr);Pi(n)}function W(e,t,r){const n=Al(e,t,!1,Vr);Pi(n)}function me(e,t,r){Rg=_$;const n=Al(e,t,!1,Vr);n.user=!0,Ar?Ar.push(n):Pi(n)}function pe(e,t,r){r=r?Object.assign({},gs,r):gs;const n=Al(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Pi(n),Mg.bind(n)}function v$(e){return Ti(e,!1)}function V(e){const t=et;et=null;try{return e()}finally{et=t}}function Tt(e){me(()=>V(e))}function Il(e){return it===null||(it.cleanups===null?it.cleanups=[e]:it.cleanups.push(e)),e}function Lg(){return et}function P(){return it}function y$(e,t){const r=Symbol("context");return{id:r,Provider:S$(r),defaultValue:e}}function g$(e){let t;return(t=Bg(it,e.id))!==void 0?t:e.defaultValue}function b$(e){const t=pe(e),r=pe(()=>xu(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function Mg(){const e=Cn;if(this.sources&&(this.state||e))if(this.state===Vr||e)Pi(this);else{const t=mt;mt=null,Ti(()=>ws(this),!1),mt=t}if(et){const t=this.observers?this.observers.length:0;et.sources?(et.sources.push(this),et.sourceSlots.push(t)):(et.sources=[this],et.sourceSlots=[t]),this.observers?(this.observers.push(et),this.observerSlots.push(et.sources.length-1)):(this.observers=[et],this.observerSlots=[et.sources.length-1])}return this.value}function jg(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&Ti(()=>{for(let i=0;i<e.observers.length;i+=1){const o=e.observers[i],a=Cn&&Cn.running;a&&Cn.disposed.has(o),(a&&!o.tState||!a&&!o.state)&&(o.pure?mt.push(o):Ar.push(o),o.observers&&Ug(o)),a||(o.state=Vr)}if(mt.length>1e6)throw mt=[],new Error},!1)),t}function Pi(e){if(!e.fn)return;Dl(e);const t=it,r=et,n=th;et=it=e,$$(e,e.value,n),et=r,it=t}function $$(e,t,r){let n;try{n=e.fn(t)}catch(i){e.pure&&(e.state=Vr,e.owned&&e.owned.forEach(Dl),e.owned=null),Vg(i)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?jg(e,n):e.value=n,e.updatedAt=r)}function Al(e,t,r,n=Vr,i){const o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:it,context:null,pure:r};return it===null||it!==Fg&&(it.owned?it.owned.push(o):it.owned=[o]),o}function $s(e){const t=Cn;if(e.state===0||t)return;if(e.state===bs||t)return ws(e);if(e.suspense&&V(e.suspense.inFallback))return e.suspense.effects.push(e);const r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<th);)(e.state||t)&&r.push(e);for(let n=r.length-1;n>=0;n--)if(e=r[n],e.state===Vr||t)Pi(e);else if(e.state===bs||t){const i=mt;mt=null,Ti(()=>ws(e,r[0]),!1),mt=i}}function Ti(e,t){if(mt)return e();let r=!1;t||(mt=[]),Ar?r=!0:Ar=[],th++;try{const n=e();return w$(r),n}catch(n){mt||(Ar=null),mt=null,Vg(n)}}function w$(e){if(mt&&(zg(mt),mt=null),e)return;const t=Ar;Ar=null,t.length&&Ti(()=>Rg(t),!1)}function zg(e){for(let t=0;t<e.length;t++)$s(e[t])}function _$(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:$s(n)}for(hr.context&&h$(),t=0;t<r;t++)$s(e[t])}function ws(e,t){const r=Cn;e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];i.sources&&(i.state===Vr||r?i!==t&&$s(i):(i.state===bs||r)&&ws(i,t))}}function Ug(e){const t=Cn;for(let r=0;r<e.observers.length;r+=1){const n=e.observers[r];(!n.state||t)&&(n.state=bs,n.pure?mt.push(n):Ar.push(n),n.observers&&Ug(n))}}function Dl(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),i=r.observers;if(i&&i.length){const o=i.pop(),a=r.observerSlots.pop();n<i.length&&(o.sourceSlots[a]=n,i[n]=o,r.observerSlots[n]=a)}}if(e.owned){for(t=0;t<e.owned.length;t++)Dl(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function x$(e){return e instanceof Error||typeof e=="string"?e:new Error("Unknown error")}function Vg(e){throw e=x$(e),e}function Bg(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:Bg(e.owner,t):void 0}function xu(e){if(typeof e=="function"&&!e.length)return xu(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=xu(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function S$(e,t){return function(n){let i;return W(()=>i=V(()=>(it.context={[e]:n.value},b$(()=>n.children))),void 0),i}}const k$=Symbol("fallback");function $p(e){for(let t=0;t<e.length;t++)e[t]()}function E$(e,t,r={}){let n=[],i=[],o=[],a=0,s=t.length>1?[]:null;return Il(()=>$p(o)),()=>{let c=e()||[],l,u;return c[_u],V(()=>{let f=c.length,h,p,m,v,y,b,g,w,x;if(f===0)a!==0&&($p(o),o=[],n=[],i=[],a=0,s&&(s=[])),r.fallback&&(n=[k$],i[0]=$a(E=>(o[0]=E,r.fallback())),a=1);else if(a===0){for(i=new Array(f),u=0;u<f;u++)n[u]=c[u],i[u]=$a(d);a=f}else{for(m=new Array(f),v=new Array(f),s&&(y=new Array(f)),b=0,g=Math.min(a,f);b<g&&n[b]===c[b];b++);for(g=a-1,w=f-1;g>=b&&w>=b&&n[g]===c[w];g--,w--)m[w]=i[g],v[w]=o[g],s&&(y[w]=s[g]);for(h=new Map,p=new Array(w+1),u=w;u>=b;u--)x=c[u],l=h.get(x),p[u]=l===void 0?-1:l,h.set(x,u);for(l=b;l<=g;l++)x=n[l],u=h.get(x),u!==void 0&&u!==-1?(m[u]=i[l],v[u]=o[l],s&&(y[u]=s[l]),u=p[u],h.set(x,u)):o[l]();for(u=b;u<f;u++)u in m?(i[u]=m[u],o[u]=v[u],s&&(s[u]=y[u],s[u](u))):i[u]=$a(d);i=i.slice(0,a=f),n=c.slice(0)}return i});function d(f){if(o[u]=f,s){const[h,p]=F(u);return s[u]=p,t(c[u],h)}return t(c[u])}}}function z(e,t){return V(()=>e(t||{}))}function Yo(){return!0}const O$={get(e,t,r){return t===$r?r:e.get(t)},has(e,t){return t===$r?!0:e.has(t)},set:Yo,deleteProperty:Yo,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Yo,deleteProperty:Yo}},ownKeys(e){return e.keys()}};function uc(e){return(e=typeof e=="function"?e():e)?e:{}}function Su(...e){let t=!1;for(let n=0;n<e.length;n++){const i=e[n];t=t||!!i&&$r in i,e[n]=typeof i=="function"?(t=!0,pe(i)):i}if(t)return new Proxy({get(n){for(let i=e.length-1;i>=0;i--){const o=uc(e[i])[n];if(o!==void 0)return o}},has(n){for(let i=e.length-1;i>=0;i--)if(n in uc(e[i]))return!0;return!1},keys(){const n=[];for(let i=0;i<e.length;i++)n.push(...Object.keys(uc(e[i])));return[...new Set(n)]}},O$);const r={};for(let n=e.length-1;n>=0;n--)if(e[n]){const i=Object.getOwnPropertyDescriptors(e[n]);for(const o in i)o in r||Object.defineProperty(r,o,{enumerable:!0,get(){for(let a=e.length-1;a>=0;a--){const s=(e[a]||{})[o];if(s!==void 0)return s}}})}return r}function Rl(e){const t="fallback"in e&&{fallback:()=>e.fallback};return pe(E$(()=>e.each,e.children,t||void 0))}function re(e){let t=!1;const r=e.keyed,n=pe(()=>e.when,void 0,{equals:(i,o)=>t?i===o:!i==!o});return pe(()=>{const i=n();if(i){const o=e.children,a=typeof o=="function"&&o.length>0;return t=r||a,a?V(()=>o(i)):o}return e.fallback},void 0,void 0)}function C$(e,t,r){let n=r.length,i=t.length,o=n,a=0,s=0,c=t[i-1].nextSibling,l=null;for(;a<i||s<o;){if(t[a]===r[s]){a++,s++;continue}for(;t[i-1]===r[o-1];)i--,o--;if(i===a){const u=o<n?s?r[s-1].nextSibling:r[o-s]:c;for(;s<o;)e.insertBefore(r[s++],u)}else if(o===s)for(;a<i;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[o-1]&&r[s]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--o],u),t[i]=r[o]}else{if(!l){l=new Map;let d=s;for(;d<o;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<o){let d=a,f=1,h;for(;++d<i&&d<o&&!((h=l.get(t[d]))==null||h!==u+f);)f++;if(f>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}const wp="_$DX_DELEGATE";function O(e,t,r){const n=document.createElement("template");n.innerHTML=e;let i=n.content.firstChild;return r&&(i=i.firstChild),i}function Ni(e,t=window.document){const r=t[wp]||(t[wp]=new Set);for(let n=0,i=e.length;n<i;n++){const o=e[n];r.has(o)||(r.add(o),t.addEventListener(o,I$))}}function P$(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function _p(e,t){t==null?e.removeAttribute("class"):e.className=t}function T$(e,t,r={}){const n=Object.keys(t||{}),i=Object.keys(r);let o,a;for(o=0,a=i.length;o<a;o++){const s=i[o];!s||s==="undefined"||t[s]||(xp(e,s,!1),delete r[s])}for(o=0,a=n.length;o<a;o++){const s=n[o],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(xp(e,s,!0),r[s]=c)}return r}function N$(e,t,r){if(!t)return r?P$(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let i,o;for(o in r)t[o]==null&&n.removeProperty(o),delete r[o];for(o in t)i=t[o],i!==r[o]&&(n.setProperty(o,i),r[o]=i);return r}function ee(e,t,r){return V(()=>e(t,r))}function _(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return _s(e,t,n,r);W(i=>_s(e,t(),i,r),n)}function xp(e,t,r){const n=t.trim().split(/\s+/);for(let i=0,o=n.length;i<o;i++)e.classList.toggle(n[i],r)}function I$(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),hr.registry&&!hr.done&&(hr.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+e;){let i=n.nextSibling;n.remove(),n=i}n&&n.remove()}));r;){const n=r[t];if(n&&!r.disabled){const i=r[`${t}Data`];if(i!==void 0?n.call(r,i,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function _s(e,t,r,n,i){for(hr.context&&!r&&(r=[...e.childNodes]);typeof r=="function";)r=r();if(t===r)return r;const o=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,o==="string"||o==="number"){if(hr.context)return r;if(o==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Wn(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||o==="boolean"){if(hr.context)return r;r=Wn(e,r,n)}else{if(o==="function")return W(()=>{let s=t();for(;typeof s=="function";)s=s();r=_s(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(ku(s,t,r,i))return W(()=>r=_s(e,s,r,n,!0)),()=>r;if(hr.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Wn(e,r,n),a)return r}else c?r.length===0?Sp(e,s,n):C$(e,r,s):(r&&Wn(e),Sp(e,s));r=s}else if(t instanceof Node){if(hr.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Wn(e,r,n,t);Wn(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function ku(e,t,r,n){let i=!1;for(let o=0,a=t.length;o<a;o++){let s=t[o],c=r&&r[o];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))i=ku(e,s,c)||i;else if(typeof s=="function")if(n){for(;typeof s=="function";)s=s();i=ku(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||i}else e.push(s),i=!0;else{const l=String(s);c&&c.nodeType===3&&c.data===l?e.push(c):e.push(document.createTextNode(l))}}return i}function Sp(e,t,r=null){for(let n=0,i=t.length;n<i;n++)e.insertBefore(t[n],r)}function Wn(e,t,r,n){if(r===void 0)return e.textContent="";const i=n||document.createTextNode("");if(t.length){let o=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(i!==s){const c=s.parentNode===e;!o&&!a?c?e.replaceChild(i,s):e.insertBefore(i,r):c&&s.remove()}else o=!0}}else e.insertBefore(i,r);return[i]}function A$(e){return Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=Object.assign({},i),qg(i.value)&&!M$(i.value)&&!Array.isArray(i.value)&&(r[n].value=Object.assign({},i.value)),Array.isArray(i.value)&&(r[n].value=i.value.slice(0)),r},{})}function D$(e){return e?Object.keys(e).reduce((r,n)=>{const i=e[n];return r[n]=qg(i)&&"value"in i?i:{value:i},r[n].attribute||(r[n].attribute=L$(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function R$(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function F$(e,t){const r=A$(t);return Object.keys(t).forEach(i=>{const o=r[i],a=e.getAttribute(o.attribute),s=e[i];a&&(o.value=o.parse?Wg(a):a),s!=null&&(o.value=Array.isArray(s)?s.slice(0):s),o.reflect&&kp(e,o.attribute,o.value),Object.defineProperty(e,i,{get(){return o.value},set(c){const l=o.value;o.value=c,o.reflect&&kp(this,o.attribute,o.value);for(let u=0,d=this.__propertyChangedCallbacks.length;u<d;u++)this.__propertyChangedCallbacks[u](i,c,l)},enumerable:!0,configurable:!0})}),r}function Wg(e){if(!!e)try{return JSON.parse(e)}catch{return e}}function kp(e,t,r){if(r==null||r===!1)return e.removeAttribute(t);let n=JSON.stringify(r);e.__updating[t]=!0,n==="true"&&(n=""),e.setAttribute(t,n),Promise.resolve().then(()=>delete e.__updating[t])}function L$(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function qg(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function M$(e){return Object.prototype.toString.call(e)==="[object Function]"}function j$(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let dc;function z$(e,t){const r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(i=>t[i].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=F$(this,t);const i=R$(this.props),o=this.Component,a=dc;try{dc=this,this.__initialized=!0,j$(o)?new o(i,{element:this}):o(i,{element:this})}finally{dc=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let i=null;for(;i=this.__releaseCallbacks.pop();)i(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(i,o,a){if(!!this.__initialized&&!this.__updating[i]&&(i=this.lookupProp(i),i in t)){if(a==null&&!this[i])return;this[i]=t[i].parse?Wg(a):a}}lookupProp(i){if(!!t)return r.find(o=>i===o||i===t[o].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(i){this.__releaseCallbacks.push(i)}addPropertyChangedCallback(i){this.__propertyChangedCallbacks.push(i)}}}function U$(e,t={},r={}){const{BaseElement:n=HTMLElement,extension:i}=r;return o=>{if(!e)throw new Error("tag is required to register a Component");let a=customElements.get(e);return a?(a.prototype.Component=o,a):(a=z$(n,D$(t)),a.prototype.Component=o,a.prototype.registeredTag=e,customElements.define(e,a,i),a)}}function V$(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const[i,o]=F(e[t[n]]);Object.defineProperty(r,t[n],{get:i,set(a){o(()=>a)}})}return r}function B$(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function W$(e){return(t,r)=>{const{element:n}=r;return $a(i=>{const o=V$(t);n.addPropertyChangedCallback((s,c)=>o[s]=c),n.addReleaseCallback(()=>{n.renderRoot.textContent="",i()});const a=e(o,r);return _(n.renderRoot,a)},B$(n))}}function $e(e,t,r){return arguments.length===2&&(r=t,t={}),U$(e,t)(W$(r))}const Hg=y$(),rt=()=>g$(Hg),q$=(e,t)=>{const r=[];return t.forEach(n=>{(!Object.keys(e).includes(n)||e[n]==null)&&r.push(`photon-client requires ${n}, but no value was provided`)}),r.forEach(n=>console.warn(n)),r},H$=/[?&]code=[^&]+/,G$=/[?&]state=[^&]+/,Q$=/[?&]error=[^&]+/,K$=(e=window.location.search)=>(H$.test(e)||Q$.test(e))&&G$.test(e),Ep=e=>e.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),Y$=e=>/^\d+$/.test(e)&&e.length>=5;var Eu=function(e,t){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Eu(e,t)};function cr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Eu(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var C=function(){return C=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},C.apply(this,arguments)};function sn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function ie(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function Yr(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function xs(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Ou=function(e,t){return Ou=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ou(e,t)};function zn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ou(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var se=function(){return se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function At(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function ve(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(l){try{c(n.next(l))}catch(u){o(u)}}function s(l){try{c(n.throw(l))}catch(u){o(u)}}function c(l){var u;l.done?i(l.value):(u=l.value,u instanceof r?u:new r(function(d){d(u)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function ye(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||u[0]!==6&&u[0]!==2)){a=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(u[0]===6&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(d){u=[6,d],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}}function vi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Cu(e,t,r){if(r||arguments.length===2)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e,t){return e(t={exports:{}},t.exports),t.exports}var Wr,wa,Xo=function(e){return e&&e.Math==Math&&e},le=Xo(typeof globalThis=="object"&&globalThis)||Xo(typeof window=="object"&&window)||Xo(typeof self=="object"&&self)||Xo(typeof yr=="object"&&yr)||function(){return this}()||Function("return this")(),Ae=function(e){try{return!!e()}catch{return!0}},Ee=!Ae(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Lo=!Ae(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zo=Function.prototype.call,kt=Lo?Zo.bind(Zo):function(){return Zo.apply(Zo,arguments)},Op={}.propertyIsEnumerable,Cp=Object.getOwnPropertyDescriptor,X$=Cp&&!Op.call({1:2},1)?function(e){var t=Cp(this,e);return!!t&&t.enumerable}:Op,nh={f:X$},An=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Gg=Function,Qg=Gg.prototype,Z$=Qg.bind,Pu=Qg.call,J$=Lo&&Z$.bind(Pu,Pu),fe=function(e){return e instanceof Gg?Lo?J$(e):function(){return Pu.apply(e,arguments)}:void 0},ew=fe({}.toString),tw=fe("".slice),Dr=function(e){return tw(ew(e),8,-1)},fc=Object,rw=fe("".split),Kg=Ae(function(){return!fc("z").propertyIsEnumerable(0)})?function(e){return Dr(e)=="String"?rw(e,""):fc(e)}:fc,Ai=function(e){return e==null},nw=TypeError,Mo=function(e){if(Ai(e))throw nw("Can't call method on "+e);return e},Er=function(e){return Kg(Mo(e))},hc=typeof document=="object"&&document.all,Fl={all:hc,IS_HTMLDDA:hc===void 0&&hc!==void 0},iw=Fl.all,Te=Fl.IS_HTMLDDA?function(e){return typeof e=="function"||e===iw}:function(e){return typeof e=="function"},ow=Fl.all,Le=Fl.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Te(e)||e===ow}:function(e){return typeof e=="object"?e!==null:Te(e)},aw=function(e){return Te(e)?e:void 0},ur=function(e,t){return arguments.length<2?aw(le[e]):le[e]&&le[e][t]},Dn=fe({}.isPrototypeOf),pc=ur("navigator","userAgent")||"",Pp=le.process,Tp=le.Deno,Np=Pp&&Pp.versions||Tp&&Tp.version,Ip=Np&&Np.v8;Ip&&(wa=(Wr=Ip.split("."))[0]>0&&Wr[0]<4?1:+(Wr[0]+Wr[1])),!wa&&pc&&(!(Wr=pc.match(/Edge\/(\d+)/))||Wr[1]>=74)&&(Wr=pc.match(/Chrome\/(\d+)/))&&(wa=+Wr[1]);var Ss=wa,qt=!!Object.getOwnPropertySymbols&&!Ae(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ss&&Ss<41}),ih=qt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",sw=Object,yi=ih?function(e){return typeof e=="symbol"}:function(e){var t=ur("Symbol");return Te(t)&&Dn(t.prototype,sw(e))},lw=String,Di=function(e){try{return lw(e)}catch{return"Object"}},cw=TypeError,oh=function(e){if(Te(e))return e;throw cw(Di(e)+" is not a function")},ks=function(e,t){var r=e[t];return Ai(r)?void 0:oh(r)},uw=TypeError,dw=Object.defineProperty,ah=function(e,t){try{dw(le,e,{value:t,configurable:!0,writable:!0})}catch{le[e]=t}return t},rn=le["__core-js_shared__"]||ah("__core-js_shared__",{}),yn=Ii(function(e){(e.exports=function(t,r){return rn[t]||(rn[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.25.4",mode:"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.4/LICENSE",source:"https://github.com/zloirock/core-js"})}),fw=Object,Ri=function(e){return fw(Mo(e))},hw=fe({}.hasOwnProperty),J=Object.hasOwn||function(e,t){return hw(Ri(e),t)},pw=0,mw=Math.random(),vw=fe(1 .toString),gi=function(e){return"Symbol("+(e===void 0?"":e)+")_"+vw(++pw+mw,36)},Hi=yn("wks"),Pn=le.Symbol,Ap=Pn&&Pn.for,yw=ih?Pn:Pn&&Pn.withoutSetter||gi,Ye=function(e){if(!J(Hi,e)||!qt&&typeof Hi[e]!="string"){var t="Symbol."+e;qt&&J(Pn,e)?Hi[e]=Pn[e]:Hi[e]=ih&&Ap?Ap(t):yw(t)}return Hi[e]},gw=TypeError,bw=Ye("toPrimitive"),$w=function(e,t){if(!Le(e)||yi(e))return e;var r,n=ks(e,bw);if(n){if(t===void 0&&(t="default"),r=kt(n,e,t),!Le(r)||yi(r))return r;throw gw("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,s;if(o==="string"&&Te(a=i.toString)&&!Le(s=kt(a,i))||Te(a=i.valueOf)&&!Le(s=kt(a,i))||o!=="string"&&Te(a=i.toString)&&!Le(s=kt(a,i)))return s;throw uw("Can't convert object to primitive value")}(e,t)},Rn=function(e){var t=$w(e,"string");return yi(t)?t:t+""},Tu=le.document,ww=Le(Tu)&&Le(Tu.createElement),Yg=function(e){return ww?Tu.createElement(e):{}},Xg=!Ee&&!Ae(function(){return Object.defineProperty(Yg("div"),"a",{get:function(){return 7}}).a!=7}),Dp=Object.getOwnPropertyDescriptor,jo={f:Ee?Dp:function(e,t){if(e=Er(e),t=Rn(t),Xg)try{return Dp(e,t)}catch{}if(J(e,t))return An(!kt(nh.f,e,t),e[t])}},Zg=Ee&&Ae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),_w=String,xw=TypeError,ut=function(e){if(Le(e))return e;throw xw(_w(e)+" is not an object")},Sw=TypeError,mc=Object.defineProperty,kw=Object.getOwnPropertyDescriptor,$t={f:Ee?Zg?function(e,t,r){if(ut(e),t=Rn(t),ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&"writable"in r&&!r.writable){var n=kw(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return mc(e,t,r)}:mc:function(e,t,r){if(ut(e),t=Rn(t),ut(r),Xg)try{return mc(e,t,r)}catch{}if("get"in r||"set"in r)throw Sw("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Ll=Ee?function(e,t,r){return $t.f(e,t,An(1,r))}:function(e,t,r){return e[t]=r,e},Jg=Function.prototype,Ew=Ee&&Object.getOwnPropertyDescriptor,vc=J(Jg,"name"),sh={EXISTS:vc,PROPER:vc&&function(){}.name==="something",CONFIGURABLE:vc&&(!Ee||Ee&&Ew(Jg,"name").configurable)},Ow=fe(Function.toString);Te(rn.inspectSource)||(rn.inspectSource=function(e){return Ow(e)});var Es,ho,Os,eb=rn.inspectSource,Rp=le.WeakMap,Cw=Te(Rp)&&/native code/.test(String(Rp)),Fp=yn("keys"),Ml=function(e){return Fp[e]||(Fp[e]=gi(e))},Fi={},Nu=le.TypeError,Pw=le.WeakMap;if(Cw||rn.state){var bn=rn.state||(rn.state=new Pw),Tw=fe(bn.get),Lp=fe(bn.has),Nw=fe(bn.set);Es=function(e,t){if(Lp(bn,e))throw Nu("Object already initialized");return t.facade=e,Nw(bn,e,t),t},ho=function(e){return Tw(bn,e)||{}},Os=function(e){return Lp(bn,e)}}else{var qn=Ml("state");Fi[qn]=!0,Es=function(e,t){if(J(e,qn))throw Nu("Object already initialized");return t.facade=e,Ll(e,qn,t),t},ho=function(e){return J(e,qn)?e[qn]:{}},Os=function(e){return J(e,qn)}}var Yt={set:Es,get:ho,has:Os,enforce:function(e){return Os(e)?ho(e):Es(e,{})},getterFor:function(e){return function(t){var r;if(!Le(t)||(r=ho(t)).type!==e)throw Nu("Incompatible receiver, "+e+" required");return r}}},Iw=Ii(function(e){var t=sh.CONFIGURABLE,r=Yt.enforce,n=Yt.get,i=Object.defineProperty,o=Ee&&!Ae(function(){return i(function(){},"length",{value:8}).length!==8}),a=String(String).split("String"),s=e.exports=function(c,l,u){String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(l="get "+l),u&&u.setter&&(l="set "+l),(!J(c,"name")||t&&c.name!==l)&&(Ee?i(c,"name",{value:l,configurable:!0}):c.name=l),o&&u&&J(u,"arity")&&c.length!==u.arity&&i(c,"length",{value:u.arity});try{u&&J(u,"constructor")&&u.constructor?Ee&&i(c,"prototype",{writable:!1}):c.prototype&&(c.prototype=void 0)}catch{}var d=r(c);return J(d,"source")||(d.source=a.join(typeof l=="string"?l:"")),c};Function.prototype.toString=s(function(){return Te(this)&&n(this).source||eb(this)},"toString")}),Ot=function(e,t,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:t;if(Te(r)&&Iw(r,o,n),n.global)i?e[t]=r:ah(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch{}i?e[t]=r:$t.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Aw=Math.ceil,Dw=Math.floor,Rw=Math.trunc||function(e){var t=+e;return(t>0?Dw:Aw)(t)},lh=function(e){var t=+e;return t!=t||t===0?0:Rw(t)},Fw=Math.max,Lw=Math.min,Iu=function(e,t){var r=lh(e);return r<0?Fw(r+t,0):Lw(r,t)},Mw=Math.min,tb=function(e){return e>0?Mw(lh(e),9007199254740991):0},Li=function(e){return tb(e.length)},Mp=function(e){return function(t,r,n){var i,o=Er(t),a=Li(o),s=Iu(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},rb={includes:Mp(!0),indexOf:Mp(!1)},jw=rb.indexOf,jp=fe([].push),nb=function(e,t){var r,n=Er(e),i=0,o=[];for(r in n)!J(Fi,r)&&J(n,r)&&jp(o,r);for(;t.length>i;)J(n,r=t[i++])&&(~jw(o,r)||jp(o,r));return o},Cs=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zw=Cs.concat("length","prototype"),wo={f:Object.getOwnPropertyNames||function(e){return nb(e,zw)}},jl={f:Object.getOwnPropertySymbols},Uw=fe([].concat),Vw=ur("Reflect","ownKeys")||function(e){var t=wo.f(ut(e)),r=jl.f;return r?Uw(t,r(e)):t},ib=function(e,t,r){for(var n=Vw(t),i=$t.f,o=jo.f,a=0;a<n.length;a++){var s=n[a];J(e,s)||r&&J(r,s)||i(e,s,o(t,s))}},Bw=/#|\.prototype\./,zo=function(e,t){var r=qw[Ww(e)];return r==Gw||r!=Hw&&(Te(t)?Ae(t):!!t)},Ww=zo.normalize=function(e){return String(e).replace(Bw,".").toLowerCase()},qw=zo.data={},Hw=zo.NATIVE="N",Gw=zo.POLYFILL="P",Au=zo,Qw=jo.f,dt=function(e,t){var r,n,i,o,a,s=e.target,c=e.global,l=e.stat;if(r=c?le:l?le[s]||ah(s,{}):(le[s]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(a=Qw(r,n))&&a.value:r[n],!Au(c?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;ib(o,i)}(e.sham||i&&i.sham)&&Ll(o,"sham",!0),Ot(r,n,o,e)}},ob={};ob[Ye("toStringTag")]="z";var yc,ch=String(ob)==="[object z]",Kw=Ye("toStringTag"),Yw=Object,Xw=Dr(function(){return arguments}())=="Arguments",Un=ch?Dr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=Yw(e),Kw))=="string"?r:Xw?Dr(t):(n=Dr(t))=="Object"&&Te(t.callee)?"Arguments":n},Zw=String,Fr=function(e){if(Un(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Zw(e)},Jw=Ye("match"),e_=TypeError,ab=function(e){if(function(t){var r;return Le(t)&&((r=t[Jw])!==void 0?!!r:Dr(t)=="RegExp")}(e))throw e_("The method doesn't accept regular expressions");return e},t_=Ye("match"),sb=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[t_]=!1,"/./"[e](t)}catch{}}return!1},r_=jo.f,zp=fe("".startsWith),n_=fe("".slice),i_=Math.min,lb=sb("startsWith"),o_=!(lb||(yc=r_(String.prototype,"startsWith"),!yc||yc.writable));dt({target:"String",proto:!0,forced:!o_&&!lb},{startsWith:function(e){var t=Fr(Mo(this));ab(e);var r=tb(i_(arguments.length>1?arguments[1]:void 0,t.length)),n=Fr(e);return zp?zp(t,n,r):n_(t,r,r+n.length)===n}});var uh=function(e,t){return fe(le[e].prototype[t])};uh("String","startsWith");var Ps=Array.isArray||function(e){return Dr(e)=="Array"},a_=TypeError,Up=function(e){if(e>9007199254740991)throw a_("Maximum allowed index exceeded");return e},_o=function(e,t,r){var n=Rn(t);n in e?$t.f(e,n,An(0,r)):e[n]=r},cb=function(){},s_=[],ub=ur("Reflect","construct"),dh=/^\s*(?:class|function)\b/,l_=fe(dh.exec),c_=!dh.exec(cb),Gi=function(e){if(!Te(e))return!1;try{return ub(cb,s_,e),!0}catch{return!1}},db=function(e){if(!Te(e))return!1;switch(Un(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c_||!!l_(dh,eb(e))}catch{return!0}};db.sham=!0;var Vp,fh=!ub||Ae(function(){var e;return Gi(Gi.call)||!Gi(Object)||!Gi(function(){e=!0})||e})?db:Gi,u_=Ye("species"),Bp=Array,fb=function(e,t){return new(function(r){var n;return Ps(r)&&(n=r.constructor,(fh(n)&&(n===Bp||Ps(n.prototype))||Le(n)&&(n=n[u_])===null)&&(n=void 0)),n===void 0?Bp:n}(e))(t===0?0:t)},d_=Ye("species"),hb=Ye("isConcatSpreadable"),f_=Ss>=51||!Ae(function(){var e=[];return e[hb]=!1,e.concat()[0]!==e}),h_=(Vp="concat",Ss>=51||!Ae(function(){var e=[];return(e.constructor={})[d_]=function(){return{foo:1}},e[Vp](Boolean).foo!==1})),p_=function(e){if(!Le(e))return!1;var t=e[hb];return t!==void 0?!!t:Ps(e)};dt({target:"Array",proto:!0,arity:1,forced:!f_||!h_},{concat:function(e){var t,r,n,i,o,a=Ri(this),s=fb(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(p_(o=t===-1?a:arguments[t]))for(i=Li(o),Up(c+i),r=0;r<i;r++,c++)r in o&&_o(s,c,o[r]);else Up(c+1),_o(s,c++,o);return s.length=c,s}});var m_=ch?{}.toString:function(){return"[object "+Un(this)+"]"};ch||Ot(Object.prototype,"toString",m_,{unsafe:!0});var Jo,hh=Object.keys||function(e){return nb(e,Cs)},v_=Ee&&!Zg?Object.defineProperties:function(e,t){ut(e);for(var r,n=Er(t),i=hh(t),o=i.length,a=0;o>a;)$t.f(e,r=i[a++],n[r]);return e},pb={f:v_},y_=ur("document","documentElement"),mb=Ml("IE_PROTO"),gc=function(){},vb=function(e){return"<script>"+e+"<\/script>"},Wp=function(e){e.write(vb("")),e.close();var t=e.parentWindow.Object;return e=null,t},_a=function(){try{Jo=new ActiveXObject("htmlfile")}catch{}var e,t;_a=typeof document<"u"?document.domain&&Jo?Wp(Jo):((t=Yg("iframe")).style.display="none",y_.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(vb("document.F=Object")),e.close(),e.F):Wp(Jo);for(var r=Cs.length;r--;)delete _a.prototype[Cs[r]];return _a()};Fi[mb]=!0;var ln=Object.create||function(e,t){var r;return e!==null?(gc.prototype=ut(e),r=new gc,gc.prototype=null,r[mb]=e):r=_a(),t===void 0?r:pb.f(r,t)},g_=Array,b_=Math.max,yb=wo.f,gb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$_=function(e){try{return yb(e)}catch{return function(r,n,i){for(var o=Li(r),a=Iu(n,o),s=Iu(i===void 0?o:i,o),c=g_(b_(s-a,0)),l=0;a<s;a++,l++)_o(c,l,r[a]);return c.length=l,c}(gb)}},ph={f:function(e){return gb&&Dr(e)=="Window"?$_(e):yb(Er(e))}},bb={f:Ye},xo=le,w_=$t.f,Dt=function(e){var t=xo.Symbol||(xo.Symbol={});J(t,e)||w_(t,e,{value:bb.f(e)})},$b=function(){var e=ur("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Ye("toPrimitive");t&&!t[n]&&Ot(t,n,function(i){return kt(r,this)},{arity:1})},__=$t.f,qp=Ye("toStringTag"),tn=function(e,t,r){e&&!r&&(e=e.prototype),e&&!J(e,qp)&&__(e,qp,{configurable:!0,value:t})},x_=fe(fe.bind),zl=function(e,t){return oh(e),t===void 0?e:Lo?x_(e,t):function(){return e.apply(t,arguments)}},Hp=fe([].push),qr=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(c,l,u,d){for(var f,h,p=Ri(c),m=Kg(p),v=zl(l,u),y=Li(m),b=0,g=d||fb,w=t?g(c,y):r||a?g(c,0):void 0;y>b;b++)if((s||b in m)&&(h=v(f=m[b],b,p),e))if(t)w[b]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return b;case 2:Hp(w,f)}else switch(e){case 4:return!1;case 7:Hp(w,f)}return o?-1:n||i?i:w}},Ul={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)}.forEach,Rt=Ml("hidden"),S_=Yt.set,Gp=Yt.getterFor("Symbol"),Gt=Object.prototype,ni=le.Symbol,lo=ni&&ni.prototype,k_=le.TypeError,bc=le.QObject,wb=jo.f,Jr=$t.f,_b=ph.f,E_=nh.f,xb=fe([].push),Lr=yn("symbols"),Uo=yn("op-symbols"),O_=yn("wks"),$c=!bc||!bc.prototype||!bc.prototype.findChild,Du=Ee&&Ae(function(){return ln(Jr({},"a",{get:function(){return Jr(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=wb(Gt,t);n&&delete Gt[t],Jr(e,t,r),n&&e!==Gt&&Jr(Gt,t,n)}:Jr,wc=function(e,t){var r=Lr[e]=ln(lo);return S_(r,{type:"Symbol",tag:e,description:t}),Ee||(r.description=t),r},Ts=function(e,t,r){e===Gt&&Ts(Uo,t,r),ut(e);var n=Rn(t);return ut(r),J(Lr,n)?(r.enumerable?(J(e,Rt)&&e[Rt][n]&&(e[Rt][n]=!1),r=ln(r,{enumerable:An(0,!1)})):(J(e,Rt)||Jr(e,Rt,An(1,{})),e[Rt][n]=!0),Du(e,n,r)):Jr(e,n,r)},_c=function(e,t){ut(e);var r=Er(t),n=hh(r).concat(Sb(r));return Ul(n,function(i){Ee&&!kt(Ru,r,i)||Ts(e,i,r[i])}),e},Ru=function(e){var t=Rn(e),r=kt(E_,this,t);return!(this===Gt&&J(Lr,t)&&!J(Uo,t))&&(!(r||!J(this,t)||!J(Lr,t)||J(this,Rt)&&this[Rt][t])||r)},Qp=function(e,t){var r=Er(e),n=Rn(t);if(r!==Gt||!J(Lr,n)||J(Uo,n)){var i=wb(r,n);return!i||!J(Lr,n)||J(r,Rt)&&r[Rt][n]||(i.enumerable=!0),i}},Kp=function(e){var t=_b(Er(e)),r=[];return Ul(t,function(n){J(Lr,n)||J(Fi,n)||xb(r,n)}),r},Sb=function(e){var t=e===Gt,r=_b(t?Uo:Er(e)),n=[];return Ul(r,function(i){!J(Lr,i)||t&&!J(Gt,i)||xb(n,Lr[i])}),n};qt||(lo=(ni=function(){if(Dn(lo,this))throw k_("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?Fr(arguments[0]):void 0,t=gi(e),r=function(n){this===Gt&&kt(r,Uo,n),J(this,Rt)&&J(this[Rt],t)&&(this[Rt][t]=!1),Du(this,t,An(1,n))};return Ee&&$c&&Du(Gt,t,{configurable:!0,set:r}),wc(t,e)}).prototype,Ot(lo,"toString",function(){return Gp(this).tag}),Ot(ni,"withoutSetter",function(e){return wc(gi(e),e)}),nh.f=Ru,$t.f=Ts,pb.f=_c,jo.f=Qp,wo.f=ph.f=Kp,jl.f=Sb,bb.f=function(e){return wc(Ye(e),e)},Ee&&(Jr(lo,"description",{configurable:!0,get:function(){return Gp(this).description}}),Ot(Gt,"propertyIsEnumerable",Ru,{unsafe:!0}))),dt({global:!0,constructor:!0,wrap:!0,forced:!qt,sham:!qt},{Symbol:ni}),Ul(hh(O_),function(e){Dt(e)}),dt({target:"Symbol",stat:!0,forced:!qt},{useSetter:function(){$c=!0},useSimple:function(){$c=!1}}),dt({target:"Object",stat:!0,forced:!qt,sham:!Ee},{create:function(e,t){return t===void 0?ln(e):_c(ln(e),t)},defineProperty:Ts,defineProperties:_c,getOwnPropertyDescriptor:Qp}),dt({target:"Object",stat:!0,forced:!qt},{getOwnPropertyNames:Kp}),$b(),tn(ni,"Symbol"),Fi[Rt]=!0;var kb=qt&&!!Symbol.for&&!!Symbol.keyFor,xc=yn("string-to-symbol-registry"),C_=yn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!kb},{for:function(e){var t=Fr(e);if(J(xc,t))return xc[t];var r=ur("Symbol")(t);return xc[t]=r,C_[r]=t,r}});var Yp=yn("symbol-to-string-registry");dt({target:"Symbol",stat:!0,forced:!kb},{keyFor:function(e){if(!yi(e))throw TypeError(Di(e)+" is not a symbol");if(J(Yp,e))return Yp[e]}});var Eb=Function.prototype,Xp=Eb.apply,Zp=Eb.call,Ob=typeof Reflect=="object"&&Reflect.apply||(Lo?Zp.bind(Xp):function(){return Zp.apply(Xp,arguments)}),mh=fe([].slice),nn=ur("JSON","stringify"),ea=fe(/./.exec),Jp=fe("".charAt),P_=fe("".charCodeAt),T_=fe("".replace),N_=fe(1 .toString),I_=/[\uD800-\uDFFF]/g,e0=/^[\uD800-\uDBFF]$/,t0=/^[\uDC00-\uDFFF]$/,r0=!qt||Ae(function(){var e=ur("Symbol")();return nn([e])!="[null]"||nn({a:e})!="{}"||nn(Object(e))!="{}"}),n0=Ae(function(){return nn("\uDF06\uD834")!=='"\\udf06\\ud834"'||nn("\uDEAD")!=='"\\udead"'}),A_=function(e,t){var r=mh(arguments),n=t;if((Le(t)||e!==void 0)&&!yi(e))return Ps(t)||(t=function(i,o){if(Te(n)&&(o=kt(n,this,i,o)),!yi(o))return o}),r[1]=t,Ob(nn,null,r)},D_=function(e,t,r){var n=Jp(r,t-1),i=Jp(r,t+1);return ea(e0,e)&&!ea(t0,i)||ea(t0,e)&&!ea(e0,n)?"\\u"+N_(P_(e,0),16):e};nn&&dt({target:"JSON",stat:!0,arity:3,forced:r0||n0},{stringify:function(e,t,r){var n=mh(arguments),i=Ob(r0?A_:nn,null,n);return n0&&typeof i=="string"?T_(i,I_,D_):i}});var R_=!qt||Ae(function(){jl.f(1)});dt({target:"Object",stat:!0,forced:R_},{getOwnPropertySymbols:function(e){var t=jl.f;return t?t(Ri(e)):[]}}),Dt("asyncIterator");var F_=$t.f,Tr=le.Symbol,$n=Tr&&Tr.prototype;if(Ee&&Te(Tr)&&(!("description"in $n)||Tr().description!==void 0)){var i0={},ta=function(){var e=arguments.length<1||arguments[0]===void 0?void 0:Fr(arguments[0]),t=Dn($n,this)?new Tr(e):e===void 0?Tr():Tr(e);return e===""&&(i0[t]=!0),t};ib(ta,Tr),ta.prototype=$n,$n.constructor=ta;var L_=String(Tr("test"))=="Symbol(test)",M_=fe($n.valueOf),j_=fe($n.toString),z_=/^Symbol\((.*)\)[^)]+$/,U_=fe("".replace),V_=fe("".slice);F_($n,"description",{configurable:!0,get:function(){var e=M_(this);if(J(i0,e))return"";var t=j_(e),r=L_?V_(t,7,-1):U_(t,z_,"$1");return r===""?void 0:r}}),dt({global:!0,constructor:!0,forced:!0},{Symbol:ta})}Dt("hasInstance"),Dt("isConcatSpreadable"),Dt("iterator"),Dt("match"),Dt("matchAll"),Dt("replace"),Dt("search"),Dt("species"),Dt("split"),Dt("toPrimitive"),$b(),Dt("toStringTag"),tn(ur("Symbol"),"Symbol"),Dt("unscopables"),tn(le.JSON,"JSON",!0),tn(Math,"Math",!0),dt({global:!0},{Reflect:{}}),tn(le.Reflect,"Reflect",!0),xo.Symbol;var Tn,o0,a0,B_=fe("".charAt),s0=fe("".charCodeAt),W_=fe("".slice),l0=function(e){return function(t,r){var n,i,o=Fr(Mo(t)),a=lh(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=s0(o,a))<55296||n>56319||a+1===s||(i=s0(o,a+1))<56320||i>57343?e?B_(o,a):n:e?W_(o,a,a+2):i-56320+(n-55296<<10)+65536}},q_={codeAt:l0(!1),charAt:l0(!0)},H_=!Ae(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),c0=Ml("IE_PROTO"),Fu=Object,G_=Fu.prototype,cn=H_?Fu.getPrototypeOf:function(e){var t=Ri(e);if(J(t,c0))return t[c0];var r=t.constructor;return Te(r)&&t instanceof r?r.prototype:t instanceof Fu?G_:null},Lu=Ye("iterator"),Cb=!1;[].keys&&("next"in(a0=[].keys())?(o0=cn(cn(a0)))!==Object.prototype&&(Tn=o0):Cb=!0);var Q_=!Le(Tn)||Ae(function(){var e={};return Tn[Lu].call(e)!==e});Q_&&(Tn={}),Te(Tn[Lu])||Ot(Tn,Lu,function(){return this});var vh={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Cb},bi={},K_=vh.IteratorPrototype,Y_=function(){return this},X_=String,Z_=TypeError,wr=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return ut(n),function(o){if(typeof o=="object"||Te(o))return o;throw Z_("Can't set "+X_(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),J_=sh.PROPER,e3=sh.CONFIGURABLE,u0=vh.IteratorPrototype,ra=vh.BUGGY_SAFARI_ITERATORS,Qi=Ye("iterator"),t3=function(){return this},yh=function(e,t,r,n,i,o,a){(function(y,b,g,w){var x=b+" Iterator";y.prototype=ln(K_,{next:An(+!w,g)}),tn(y,x,!1),bi[x]=Y_})(r,t,n);var s,c,l,u=function(y){if(y===i&&m)return m;if(!ra&&y in h)return h[y];switch(y){case"keys":case"values":case"entries":return function(){return new r(this,y)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Qi]||h["@@iterator"]||i&&h[i],m=!ra&&p||u(i),v=t=="Array"&&h.entries||p;if(v&&(s=cn(v.call(new e)))!==Object.prototype&&s.next&&(cn(s)!==u0&&(wr?wr(s,u0):Te(s[Qi])||Ot(s,Qi,t3)),tn(s,d,!0)),J_&&i=="values"&&p&&p.name!=="values"&&(e3?Ll(h,"name","values"):(f=!0,m=function(){return kt(p,this)})),i)if(c={values:u("values"),keys:o?m:u("keys"),entries:u("entries")},a)for(l in c)(ra||f||!(l in h))&&Ot(h,l,c[l]);else dt({target:t,proto:!0,forced:ra||f},c);return h[Qi]!==m&&Ot(h,Qi,m,{name:i}),bi[t]=m,c},$i=function(e,t){return{value:e,done:t}},r3=q_.charAt,n3=Yt.set,i3=Yt.getterFor("String Iterator");yh(String,"String",function(e){n3(this,{type:"String Iterator",string:Fr(e),index:0})},function(){var e,t=i3(this),r=t.string,n=t.index;return n>=r.length?$i(void 0,!0):(e=r3(r,n),t.index+=e.length,$i(e,!1))});var Mu=function(e,t,r){var n,i;ut(e);try{if(!(n=ks(e,"return"))){if(t==="throw")throw r;return r}n=kt(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return ut(n),r},o3=function(e,t,r,n){try{return n?t(ut(r)[0],r[1]):t(r)}catch(i){Mu(e,"throw",i)}},a3=Ye("iterator"),s3=Array.prototype,Pb=function(e){return e!==void 0&&(bi.Array===e||s3[a3]===e)},l3=Ye("iterator"),gh=function(e){if(!Ai(e))return ks(e,l3)||ks(e,"@@iterator")||bi[Un(e)]},c3=TypeError,Tb=function(e,t){var r=arguments.length<2?gh(e):t;if(oh(r))return ut(kt(r,e));throw c3(Di(e)+" is not iterable")},d0=Array,Nb=Ye("iterator"),Ib=!1;try{var u3=0,f0={next:function(){return{done:!!u3++}},return:function(){Ib=!0}};f0[Nb]=function(){return this},Array.from(f0,function(){throw 2})}catch{}var Ab=function(e,t){if(!t&&!Ib)return!1;var r=!1;try{var n={};n[Nb]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},d3=!Ab(function(e){Array.from(e)});dt({target:"Array",stat:!0,forced:d3},{from:function(e){var t=Ri(e),r=fh(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=zl(i,n>2?arguments[2]:void 0));var a,s,c,l,u,d,f=gh(t),h=0;if(!f||this===d0&&Pb(f))for(a=Li(t),s=r?new this(a):d0(a);a>h;h++)d=o?i(t[h],h):t[h],_o(s,h,d);else for(u=(l=Tb(t,f)).next,s=r?new this:[];!(c=kt(u,l)).done;h++)d=o?o3(l,i,[c.value,h],!0):c.value,_o(s,h,d);return s.length=h,s}}),xo.Array.from;var Ft,ci,Ns,f3=typeof ArrayBuffer<"u"&&typeof DataView<"u",h3=$t.f,Db=Yt.enforce,p3=Yt.get,Is=le.Int8Array,ju=Is&&Is.prototype,h0=le.Uint8ClampedArray,p0=h0&&h0.prototype,pr=Is&&cn(Is),ir=ju&&cn(ju),m3=Object.prototype,zu=le.TypeError,m0=Ye("toStringTag"),Uu=gi("TYPED_ARRAY_TAG"),Rr=f3&&!!wr&&Un(le.opera)!=="Opera",Rb=!1,Nr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bh={BigInt64Array:8,BigUint64Array:8},Fb=function(e){var t=cn(e);if(Le(t)){var r=p3(t);return r&&J(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Fb(t)}},v0=function(e){if(!Le(e))return!1;var t=Un(e);return J(Nr,t)||J(bh,t)};for(Ft in Nr)(Ns=(ci=le[Ft])&&ci.prototype)?Db(Ns).TypedArrayConstructor=ci:Rr=!1;for(Ft in bh)(Ns=(ci=le[Ft])&&ci.prototype)&&(Db(Ns).TypedArrayConstructor=ci);if((!Rr||!Te(pr)||pr===Function.prototype)&&(pr=function(){throw zu("Incorrect invocation")},Rr))for(Ft in Nr)le[Ft]&&wr(le[Ft],pr);if((!Rr||!ir||ir===m3)&&(ir=pr.prototype,Rr))for(Ft in Nr)le[Ft]&&wr(le[Ft].prototype,ir);if(Rr&&cn(p0)!==ir&&wr(p0,ir),Ee&&!J(ir,m0))for(Ft in Rb=!0,h3(ir,m0,{get:function(){return Le(this)?this[Uu]:void 0}}),Nr)le[Ft]&&Ll(le[Ft],Uu,Ft);var Vl={NATIVE_ARRAY_BUFFER_VIEWS:Rr,TYPED_ARRAY_TAG:Rb&&Uu,aTypedArray:function(e){if(v0(e))return e;throw zu("Target is not a typed array")},aTypedArrayConstructor:function(e){if(Te(e)&&(!wr||Dn(pr,e)))return e;throw zu(Di(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(Ee){if(r)for(var i in Nr){var o=le[i];if(o&&J(o.prototype,e))try{delete o.prototype[e]}catch{try{o.prototype[e]=t}catch{}}}ir[e]&&!r||Ot(ir,e,r?t:Rr&&ju[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(Ee){if(wr){if(r){for(n in Nr)if((i=le[n])&&J(i,e))try{delete i[e]}catch{}}if(pr[e]&&!r)return;try{return Ot(pr,e,r?t:Rr&&pr[e]||t)}catch{}}for(n in Nr)!(i=le[n])||i[e]&&!r||Ot(i,e,t)}},getTypedArrayConstructor:Fb,isView:function(e){if(!Le(e))return!1;var t=Un(e);return t==="DataView"||J(Nr,t)||J(bh,t)},isTypedArray:v0,TypedArray:pr,TypedArrayPrototype:ir},v3=TypeError,y3=Ye("species"),g3=function(e,t){var r,n=ut(e).constructor;return n===void 0||Ai(r=ut(n)[y3])?t:function(i){if(fh(i))return i;throw v3(Di(i)+" is not a constructor")}(r)},b3=Vl.aTypedArrayConstructor,$3=Vl.getTypedArrayConstructor,w3=Vl.aTypedArray;(0,Vl.exportTypedArrayMethod)("slice",function(e,t){for(var r,n=mh(w3(this),e,t),i=b3(g3(r=this,$3(r))),o=0,a=n.length,s=new i(a);a>o;)s[o]=n[o++];return s},Ae(function(){new Int8Array(1).slice()}));var _3=$t.f,Vu=Ye("unscopables"),Bu=Array.prototype;Bu[Vu]==null&&_3(Bu,Vu,{configurable:!0,value:ln(null)});var xa=function(e){Bu[Vu][e]=!0},x3=rb.includes,S3=Ae(function(){return!Array(1).includes()});dt({target:"Array",proto:!0,forced:S3},{includes:function(e){return x3(this,e,arguments.length>1?arguments[1]:void 0)}}),xa("includes"),uh("Array","includes");var k3=fe("".indexOf);dt({target:"String",proto:!0,forced:!sb("includes")},{includes:function(e){return!!~k3(Fr(Mo(this)),Fr(ab(e)),arguments.length>1?arguments[1]:void 0)}}),uh("String","includes");var E3=$t.f,O3=Yt.set,C3=Yt.getterFor("Array Iterator");yh(Array,"Array",function(e,t){O3(this,{type:"Array Iterator",target:Er(e),index:0,kind:t})},function(){var e=C3(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,$i(void 0,!0)):$i(r=="keys"?n:r=="values"?t[n]:[n,t[n]],!1)},"values");var y0=bi.Arguments=bi.Array;if(xa("keys"),xa("values"),xa("entries"),Ee&&y0.name!=="values")try{E3(y0,"name",{value:"values"})}catch{}var g0=Ae(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),na=Object.isExtensible,Sc=Ae(function(){na(1)})||g0?function(e){return!!Le(e)&&(!g0||Dr(e)!="ArrayBuffer")&&(!na||na(e))}:na,P3=!Ae(function(){return Object.isExtensible(Object.preventExtensions({}))}),ii=Ii(function(e){var t=$t.f,r=!1,n=gi("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=wo.f,c=fe([].splice),l={};l[n]=1,s(l).length&&(wo.f=function(u){for(var d=s(u),f=0,h=d.length;f<h;f++)if(d[f]===n){c(d,f,1);break}return d},dt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ph.f}))},fastKey:function(s,c){if(!Le(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!J(s,n)){if(!Sc(s))return"F";if(!c)return"E";o(s)}return s[n].objectID},getWeakData:function(s,c){if(!J(s,n)){if(!Sc(s))return!0;if(!c)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return P3&&r&&Sc(s)&&!J(s,n)&&o(s),s}};Fi[n]=!0});ii.enable,ii.fastKey,ii.getWeakData,ii.onFreeze;var T3=TypeError,Sa=function(e,t){this.stopped=e,this.result=t},b0=Sa.prototype,Lb=function(e,t,r){var n,i,o,a,s,c,l,u=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=zl(t,u),v=function(b){return n&&Mu(n,"normal",b),new Sa(!0,b)},y=function(b){return d?(ut(b),p?m(b[0],b[1],v):m(b[0],b[1])):p?m(b,v):m(b)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=gh(e)))throw T3(Di(e)+" is not iterable");if(Pb(i)){for(o=0,a=Li(e);a>o;o++)if((s=y(e[o]))&&Dn(b0,s))return s;return new Sa(!1)}n=Tb(e,i)}for(c=f?e.next:n.next;!(l=kt(c,n)).done;){try{s=y(l.value)}catch(b){Mu(n,"throw",b)}if(typeof s=="object"&&s&&Dn(b0,s))return s}return new Sa(!1)},N3=TypeError,Mb=function(e,t){if(Dn(t,e))return e;throw N3("Incorrect invocation")},$0=function(e,t,r){for(var n in t)Ot(e,n,t[n],r);return e},w0=Ye("species"),I3=$t.f,_0=ii.fastKey,x0=Yt.set,kc=Yt.getterFor,A3={getConstructor:function(e,t,r,n){var i=e(function(l,u){Mb(l,o),x0(l,{type:t,index:ln(null),first:void 0,last:void 0,size:0}),Ee||(l.size=0),Ai(u)||Lb(u,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=kc(t),s=function(l,u,d){var f,h,p=a(l),m=c(l,u);return m?m.value=d:(p.last=m={index:h=_0(u,!0),key:u,value:d,previous:f=p.last,next:void 0,removed:!1},p.first||(p.first=m),f&&(f.next=m),Ee?p.size++:l.size++,h!=="F"&&(p.index[h]=m)),l},c=function(l,u){var d,f=a(l),h=_0(u);if(h!=="F")return f.index[h];for(d=f.first;d;d=d.next)if(d.key==u)return d};return $0(o,{clear:function(){for(var l=a(this),u=l.index,d=l.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete u[d.index],d=d.next;l.first=l.last=void 0,Ee?l.size=0:this.size=0},delete:function(l){var u=this,d=a(u),f=c(u,l);if(f){var h=f.next,p=f.previous;delete d.index[f.index],f.removed=!0,p&&(p.next=h),h&&(h.previous=p),d.first==f&&(d.first=h),d.last==f&&(d.last=p),Ee?d.size--:u.size--}return!!f},forEach:function(l){for(var u,d=a(this),f=zl(l,arguments.length>1?arguments[1]:void 0);u=u?u.next:d.first;)for(f(u.value,u.key,this);u&&u.removed;)u=u.previous},has:function(l){return!!c(this,l)}}),$0(o,r?{get:function(l){var u=c(this,l);return u&&u.value},set:function(l,u){return s(this,l===0?0:l,u)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),Ee&&I3(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=kc(t),o=kc(n);yh(e,t,function(a,s){x0(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,c=a.last;c&&c.removed;)c=c.previous;return a.target&&(a.last=c=c?c.next:a.state.first)?$i(s=="keys"?c.key:s=="values"?c.value:[c.key,c.value],!1):(a.target=void 0,$i(void 0,!0))},r?"entries":"values",!r,!0),function(a){var s=ur(a),c=$t.f;Ee&&s&&!s[w0]&&c(s,w0,{configurable:!0,get:function(){return this}})}(t)}};function jb(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function zb(e){return new this(function(t,r){if(!e||e.length===void 0)return r(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},function(u){n[s]={status:"rejected",reason:u},--i==0&&t(n)})}n[s]={status:"fulfilled",value:c},--i==0&&t(n)}for(var a=0;a<n.length;a++)o(a,n[a])})}(function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=le[e],s=a&&a.prototype,c=a,l={},u=function(v){var y=fe(s[v]);Ot(s,v,v=="add"?function(b){return y(this,b===0?0:b),this}:v=="delete"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:v=="get"?function(b){return i&&!Le(b)?void 0:y(this,b===0?0:b)}:v=="has"?function(b){return!(i&&!Le(b))&&y(this,b===0?0:b)}:function(b,g){return y(this,b===0?0:b,g),this})};if(Au(e,!Te(a)||!(i||s.forEach&&!Ae(function(){new a().entries().next()}))))c=r.getConstructor(t,e,n,o),ii.enable();else if(Au(e,!0)){var d=new c,f=d[o](i?{}:-0,1)!=d,h=Ae(function(){d.has(1)}),p=Ab(function(v){new a(v)}),m=!i&&Ae(function(){for(var v=new a,y=5;y--;)v[o](y,y);return!v.has(-0)});p||((c=t(function(v,y){Mb(v,s);var b=function(g,w,x){var E,S;return wr&&Te(E=w.constructor)&&E!==x&&Le(S=E.prototype)&&S!==x.prototype&&wr(g,S),g}(new a,v,c);return Ai(y)||Lb(y,b[o],{that:b,AS_ENTRIES:n}),b})).prototype=s,s.constructor=c),(h||m)&&(u("delete"),u("has"),n&&u("get")),(m||f)&&u(o),i&&s.clear&&delete s.clear}l[e]=c,dt({global:!0,constructor:!0,forced:c!=a},l),tn(c,e),i||r.setStrong(c,e,n)})("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},A3),xo.Set;var D3=setTimeout;function S0(e){return Boolean(e&&e.length!==void 0)}function R3(){}function Ve(e){if(!(this instanceof Ve))throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Vb(e,this)}function Ub(e,t){for(;e._state===3;)e=e._value;e._state!==0?(e._handled=!0,Ve._immediateFn(function(){var r=e._state===1?t.onFulfilled:t.onRejected;if(r!==null){var n;try{n=r(e._value)}catch(i){return void So(t.promise,i)}Wu(t.promise,n)}else(e._state===1?Wu:So)(t.promise,e._value)})):e._deferreds.push(t)}function Wu(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&(typeof t=="object"||typeof t=="function")){var r=t.then;if(t instanceof Ve)return e._state=3,e._value=t,void qu(e);if(typeof r=="function")return void Vb((n=r,i=t,function(){n.apply(i,arguments)}),e)}e._state=1,e._value=t,qu(e)}catch(o){So(e,o)}var n,i}function So(e,t){e._state=2,e._value=t,qu(e)}function qu(e){e._state===2&&e._deferreds.length===0&&Ve._immediateFn(function(){e._handled||Ve._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)Ub(e,e._deferreds[t]);e._deferreds=null}function F3(e,t,r){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.promise=r}function Vb(e,t){var r=!1;try{e(function(n){r||(r=!0,Wu(t,n))},function(n){r||(r=!0,So(t,n))})}catch(n){if(r)return;r=!0,So(t,n)}}Ve.prototype.catch=function(e){return this.then(null,e)},Ve.prototype.then=function(e,t){var r=new this.constructor(R3);return Ub(this,new F3(e,t,r)),r},Ve.prototype.finally=jb,Ve.all=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(e);if(n.length===0)return t([]);var i=n.length;function o(s,c){try{if(c&&(typeof c=="object"||typeof c=="function")){var l=c.then;if(typeof l=="function")return void l.call(c,function(u){o(s,u)},r)}n[s]=c,--i==0&&t(n)}catch(u){r(u)}}for(var a=0;a<n.length;a++)o(a,n[a])})},Ve.allSettled=zb,Ve.resolve=function(e){return e&&typeof e=="object"&&e.constructor===Ve?e:new Ve(function(t){t(e)})},Ve.reject=function(e){return new Ve(function(t,r){r(e)})},Ve.race=function(e){return new Ve(function(t,r){if(!S0(e))return r(new TypeError("Promise.race accepts an array"));for(var n=0,i=e.length;n<i;n++)Ve.resolve(e[n]).then(t,r)})},Ve._immediateFn=typeof setImmediate=="function"&&function(e){setImmediate(e)}||function(e){D3(e,0)},Ve._unhandledRejectionFn=function(e){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Hn=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();typeof Hn.Promise!="function"?Hn.Promise=Ve:(Hn.Promise.prototype.finally||(Hn.Promise.prototype.finally=jb),Hn.Promise.allSettled||(Hn.Promise.allSettled=zb)),function(e){function t(h){for(var p=0,m=Math.min(65536,h.length+1),v=new Uint16Array(m),y=[],b=0;;){var g=p<h.length;if(!g||b>=m-1){var w=v.subarray(0,b);if(y.push(String.fromCharCode.apply(null,w)),!g)return y.join("");h=h.subarray(p),p=0,b=0}var x=h[p++];if((128&x)==0)v[b++]=x;else if((224&x)==192){var E=63&h[p++];v[b++]=(31&x)<<6|E}else if((240&x)==224){E=63&h[p++];var S=63&h[p++];v[b++]=(31&x)<<12|E<<6|S}else if((248&x)==240){var T=(7&x)<<18|(E=63&h[p++])<<12|(S=63&h[p++])<<6|63&h[p++];T>65535&&(T-=65536,v[b++]=T>>>10&1023|55296,T=56320|1023&T),v[b++]=T}}}var r="Failed to ",n=function(h,p,m){if(h)throw new Error("".concat(r).concat(p,": the '").concat(m,"' option is unsupported."))},i=typeof Buffer=="function"&&Buffer.from,o=i?function(h){return Buffer.from(h)}:function(h){for(var p=0,m=h.length,v=0,y=Math.max(32,m+(m>>>1)+7),b=new Uint8Array(y>>>3<<3);p<m;){var g=h.charCodeAt(p++);if(g>=55296&&g<=56319){if(p<m){var w=h.charCodeAt(p);(64512&w)==56320&&(++p,g=((1023&g)<<10)+(1023&w)+65536)}if(g>=55296&&g<=56319)continue}if(v+4>b.length){y+=8,y=(y*=1+p/h.length*2)>>>3<<3;var x=new Uint8Array(y);x.set(b),b=x}if((4294967168&g)!=0){if((4294965248&g)==0)b[v++]=g>>>6&31|192;else if((4294901760&g)==0)b[v++]=g>>>12&15|224,b[v++]=g>>>6&63|128;else{if((4292870144&g)!=0)continue;b[v++]=g>>>18&7|240,b[v++]=g>>>12&63|128,b[v++]=g>>>6&63|128}b[v++]=63&g|128}else b[v++]=g}return b.slice?b.slice(0,v):b.subarray(0,v)};function a(){this.encoding="utf-8"}a.prototype.encode=function(h,p){return n(p&&p.stream,"encode","stream"),o(h)};var s=!i&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",c=["utf-8","utf8","unicode-1-1-utf-8"],l=t;i?l=function(h,p){return(h instanceof Buffer?h:Buffer.from(h.buffer,h.byteOffset,h.byteLength)).toString(p)}:s&&(l=function(h){try{return function(p){var m;try{var v=new Blob([p],{type:"text/plain;charset=UTF-8"});m=URL.createObjectURL(v);var y=new XMLHttpRequest;return y.open("GET",m,!1),y.send(),y.responseText}finally{m&&URL.revokeObjectURL(m)}}(h)}catch{return t(h)}});var u="construct 'TextDecoder'",d="".concat(r," ").concat(u,": the ");function f(h,p){if(n(p&&p.fatal,u,"fatal"),h=h||"utf-8",!(i?Buffer.isEncoding(h):c.indexOf(h.toLowerCase())!==-1))throw new RangeError("".concat(d," encoding label provided ('").concat(h,"') is invalid."));this.encoding=h,this.fatal=!1,this.ignoreBOM=!1}f.prototype.decode=function(h,p){var m;return n(p&&p.stream,"decode","stream"),m=h instanceof Uint8Array?h:h.buffer instanceof ArrayBuffer?new Uint8Array(h.buffer):new Uint8Array(h),l(m,this.encoding)},e.TextEncoder=e.TextEncoder||a,e.TextDecoder=e.TextDecoder||f}(typeof window<"u"?window:yr),function(){function e(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function t(v,y){for(var b=0;b<y.length;b++){var g=y[b];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(v,g.key,g)}}function r(v,y,b){return y&&t(v.prototype,y),b&&t(v,b),v}function n(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&o(v,y)}function i(v){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},i(v)}function o(v,y){return o=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},o(v,y)}function a(){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 s(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function c(v,y){return!y||typeof y!="object"&&typeof y!="function"?s(v):y}function l(v){var y=a();return function(){var b,g=i(v);if(y){var w=i(this).constructor;b=Reflect.construct(g,arguments,w)}else b=g.apply(this,arguments);return c(this,b)}}function u(v,y){for(;!Object.prototype.hasOwnProperty.call(v,y)&&(v=i(v))!==null;);return v}function d(v,y,b){return d=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(g,w,x){var E=u(g,w);if(E){var S=Object.getOwnPropertyDescriptor(E,w);return S.get?S.get.call(x):S.value}},d(v,y,b||v)}var f=function(){function v(){e(this,v),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return r(v,[{key:"addEventListener",value:function(y,b,g){y in this.listeners||(this.listeners[y]=[]),this.listeners[y].push({callback:b,options:g})}},{key:"removeEventListener",value:function(y,b){if(y in this.listeners){for(var g=this.listeners[y],w=0,x=g.length;w<x;w++)if(g[w].callback===b)return void g.splice(w,1)}}},{key:"dispatchEvent",value:function(y){if(y.type in this.listeners){for(var b=this.listeners[y.type].slice(),g=0,w=b.length;g<w;g++){var x=b[g];try{x.callback.call(this,y)}catch(E){Promise.resolve().then(function(){throw E})}x.options&&x.options.once&&this.removeEventListener(y.type,x.callback)}return!y.defaultPrevented}}}]),v}(),h=function(v){n(b,v);var y=l(b);function b(){var g;return e(this,b),(g=y.call(this)).listeners||f.call(s(g)),Object.defineProperty(s(g),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(s(g),"onabort",{value:null,writable:!0,configurable:!0}),g}return r(b,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(g){g.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,g)),d(i(b.prototype),"dispatchEvent",this).call(this,g)}}]),b}(f),p=function(){function v(){e(this,v),Object.defineProperty(this,"signal",{value:new h,writable:!0,configurable:!0})}return r(v,[{key:"abort",value:function(){var y;try{y=new Event("abort")}catch{typeof document<"u"?document.createEvent?(y=document.createEvent("Event")).initEvent("abort",!1,!1):(y=document.createEventObject()).type="abort":y={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(y)}},{key:"toString",value:function(){return"[object AbortController]"}}]),v}();function m(v){return v.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof v.Request=="function"&&!v.Request.prototype.hasOwnProperty("signal")||!v.AbortController}typeof Symbol<"u"&&Symbol.toStringTag&&(p.prototype[Symbol.toStringTag]="AbortController",h.prototype[Symbol.toStringTag]="AbortSignal"),function(v){m(v)&&(v.AbortController=p,v.AbortSignal=h)}(typeof self<"u"?self:yr)}();var _n=Ii(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var i=this;this.locked=new Map,this.addToLocked=function(o,a){var s=i.locked.get(o);s===void 0?a===void 0?i.locked.set(o,[]):i.locked.set(o,[a]):a!==void 0&&(s.unshift(a),i.locked.set(o,s))},this.isLocked=function(o){return i.locked.has(o)},this.lock=function(o){return new Promise(function(a,s){i.isLocked(o)?i.addToLocked(o,a):(i.addToLocked(o),a())})},this.unlock=function(o){var a=i.locked.get(o);if(a!==void 0&&a.length!==0){var s=a.pop();i.locked.set(o,a),s!==void 0&&setTimeout(s,0)}else i.locked.delete(o)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});rh(_n);var L3=Ii(function(e,t){var r=yr&&yr.__awaiter||function(c,l,u,d){return new(u||(u=Promise))(function(f,h){function p(y){try{v(d.next(y))}catch(b){h(b)}}function m(y){try{v(d.throw(y))}catch(b){h(b)}}function v(y){y.done?f(y.value):new u(function(b){b(y.value)}).then(p,m)}v((d=d.apply(c,l||[])).next())})},n=yr&&yr.__generator||function(c,l){var u,d,f,h,p={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(v){return function(y){return function(b){if(u)throw new TypeError("Generator is already executing.");for(;p;)try{if(u=1,d&&(f=2&b[0]?d.return:b[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,b[1])).done)return f;switch(d=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return p.label++,{value:b[1],done:!1};case 5:p.label++,d=b[1],b=[0];continue;case 7:b=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!((f=f.length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){p=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]<f[3])){p.label=b[1];break}if(b[0]===6&&p.label<f[1]){p.label=f[1],f=b;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(b);break}f[2]&&p.ops.pop(),p.trys.pop();continue}b=l.call(c,p)}catch(g){b=[6,g],d=0}finally{u=f=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([v,y])}}};Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key";function o(c){return new Promise(function(l){return setTimeout(l,c)})}function a(c){for(var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",u="",d=0;d<c;d++)u+=l[Math.floor(Math.random()*l.length)];return u}var s=function(){function c(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+a(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),c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(l,u){return u===void 0&&(u=5e3),r(this,void 0,void 0,function(){var d,f,h,p,m,v;return n(this,function(y){switch(y.label){case 0:d=Date.now()+a(4),f=Date.now()+u,h=i+"-"+l,p=window.localStorage,y.label=1;case 1:return Date.now()<f?[4,o(30)]:[3,8];case 2:return y.sent(),p.getItem(h)!==null?[3,5]:(m=this.id+"-"+l+"-"+d,[4,o(Math.floor(25*Math.random()))]);case 3:return y.sent(),p.setItem(h,JSON.stringify({id:this.id,iat:d,timeoutKey:m,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,o(30)];case 4:return y.sent(),(v=p.getItem(h))!==null&&(v=JSON.parse(v)).id===this.id&&v.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(h,d),[2,!0]):[3,7];case 5:return c.lockCorrector(),[4,this.waitForSomethingToChange(f)];case 6:y.sent(),y.label=7;case 7:return d=Date.now()+a(4),[3,1];case 8:return[2,!1]}})})},c.prototype.refreshLockWhileAcquired=function(l,u){return r(this,void 0,void 0,function(){var d=this;return n(this,function(f){return setTimeout(function(){return r(d,void 0,void 0,function(){var h,p;return n(this,function(m){switch(m.label){case 0:return[4,_n.default().lock(u)];case 1:return m.sent(),this.acquiredIatSet.has(u)?(h=window.localStorage,(p=h.getItem(l))===null?(_n.default().unlock(u),[2]):((p=JSON.parse(p)).timeRefreshed=Date.now(),h.setItem(l,JSON.stringify(p)),_n.default().unlock(u),this.refreshLockWhileAcquired(l,u),[2])):(_n.default().unlock(u),[2])}})})},1e3),[2]})})},c.prototype.waitForSomethingToChange=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,new Promise(function(d){var f=!1,h=Date.now(),p=!1;function m(){if(p||(window.removeEventListener("storage",m),c.removeFromWaiting(m),clearTimeout(v),p=!0),!f){f=!0;var y=50-(Date.now()-h);y>0?setTimeout(d,y):d()}}window.addEventListener("storage",m),c.addToWaiting(m);var v=setTimeout(m,Math.max(0,l-Date.now()))})];case 1:return u.sent(),[2]}})})},c.addToWaiting=function(l){this.removeFromWaiting(l),c.waiters!==void 0&&c.waiters.push(l)},c.removeFromWaiting=function(l){c.waiters!==void 0&&(c.waiters=c.waiters.filter(function(u){return u!==l}))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach(function(l){return l()})},c.prototype.releaseLock=function(l){return r(this,void 0,void 0,function(){return n(this,function(u){switch(u.label){case 0:return[4,this.releaseLock__private__(l)];case 1:return[2,u.sent()]}})})},c.prototype.releaseLock__private__=function(l){return r(this,void 0,void 0,function(){var u,d,f;return n(this,function(h){switch(h.label){case 0:return u=window.localStorage,d=i+"-"+l,(f=u.getItem(d))===null?[2]:(f=JSON.parse(f)).id!==this.id?[3,2]:[4,_n.default().lock(f.iat)];case 1:h.sent(),this.acquiredIatSet.delete(f.iat),u.removeItem(d),_n.default().unlock(f.iat),c.notifyWaiters(),h.label=2;case 2:return[2]}})})},c.lockCorrector=function(){for(var l=Date.now()-5e3,u=window.localStorage,d=Object.keys(u),f=!1,h=0;h<d.length;h++){var p=d[h];if(p.includes(i)){var m=u.getItem(p);m!==null&&((m=JSON.parse(m)).timeRefreshed===void 0&&m.timeAcquired<l||m.timeRefreshed!==void 0&&m.timeRefreshed<l)&&(u.removeItem(p),f=!0)}}f&&c.notifyWaiters()},c.waiters=void 0,c}();t.default=s}),M3=rh(L3),j3={timeoutInSeconds:60},z3=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Bb={name:"auth0-spa-js",version:"1.22.6"},Wb=function(){return Date.now()},Mr=function(e){function t(r,n){var i=e.call(this,n)||this;return i.error=r,i.error_description=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t.fromPayload=function(r){return new t(r.error,r.error_description)},t}(Error),U3=function(e){function t(r,n,i,o){o===void 0&&(o=null);var a=e.call(this,r,n)||this;return a.state=i,a.appState=o,Object.setPrototypeOf(a,t.prototype),a}return zn(t,e),t}(Mr),Hu=function(e){function t(){var r=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(r,t.prototype),r}return zn(t,e),t}(Mr),V3=function(e){function t(r){var n=e.call(this)||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Hu),B3=function(e){function t(r){var n=e.call(this,"cancelled","Popup closed")||this;return n.popup=r,Object.setPrototypeOf(n,t.prototype),n}return zn(t,e),t}(Mr),W3=function(e){function t(r,n,i){var o=e.call(this,r,n)||this;return o.mfa_token=i,Object.setPrototypeOf(o,t.prototype),o}return zn(t,e),t}(Mr),q3=function(e){function t(r,n){var i=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(E0(r,["default"]),"', scope: '").concat(E0(n),"')"))||this;return i.audience=r,i.scope=n,Object.setPrototypeOf(i,t.prototype),i}return zn(t,e),t}(Mr),H3=function(e){return new Promise(function(t,r){var n,i=setInterval(function(){e.popup&&e.popup.closed&&(clearInterval(i),clearTimeout(o),window.removeEventListener("message",n,!1),r(new B3(e.popup)))},1e3),o=setTimeout(function(){clearInterval(i),r(new V3(e.popup)),window.removeEventListener("message",n,!1)},1e3*(e.timeoutInSeconds||60));n=function(a){if(a.data&&a.data.type==="authorization_response"){if(clearTimeout(o),clearInterval(i),window.removeEventListener("message",n,!1),e.popup.close(),a.data.response.error)return r(Mr.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",n)})},$h=function(){return window.crypto||window.msCrypto},qb=function(){var e=$h();return e.subtle||e.webkitSubtle},Cr=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from($h().getRandomValues(new Uint8Array(43))).forEach(function(r){return t+=e[r%e.length]}),t},Gn=function(e){return btoa(e)},Gu=function(e){return Object.keys(e).filter(function(t){return e[t]!==void 0}).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},Ec=function(e){return ve(void 0,void 0,void 0,function(){var t;return ye(this,function(r){switch(r.label){case 0:return t=qb().digest({name:"SHA-256"},new TextEncoder().encode(e)),window.msCrypto?[2,new Promise(function(n,i){t.oncomplete=function(o){n(o.target.result)},t.onerror=function(o){i(o.error)},t.onabort=function(){i("The digest operation was aborted")}})]:[4,t];case 1:return[2,r.sent()]}})})},k0=function(e){return function(t){return decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},Oc=function(e){var t=new Uint8Array(e);return function(r){var n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,function(i){return n[i]})}(window.btoa(String.fromCharCode.apply(String,Cu([],vi(Array.from(t)),!1))))};function E0(e,t){return t===void 0&&(t=[]),e&&!t.includes(e)?e:""}var G3=function(e,t){return ve(void 0,void 0,void 0,function(){var r,n;return ye(this,function(i){switch(i.label){case 0:return[4,(o=e,a=t,a=a||{},new Promise(function(s,c){var l=new XMLHttpRequest,u=[],d=[],f={},h=function(){return{ok:(l.status/100|0)==2,statusText:l.statusText,status:l.status,url:l.responseURL,text:function(){return Promise.resolve(l.responseText)},json:function(){return Promise.resolve(l.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([l.response]))},clone:h,headers:{keys:function(){return u},entries:function(){return d},get:function(m){return f[m.toLowerCase()]},has:function(m){return m.toLowerCase()in f}}}};for(var p in l.open(a.method||"get",o,!0),l.onload=function(){l.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(m,v,y){u.push(v=v.toLowerCase()),d.push([v,y]),f[v]=f[v]?f[v]+","+y:y}),s(h())},l.onerror=c,l.withCredentials=a.credentials=="include",a.headers)l.setRequestHeader(p,a.headers[p]);l.send(a.body||null)}))];case 1:return r=i.sent(),n={ok:r.ok},[4,r.json()];case 2:return[2,(n.json=i.sent(),n)]}var o,a})})},Q3=function(e,t,r){return ve(void 0,void 0,void 0,function(){var n,i;return ye(this,function(o){return n=new AbortController,t.signal=n.signal,[2,Promise.race([G3(e,t),new Promise(function(a,s){i=setTimeout(function(){n.abort(),s(new Error("Timeout when executing 'fetch'"))},r)})]).finally(function(){clearTimeout(i)})]})})},K3=function(e,t,r,n,i,o,a){return ve(void 0,void 0,void 0,function(){return ye(this,function(s){return[2,(c={auth:{audience:t,scope:r},timeout:i,fetchUrl:e,fetchOptions:n,useFormData:a},l=o,new Promise(function(u,d){var f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?d(new Error(h.data.error)):u(h.data),f.port1.close()},l.postMessage(c,[f.port2])}))];var c,l})})},Y3=function(e,t,r,n,i,o,a){return a===void 0&&(a=1e4),ve(void 0,void 0,void 0,function(){return ye(this,function(s){return i?[2,K3(e,t,r,n,a,i,o)]:[2,Q3(e,n,a)]})})};function X3(e,t,r,n,i,o,a){return ve(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m;return ye(this,function(v){switch(v.label){case 0:s=null,l=0,v.label=1;case 1:if(!(l<3))return[3,6];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,Y3(e,r,n,i,o,a,t)];case 3:return c=v.sent(),s=null,[3,6];case 4:return u=v.sent(),s=u,[3,5];case 5:return l++,[3,1];case 6:if(s)throw s.message=s.message||"Failed to fetch",s;if(d=c.json,f=d.error,h=d.error_description,p=At(d,["error","error_description"]),!c.ok)throw m=h||"HTTP error. Unable to fetch ".concat(e),f==="mfa_required"?new W3(f,m,p.mfa_token):new Mr(f||"request_error",m);return[2,p]}})})}function ia(e,t){var r=e.baseUrl,n=e.timeout,i=e.audience,o=e.scope,a=e.auth0Client,s=e.useFormData,c=At(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return ve(this,void 0,void 0,function(){var l;return ye(this,function(u){switch(u.label){case 0:return l=s?Gu(c):JSON.stringify(c),[4,X3("".concat(r,"/oauth/token"),n,i||"default",o,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||Bb))}},t,s)];case 1:return[2,u.sent()]}})})}var Z3=function(e){return Array.from(new Set(e))},Hr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Z3(e.join(" ").trim().split(/\s+/)).join(" ")},En=function(){function e(t,r){r===void 0&&(r="@@auth0spajs@@"),this.prefix=r,this.client_id=t.client_id,this.scope=t.scope,this.audience=t.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var r=vi(t.split("::"),4),n=r[0],i=r[1],o=r[2];return new e({client_id:i,scope:r[3],audience:o},n)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),J3=function(){function e(){}return e.prototype.set=function(t,r){localStorage.setItem(t,JSON.stringify(r))},e.prototype.get=function(t){var r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}},e.prototype.remove=function(t){localStorage.removeItem(t)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter(function(t){return t.startsWith("@@auth0spajs@@")})},e}(),e4=function(){var e;this.enclosedCache=(e={},{set:function(t,r){e[t]=r},get:function(t){var r=e[t];if(r)return r},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},t4=function(){function e(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n,this.nowProvider=this.nowProvider||Wb}return e.prototype.get=function(t,r){var n;return r===void 0&&(r=0),ve(this,void 0,void 0,function(){var i,o,a,s,c;return ye(this,function(l){switch(l.label){case 0:return[4,this.cache.get(t.toKey())];case 1:return(i=l.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=l.sent())?(a=this.matchExistingCacheKey(t,o))?[4,this.cache.get(a)]:[3,4]:[2];case 3:i=l.sent(),l.label=4;case 4:return i?[4,this.nowProvider()]:[2];case 5:return s=l.sent(),c=Math.floor(s/1e3),i.expiresAt-r<c?i.body.refresh_token?(i.body={refresh_token:i.body.refresh_token},[4,this.cache.set(t.toKey(),i)]):[3,7]:[3,10];case 6:return l.sent(),[2,i.body];case 7:return[4,this.cache.remove(t.toKey())];case 8:return l.sent(),[4,(n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey())];case 9:return l.sent(),[2];case 10:return[2,i.body]}})})},e.prototype.set=function(t){var r;return ve(this,void 0,void 0,function(){var n,i;return ye(this,function(o){switch(o.label){case 0:return n=new En({client_id:t.client_id,scope:t.scope,audience:t.audience}),[4,this.wrapCacheEntry(t)];case 1:return i=o.sent(),[4,this.cache.set(n.toKey(),i)];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey())];case 3:return o.sent(),[2]}})})},e.prototype.clear=function(t){var r;return ve(this,void 0,void 0,function(){var n,i=this;return ye(this,function(o){switch(o.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=o.sent())?[4,n.filter(function(a){return!t||a.includes(t)}).reduce(function(a,s){return ve(i,void 0,void 0,function(){return ye(this,function(c){switch(c.label){case 0:return[4,a];case 1:return c.sent(),[4,this.cache.remove(s)];case 2:return c.sent(),[2]}})})},Promise.resolve())]:[2];case 2:return o.sent(),[4,(r=this.keyManifest)===null||r===void 0?void 0:r.clear()];case 3:return o.sent(),[2]}})})},e.prototype.clearSync=function(t){var r=this,n=this.cache.allKeys();n&&n.filter(function(i){return!t||i.includes(t)}).forEach(function(i){r.cache.remove(i)})},e.prototype.wrapCacheEntry=function(t){return ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),n=Math.floor(r/1e3)+t.expires_in,i=Math.min(n,t.decodedToken.claims.exp),[2,{body:t,expiresAt:i}]}})})},e.prototype.getCacheKeys=function(){var t;return ve(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return r=(t=n.sent())===null||t===void 0?void 0:t.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:r=n.sent(),n.label=4;case 4:return[2,r]}})})},e.prototype.matchExistingCacheKey=function(t,r){return r.filter(function(n){var i=En.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),a=t.scope.split(" "),s=i.scope&&a.reduce(function(c,l){return c&&o.has(l)},!0);return i.prefix==="@@auth0spajs@@"&&i.client_id===t.client_id&&i.audience===t.audience&&s})[0]},e}(),r4=function(){function e(t,r){this.storage=t,this.clientId=r,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(t){this.transaction=t,this.storage.save(this.storageKey,t,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Ki=function(e){return typeof e=="number"},n4=["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"],i4=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(s){var c=s.split("."),l=vi(c,3),u=l[0],d=l[1],f=l[2];if(c.length!==3||!u||!d||!f)throw new Error("ID token could not be decoded");var h=JSON.parse(k0(d)),p={__raw:s},m={};return Object.keys(h).forEach(function(v){p[v]=h[v],n4.includes(v)||(m[v]=h[v])}),{encoded:{header:u,payload:d,signature:f},header:JSON.parse(k0(u)),claims:p,user:m}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.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(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Ki(t.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(!Ki(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ki(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var r=e.leeway||60,n=new Date(e.now||Date.now()),i=new Date(0),o=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),i.setUTCSeconds(t.claims.exp+r),o.setUTCSeconds(t.claims.nbf-r),n>i)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(n,") is after expiration time (").concat(i,")"));if(Ki(t.claims.nbf)&&n<o)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(n,") is before ").concat(o));if(Ki(t.claims.auth_time)&&n>a)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. Currrent time (".concat(n,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},On=Ii(function(e,t){var r=yr&&yr.__assign||function(){return r=Object.assign||function(c){for(var l,u=1,d=arguments.length;u<d;u++)for(var f in l=arguments[u])Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f]);return c},r.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function i(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).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 n("Expires",d.expires?d.expires.toUTCString():"")+n("Domain",d.domain)+n("Path",d.path)+n("Secure",d.secure)+n("SameSite",d.sameSite)}(u)}function o(c){for(var l={},u=c?c.split("; "):[],d=/(%[\dA-F]{2})+/gi,f=0;f<u.length;f++){var h=u[f].split("="),p=h.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{l[h[0].replace(d,decodeURIComponent)]=p.replace(d,decodeURIComponent)}catch{}}return l}function a(){return o(document.cookie)}function s(c,l,u){document.cookie=i(c,l,r({path:"/"},u))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(c){return a()[c]},t.set=s,t.remove=function(c,l){s(c,"",r(r({},l),{expires:-1}))}});rh(On),On.encode,On.parse,On.getAll;var o4=On.get,Hb=On.set,Gb=On.remove,Jn={get:function(e){var t=o4(e);if(t!==void 0)return JSON.parse(t)},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),Hb(e,JSON.stringify(t),n)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Gb(e,r)}},a4={get:function(e){var t=Jn.get(e);return t||Jn.get("".concat("_legacy_").concat(e))},save:function(e,t,r){var n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),Hb("".concat("_legacy_").concat(e),JSON.stringify(t),n),Jn.save(e,t,r)},remove:function(e,t){var r={};t?.cookieDomain&&(r.domain=t.cookieDomain),Gb(e,r),Jn.remove(e,t),Jn.remove("".concat("_legacy_").concat(e),t)}},s4={get:function(e){if(typeof sessionStorage<"u"){var t=sessionStorage.getItem(e);if(t!==void 0)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function l4(e,t,r){var n=t===void 0?null:t,i=function(c,l){var u=atob(c);if(l){for(var d=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)d[f]=u.charCodeAt(f);return String.fromCharCode.apply(null,new Uint16Array(d.buffer))}return u}(e,r!==void 0&&r),o=i.indexOf(`
2
2
  `,10)+1,a=i.substring(o)+(n?"//# sourceMappingURL="+n:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var O0,C0,P0,Cc,c4=(O0="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIHQ9ZnVuY3Rpb24oZSxyKXtyZXR1cm4gdD1PYmplY3Quc2V0UHJvdG90eXBlT2Z8fHtfX3Byb3RvX186W119aW5zdGFuY2VvZiBBcnJheSYmZnVuY3Rpb24odCxlKXt0Ll9fcHJvdG9fXz1lfXx8ZnVuY3Rpb24odCxlKXtmb3IodmFyIHIgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxyKSYmKHRbcl09ZVtyXSl9LHQoZSxyKX07ZnVuY3Rpb24gZShlLHIpe2lmKCJmdW5jdGlvbiIhPXR5cGVvZiByJiZudWxsIT09cil0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIrU3RyaW5nKHIpKyIgaXMgbm90IGEgY29uc3RydWN0b3Igb3IgbnVsbCIpO2Z1bmN0aW9uIG4oKXt0aGlzLmNvbnN0cnVjdG9yPWV9dChlLHIpLGUucHJvdG90eXBlPW51bGw9PT1yP09iamVjdC5jcmVhdGUocik6KG4ucHJvdG90eXBlPXIucHJvdG90eXBlLG5ldyBuKX12YXIgcj1mdW5jdGlvbigpe3JldHVybiByPU9iamVjdC5hc3NpZ258fGZ1bmN0aW9uKHQpe2Zvcih2YXIgZSxyPTEsbj1hcmd1bWVudHMubGVuZ3RoO3I8bjtyKyspZm9yKHZhciBvIGluIGU9YXJndW1lbnRzW3JdKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLG8pJiYodFtvXT1lW29dKTtyZXR1cm4gdH0sci5hcHBseSh0aGlzLGFyZ3VtZW50cyl9O2Z1bmN0aW9uIG4odCxlLHIsbil7cmV0dXJuIG5ldyhyfHwocj1Qcm9taXNlKSkoKGZ1bmN0aW9uKG8sYyl7ZnVuY3Rpb24gaSh0KXt0cnl7cyhuLm5leHQodCkpfWNhdGNoKHQpe2ModCl9fWZ1bmN0aW9uIGEodCl7dHJ5e3Mobi50aHJvdyh0KSl9Y2F0Y2godCl7Yyh0KX19ZnVuY3Rpb24gcyh0KXt2YXIgZTt0LmRvbmU/byh0LnZhbHVlKTooZT10LnZhbHVlLGUgaW5zdGFuY2VvZiByP2U6bmV3IHIoKGZ1bmN0aW9uKHQpe3QoZSl9KSkpLnRoZW4oaSxhKX1zKChuPW4uYXBwbHkodCxlfHxbXSkpLm5leHQoKSl9KSl9ZnVuY3Rpb24gbyh0LGUpe3ZhciByLG4sbyxjLGk9e2xhYmVsOjAsc2VudDpmdW5jdGlvbigpe2lmKDEmb1swXSl0aHJvdyBvWzFdO3JldHVybiBvWzFdfSx0cnlzOltdLG9wczpbXX07cmV0dXJuIGM9e25leHQ6YSgwKSx0aHJvdzphKDEpLHJldHVybjphKDIpfSwiZnVuY3Rpb24iPT10eXBlb2YgU3ltYm9sJiYoY1tTeW1ib2wuaXRlcmF0b3JdPWZ1bmN0aW9uKCl7cmV0dXJuIHRoaXN9KSxjO2Z1bmN0aW9uIGEoYyl7cmV0dXJuIGZ1bmN0aW9uKGEpe3JldHVybiBmdW5jdGlvbihjKXtpZihyKXRocm93IG5ldyBUeXBlRXJyb3IoIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy4iKTtmb3IoO2k7KXRyeXtpZihyPTEsbiYmKG89MiZjWzBdP24ucmV0dXJuOmNbMF0/bi50aHJvd3x8KChvPW4ucmV0dXJuKSYmby5jYWxsKG4pLDApOm4ubmV4dCkmJiEobz1vLmNhbGwobixjWzFdKSkuZG9uZSlyZXR1cm4gbztzd2l0Y2gobj0wLG8mJihjPVsyJmNbMF0sby52YWx1ZV0pLGNbMF0pe2Nhc2UgMDpjYXNlIDE6bz1jO2JyZWFrO2Nhc2UgNDpyZXR1cm4gaS5sYWJlbCsrLHt2YWx1ZTpjWzFdLGRvbmU6ITF9O2Nhc2UgNTppLmxhYmVsKyssbj1jWzFdLGM9WzBdO2NvbnRpbnVlO2Nhc2UgNzpjPWkub3BzLnBvcCgpLGkudHJ5cy5wb3AoKTtjb250aW51ZTtkZWZhdWx0OmlmKCEobz1pLnRyeXMsKG89by5sZW5ndGg+MCYmb1tvLmxlbmd0aC0xXSl8fDYhPT1jWzBdJiYyIT09Y1swXSkpe2k9MDtjb250aW51ZX1pZigzPT09Y1swXSYmKCFvfHxjWzFdPm9bMF0mJmNbMV08b1szXSkpe2kubGFiZWw9Y1sxXTticmVha31pZig2PT09Y1swXSYmaS5sYWJlbDxvWzFdKXtpLmxhYmVsPW9bMV0sbz1jO2JyZWFrfWlmKG8mJmkubGFiZWw8b1syXSl7aS5sYWJlbD1vWzJdLGkub3BzLnB1c2goYyk7YnJlYWt9b1syXSYmaS5vcHMucG9wKCksaS50cnlzLnBvcCgpO2NvbnRpbnVlfWM9ZS5jYWxsKHQsaSl9Y2F0Y2godCl7Yz1bNix0XSxuPTB9ZmluYWxseXtyPW89MH1pZig1JmNbMF0pdGhyb3cgY1sxXTtyZXR1cm57dmFsdWU6Y1swXT9jWzFdOnZvaWQgMCxkb25lOiEwfX0oW2MsYV0pfX19ZnVuY3Rpb24gYyh0LGUpe3JldHVybiB2b2lkIDA9PT1lJiYoZT1bXSksdCYmIWUuaW5jbHVkZXModCk/dDoiIn12YXIgaT1mdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbil7dmFyIG89dC5jYWxsKHRoaXMsbil8fHRoaXM7cmV0dXJuIG8uZXJyb3I9ZSxvLmVycm9yX2Rlc2NyaXB0aW9uPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyLmZyb21QYXlsb2FkPWZ1bmN0aW9uKHQpe3JldHVybiBuZXcgcih0LmVycm9yLHQuZXJyb3JfZGVzY3JpcHRpb24pfSxyfShFcnJvcik7IWZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSxuLG8sYyl7dm9pZCAwPT09YyYmKGM9bnVsbCk7dmFyIGk9dC5jYWxsKHRoaXMsZSxuKXx8dGhpcztyZXR1cm4gaS5zdGF0ZT1vLGkuYXBwU3RhdGU9YyxPYmplY3Quc2V0UHJvdG90eXBlT2YoaSxyLnByb3RvdHlwZSksaX1lKHIsdCl9KGkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShmdW5jdGlvbih0KXtmdW5jdGlvbiByKCl7dmFyIGU9dC5jYWxsKHRoaXMsInRpbWVvdXQiLCJUaW1lb3V0Iil8fHRoaXM7cmV0dXJuIE9iamVjdC5zZXRQcm90b3R5cGVPZihlLHIucHJvdG90eXBlKSxlfXJldHVybiBlKHIsdCkscn0oaSkpLGZ1bmN0aW9uKHQpe2Z1bmN0aW9uIHIoZSl7dmFyIG49dC5jYWxsKHRoaXMsImNhbmNlbGxlZCIsIlBvcHVwIGNsb3NlZCIpfHx0aGlzO3JldHVybiBuLnBvcHVwPWUsT2JqZWN0LnNldFByb3RvdHlwZU9mKG4sci5wcm90b3R5cGUpLG59ZShyLHQpfShpKSxmdW5jdGlvbih0KXtmdW5jdGlvbiByKGUsbixvKXt2YXIgYz10LmNhbGwodGhpcyxlLG4pfHx0aGlzO3JldHVybiBjLm1mYV90b2tlbj1vLE9iamVjdC5zZXRQcm90b3R5cGVPZihjLHIucHJvdG90eXBlKSxjfWUocix0KX0oaSk7dmFyIGE9ZnVuY3Rpb24odCl7ZnVuY3Rpb24gcihlLG4pe3ZhciBvPXQuY2FsbCh0aGlzLCJtaXNzaW5nX3JlZnJlc2hfdG9rZW4iLCJNaXNzaW5nIFJlZnJlc2ggVG9rZW4gKGF1ZGllbmNlOiAnIi5jb25jYXQoYyhlLFsiZGVmYXVsdCJdKSwiJywgc2NvcGU6ICciKS5jb25jYXQoYyhuKSwiJykiKSl8fHRoaXM7cmV0dXJuIG8uYXVkaWVuY2U9ZSxvLnNjb3BlPW4sT2JqZWN0LnNldFByb3RvdHlwZU9mKG8sci5wcm90b3R5cGUpLG99cmV0dXJuIGUocix0KSxyfShpKSxzPXt9LHU9ZnVuY3Rpb24odCxlKXtyZXR1cm4iIi5jb25jYXQodCwifCIpLmNvbmNhdChlKX07YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGZ1bmN0aW9uKHQpe3ZhciBlPXQuZGF0YSxjPWUudGltZW91dCxpPWUuYXV0aCxmPWUuZmV0Y2hVcmwsbD1lLmZldGNoT3B0aW9ucyxwPWUudXNlRm9ybURhdGEsaD1mdW5jdGlvbih0LGUpe3ZhciByPSJmdW5jdGlvbiI9PXR5cGVvZiBTeW1ib2wmJnRbU3ltYm9sLml0ZXJhdG9yXTtpZighcilyZXR1cm4gdDt2YXIgbixvLGM9ci5jYWxsKHQpLGk9W107dHJ5e2Zvcig7KHZvaWQgMD09PWV8fGUtLSA+MCkmJiEobj1jLm5leHQoKSkuZG9uZTspaS5wdXNoKG4udmFsdWUpfWNhdGNoKHQpe289e2Vycm9yOnR9fWZpbmFsbHl7dHJ5e24mJiFuLmRvbmUmJihyPWMucmV0dXJuKSYmci5jYWxsKGMpfWZpbmFsbHl7aWYobyl0aHJvdyBvLmVycm9yfX1yZXR1cm4gaX0odC5wb3J0cywxKVswXTtyZXR1cm4gbih2b2lkIDAsdm9pZCAwLHZvaWQgMCwoZnVuY3Rpb24oKXt2YXIgdCxlLG4seSx2LGIsZCx3LE8sXztyZXR1cm4gbyh0aGlzLChmdW5jdGlvbihvKXtzd2l0Y2goby5sYWJlbCl7Y2FzZSAwOm49KGU9aXx8e30pLmF1ZGllbmNlLHk9ZS5zY29wZSxvLmxhYmVsPTE7Y2FzZSAxOmlmKG8udHJ5cy5wdXNoKFsxLDcsLDhdKSwhKHY9cD8obT1sLmJvZHksaz1uZXcgVVJMU2VhcmNoUGFyYW1zKG0pLFA9e30say5mb3JFYWNoKChmdW5jdGlvbih0LGUpe1BbZV09dH0pKSxQKTpKU09OLnBhcnNlKGwuYm9keSkpLnJlZnJlc2hfdG9rZW4mJiJyZWZyZXNoX3Rva2VuIj09PXYuZ3JhbnRfdHlwZSl7aWYoYj1mdW5jdGlvbih0LGUpe3JldHVybiBzW3UodCxlKV19KG4seSksIWIpdGhyb3cgbmV3IGEobix5KTtsLmJvZHk9cD9uZXcgVVJMU2VhcmNoUGFyYW1zKHIocih7fSx2KSx7cmVmcmVzaF90b2tlbjpifSkpLnRvU3RyaW5nKCk6SlNPTi5zdHJpbmdpZnkocihyKHt9LHYpLHtyZWZyZXNoX3Rva2VuOmJ9KSl9ZD12b2lkIDAsImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixsLnNpZ25hbD1kLnNpZ25hbCksdz12b2lkIDAsby5sYWJlbD0yO2Nhc2UgMjpyZXR1cm4gby50cnlzLnB1c2goWzIsNCwsNV0pLFs0LFByb21pc2UucmFjZShbKGc9YyxuZXcgUHJvbWlzZSgoZnVuY3Rpb24odCl7cmV0dXJuIHNldFRpbWVvdXQodCxnKX0pKSksZmV0Y2goZixyKHt9LGwpKV0pXTtjYXNlIDM6cmV0dXJuIHc9by5zZW50KCksWzMsNV07Y2FzZSA0OnJldHVybiBPPW8uc2VudCgpLGgucG9zdE1lc3NhZ2Uoe2Vycm9yOk8ubWVzc2FnZX0pLFsyXTtjYXNlIDU6cmV0dXJuIHc/WzQsdy5qc29uKCldOihkJiZkLmFib3J0KCksaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KSxbMl0pO2Nhc2UgNjpyZXR1cm4odD1vLnNlbnQoKSkucmVmcmVzaF90b2tlbj8oZnVuY3Rpb24odCxlLHIpe3NbdShlLHIpXT10fSh0LnJlZnJlc2hfdG9rZW4sbix5KSxkZWxldGUgdC5yZWZyZXNoX3Rva2VuKTpmdW5jdGlvbih0LGUpe2RlbGV0ZSBzW3UodCxlKV19KG4seSksaC5wb3N0TWVzc2FnZSh7b2s6dy5vayxqc29uOnR9KSxbMyw4XTtjYXNlIDc6cmV0dXJuIF89by5zZW50KCksaC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3JfZGVzY3JpcHRpb246Xy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIGcsbSxrLFB9KSl9KSl9KSl9KCk7Cgo=",C0=null,P0=!1,function(e){return Cc=Cc||l4(O0,C0,P0),new Worker(Cc,e)}),Pc={},u4=function(){function e(t,r){this.cache=t,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(t){var r;return ve(this,void 0,void 0,function(){var n,i;return ye(this,function(o){switch(o.label){case 0:return i=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(n=new(i.apply(Set,[void 0,((r=o.sent())===null||r===void 0?void 0:r.keys)||[]]))).add(t),[4,this.cache.set(this.manifestKey,{keys:Cu([],vi(n),!1)})];case 2:return o.sent(),[2]}})})},e.prototype.remove=function(t){return ve(this,void 0,void 0,function(){var r,n;return ye(this,function(i){switch(i.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(r=i.sent())?((n=new Set(r.keys)).delete(t),n.size>0?[4,this.cache.set(this.manifestKey,{keys:Cu([],vi(n),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,i.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}})})},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(t){return"".concat("@@auth0spajs@@","::").concat(t)},e}(),Tc=new M3,d4={memory:function(){return new e4().enclosedCache},localstorage:function(){return new J3}},T0=function(e){return d4[e]},f4=function(){return!/Trident.*rv:11\.0/.test(navigator.userAgent)},h4=function(){function e(t){var r,n,i,o,a=this;if(this.options=t,this._releaseLockOnPageHide=function(){return ve(a,void 0,void 0,function(){return ye(this,function(l){switch(l.label){case 0:return[4,Tc.releaseLock("auth0.lock.getTokenSilently")];case 1:return l.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[2]}})})},typeof window<"u"&&function(){if(!$h())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(qb()===void 0)throw new Error(`
3
3
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
4
4
  `)}(),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)i=t.cache;else{if(this.cacheLocation=t.cacheLocation||"memory",!T0(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));i=T0(this.cacheLocation)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?Jn:a4,this.orgHintCookieName=(o=this.options.client_id,"auth0.".concat(o,".organization_hint")),this.isAuthenticatedCookieName=function(l){return"auth0.".concat(l,".is.authenticated")}(this.options.client_id),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;var s,c=t.useCookiesForTransactions?this.cookieStorage:s4;this.scope=this.options.scope,this.transactionManager=new r4(c,this.options.client_id),this.nowProvider=this.options.nowProvider||Wb,this.cacheManager=new t4(i,i.allKeys?null:new u4(i,this.options.client_id),this.nowProvider),this.domainUrl=(s=this.options.domain,/^https?:\/\//.test(s)?s:"https://".concat(s)),this.tokenIssuer=function(l,u){return l?l.startsWith("https://")?l:"https://".concat(l,"/"):"".concat(u,"/")}(this.options.issuer,this.domainUrl),this.defaultScope=Hr("openid",((n=(r=this.options)===null||r===void 0?void 0:r.advancedOptions)===null||n===void 0?void 0:n.defaultScope)!==void 0?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=Hr(this.scope,"offline_access")),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&this.cacheLocation==="memory"&&f4()&&(this.worker=new c4),this.customOptions=function(l){return l.advancedOptions,l.audience,l.auth0Client,l.authorizeTimeoutInSeconds,l.cacheLocation,l.cache,l.client_id,l.domain,l.issuer,l.leeway,l.max_age,l.nowProvider,l.redirect_uri,l.scope,l.useRefreshTokens,l.useRefreshTokensFallback,l.useCookiesForTransactions,l.useFormData,At(l,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","cache","client_id","domain","issuer","leeway","max_age","nowProvider","redirect_uri","scope","useRefreshTokens","useRefreshTokensFallback","useCookiesForTransactions","useFormData"])}(t),this.useRefreshTokensFallback=this.options.useRefreshTokensFallback!==!1}return e.prototype._url=function(t){var r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Bb)));return"".concat(this.domainUrl).concat(t,"&auth0Client=").concat(r)},e.prototype._getParams=function(t,r,n,i,o){var a=this.options;a.useRefreshTokens,a.useCookiesForTransactions,a.useFormData,a.auth0Client,a.cacheLocation,a.advancedOptions,a.detailedResponse,a.nowProvider,a.authorizeTimeoutInSeconds,a.legacySameSiteCookie,a.sessionCheckExpiryDays,a.domain,a.leeway,a.httpTimeoutInSeconds;var s=At(a,["useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return se(se(se({},s),t),{scope:Hr(this.defaultScope,this.scope,t.scope),response_type:"code",response_mode:"query",state:r,nonce:n,redirect_uri:o||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(t){return this._url("/authorize?".concat(Gu(t)))},e.prototype._verifyIdToken=function(t,r,n){return ve(this,void 0,void 0,function(){var i;return ye(this,function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return i=o.sent(),[2,i4({iss:this.tokenIssuer,aud:this.options.client_id,id_token:t,nonce:r,organizationId:n,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:i})]}})})},e.prototype._parseNumber=function(t){return typeof t!="string"?t:parseInt(t,10)||void 0},e.prototype._processOrgIdHint=function(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})},e.prototype.buildAuthorizeUrl=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h;return ye(this,function(p){switch(p.label){case 0:return r=t.redirect_uri,n=t.appState,i=At(t,["redirect_uri","appState"]),o=Gn(Cr()),a=Gn(Cr()),s=Cr(),[4,Ec(s)];case 1:return c=p.sent(),l=Oc(c),u=t.fragment?"#".concat(t.fragment):"",d=this._getParams(i,o,a,l,r),f=this._authorizeUrl(d),h=t.organization||this.options.organization,this.transactionManager.create(se({nonce:a,code_verifier:s,appState:n,scope:d.scope,audience:d.audience||"default",redirect_uri:d.redirect_uri,state:o},h&&{organizationId:h})),[2,f+u]}})})},e.prototype.loginWithPopup=function(t,r){return ve(this,void 0,void 0,function(){var n,i,o,a,s,c,l,u,d,f,h,p,m;return ye(this,function(v){switch(v.label){case 0:if(t=t||{},!(r=r||{}).popup&&(r.popup=function(y){var b=window.screenX+(window.innerWidth-400)/2,g=window.screenY+(window.innerHeight-600)/2;return window.open(y,"auth0:authorize:popup","left=".concat(b,",top=").concat(g,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");return n=At(t,[]),i=Gn(Cr()),o=Gn(Cr()),a=Cr(),[4,Ec(a)];case 1:return s=v.sent(),c=Oc(s),l=this._getParams(n,i,o,c,this.options.redirect_uri||window.location.origin),u=this._authorizeUrl(se(se({},l),{response_mode:"web_message"})),r.popup.location.href=u,[4,H3(se(se({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(d=v.sent(),i!==d.state)throw new Error("Invalid state");return[4,ia({audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:a,code:d.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return f=v.sent(),h=t.organization||this.options.organization,[4,this._verifyIdToken(f.id_token,o,h)];case 4:return p=v.sent(),m=se(se({},f),{decodedToken:p,scope:l.scope,audience:l.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 5:return v.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(p.claims.org_id),[2]}})})},e.prototype.getUser=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=Hr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.user]}})})},e.prototype.getIdTokenClaims=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.audience||this.options.audience||"default",n=Hr(this.defaultScope,this.scope,t.scope),[4,this.cacheManager.get(new En({client_id:this.options.client_id,audience:r,scope:n}))];case 1:return[2,(i=o.sent())&&i.decodedToken&&i.decodedToken.claims]}})})},e.prototype.loginWithRedirect=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i;return ye(this,function(o){switch(o.label){case 0:return r=t.redirectMethod,n=At(t,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return i=o.sent(),window.location[r||"assign"](i),[2]}})})},e.prototype.handleRedirectCallback=function(t){return t===void 0&&(t=window.location.href),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d;return ye(this,function(f){switch(f.label){case 0:if((r=t.split("?").slice(1)).length===0)throw new Error("There are no query params available for parsing.");if(n=function(h){h.indexOf("#")>-1&&(h=h.substr(0,h.indexOf("#")));var p=h.split("&"),m={};return p.forEach(function(v){var y=vi(v.split("="),2),b=y[0],g=y[1];m[b]=decodeURIComponent(g)}),m.expires_in&&(m.expires_in=parseInt(m.expires_in)),m}(r.join("")),i=n.state,o=n.code,a=n.error,s=n.error_description,!(c=this.transactionManager.get()))throw new Error("Invalid state");if(this.transactionManager.remove(),a)throw new U3(a,s,i,c.appState);if(!c.code_verifier||c.state&&c.state!==i)throw new Error("Invalid state");return l={audience:c.audience,scope:c.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:c.code_verifier,grant_type:"authorization_code",code:o,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},c.redirect_uri!==void 0&&(l.redirect_uri=c.redirect_uri),[4,ia(l,this.worker)];case 1:return u=f.sent(),[4,this._verifyIdToken(u.id_token,c.nonce,c.organizationId)];case 2:return d=f.sent(),[4,this.cacheManager.set(se(se(se(se({},u),{decodedToken:d,audience:c.audience,scope:c.scope}),u.scope?{oauthTokenScope:u.scope}:null),{client_id:this.options.client_id}))];case 3:return f.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(d.claims.org_id),[2,{appState:c.appState}]}})})},e.prototype.checkSession=function(t){return ve(this,void 0,void 0,function(){var r;return ye(this,function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.getTokenSilently(t)];case 2:return n.sent(),[3,4];case 3:if(r=n.sent(),!z3.includes(r.error))throw r;return[3,4];case 4:return[2]}})})},e.prototype.getTokenSilently=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a=this;return ye(this,function(s){switch(s.label){case 0:return r=se(se({audience:this.options.audience,ignoreCache:!1},t),{scope:Hr(this.defaultScope,this.scope,t.scope)}),n=r.ignoreCache,i=At(r,["ignoreCache"]),[4,(c=function(){return a._getTokenSilently(se({ignoreCache:n},i))},l="".concat(this.options.client_id,"::").concat(i.audience,"::").concat(i.scope),u=Pc[l],u||(u=c().finally(function(){delete Pc[l],u=null}),Pc[l]=u),u)];case 1:return o=s.sent(),[2,t.detailedResponse?o:o.access_token]}var c,l,u})})},e.prototype._getTokenSilently=function(t){return t===void 0&&(t={}),ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ye(this,function(d){switch(d.label){case 0:return r=t.ignoreCache,n=At(t,["ignoreCache"]),r?[3,2]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 1:if(i=d.sent())return[2,i];d.label=2;case 2:return[4,(f=function(){return Tc.acquireLock("auth0.lock.getTokenSilently",5e3)},h=10,h===void 0&&(h=3),ve(void 0,void 0,void 0,function(){var p;return ye(this,function(m){switch(m.label){case 0:p=0,m.label=1;case 1:return p<h?[4,f()]:[3,4];case 2:if(m.sent())return[2,!0];m.label=3;case 3:return p++,[3,1];case 4:return[2,!1]}})}))];case 3:if(!d.sent())return[3,15];d.label=4;case 4:return d.trys.push([4,,12,14]),window.addEventListener("pagehide",this._releaseLockOnPageHide),r?[3,6]:[4,this._getEntryFromCache({scope:n.scope,audience:n.audience||"default",client_id:this.options.client_id})];case 5:if(i=d.sent())return[2,i];d.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(n)]:[3,8];case 7:return a=d.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(n)];case 9:a=d.sent(),d.label=10;case 10:return o=a,[4,this.cacheManager.set(se({client_id:this.options.client_id},o))];case 11:return d.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),s=o.id_token,c=o.access_token,l=o.oauthTokenScope,u=o.expires_in,[2,se(se({id_token:s,access_token:c},l?{scope:l}:null),{expires_in:u})];case 12:return[4,Tc.releaseLock("auth0.lock.getTokenSilently")];case 13:return d.sent(),window.removeEventListener("pagehide",this._releaseLockOnPageHide),[7];case 14:return[3,16];case 15:throw new Hu;case 16:return[2]}var f,h})})},e.prototype.getTokenWithPopup=function(t,r){return t===void 0&&(t={}),r===void 0&&(r={}),ve(this,void 0,void 0,function(){return ye(this,function(n){switch(n.label){case 0:return t.audience=t.audience||this.options.audience,t.scope=Hr(this.defaultScope,this.scope,t.scope),r=se(se({},j3),r),[4,this.loginWithPopup(t,r)];case 1:return n.sent(),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 2:return[2,n.sent().access_token]}})})},e.prototype.isAuthenticated=function(){return ve(this,void 0,void 0,function(){return ye(this,function(t){switch(t.label){case 0:return[4,this.getUser()];case 1:return[2,!!t.sent()]}})})},e.prototype.buildLogoutUrl=function(t){t===void 0&&(t={}),t.client_id!==null?t.client_id=t.client_id||this.options.client_id:delete t.client_id;var r=t.federated,n=At(t,["federated"]),i=r?"&federated":"";return this._url("/v2/logout?".concat(Gu(n)))+i},e.prototype.logout=function(t){var r=this;t===void 0&&(t={});var n=t.localOnly,i=At(t,["localOnly"]);if(n&&i.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var o=function(){if(r.cookieStorage.remove(r.orgHintCookieName,{cookieDomain:r.options.cookieDomain}),r.cookieStorage.remove(r.isAuthenticatedCookieName,{cookieDomain:r.options.cookieDomain}),!n){var a=r.buildLogoutUrl(i);window.location.assign(a)}};if(this.options.cache)return this.cacheManager.clear().then(function(){return o()});this.cacheManager.clearSync(),o()},e.prototype._getTokenFromIFrame=function(t){return ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b;return ye(this,function(g){switch(g.label){case 0:return r=Gn(Cr()),n=Gn(Cr()),i=Cr(),[4,Ec(i)];case 1:o=g.sent(),a=Oc(o),s=At(t,["detailedResponse"]),c=this._getParams(s,r,n,a,t.redirect_uri||this.options.redirect_uri||window.location.origin),(l=this.cookieStorage.get(this.orgHintCookieName))&&!c.organization&&(c.organization=l),u=this._authorizeUrl(se(se({},c),{prompt:"none",response_mode:"web_message"})),g.label=2;case 2:if(g.trys.push([2,6,,7]),window.crossOriginIsolated)throw new Mr("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return d=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,[4,(w=u,x=this.domainUrl,E=d,E===void 0&&(E=60),new Promise(function(S,T){var M=window.document.createElement("iframe");M.setAttribute("width","0"),M.setAttribute("height","0"),M.style.display="none";var L,K=function(){window.document.body.contains(M)&&(window.document.body.removeChild(M),window.removeEventListener("message",L,!1))},D=setTimeout(function(){T(new Hu),K()},1e3*E);L=function(R){if(R.origin==x&&R.data&&R.data.type==="authorization_response"){var U=R.source;U&&U.close(),R.data.response.error?T(Mr.fromPayload(R.data.response)):S(R.data.response),clearTimeout(D),window.removeEventListener("message",L,!1),setTimeout(K,2e3)}},window.addEventListener("message",L,!1),window.document.body.appendChild(M),M.setAttribute("src",w)}))];case 3:if(f=g.sent(),r!==f.state)throw new Error("Invalid state");return h=t.scope,p=t.audience,m=At(t,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds","detailedResponse"]),[4,ia(se(se(se({},this.customOptions),m),{scope:h,audience:p,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:i,code:f.code,grant_type:"authorization_code",redirect_uri:c.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:m.timeout||this.httpTimeoutMs}),this.worker)];case 4:return v=g.sent(),[4,this._verifyIdToken(v.id_token,n)];case 5:return y=g.sent(),this._processOrgIdHint(y.claims.org_id),[2,se(se({},v),{decodedToken:y,scope:c.scope,oauthTokenScope:v.scope,audience:c.audience||"default"})];case 6:throw(b=g.sent()).error==="login_required"&&this.logout({localOnly:!0}),b;case 7:return[2]}var w,x,E})})},e.prototype._getTokenUsingRefreshToken=function(t){return ve(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,u;return ye(this,function(d){switch(d.label){case 0:return t.scope=Hr(this.defaultScope,this.options.scope,t.scope),[4,this.cacheManager.get(new En({scope:t.scope,audience:t.audience||"default",client_id:this.options.client_id}))];case 1:return(r=d.sent())&&r.refresh_token||this.worker?[3,4]:this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,3];case 2:return[2,d.sent()];case 3:throw new q3(t.audience||"default",t.scope);case 4:n=t.redirect_uri||this.options.redirect_uri||window.location.origin,o=t.scope,a=t.audience,s=At(t,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),c=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null,d.label=5;case 5:return d.trys.push([5,7,,10]),[4,ia(se(se(se(se(se({},this.customOptions),s),{audience:a,scope:o,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),c&&{timeout:c}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 6:return i=d.sent(),[3,10];case 7:return((l=d.sent()).message.indexOf("Missing Refresh Token")>-1||l.message&&l.message.indexOf("invalid refresh token")>-1)&&this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(t)]:[3,9];case 8:return[2,d.sent()];case 9:throw l;case 10:return[4,this._verifyIdToken(i.id_token)];case 11:return u=d.sent(),[2,se(se({},i),{decodedToken:u,scope:t.scope,oauthTokenScope:i.scope,audience:t.audience||"default"})]}})})},e.prototype._getEntryFromCache=function(t){var r=t.scope,n=t.audience,i=t.client_id;return ve(this,void 0,void 0,function(){var o,a,s,c,l;return ye(this,function(u){switch(u.label){case 0:return[4,this.cacheManager.get(new En({scope:r,audience:n,client_id:i}),60)];case 1:return(o=u.sent())&&o.access_token?(a=o.id_token,s=o.access_token,c=o.oauthTokenScope,l=o.expires_in,[2,se(se({id_token:a,access_token:s},c?{scope:c}:null),{expires_in:l})]):[2]}})})},e}(),Nc="Invariant Violation",N0=Object.setPrototypeOf,p4=N0===void 0?function(e,t){return e.__proto__=t,e}:N0,be=function(e){cr(t,e);function t(r){r===void 0&&(r=Nc);var n=e.call(this,typeof r=="number"?Nc+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Nc,p4(n,t.prototype),n}return t}(Error);function B(e,t){if(!e)throw new be(t)}var Qb=["debug","log","warn","error","silent"],m4=Qb.indexOf("log");function oa(e){return function(){if(Qb.indexOf(e)>=m4){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=oa("debug"),e.log=oa("log"),e.warn=oa("warn"),e.error=oa("error")})(B||(B={}));function Ht(e){try{return e()}catch{}}const I0=Ht(function(){return globalThis})||Ht(function(){return window})||Ht(function(){return self})||Ht(function(){return global})||Ht(function(){return Ht.constructor("return this")()});var A0="__",D0=[A0,A0].join("DEV");function v4(){try{return Boolean(__DEV__)}catch{return Object.defineProperty(I0,D0,{value:Ht(function(){return"production"})!=="production",enumerable:!1,configurable:!0,writable:!0}),I0[D0]}}const Ic=v4();function Xr(e){try{return e()}catch{}}var Qu=Xr(function(){return globalThis})||Xr(function(){return window})||Xr(function(){return self})||Xr(function(){return global})||Xr(function(){return Xr.constructor("return this")()}),Ku=!1;function y4(){Qu&&!Xr(function(){return"production"})&&!Xr(function(){return process})&&(Object.defineProperty(Qu,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Ku=!0)}y4();function R0(){Ku&&(delete Qu.process,Ku=!1)}function ka(e,t){if(!Boolean(e))throw new Error(t)}function g4(e){return typeof e=="object"&&e!==null}function b4(e,t){if(!Boolean(e))throw new Error(t??"Unexpected invariant triggered.")}const $4=/\r\n|[\n\r]/g;function Yu(e,t){let r=0,n=1;for(const i of e.body.matchAll($4)){if(typeof i.index=="number"||b4(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function w4(e){return Kb(e.source,Yu(e.source,e.start))}function Kb(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=t.line===1?r:0,c=t.column+s,l=`${e.name}:${a}:${c}
@@ -9,9 +9,9 @@
9
9
 
10
10
  `+Kb(this.source,r);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 L0(e){return e===void 0||e.length===0?void 0:e}function ct(e,t,r){return new wh(`Syntax Error: ${r}`,{source:e,positions:[t]})}class x4{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Yb{constructor(t,r,n,i,o,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=o,this.value=a,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 Xb={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"]},S4=new Set(Object.keys(Xb));function M0(e){const t=e?.kind;return typeof t=="string"&&S4.has(t)}var oi;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(oi||(oi={}));var Xu;(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"})(Xu||(Xu={}));var Z;(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"})(Z||(Z={}));function Zu(e){return e===9||e===32}function ko(e){return e>=48&&e<=57}function Zb(e){return e>=97&&e<=122||e>=65&&e<=90}function Jb(e){return Zb(e)||e===95}function k4(e){return Zb(e)||ko(e)||e===95}function E4(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var o;const s=e[a],c=O4(s);c!==s.length&&(n=(o=n)!==null&&o!==void 0?o:a,i=a,a!==0&&c<r&&(r=c))}return e.map((a,s)=>s===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function O4(e){let t=0;for(;t<e.length&&Zu(e.charCodeAt(t));)++t;return t}function C4(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,o=n.length>1&&n.slice(1).every(h=>h.length===0||Zu(h.charCodeAt(0))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,c=e.endsWith("\\"),l=s||c,u=!(t!=null&&t.minimize)&&(!i||e.length>70||l||o||a);let d="";const f=i&&Zu(e.charCodeAt(0));return(u&&!f||o)&&(d+=`
11
11
  `),d+=r,(u||l)&&(d+=`
12
- `),'"""'+d+'"""'}var I;(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"})(I||(I={}));class P4{constructor(t){const r=new Yb(I.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,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!==I.EOF)do if(t.next)t=t.next;else{const r=N4(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===I.COMMENT);return t}}function T4(e){return e===I.BANG||e===I.DOLLAR||e===I.AMP||e===I.PAREN_L||e===I.PAREN_R||e===I.SPREAD||e===I.COLON||e===I.EQUALS||e===I.AT||e===I.BRACKET_L||e===I.BRACKET_R||e===I.BRACE_L||e===I.PIPE||e===I.BRACE_R}function Mi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Bl(e,t){return e1(e.charCodeAt(t))&&t1(e.charCodeAt(t+1))}function e1(e){return e>=55296&&e<=56319}function t1(e){return e>=56320&&e<=57343}function Fn(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return I.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function et(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new Yb(t,r,n,o,a,i)}function N4(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return I4(e,i);case 33:return et(e,I.BANG,i,i+1);case 36:return et(e,I.DOLLAR,i,i+1);case 38:return et(e,I.AMP,i,i+1);case 40:return et(e,I.PAREN_L,i,i+1);case 41:return et(e,I.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return et(e,I.SPREAD,i,i+3);break;case 58:return et(e,I.COLON,i,i+1);case 61:return et(e,I.EQUALS,i,i+1);case 64:return et(e,I.AT,i,i+1);case 91:return et(e,I.BRACKET_L,i,i+1);case 93:return et(e,I.BRACKET_R,i,i+1);case 123:return et(e,I.BRACE_L,i,i+1);case 124:return et(e,I.PIPE,i,i+1);case 125:return et(e,I.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?M4(e,i):D4(e,i)}if(ko(o)||o===45)return A4(e,i,o);if(Jb(o))return j4(e,i);throw ct(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Mi(o)||Bl(r,i)?`Unexpected character: ${Fn(e,i)}.`:`Invalid character: ${Fn(e,i)}.`)}return et(e,I.EOF,n,n)}function I4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(Mi(o))++i;else if(Bl(r,i))i+=2;else break}return et(e,I.COMMENT,t,i,r.slice(t+1,i))}function A4(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),ko(o))throw ct(e.source,i,`Invalid number, unexpected digit after 0: ${Fn(e,i)}.`)}else i=Ac(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=Ac(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=Ac(e,i,o),o=n.charCodeAt(i)),o===46||Jb(o))throw ct(e.source,i,`Invalid number, expected digit but got: ${Fn(e,i)}.`);return et(e,a?I.FLOAT:I.INT,t,i,n.slice(t,i))}function Ac(e,t,r){if(!ko(r))throw ct(e.source,t,`Invalid number, expected digit but got: ${Fn(e,t)}.`);const n=e.source.body;let i=t+1;for(;ko(n.charCodeAt(i));)++i;return i}function D4(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const s=r.charCodeAt(i);if(s===34)return a+=r.slice(o,i),et(e,I.STRING,t,i+1,a);if(s===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?R4(e,i):F4(e,i):L4(e,i);a+=c.value,i+=c.size,o=i;continue}if(s===10||s===13)break;if(Mi(s))++i;else if(Bl(r,i))i+=2;else throw ct(e.source,i,`Invalid character within String: ${Fn(e,i)}.`)}throw ct(e.source,i,"Unterminated string.")}function R4(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!Mi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|co(o),n<0)break}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function F4(e,t){const r=e.source.body,n=j0(r,t+2);if(Mi(n))return{value:String.fromCodePoint(n),size:6};if(e1(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=j0(r,t+8);if(t1(i))return{value:String.fromCodePoint(n,i),size:12}}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function j0(e,t){return co(e.charCodeAt(t))<<12|co(e.charCodeAt(t+1))<<8|co(e.charCodeAt(t+2))<<4|co(e.charCodeAt(t+3))}function co(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function L4(e,t){const r=e.source.body;switch(r.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:`
13
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ct(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function M4(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const c=[];for(;o<n;){const l=r.charCodeAt(o);if(l===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){s+=r.slice(a,o),c.push(s);const u=et(e,I.BLOCK_STRING,t,o+3,E4(c).join(`
14
- `));return e.line+=c.length-1,e.lineStart=i,u}if(l===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){s+=r.slice(a,o),a=o+1,o+=4;continue}if(l===10||l===13){s+=r.slice(a,o),c.push(s),l===13&&r.charCodeAt(o+1)===10?o+=2:++o,s="",a=o,i=o;continue}if(Mi(l))++o;else if(Bl(r,o))o+=2;else throw ct(e.source,o,`Invalid character within String: ${Fn(e,o)}.`)}throw ct(e.source,o,"Unterminated string.")}function j4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(k4(o))++i;else break}return et(e,I.NAME,t,i,r.slice(t,i))}const z4=10,r1=2;function n1(e){return Wl(e,[])}function Wl(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return U4(e,t);default:return String(e)}}function U4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(V4(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Wl(n,r)}else if(Array.isArray(e))return W4(e,r);return B4(e,r)}function V4(e){return typeof e.toJSON=="function"}function B4(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>r1?"["+q4(e)+"]":"{ "+r.map(([i,o])=>i+": "+Wl(o,t)).join(", ")+" }"}function W4(e,t){if(e.length===0)return"[]";if(t.length>r1)return"[Array]";const r=Math.min(z4,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(Wl(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function q4(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const H4=function(t,r){return t instanceof r};class _h{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ka(!1,`Body must be a string. Received: ${n1(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ka(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ka(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function G4(e){return H4(e,_h)}function Q4(e,t){return new K4(e,t).parseDocument()}class K4{constructor(t,r={}){const n=G4(t)?t:new _h(t);this._lexer=new P4(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(I.NAME);return this.node(t,{kind:Z.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Z.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===I.NAME){switch(r.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 ct(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:Z.OPERATION_DEFINITION,operation:oi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:Z.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(I.NAME);switch(t.value){case"query":return oi.QUERY;case"mutation":return oi.MUTATION;case"subscription":return oi.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Z.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:Z.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Z.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(I.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Z.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,r,I.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(I.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(I.NAME)?this.node(t,{kind:Z.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Z.INLINE_FRAGMENT,typeCondition:r?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:Z.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:Z.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 r=this._lexer.token;switch(r.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(r,{kind:Z.INT,value:r.value});case I.FLOAT:return this.advanceLexer(),this.node(r,{kind:Z.FLOAT,value:r.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Z.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Z.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Z.NULL});default:return this.node(r,{kind:Z.ENUM,value:r.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this._lexer.token.kind===I.NAME){const n=this._lexer.token.value;throw ct(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);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:Z.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Z.LIST,values:this.any(I.BRACKET_L,r,I.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Z.OBJECT,fields:this.any(I.BRACE_L,r,I.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(I.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(I.AT),this.node(r,{kind:Z.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(I.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(I.BRACKET_R),r=this.node(t,{kind:Z.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:Z.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Z.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:Z.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(I.COLON);const n=this.parseNamedType();return this.node(t,{kind:Z.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(I.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Z.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(I.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Z.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Z.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Z.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ct(this._lexer.source,this._lexer.token.start,`${aa(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===I.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 r=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Z.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Xu,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new x4(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw ct(this._lexer.source,r.start,`Expected ${i1(t)}, found ${aa(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===I.NAME&&r.value===t)this.advanceLexer();else throw ct(this._lexer.source,r.start,`Expected "${t}", found ${aa(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===I.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return ct(this._lexer.source,r.start,`Unexpected ${aa(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==I.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw ct(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function aa(e){const t=e.value;return i1(e.kind)+(t!=null?` "${t}"`:"")}function i1(e){return T4(e)?`"${e}"`:e}function Y4(e){return`"${e.replace(X4,Z4)}"`}const X4=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Z4(e){return J4[e.charCodeAt(0)]}const J4=["\\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"],xh=Object.freeze({});function sr(e,t,r=Xb){const n=new Map;for(const y of Object.values(Z))n.set(y,e5(t,y));let i,o=Array.isArray(e),a=[e],s=-1,c=[],l=e,u,d;const f=[],h=[];do{s++;const y=s===a.length,b=y&&c.length!==0;if(y){if(u=h.length===0?void 0:f[f.length-1],l=d,d=h.pop(),b)if(o){l=l.slice();let w=0;for(const[x,E]of c){const S=x-w;E===null?(l.splice(S,1),w++):l[S]=E}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(const[w,x]of c)l[w]=x}s=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(d){if(u=o?s:a[s],l=d[u],l==null)continue;f.push(u)}let g;if(!Array.isArray(l)){var p,m;M0(l)||ka(!1,`Invalid AST Node: ${n1(l)}.`);const w=y?(p=n.get(l.kind))===null||p===void 0?void 0:p.leave:(m=n.get(l.kind))===null||m===void 0?void 0:m.enter;if(g=w?.call(t,l,u,d,f,h),g===xh)break;if(g===!1){if(!y){f.pop();continue}}else if(g!==void 0&&(c.push([u,g]),!y))if(M0(g))l=g;else{f.pop();continue}}if(g===void 0&&b&&c.push([u,l]),y)f.pop();else{var v;i={inArray:o,index:s,keys:a,edits:c,prev:i},o=Array.isArray(l),a=o?l:(v=r[l.kind])!==null&&v!==void 0?v:[],s=-1,c=[],d&&h.push(d),d=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function e5(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function t5(e){return sr(e,n5)}const r5=80,n5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>q(e.definitions,`
12
+ `),'"""'+d+'"""'}var I;(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"})(I||(I={}));class P4{constructor(t){const r=new Yb(I.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,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!==I.EOF)do if(t.next)t=t.next;else{const r=N4(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===I.COMMENT);return t}}function T4(e){return e===I.BANG||e===I.DOLLAR||e===I.AMP||e===I.PAREN_L||e===I.PAREN_R||e===I.SPREAD||e===I.COLON||e===I.EQUALS||e===I.AT||e===I.BRACKET_L||e===I.BRACKET_R||e===I.BRACE_L||e===I.PIPE||e===I.BRACE_R}function Mi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Bl(e,t){return e1(e.charCodeAt(t))&&t1(e.charCodeAt(t+1))}function e1(e){return e>=55296&&e<=56319}function t1(e){return e>=56320&&e<=57343}function Fn(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return I.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Je(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new Yb(t,r,n,o,a,i)}function N4(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const o=r.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return I4(e,i);case 33:return Je(e,I.BANG,i,i+1);case 36:return Je(e,I.DOLLAR,i,i+1);case 38:return Je(e,I.AMP,i,i+1);case 40:return Je(e,I.PAREN_L,i,i+1);case 41:return Je(e,I.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Je(e,I.SPREAD,i,i+3);break;case 58:return Je(e,I.COLON,i,i+1);case 61:return Je(e,I.EQUALS,i,i+1);case 64:return Je(e,I.AT,i,i+1);case 91:return Je(e,I.BRACKET_L,i,i+1);case 93:return Je(e,I.BRACKET_R,i,i+1);case 123:return Je(e,I.BRACE_L,i,i+1);case 124:return Je(e,I.PIPE,i,i+1);case 125:return Je(e,I.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?M4(e,i):D4(e,i)}if(ko(o)||o===45)return A4(e,i,o);if(Jb(o))return j4(e,i);throw ct(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Mi(o)||Bl(r,i)?`Unexpected character: ${Fn(e,i)}.`:`Invalid character: ${Fn(e,i)}.`)}return Je(e,I.EOF,n,n)}function I4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(o===10||o===13)break;if(Mi(o))++i;else if(Bl(r,i))i+=2;else break}return Je(e,I.COMMENT,t,i,r.slice(t+1,i))}function A4(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(o===45&&(o=n.charCodeAt(++i)),o===48){if(o=n.charCodeAt(++i),ko(o))throw ct(e.source,i,`Invalid number, unexpected digit after 0: ${Fn(e,i)}.`)}else i=Ac(e,i,o),o=n.charCodeAt(i);if(o===46&&(a=!0,o=n.charCodeAt(++i),i=Ac(e,i,o),o=n.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=n.charCodeAt(++i),(o===43||o===45)&&(o=n.charCodeAt(++i)),i=Ac(e,i,o),o=n.charCodeAt(i)),o===46||Jb(o))throw ct(e.source,i,`Invalid number, expected digit but got: ${Fn(e,i)}.`);return Je(e,a?I.FLOAT:I.INT,t,i,n.slice(t,i))}function Ac(e,t,r){if(!ko(r))throw ct(e.source,t,`Invalid number, expected digit but got: ${Fn(e,t)}.`);const n=e.source.body;let i=t+1;for(;ko(n.charCodeAt(i));)++i;return i}function D4(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const s=r.charCodeAt(i);if(s===34)return a+=r.slice(o,i),Je(e,I.STRING,t,i+1,a);if(s===92){a+=r.slice(o,i);const c=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?R4(e,i):F4(e,i):L4(e,i);a+=c.value,i+=c.size,o=i;continue}if(s===10||s===13)break;if(Mi(s))++i;else if(Bl(r,i))i+=2;else throw ct(e.source,i,`Invalid character within String: ${Fn(e,i)}.`)}throw ct(e.source,i,"Unterminated string.")}function R4(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const o=r.charCodeAt(t+i++);if(o===125){if(i<5||!Mi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|co(o),n<0)break}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function F4(e,t){const r=e.source.body,n=j0(r,t+2);if(Mi(n))return{value:String.fromCodePoint(n),size:6};if(e1(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=j0(r,t+8);if(t1(i))return{value:String.fromCodePoint(n,i),size:12}}throw ct(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function j0(e,t){return co(e.charCodeAt(t))<<12|co(e.charCodeAt(t+1))<<8|co(e.charCodeAt(t+2))<<4|co(e.charCodeAt(t+3))}function co(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function L4(e,t){const r=e.source.body;switch(r.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:`
13
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ct(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function M4(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const c=[];for(;o<n;){const l=r.charCodeAt(o);if(l===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){s+=r.slice(a,o),c.push(s);const u=Je(e,I.BLOCK_STRING,t,o+3,E4(c).join(`
14
+ `));return e.line+=c.length-1,e.lineStart=i,u}if(l===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){s+=r.slice(a,o),a=o+1,o+=4;continue}if(l===10||l===13){s+=r.slice(a,o),c.push(s),l===13&&r.charCodeAt(o+1)===10?o+=2:++o,s="",a=o,i=o;continue}if(Mi(l))++o;else if(Bl(r,o))o+=2;else throw ct(e.source,o,`Invalid character within String: ${Fn(e,o)}.`)}throw ct(e.source,o,"Unterminated string.")}function j4(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const o=r.charCodeAt(i);if(k4(o))++i;else break}return Je(e,I.NAME,t,i,r.slice(t,i))}const z4=10,r1=2;function n1(e){return Wl(e,[])}function Wl(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return U4(e,t);default:return String(e)}}function U4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(V4(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Wl(n,r)}else if(Array.isArray(e))return W4(e,r);return B4(e,r)}function V4(e){return typeof e.toJSON=="function"}function B4(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>r1?"["+q4(e)+"]":"{ "+r.map(([i,o])=>i+": "+Wl(o,t)).join(", ")+" }"}function W4(e,t){if(e.length===0)return"[]";if(t.length>r1)return"[Array]";const r=Math.min(z4,e.length),n=e.length-r,i=[];for(let o=0;o<r;++o)i.push(Wl(e[o],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function q4(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const H4=function(t,r){return t instanceof r};class _h{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||ka(!1,`Body must be a string. Received: ${n1(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ka(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ka(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function G4(e){return H4(e,_h)}function Q4(e,t){return new K4(e,t).parseDocument()}class K4{constructor(t,r={}){const n=G4(t)?t:new _h(t);this._lexer=new P4(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(I.NAME);return this.node(t,{kind:Z.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Z.DOCUMENT,definitions:this.many(I.SOF,this.parseDefinition,I.EOF)})}parseDefinition(){if(this.peek(I.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===I.NAME){switch(r.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 ct(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(I.BRACE_L))return this.node(t,{kind:Z.OPERATION_DEFINITION,operation:oi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(I.NAME)&&(n=this.parseName()),this.node(t,{kind:Z.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(I.NAME);switch(t.value){case"query":return oi.QUERY;case"mutation":return oi.MUTATION;case"subscription":return oi.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(I.PAREN_L,this.parseVariableDefinition,I.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Z.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(I.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(I.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(I.DOLLAR),this.node(t,{kind:Z.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Z.SELECTION_SET,selections:this.many(I.BRACE_L,this.parseSelection,I.BRACE_R)})}parseSelection(){return this.peek(I.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(I.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:Z.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(I.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(I.PAREN_L,r,I.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(I.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(I.NAME)?this.node(t,{kind:Z.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Z.INLINE_FRAGMENT,typeCondition:r?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:Z.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:Z.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 r=this._lexer.token;switch(r.kind){case I.BRACKET_L:return this.parseList(t);case I.BRACE_L:return this.parseObject(t);case I.INT:return this.advanceLexer(),this.node(r,{kind:Z.INT,value:r.value});case I.FLOAT:return this.advanceLexer(),this.node(r,{kind:Z.FLOAT,value:r.value});case I.STRING:case I.BLOCK_STRING:return this.parseStringLiteral();case I.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:Z.BOOLEAN,value:!0});case"false":return this.node(r,{kind:Z.BOOLEAN,value:!1});case"null":return this.node(r,{kind:Z.NULL});default:return this.node(r,{kind:Z.ENUM,value:r.value})}case I.DOLLAR:if(t)if(this.expectToken(I.DOLLAR),this._lexer.token.kind===I.NAME){const n=this._lexer.token.value;throw ct(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);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:Z.STRING,value:t.value,block:t.kind===I.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Z.LIST,values:this.any(I.BRACKET_L,r,I.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Z.OBJECT,fields:this.any(I.BRACE_L,r,I.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(I.COLON),this.node(r,{kind:Z.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(I.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(I.AT),this.node(r,{kind:Z.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(I.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(I.BRACKET_R),r=this.node(t,{kind:Z.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(I.BANG)?this.node(t,{kind:Z.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:Z.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(I.STRING)||this.peek(I.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);return this.node(t,{kind:Z.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(I.COLON);const n=this.parseNamedType();return this.node(t,{kind:Z.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(I.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseFieldDefinition,I.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(I.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:Z.FIELD_DEFINITION,description:r,name:n,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(I.PAREN_L,this.parseInputValueDef,I.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(I.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(I.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:Z.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:Z.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:Z.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(I.EQUALS)?this.delimitedMany(I.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:Z.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(I.BRACE_L,this.parseEnumValueDefinition,I.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:Z.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ct(this._lexer.source,this._lexer.token.start,`${aa(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(I.BRACE_L,this.parseInputValueDef,I.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===I.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 r=this.parseConstDirectives(),n=this.optionalMany(I.BRACE_L,this.parseOperationTypeDefinition,I.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:Z.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:Z.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Z.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(I.AT);const n=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:Z.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(I.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Xu,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new x4(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw ct(this._lexer.source,r.start,`Expected ${i1(t)}, found ${aa(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===I.NAME&&r.value===t)this.advanceLexer();else throw ct(this._lexer.source,r.start,`Expected "${t}", found ${aa(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===I.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return ct(this._lexer.source,r.start,`Unexpected ${aa(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==I.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw ct(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function aa(e){const t=e.value;return i1(e.kind)+(t!=null?` "${t}"`:"")}function i1(e){return T4(e)?`"${e}"`:e}function Y4(e){return`"${e.replace(X4,Z4)}"`}const X4=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Z4(e){return J4[e.charCodeAt(0)]}const J4=["\\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"],xh=Object.freeze({});function sr(e,t,r=Xb){const n=new Map;for(const y of Object.values(Z))n.set(y,e5(t,y));let i,o=Array.isArray(e),a=[e],s=-1,c=[],l=e,u,d;const f=[],h=[];do{s++;const y=s===a.length,b=y&&c.length!==0;if(y){if(u=h.length===0?void 0:f[f.length-1],l=d,d=h.pop(),b)if(o){l=l.slice();let w=0;for(const[x,E]of c){const S=x-w;E===null?(l.splice(S,1),w++):l[S]=E}}else{l=Object.defineProperties({},Object.getOwnPropertyDescriptors(l));for(const[w,x]of c)l[w]=x}s=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(d){if(u=o?s:a[s],l=d[u],l==null)continue;f.push(u)}let g;if(!Array.isArray(l)){var p,m;M0(l)||ka(!1,`Invalid AST Node: ${n1(l)}.`);const w=y?(p=n.get(l.kind))===null||p===void 0?void 0:p.leave:(m=n.get(l.kind))===null||m===void 0?void 0:m.enter;if(g=w?.call(t,l,u,d,f,h),g===xh)break;if(g===!1){if(!y){f.pop();continue}}else if(g!==void 0&&(c.push([u,g]),!y))if(M0(g))l=g;else{f.pop();continue}}if(g===void 0&&b&&c.push([u,l]),y)f.pop();else{var v;i={inArray:o,index:s,keys:a,edits:c,prev:i},o=Array.isArray(l),a=o?l:(v=r[l.kind])!==null&&v!==void 0?v:[],s=-1,c=[],d&&h.push(d),d=l}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function e5(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function t5(e){return sr(e,n5)}const r5=80,n5={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>q(e.definitions,`
15
15
 
16
16
  `)},OperationDefinition:{leave(e){const t=he("(",q(e.variableDefinitions,", "),")"),r=q([e.operation,q([e.name,t]),q(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+he(" = ",r)+he(" ",q(n," "))},SelectionSet:{leave:({selections:e})=>er(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=he("",e,": ")+t;let a=o+he("(",q(r,", "),")");return a.length>r5&&(a=o+he(`(
17
17
  `,Ea(q(r,`
@@ -51,7 +51,7 @@ import { ApolloClient, HttpLink } from '@apollo/client';
51
51
  const client = new ApolloClient({
52
52
  link: new HttpLink({ uri: '/graphql', fetch })
53
53
  });
54
- `):new be(23)},wx=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}},_x=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function xx(e,t){var r=[],n=function(d,f){r.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=cd(t.variables,"Variables map")}catch(d){return{parseError:d}}n("variables",i)}if(t.extensions){var o=void 0;try{o=cd(t.extensions,"Extensions map")}catch(d){return{parseError:d}}n("extensions",o)}var a="",s=e,c=e.indexOf("#");c!==-1&&(a=e.substr(c),s=e.substr(0,c));var l=s.indexOf("?")===-1?"?":"&",u=s+l+r.join("&")+a;return{newURI:u}}var rm=Ht(function(){return fetch}),Sx=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?yx:i,a=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,u=l===void 0?!1:l,d=sn(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&$x(n||rm);var f={http:{includeExtensions:a,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new ji(function(h){var p=_x(h,r),m=h.getContext(),v={};if(m.clientAwareness){var y=m.clientAwareness,b=y.name,g=y.version;b&&(v["apollographql-client-name"]=b),g&&(v["apollographql-client-version"]=g)}var w=C(C({},v),m.headers),x={http:m.http,options:m.fetchOptions,credentials:m.credentials,headers:w},E=gx(h,o,vx,f,x),S=E.options,T=E.body;if(T.variables&&!u){var M=new Set(Object.keys(T.variables));sr(h.query,{Variable:function(ae,xe,_e){_e&&_e.kind!=="VariableDefinition"&&M.delete(ae.name.value)}}),M.size&&(T.variables=C({},T.variables),M.forEach(function(ae){delete T.variables[ae]}))}var L;if(!S.signal){var K=wx(),D=K.controller,R=K.signal;L=D,L&&(S.signal=R)}var U=function(ae){return ae.kind==="OperationDefinition"&&ae.operation==="mutation"};if(c&&!h.query.definitions.some(U)&&(S.method="GET"),Sh(["defer"],h.query)&&(S.headers=S.headers||{},S.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),S.method==="GET"){var j=xx(p,T),Y=j.newURI,oe=j.parseError;if(oe)return Z0(oe);p=Y}else try{S.body=cd(T,"Payload")}catch(ae){return Z0(ae)}return new Pe(function(ae){var xe=n||Ht(function(){return fetch})||rm;return xe(p,S).then(function(_e){var A;h.setContext({response:_e});var N=(A=_e.headers)===null||A===void 0?void 0:A.get("content-type");return N!==null&&/^multipart\/mixed/i.test(N)?cx(_e,ae):dx(_e,h,ae)}).catch(function(_e){return Mh(_e,ae)}),function(){L&&L.abort()}})})},g1=function(e){cr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,Sx(r).request)||this;return n.options=r,n}return t}(ji),b1=Object.prototype,nm=b1.toString,kx=b1.hasOwnProperty,im=Function.prototype.toString,ud=new Map;function nt(e,t){try{return dd(e,t)}finally{ud.clear()}}function dd(e,t){if(e===t)return!0;var r=nm.call(e),n=nm.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(am(e,t))return!0;var i=om(e),o=om(t),a=i.length;if(a!==o.length)return!1;for(var s=0;s<a;++s)if(!kx.call(t,i[s]))return!1;for(var s=0;s<a;++s){var c=i[s];if(!dd(e[c],t[c]))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=="".concat(t);case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(am(e,t))return!0;for(var l=e.entries(),u=r==="[object Map]";;){var d=l.next();if(d.done)break;var f=d.value,h=f[0],p=f[1];if(!t.has(h)||u&&!dd(p,t.get(h)))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]":{var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return m===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{var v=im.call(e);return v!==im.call(t)?!1:!Cx(v,Ox)}}return!1}function om(e){return Object.keys(e).filter(Ex,e)}function Ex(e){return this[e]!==void 0}var Ox="{ [native code] }";function Cx(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function am(e,t){var r=ud.get(e);if(r){if(r.has(t))return!0}else ud.set(e,r=new Set);return r.add(t),!1}var Px=function(){return Object.create(null)},$1=Array.prototype,Tx=$1.forEach,Nx=$1.slice,Bo=function(){function e(t,r){t===void 0&&(t=!0),r===void 0&&(r=Px),this.weakness=t,this.makeData=r}return e.prototype.lookup=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.lookupArray(t)},e.prototype.lookupArray=function(t){var r=this;return Tx.call(t,function(n){return r=r.getChildTrie(n)}),r.data||(r.data=this.makeData(Nx.call(t)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&Ix(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();function Ix(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var pt=null,sm={},Ax=1,Dx=function(){return function(){function e(){this.id=["slot",Ax++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var t=pt;t;t=t.parent)if(this.id in t.slots){var r=t.slots[this.id];if(r===sm)break;return t!==pt&&(pt.slots[this.id]=r),!0}return pt&&(pt.slots[this.id]=sm),!1},e.prototype.getValue=function(){if(this.hasValue())return pt.slots[this.id]},e.prototype.withValue=function(t,r,n,i){var o,a=(o={__proto__:null},o[this.id]=t,o),s=pt;pt={parent:s,slots:a};try{return r.apply(i,n)}finally{pt=s}},e.bind=function(t){var r=pt;return function(){var n=pt;try{return pt=r,t.apply(this,arguments)}finally{pt=n}}},e.noContext=function(t,r,n){if(pt){var i=pt;try{return pt=null,t.apply(n,r)}finally{pt=i}}else return t.apply(n,r)},e}()};function lm(e){try{return e()}catch{}}var Lc="@wry/context:Slot",Rx=lm(function(){return globalThis})||lm(function(){return global})||Object.create(null),cm=Rx,Yl=cm[Lc]||Array[Lc]||function(e){try{Object.defineProperty(cm,Lc,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Dx());Yl.bind;Yl.noContext;function Fx(){}var Lx=function(){function e(t,r){t===void 0&&(t=1/0),r===void 0&&(r=Fx),this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.get=function(t){var r=this.getNode(t);return r&&r.value},e.prototype.getNode=function(t){var r=this.map.get(t);if(r&&r!==this.newest){var n=r.older,i=r.newer;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r},e.prototype.set=function(t,r){var n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(t){var r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1},e}(),Xl=new Yl,Mc,Mx=Object.prototype.hasOwnProperty,jh=(Mc=Array.from,Mc===void 0?function(e){var t=[];return e.forEach(function(r){return t.push(r)}),t}:Mc);function Ds(e){var t=e.unsubscribe;typeof t=="function"&&(e.unsubscribe=void 0,t())}var Eo=[],jx=100;function xi(e,t){if(!e)throw new Error(t||"assertion failure")}function zx(e,t){var r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function w1(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Ux(e){return e.slice(0)}var Vx=function(){function e(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,++e.count}return e.prototype.peek=function(){if(this.value.length===1&&!dn(this))return um(this),this.value[0]},e.prototype.recompute=function(t){return xi(!this.recomputing,"already recomputing"),um(this),dn(this)?Bx(this,t):w1(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,_1(this),Ds(this))},e.prototype.dispose=function(){var t=this;this.setDirty(),O1(this),zh(this,function(r,n){r.setDirty(),C1(r,t)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(t){t.add(this),this.deps||(this.deps=Eo.pop()||new Set),this.deps.add(t)},e.prototype.forgetDeps=function(){var t=this;this.deps&&(jh(this.deps).forEach(function(r){return r.delete(t)}),this.deps.clear(),Eo.push(this.deps),this.deps=null)},e.count=0,e}();function um(e){var t=Xl.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),dn(e)?S1(t,e):k1(t,e),t}function Bx(e,t){return O1(e),Xl.withValue(e,Wx,[e,t]),Hx(e,t)&&qx(e),w1(e.value)}function Wx(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(r){e.value[1]=r}e.recomputing=!1}function dn(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function qx(e){e.dirty=!1,!dn(e)&&x1(e)}function _1(e){zh(e,S1)}function x1(e){zh(e,k1)}function zh(e,t){var r=e.parents.size;if(r)for(var n=jh(e.parents),i=0;i<r;++i)t(n[i],e)}function S1(e,t){xi(e.childValues.has(t)),xi(dn(t));var r=!dn(e);if(!e.dirtyChildren)e.dirtyChildren=Eo.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&_1(e)}function k1(e,t){xi(e.childValues.has(t)),xi(!dn(t));var r=e.childValues.get(t);r.length===0?e.childValues.set(t,Ux(t.value)):zx(r,t.value)||e.setDirty(),E1(e,t),!dn(e)&&x1(e)}function E1(e,t){var r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(Eo.length<jx&&Eo.push(r),e.dirtyChildren=null))}function O1(e){e.childValues.size>0&&e.childValues.forEach(function(t,r){C1(e,r)}),e.forgetDeps(),xi(e.dirtyChildren===null)}function C1(e,t){t.parents.delete(e),e.childValues.delete(t),E1(e,t)}function Hx(e,t){if(typeof e.subscribe=="function")try{Ds(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}var Gx={setDirty:!0,dispose:!0,forget:!0};function P1(e){var t=new Map,r=e&&e.subscribe;function n(i){var o=Xl.getValue();if(o){var a=t.get(i);a||t.set(i,a=new Set),o.dependOn(a),typeof r=="function"&&(Ds(a),a.unsubscribe=r(i))}}return n.dirty=function(o,a){var s=t.get(o);if(s){var c=a&&Mx.call(Gx,a)?a:"setDirty";jh(s).forEach(function(l){return l[c]()}),t.delete(o),Ds(s)}},n}function T1(){var e=new Bo(typeof WeakMap=="function");return function(){return e.lookupArray(arguments)}}T1();var jc=new Set;function Rs(e,t){t===void 0&&(t=Object.create(null));var r=new Lx(t.max||Math.pow(2,16),function(l){return l.dispose()}),n=t.keyArgs,i=t.makeCacheKey||T1(),o=function(){var l=i.apply(null,n?n.apply(null,arguments):arguments);if(l===void 0)return e.apply(null,arguments);var u=r.get(l);u||(r.set(l,u=new Vx(e)),u.subscribe=t.subscribe,u.forget=function(){return r.delete(l)});var d=u.recompute(Array.prototype.slice.call(arguments));return r.set(l,u),jc.add(r),Xl.hasValue()||(jc.forEach(function(f){return f.clean()}),jc.clear()),d};Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1});function a(l){var u=r.get(l);u&&u.setDirty()}o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))};function s(l){var u=r.get(l);if(u)return u.peek()}o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))};function c(l){return r.delete(l)}return o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var Qx=function(){function e(){this.getFragmentDoc=Rs(c5)}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},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,r){return r===void 0&&(r=!!t.optimistic),this.read(C(C({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(C(C({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=sn(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=sn(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(C(C({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(C(C({},t),{data:o})),o)}})},e}(),N1=function(e){cr(t,e);function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(a={},a[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),lt=Object.prototype.hasOwnProperty;function Ji(e){return e==null}var Qe=Array.isArray;function I1(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Ji(n)?Ji(i)?void 0:{_id:i}:{id:n}),Ji(n)&&!Ji(i)&&(n=i),!Ji(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var A1={dataIdFromObject:I1,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Kx(e){return Kl(A1,e)}function D1(e){var t=e.canonizeResults;return t===void 0?A1.canonizeResults:t}function Yx(e,t){return ke(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var R1=/^[_a-z][_0-9a-z]*/i;function fn(e){var t=e.match(R1);return t?t[0]:e}function fd(e,t,r){return We(t)?Qe(t)?t.every(function(n){return fd(e,n,r)}):e.selections.every(function(n){if(jr(n)&&ql(n,r)){var i=Ln(n);return lt.call(t,i)&&(!n.selectionSet||fd(n.selectionSet,t[i],r))}return!0}):!1}function ai(e){return We(e)&&!ke(e)&&!Qe(e)}function Xx(){return new un}function F1(e,t){var r=kh(Ch(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var Pa=Object.create(null),zc=function(){return Pa},dm=Object.create(null),Oo=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return id(ke(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return ke(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return ui(i);if(ke(i))return i;var a=n.policies.identify(i)[0];if(a){var s=ui(a);return o&&n.merge(a,i),s}}}return e.prototype.toObject=function(){return C({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),lt.call(this.data,t)){var n=this.data[t];if(n&&lt.call(n,r))return n[r]}if(r==="__typename"&&lt.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Qr)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),lt.call(this.data,t))return this.data[t];if(this instanceof Qr)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;ke(t)&&(t=t.__ref),ke(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(!!a){__DEV__?B(typeof i=="string","store.merge expects a string ID"):B(typeof i=="string",1);var s=new un(Jx).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach(function(l){if(!o||o[l]!==s[l]){c[l]=1;var u=fn(l);u!==l&&!n.policies.hasKeyArgs(s.__typename,u)&&(c[u]=1),s[l]===void 0&&!(n instanceof Qr)&&delete s[l]}}),c.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(l){return n.group.dirty(i,l)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,s=!0,c={DELETE:Pa,INVALIDATE:dm,isReference:ke,toReference:this.toReference,canRead:this.canRead,readField:function(l,u){return n.policies.readField(typeof l=="string"?{fieldName:l,from:u||ui(t)}:l,{store:n})}};if(Object.keys(i).forEach(function(l){var u=fn(l),d=i[l];if(d!==void 0){var f=typeof r=="function"?r:r[l]||r[u];if(f){var h=f===zc?Pa:f(id(d),C(C({},c),{fieldName:u,storeFieldName:l,storage:n.getStorage(t,l)}));h===dm?n.group.dirty(t,l):(h===Pa&&(h=void 0),h!==d&&(o[l]=h,a=!0,d=h))}d!==void 0&&(s=!1)}}),a)return this.merge(t,o),s&&(this instanceof Qr?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,s?(i={},i[s]=zc,i):zc)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(lt.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Qr&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){lt.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&lt.call(t,o)||r.delete(o)}),t){var n=t.__META,i=sn(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.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 r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Qr?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){lt.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof Qr;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!lt.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){ke(o)&&(r[o.__ref]=!0),We(o)&&Object.keys(o).forEach(function(a){var s=o[a];We(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),L1=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?P1():null,this.keyMaker=new Bo(Vn)},e.prototype.depend=function(t,r){if(this.d){this.d(Uc(t,r));var n=fn(r);n!==r&&this.d(Uc(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(Uc(t,r),r==="__exists"?"forget":"setDirty")},e}();function Uc(e,t){return t+"#"+e}function fm(e,t){mo(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){cr(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,c=i.seed,l=r.call(this,o,new L1(s))||this;return l.stump=new Zx(l),l.storageTrie=new Bo(Vn),c&&l.replace(c),l}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(Oo||(Oo={}));var Qr=function(e){cr(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(c){nt(a[c],s[c])||n.group.dirty(o,c)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(c){n.group.dirty(o,c)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return C(C({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return lt.call(this.data,r)?C(C({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(Oo),Zx=function(e){cr(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new L1(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Qr);function Jx(e,t,r){var n=e[r],i=t[r];return nt(n,i)?n:i}function mo(e){return!!(e instanceof Oo&&e.group.caching)}function e9(e){return We(e)?Qe(e)?e.slice(0):C({__proto__:Object.getPrototypeOf(e)},e):e}var hd=function(){function e(){this.known=new(W5?WeakSet:Set),this.pool=new Bo(Vn),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return We(t)&&this.known.has(t)},e.prototype.pass=function(t){if(We(t)){var r=e9(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(We(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),__DEV__&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],l=this.sortedKeys(t);c.push(l.json);var u=c.length;l.sorted.forEach(function(h){c.push(r.admit(t[h]))});var a=this.pool.lookupArray(c);if(!a.object){var d=a.object=Object.create(s);this.known.add(d),l.sorted.forEach(function(h,p){d[h]=c[u+p]}),__DEV__&&Object.freeze(d)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}(),Nn=Object.assign(function(e){if(We(e)){pd===void 0&&hm();var t=pd.admit(e),r=md.get(t);return r===void 0&&md.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)},{reset:hm}),pd,md;function hm(){pd=new hd,md=new(Vn?WeakMap:Map)}function pm(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var t9=function(){function e(t){var r=this;this.knownResults=new(Vn?WeakMap:Map),this.config=Kl(t,{addTypename:t.addTypename!==!1,canonizeResults:D1(t)}),this.canon=t.canon||new hd,this.executeSelectionSet=Rs(function(n){var i,o=n.context.canonizeResults,a=pm(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?C(C({},s),{result:r.canon.admit(s.result)}):s:(fm(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize,keyArgs:pm,makeCacheKey:function(n,i,o,a){if(mo(o.store))return o.store.makeCacheKey(n,ke(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=Rs(function(n){return fm(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(mo(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new hd},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,l=t.canonizeResults,u=l===void 0?this.config.canonizeResults:l,d=this.config.cache.policies;a=C(C({},Th(a1(n))),a);var f=ui(o),h=this.executeSelectionSet({selectionSet:Ph(n).selectionSet,objectOrReference:f,enclosingRef:f,context:C({store:r,query:n,policies:d,variables:a,varString:Nn(a),canonizeResults:u},F1(n,this.config.fragments))}),p;if(h.missing&&(p=[new N1(r9(h.missing),h.missing,n,a)],!c))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(t,r,n,i){if(mo(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(ke(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,c=a.policies,l=a.store,u=l.getFieldValue(i,"__typename"),d=[],f,h=new un;this.config.addTypename&&typeof u=="string"&&!c.rootIdsByTypename[u]&&d.push({__typename:u});function p(g,w){var x;return g.missing&&(f=h.merge(f,(x={},x[w]=g.missing,x))),g.result}var m=new Set(n.selections);m.forEach(function(g){var w,x;if(!!ql(g,s))if(jr(g)){var E=c.readField({fieldName:g.name.value,field:g,variables:a.variables,from:i},a),S=Ln(g);E===void 0?Ih.added(g)||(f=h.merge(f,(w={},w[S]="Can't find field '".concat(g.name.value,"' on ").concat(ke(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),w))):Qe(E)?E=p(r.executeSubSelectedArray({field:g,array:E,enclosingRef:o,context:a}),S):g.selectionSet?E!=null&&(E=p(r.executeSelectionSet({selectionSet:g.selectionSet,objectOrReference:E,enclosingRef:ke(E)?E:o,context:a}),S)):a.canonizeResults&&(E=r.canon.pass(E)),E!==void 0&&d.push((x={},x[S]=E,x))}else{var T=Eh(g,a.lookupFragment);if(!T&&g.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(g.name.value)):new be(5);T&&c.fragmentMatches(T,u)&&T.selectionSet.selections.forEach(m.add,m)}});var v=Ah(d),y={result:v,missing:f},b=a.canonizeResults?this.canon.admit(y):id(y);return b.result&&this.knownResults.set(b.result,n),b},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,s,c=new un;function l(u,d){var f;return u.missing&&(s=c.merge(s,(f={},f[d]=u.missing,f))),u.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(u,d){return u===null?null:Qe(u)?l(r.executeSubSelectedArray({field:n,array:u,enclosingRef:o,context:a}),d):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:u,enclosingRef:ke(u)?u:o,context:a}),d):(__DEV__&&n9(a.store,n,u),u)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function r9(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function n9(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){We(i)&&(__DEV__?B(!ke(i),"Missing selection set for object of type ".concat(Yx(e,i)," returned for query field ").concat(t.name.value)):B(!ke(i),6),Object.values(i).forEach(n.add,n))})}}var Uh=new Yl,mm=new WeakMap;function vo(e){var t=mm.get(e);return t||mm.set(e,t={vars:new Set,dep:P1()}),t}function vm(e){vo(e).vars.forEach(function(t){return t.forgetCache(e)})}function i9(e){vo(e).vars.forEach(function(t){return t.attachCache(e)})}function o9(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(c){vo(c).dep.dirty(n),a9(c)});var a=Array.from(r);r.clear(),a.forEach(function(c){return c(e)})}}else{var s=Uh.getValue();s&&(i(s),vo(s).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),vo(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function a9(e){e.broadcastWatches&&e.broadcastWatches()}var ym=Object.create(null);function Vh(e){var t=JSON.stringify(e);return ym[t]||(ym[t]=Object.create(null))}function gm(e){var t=Vh(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=Bh(e,function(a){var s=fi(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&lt.call(r,a[0])&&(s=fi(r,a,j1)),__DEV__?B(s!==void 0,"Missing field '".concat(a.join("."),"' while extracting keyFields from ").concat(JSON.stringify(r))):B(s!==void 0,2),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function bm(e){var t=Vh(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=Bh(e,function(l){var u=l[0],d=u.charAt(0);if(d==="@"){if(i&&Xt(i.directives)){var f=u.slice(1),h=i.directives.find(function(y){return y.name.value===f}),p=h&&Hl(h,o);return p&&fi(p,l.slice(1))}return}if(d==="$"){var m=u.slice(1);if(o&&lt.call(o,m)){var v=l.slice(0);return v[0]=m,fi(o,v)}return}if(r)return fi(r,l)}),c=JSON.stringify(s);return(r||c!=="{}")&&(a+=":"+c),a})}function Bh(e,t){var r=new un;return M1(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function M1(e){var t=Vh(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){Qe(i)?(M1(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),Qe(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function j1(e,t){return e[t]}function fi(e,t,r){return r=r||j1,z1(t.reduce(function n(i,o){return Qe(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function z1(e){return We(e)?Qe(e)?e.map(z1):Bh(Object.keys(e).sort(),function(t){return fi(e,t)}):e}Oh.setStringify(Nn);function vd(e){return e.args!==void 0?e.args:e.field?Hl(e.field,e.variables):null}var s9=function(){},$m=function(e,t){return t.fieldName},wm=function(e,t,r){var n=r.mergeObjects;return n(e,t)},_m=function(e,t){return t},l9=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=C({dataIdFromObject:I1},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,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,s=C(C({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var f=Wh(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,l=o&&this.getTypePolicy(o),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var d=u(t,s);if(Qe(d))u=gm(d);else{c=d;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=sn(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),lt.call(r.toBeAdded,n)?r.toBeAdded[n].push(c):r.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function s(c,l){c.merge=typeof l=="function"?l:l===!0?wm:l===!1?_m:c.merge}s(i,r.merge),i.keyFn=o===!1?s9:Qe(o)?gm(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(c){var l=n.getFieldPolicy(t,c,!0),u=a[c];if(typeof u=="function")l.read=u;else{var d=u.keyArgs,f=u.read,h=u.merge;l.keyFn=d===!1?$m:Qe(d)?bm(d):typeof d=="function"?d:l.keyFn,typeof f=="function"&&(l.read=f),s(l,h)}l.read&&l.merge&&(l.keyFn=l.keyFn||$m)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(__DEV__?B(!i||i===t,"Cannot change root ".concat(t," __typename more than once")):B(!i||i===t,3),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(R1);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!lt.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),c=s.fields,l=sn(s,["fields"]);Object.assign(n,l),Object.assign(n.fields,c)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),c=[s],l=function(p){var m=o.getSupertypeSet(p,!1);m&&m.size&&c.indexOf(m)<0&&c.push(m)},u=!!(n&&this.fuzzySubtypes.size),d=!1,f=0;f<c.length;++f){var h=c[f];if(h.has(a))return s.has(a)||(d&&__DEV__&&B.warn("Inferring subtype ".concat(r," of supertype ").concat(a)),s.add(a)),!0;h.forEach(l),u&&f===c.length-1&&fd(t.selectionSet,n,i)&&(u=!1,d=!0,this.fuzzySubtypes.forEach(function(p,m){var v=r.match(p);v&&v[0]===r&&l(m)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:t.field||null,variables:t.variables},c=vd(t);a;){var l=a(c,s);if(Qe(l))a=bm(l);else{o=l||n;break}}return o===void 0&&(o=t.field?$5(t.field,t.variables):Oh(n,vd(t))),o===!1?n:n===fn(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(!!n){var i=t.field||t.fieldName;if(!!i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),s=fn(a),c=r.store.getFieldValue(n,a),l=this.getFieldPolicy(t.typename,s,!1),u=l&&l.read;if(u){var d=xm(this,n,t,r,r.store.getStorage(ke(n)?n.__ref:n,a));return Uh.withValue(this.cache,u,[c,d])}return c}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,s=n.typename,c=n.merge;return c===wm?U1(i.store)(t,r):c===_m?r:(i.overwrite&&(t=void 0),c(t,r,xm(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function xm(e,t,r,n,i){var o=e.getStoreFieldName(r),a=fn(o),s=r.variables||n.variables,c=n.store,l=c.toReference,u=c.canRead;return{args:vd(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:ke,toReference:l,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(Wh(arguments,t,s),n)},mergeObjects:U1(n.store)}}function Wh(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=C({},n),lt.call(a,"from")||(a.from=t)),__DEV__&&a.from===void 0&&__DEV__&&B.warn("Undefined 'from' passed to readField with arguments ".concat(G5(Array.from(e)))),a.variables===void 0&&(a.variables=r),a}function U1(e){return function(r,n){if(Qe(r)||Qe(n))throw __DEV__?new be("Cannot automatically merge arrays"):new be(4);if(We(r)&&We(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(ke(r)&&ai(n))return e.merge(r.__ref,n),r;if(ai(r)&&ke(n))return e.merge(r,n.__ref),n;if(ai(r)&&ai(n))return C(C({},r),n)}return n}}function Vc(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:C(C({},e),{clientOnly:t,deferred:r})),i}var c9=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,c=r.overwrite,l=Vo(i),u=Xx();s=C(C({},Th(l)),s);var d=C(C({store:t,written:Object.create(null),merge:function(h,p){return u.merge(h,p)},variables:s,varString:Nn(s)},F1(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:d});if(!ke(f))throw __DEV__?new be("Could not identify object ".concat(JSON.stringify(o))):new be(7);return d.incomingById.forEach(function(h,p){var m=h.storeObject,v=h.mergeTree,y=h.fieldNodeSet,b=ui(p);if(v&&v.map.size){var g=n.applyMerges(v,b,m,d);if(ke(g))return;m=g}if(__DEV__&&!d.overwrite){var w=Object.create(null);y.forEach(function(S){S.selectionSet&&(w[S.name.value]=!0)});var x=function(S){return w[fn(S)]===!0},E=function(S){var T=v&&v.map.get(S);return Boolean(T&&T.info&&T.info.merge)};Object.keys(m).forEach(function(S){x(S)&&!E(S)&&u9(b,m,S,d.store)})}t.merge(p,m)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,s=t.mergeTree,c=this.cache.policies,l=Object.create(null),u=n&&c.rootTypenamesById[n]||Ju(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof u=="string"&&(l.__typename=u);var d=function(){var g=Wh(arguments,l,a.variables);if(ke(g.from)){var w=a.incomingById.get(g.from.__ref);if(w){var x=c.readField(C(C({},g),{from:w.storeObject}),a);if(x!==void 0)return x}}return c.readField(g,a)},f=new Set;this.flattenFields(o,i,a,u).forEach(function(g,w){var x,E=Ln(w),S=i[E];if(f.add(w),S!==void 0){var T=c.getStoreFieldName({typename:u,fieldName:w.name.value,field:w,variables:g.variables}),M=Sm(s,T),L=r.processFieldValue(S,w,w.selectionSet?Vc(g,!1,!1):g,M),K=void 0;w.selectionSet&&(ke(L)||ai(L))&&(K=d("__typename",L));var D=c.getMergeFunction(u,w.name.value,K);D?M.info={field:w,typename:u,merge:D}:km(s,T),l=g.merge(l,(x={},x[T]=L,x))}else __DEV__&&!g.clientOnly&&!g.deferred&&!Ih.added(w)&&!c.getReadFunction(u,w.name.value)&&__DEV__&&B.error("Missing field '".concat(Ln(w),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))});try{var h=c.identify(i,{typename:u,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:d}),p=h[0],m=h[1];n=n||p,m&&(l=a.merge(l,m))}catch(g){if(!n)throw g}if(typeof n=="string"){var v=ui(n),y=a.written[n]||(a.written[n]=[]);if(y.indexOf(o)>=0||(y.push(o),this.reader&&this.reader.isFresh(i,v,o,a)))return v;var b=a.incomingById.get(n);return b?(b.storeObject=a.merge(b.storeObject,l),b.mergeTree=yd(b.mergeTree,s),f.forEach(function(g){return b.fieldNodeSet.add(g)})):a.incomingById.set(n,{storeObject:l,mergeTree:Fs(s)?void 0:s,fieldNodeSet:f}),v}return l},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?__DEV__?h1(t):t:Qe(t)?t.map(function(a,s){var c=o.processFieldValue(a,r,n,Sm(i,s));return km(i,s),c}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=Ju(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new Bo(!1);return function c(l,u){var d=s.lookup(l,u.clientOnly,u.deferred);d.visited||(d.visited=!0,l.selections.forEach(function(f){if(!!ql(f,n.variables)){var h=u.clientOnly,p=u.deferred;if(!(h&&p)&&Xt(f.directives)&&f.directives.forEach(function(y){var b=y.name.value;if(b==="client"&&(h=!0),b==="defer"){var g=Hl(y,n.variables);(!g||g.if!==!1)&&(p=!0)}}),jr(f)){var m=o.get(f);m&&(h=h&&m.clientOnly,p=p&&m.deferred),o.set(f,Vc(n,h,p))}else{var v=Eh(f,n.lookupFragment);if(!v&&f.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(f.name.value)):new be(8);v&&a.fragmentMatches(v,i,r,n.variables)&&c(v.selectionSet,Vc(n,h,p))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,s=this;if(t.map.size&&!ke(n)){var c=!Qe(n)&&(ke(r)||ai(r))?r:void 0,l=n;c&&!o&&(o=[ke(c)?c.__ref:c]);var u,d=function(f,h){return Qe(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var p=d(c,h),m=d(l,h);if(m!==void 0){o&&o.push(h);var v=s.applyMerges(f,p,m,i,o);v!==m&&(u=u||new Map,u.set(h,v)),o&&B(o.pop()===h)}}),u&&(n=Qe(l)?l.slice(0):C({},l),u.forEach(function(f,h){n[h]=f}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),V1=[];function Sm(e,t){var r=e.map;return r.has(t)||r.set(t,V1.pop()||{map:new Map}),r.get(t)}function yd(e,t){if(e===t||!t||Fs(t))return e;if(!e||Fs(e))return t;var r=e.info&&t.info?C(C({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(s,c){o.map.set(c,yd(s,t.map.get(c))),a.delete(c)}),a.forEach(function(s){o.map.set(s,yd(t.map.get(s),e.map.get(s)))})}return o}function Fs(e){return!e||!(e.info||e.map.size)}function km(e,t){var r=e.map,n=r.get(t);n&&Fs(n)&&(V1.push(n),r.delete(t))}var Em=new Set;function u9(e,t,r,n){var i=function(d){var f=n.getFieldValue(d,r);return typeof f=="object"&&f},o=i(e);if(!!o){var a=i(t);if(!!a&&!ke(o)&&!nt(o,a)&&!Object.keys(o).every(function(d){return n.getFieldValue(a,d)!==void 0})){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=fn(r),l="".concat(s,".").concat(c);if(!Em.has(l)){Em.add(l);var u=[];!Qe(o)&&!Qe(a)&&[o,a].forEach(function(d){var f=n.getFieldValue(d,"__typename");typeof f=="string"&&!u.includes(f)&&u.push(f)}),__DEV__&&B.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s,` object.
54
+ `):new be(23)},wx=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}},_x=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function xx(e,t){var r=[],n=function(d,f){r.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=cd(t.variables,"Variables map")}catch(d){return{parseError:d}}n("variables",i)}if(t.extensions){var o=void 0;try{o=cd(t.extensions,"Extensions map")}catch(d){return{parseError:d}}n("extensions",o)}var a="",s=e,c=e.indexOf("#");c!==-1&&(a=e.substr(c),s=e.substr(0,c));var l=s.indexOf("?")===-1?"?":"&",u=s+l+r.join("&")+a;return{newURI:u}}var rm=Ht(function(){return fetch}),Sx=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,o=i===void 0?yx:i,a=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,u=l===void 0?!1:l,d=sn(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&$x(n||rm);var f={http:{includeExtensions:a,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new ji(function(h){var p=_x(h,r),m=h.getContext(),v={};if(m.clientAwareness){var y=m.clientAwareness,b=y.name,g=y.version;b&&(v["apollographql-client-name"]=b),g&&(v["apollographql-client-version"]=g)}var w=C(C({},v),m.headers),x={http:m.http,options:m.fetchOptions,credentials:m.credentials,headers:w},E=gx(h,o,vx,f,x),S=E.options,T=E.body;if(T.variables&&!u){var M=new Set(Object.keys(T.variables));sr(h.query,{Variable:function(ae,xe,_e){_e&&_e.kind!=="VariableDefinition"&&M.delete(ae.name.value)}}),M.size&&(T.variables=C({},T.variables),M.forEach(function(ae){delete T.variables[ae]}))}var L;if(!S.signal){var K=wx(),D=K.controller,R=K.signal;L=D,L&&(S.signal=R)}var U=function(ae){return ae.kind==="OperationDefinition"&&ae.operation==="mutation"};if(c&&!h.query.definitions.some(U)&&(S.method="GET"),Sh(["defer"],h.query)&&(S.headers=S.headers||{},S.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),S.method==="GET"){var j=xx(p,T),Y=j.newURI,oe=j.parseError;if(oe)return Z0(oe);p=Y}else try{S.body=cd(T,"Payload")}catch(ae){return Z0(ae)}return new Pe(function(ae){var xe=n||Ht(function(){return fetch})||rm;return xe(p,S).then(function(_e){var A;h.setContext({response:_e});var N=(A=_e.headers)===null||A===void 0?void 0:A.get("content-type");return N!==null&&/^multipart\/mixed/i.test(N)?cx(_e,ae):dx(_e,h,ae)}).catch(function(_e){return Mh(_e,ae)}),function(){L&&L.abort()}})})},g1=function(e){cr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,Sx(r).request)||this;return n.options=r,n}return t}(ji),b1=Object.prototype,nm=b1.toString,kx=b1.hasOwnProperty,im=Function.prototype.toString,ud=new Map;function nt(e,t){try{return dd(e,t)}finally{ud.clear()}}function dd(e,t){if(e===t)return!0;var r=nm.call(e),n=nm.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(am(e,t))return!0;var i=om(e),o=om(t),a=i.length;if(a!==o.length)return!1;for(var s=0;s<a;++s)if(!kx.call(t,i[s]))return!1;for(var s=0;s<a;++s){var c=i[s];if(!dd(e[c],t[c]))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=="".concat(t);case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(am(e,t))return!0;for(var l=e.entries(),u=r==="[object Map]";;){var d=l.next();if(d.done)break;var f=d.value,h=f[0],p=f[1];if(!t.has(h)||u&&!dd(p,t.get(h)))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]":{var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return m===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{var v=im.call(e);return v!==im.call(t)?!1:!Cx(v,Ox)}}return!1}function om(e){return Object.keys(e).filter(Ex,e)}function Ex(e){return this[e]!==void 0}var Ox="{ [native code] }";function Cx(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function am(e,t){var r=ud.get(e);if(r){if(r.has(t))return!0}else ud.set(e,r=new Set);return r.add(t),!1}var Px=function(){return Object.create(null)},$1=Array.prototype,Tx=$1.forEach,Nx=$1.slice,Bo=function(){function e(t,r){t===void 0&&(t=!0),r===void 0&&(r=Px),this.weakness=t,this.makeData=r}return e.prototype.lookup=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return this.lookupArray(t)},e.prototype.lookupArray=function(t){var r=this;return Tx.call(t,function(n){return r=r.getChildTrie(n)}),r.data||(r.data=this.makeData(Nx.call(t)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&Ix(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();function Ix(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var pt=null,sm={},Ax=1,Dx=function(){return function(){function e(){this.id=["slot",Ax++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var t=pt;t;t=t.parent)if(this.id in t.slots){var r=t.slots[this.id];if(r===sm)break;return t!==pt&&(pt.slots[this.id]=r),!0}return pt&&(pt.slots[this.id]=sm),!1},e.prototype.getValue=function(){if(this.hasValue())return pt.slots[this.id]},e.prototype.withValue=function(t,r,n,i){var o,a=(o={__proto__:null},o[this.id]=t,o),s=pt;pt={parent:s,slots:a};try{return r.apply(i,n)}finally{pt=s}},e.bind=function(t){var r=pt;return function(){var n=pt;try{return pt=r,t.apply(this,arguments)}finally{pt=n}}},e.noContext=function(t,r,n){if(pt){var i=pt;try{return pt=null,t.apply(n,r)}finally{pt=i}}else return t.apply(n,r)},e}()};function lm(e){try{return e()}catch{}}var Lc="@wry/context:Slot",Rx=lm(function(){return globalThis})||lm(function(){return global})||Object.create(null),cm=Rx,Yl=cm[Lc]||Array[Lc]||function(e){try{Object.defineProperty(cm,Lc,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(Dx());Yl.bind;Yl.noContext;function Fx(){}var Lx=function(){function e(t,r){t===void 0&&(t=1/0),r===void 0&&(r=Fx),this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.get=function(t){var r=this.getNode(t);return r&&r.value},e.prototype.getNode=function(t){var r=this.map.get(t);if(r&&r!==this.newest){var n=r.older,i=r.newer;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r},e.prototype.set=function(t,r){var n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(t){var r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1},e}(),Xl=new Yl,Mc,Mx=Object.prototype.hasOwnProperty,jh=(Mc=Array.from,Mc===void 0?function(e){var t=[];return e.forEach(function(r){return t.push(r)}),t}:Mc);function Ds(e){var t=e.unsubscribe;typeof t=="function"&&(e.unsubscribe=void 0,t())}var Eo=[],jx=100;function xi(e,t){if(!e)throw new Error(t||"assertion failure")}function zx(e,t){var r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function w1(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Ux(e){return e.slice(0)}var Vx=function(){function e(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,++e.count}return e.prototype.peek=function(){if(this.value.length===1&&!dn(this))return um(this),this.value[0]},e.prototype.recompute=function(t){return xi(!this.recomputing,"already recomputing"),um(this),dn(this)?Bx(this,t):w1(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,_1(this),Ds(this))},e.prototype.dispose=function(){var t=this;this.setDirty(),O1(this),zh(this,function(r,n){r.setDirty(),C1(r,t)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(t){t.add(this),this.deps||(this.deps=Eo.pop()||new Set),this.deps.add(t)},e.prototype.forgetDeps=function(){var t=this;this.deps&&(jh(this.deps).forEach(function(r){return r.delete(t)}),this.deps.clear(),Eo.push(this.deps),this.deps=null)},e.count=0,e}();function um(e){var t=Xl.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),dn(e)?S1(t,e):k1(t,e),t}function Bx(e,t){return O1(e),Xl.withValue(e,Wx,[e,t]),Hx(e,t)&&qx(e),w1(e.value)}function Wx(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(r){e.value[1]=r}e.recomputing=!1}function dn(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function qx(e){e.dirty=!1,!dn(e)&&x1(e)}function _1(e){zh(e,S1)}function x1(e){zh(e,k1)}function zh(e,t){var r=e.parents.size;if(r)for(var n=jh(e.parents),i=0;i<r;++i)t(n[i],e)}function S1(e,t){xi(e.childValues.has(t)),xi(dn(t));var r=!dn(e);if(!e.dirtyChildren)e.dirtyChildren=Eo.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&_1(e)}function k1(e,t){xi(e.childValues.has(t)),xi(!dn(t));var r=e.childValues.get(t);r.length===0?e.childValues.set(t,Ux(t.value)):zx(r,t.value)||e.setDirty(),E1(e,t),!dn(e)&&x1(e)}function E1(e,t){var r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(Eo.length<jx&&Eo.push(r),e.dirtyChildren=null))}function O1(e){e.childValues.size>0&&e.childValues.forEach(function(t,r){C1(e,r)}),e.forgetDeps(),xi(e.dirtyChildren===null)}function C1(e,t){t.parents.delete(e),e.childValues.delete(t),E1(e,t)}function Hx(e,t){if(typeof e.subscribe=="function")try{Ds(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}var Gx={setDirty:!0,dispose:!0,forget:!0};function P1(e){var t=new Map,r=e&&e.subscribe;function n(i){var o=Xl.getValue();if(o){var a=t.get(i);a||t.set(i,a=new Set),o.dependOn(a),typeof r=="function"&&(Ds(a),a.unsubscribe=r(i))}}return n.dirty=function(o,a){var s=t.get(o);if(s){var c=a&&Mx.call(Gx,a)?a:"setDirty";jh(s).forEach(function(l){return l[c]()}),t.delete(o),Ds(s)}},n}function T1(){var e=new Bo(typeof WeakMap=="function");return function(){return e.lookupArray(arguments)}}T1();var jc=new Set;function Rs(e,t){t===void 0&&(t=Object.create(null));var r=new Lx(t.max||Math.pow(2,16),function(l){return l.dispose()}),n=t.keyArgs,i=t.makeCacheKey||T1(),o=function(){var l=i.apply(null,n?n.apply(null,arguments):arguments);if(l===void 0)return e.apply(null,arguments);var u=r.get(l);u||(r.set(l,u=new Vx(e)),u.subscribe=t.subscribe,u.forget=function(){return r.delete(l)});var d=u.recompute(Array.prototype.slice.call(arguments));return r.set(l,u),jc.add(r),Xl.hasValue()||(jc.forEach(function(f){return f.clean()}),jc.clear()),d};Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1});function a(l){var u=r.get(l);u&&u.setDirty()}o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))};function s(l){var u=r.get(l);if(u)return u.peek()}o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))};function c(l){return r.delete(l)}return o.forgetKey=c,o.forget=function(){return c(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var Qx=function(){function e(){this.getFragmentDoc=Rs(c5)}return e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},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,r){return r===void 0&&(r=!!t.optimistic),this.read(C(C({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(C(C({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=sn(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,o=t.fragmentName,a=sn(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),o=r(i);return o==null?i:(n.writeQuery(C(C({},t),{data:o})),o)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),o=r(i);return o==null?i:(n.writeFragment(C(C({},t),{data:o})),o)}})},e}(),N1=function(e){cr(t,e);function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(a={},a[s.path[c]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),lt=Object.prototype.hasOwnProperty;function Ji(e){return e==null}var Ge=Array.isArray;function I1(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=Ji(n)?Ji(i)?void 0:{_id:i}:{id:n}),Ji(n)&&!Ji(i)&&(n=i),!Ji(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var A1={dataIdFromObject:I1,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Kx(e){return Kl(A1,e)}function D1(e){var t=e.canonizeResults;return t===void 0?A1.canonizeResults:t}function Yx(e,t){return ke(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var R1=/^[_a-z][_0-9a-z]*/i;function fn(e){var t=e.match(R1);return t?t[0]:e}function fd(e,t,r){return We(t)?Ge(t)?t.every(function(n){return fd(e,n,r)}):e.selections.every(function(n){if(jr(n)&&ql(n,r)){var i=Ln(n);return lt.call(t,i)&&(!n.selectionSet||fd(n.selectionSet,t[i],r))}return!0}):!1}function ai(e){return We(e)&&!ke(e)&&!Ge(e)}function Xx(){return new un}function F1(e,t){var r=kh(Ch(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var Pa=Object.create(null),zc=function(){return Pa},dm=Object.create(null),Oo=function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,o){return id(ke(i)?n.get(i.__ref,o):i&&i[o])},this.canRead=function(i){return ke(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,o){if(typeof i=="string")return ui(i);if(ke(i))return i;var a=n.policies.identify(i)[0];if(a){var s=ui(a);return o&&n.merge(a,i),s}}}return e.prototype.toObject=function(){return C({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),lt.call(this.data,t)){var n=this.data[t];if(n&&lt.call(n,r))return n[r]}if(r==="__typename"&&lt.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Qr)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),lt.call(this.data,t))return this.data[t];if(this instanceof Qr)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;ke(t)&&(t=t.__ref),ke(r)&&(r=r.__ref);var o=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(!!a){__DEV__?B(typeof i=="string","store.merge expects a string ID"):B(typeof i=="string",1);var s=new un(Jx).merge(o,a);if(this.data[i]=s,s!==o&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);o||(c.__exists=1),Object.keys(a).forEach(function(l){if(!o||o[l]!==s[l]){c[l]=1;var u=fn(l);u!==l&&!n.policies.hasKeyArgs(s.__typename,u)&&(c[u]=1),s[l]===void 0&&!(n instanceof Qr)&&delete s[l]}}),c.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(l){return n.group.dirty(i,l)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var o=Object.create(null),a=!1,s=!0,c={DELETE:Pa,INVALIDATE:dm,isReference:ke,toReference:this.toReference,canRead:this.canRead,readField:function(l,u){return n.policies.readField(typeof l=="string"?{fieldName:l,from:u||ui(t)}:l,{store:n})}};if(Object.keys(i).forEach(function(l){var u=fn(l),d=i[l];if(d!==void 0){var f=typeof r=="function"?r:r[l]||r[u];if(f){var h=f===zc?Pa:f(id(d),C(C({},c),{fieldName:u,storeFieldName:l,storage:n.getStorage(t,l)}));h===dm?n.group.dirty(t,l):(h===Pa&&(h=void 0),h!==d&&(o[l]=h,a=!0,d=h))}d!==void 0&&(s=!1)}}),a)return this.merge(t,o),s&&(this instanceof Qr?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,o=this.lookup(t);if(o){var a=this.getFieldValue(o,"__typename"),s=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,s?(i={},i[s]=zc,i):zc)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(lt.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Qr&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){lt.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(o){t&&lt.call(t,o)||r.delete(o)}),t){var n=t.__META,i=sn(t,["__META"]);Object.keys(i).forEach(function(o){r.merge(o,i[o])}),n&&n.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 r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Qr?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){lt.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var o=this;o instanceof Qr;)o=o.parent;i.forEach(function(a){return o.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!lt.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(o){ke(o)&&(r[o.__ref]=!0),We(o)&&Object.keys(o).forEach(function(a){var s=o[a];We(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),L1=function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?P1():null,this.keyMaker=new Bo(Vn)},e.prototype.depend=function(t,r){if(this.d){this.d(Uc(t,r));var n=fn(r);n!==r&&this.d(Uc(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(Uc(t,r),r==="__exists"?"forget":"setDirty")},e}();function Uc(e,t){return t+"#"+e}function fm(e,t){mo(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(r){cr(n,r);function n(i){var o=i.policies,a=i.resultCaching,s=a===void 0?!0:a,c=i.seed,l=r.call(this,o,new L1(s))||this;return l.stump=new Zx(l),l.storageTrie=new Bo(Vn),c&&l.replace(c),l}return n.prototype.addLayer=function(i,o){return this.stump.addLayer(i,o)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(e);e.Root=t})(Oo||(Oo={}));var Qr=function(e){cr(t,e);function t(r,n,i,o){var a=e.call(this,n.policies,o)||this;return a.id=r,a.parent=n,a.replay=i,a.group=o,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(o){var a=n.data[o],s=i.lookup(o);s?a?a!==s&&Object.keys(a).forEach(function(c){nt(a[c],s[c])||n.group.dirty(o,c)}):(n.group.dirty(o,"__exists"),Object.keys(s).forEach(function(c){n.group.dirty(o,c)})):n.delete(o)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return C(C({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return lt.call(this.data,r)?C(C({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t}(Oo),Zx=function(e){cr(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new L1(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Qr);function Jx(e,t,r){var n=e[r],i=t[r];return nt(n,i)?n:i}function mo(e){return!!(e instanceof Oo&&e.group.caching)}function e9(e){return We(e)?Ge(e)?e.slice(0):C({__proto__:Object.getPrototypeOf(e)},e):e}var hd=function(){function e(){this.known=new(W5?WeakSet:Set),this.pool=new Bo(Vn),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return We(t)&&this.known.has(t)},e.prototype.pass=function(t){if(We(t)){var r=e9(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(We(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var o=t.map(this.admit,this),a=this.pool.lookupArray(o);return a.array||(this.known.add(a.array=o),__DEV__&&Object.freeze(o)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],l=this.sortedKeys(t);c.push(l.json);var u=c.length;l.sorted.forEach(function(h){c.push(r.admit(t[h]))});var a=this.pool.lookupArray(c);if(!a.object){var d=a.object=Object.create(s);this.known.add(d),l.sorted.forEach(function(h,p){d[h]=c[u+p]}),__DEV__&&Object.freeze(d)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e}(),Nn=Object.assign(function(e){if(We(e)){pd===void 0&&hm();var t=pd.admit(e),r=md.get(t);return r===void 0&&md.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)},{reset:hm}),pd,md;function hm(){pd=new hd,md=new(Vn?WeakMap:Map)}function pm(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var t9=function(){function e(t){var r=this;this.knownResults=new(Vn?WeakMap:Map),this.config=Kl(t,{addTypename:t.addTypename!==!1,canonizeResults:D1(t)}),this.canon=t.canon||new hd,this.executeSelectionSet=Rs(function(n){var i,o=n.context.canonizeResults,a=pm(n);a[3]=!o;var s=(i=r.executeSelectionSet).peek.apply(i,a);return s?o?C(C({},s),{result:r.canon.admit(s.result)}):s:(fm(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize,keyArgs:pm,makeCacheKey:function(n,i,o,a){if(mo(o.store))return o.store.makeCacheKey(n,ke(i)?i.__ref:i,o.varString,a)}}),this.executeSubSelectedArray=Rs(function(n){return fm(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(n){var i=n.field,o=n.array,a=n.context;if(mo(a.store))return a.store.makeCacheKey(i,o,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new hd},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,o=i===void 0?"ROOT_QUERY":i,a=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,l=t.canonizeResults,u=l===void 0?this.config.canonizeResults:l,d=this.config.cache.policies;a=C(C({},Th(a1(n))),a);var f=ui(o),h=this.executeSelectionSet({selectionSet:Ph(n).selectionSet,objectOrReference:f,enclosingRef:f,context:C({store:r,query:n,policies:d,variables:a,varString:Nn(a),canonizeResults:u},F1(n,this.config.fragments))}),p;if(h.missing&&(p=[new N1(r9(h.missing),h.missing,n,a)],!c))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(t,r,n,i){if(mo(i.store)&&this.knownResults.get(t)===n){var o=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(o&&t===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,o=t.enclosingRef,a=t.context;if(ke(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=a.variables,c=a.policies,l=a.store,u=l.getFieldValue(i,"__typename"),d=[],f,h=new un;this.config.addTypename&&typeof u=="string"&&!c.rootIdsByTypename[u]&&d.push({__typename:u});function p(g,w){var x;return g.missing&&(f=h.merge(f,(x={},x[w]=g.missing,x))),g.result}var m=new Set(n.selections);m.forEach(function(g){var w,x;if(!!ql(g,s))if(jr(g)){var E=c.readField({fieldName:g.name.value,field:g,variables:a.variables,from:i},a),S=Ln(g);E===void 0?Ih.added(g)||(f=h.merge(f,(w={},w[S]="Can't find field '".concat(g.name.value,"' on ").concat(ke(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),w))):Ge(E)?E=p(r.executeSubSelectedArray({field:g,array:E,enclosingRef:o,context:a}),S):g.selectionSet?E!=null&&(E=p(r.executeSelectionSet({selectionSet:g.selectionSet,objectOrReference:E,enclosingRef:ke(E)?E:o,context:a}),S)):a.canonizeResults&&(E=r.canon.pass(E)),E!==void 0&&d.push((x={},x[S]=E,x))}else{var T=Eh(g,a.lookupFragment);if(!T&&g.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(g.name.value)):new be(5);T&&c.fragmentMatches(T,u)&&T.selectionSet.selections.forEach(m.add,m)}});var v=Ah(d),y={result:v,missing:f},b=a.canonizeResults?this.canon.admit(y):id(y);return b.result&&this.knownResults.set(b.result,n),b},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,o=t.enclosingRef,a=t.context,s,c=new un;function l(u,d){var f;return u.missing&&(s=c.merge(s,(f={},f[d]=u.missing,f))),u.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(u,d){return u===null?null:Ge(u)?l(r.executeSubSelectedArray({field:n,array:u,enclosingRef:o,context:a}),d):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:u,enclosingRef:ke(u)?u:o,context:a}),d):(__DEV__&&n9(a.store,n,u),u)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function r9(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function n9(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){We(i)&&(__DEV__?B(!ke(i),"Missing selection set for object of type ".concat(Yx(e,i)," returned for query field ").concat(t.name.value)):B(!ke(i),6),Object.values(i).forEach(n.add,n))})}}var Uh=new Yl,mm=new WeakMap;function vo(e){var t=mm.get(e);return t||mm.set(e,t={vars:new Set,dep:P1()}),t}function vm(e){vo(e).vars.forEach(function(t){return t.forgetCache(e)})}function i9(e){vo(e).vars.forEach(function(t){return t.attachCache(e)})}function o9(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach(function(c){vo(c).dep.dirty(n),a9(c)});var a=Array.from(r);r.clear(),a.forEach(function(c){return c(e)})}}else{var s=Uh.getValue();s&&(i(s),vo(s).dep(n))}return e};n.onNextChange=function(o){return r.add(o),function(){r.delete(o)}};var i=n.attachCache=function(o){return t.add(o),vo(o).vars.add(n),n};return n.forgetCache=function(o){return t.delete(o)},n}function a9(e){e.broadcastWatches&&e.broadcastWatches()}var ym=Object.create(null);function Vh(e){var t=JSON.stringify(e);return ym[t]||(ym[t]=Object.create(null))}function gm(e){var t=Vh(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,s){return n.readField(s,a)},o=n.keyObject=Bh(e,function(a){var s=fi(n.storeObject,a,i);return s===void 0&&r!==n.storeObject&&lt.call(r,a[0])&&(s=fi(r,a,j1)),__DEV__?B(s!==void 0,"Missing field '".concat(a.join("."),"' while extracting keyFields from ").concat(JSON.stringify(r))):B(s!==void 0,2),s});return"".concat(n.typename,":").concat(JSON.stringify(o))})}function bm(e){var t=Vh(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,o=n.variables,a=n.fieldName,s=Bh(e,function(l){var u=l[0],d=u.charAt(0);if(d==="@"){if(i&&Xt(i.directives)){var f=u.slice(1),h=i.directives.find(function(y){return y.name.value===f}),p=h&&Hl(h,o);return p&&fi(p,l.slice(1))}return}if(d==="$"){var m=u.slice(1);if(o&&lt.call(o,m)){var v=l.slice(0);return v[0]=m,fi(o,v)}return}if(r)return fi(r,l)}),c=JSON.stringify(s);return(r||c!=="{}")&&(a+=":"+c),a})}function Bh(e,t){var r=new un;return M1(e).reduce(function(n,i){var o,a=t(i);if(a!==void 0){for(var s=i.length-1;s>=0;--s)a=(o={},o[i[s]]=a,o);n=r.merge(n,a)}return n},Object.create(null))}function M1(e){var t=Vh(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,o){Ge(i)?(M1(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),Ge(e[o+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function j1(e,t){return e[t]}function fi(e,t,r){return r=r||j1,z1(t.reduce(function n(i,o){return Ge(i)?i.map(function(a){return n(a,o)}):i&&r(i,o)},e))}function z1(e){return We(e)?Ge(e)?e.map(z1):Bh(Object.keys(e).sort(),function(t){return fi(e,t)}):e}Oh.setStringify(Nn);function vd(e){return e.args!==void 0?e.args:e.field?Hl(e.field,e.variables):null}var s9=function(){},$m=function(e,t){return t.fieldName},wm=function(e,t,r){var n=r.mergeObjects;return n(e,t)},_m=function(e,t){return t},l9=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=C({dataIdFromObject:I1},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,r){var n,i=this,o=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=r&&r.storeObject||t,s=C(C({},r),{typename:o,storeObject:a,readField:r&&r.readField||function(){var f=Wh(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,l=o&&this.getTypePolicy(o),u=l&&l.keyFn||this.config.dataIdFromObject;u;){var d=u(t,s);if(Ge(d))u=gm(d);else{c=d;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],o=i.queryType,a=i.mutationType,s=i.subscriptionType,c=sn(i,["queryType","mutationType","subscriptionType"]);o&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),s&&r.setRootTypename("Subscription",n),lt.call(r.toBeAdded,n)?r.toBeAdded[n].push(c):r.toBeAdded[n]=[c]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),o=r.keyFields,a=r.fields;function s(c,l){c.merge=typeof l=="function"?l:l===!0?wm:l===!1?_m:c.merge}s(i,r.merge),i.keyFn=o===!1?s9:Ge(o)?gm(o):typeof o=="function"?o:i.keyFn,a&&Object.keys(a).forEach(function(c){var l=n.getFieldPolicy(t,c,!0),u=a[c];if(typeof u=="function")l.read=u;else{var d=u.keyArgs,f=u.read,h=u.merge;l.keyFn=d===!1?$m:Ge(d)?bm(d):typeof d=="function"?d:l.keyFn,typeof f=="function"&&(l.read=f),s(l,h)}l.read&&l.merge&&(l.keyFn=l.keyFn||$m)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(__DEV__?B(!i||i===t,"Cannot change root ".concat(t," __typename more than once")):B(!i||i===t,3),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var o=i.match(R1);(!o||o[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!lt.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);i&&i.size&&i.forEach(function(a){var s=r.getTypePolicy(a),c=s.fields,l=sn(s,["fields"]);Object.assign(n,l),Object.assign(n.fields,c)})}var o=this.toBeAdded[t];return o&&o.length&&o.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var o=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(r,!0),c=[s],l=function(p){var m=o.getSupertypeSet(p,!1);m&&m.size&&c.indexOf(m)<0&&c.push(m)},u=!!(n&&this.fuzzySubtypes.size),d=!1,f=0;f<c.length;++f){var h=c[f];if(h.has(a))return s.has(a)||(d&&__DEV__&&B.warn("Inferring subtype ".concat(r," of supertype ").concat(a)),s.add(a)),!0;h.forEach(l),u&&f===c.length-1&&fd(t.selectionSet,n,i)&&(u=!1,d=!0,this.fuzzySubtypes.forEach(function(p,m){var v=r.match(p);v&&v[0]===r&&l(m)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),o,a=i&&i.keyFn;if(a&&r)for(var s={typename:r,fieldName:n,field:t.field||null,variables:t.variables},c=vd(t);a;){var l=a(c,s);if(Ge(l))a=bm(l);else{o=l||n;break}}return o===void 0&&(o=t.field?$5(t.field,t.variables):Oh(n,vd(t))),o===!1?n:n===fn(o)?o:n+":"+o},e.prototype.readField=function(t,r){var n=t.from;if(!!n){var i=t.field||t.fieldName;if(!!i){if(t.typename===void 0){var o=r.store.getFieldValue(n,"__typename");o&&(t.typename=o)}var a=this.getStoreFieldName(t),s=fn(a),c=r.store.getFieldValue(n,a),l=this.getFieldPolicy(t.typename,s,!1),u=l&&l.read;if(u){var d=xm(this,n,t,r,r.store.getStorage(ke(n)?n.__ref:n,a));return Uh.withValue(this.cache,u,[c,d])}return c}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),o=i&&i.merge;return!o&&n&&(i=this.getTypePolicy(n),o=i&&i.merge),o},e.prototype.runMergeFunction=function(t,r,n,i,o){var a=n.field,s=n.typename,c=n.merge;return c===wm?U1(i.store)(t,r):c===_m?r:(i.overwrite&&(t=void 0),c(t,r,xm(this,void 0,{typename:s,fieldName:a.name.value,field:a,variables:i.variables},i,o||Object.create(null))))},e}();function xm(e,t,r,n,i){var o=e.getStoreFieldName(r),a=fn(o),s=r.variables||n.variables,c=n.store,l=c.toReference,u=c.canRead;return{args:vd(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:ke,toReference:l,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(Wh(arguments,t,s),n)},mergeObjects:U1(n.store)}}function Wh(e,t,r){var n=e[0],i=e[1],o=e.length,a;return typeof n=="string"?a={fieldName:n,from:o>1?i:t}:(a=C({},n),lt.call(a,"from")||(a.from=t)),__DEV__&&a.from===void 0&&__DEV__&&B.warn("Undefined 'from' passed to readField with arguments ".concat(G5(Array.from(e)))),a.variables===void 0&&(a.variables=r),a}function U1(e){return function(r,n){if(Ge(r)||Ge(n))throw __DEV__?new be("Cannot automatically merge arrays"):new be(4);if(We(r)&&We(n)){var i=e.getFieldValue(r,"__typename"),o=e.getFieldValue(n,"__typename"),a=i&&o&&i!==o;if(a)return n;if(ke(r)&&ai(n))return e.merge(r.__ref,n),r;if(ai(r)&&ke(n))return e.merge(r,n.__ref),n;if(ai(r)&&ai(n))return C(C({},r),n)}return n}}function Vc(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:C(C({},e),{clientOnly:t,deferred:r})),i}var c9=function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,o=r.result,a=r.dataId,s=r.variables,c=r.overwrite,l=Vo(i),u=Xx();s=C(C({},Th(l)),s);var d=C(C({store:t,written:Object.create(null),merge:function(h,p){return u.merge(h,p)},variables:s,varString:Nn(s)},F1(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:d});if(!ke(f))throw __DEV__?new be("Could not identify object ".concat(JSON.stringify(o))):new be(7);return d.incomingById.forEach(function(h,p){var m=h.storeObject,v=h.mergeTree,y=h.fieldNodeSet,b=ui(p);if(v&&v.map.size){var g=n.applyMerges(v,b,m,d);if(ke(g))return;m=g}if(__DEV__&&!d.overwrite){var w=Object.create(null);y.forEach(function(S){S.selectionSet&&(w[S.name.value]=!0)});var x=function(S){return w[fn(S)]===!0},E=function(S){var T=v&&v.map.get(S);return Boolean(T&&T.info&&T.info.merge)};Object.keys(m).forEach(function(S){x(S)&&!E(S)&&u9(b,m,S,d.store)})}t.merge(p,m)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,o=t.selectionSet,a=t.context,s=t.mergeTree,c=this.cache.policies,l=Object.create(null),u=n&&c.rootTypenamesById[n]||Ju(i,o,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof u=="string"&&(l.__typename=u);var d=function(){var g=Wh(arguments,l,a.variables);if(ke(g.from)){var w=a.incomingById.get(g.from.__ref);if(w){var x=c.readField(C(C({},g),{from:w.storeObject}),a);if(x!==void 0)return x}}return c.readField(g,a)},f=new Set;this.flattenFields(o,i,a,u).forEach(function(g,w){var x,E=Ln(w),S=i[E];if(f.add(w),S!==void 0){var T=c.getStoreFieldName({typename:u,fieldName:w.name.value,field:w,variables:g.variables}),M=Sm(s,T),L=r.processFieldValue(S,w,w.selectionSet?Vc(g,!1,!1):g,M),K=void 0;w.selectionSet&&(ke(L)||ai(L))&&(K=d("__typename",L));var D=c.getMergeFunction(u,w.name.value,K);D?M.info={field:w,typename:u,merge:D}:km(s,T),l=g.merge(l,(x={},x[T]=L,x))}else __DEV__&&!g.clientOnly&&!g.deferred&&!Ih.added(w)&&!c.getReadFunction(u,w.name.value)&&__DEV__&&B.error("Missing field '".concat(Ln(w),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))});try{var h=c.identify(i,{typename:u,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:d}),p=h[0],m=h[1];n=n||p,m&&(l=a.merge(l,m))}catch(g){if(!n)throw g}if(typeof n=="string"){var v=ui(n),y=a.written[n]||(a.written[n]=[]);if(y.indexOf(o)>=0||(y.push(o),this.reader&&this.reader.isFresh(i,v,o,a)))return v;var b=a.incomingById.get(n);return b?(b.storeObject=a.merge(b.storeObject,l),b.mergeTree=yd(b.mergeTree,s),f.forEach(function(g){return b.fieldNodeSet.add(g)})):a.incomingById.set(n,{storeObject:l,mergeTree:Fs(s)?void 0:s,fieldNodeSet:f}),v}return l},e.prototype.processFieldValue=function(t,r,n,i){var o=this;return!r.selectionSet||t===null?__DEV__?h1(t):t:Ge(t)?t.map(function(a,s){var c=o.processFieldValue(a,r,n,Sm(i,s));return km(i,s),c}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=Ju(r,t,n.fragmentMap));var o=new Map,a=this.cache.policies,s=new Bo(!1);return function c(l,u){var d=s.lookup(l,u.clientOnly,u.deferred);d.visited||(d.visited=!0,l.selections.forEach(function(f){if(!!ql(f,n.variables)){var h=u.clientOnly,p=u.deferred;if(!(h&&p)&&Xt(f.directives)&&f.directives.forEach(function(y){var b=y.name.value;if(b==="client"&&(h=!0),b==="defer"){var g=Hl(y,n.variables);(!g||g.if!==!1)&&(p=!0)}}),jr(f)){var m=o.get(f);m&&(h=h&&m.clientOnly,p=p&&m.deferred),o.set(f,Vc(n,h,p))}else{var v=Eh(f,n.lookupFragment);if(!v&&f.kind===Z.FRAGMENT_SPREAD)throw __DEV__?new be("No fragment named ".concat(f.name.value)):new be(8);v&&a.fragmentMatches(v,i,r,n.variables)&&c(v.selectionSet,Vc(n,h,p))}}}))}(t,n),o},e.prototype.applyMerges=function(t,r,n,i,o){var a,s=this;if(t.map.size&&!ke(n)){var c=!Ge(n)&&(ke(r)||ai(r))?r:void 0,l=n;c&&!o&&(o=[ke(c)?c.__ref:c]);var u,d=function(f,h){return Ge(f)?typeof h=="number"?f[h]:void 0:i.store.getFieldValue(f,String(h))};t.map.forEach(function(f,h){var p=d(c,h),m=d(l,h);if(m!==void 0){o&&o.push(h);var v=s.applyMerges(f,p,m,i,o);v!==m&&(u=u||new Map,u.set(h,v)),o&&B(o.pop()===h)}}),u&&(n=Ge(l)?l.slice(0):C({},l),u.forEach(function(f,h){n[h]=f}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,o&&(a=i.store).getStorage.apply(a,o)):n},e}(),V1=[];function Sm(e,t){var r=e.map;return r.has(t)||r.set(t,V1.pop()||{map:new Map}),r.get(t)}function yd(e,t){if(e===t||!t||Fs(t))return e;if(!e||Fs(e))return t;var r=e.info&&t.info?C(C({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,o={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(s,c){o.map.set(c,yd(s,t.map.get(c))),a.delete(c)}),a.forEach(function(s){o.map.set(s,yd(t.map.get(s),e.map.get(s)))})}return o}function Fs(e){return!e||!(e.info||e.map.size)}function km(e,t){var r=e.map,n=r.get(t);n&&Fs(n)&&(V1.push(n),r.delete(t))}var Em=new Set;function u9(e,t,r,n){var i=function(d){var f=n.getFieldValue(d,r);return typeof f=="object"&&f},o=i(e);if(!!o){var a=i(t);if(!!a&&!ke(o)&&!nt(o,a)&&!Object.keys(o).every(function(d){return n.getFieldValue(a,d)!==void 0})){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=fn(r),l="".concat(s,".").concat(c);if(!Em.has(l)){Em.add(l);var u=[];!Ge(o)&&!Ge(a)&&[o,a].forEach(function(d){var f=n.getFieldValue(d,"__typename");typeof f=="string"&&!u.includes(f)&&u.push(f)}),__DEV__&&B.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s,` object.
55
55
 
56
56
  To address this problem (which is not a bug in Apollo Client), `).concat(u.length?"either ensure all objects of type "+u.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l,` field, so InMemoryCache can safely merge these objects:
57
57
 
@@ -68,7 +68,7 @@ For more information about these options, please refer to the documentation:
68
68
  Did you mean to call refetch(variables) instead of refetch({ variables })?`))}return r&&!nt(this.options.variables,r)&&(i.variables=this.options.variables=C(C({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,Oe.refetch)},t.prototype.fetchMore=function(r){var n=this,i=C(C({},r.query?r:C(C(C(C({},this.options),{query:this.query}),r),{variables:C(C({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"}),o=this.queryManager.generateQueryId(),a=this.queryInfo,s=a.networkStatus;a.networkStatus=Oe.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set;return this.queryManager.fetchQuery(o,i,Oe.fetchMore).then(function(l){return n.queryManager.removeQuery(o),a.networkStatus===Oe.fetchMore&&(a.networkStatus=s),n.queryManager.cache.batch({update:function(u){var d=r.updateQuery;d?u.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(f){return d(f,{fetchMoreResult:l.data,variables:i.variables})}):u.writeQuery({query:i.query,variables:i.variables,data:l.data})},onWatchUpdated:function(u){c.add(u.query)}}),l}).finally(function(){c.has(n.query)||B1(n)})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,c){var l=c.variables;return a(s,{subscriptionData:o,variables:l})})},error:function(o){if(r.onError){r.onError(o);return}__DEV__&&B.error("Unhandled GraphQL subscription error",o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.setVariables=function(r){return nt(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},Oe.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,o=r(i,{variables:this.variables});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,r,n)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){__DEV__?B(o,"Attempted to start a polling query without a polling interval."):B(o,13);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){r.pollingInfo&&(Co(r.queryInfo.networkStatus)?c():r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Oe.poll).then(c,c))},c=function(){var l=r.pollingInfo;l&&(clearTimeout(l.timeout),l.timeout=setTimeout(s,l.interval))};c()}}},t.prototype.updateLastResult=function(r,n){return n===void 0&&(n=this.variables),this.last=C(C({},this.last),{result:this.queryManager.assumeImmutableResults?r:h1(r),variables:n}),Xt(r.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(r,n){var i=this;this.isTornDown=!1;var o=n===Oe.refetch||n===Oe.fetchMore||n===Oe.poll,a=this.options.variables,s=this.options.fetchPolicy,c=Kl(this.options,r||{}),l=o?c:p9(this.options,c);o||(this.updatePolling(),r&&r.variables&&!nt(r.variables,a)&&l.fetchPolicy!=="standby"&&l.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",l),n===void 0&&(n=Oe.setVariables)));var u=l.variables&&C({},l.variables),d=this.fetch(l,n),f={next:function(h){i.reportResult(h,u)},error:function(h){i.reportError(h,u)}};return o||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=d,this.observer=f),d.addObserver(f),d.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError();(i||this.isDifferentFromLastResult(r,n))&&((i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),po(this.observers,"next",r))},t.prototype.reportError=function(r,n){var i=C(C({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:Oe.error,loading:!1});this.updateLastResult(i,n),po(this.observers,"error",this.last.error=r)},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(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Pe);m1(gd);function B1(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return r==="cache-and-network"||r==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,typeof n=="function"?n.apply(this,arguments):r}}):e.reobserve()}function v9(e){__DEV__&&B.error("Unhandled error",e.message,e.stack)}function W1(e){__DEV__&&e&&__DEV__&&B.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}var q1=function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,o=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=q0(r.resolvers,n)}):this.resolvers=q0(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){var r=t.document,n=t.remoteResult,i=t.context,o=t.variables,a=t.onlyRunForcedResolvers,s=a===void 0?!1:a;return ie(this,void 0,void 0,function(){return Yr(this,function(c){return r?[2,this.resolveDocument(r,n.data,i,o,this.fragmentMatcher,s).then(function(l){return C(C({},n),{data:l.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Sh(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return T5(t)},e.prototype.prepareContext=function(t){var r=this.cache;return C(C({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t,r,n){return r===void 0&&(r={}),n===void 0&&(n={}),ie(this,void 0,void 0,function(){return Yr(this,function(i){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,r)||{},this.prepareContext(n),r).then(function(o){return C(C({},r),o.exportedVariables)})]:[2,C({},r)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return sr(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return xh}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:P5(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r,n,i,o,a){return n===void 0&&(n={}),i===void 0&&(i={}),o===void 0&&(o=function(){return!0}),a===void 0&&(a=!1),ie(this,void 0,void 0,function(){var s,c,l,u,d,f,h,p,m,v,y;return Yr(this,function(b){return s=Ph(t),c=Ch(t),l=kh(c),u=this.collectSelectionsToResolve(s,l),d=s.operation,f=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",h=this,p=h.cache,m=h.client,v={fragmentMap:l,context:C(C({},n),{cache:p,client:m}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},selectionsToResolve:u,onlyRunForcedResolvers:a},y=!1,[2,this.resolveSelectionSet(s.selectionSet,y,r,v).then(function(g){return{result:g,exportedVariables:v.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return ie(this,void 0,void 0,function(){var o,a,s,c,l,u=this;return Yr(this,function(d){return o=i.fragmentMap,a=i.context,s=i.variables,c=[n],l=function(f){return ie(u,void 0,void 0,function(){var h,p;return Yr(this,function(m){return!r&&!i.selectionsToResolve.has(f)?[2]:ql(f,s)?jr(f)?[2,this.resolveField(f,r,n,i).then(function(v){var y;typeof v<"u"&&c.push((y={},y[Ln(f)]=v,y))})]:(o1(f)?h=f:(h=o[f.name.value],__DEV__?B(h,"No fragment named ".concat(f.name.value)):B(h,11)),h&&h.typeCondition&&(p=h.typeCondition.name.value,i.fragmentMatcher(n,p,a))?[2,this.resolveSelectionSet(h.selectionSet,r,n,i).then(function(v){c.push(v)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(l)).then(function(){return Ah(c)})]})})},e.prototype.resolveField=function(t,r,n,i){return ie(this,void 0,void 0,function(){var o,a,s,c,l,u,d,f,h,p=this;return Yr(this,function(m){return o=i.variables,a=t.name.value,s=Ln(t),c=a!==s,l=n[s]||n[a],u=Promise.resolve(l),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=n.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(h=f[c?a:s],h&&(u=Promise.resolve(Uh.withValue(this.cache,h,[n,Hl(t,o),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,u.then(function(v){var y,b;if(v===void 0&&(v=l),t.directives&&t.directives.forEach(function(w){w.name.value==="export"&&w.arguments&&w.arguments.forEach(function(x){x.name.value==="as"&&x.value.kind==="StringValue"&&(i.exportedVariables[x.value.value]=v)})}),!t.selectionSet||v==null)return v;var g=(b=(y=t.directives)===null||y===void 0?void 0:y.some(function(w){return w.name.value==="client"}))!==null&&b!==void 0?b:!1;if(Array.isArray(v))return p.resolveSubSelectedArray(t,r||g,v,i);if(t.selectionSet)return p.resolveSelectionSet(t.selectionSet,r||g,v,i)})]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var o=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return o.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return o.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function o(a){if(!i.has(a)){var s=new Set;i.set(a,s),sr(a,{Directive:function(c,l,u,d,f){c.name.value==="client"&&f.forEach(function(h){n(h)&&U0(h)&&s.add(h)})},FragmentSpread:function(c,l,u,d,f){var h=r[c.name.value];__DEV__?B(h,"No fragment named ".concat(c.name.value)):B(h,12);var p=o(h);p.size>0&&(f.forEach(function(m){n(m)&&U0(m)&&s.add(m)}),s.add(c),p.forEach(function(m){s.add(m)}))}})}return i.get(a)}return o(t)},e}(),si=new(Vn?WeakMap:Map);function Bc(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return si.set(e,(si.get(e)+1)%1e15),r.apply(this,arguments)})}function Om(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Wc=function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=t.cache;si.has(n)||(si.set(n,0),Bc(n,"evict"),Bc(n,"modify"),Bc(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||Oe.loading;return this.variables&&this.networkStatus!==Oe.loading&&!nt(this.variables,t.variables)&&(r=Oe.setVariables),nt(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){Om(this),this.dirty=!1},e.prototype.getDiff=function(t){t===void 0&&(t=this.variables);var r=this.getDiffOptions(t);if(this.lastDiff&&nt(r,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=t);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var i=this.cache.diff(r);return this.updateLastDiff(i,r),i},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(t),!this.dirty&&!nt(n&&n.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0)))},e.prototype.setObservableQuery=function(t){var r=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 n=r.getDiff();n.fromOptimisticTransaction?t.observe():B1(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;Om(this),this.shouldNotify()&&this.listeners.forEach(function(r){return r(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Co(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,this.subscriptions.forEach(function(r){return r.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=C(C({},this.getDiffOptions(t)),{watcher:this,callback:function(o){return r.setDiff(o)}});(!this.lastWatch||!nt(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,r){var n=this.lastWrite;return!(n&&n.dmCount===si.get(this.cache)&&nt(r,n.variables)&&nt(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var o=this,a=new un,s=Xt(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Xt(t.incremental)){var c=v1(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var l=this.getDiff();t.data=a.merge(l.result,t.data)}this.graphQLErrors=s,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(bd(t,n.errorPolicy)?this.cache.performTransaction(function(u){if(o.shouldWrite(t,n.variables))u.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),o.lastWrite={result:t,variables:n.variables,dmCount:si.get(o.cache)};else if(o.lastDiff&&o.lastDiff.diff.complete){t.data=o.lastDiff.diff.result;return}var d=o.getDiffOptions(n.variables),f=u.diff(d);o.stopped||o.updateWatch(n.variables),o.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Oe.ready},e.prototype.markError=function(t){return this.networkStatus=Oe.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function bd(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!Ca(e);return!n&&r&&e.data&&(n=!0),n}var y9=Object.prototype.hasOwnProperty,g9=function(){function e(t){var r=t.cache,n=t.link,i=t.defaultOptions,o=t.queryDeduplication,a=o===void 0?!1:o,s=t.onBroadcast,c=t.ssrMode,l=c===void 0?!1:c,u=t.clientAwareness,d=u===void 0?{}:u,f=t.localState,h=t.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Vn?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=r,this.link=n,this.defaultOptions=i||Object.create(null),this.queryDeduplication=a,this.clientAwareness=d,this.localState=f||new q1({cache:r}),this.ssrMode=l,this.assumeImmutableResults=!!h,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new be("QueryManager stopped while query was in flight"):new be(14))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){var r,n,i=t.mutation,o=t.variables,a=t.optimisticResponse,s=t.updateQueries,c=t.refetchQueries,l=c===void 0?[]:c,u=t.awaitRefetchQueries,d=u===void 0?!1:u,f=t.update,h=t.onQueryUpdated,p=t.fetchPolicy,m=p===void 0?((r=this.defaultOptions.mutate)===null||r===void 0?void 0:r.fetchPolicy)||"network-only":p,v=t.errorPolicy,y=v===void 0?((n=this.defaultOptions.mutate)===null||n===void 0?void 0:n.errorPolicy)||"none":v,b=t.keepRootFields,g=t.context;return ie(this,void 0,void 0,function(){var w,x,E,S,T,M;return Yr(this,function(L){switch(L.label){case 0:return __DEV__?B(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):B(i,15),__DEV__?B(m==="network-only"||m==="no-cache","Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):B(m==="network-only"||m==="no-cache",16),w=this.generateMutationId(),x=this.transform(i),E=x.document,S=x.hasClientExports,i=this.cache.transformForLink(E),o=this.getVariables(i,o),S?[4,this.localState.addExportedVariables(i,o,g)]:[3,2];case 1:o=L.sent(),L.label=2;case 2:return T=this.mutationStore&&(this.mutationStore[w]={mutation:i,variables:o,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:w,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,updateQueries:s,update:f,keepRootFields:b}),this.broadcastQueries(),M=this,[2,new Promise(function(K,D){return Rc(M.getObservableFromLink(i,C(C({},g),{optimisticResponse:a}),o,!1),function(R){if(Ca(R)&&y==="none")throw new Qn({graphQLErrors:od(R)});T&&(T.loading=!1,T.error=null);var U=C({},R);return typeof l=="function"&&(l=l(U)),y==="ignore"&&Ca(U)&&delete U.errors,M.markMutationResult({mutationId:w,result:U,document:i,variables:o,fetchPolicy:m,errorPolicy:y,context:g,update:f,updateQueries:s,awaitRefetchQueries:d,refetchQueries:l,removeOptimistic:a?w:void 0,onQueryUpdated:h,keepRootFields:b})}).subscribe({next:function(R){M.broadcastQueries(),(!("hasNext"in R)||R.hasNext===!1)&&K(R)},error:function(R){T&&(T.loading=!1,T.error=R),a&&M.cache.removeOptimistic(w),M.broadcastQueries(),D(R instanceof Qn?R:new Qn({networkError:R}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,o=[],a=t.fetchPolicy==="no-cache";if(!a&&bd(i,t.errorPolicy)){if(di(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),di(i)&&Xt(i.incremental)){var s=r.diff({id:"ROOT_MUTATION",query:this.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=v1(s.result,i)),typeof c<"u"&&(i.data=c,o.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var l=t.updateQueries;l&&this.queries.forEach(function(d,f){var h=d.observableQuery,p=h&&h.queryName;if(!(!p||!y9.call(l,p))){var m=l[p],v=n.queries.get(f),y=v.document,b=v.variables,g=r.diff({query:y,variables:b,returnPartialData:!0,optimistic:!1}),w=g.result,x=g.complete;if(x&&w){var E=m(w,{mutationResult:i,queryName:y&&ed(y)||void 0,queryVariables:b});E&&o.push({result:E,dataId:"ROOT_QUERY",query:y,variables:b})}}})}if(o.length>0||t.refetchQueries||t.update||t.onQueryUpdated||t.removeOptimistic){var u=[];if(this.refetchQueries({updateCache:function(d){a||o.forEach(function(m){return d.write(m)});var f=t.update,h=!H5(i)||di(i)&&!i.hasNext;if(f){if(!a){var p=d.diff({id:"ROOT_MUTATION",query:n.transform(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});p.complete&&(i=C(C({},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})}!a&&!t.keepRootFields&&h&&d.modify({id:"ROOT_MUTATION",fields:function(m,v){var y=v.fieldName,b=v.DELETE;return y==="__typename"?m:b}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return u.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(u).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables):t;return this.cache.recordOptimisticTransaction(function(o){try{n.markMutationResult(C(C({},r),{result:{data:i}}),o)}catch(a){__DEV__&&B.error(a)}},r.mutationId)},e.prototype.fetchQuery=function(t,r,n){return this.fetchQueryObservable(t,r,n).promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){var r=this.transformCache;if(!r.has(t)){var n=this.cache.transformDocument(t),i=k5(n),o=this.localState.clientQuery(n),a=i&&this.localState.serverQuery(i),s={document:n,hasClientExports:a5(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:o,serverQuery:a,defaultVars:Th(Vo(n)),asQuery:C(C({},n),{definitions:n.definitions.map(function(l){return l.kind==="OperationDefinition"&&l.operation!=="query"?C(C({},l),{operation:"query"}):l})})},c=function(l){l&&!r.has(l)&&r.set(l,s)};c(t),c(n),c(o),c(a)}return r.get(t)},e.prototype.getVariables=function(t,r){return C(C({},this.transform(t).defaultVars),r)},e.prototype.watchQuery=function(t){t=C(C({},t),{variables:this.getVariables(t.query,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new Wc(this),n=new gd({queryManager:this,queryInfo:r,options:t});return this.queries.set(n.queryId,r),r.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(t,r){var n=this;return r===void 0&&(r=this.generateQueryId()),__DEV__?B(t.query,"query option is required. You must specify your GraphQL document in the query option."):B(t.query,17),__DEV__?B(t.query.kind==="Document",'You must wrap the query string in a "gql" tag.'):B(t.query.kind==="Document",18),__DEV__?B(!t.returnPartialData,"returnPartialData option only supported on watchQuery."):B(!t.returnPartialData,19),__DEV__?B(!t.pollInterval,"pollInterval option only supported on watchQuery."):B(!t.pollInterval,20),this.fetchQuery(r,t).finally(function(){return n.stopQuery(r)})},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 r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new be("Store reset while query was in flight (not completed in link chain)"):new be(21)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=Oe.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,o=new Set;return Array.isArray(t)&&t.forEach(function(a){typeof a=="string"?i.set(a,!1):u5(a)?i.set(r.transform(a).document,!1):We(a)&&a.query&&o.add(a)}),this.queries.forEach(function(a,s){var c=a.observableQuery,l=a.document;if(c){if(t==="all"){n.set(s,c);return}var u=c.queryName,d=c.options.fetchPolicy;if(d==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||u&&i.has(u)||l&&i.has(l))&&(n.set(s,c),u&&i.set(u,!0),l&&i.set(l,!0))}}),o.size&&o.forEach(function(a){var s=ad("legacyOneTimeQuery"),c=r.getQuery(s).init({document:a.query,variables:a.variables}),l=new gd({queryManager:r,queryInfo:c,options:C(C({},a),{fetchPolicy:"network-only"})});B(l.queryId===s),c.setObservableQuery(l),n.set(s,l)}),__DEV__&&i.size&&i.forEach(function(a,s){a||__DEV__&&B.warn("Unknown query ".concat(typeof s=="string"?"named ":"").concat(JSON.stringify(s,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,o){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),r.getQuery(o).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.fetchPolicy,o=t.errorPolicy,a=t.variables,s=t.context,c=s===void 0?{}:s;n=this.transform(n).document,a=this.getVariables(n,a);var l=function(d){return r.getObservableFromLink(n,c,d).map(function(f){if(i!=="no-cache"&&(bd(f,o)&&r.cache.write({query:n,result:f.data,dataId:"ROOT_SUBSCRIPTION",variables:d}),r.broadcastQueries()),Ca(f))throw new Qn({graphQLErrors:f.errors});return f})};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,a,c).then(l);return new Pe(function(d){var f=null;return u.then(function(h){return f=h.subscribe(d)},d.error),function(){return f&&f.unsubscribe()}})}return l(a)},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,r,n,i){var o=this,a;i===void 0&&(i=(a=r?.queryDeduplication)!==null&&a!==void 0?a:this.queryDeduplication);var s,c=this.transform(t).serverQuery;if(c){var l=this,u=l.inFlightLinkObservables,d=l.link,f={query:c,variables:n,operationName:ed(c)||void 0,context:this.prepareContext(C(C({},r),{forceFetch:!i}))};if(r=f.context,i){var h=u.get(c)||new Map;u.set(c,h);var p=Nn(n);if(s=h.get(p),!s){var m=new uo([ld(d,f)]);h.set(p,s=m),m.beforeNext(function(){h.delete(p)&&h.size<1&&u.delete(c)})}}else s=new uo([ld(d,f)])}else s=new uo([Pe.of({data:{}})]),r=this.prepareContext(r);var v=this.transform(t).clientQuery;return v&&(s=Rc(s,function(y){return o.localState.runResolvers({document:v,remoteResult:y,context:r,variables:n})})),s},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(this.transform(t.document).document);return Rc(this.getObservableFromLink(o,n.context,n.variables),function(a){var s=od(a),c=s.length>0;if(i>=t.lastRequestId){if(c&&n.errorPolicy==="none")throw t.markError(new Qn({graphQLErrors:s}));t.markResult(a,o,n,r),t.markReady()}var l={data:a.data,loading:!1,networkStatus:Oe.ready};return c&&n.errorPolicy!=="ignore"&&(l.errors=s,l.networkStatus=Oe.error),l},function(a){var s=f9(a)?a:new Qn({networkError:a});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchQueryObservable=function(t,r,n){var i=this;n===void 0&&(n=Oe.loading);var o=this.transform(r.query).document,a=this.getVariables(o,r.variables),s=this.getQuery(t),c=this.defaultOptions.watchQuery,l=r.fetchPolicy,u=l===void 0?c&&c.fetchPolicy||"cache-first":l,d=r.errorPolicy,f=d===void 0?c&&c.errorPolicy||"none":d,h=r.returnPartialData,p=h===void 0?!1:h,m=r.notifyOnNetworkStatusChange,v=m===void 0?!1:m,y=r.context,b=y===void 0?{}:y,g=Object.assign({},r,{query:o,variables:a,fetchPolicy:u,errorPolicy:f,returnPartialData:p,notifyOnNetworkStatusChange:v,context:b}),w=function(S){g.variables=S;var T=i.fetchQueryByPolicy(s,g,n);return g.fetchPolicy!=="standby"&&T.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",r),T},x=function(){return i.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(S){x(),setTimeout(function(){return E.cancel(S)})});var E=new uo(this.transform(g.query).hasClientExports?this.localState.addExportedVariables(g.query,g.variables,g.context).then(w):w(g.variables));return E.promise.then(x,x),E},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,o=t.optimistic,a=o===void 0?!1:o,s=t.removeOptimistic,c=s===void 0?a?ad("refetchQueries"):void 0:s,l=t.onQueryUpdated,u=new Map;i&&this.getObservableQueries(i).forEach(function(f,h){u.set(h,{oq:f,lastDiff:r.getQuery(h).getDiff()})});var d=new Map;return n&&this.cache.batch({update:n,optimistic:a&&c||!1,removeOptimistic:c,onWatchUpdated:function(f,h,p){var m=f.watcher instanceof Wc&&f.watcher.observableQuery;if(m){if(l){u.delete(m.queryId);var v=l(m,h,p);return v===!0&&(v=m.refetch()),v!==!1&&d.set(m,v),v}l!==null&&u.set(m.queryId,{oq:m,lastDiff:p,diff:h})}}}),u.size&&u.forEach(function(f,h){var p=f.oq,m=f.lastDiff,v=f.diff,y;if(l){if(!v){var b=p.queryInfo;b.reset(),v=b.getDiff()}y=l(p,v,m)}(!l||y===!0)&&(y=p.refetch()),y!==!1&&d.set(p,y),h.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(h)}),c&&this.cache.removeOptimistic(c),d},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,o=r.query,a=r.variables,s=r.fetchPolicy,c=r.refetchWritePolicy,l=r.errorPolicy,u=r.returnPartialData,d=r.context,f=r.notifyOnNetworkStatusChange,h=t.networkStatus;t.init({document:this.transform(o).document,variables:a,networkStatus:n});var p=function(){return t.getDiff(a)},m=function(w,x){x===void 0&&(x=t.networkStatus||Oe.loading);var E=w.result;__DEV__&&!u&&!nt(E,{})&&W1(w.missing);var S=function(T){return Pe.of(C({data:T,loading:Co(x),networkStatus:x},w.complete?null:{partial:!0}))};return E&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:E},context:d,variables:a,onlyRunForcedResolvers:!0}).then(function(T){return S(T.data||void 0)}):l==="none"&&x===Oe.refetch&&Array.isArray(w.missing)?S(void 0):S(E)},v=s==="no-cache"?0:n===Oe.refetch&&c!=="merge"?1:2,y=function(){return i.getResultsFromLink(t,v,{variables:a,context:d,fetchPolicy:s,errorPolicy:l})},b=f&&typeof h=="number"&&h!==n&&Co(n);switch(s){default:case"cache-first":{var g=p();return g.complete?[m(g,t.markReady())]:u||b?[m(g),y()]:[y()]}case"cache-and-network":{var g=p();return g.complete||u||b?[m(g),y()]:[y()]}case"cache-only":return[m(p(),t.markReady())];case"network-only":return b?[m(p()),y()]:[y()];case"no-cache":return b?[m(t.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Wc(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return C(C({},r),{clientAwareness:this.clientAwareness})},e}(),Cm=!1,b9=function(){function e(t){var r=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=t.uri,i=t.credentials,o=t.headers,a=t.cache,s=t.ssrMode,c=s===void 0?!1:s,l=t.ssrForceFetchDelay,u=l===void 0?0:l,d=t.connectToDevTools,f=d===void 0?typeof window=="object"&&!window.__APOLLO_CLIENT__&&__DEV__:d,h=t.queryDeduplication,p=h===void 0?!0:h,m=t.defaultOptions,v=t.assumeImmutableResults,y=v===void 0?!1:v,b=t.resolvers,g=t.typeDefs,w=t.fragmentMatcher,x=t.name,E=t.version,S=t.link;if(S||(S=n?new g1({uri:n,credentials:i,headers:o}):ji.empty()),!a)throw __DEV__?new be(`To initialize Apollo Client, you must specify a 'cache' property in the options object.
69
69
  For more information, please visit: https://go.apollo.dev/c/docs`):new be(9);if(this.link=S,this.cache=a,this.disableNetworkFetches=c||u>0,this.queryDeduplication=p,this.defaultOptions=m||Object.create(null),this.typeDefs=g,u&&setTimeout(function(){return r.disableNetworkFetches=!1},u),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&typeof window=="object"&&(window.__APOLLO_CLIENT__=this),!Cm&&f&&__DEV__&&(Cm=!0,typeof window<"u"&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,M=T&&T.userAgent,L=void 0;typeof M=="string"&&(M.indexOf("Chrome/")>-1?L="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":M.indexOf("Firefox/")>-1&&(L="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),L&&__DEV__&&B.log("Download the Apollo DevTools for a better development experience: "+L)}this.version=Z5,this.localState=new q1({cache:a,client:this,resolvers:b,fragmentMatcher:w}),this.queryManager=new g9({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:p,ssrMode:c,clientAwareness:{name:x,version:E},localState:this.localState,assumeImmutableResults:y,onBroadcast:f?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Fc(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=C(C({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=Fc(this.defaultOptions.query,t)),__DEV__?B(t.fetchPolicy!=="cache-and-network","The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):B(t.fetchPolicy!=="cache-and-network",10),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=C(C({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Fc(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){this.cache.writeQuery(t),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(t){this.cache.writeFragment(t),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return ld(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(r){return r()}))}).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(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,s){n.push(s),i.push(a)});var o=Promise.all(i);return o.queries=n,o.results=i,o.catch(function(a){__DEV__&&B.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(a))}),o},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},e}(),Ta=new Map,$d=new Map,H1=!0,Ls=!1;function G1(e){return e.replace(/[\s,]+/g," ").trim()}function $9(e){return G1(e.source.body.substring(e.start,e.end))}function w9(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,o=$9(n.loc),a=$d.get(i);a&&!a.has(o)?H1&&console.warn("Warning: fragment with name "+i+` already exists.
70
70
  graphql-tag enforces all fragment names across your application to be unique; read more about
71
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||$d.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),C(C({},e),{definitions:r})}function _9(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function x9(e){var t=G1(e);if(!Ta.has(t)){var r=Q4(e,{experimentalFragmentVariables:Ls,allowLegacyFragmentVariables:Ls});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ta.set(t,_9(w9(r)))}return Ta.get(t)}function G(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),x9(n)}function S9(){Ta.clear(),$d.clear()}function k9(){H1=!1}function E9(){Ls=!0}function O9(){Ls=!1}var eo={gql:G,resetCaches:S9,disableFragmentWarnings:k9,enableExperimentalFragmentVariables:E9,disableExperimentalFragmentVariables:O9};(function(e){e.gql=eo.gql,e.resetCaches=eo.resetCaches,e.disableFragmentWarnings=eo.disableFragmentWarnings,e.enableExperimentalFragmentVariables=eo.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=eo.disableExperimentalFragmentVariables})(G||(G={}));G.default=G;const Wo=G;function C9(e){return new ji(function(t,r){var n=sn(t,[]);return new Pe(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return e(s,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}const P9=/[?&]code=[^&]+/,T9=/[?&]state=[^&]+/,N9=/[?&]error=[^&]+/;class Pm{constructor({authentication:t,organization:r,audience:n="https://api.photon.health"}){this.authentication=t,this.organization=r,this.audience=n}login({organizationId:t,invitation:r,appState:n}){return ie(this,void 0,void 0,function*(){let i={redirectMethod:"assign"};return(t||this.organization)&&(i=Object.assign(i,{organization:t||this.organization})),r&&(i=Object.assign(i,{invitation:r})),n&&(i=Object.assign(i,{appState:n})),this.authentication.loginWithPopup(i)})}logout({returnTo:t}){return ie(this,void 0,void 0,function*(){let r={};return t&&(r=Object.assign(r,{returnTo:t})),this.authentication.logout(r)})}hasAuthParams(t=window.location.search){return(P9.test(t)||N9.test(t))&&T9.test(t)}getAccessToken({audience:t}={audience:this.audience}){return ie(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenSilently(r)})}getAccessTokenWithConsent({audience:t}={audience:this.audience}){return ie(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenWithPopup(r)})}checkSession(){return ie(this,void 0,void 0,function*(){return this.authentication.checkSession()})}handleRedirect(t){return ie(this,void 0,void 0,function*(){try{return this.authentication.handleRedirectCallback(t)}catch(r){throw r}})}getUser(){return ie(this,void 0,void 0,function*(){return this.authentication.getUser()})}isAuthenticated(){return ie(this,void 0,void 0,function*(){try{return yield this.authentication.checkSession(),yield this.authentication.isAuthenticated()}catch{return!1}})}}const la=G`
71
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||$d.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),r.push(n))}else r.push(n)}),C(C({},e),{definitions:r})}function _9(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var o=n[i];o&&typeof o=="object"&&t.add(o)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function x9(e){var t=G1(e);if(!Ta.has(t)){var r=Q4(e,{experimentalFragmentVariables:Ls,allowLegacyFragmentVariables:Ls});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ta.set(t,_9(w9(r)))}return Ta.get(t)}function G(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[o+1]}),x9(n)}function S9(){Ta.clear(),$d.clear()}function k9(){H1=!1}function E9(){Ls=!0}function O9(){Ls=!1}var eo={gql:G,resetCaches:S9,disableFragmentWarnings:k9,enableExperimentalFragmentVariables:E9,disableExperimentalFragmentVariables:O9};(function(e){e.gql=eo.gql,e.resetCaches=eo.resetCaches,e.disableFragmentWarnings=eo.disableFragmentWarnings,e.enableExperimentalFragmentVariables=eo.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=eo.disableExperimentalFragmentVariables})(G||(G={}));G.default=G;const Wo=G;function C9(e){return new ji(function(t,r){var n=sn(t,[]);return new Pe(function(i){var o,a=!1;return Promise.resolve(n).then(function(s){return e(s,t.getContext())}).then(t.setContext).then(function(){a||(o=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,o&&o.unsubscribe()}})})}const P9=/[?&]code=[^&]+/,T9=/[?&]state=[^&]+/,N9=/[?&]error=[^&]+/;class Pm{constructor({authentication:t,organization:r,audience:n="https://api.photon.health"}){this.authentication=t,this.organization=r,this.audience=n}login({organizationId:t,invitation:r,appState:n}){return ie(this,void 0,void 0,function*(){let i={redirectMethod:"assign"};return(t||this.organization)&&(i=Object.assign(i,{organization:t||this.organization})),r&&(i=Object.assign(i,{invitation:r})),n&&(i=Object.assign(i,{appState:n})),this.authentication.loginWithRedirect(i)})}logout({returnTo:t}){return ie(this,void 0,void 0,function*(){let r={};return t&&(r=Object.assign(r,{returnTo:t})),this.authentication.logout(r)})}hasAuthParams(t=window.location.search){return(P9.test(t)||N9.test(t))&&T9.test(t)}getAccessToken({audience:t}={audience:this.audience}){return ie(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenSilently(r)})}getAccessTokenWithConsent({audience:t}={audience:this.audience}){return ie(this,void 0,void 0,function*(){let r={audience:t||this.audience||void 0};return this.organization&&(r=Object.assign(r,{organization:this.organization})),this.authentication.getTokenWithPopup(r)})}checkSession(){return ie(this,void 0,void 0,function*(){return this.authentication.checkSession()})}handleRedirect(t){return ie(this,void 0,void 0,function*(){try{return this.authentication.handleRedirectCallback(t)}catch(r){throw r}})}getUser(){return ie(this,void 0,void 0,function*(){return this.authentication.getUser()})}isAuthenticated(){return ie(this,void 0,void 0,function*(){try{return yield this.authentication.checkSession(),yield this.authentication.isAuthenticated()}catch{return!1}})}}const la=G`
72
72
  fragment OrganizationFields on Organization {
73
73
  id
74
74
  name
@@ -714,8 +714,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
714
714
  }`;return Et(this.apollo,i)}deleteWebhook(){const t=G`
715
715
  mutation deleteWebhookConfig($id: String!) {
716
716
  deleteWebhookConfig(id: $id)
717
- }
718
- `;return Et(this.apollo,t)}}class G9{constructor(t){this.client=new W9(t),this.organization=new q9(t),this.webhook=new H9(t)}}var Dm;(function(e){e.Drug="DRUG",e.Package="PACKAGE",e.Product="PRODUCT"})(Dm||(Dm={}));var Rm;(function(e){e.Icd10="ICD10"})(Rm||(Rm={}));var Fm;(function(e){e.Canceled="CANCELED",e.New="NEW",e.Scheduled="SCHEDULED",e.Sent="SENT"})(Fm||(Fm={}));var Lm;(function(e){e.MailOrder="MAIL_ORDER",e.PickUp="PICK_UP"})(Lm||(Lm={}));var Mm;(function(e){e.Otc="OTC",e.Rx="RX"})(Mm||(Mm={}));var jm;(function(e){e.Canceled="CANCELED",e.Completed="COMPLETED",e.Error="ERROR",e.Pending="PENDING",e.Placed="PLACED"})(jm||(jm={}));var zm;(function(e){e.Pharmacy="PHARMACY",e.Prescriber="PRESCRIBER"})(zm||(zm={}));var Um;(function(e){e.Active="ACTIVE",e.Depleted="DEPLETED",e.Expired="EXPIRED"})(Um||(Um={}));var Vm;(function(e){e.I="I",e.Ii="II",e.Iii="III",e.Iv="IV",e.V="V"})(Vm||(Vm={}));var Bm;(function(e){e.Concept="CONCEPT",e.Form="FORM",e.Route="ROUTE",e.Strength="STRENGTH"})(Bm||(Bm={}));var Wm;(function(e){e.Female="FEMALE",e.Male="MALE",e.Unknown="UNKNOWN"})(Wm||(Wm={}));class Q9{constructor({domain:t,clientId:r,redirectURI:n,organization:i,audience:o="https://api.photon.health",uri:a="https://api.photon.health/graphql",developmentMode:s=!1}){this.auth0Client=new h4({domain:t||(s?"auth.neutron.health":"auth.photon.health"),client_id:r,redirect_uri:n,cacheLocation:"memory"}),this.audience=o,this.uri=a,s&&(this.audience="https://api.neutron.health",this.uri="https://api.neutron.health/graphql"),this.organization=i,this.authentication=new Pm({authentication:this.auth0Client,organization:this.organization,audience:this.audience});let c=this.constructApolloClient();this.clinical=new B9(c),this.management=new G9(c)}constructApolloClient(){return new b9({link:C9((r,n)=>ie(this,void 0,void 0,function*(){var{headers:i}=n,o=sn(n,["headers"]);let a;try{a=yield this.authentication.getAccessToken()}catch(s){if(s.message.includes("Consent required"))a=yield this.authentication.getAccessTokenWithConsent();else throw s}return a?Object.assign(Object.assign({},o),{headers:Object.assign(Object.assign({},i),{authorization:a})}):Object.assign({headers:i},o)})).concat(new g1({uri:this.uri})),defaultOptions:{query:{fetchPolicy:"network-only",errorPolicy:"all"}},cache:new d9})}setOrganization(t){return this.organization=t,this.authentication=new Pm({authentication:this.auth0Client,organization:t,audience:this.audience}),this}}const wd=Symbol("store-raw"),Po=Symbol("store-node"),K9=Symbol("store-name");function Q1(e,t){let r=e[$r];if(!r&&(Object.defineProperty(e,$r,{value:r=new Proxy(e,Z9)}),!Array.isArray(e))){const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){const s=n[o];i[s].get&&Object.defineProperty(e,s,{enumerable:i[s].enumerable,get:i[s].get.bind(r)})}}return r}function hn(e){let t;return e!=null&&typeof e=="object"&&(e[$r]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Si(e,t=new Set){let r,n,i,o;if(r=e!=null&&e[wd])return r;if(!hn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)i=e[a],(n=Si(i,t))!==i&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=a.length;c<l;c++)o=a[c],!s[o].get&&(i=e[o],(n=Si(i,t))!==i&&(e[o]=n))}return e}function qh(e){let t=e[Po];return t||Object.defineProperty(e,Po,{value:t={}}),t}function _d(e,t,r){return e[t]||(e[t]=Y1(r))}function Y9(e,t){const r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===$r||t===Po||t===K9||(delete r.value,delete r.writable,r.get=()=>e[$r][t]),r}function K1(e){if(Lg()){const t=qh(e);(t._||(t._=Y1()))()}}function X9(e){return K1(e),Reflect.ownKeys(e)}function Y1(e){const[t,r]=F(e,{equals:!1,internal:!0});return t.$=r,t}const Z9={get(e,t,r){if(t===wd)return e;if(t===$r)return r;if(t===_u)return K1(e),r;const n=qh(e),i=n.hasOwnProperty(t);let o=i?n[t]():e[t];if(t===Po||t==="__proto__")return o;if(!i){const a=Object.getOwnPropertyDescriptor(e,t);Lg()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(o=_d(n,t,o)())}return hn(o)?Q1(o):o},has(e,t){return t===wd||t===$r||t===_u||t===Po||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:X9,getOwnPropertyDescriptor:Y9};function Wt(e,t,r,n=!1){if(!n&&e[t]===r)return;const i=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let a=qh(e),s;(s=_d(a,t,i))&&s.$(()=>r),Array.isArray(e)&&e.length!==o&&(s=_d(a,"length",o))&&s.$(e.length),(s=a._)&&s.$()}function X1(e,t){const r=Object.keys(t);for(let n=0;n<r.length;n+=1){const i=r[n];Wt(e,i,t[i])}}function J9(e,t){if(typeof t=="function"&&(t=t(e)),t=Si(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){const i=t[r];e[r]!==i&&Wt(e,r,i)}Wt(e,"length",n)}else X1(e,t)}function fo(e,t,r=[]){let n,i=e;if(t.length>1){n=t.shift();const a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let c=0;c<n.length;c++)fo(e,[n[c]].concat(t),r);return}else if(s&&a==="function"){for(let c=0;c<e.length;c++)n(e[c],c)&&fo(e,[c].concat(t),r);return}else if(s&&a==="object"){const{from:c=0,to:l=e.length-1,by:u=1}=n;for(let d=c;d<=l;d+=u)fo(e,[d].concat(t),r);return}else if(t.length>1){fo(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}let o=t[0];typeof o=="function"&&(o=o(i,r),o===i)||n===void 0&&o==null||(o=Si(o),n===void 0||hn(i)&&hn(o)&&!Array.isArray(o)?X1(i,o):Wt(e,n,o))}function gn(...[e,t]){const r=Si(e||{}),n=Array.isArray(r),i=Q1(r);function o(...a){v$(()=>{n&&a.length===1?J9(r,a[0]):fo(r,a)})}return[i,o]}const xd=Symbol("store-root");function ti(e,t,r,n,i){const o=t[r];if(e===o)return;if(!hn(e)||!hn(o)||i&&e[i]!==o[i]){if(e!==o){if(r===xd)return e;Wt(t,r,e)}return}if(Array.isArray(e)){if(e.length&&o.length&&(!n||i&&e[0]&&e[0][i]!=null)){let c,l,u,d,f,h,p,m;for(u=0,d=Math.min(o.length,e.length);u<d&&(o[u]===e[u]||i&&o[u]&&e[u]&&o[u][i]===e[u][i]);u++)ti(e[u],o,u,n,i);const v=new Array(e.length),y=new Map;for(d=o.length-1,f=e.length-1;d>=u&&f>=u&&(o[d]===e[f]||i&&o[u]&&e[u]&&o[d][i]===e[f][i]);d--,f--)v[f]=o[d];if(u>f||u>d){for(l=u;l<=f;l++)Wt(o,l,e[l]);for(;l<e.length;l++)Wt(o,l,v[l]),ti(e[l],o,l,n,i);o.length>e.length&&Wt(o,"length",e.length);return}for(p=new Array(f+1),l=f;l>=u;l--)h=e[l],m=i&&h?h[i]:h,c=y.get(m),p[l]=c===void 0?-1:c,y.set(m,l);for(c=u;c<=d;c++)h=o[c],m=i&&h?h[i]:h,l=y.get(m),l!==void 0&&l!==-1&&(v[l]=o[c],l=p[l],y.set(m,l));for(l=u;l<e.length;l++)l in v?(Wt(o,l,v[l]),ti(e[l],o,l,n,i)):Wt(o,l,e[l])}else for(let c=0,l=e.length;c<l;c++)ti(e[c],o,c,n,i);o.length>e.length&&Wt(o,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)ti(e[a[c]],o,a[c],n,i);const s=Object.keys(o);for(let c=0,l=s.length;c<l;c++)e[s[c]]===void 0&&Wt(o,s[c],void 0)}function e8(e,t={}){const{merge:r,key:n="id"}=t,i=Si(e);return o=>{if(!hn(o)||!hn(i))return i;const a=ti(i,{[xd]:o},xd,r,n);return a===void 0?o:a}}function Sd(e){this.message=e}Sd.prototype=new Error,Sd.prototype.name="InvalidCharacterError";var qm=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Sd("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,o=0,a="";n=t.charAt(o++);~n&&(r=i%4?64*r+n:n,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return a};function t8(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(qm(r).replace(/(.)/g,function(n,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return qm(t)}}function Ms(e){this.message=e}function Z1(e,t){if(typeof e!="string")throw new Ms("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(t8(e.split(".")[r]))}catch(n){throw new Ms("Invalid token specified: "+n.message)}}Ms.prototype=new Error,Ms.prototype.name="InvalidTokenError";const r8=e=>{window.location.replace(e?.returnTo||window.location.pathname)},n8=Wo`
717
+ }`;return Et(this.apollo,t)}}class G9{constructor(t){this.client=new W9(t),this.organization=new q9(t),this.webhook=new H9(t)}}var Dm;(function(e){e.Drug="DRUG",e.Package="PACKAGE",e.Product="PRODUCT"})(Dm||(Dm={}));var Rm;(function(e){e.Icd10="ICD10"})(Rm||(Rm={}));var Fm;(function(e){e.Canceled="CANCELED",e.New="NEW",e.Scheduled="SCHEDULED",e.Sent="SENT"})(Fm||(Fm={}));var Lm;(function(e){e.MailOrder="MAIL_ORDER",e.PickUp="PICK_UP"})(Lm||(Lm={}));var Mm;(function(e){e.Otc="OTC",e.Rx="RX"})(Mm||(Mm={}));var jm;(function(e){e.Canceled="CANCELED",e.Completed="COMPLETED",e.Error="ERROR",e.Pending="PENDING",e.Placed="PLACED"})(jm||(jm={}));var zm;(function(e){e.Pharmacy="PHARMACY",e.Prescriber="PRESCRIBER"})(zm||(zm={}));var Um;(function(e){e.Active="ACTIVE",e.Depleted="DEPLETED",e.Expired="EXPIRED"})(Um||(Um={}));var Vm;(function(e){e.I="I",e.Ii="II",e.Iii="III",e.Iv="IV",e.V="V"})(Vm||(Vm={}));var Bm;(function(e){e.Concept="CONCEPT",e.Form="FORM",e.Route="ROUTE",e.Strength="STRENGTH"})(Bm||(Bm={}));var Wm;(function(e){e.Female="FEMALE",e.Male="MALE",e.Unknown="UNKNOWN"})(Wm||(Wm={}));class Q9{constructor({domain:t,clientId:r,redirectURI:n,organization:i,audience:o="https://api.photon.health",uri:a="https://api.photon.health/graphql",developmentMode:s=!1}){this.auth0Client=new h4({domain:t||(s?"auth.neutron.health":"auth.photon.health"),client_id:r,redirect_uri:n,cacheLocation:"memory"}),this.audience=o,this.uri=a,s&&(this.audience="https://api.neutron.health",this.uri="https://api.neutron.health/graphql"),this.organization=i,this.authentication=new Pm({authentication:this.auth0Client,organization:this.organization,audience:this.audience});let c=this.constructApolloClient();this.clinical=new B9(c),this.management=new G9(c)}constructApolloClient(){return new b9({link:C9((r,n)=>ie(this,void 0,void 0,function*(){var{headers:i}=n,o=sn(n,["headers"]);let a;try{a=yield this.authentication.getAccessToken()}catch(s){if(s.message.includes("Consent required"))a=yield this.authentication.getAccessTokenWithConsent();else throw s}return a?Object.assign(Object.assign({},o),{headers:Object.assign(Object.assign({},i),{authorization:a})}):Object.assign({headers:i},o)})).concat(new g1({uri:this.uri})),defaultOptions:{query:{fetchPolicy:"network-only",errorPolicy:"all"}},cache:new d9})}setOrganization(t){return this.organization=t,this.authentication=new Pm({authentication:this.auth0Client,organization:t,audience:this.audience}),this}}const wd=Symbol("store-raw"),Po=Symbol("store-node"),K9=Symbol("store-name");function Q1(e,t){let r=e[$r];if(!r&&(Object.defineProperty(e,$r,{value:r=new Proxy(e,Z9)}),!Array.isArray(e))){const n=Object.keys(e),i=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){const s=n[o];i[s].get&&Object.defineProperty(e,s,{enumerable:i[s].enumerable,get:i[s].get.bind(r)})}}return r}function hn(e){let t;return e!=null&&typeof e=="object"&&(e[$r]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Si(e,t=new Set){let r,n,i,o;if(r=e!=null&&e[wd])return r;if(!hn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)i=e[a],(n=Si(i,t))!==i&&(e[a]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=a.length;c<l;c++)o=a[c],!s[o].get&&(i=e[o],(n=Si(i,t))!==i&&(e[o]=n))}return e}function qh(e){let t=e[Po];return t||Object.defineProperty(e,Po,{value:t={}}),t}function _d(e,t,r){return e[t]||(e[t]=Y1(r))}function Y9(e,t){const r=Reflect.getOwnPropertyDescriptor(e,t);return!r||r.get||!r.configurable||t===$r||t===Po||t===K9||(delete r.value,delete r.writable,r.get=()=>e[$r][t]),r}function K1(e){if(Lg()){const t=qh(e);(t._||(t._=Y1()))()}}function X9(e){return K1(e),Reflect.ownKeys(e)}function Y1(e){const[t,r]=F(e,{equals:!1,internal:!0});return t.$=r,t}const Z9={get(e,t,r){if(t===wd)return e;if(t===$r)return r;if(t===_u)return K1(e),r;const n=qh(e),i=n.hasOwnProperty(t);let o=i?n[t]():e[t];if(t===Po||t==="__proto__")return o;if(!i){const a=Object.getOwnPropertyDescriptor(e,t);Lg()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(o=_d(n,t,o)())}return hn(o)?Q1(o):o},has(e,t){return t===wd||t===$r||t===_u||t===Po||t==="__proto__"?!0:(this.get(e,t,e),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:X9,getOwnPropertyDescriptor:Y9};function Wt(e,t,r,n=!1){if(!n&&e[t]===r)return;const i=e[t],o=e.length;r===void 0?delete e[t]:e[t]=r;let a=qh(e),s;(s=_d(a,t,i))&&s.$(()=>r),Array.isArray(e)&&e.length!==o&&(s=_d(a,"length",o))&&s.$(e.length),(s=a._)&&s.$()}function X1(e,t){const r=Object.keys(t);for(let n=0;n<r.length;n+=1){const i=r[n];Wt(e,i,t[i])}}function J9(e,t){if(typeof t=="function"&&(t=t(e)),t=Si(t),Array.isArray(t)){if(e===t)return;let r=0,n=t.length;for(;r<n;r++){const i=t[r];e[r]!==i&&Wt(e,r,i)}Wt(e,"length",n)}else X1(e,t)}function fo(e,t,r=[]){let n,i=e;if(t.length>1){n=t.shift();const a=typeof n,s=Array.isArray(e);if(Array.isArray(n)){for(let c=0;c<n.length;c++)fo(e,[n[c]].concat(t),r);return}else if(s&&a==="function"){for(let c=0;c<e.length;c++)n(e[c],c)&&fo(e,[c].concat(t),r);return}else if(s&&a==="object"){const{from:c=0,to:l=e.length-1,by:u=1}=n;for(let d=c;d<=l;d+=u)fo(e,[d].concat(t),r);return}else if(t.length>1){fo(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}let o=t[0];typeof o=="function"&&(o=o(i,r),o===i)||n===void 0&&o==null||(o=Si(o),n===void 0||hn(i)&&hn(o)&&!Array.isArray(o)?X1(i,o):Wt(e,n,o))}function gn(...[e,t]){const r=Si(e||{}),n=Array.isArray(r),i=Q1(r);function o(...a){v$(()=>{n&&a.length===1?J9(r,a[0]):fo(r,a)})}return[i,o]}const xd=Symbol("store-root");function ti(e,t,r,n,i){const o=t[r];if(e===o)return;if(!hn(e)||!hn(o)||i&&e[i]!==o[i]){if(e!==o){if(r===xd)return e;Wt(t,r,e)}return}if(Array.isArray(e)){if(e.length&&o.length&&(!n||i&&e[0]&&e[0][i]!=null)){let c,l,u,d,f,h,p,m;for(u=0,d=Math.min(o.length,e.length);u<d&&(o[u]===e[u]||i&&o[u]&&e[u]&&o[u][i]===e[u][i]);u++)ti(e[u],o,u,n,i);const v=new Array(e.length),y=new Map;for(d=o.length-1,f=e.length-1;d>=u&&f>=u&&(o[d]===e[f]||i&&o[u]&&e[u]&&o[d][i]===e[f][i]);d--,f--)v[f]=o[d];if(u>f||u>d){for(l=u;l<=f;l++)Wt(o,l,e[l]);for(;l<e.length;l++)Wt(o,l,v[l]),ti(e[l],o,l,n,i);o.length>e.length&&Wt(o,"length",e.length);return}for(p=new Array(f+1),l=f;l>=u;l--)h=e[l],m=i&&h?h[i]:h,c=y.get(m),p[l]=c===void 0?-1:c,y.set(m,l);for(c=u;c<=d;c++)h=o[c],m=i&&h?h[i]:h,l=y.get(m),l!==void 0&&l!==-1&&(v[l]=o[c],l=p[l],y.set(m,l));for(l=u;l<e.length;l++)l in v?(Wt(o,l,v[l]),ti(e[l],o,l,n,i)):Wt(o,l,e[l])}else for(let c=0,l=e.length;c<l;c++)ti(e[c],o,c,n,i);o.length>e.length&&Wt(o,"length",e.length);return}const a=Object.keys(e);for(let c=0,l=a.length;c<l;c++)ti(e[a[c]],o,a[c],n,i);const s=Object.keys(o);for(let c=0,l=s.length;c<l;c++)e[s[c]]===void 0&&Wt(o,s[c],void 0)}function e8(e,t={}){const{merge:r,key:n="id"}=t,i=Si(e);return o=>{if(!hn(o)||!hn(i))return i;const a=ti(i,{[xd]:o},xd,r,n);return a===void 0?o:a}}function Sd(e){this.message=e}Sd.prototype=new Error,Sd.prototype.name="InvalidCharacterError";var qm=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Sd("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i=0,o=0,a="";n=t.charAt(o++);~n&&(r=i%4?64*r+n:n,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return a};function t8(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(qm(r).replace(/(.)/g,function(n,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return qm(t)}}function Ms(e){this.message=e}function Z1(e,t){if(typeof e!="string")throw new Ms("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(t8(e.split(".")[r]))}catch(n){throw new Ms("Invalid token specified: "+n.message)}}Ms.prototype=new Error,Ms.prototype.name="InvalidTokenError";const r8=e=>{window.location.replace(e?.returnTo||window.location.pathname)},n8=Wo`
719
718
  fragment CatalogTreatmentsFields on Catalog {
720
719
  treatments {
721
720
  id
@@ -736,7 +735,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
736
735
  }
737
736
  }
738
737
  }
739
- `;class i8{sdk;setStore;store;authentication;getSDK;clinical;constructor(t){this.sdk=t;const[r,n]=gn({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=n,this.store=r,this.authentication={state:r.authentication,handleRedirect:async i=>{try{const o=await this.sdk.authentication.handleRedirect(i);r8(o?.appState)}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser(),n=!!this.sdk?.organization&&!!r?.org_id,i=await this.sdk.authentication.getAccessToken(),{permissions:o}=Z1(i);this.setStore("authentication",{...this.store.authentication,user:r,isLoading:!1,isInOrg:t&&n&&this.sdk.organization===r.org_id,permissions:o||[]})}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:{CatalogTreatmentsFields:n8}});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}var o8=(e,t,r)=>{const n=r(e,t);return Il(()=>clearInterval(n))};const a8=O("<slot></slot>"),s8=O("<div></div>");$e("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0}},({domain:e,id:t,redirectUri:r,redirectPath:n,org:i,developmentMode:o,errorMessage:a,audience:s,uri:c,autoLogin:l})=>{let u;q$({id:t},["id"]);const d=new Q9({domain:e,audience:s,uri:c,clientId:t,redirectURI:r||window.location.origin,organization:i,developmentMode:o}),f=new i8(d);o&&console.info("[PhotonClient]: Development mode enabled");const[h]=F(f);return me(async()=>{K$()&&h()?(await h()?.authentication.handleRedirect(),n&&window.location.replace(n)):h()&&(await h()?.authentication.checkSession(),o8(async()=>{await h()?.authentication.checkSession()},6e4,setInterval))}),me(async()=>{if(!h()?.authentication.state.isLoading&&!h()?.authentication.state.isAuthenticated&&l){const p={appState:{}};n&&(p.appState.returnTo=n),await h()?.authentication.login(p)}},[h()?.authentication.state.isAuthenticated,h()?.authentication.state.isLoading]),(()=>{const p=s8.cloneNode(!0),m=u;return typeof m=="function"?ee(m,p):u=p,_(p,z(Hg.Provider,{get value(){return h()},get children(){const v=a8.cloneNode(!0);return v._$owner=P(),v}})),p})()});const ze=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.top-0{top:0}.z-10{z-index:10}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[21px\\]{height:21px}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-screen{height:100vh}.w-\\[16px\\]{width:16px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\\[125px\\]{min-width:125px}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[180px\\]{max-width:180px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.basis-36{flex-basis:9rem}.basis-56{flex-basis:14rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.bg-\\[\\#f7f4f4\\]{--tw-bg-opacity: 1;background-color:rgb(247 244 244/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-52{padding-bottom:13rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-1\\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-28{padding-top:7rem}.pt-4{padding-top:1rem}.pt-\\[3px\\]{padding-top:3px}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.italic{font-style:italic}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:basis-60{flex-basis:15rem}.xs\\:basis-\\[10\\.5rem\\]{flex-basis:10.5rem}.xs\\:flex-row{flex-direction:row}.xs\\:items-center{align-items:center}.xs\\:gap-4{gap:1rem}.xs\\:self-end{align-self:flex-end}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:pl-4{padding-left:1rem}.xs\\:pt-28{padding-top:7rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-wrap{flex-wrap:wrap}.sm\\:items-center{align-items:center}.sm\\:gap-4{gap:1rem}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:mb-0{margin-bottom:0}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:max-w-\\[50\\%\\]{max-width:50%}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:justify-center{justify-content:center}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:pr-2{padding-right:.5rem}}@media (min-width: 1024px){.lg\\:flex-row{flex-direction:row}.lg\\:pt-20{padding-top:5rem}}
738
+ `;class i8{sdk;setStore;store;authentication;getSDK;clinical;constructor(t){this.sdk=t;const[r,n]=gn({authentication:{isAuthenticated:!1,isInOrg:!1,permissions:[],isLoading:!0,error:void 0,user:void 0},catalog:{isLoading:!1,treatments:[],templates:[]},catalogs:{isLoading:!1,catalogs:[]},dispenseUnits:{isLoading:!1,dispenseUnits:new Array},patients:{isLoading:!1,patients:[],finished:!1},patient:{isLoading:!1,patient:void 0},prescription:{isLoading:!1,errors:[],error:void 0,data:void 0}});this.setStore=n,this.store=r,this.authentication={state:r.authentication,handleRedirect:async i=>{try{const o=await this.sdk.authentication.handleRedirect(i);r8(o?.appState)}catch(o){const s=new URLSearchParams(window.location.search).get("error_description");o.message.includes("must be an organization id")?this.setStore("authentication",{...this.store.authentication,error:"The provided organization id is invalid or does not exist"}):s?.includes("is not part of the org")?this.setStore("authentication",{...this.store.authentication,error:"User is not authorized",isLoading:!1}):this.setStore("authentication",{...this.store.authentication,error:o.message})}},checkSession:this.checkSession.bind(this),login:this.login.bind(this),logout:this.logout.bind(this)},this.getSDK=this._getSDK.bind(this),this.clinical={catalog:{state:r.catalog,getCatalog:this.getCatalog.bind(this)},catalogs:{state:r.catalogs,getCatalogs:this.getCatalogs.bind(this)},dispenseUnits:{state:r.dispenseUnits,getDispenseUnits:this.getDispenseUnits.bind(this)},patients:{state:r.patients,getPatients:this.getPatients.bind(this)},patient:{state:r.patient,getPatient:this.getPatient.bind(this)},prescription:{state:r.prescription,createPrescription:this.createPrescription.bind(this)}}}_getSDK(){return this.sdk}async checkSession(){await this.sdk.authentication.checkSession();const t=await this.sdk.authentication.isAuthenticated();this.setStore("authentication",{...this.store.authentication,isAuthenticated:t});const r=await this.sdk.authentication.getUser(),n=!!this.sdk?.organization&&!!r?.org_id;let i;try{const o=await this.sdk.authentication.getAccessToken();i=Z1(o)?.permissions||[]}catch{i=[]}this.setStore("authentication",{...this.store.authentication,user:r,isLoading:!1,isInOrg:t&&n&&this.sdk.organization===r.org_id,permissions:i||[]})}async login(t={}){await this.sdk.authentication.login(t),await this.checkSession()}async logout(t={}){await this.sdk.authentication.logout(t),this.setStore("authentication",{...this.store.authentication,isAuthenticated:!1,isInOrg:!1,permissions:[],user:void 0})}async getPatients(t){t||(t={}),this.setStore("patients",{...this.store.patients,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatients(t);this.setStore("patients",{...this.store.patients,isLoading:!1,patients:t.clear?r.patients:this.store.patients.patients.concat(r.patients),finished:r.patients.length==0})}async getPatient(t){this.setStore("patient",{...this.store.patient,isLoading:!0});const{data:r}=await this.sdk.clinical.patient.getPatient(t);return this.setStore("patient",{...this.store.patient,isLoading:!1,patient:r.patient}),r.patient}async getCatalog(t){this.setStore("catalog",{...this.store.catalog,isLoading:!0});const{data:r}=await this.sdk.clinical.catalog.getCatalog({id:t.id,fragment:{CatalogTreatmentsFields:n8}});this.setStore("catalog",{...this.store.catalog,isLoading:!1,treatments:r.catalog.treatments.map(n=>n)||[],templates:r.catalog.templates.map(n=>n)||[]})}async getCatalogs(){this.setStore("catalogs",{...this.store.catalogs,isLoading:!0});const{data:t}=await this.sdk.clinical.catalog.getCatalogs();this.setStore("catalogs",{...this.store.catalogs,isLoading:!1,catalogs:t.catalogs})}async getDispenseUnits(){this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!0});const{data:t}=await this.sdk.clinical.prescription.getDispenseUnits();this.setStore("dispenseUnits",{...this.store.dispenseUnits,isLoading:!1,dispenseUnits:t.dispenseUnits.map((r,n)=>({id:String(n),...r}))})}async createPrescription(t){this.setStore("prescription",{...this.store.prescription,isLoading:!0});const r=this.sdk.clinical.prescription.createPrescription({});try{const{data:n,errors:i}=await r({variables:t,refetchQueries:[],awaitRefetchQueries:!1});return i&&i.length>0&&this.setStore("prescription",{...this.store.prescription,errors:[...i]}),n?.createPrescription&&this.setStore("prescription",{...this.store.prescription,data:n.createPrescription}),this.setStore("prescription",{...this.store.prescription,isLoading:!1}),{data:n,errors:i}}catch(n){return this.setStore("prescription",{...this.store.prescription,error:n,isLoading:!1}),{data:null,errors:[]}}}}var o8=(e,t,r)=>{const n=r(e,t);return Il(()=>clearInterval(n))};const a8=O("<slot></slot>"),s8=O("<div></div>");$e("photon-client",{domain:{attribute:"domain",value:void 0,reflect:!1,notify:!1,parse:!1},id:{attribute:"id",value:void 0,reflect:!1,notify:!1,parse:!1},redirectUri:{attribute:"redirect-uri",value:void 0,reflect:!1,notify:!1,parse:!1},redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1},org:{attribute:"org",value:void 0,reflect:!1,notify:!1,parse:!1},audience:{attribute:"audience",value:void 0,reflect:!1,notify:!1,parse:!1},uri:{attribute:"uri",value:void 0,reflect:!1,notify:!1,parse:!1},developmentMode:{attribute:"dev-mode",value:!1,reflect:!0,notify:!1,parse:!0},errorMessage:{attribute:"error-message",value:"Oh snap! There was an error loading. Please contact your site's administrator",reflect:!1,notify:!1,parse:!1},autoLogin:{attribute:"auto-login",value:!1,reflect:!1,notify:!1,parse:!0}},({domain:e,id:t,redirectUri:r,redirectPath:n,org:i,developmentMode:o,errorMessage:a,audience:s,uri:c,autoLogin:l})=>{let u;q$({id:t},["id"]);const d=new Q9({domain:e,audience:s,uri:c,clientId:t,redirectURI:r||window.location.origin,organization:i,developmentMode:o}),f=new i8(d);o&&console.info("[PhotonClient]: Development mode enabled");const[h]=F(f);return me(async()=>{K$()&&h()?(await h()?.authentication.handleRedirect(),n&&window.location.replace(n)):h()&&(await h()?.authentication.checkSession(),o8(async()=>{await h()?.authentication.checkSession()},6e4,setInterval))}),me(async()=>{if(!h()?.authentication.state.isLoading&&!h()?.authentication.state.isAuthenticated&&l){const p={appState:{}};n&&(p.appState.returnTo=n),await h()?.authentication.login(p)}},[h()?.authentication.state.isAuthenticated,h()?.authentication.state.isLoading]),(()=>{const p=s8.cloneNode(!0),m=u;return typeof m=="function"?ee(m,p):u=p,_(p,z(Hg.Provider,{get value(){return h()},get children(){const v=a8.cloneNode(!0);return v._$owner=P(),v}})),p})()});const ze=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.left-0{left:0}.z-10{z-index:10}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-7{margin-bottom:1.75rem}.mb-1\\.5{margin-bottom:.375rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.mt-6{margin-top:1.5rem}.mb-3{margin-bottom:.75rem}.mb-8{margin-bottom:2rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-\\[28px\\]{height:28px}.h-full{height:100%}.h-\\[21px\\]{height:21px}.h-screen{height:100vh}.w-full{width:100%}.w-fit{width:-moz-fit-content;width:fit-content}.w-\\[16px\\]{width:16px}.w-screen{width:100vw}.min-w-\\[40\\%\\]{min-width:40%}.min-w-\\[48\\%\\]{min-width:48%}.min-w-\\[125px\\]{min-width:125px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[180px\\]{max-width:180px}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.basis-56{flex-basis:14rem}.basis-36{flex-basis:9rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-3{gap:.75rem}.gap-1{gap:.25rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * (1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.bg-photon-blue{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#f7f4f4\\]{--tw-bg-opacity: 1;background-color:rgb(247 244 244/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.p-4{padding:1rem}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-\\[3px\\]{padding-top:3px}.pt-1{padding-top:.25rem}.pl-2{padding-left:.5rem}.pb-2{padding-bottom:.5rem}.pl-1{padding-left:.25rem}.pb-1{padding-bottom:.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pb-4{padding-bottom:1rem}.pt-28{padding-top:7rem}.pt-4{padding-top:1rem}.pb-52{padding-bottom:13rem}.pl-\\[19\\.75px\\]{padding-left:19.75px}.pb-3{padding-bottom:.75rem}.pb-5{padding-bottom:1.25rem}.pl-4{padding-left:1rem}.pt-1\\.5{padding-top:.375rem}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.font-medium{font-weight:500}.font-light{font-weight:300}.font-normal{font-weight:400}.italic{font-style:italic}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow-card{--tw-shadow: 0px 0px 1px rgba(48, 49, 51, .05),0px 2px 4px rgba(48, 49, 51, .1);--tw-shadow-colored: 0px 0px 1px var(--tw-shadow-color), 0px 2px 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-photon-blue-dark:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.disabled\\:bg-gray-500:disabled{--tw-bg-opacity: 1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}@media (min-width: 475px){.xs\\:mx-auto{margin-left:auto;margin-right:auto}.xs\\:w-fit{width:-moz-fit-content;width:fit-content}.xs\\:min-w-\\[40\\%\\]{min-width:40%}.xs\\:min-w-\\[48\\%\\]{min-width:48%}.xs\\:basis-60{flex-basis:15rem}.xs\\:basis-\\[10\\.5rem\\]{flex-basis:10.5rem}.xs\\:flex-row{flex-direction:row}.xs\\:items-center{align-items:center}.xs\\:gap-4{gap:1rem}.xs\\:self-end{align-self:flex-end}.xs\\:pl-4{padding-left:1rem}.xs\\:pt-28{padding-top:7rem}.xs\\:pb-2{padding-bottom:.5rem}.xs\\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\\:grid{display:grid}.sm\\:w-\\[600px\\]{width:600px}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-wrap{flex-wrap:wrap}.sm\\:items-center{align-items:center}.sm\\:gap-4{gap:1rem}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:mb-0{margin-bottom:0}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:max-w-\\[50\\%\\]{max-width:50%}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:justify-center{justify-content:center}.md\\:px-8{padding-left:2rem;padding-right:2rem}.md\\:py-3{padding-top:.75rem;padding-bottom:.75rem}.md\\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\\:pr-2{padding-right:.5rem}}@media (min-width: 1024px){.lg\\:flex-row{flex-direction:row}.lg\\:pt-20{padding-top:5rem}}
740
739
  `,l8=O("<style></style>"),c8=O('<button class="w-full disabled:bg-gray-500 bg-photon-blue hover:bg-blue-700 text-white h-10 px-4 rounded-lg font-sans hover:bg-photon-blue-dark transition ease-in-out delay-50"></button>');$e("photon-auth-button",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=rt();return me(()=>{t||console.error("[photon-auth-button] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=l8.cloneNode(!0);return _(r,ze),r})(),t?(()=>{const r=c8.cloneNode(!0);return r.$$click=async()=>{const n={appState:{}};e.redirectPath&&(n.appState.returnTo=e.redirectPath),t.authentication.state.isAuthenticated?await t.authentication.logout():await t.authentication.login(n)},_(r,()=>t.authentication.state.isAuthenticated?"Log out":"Log in"),W(()=>r.disabled=t.authentication.state.isLoading),r})():null]});Ni(["click"]);const u8=O("<style></style>"),d8=O(`<div class="flex flex-col w-screen max-w-sm"><svg viewBox="0 0 305 62.61" xmlns="http://www.w3.org/2000/svg" class="h-[28px] pl-[19.75px]"><g fill="#273D52"><path d="M0 54.1169H6.81375V35.7722H18.0826C29.5481 35.7722 34.3963 30.3343 34.3963 18.7378V17.4275C34.3963 5.76548 29.417 0.655167 18.0826 0.655167H0V54.1169ZM6.81375 30.1377V6.28961H18.2792C24.7653 6.28961 27.386 8.9758 27.386 16.0516V20.0481C27.386 27.1895 24.7653 30.1377 18.2792 30.1377H6.81375Z"></path><path d="M70.9593 54.1169H77.773V0.655167H70.9593V24.4378H50.8456V0.655167H44.0319V54.1169H50.8456V30.3343H70.9593V54.1169Z"></path><path d="M107.146 54.772C119.528 54.772 125.687 46.5169 125.687 34.9205V19.7861C125.687 8.25511 119.528 0 107.146 0C94.6974 0 88.5388 8.25511 88.5388 19.7861V34.9205C88.5388 46.5169 94.6974 54.772 107.146 54.772ZM95.5491 35.9687V18.8033C95.5491 10.7448 99.4801 5.89651 107.146 5.89651C114.745 5.89651 118.677 10.7448 118.677 18.8033V35.9687C118.677 44.0928 114.745 48.8755 107.146 48.8755C99.4801 48.8755 95.5491 44.0928 95.5491 35.9687Z"></path><path d="M144.295 54.1169H151.109V6.48616H164.54V0.655167H130.864V6.48616H144.295V54.1169Z"></path><path d="M188.299 54.772C200.682 54.772 206.841 46.5169 206.841 34.9205V19.7861C206.841 8.25511 200.682 0 188.299 0C175.851 0 169.693 8.25511 169.693 19.7861V34.9205C169.693 46.5169 175.851 54.772 188.299 54.772ZM176.703 35.9687V18.8033C176.703 10.7448 180.634 5.89651 188.299 5.89651C195.899 5.89651 199.83 10.7448 199.83 18.8033V35.9687C199.83 44.0928 195.899 48.8755 188.299 48.8755C180.634 48.8755 176.703 44.0928 176.703 35.9687Z"></path><path d="M217.6 54.1169H224.021V14.3482L245.576 54.1169H252.608L248.058 45.1084L245.641 40.4239L224.086 0.655167H217.6V54.1169Z"></path></g><g fill="#B35724"><circle cx="249.798" cy="5.202" r="5.202"></circle></g></svg><h1 class="font-medium text-3xl text-center font-sans mt-6 mb-3">Log in to your account</h1><p class="text-gray-500 font-sans text-center mb-8">Don't have an account? <a href="mailto:rado@photon.health" class="text-teal-600 hover:underline hover:cursor-pointer font-sans font-light">Contact Sales</a></p><photon-auth-button></photon-auth-button></div>`);$e("photon-login",{redirectPath:{attribute:"redirect-path",value:void 0,reflect:!1,notify:!1,parse:!1}},e=>{const t=rt();return me(()=>{t||console.error("[photon-login] No valid PhotonClient instance was provided. Please ensure you are wrapping the element in a photon-client element")}),[(()=>{const r=u8.cloneNode(!0);return _(r,ze),r})(),(()=>{const r=V(()=>document.importNode(d8,!0)),n=r.firstChild,i=n.nextSibling,o=i.nextSibling,a=o.nextSibling;return a._$owner=P(),W(()=>a.redirectPath=e.redirectPath),r})()]});var J1=(e,t)=>{let r;const n=()=>clearTimeout(r);return P()&&Il(n),Object.assign((...o)=>{r!==void 0&&n(),r=setTimeout(()=>e(...o),t)},{clear:n})},Na=window,Hh=Na.ShadowRoot&&(Na.ShadyCSS===void 0||Na.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gh=Symbol(),Hm=new WeakMap,e2=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Gh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Hh&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Hm.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Hm.set(t,e))}return e}toString(){return this.cssText}},f8=e=>new e2(typeof e=="string"?e:e+"",void 0,Gh),ft=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,i,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1],e[0]);return new e2(r,e,Gh)},h8=(e,t)=>{Hh?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{const n=document.createElement("style"),i=Na.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})},Gm=Hh?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return f8(r)})(e):e,Qc,js=window,Qm=js.trustedTypes,p8=Qm?Qm.emptyScript:"",Km=js.reactiveElementPolyfillSupport,To={toAttribute(e,t){switch(t){case Boolean:e=e?p8:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},t2=(e,t)=>t!==e&&(t==t||e==e),Kc={attribute:!0,type:String,converter:To,reflect:!1,hasChanged:t2},ri=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const n=this._$Ep(r,t);n!==void 0&&(this._$Ev.set(n,r),e.push(n))}),e}static createProperty(e,t=Kc){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Kc}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of r)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const n of r)t.unshift(Gm(n))}else e!==void 0&&t.push(Gm(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return h8(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=Kc){var n;const i=this.constructor._$Ep(e,r);if(i!==void 0&&r.reflect===!0){const o=(((n=r.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?r.converter:To).toAttribute(t,r.type);this._$El=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(i!==void 0&&this._$El!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?o.converter:To;this._$El=i,this[i]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||t2)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,i)=>this[i]=n),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var i;return(i=n.hostUpdate)===null||i===void 0?void 0:i.call(n)}),this.update(r)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var n;return(n=r.hostUpdated)===null||n===void 0?void 0:n.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,r)=>this._$EO(r,this[r],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ri.finalized=!0,ri.elementProperties=new Map,ri.elementStyles=[],ri.shadowRootOptions={mode:"open"},Km?.({ReactiveElement:ri}),((Qc=js.reactiveElementVersions)!==null&&Qc!==void 0?Qc:js.reactiveElementVersions=[]).push("1.6.1");var Yc,zs=window,ki=zs.trustedTypes,Ym=ki?ki.createPolicy("lit-html",{createHTML:e=>e}):void 0,en=`lit$${(Math.random()+"").slice(9)}$`,r2="?"+en,m8=`<${r2}>`,Ei=document,No=(e="")=>Ei.createComment(e),Io=e=>e===null||typeof e!="object"&&typeof e!="function",n2=Array.isArray,v8=e=>n2(e)||typeof e?.[Symbol.iterator]=="function",ro=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xm=/-->/g,Zm=/>/g,wn=RegExp(`>|[
741
740
  \f\r](?:([^\\s"'>=/]+)([
742
741
  \f\r]*=[
@@ -857,7 +856,7 @@ lit-html/directives/class-map.js:
857
856
  * Copyright 2018 Google LLC
858
857
  * SPDX-License-Identifier: BSD-3-Clause
859
858
  *)
860
- */var _t=e=>t=>typeof t=="function"?((r,n)=>(customElements.define(r,n),n))(e,t):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(a){customElements.define(r,a)}}})(e,t),z8=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?lr(qe({},t),{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function k(e){return(t,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(e,t,r):z8(e,t)}function Or(e){return k(lr(qe({},e),{state:!0}))}var U8=({finisher:e,descriptor:t})=>(r,n)=>{var i;if(n===void 0){const o=(i=r.originalKey)!==null&&i!==void 0?i:r.key,a=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(r.key)}:lr(qe({},r),{key:o});return e!=null&&(a.finisher=function(s){e(s,o)}),a}{const o=r.constructor;t!==void 0&&Object.defineProperty(r,n,t(n)),e?.(o,n)}};function Ze(e,t){return U8({descriptor:r=>{const n={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(e))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){const i=typeof r=="symbol"?Symbol():"__"+r;n.get=function(){var o,a;return this[i]===void 0&&(this[i]=(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(e))!==null&&a!==void 0?a:null),this[i]}}return n}})}var Jc;((Jc=window.HTMLSlotElement)===null||Jc===void 0?void 0:Jc.prototype.assignedElements)!=null;var ht=class extends yo{emit(e,t){const r=new CustomEvent(e,qe({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}};$([k()],ht.prototype,"dir",2);$([k()],ht.prototype,"lang",2);/*! Bundled license information:
859
+ */var _t=e=>t=>typeof t=="function"?((r,n)=>(customElements.define(r,n),n))(e,t):((r,n)=>{const{kind:i,elements:o}=n;return{kind:i,elements:o,finisher(a){customElements.define(r,a)}}})(e,t),z8=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?lr(qe({},t),{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function k(e){return(t,r)=>r!==void 0?((n,i,o)=>{i.constructor.createProperty(o,n)})(e,t,r):z8(e,t)}function Or(e){return k(lr(qe({},e),{state:!0}))}var U8=({finisher:e,descriptor:t})=>(r,n)=>{var i;if(n===void 0){const o=(i=r.originalKey)!==null&&i!==void 0?i:r.key,a=t!=null?{kind:"method",placement:"prototype",key:o,descriptor:t(r.key)}:lr(qe({},r),{key:o});return e!=null&&(a.finisher=function(s){e(s,o)}),a}{const o=r.constructor;t!==void 0&&Object.defineProperty(r,n,t(n)),e?.(o,n)}};function Xe(e,t){return U8({descriptor:r=>{const n={get(){var i,o;return(o=(i=this.renderRoot)===null||i===void 0?void 0:i.querySelector(e))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(t){const i=typeof r=="symbol"?Symbol():"__"+r;n.get=function(){var o,a;return this[i]===void 0&&(this[i]=(a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(e))!==null&&a!==void 0?a:null),this[i]}}return n}})}var Jc;((Jc=window.HTMLSlotElement)===null||Jc===void 0?void 0:Jc.prototype.assignedElements)!=null;var ht=class extends yo{emit(e,t){const r=new CustomEvent(e,qe({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}};$([k()],ht.prototype,"dir",2);$([k()],ht.prototype,"lang",2);/*! Bundled license information:
861
860
 
862
861
  @lit/reactive-element/decorators/custom-element.js:
863
862
  (**
@@ -960,7 +959,7 @@ lit-html/directives/class-map.js:
960
959
  aria-labelledby="dropdown"
961
960
  ></slot>
962
961
  </sl-popup>
963
- `}};Pt.styles=E8;$([Ze(".dropdown")],Pt.prototype,"popup",2);$([Ze(".dropdown__trigger")],Pt.prototype,"trigger",2);$([Ze(".dropdown__panel")],Pt.prototype,"panel",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"open",2);$([k({reflect:!0})],Pt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2);$([k({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Pt.prototype,"stayOpenOnSelect",2);$([k({attribute:!1})],Pt.prototype,"containingElement",2);$([k({type:Number})],Pt.prototype,"distance",2);$([k({type:Number})],Pt.prototype,"skidding",2);$([k({type:Boolean})],Pt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],Pt.prototype,"handleOpenChange",1);Pt=$([_t("sl-dropdown")],Pt);dr("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});dr("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var V8=ft`
962
+ `}};Pt.styles=E8;$([Xe(".dropdown")],Pt.prototype,"popup",2);$([Xe(".dropdown__trigger")],Pt.prototype,"trigger",2);$([Xe(".dropdown__panel")],Pt.prototype,"panel",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"open",2);$([k({reflect:!0})],Pt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2);$([k({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],Pt.prototype,"stayOpenOnSelect",2);$([k({attribute:!1})],Pt.prototype,"containingElement",2);$([k({type:Number})],Pt.prototype,"distance",2);$([k({type:Number})],Pt.prototype,"skidding",2);$([k({type:Boolean})],Pt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],Pt.prototype,"handleOpenChange",1);Pt=$([_t("sl-dropdown")],Pt);dr("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});dr("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});var V8=ft`
964
963
  ${wt}
965
964
 
966
965
  :host {
@@ -1010,7 +1009,7 @@ lit-html/directives/class-map.js:
1010
1009
  <slot></slot>
1011
1010
  ${this.arrow?Ie`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
1012
1011
  </div>
1013
- `}};Ne.styles=V8;$([Ze(".popup")],Ne.prototype,"popup",2);$([Ze(".popup__arrow")],Ne.prototype,"arrowEl",2);$([k()],Ne.prototype,"anchor",2);$([k({type:Boolean,reflect:!0})],Ne.prototype,"active",2);$([k({reflect:!0})],Ne.prototype,"placement",2);$([k({reflect:!0})],Ne.prototype,"strategy",2);$([k({type:Number})],Ne.prototype,"distance",2);$([k({type:Number})],Ne.prototype,"skidding",2);$([k({type:Boolean})],Ne.prototype,"arrow",2);$([k({attribute:"arrow-placement"})],Ne.prototype,"arrowPlacement",2);$([k({attribute:"arrow-padding",type:Number})],Ne.prototype,"arrowPadding",2);$([k({type:Boolean})],Ne.prototype,"flip",2);$([k({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ne.prototype,"flipFallbackPlacements",2);$([k({attribute:"flip-fallback-strategy"})],Ne.prototype,"flipFallbackStrategy",2);$([k({type:Object})],Ne.prototype,"flipBoundary",2);$([k({attribute:"flip-padding",type:Number})],Ne.prototype,"flipPadding",2);$([k({type:Boolean})],Ne.prototype,"shift",2);$([k({type:Object})],Ne.prototype,"shiftBoundary",2);$([k({attribute:"shift-padding",type:Number})],Ne.prototype,"shiftPadding",2);$([k({attribute:"auto-size"})],Ne.prototype,"autoSize",2);$([k()],Ne.prototype,"sync",2);$([k({type:Object})],Ne.prototype,"autoSizeBoundary",2);$([k({attribute:"auto-size-padding",type:Number})],Ne.prototype,"autoSizePadding",2);Ne=$([_t("sl-popup")],Ne);var _2=ft`
1012
+ `}};Ne.styles=V8;$([Xe(".popup")],Ne.prototype,"popup",2);$([Xe(".popup__arrow")],Ne.prototype,"arrowEl",2);$([k()],Ne.prototype,"anchor",2);$([k({type:Boolean,reflect:!0})],Ne.prototype,"active",2);$([k({reflect:!0})],Ne.prototype,"placement",2);$([k({reflect:!0})],Ne.prototype,"strategy",2);$([k({type:Number})],Ne.prototype,"distance",2);$([k({type:Number})],Ne.prototype,"skidding",2);$([k({type:Boolean})],Ne.prototype,"arrow",2);$([k({attribute:"arrow-placement"})],Ne.prototype,"arrowPlacement",2);$([k({attribute:"arrow-padding",type:Number})],Ne.prototype,"arrowPadding",2);$([k({type:Boolean})],Ne.prototype,"flip",2);$([k({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ne.prototype,"flipFallbackPlacements",2);$([k({attribute:"flip-fallback-strategy"})],Ne.prototype,"flipFallbackStrategy",2);$([k({type:Object})],Ne.prototype,"flipBoundary",2);$([k({attribute:"flip-padding",type:Number})],Ne.prototype,"flipPadding",2);$([k({type:Boolean})],Ne.prototype,"shift",2);$([k({type:Object})],Ne.prototype,"shiftBoundary",2);$([k({attribute:"shift-padding",type:Number})],Ne.prototype,"shiftPadding",2);$([k({attribute:"auto-size"})],Ne.prototype,"autoSize",2);$([k()],Ne.prototype,"sync",2);$([k({type:Object})],Ne.prototype,"autoSizeBoundary",2);$([k({attribute:"auto-size-padding",type:Number})],Ne.prototype,"autoSizePadding",2);Ne=$([_t("sl-popup")],Ne);var _2=ft`
1014
1013
  .form-control .form-control__label {
1015
1014
  display: none;
1016
1015
  }
@@ -1488,7 +1487,7 @@ lit-html/directives/if-defined.js:
1488
1487
  </slot>
1489
1488
  </div>
1490
1489
  </div>
1491
- `}};ce.styles=o6;$([Ze(".input__control")],ce.prototype,"input",2);$([Or()],ce.prototype,"hasFocus",2);$([k()],ce.prototype,"title",2);$([k({reflect:!0})],ce.prototype,"type",2);$([k()],ce.prototype,"name",2);$([k()],ce.prototype,"value",2);$([rc()],ce.prototype,"defaultValue",2);$([k({reflect:!0})],ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"filled",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"pill",2);$([k()],ce.prototype,"label",2);$([k({attribute:"help-text"})],ce.prototype,"helpText",2);$([k({type:Boolean})],ce.prototype,"clearable",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"disabled",2);$([k()],ce.prototype,"placeholder",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"readonly",2);$([k({attribute:"password-toggle",type:Boolean})],ce.prototype,"passwordToggle",2);$([k({attribute:"password-visible",type:Boolean})],ce.prototype,"passwordVisible",2);$([k({attribute:"no-spin-buttons",type:Boolean})],ce.prototype,"noSpinButtons",2);$([k({reflect:!0})],ce.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"required",2);$([k()],ce.prototype,"pattern",2);$([k({type:Number})],ce.prototype,"minlength",2);$([k({type:Number})],ce.prototype,"maxlength",2);$([k({type:Number})],ce.prototype,"min",2);$([k({type:Number})],ce.prototype,"max",2);$([k()],ce.prototype,"step",2);$([k()],ce.prototype,"autocapitalize",2);$([k()],ce.prototype,"autocorrect",2);$([k()],ce.prototype,"autocomplete",2);$([k({type:Boolean})],ce.prototype,"autofocus",2);$([k()],ce.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ce.prototype,"spellcheck",2);$([k()],ce.prototype,"inputmode",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ce.prototype,"handleDisabledChange",1);$([De("step",{waitUntilFirstUpdate:!0})],ce.prototype,"handleStepChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ce.prototype,"handleValueChange",1);ce=$([_t("sl-input")],ce);var Pd="";function tt(e){Pd=e}function f6(){if(!Pd){const e=[...document.getElementsByTagName("script")],t=e.find(r=>r.hasAttribute("data-shoelace"));if(t)tt(t.getAttribute("data-shoelace"));else{const r=e.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let n="";r&&(n=r.getAttribute("src")),tt(n.split("/").slice(0,-1).join("/"))}}return Pd.replace(/\/$/,"")}var h6={name:"default",resolver:e=>`${f6()}/assets/icons/${e}.svg`},p6=h6,bv={caret:`
1490
+ `}};ce.styles=o6;$([Xe(".input__control")],ce.prototype,"input",2);$([Or()],ce.prototype,"hasFocus",2);$([k()],ce.prototype,"title",2);$([k({reflect:!0})],ce.prototype,"type",2);$([k()],ce.prototype,"name",2);$([k()],ce.prototype,"value",2);$([rc()],ce.prototype,"defaultValue",2);$([k({reflect:!0})],ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"filled",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"pill",2);$([k()],ce.prototype,"label",2);$([k({attribute:"help-text"})],ce.prototype,"helpText",2);$([k({type:Boolean})],ce.prototype,"clearable",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"disabled",2);$([k()],ce.prototype,"placeholder",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"readonly",2);$([k({attribute:"password-toggle",type:Boolean})],ce.prototype,"passwordToggle",2);$([k({attribute:"password-visible",type:Boolean})],ce.prototype,"passwordVisible",2);$([k({attribute:"no-spin-buttons",type:Boolean})],ce.prototype,"noSpinButtons",2);$([k({reflect:!0})],ce.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ce.prototype,"required",2);$([k()],ce.prototype,"pattern",2);$([k({type:Number})],ce.prototype,"minlength",2);$([k({type:Number})],ce.prototype,"maxlength",2);$([k({type:Number})],ce.prototype,"min",2);$([k({type:Number})],ce.prototype,"max",2);$([k()],ce.prototype,"step",2);$([k()],ce.prototype,"autocapitalize",2);$([k()],ce.prototype,"autocorrect",2);$([k()],ce.prototype,"autocomplete",2);$([k({type:Boolean})],ce.prototype,"autofocus",2);$([k()],ce.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ce.prototype,"spellcheck",2);$([k()],ce.prototype,"inputmode",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ce.prototype,"handleDisabledChange",1);$([De("step",{waitUntilFirstUpdate:!0})],ce.prototype,"handleStepChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ce.prototype,"handleValueChange",1);ce=$([_t("sl-input")],ce);var Pd="";function tt(e){Pd=e}function f6(){if(!Pd){const e=[...document.getElementsByTagName("script")],t=e.find(r=>r.hasAttribute("data-shoelace"));if(t)tt(t.getAttribute("data-shoelace"));else{const r=e.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src));let n="";r&&(n=r.getAttribute("src")),tt(n.split("/").slice(0,-1).join("/"))}}return Pd.replace(/\/$/,"")}var h6={name:"default",resolver:e=>`${f6()}/assets/icons/${e}.svg`},p6=h6,bv={caret:`
1492
1491
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1493
1492
  <polyline points="6 9 12 15 18 9"></polyline>
1494
1493
  </svg>
@@ -1630,7 +1629,7 @@ lit-html/directives/unsafe-svg.js:
1630
1629
  @keydown=${this.handleKeyDown}
1631
1630
  @mousedown=${this.handleMouseDown}
1632
1631
  ></slot>
1633
- `}};Hs.styles=S6;$([Ze("slot")],Hs.prototype,"defaultSlot",2);Hs=$([_t("sl-menu")],Hs);var k6=ft`
1632
+ `}};Hs.styles=S6;$([Xe("slot")],Hs.prototype,"defaultSlot",2);Hs=$([_t("sl-menu")],Hs);var k6=ft`
1634
1633
  ${wt}
1635
1634
 
1636
1635
  :host {
@@ -1746,7 +1745,7 @@ lit-html/directives/unsafe-svg.js:
1746
1745
  <sl-icon name="chevron-right" library="system" aria-hidden="true"></sl-icon>
1747
1746
  </span>
1748
1747
  </div>
1749
- `}};Zt.styles=k6;$([Ze("slot:not([name])")],Zt.prototype,"defaultSlot",2);$([Ze(".menu-item")],Zt.prototype,"menuItem",2);$([k()],Zt.prototype,"type",2);$([k({type:Boolean,reflect:!0})],Zt.prototype,"checked",2);$([k()],Zt.prototype,"value",2);$([k({type:Boolean,reflect:!0})],Zt.prototype,"disabled",2);$([De("checked")],Zt.prototype,"handleCheckedChange",1);$([De("disabled")],Zt.prototype,"handleDisabledChange",1);$([De("type")],Zt.prototype,"handleTypeChange",1);Zt=$([_t("sl-menu-item")],Zt);var E6=ft`
1748
+ `}};Zt.styles=k6;$([Xe("slot:not([name])")],Zt.prototype,"defaultSlot",2);$([Xe(".menu-item")],Zt.prototype,"menuItem",2);$([k()],Zt.prototype,"type",2);$([k({type:Boolean,reflect:!0})],Zt.prototype,"checked",2);$([k()],Zt.prototype,"value",2);$([k({type:Boolean,reflect:!0})],Zt.prototype,"disabled",2);$([De("checked")],Zt.prototype,"handleCheckedChange",1);$([De("disabled")],Zt.prototype,"handleDisabledChange",1);$([De("type")],Zt.prototype,"handleTypeChange",1);Zt=$([_t("sl-menu-item")],Zt);var E6=ft`
1750
1749
  ${wt}
1751
1750
 
1752
1751
  :host {
@@ -1959,7 +1958,7 @@ lit-html/static.js:
1959
1958
  aria-hidden="true"
1960
1959
  ></sl-icon>
1961
1960
  </${t}>
1962
- `}};Ut.styles=r7;$([Ze(".icon-button")],Ut.prototype,"button",2);$([Or()],Ut.prototype,"hasFocus",2);$([k()],Ut.prototype,"name",2);$([k()],Ut.prototype,"library",2);$([k()],Ut.prototype,"src",2);$([k()],Ut.prototype,"href",2);$([k()],Ut.prototype,"target",2);$([k()],Ut.prototype,"download",2);$([k()],Ut.prototype,"label",2);$([k({type:Boolean,reflect:!0})],Ut.prototype,"disabled",2);Ut=$([_t("sl-icon-button")],Ut);var o7=ft`
1961
+ `}};Ut.styles=r7;$([Xe(".icon-button")],Ut.prototype,"button",2);$([Or()],Ut.prototype,"hasFocus",2);$([k()],Ut.prototype,"name",2);$([k()],Ut.prototype,"library",2);$([k()],Ut.prototype,"src",2);$([k()],Ut.prototype,"href",2);$([k()],Ut.prototype,"target",2);$([k()],Ut.prototype,"download",2);$([k()],Ut.prototype,"label",2);$([k({type:Boolean,reflect:!0})],Ut.prototype,"disabled",2);Ut=$([_t("sl-icon-button")],Ut);var o7=ft`
1963
1962
  ${wt}
1964
1963
 
1965
1964
  :host {
@@ -2076,7 +2075,7 @@ lit-html/static.js:
2076
2075
  ></sl-icon-button>
2077
2076
  `:""}
2078
2077
  </div>
2079
- `}};xr.styles=o7;$([Ze('[part~="base"]')],xr.prototype,"base",2);$([k({type:Boolean,reflect:!0})],xr.prototype,"open",2);$([k({type:Boolean,reflect:!0})],xr.prototype,"closable",2);$([k({reflect:!0})],xr.prototype,"variant",2);$([k({type:Number})],xr.prototype,"duration",2);$([De("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1);$([De("duration")],xr.prototype,"handleDurationChange",1);xr=$([_t("sl-alert")],xr);dr("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});dr("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var a7=ft`
2078
+ `}};xr.styles=o7;$([Xe('[part~="base"]')],xr.prototype,"base",2);$([k({type:Boolean,reflect:!0})],xr.prototype,"open",2);$([k({type:Boolean,reflect:!0})],xr.prototype,"closable",2);$([k({reflect:!0})],xr.prototype,"variant",2);$([k({type:Number})],xr.prototype,"duration",2);$([De("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1);$([De("duration")],xr.prototype,"handleDurationChange",1);xr=$([_t("sl-alert")],xr);dr("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});dr("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});var a7=ft`
2080
2079
  ${wt}
2081
2080
 
2082
2081
  :host {
@@ -2257,8 +2256,8 @@ lit-html/static.js:
2257
2256
 
2258
2257
  <slot part="label" class="switch__label"></slot>
2259
2258
  </label>
2260
- `}};gt.styles=a7;$([Ze('input[type="checkbox"]')],gt.prototype,"input",2);$([Or()],gt.prototype,"hasFocus",2);$([k()],gt.prototype,"title",2);$([k()],gt.prototype,"name",2);$([k()],gt.prototype,"value",2);$([k({reflect:!0})],gt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"checked",2);$([rc("checked")],gt.prototype,"defaultChecked",2);$([k({reflect:!0})],gt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"required",2);$([De("checked",{waitUntilFirstUpdate:!0})],gt.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],gt.prototype,"handleDisabledChange",1);gt=$([_t("sl-switch")],gt);const s7=`.remove-icon-button::part(base):hover,.remove-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.enable-switch{--width: 60px;--height: 32px;--thumb-size: 26px;--sl-color-primary-600: #22c55e}
2261
- `;class l7 extends TypeError{constructor(t,r){let n;const{message:i,...o}=t,{path:a}=t,s=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function c7(e){return mi(e)&&typeof e[Symbol.iterator]=="function"}function mi(e){return typeof e=="object"&&e!=null}function vn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function u7(e){const{done:t,value:r}=e.next();return t?void 0:r}function d7(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${vn(n)}\``}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*Dd(e,t,r,n){c7(e)||(e=[e]);for(const i of e){const o=d7(i,t,r,n);o&&(yield o)}}function*ep(e,t,r){r===void 0&&(r={});const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&t.type!=="type"&&mi(t.schema)&&mi(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let c="valid";for(const l of t.validator(e,s))c="not_valid",yield[l,void 0];for(let[l,u,d]of t.entries(e,s)){const f=ep(u,d,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,u],coerce:o,mask:a});for(const h of f)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):o&&(u=h[1],l===void 0?e=u:e instanceof Map?e.set(l,u):e instanceof Set?e.add(u):mi(e)&&(u!==void 0||l in e)&&(e[l]=u))}if(c!=="not_valid")for(const l of t.refiner(e,s))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,e])}class Ui{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:i,refiner:o,coercer:a=c=>c,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=a,i?this.validator=(c,l)=>{const u=i(c,l);return Dd(u,l,this,c)}:this.validator=()=>[],o?this.refiner=(c,l)=>{const u=o(c,l);return Dd(u,l,this,c)}:this.refiner=()=>[]}assert(t){return k2(t,this)}create(t){return f7(t,this)}is(t){return E2(t,this)}mask(t){return h7(t,this)}validate(t,r){return r===void 0&&(r={}),Qo(t,this,r)}}function k2(e,t){const r=Qo(e,t);if(r[0])throw r[0]}function f7(e,t){const r=Qo(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function h7(e,t){const r=Qo(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function E2(e,t){return!Qo(e,t)[0]}function Qo(e,t,r){r===void 0&&(r={});const n=ep(e,t,r),i=u7(n);return i[0]?[new l7(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function Vi(e,t){return new Ui({type:e,schema:null,validator:t})}function Bi(){return Vi("any",()=>!0)}function p7(e){return new Ui({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${vn(t)}`}})}function m7(e){const t={},r=e.map(n=>vn(n)).join();for(const n of e)t[n]=n;return new Ui({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${vn(n)}`}})}function au(){return Vi("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${vn(e)}`)}function ic(e,t){return new Ui({type:"record",schema:null,*entries(r){if(mi(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return mi(r)||`Expected an object, but received: ${vn(r)}`}})}function zt(){return Vi("string",e=>typeof e=="string"||`Expected a string, but received: ${vn(e)}`)}function Ev(e){const t=e.map(r=>r.type).join(" | ");return new Ui({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||v7()).coercer(r,n)},validator(r,n){const i=[];for(const o of e){const[...a]=ep(r,o,n),[s]=a;if(s[0])for(const[c]of a)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${vn(r)}`,...i]}})}function v7(){return Vi("unknown",()=>!0)}function su(e,t,r){r===void 0&&(r={});const{exclusive:n}=r;return Ko(e,"min",i=>n?i>t:i>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${i}\``)}function Ir(e,t,r){r===void 0&&(r=t);const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Ko(e,"size",o=>{if(typeof o=="number"||o instanceof Date)return t<=o&&o<=r||`${n} ${i} but received \`${o}\``;if(o instanceof Map||o instanceof Set){const{size:a}=o;return t<=a&&a<=r||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=o;return t<=a&&a<=r||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function Ko(e,t,r){return new Ui({...e,*refiner(n,i){yield*e.refiner(n,i);const o=r(n,i),a=Dd(o,i,e,n);for(const s of a)yield{...s,refinement:t}}})}const O2=e=>{const t={};if(e){const d={};for(const f of Object.keys(e))d[f]={value:e[f],error:void 0};e=d}const[r,n]=gn(e||{}),i=({key:d,value:f})=>{n(d,{value:f,error:void 0})},o=d=>{let f=0;for(const h in r)d.includes(h)&&r[h]?.error&&(f+=1);return f>0},a=d=>{for(const f of d)n(f,void 0)};return{store:r,actions:{updateFormValue:i,clearKeys:a,registerValidator:({key:d,validator:f})=>{if(d in t){t[d]=[...t[d],f];return}t[d]=[f]},unRegisterValidator:d=>{delete t[d]},validate:d=>{Object.entries(r).filter(([f])=>d?d.includes(f):!0).forEach(([f,h])=>{t[f]&&t[f].forEach(p=>{try{k2(h?.value,p)}catch(m){for(const v of m.failures())n(f,{value:h?.value,error:v.message})}})})},hasErrors:o,reset:()=>{const d=Object.keys(r);a(d);const f=Object.keys(t);for(const h of f)delete t[h]}}}};function Lt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Re(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Aa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(r){return typeof r}:Aa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aa(e)}function at(e){Re(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Aa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function y7(e,t){Re(2,arguments);var r=at(e).getTime(),n=Lt(t);return new Date(r+n)}var g7={};function Wi(){return g7}function C2(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ov(e){Re(1,arguments);var t=at(e);return t.setHours(0,0,0,0),t}var b7=6e4,P2=36e5,$7=1e3;function w7(e,t){Re(2,arguments);var r=Ov(e),n=Ov(t);return r.getTime()===n.getTime()}function Da(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(r){return typeof r}:Da=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Da(e)}function _7(e){return Re(1,arguments),e instanceof Date||Da(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function x7(e){if(Re(1,arguments),!_7(e)&&typeof e!="number")return!1;var t=at(e);return!isNaN(Number(t))}function S7(e,t){return Re(2,arguments),at(e).getTime()-at(t).getTime()}var Cv={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},k7="trunc";function E7(e){return e?Cv[e]:Cv[k7]}function O7(e,t,r){Re(2,arguments);var n=S7(e,t)/P2;return E7(r?.roundingMethod)(n)}function T2(e,t){Re(2,arguments);var r=Lt(t);return y7(e,-r)}var C7=864e5;function P7(e){Re(1,arguments);var t=at(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/C7)+1}function Ci(e){Re(1,arguments);var t=1,r=at(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function N2(e){Re(1,arguments);var t=at(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Ci(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var a=Ci(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function T7(e){Re(1,arguments);var t=N2(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ci(r);return n}var N7=6048e5;function I2(e){Re(1,arguments);var t=at(e),r=Ci(t).getTime()-T7(t).getTime();return Math.round(r/N7)+1}function jn(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=at(e),h=f.getUTCDay(),p=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function tp(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=at(e),d=u.getUTCFullYear(),f=Wi(),h=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var m=jn(p,t),v=new Date(0);v.setUTCFullYear(d,0,h),v.setUTCHours(0,0,0,0);var y=jn(v,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function I7(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),f=tp(e,t),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var p=jn(h,t);return p}var A7=6048e5;function A2(e,t){Re(1,arguments);var r=at(e),n=jn(r,t).getTime()-I7(r,t).getTime();return Math.round(n/A7)+1}function Se(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var D7={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Se(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Se(n+1,2)},d:function(t,r){return Se(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Se(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Se(t.getUTCHours(),r.length)},m:function(t,r){return Se(t.getUTCMinutes(),r.length)},s:function(t,r){return Se(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Se(o,r.length)}};const Gr=D7;var Xn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},R7={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return Gr.y(t,r)},Y:function(t,r,n,i){var o=tp(t,i),a=o>0?o:1-o;if(r==="YY"){var s=a%100;return Se(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(t,r){var n=N2(t);return Se(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Se(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Se(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Se(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return Gr.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Se(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var o=A2(t,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(t,r,n){var i=I2(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Se(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Gr.d(t,r)},D:function(t,r,n){var i=P7(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Se(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Se(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Se(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),o;switch(i===12?o=Xn.noon:i===0?o=Xn.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),o;switch(i>=17?o=Xn.evening:i>=12?o=Xn.afternoon:i>=4?o=Xn.morning:o=Xn.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Gr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Gr.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Gr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Gr.s(t,r)},S:function(t,r){return Gr.S(t,r)},X:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return Tv(a);case"XXXX":case"XX":return Sn(a);case"XXXXX":case"XXX":default:return Sn(a,":")}},x:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"x":return Tv(a);case"xxxx":case"xx":return Sn(a);case"xxxxx":case"xxx":default:return Sn(a,":")}},O:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Pv(a,":");case"OOOO":default:return"GMT"+Sn(a,":")}},z:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Pv(a,":");case"zzzz":default:return"GMT"+Sn(a,":")}},t:function(t,r,n,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return Se(a,r.length)},T:function(t,r,n,i){var o=i._originalDate||t,a=o.getTime();return Se(a,r.length)}};function Pv(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var a=t||"";return r+String(i)+a+Se(o,2)}function Tv(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Se(Math.abs(e)/60,2)}return Sn(e,t)}function Sn(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),o=Se(Math.floor(i/60),2),a=Se(i%60,2);return n+o+r+a}const F7=R7;var Nv=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},D2=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},L7=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Nv(t,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",Nv(i,r)).replace("{{time}}",D2(o,r))},M7={p:D2,P:L7};const Rd=M7;var j7=["D","DD"],z7=["YY","YYYY"];function R2(e){return j7.indexOf(e)!==-1}function F2(e){return z7.indexOf(e)!==-1}function Qs(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var U7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},V7=function(t,r,n){var i,o=U7[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const B7=V7;function lu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var W7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},q7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G7={date:lu({formats:W7,defaultWidth:"full"}),time:lu({formats:q7,defaultWidth:"full"}),dateTime:lu({formats:H7,defaultWidth:"full"})};const Q7=G7;var K7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Y7=function(t,r,n,i){return K7[t]};const X7=Y7;function oo(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var Z7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},J7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},rS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},nS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iS=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},oS={ordinalNumber:iS,era:oo({values:Z7,defaultWidth:"wide"}),quarter:oo({values:J7,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:oo({values:eS,defaultWidth:"wide"}),day:oo({values:tS,defaultWidth:"wide"}),dayPeriod:oo({values:rS,defaultWidth:"wide",formattingValues:nS,defaultFormattingWidth:"wide"})};const aS=oS;function ao(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?lS(s,function(d){return d.test(a)}):sS(s,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function sS(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function lS(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function cS(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var uS=/^(\d+)(th|st|nd|rd)?/i,dS=/\d+/i,fS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hS={any:[/^b/i,/^(a|c)/i]},pS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mS={any:[/1/i,/2/i,/3/i,/4/i]},vS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},yS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},bS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$S={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_S={ordinalNumber:cS({matchPattern:uS,parsePattern:dS,valueCallback:function(t){return parseInt(t,10)}}),era:ao({matchPatterns:fS,defaultMatchWidth:"wide",parsePatterns:hS,defaultParseWidth:"any"}),quarter:ao({matchPatterns:pS,defaultMatchWidth:"wide",parsePatterns:mS,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ao({matchPatterns:vS,defaultMatchWidth:"wide",parsePatterns:yS,defaultParseWidth:"any"}),day:ao({matchPatterns:gS,defaultMatchWidth:"wide",parsePatterns:bS,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:$S,defaultMatchWidth:"any",parsePatterns:wS,defaultParseWidth:"any"})};const xS=_S;var SS={code:"en-US",formatDistance:B7,formatLong:Q7,formatRelative:X7,localize:aS,match:xS,options:{weekStartsOn:0,firstWeekContainsDate:1}};const L2=SS;var kS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ES=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OS=/^'([^]*?)'?$/,CS=/''/g,PS=/[a-zA-Z]/;function oc(e,t,r){var n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,w;Re(2,arguments);var x=String(t),E=Wi(),S=(n=(i=r?.locale)!==null&&i!==void 0?i:E.locale)!==null&&n!==void 0?n:L2,T=Lt((o=(a=(s=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Lt((h=(p=(m=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(y=r.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:E.weekStartsOn)!==null&&p!==void 0?p:(g=E.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&h!==void 0?h:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var L=at(e);if(!x7(L))throw new RangeError("Invalid time value");var K=C2(L),D=T2(L,K),R={firstWeekContainsDate:T,weekStartsOn:M,locale:S,_originalDate:L},U=x.match(ES).map(function(j){var Y=j[0];if(Y==="p"||Y==="P"){var oe=Rd[Y];return oe(j,S.formatLong)}return j}).join("").match(kS).map(function(j){if(j==="''")return"'";var Y=j[0];if(Y==="'")return TS(j);var oe=F7[Y];if(oe)return!(r!=null&&r.useAdditionalWeekYearTokens)&&F2(j)&&Qs(j,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&R2(j)&&Qs(j,t,String(e)),oe(D,j,S.localize,R);if(Y.match(PS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return j}).join("");return U}function TS(e){var t=e.match(OS);return t?t[1].replace(CS,"'"):e}function NS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(r){return typeof r}:Ra=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ra(e)}function M2(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}}),t&&Fd(e,t)}function Fd(e,t){return Fd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Fd(e,t)}function j2(e){var t=AS();return function(){var n=Ks(e),i;if(t){var o=Ks(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return IS(this,i)}}function IS(e,t){return t&&(Ra(t)==="object"||typeof t=="function")?t:Ld(e)}function Ld(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AS(){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 Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}function Md(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var DS=10,z2=function(){function e(){rp(this,e),Md(this,"subPriority",0)}return np(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),RS=function(e){M2(r,e);var t=j2(r);function r(n,i,o,a,s){var c;return rp(this,r),c=t.call(this),c.value=n,c.validateValue=i,c.setValue=o,c.priority=a,s&&(c.subPriority=s),c}return np(r,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,a){return this.setValue(i,o,this.value,a)}}]),r}(z2),FS=function(e){M2(r,e);var t=j2(r);function r(){var n;rp(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Md(Ld(n),"priority",DS),Md(Ld(n),"subPriority",-1),n}return np(r,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}}]),r}(z2);function LS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MS(e,t,r){return t&&Av(e.prototype,t),r&&Av(e,r),e}var we=function(){function e(){LS(this,e)}return MS(e,[{key:"run",value:function(r,n,i,o){var a=this.parse(r,n,i,o);return a?{setter:new RS(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),e}();function Fa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fa=function(r){return typeof r}:Fa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fa(e)}function jS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zS(e,t,r){return t&&Dv(e.prototype,t),r&&Dv(e,r),e}function US(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}}),t&&jd(e,t)}function jd(e,t){return jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jd(e,t)}function VS(e){var t=WS();return function(){var n=Ys(e),i;if(t){var o=Ys(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return BS(this,i)}}function BS(e,t){return t&&(Fa(t)==="object"||typeof t=="function")?t:zd(e)}function zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WS(){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 Ys(e){return Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ys(e)}function Rv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qS=function(e){US(r,e);var t=VS(r);function r(){var n;jS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Rv(zd(n),"priority",140),Rv(zd(n),"incompatibleTokens",["R","u","t","T"]),n}return zS(r,[{key:"parse",value:function(i,o,a){switch(o){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"});case"GGGGG":return a.era(i,{width:"narrow"});case"GGGG":default:return a.era(i,{width:"wide"})||a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,a){return o.era=a,i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we),Ke={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},mr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ye(e,t){return e&&{value:t(e.value),rest:e.rest}}function je(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function vr(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*P2+o*b7+a*$7),rest:t.slice(r[0].length)}}function U2(e){return je(Ke.anyDigitsSigned,e)}function He(e,t){switch(e){case 1:return je(Ke.singleDigit,t);case 2:return je(Ke.twoDigits,t);case 3:return je(Ke.threeDigits,t);case 4:return je(Ke.fourDigits,t);default:return je(new RegExp("^\\d{1,"+e+"}"),t)}}function Xs(e,t){switch(e){case 1:return je(Ke.singleDigitSigned,t);case 2:return je(Ke.twoDigitsSigned,t);case 3:return je(Ke.threeDigitsSigned,t);case 4:return je(Ke.fourDigitsSigned,t);default:return je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ip(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function V2(e,t){var r=t>0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var o=n+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return r?i:1-i}function B2(e){return e%400===0||e%4===0&&e%100!==0}function La(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?La=function(r){return typeof r}:La=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(e)}function HS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GS(e,t,r){return t&&Fv(e.prototype,t),r&&Fv(e,r),e}function QS(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}}),t&&Ud(e,t)}function Ud(e,t){return Ud=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ud(e,t)}function KS(e){var t=XS();return function(){var n=Zs(e),i;if(t){var o=Zs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return YS(this,i)}}function YS(e,t){return t&&(La(t)==="object"||typeof t=="function")?t:Vd(e)}function Vd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XS(){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 Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(e)}function Lv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ZS=function(e){QS(r,e);var t=KS(r);function r(){var n;HS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Lv(Vd(n),"priority",130),Lv(Vd(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return GS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Ye(He(4,i),s);case"yo":return Ye(a.ordinalNumber(i,{unit:"year"}),s);default:return Ye(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var c=V2(a.year,s);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ma(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(r){return typeof r}:Ma=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ma(e)}function JS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ek(e,t,r){return t&&Mv(e.prototype,t),r&&Mv(e,r),e}function tk(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}}),t&&Bd(e,t)}function Bd(e,t){return Bd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Bd(e,t)}function rk(e){var t=ik();return function(){var n=Js(e),i;if(t){var o=Js(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nk(this,i)}}function nk(e,t){return t&&(Ma(t)==="object"||typeof t=="function")?t:Wd(e)}function Wd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ik(){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 Js(e){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Js(e)}function jv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ok=function(e){tk(r,e);var t=rk(r);function r(){var n;JS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),jv(Wd(n),"priority",130),jv(Wd(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return ek(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Ye(He(4,i),s);case"Yo":return Ye(a.ordinalNumber(i,{unit:"year"}),s);default:return Ye(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a,s){var c=tp(i,s);if(a.isTwoDigitYear){var l=V2(a.year,c);return i.setUTCFullYear(l,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}var u=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(u,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}}]),r}(we);function ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ja=function(r){return typeof r}:ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ja(e)}function ak(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sk(e,t,r){return t&&zv(e.prototype,t),r&&zv(e,r),e}function lk(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}}),t&&qd(e,t)}function qd(e,t){return qd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},qd(e,t)}function ck(e){var t=dk();return function(){var n=el(e),i;if(t){var o=el(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uk(this,i)}}function uk(e,t){return t&&(ja(t)==="object"||typeof t=="function")?t:Hd(e)}function Hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dk(){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 el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},el(e)}function Uv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fk=function(e){lk(r,e);var t=ck(r);function r(){var n;ak(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Uv(Hd(n),"priority",130),Uv(Hd(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return sk(r,[{key:"parse",value:function(i,o){return Xs(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Ci(s)}}]),r}(we);function za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?za=function(r){return typeof r}:za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},za(e)}function hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pk(e,t,r){return t&&Vv(e.prototype,t),r&&Vv(e,r),e}function mk(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}}),t&&Gd(e,t)}function Gd(e,t){return Gd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Gd(e,t)}function vk(e){var t=gk();return function(){var n=tl(e),i;if(t){var o=tl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yk(this,i)}}function yk(e,t){return t&&(za(t)==="object"||typeof t=="function")?t:Qd(e)}function Qd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gk(){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 tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},tl(e)}function Bv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bk=function(e){mk(r,e);var t=vk(r);function r(){var n;hk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Bv(Qd(n),"priority",130),Bv(Qd(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return pk(r,[{key:"parse",value:function(i,o){return Xs(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,a){return i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ua(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ua=function(r){return typeof r}:Ua=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ua(e)}function $k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wk(e,t,r){return t&&Wv(e.prototype,t),r&&Wv(e,r),e}function _k(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}}),t&&Kd(e,t)}function Kd(e,t){return Kd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Kd(e,t)}function xk(e){var t=kk();return function(){var n=rl(e),i;if(t){var o=rl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Sk(this,i)}}function Sk(e,t){return t&&(Ua(t)==="object"||typeof t=="function")?t:Yd(e)}function Yd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kk(){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 rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(e)}function qv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ek=function(e){_k(r,e);var t=xk(r);function r(){var n;$k(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),qv(Yd(n),"priority",120),qv(Yd(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return wk(r,[{key:"parse",value:function(i,o,a){switch(o){case"Q":case"QQ":return He(o.length,i);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(i,{width:"wide",context:"formatting"})||a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Va(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Va=function(r){return typeof r}:Va=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Va(e)}function Ok(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ck(e,t,r){return t&&Hv(e.prototype,t),r&&Hv(e,r),e}function Pk(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}}),t&&Xd(e,t)}function Xd(e,t){return Xd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Xd(e,t)}function Tk(e){var t=Ik();return function(){var n=nl(e),i;if(t){var o=nl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Nk(this,i)}}function Nk(e,t){return t&&(Va(t)==="object"||typeof t=="function")?t:Zd(e)}function Zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ik(){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 nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nl(e)}function Gv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ak=function(e){Pk(r,e);var t=Tk(r);function r(){var n;Ok(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Gv(Zd(n),"priority",120),Gv(Zd(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Ck(r,[{key:"parse",value:function(i,o,a){switch(o){case"q":case"qq":return He(o.length,i);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(i,{width:"wide",context:"standalone"})||a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ba(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ba=function(r){return typeof r}:Ba=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ba(e)}function Dk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rk(e,t,r){return t&&Qv(e.prototype,t),r&&Qv(e,r),e}function Fk(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}}),t&&Jd(e,t)}function Jd(e,t){return Jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Jd(e,t)}function Lk(e){var t=jk();return function(){var n=il(e),i;if(t){var o=il(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Mk(this,i)}}function Mk(e,t){return t&&(Ba(t)==="object"||typeof t=="function")?t:ef(e)}function ef(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jk(){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 il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},il(e)}function Kv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zk=function(e){Fk(r,e);var t=Lk(r);function r(){var n;Dk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Kv(ef(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Kv(ef(n),"priority",110),n}return Rk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"M":return Ye(je(Ke.month,i),s);case"MM":return Ye(He(2,i),s);case"Mo":return Ye(a.ordinalNumber(i,{unit:"month"}),s);case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(i,{width:"wide",context:"formatting"})||a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(r){return typeof r}:Wa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wa(e)}function Uk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vk(e,t,r){return t&&Yv(e.prototype,t),r&&Yv(e,r),e}function Bk(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}}),t&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},tf(e,t)}function Wk(e){var t=Hk();return function(){var n=ol(e),i;if(t){var o=ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return qk(this,i)}}function qk(e,t){return t&&(Wa(t)==="object"||typeof t=="function")?t:rf(e)}function rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hk(){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 ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(e)}function Xv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gk=function(e){Bk(r,e);var t=Wk(r);function r(){var n;Uk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Xv(rf(n),"priority",110),Xv(rf(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return Vk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"L":return Ye(je(Ke.month,i),s);case"LL":return Ye(He(2,i),s);case"Lo":return Ye(a.ordinalNumber(i,{unit:"month"}),s);case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(i,{width:"wide",context:"standalone"})||a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Qk(e,t,r){Re(2,arguments);var n=at(e),i=Lt(t),o=A2(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(r){return typeof r}:qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qa(e)}function Kk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yk(e,t,r){return t&&Zv(e.prototype,t),r&&Zv(e,r),e}function Xk(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}}),t&&nf(e,t)}function nf(e,t){return nf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},nf(e,t)}function Zk(e){var t=eE();return function(){var n=al(e),i;if(t){var o=al(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Jk(this,i)}}function Jk(e,t){return t&&(qa(t)==="object"||typeof t=="function")?t:of(e)}function of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eE(){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 al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},al(e)}function Jv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tE=function(e){Xk(r,e);var t=Zk(r);function r(){var n;Kk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Jv(of(n),"priority",100),Jv(of(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return Yk(r,[{key:"parse",value:function(i,o,a){switch(o){case"w":return je(Ke.week,i);case"wo":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a,s){return jn(Qk(i,a,s),s)}}]),r}(we);function rE(e,t){Re(2,arguments);var r=at(e),n=Lt(t),i=I2(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}function Ha(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(r){return typeof r}:Ha=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ha(e)}function nE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iE(e,t,r){return t&&ey(e.prototype,t),r&&ey(e,r),e}function oE(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}}),t&&af(e,t)}function af(e,t){return af=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},af(e,t)}function aE(e){var t=lE();return function(){var n=sl(e),i;if(t){var o=sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return sE(this,i)}}function sE(e,t){return t&&(Ha(t)==="object"||typeof t=="function")?t:sf(e)}function sf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lE(){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 sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(e)}function ty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cE=function(e){oE(r,e);var t=aE(r);function r(){var n;nE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ty(sf(n),"priority",100),ty(sf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return iE(r,[{key:"parse",value:function(i,o,a){switch(o){case"I":return je(Ke.week,i);case"Io":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a){return Ci(rE(i,a))}}]),r}(we);function Ga(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(r){return typeof r}:Ga=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ga(e)}function uE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t,r){return t&&ry(e.prototype,t),r&&ry(e,r),e}function fE(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}}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},lf(e,t)}function hE(e){var t=mE();return function(){var n=ll(e),i;if(t){var o=ll(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pE(this,i)}}function pE(e,t){return t&&(Ga(t)==="object"||typeof t=="function")?t:Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mE(){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 ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(e)}function cu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vE=[31,28,31,30,31,30,31,31,30,31,30,31],yE=[31,29,31,30,31,30,31,31,30,31,30,31],gE=function(e){fE(r,e);var t=hE(r);function r(){var n;uE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cu(Qa(n),"priority",90),cu(Qa(n),"subPriority",1),cu(Qa(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return dE(r,[{key:"parse",value:function(i,o,a){switch(o){case"d":return je(Ke.date,i);case"do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=B2(a),c=i.getUTCMonth();return s?o>=1&&o<=yE[c]:o>=1&&o<=vE[c]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ka=function(r){return typeof r}:Ka=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ka(e)}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $E(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),e}function wE(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}}),t&&cf(e,t)}function cf(e,t){return cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cf(e,t)}function _E(e){var t=SE();return function(){var n=cl(e),i;if(t){var o=cl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return xE(this,i)}}function xE(e,t){return t&&(Ka(t)==="object"||typeof t=="function")?t:Ya(e)}function Ya(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SE(){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 cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(e)}function uu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var kE=function(e){wE(r,e);var t=_E(r);function r(){var n;bE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),uu(Ya(n),"priority",90),uu(Ya(n),"subpriority",1),uu(Ya(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return $E(r,[{key:"parse",value:function(i,o,a){switch(o){case"D":case"DD":return je(Ke.dayOfYear,i);case"Do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=B2(a);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function op(e,t,r){var n,i,o,a,s,c,l,u;Re(2,arguments);var d=Wi(),f=Lt((n=(i=(o=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=at(e),p=Lt(t),m=h.getUTCDay(),v=p%7,y=(v+7)%7,b=(y<f?7:0)+p-m;return h.setUTCDate(h.getUTCDate()+b),h}function Xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(r){return typeof r}:Xa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xa(e)}function EE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OE(e,t,r){return t&&iy(e.prototype,t),r&&iy(e,r),e}function CE(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}}),t&&uf(e,t)}function uf(e,t){return uf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},uf(e,t)}function PE(e){var t=NE();return function(){var n=ul(e),i;if(t){var o=ul(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return TE(this,i)}}function TE(e,t){return t&&(Xa(t)==="object"||typeof t=="function")?t:df(e)}function df(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NE(){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 ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(e)}function oy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var IE=function(e){CE(r,e);var t=PE(r);function r(){var n;EE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),oy(df(n),"priority",90),oy(df(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return OE(r,[{key:"parse",value:function(i,o,a){switch(o){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Za=function(r){return typeof r}:Za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Za(e)}function AE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DE(e,t,r){return t&&ay(e.prototype,t),r&&ay(e,r),e}function RE(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}}),t&&ff(e,t)}function ff(e,t){return ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ff(e,t)}function FE(e){var t=ME();return function(){var n=dl(e),i;if(t){var o=dl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return LE(this,i)}}function LE(e,t){return t&&(Za(t)==="object"||typeof t=="function")?t:hf(e)}function hf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ME(){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 dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(e)}function sy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jE=function(e){RE(r,e);var t=FE(r);function r(){var n;AE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),sy(hf(n),"priority",90),sy(hf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return DE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"e":case"ee":return Ye(He(o.length,i),c);case"eo":return Ye(a.ordinalNumber(i,{unit:"day"}),c);case"eee":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ja=function(r){return typeof r}:Ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ja(e)}function zE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UE(e,t,r){return t&&ly(e.prototype,t),r&&ly(e,r),e}function VE(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}}),t&&pf(e,t)}function pf(e,t){return pf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},pf(e,t)}function BE(e){var t=qE();return function(){var n=fl(e),i;if(t){var o=fl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return WE(this,i)}}function WE(e,t){return t&&(Ja(t)==="object"||typeof t=="function")?t:mf(e)}function mf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qE(){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 fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(e)}function cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var HE=function(e){VE(r,e);var t=BE(r);function r(){var n;zE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cy(mf(n),"priority",90),cy(mf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return UE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"c":case"cc":return Ye(He(o.length,i),c);case"co":return Ye(a.ordinalNumber(i,{unit:"day"}),c);case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})||a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function GE(e,t){Re(2,arguments);var r=Lt(t);r%7===0&&(r=r-7);var n=1,i=at(e),o=i.getUTCDay(),a=r%7,s=(a+7)%7,c=(s<n?7:0)+r-o;return i.setUTCDate(i.getUTCDate()+c),i}function es(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(r){return typeof r}:es=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},es(e)}function QE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KE(e,t,r){return t&&uy(e.prototype,t),r&&uy(e,r),e}function YE(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}}),t&&vf(e,t)}function vf(e,t){return vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vf(e,t)}function XE(e){var t=JE();return function(){var n=hl(e),i;if(t){var o=hl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ZE(this,i)}}function ZE(e,t){return t&&(es(t)==="object"||typeof t=="function")?t:yf(e)}function yf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JE(){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 hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(e)}function dy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var eO=function(e){YE(r,e);var t=XE(r);function r(){var n;QE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),dy(yf(n),"priority",90),dy(yf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return KE(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l===0?7:l};switch(o){case"i":case"ii":return He(o.length,i);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return Ye(a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ye(a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ye(a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ye(a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,a){return i=GE(i,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(r){return typeof r}:ts=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ts(e)}function tO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rO(e,t,r){return t&&fy(e.prototype,t),r&&fy(e,r),e}function nO(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}}),t&&gf(e,t)}function gf(e,t){return gf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},gf(e,t)}function iO(e){var t=aO();return function(){var n=pl(e),i;if(t){var o=pl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return oO(this,i)}}function oO(e,t){return t&&(ts(t)==="object"||typeof t=="function")?t:bf(e)}function bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aO(){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 pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pl(e)}function hy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sO=function(e){nO(r,e);var t=iO(r);function r(){var n;tO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),hy(bf(n),"priority",80),hy(bf(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return rO(r,[{key:"parse",value:function(i,o,a){switch(o){case"a":case"aa":case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(r){return typeof r}:rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},rs(e)}function lO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function py(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cO(e,t,r){return t&&py(e.prototype,t),r&&py(e,r),e}function uO(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}}),t&&$f(e,t)}function $f(e,t){return $f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$f(e,t)}function dO(e){var t=hO();return function(){var n=ml(e),i;if(t){var o=ml(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return fO(this,i)}}function fO(e,t){return t&&(rs(t)==="object"||typeof t=="function")?t:wf(e)}function wf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hO(){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 ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ml(e)}function my(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pO=function(e){uO(r,e);var t=dO(r);function r(){var n;lO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),my(wf(n),"priority",80),my(wf(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return cO(r,[{key:"parse",value:function(i,o,a){switch(o){case"b":case"bb":case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(r){return typeof r}:ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ns(e)}function mO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vO(e,t,r){return t&&vy(e.prototype,t),r&&vy(e,r),e}function yO(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}}),t&&_f(e,t)}function _f(e,t){return _f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_f(e,t)}function gO(e){var t=$O();return function(){var n=vl(e),i;if(t){var o=vl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return bO(this,i)}}function bO(e,t){return t&&(ns(t)==="object"||typeof t=="function")?t:xf(e)}function xf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $O(){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 vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vl(e)}function yy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wO=function(e){yO(r,e);var t=gO(r);function r(){var n;mO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),yy(xf(n),"priority",80),yy(xf(n),"incompatibleTokens",["a","b","t","T"]),n}return vO(r,[{key:"parse",value:function(i,o,a){switch(o){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function is(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?is=function(r){return typeof r}:is=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},is(e)}function _O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xO(e,t,r){return t&&gy(e.prototype,t),r&&gy(e,r),e}function SO(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}}),t&&Sf(e,t)}function Sf(e,t){return Sf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Sf(e,t)}function kO(e){var t=OO();return function(){var n=yl(e),i;if(t){var o=yl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return EO(this,i)}}function EO(e,t){return t&&(is(t)==="object"||typeof t=="function")?t:kf(e)}function kf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OO(){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 yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yl(e)}function by(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CO=function(e){SO(r,e);var t=kO(r);function r(){var n;_O(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),by(kf(n),"priority",70),by(kf(n),"incompatibleTokens",["H","K","k","t","T"]),n}return xO(r,[{key:"parse",value:function(i,o,a){switch(o){case"h":return je(Ke.hour12h,i);case"ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?os=function(r){return typeof r}:os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},os(e)}function PO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TO(e,t,r){return t&&$y(e.prototype,t),r&&$y(e,r),e}function NO(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}}),t&&Ef(e,t)}function Ef(e,t){return Ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ef(e,t)}function IO(e){var t=DO();return function(){var n=gl(e),i;if(t){var o=gl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return AO(this,i)}}function AO(e,t){return t&&(os(t)==="object"||typeof t=="function")?t:Of(e)}function Of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DO(){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 gl(e){return gl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gl(e)}function wy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RO=function(e){NO(r,e);var t=IO(r);function r(){var n;PO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),wy(Of(n),"priority",70),wy(Of(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return TO(r,[{key:"parse",value:function(i,o,a){switch(o){case"H":return je(Ke.hour23h,i);case"Ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),r}(we);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(r){return typeof r}:as=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as(e)}function FO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function LO(e,t,r){return t&&_y(e.prototype,t),r&&_y(e,r),e}function MO(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}}),t&&Cf(e,t)}function Cf(e,t){return Cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Cf(e,t)}function jO(e){var t=UO();return function(){var n=bl(e),i;if(t){var o=bl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return zO(this,i)}}function zO(e,t){return t&&(as(t)==="object"||typeof t=="function")?t:Pf(e)}function Pf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UO(){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 bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},bl(e)}function xy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VO=function(e){MO(r,e);var t=jO(r);function r(){var n;FO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),xy(Pf(n),"priority",70),xy(Pf(n),"incompatibleTokens",["h","H","k","t","T"]),n}return LO(r,[{key:"parse",value:function(i,o,a){switch(o){case"K":return je(Ke.hour11h,i);case"Ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(r){return typeof r}:ss=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ss(e)}function BO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WO(e,t,r){return t&&Sy(e.prototype,t),r&&Sy(e,r),e}function qO(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}}),t&&Tf(e,t)}function Tf(e,t){return Tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Tf(e,t)}function HO(e){var t=QO();return function(){var n=$l(e),i;if(t){var o=$l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return GO(this,i)}}function GO(e,t){return t&&(ss(t)==="object"||typeof t=="function")?t:Nf(e)}function Nf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QO(){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 $l(e){return $l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},$l(e)}function ky(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var KO=function(e){qO(r,e);var t=HO(r);function r(){var n;BO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ky(Nf(n),"priority",70),ky(Nf(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return WO(r,[{key:"parse",value:function(i,o,a){switch(o){case"k":return je(Ke.hour24h,i);case"ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),r}(we);function ls(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ls=function(r){return typeof r}:ls=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ls(e)}function YO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XO(e,t,r){return t&&Ey(e.prototype,t),r&&Ey(e,r),e}function ZO(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}}),t&&If(e,t)}function If(e,t){return If=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},If(e,t)}function JO(e){var t=tC();return function(){var n=wl(e),i;if(t){var o=wl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return eC(this,i)}}function eC(e,t){return t&&(ls(t)==="object"||typeof t=="function")?t:Af(e)}function Af(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tC(){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 wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wl(e)}function Oy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rC=function(e){ZO(r,e);var t=JO(r);function r(){var n;YO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Oy(Af(n),"priority",60),Oy(Af(n),"incompatibleTokens",["t","T"]),n}return XO(r,[{key:"parse",value:function(i,o,a){switch(o){case"m":return je(Ke.minute,i);case"mo":return a.ordinalNumber(i,{unit:"minute"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),r}(we);function cs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cs=function(r){return typeof r}:cs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cs(e)}function nC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iC(e,t,r){return t&&Cy(e.prototype,t),r&&Cy(e,r),e}function oC(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}}),t&&Df(e,t)}function Df(e,t){return Df=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Df(e,t)}function aC(e){var t=lC();return function(){var n=_l(e),i;if(t){var o=_l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return sC(this,i)}}function sC(e,t){return t&&(cs(t)==="object"||typeof t=="function")?t:Rf(e)}function Rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lC(){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 _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_l(e)}function Py(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cC=function(e){oC(r,e);var t=aC(r);function r(){var n;nC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Py(Rf(n),"priority",50),Py(Rf(n),"incompatibleTokens",["t","T"]),n}return iC(r,[{key:"parse",value:function(i,o,a){switch(o){case"s":return je(Ke.second,i);case"so":return a.ordinalNumber(i,{unit:"second"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),r}(we);function us(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?us=function(r){return typeof r}:us=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},us(e)}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dC(e,t,r){return t&&Ty(e.prototype,t),r&&Ty(e,r),e}function fC(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}}),t&&Ff(e,t)}function Ff(e,t){return Ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ff(e,t)}function hC(e){var t=mC();return function(){var n=xl(e),i;if(t){var o=xl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pC(this,i)}}function pC(e,t){return t&&(us(t)==="object"||typeof t=="function")?t:Lf(e)}function Lf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mC(){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 xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xl(e)}function Ny(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vC=function(e){fC(r,e);var t=hC(r);function r(){var n;uC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ny(Lf(n),"priority",30),Ny(Lf(n),"incompatibleTokens",["t","T"]),n}return dC(r,[{key:"parse",value:function(i,o){var a=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Ye(He(o.length,i),a)}},{key:"set",value:function(i,o,a){return i.setUTCMilliseconds(a),i}}]),r}(we);function ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ds=function(r){return typeof r}:ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ds(e)}function yC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gC(e,t,r){return t&&Iy(e.prototype,t),r&&Iy(e,r),e}function bC(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}}),t&&Mf(e,t)}function Mf(e,t){return Mf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Mf(e,t)}function $C(e){var t=_C();return function(){var n=Sl(e),i;if(t){var o=Sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return wC(this,i)}}function wC(e,t){return t&&(ds(t)==="object"||typeof t=="function")?t:jf(e)}function jf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _C(){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 Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Sl(e)}function Ay(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xC=function(e){bC(r,e);var t=$C(r);function r(){var n;yC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ay(jf(n),"priority",10),Ay(jf(n),"incompatibleTokens",["t","T","x"]),n}return gC(r,[{key:"parse",value:function(i,o){switch(o){case"X":return vr(mr.basicOptionalMinutes,i);case"XX":return vr(mr.basic,i);case"XXXX":return vr(mr.basicOptionalSeconds,i);case"XXXXX":return vr(mr.extendedOptionalSeconds,i);case"XXX":default:return vr(mr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(r){return typeof r}:fs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fs(e)}function SC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kC(e,t,r){return t&&Dy(e.prototype,t),r&&Dy(e,r),e}function EC(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}}),t&&zf(e,t)}function zf(e,t){return zf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zf(e,t)}function OC(e){var t=PC();return function(){var n=kl(e),i;if(t){var o=kl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return CC(this,i)}}function CC(e,t){return t&&(fs(t)==="object"||typeof t=="function")?t:Uf(e)}function Uf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PC(){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 kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},kl(e)}function Ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var TC=function(e){EC(r,e);var t=OC(r);function r(){var n;SC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ry(Uf(n),"priority",10),Ry(Uf(n),"incompatibleTokens",["t","T","X"]),n}return kC(r,[{key:"parse",value:function(i,o){switch(o){case"x":return vr(mr.basicOptionalMinutes,i);case"xx":return vr(mr.basic,i);case"xxxx":return vr(mr.basicOptionalSeconds,i);case"xxxxx":return vr(mr.extendedOptionalSeconds,i);case"xxx":default:return vr(mr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(r){return typeof r}:hs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hs(e)}function NC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function IC(e,t,r){return t&&Fy(e.prototype,t),r&&Fy(e,r),e}function AC(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}}),t&&Vf(e,t)}function Vf(e,t){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(e,t)}function DC(e){var t=FC();return function(){var n=El(e),i;if(t){var o=El(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return RC(this,i)}}function RC(e,t){return t&&(hs(t)==="object"||typeof t=="function")?t:Bf(e)}function Bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FC(){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 El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},El(e)}function Ly(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var LC=function(e){AC(r,e);var t=DC(r);function r(){var n;NC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ly(Bf(n),"priority",40),Ly(Bf(n),"incompatibleTokens","*"),n}return IC(r,[{key:"parse",value:function(i){return U2(i)}},{key:"set",value:function(i,o,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),r}(we);function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(r){return typeof r}:ps=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ps(e)}function MC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function My(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jC(e,t,r){return t&&My(e.prototype,t),r&&My(e,r),e}function zC(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}}),t&&Wf(e,t)}function Wf(e,t){return Wf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wf(e,t)}function UC(e){var t=BC();return function(){var n=Ol(e),i;if(t){var o=Ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return VC(this,i)}}function VC(e,t){return t&&(ps(t)==="object"||typeof t=="function")?t:qf(e)}function qf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BC(){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 Ol(e){return Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ol(e)}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var WC=function(e){zC(r,e);var t=UC(r);function r(){var n;MC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),jy(qf(n),"priority",20),jy(qf(n),"incompatibleTokens","*"),n}return jC(r,[{key:"parse",value:function(i){return U2(i)}},{key:"set",value:function(i,o,a){return[new Date(a),{timestampIsSet:!0}]}}]),r}(we),qC={G:new qS,y:new ZS,Y:new ok,R:new fk,u:new bk,Q:new Ek,q:new Ak,M:new zk,L:new Gk,w:new tE,I:new cE,d:new gE,D:new kE,E:new IE,e:new jE,c:new HE,i:new eO,a:new sO,b:new pO,B:new wO,h:new CO,H:new RO,K:new VO,k:new KO,m:new rC,s:new cC,S:new vC,X:new xC,x:new TC,t:new LC,T:new WC};function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(r){return typeof r}:ms=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}function zy(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=HC(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2259
+ `}};gt.styles=a7;$([Xe('input[type="checkbox"]')],gt.prototype,"input",2);$([Or()],gt.prototype,"hasFocus",2);$([k()],gt.prototype,"title",2);$([k()],gt.prototype,"name",2);$([k()],gt.prototype,"value",2);$([k({reflect:!0})],gt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"checked",2);$([rc("checked")],gt.prototype,"defaultChecked",2);$([k({reflect:!0})],gt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],gt.prototype,"required",2);$([De("checked",{waitUntilFirstUpdate:!0})],gt.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],gt.prototype,"handleDisabledChange",1);gt=$([_t("sl-switch")],gt);const s7=`.remove-icon-button::part(base):hover,.remove-icon-button::part(base):focus{--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}.enable-switch{--width: 60px;--height: 32px;--thumb-size: 26px;--sl-color-primary-600: #22c55e}
2260
+ `;class l7 extends TypeError{constructor(t,r){let n;const{message:i,...o}=t,{path:a}=t,s=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function c7(e){return mi(e)&&typeof e[Symbol.iterator]=="function"}function mi(e){return typeof e=="object"&&e!=null}function vn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function u7(e){const{done:t,value:r}=e.next();return t?void 0:r}function d7(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${vn(n)}\``}=e;return{value:n,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*Dd(e,t,r,n){c7(e)||(e=[e]);for(const i of e){const o=d7(i,t,r,n);o&&(yield o)}}function*ep(e,t,r){r===void 0&&(r={});const{path:n=[],branch:i=[e],coerce:o=!1,mask:a=!1}=r,s={path:n,branch:i};if(o&&(e=t.coercer(e,s),a&&t.type!=="type"&&mi(t.schema)&&mi(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let c="valid";for(const l of t.validator(e,s))c="not_valid",yield[l,void 0];for(let[l,u,d]of t.entries(e,s)){const f=ep(u,d,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,u],coerce:o,mask:a});for(const h of f)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):o&&(u=h[1],l===void 0?e=u:e instanceof Map?e.set(l,u):e instanceof Set?e.add(u):mi(e)&&(u!==void 0||l in e)&&(e[l]=u))}if(c!=="not_valid")for(const l of t.refiner(e,s))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,e])}class Ui{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:i,refiner:o,coercer:a=c=>c,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=a,i?this.validator=(c,l)=>{const u=i(c,l);return Dd(u,l,this,c)}:this.validator=()=>[],o?this.refiner=(c,l)=>{const u=o(c,l);return Dd(u,l,this,c)}:this.refiner=()=>[]}assert(t){return k2(t,this)}create(t){return f7(t,this)}is(t){return E2(t,this)}mask(t){return h7(t,this)}validate(t,r){return r===void 0&&(r={}),Qo(t,this,r)}}function k2(e,t){const r=Qo(e,t);if(r[0])throw r[0]}function f7(e,t){const r=Qo(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function h7(e,t){const r=Qo(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function E2(e,t){return!Qo(e,t)[0]}function Qo(e,t,r){r===void 0&&(r={});const n=ep(e,t,r),i=u7(n);return i[0]?[new l7(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function Vi(e,t){return new Ui({type:e,schema:null,validator:t})}function Bi(){return Vi("any",()=>!0)}function p7(e){return new Ui({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${vn(t)}`}})}function m7(e){const t={},r=e.map(n=>vn(n)).join();for(const n of e)t[n]=n;return new Ui({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${vn(n)}`}})}function au(){return Vi("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${vn(e)}`)}function ic(e,t){return new Ui({type:"record",schema:null,*entries(r){if(mi(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return mi(r)||`Expected an object, but received: ${vn(r)}`}})}function zt(){return Vi("string",e=>typeof e=="string"||`Expected a string, but received: ${vn(e)}`)}function Ev(e){const t=e.map(r=>r.type).join(" | ");return new Ui({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||v7()).coercer(r,n)},validator(r,n){const i=[];for(const o of e){const[...a]=ep(r,o,n),[s]=a;if(s[0])for(const[c]of a)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${vn(r)}`,...i]}})}function v7(){return Vi("unknown",()=>!0)}function su(e,t,r){r===void 0&&(r={});const{exclusive:n}=r;return Ko(e,"min",i=>n?i>t:i>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${i}\``)}function Ir(e,t,r){r===void 0&&(r=t);const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Ko(e,"size",o=>{if(typeof o=="number"||o instanceof Date)return t<=o&&o<=r||`${n} ${i} but received \`${o}\``;if(o instanceof Map||o instanceof Set){const{size:a}=o;return t<=a&&a<=r||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=o;return t<=a&&a<=r||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function Ko(e,t,r){return new Ui({...e,*refiner(n,i){yield*e.refiner(n,i);const o=r(n,i),a=Dd(o,i,e,n);for(const s of a)yield{...s,refinement:t}}})}const O2=e=>{const t={};if(e){const d={};for(const f of Object.keys(e))d[f]={value:e[f],error:void 0};e=d}const[r,n]=gn(e||{}),i=({key:d,value:f})=>{n(d,{value:f,error:void 0})},o=d=>{let f=0;for(const h in r)d.includes(h)&&r[h]?.error&&(f+=1);return f>0},a=d=>{for(const f of d)n(f,void 0)};return{store:r,actions:{updateFormValue:i,clearKeys:a,registerValidator:({key:d,validator:f})=>{if(d in t){t[d]=[...t[d],f];return}t[d]=[f]},unRegisterValidator:d=>{delete t[d]},validate:d=>{Object.entries(r).filter(([f])=>d?d.includes(f):!0).forEach(([f,h])=>{t[f]&&t[f].forEach(p=>{try{k2(h?.value,p)}catch(m){for(const v of m.failures())n(f,{value:h?.value,error:v.message})}})})},hasErrors:o,reset:()=>{const d=Object.keys(r);a(d);const f=Object.keys(t);for(const h of f)delete t[h]}}}};function Lt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Re(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Aa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(r){return typeof r}:Aa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Aa(e)}function at(e){Re(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Aa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function y7(e,t){Re(2,arguments);var r=at(e).getTime(),n=Lt(t);return new Date(r+n)}var g7={};function Wi(){return g7}function C2(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ov(e){Re(1,arguments);var t=at(e);return t.setHours(0,0,0,0),t}var b7=6e4,P2=36e5,$7=1e3;function w7(e,t){Re(2,arguments);var r=Ov(e),n=Ov(t);return r.getTime()===n.getTime()}function Da(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(r){return typeof r}:Da=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Da(e)}function _7(e){return Re(1,arguments),e instanceof Date||Da(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function x7(e){if(Re(1,arguments),!_7(e)&&typeof e!="number")return!1;var t=at(e);return!isNaN(Number(t))}function S7(e,t){return Re(2,arguments),at(e).getTime()-at(t).getTime()}var Cv={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},k7="trunc";function E7(e){return e?Cv[e]:Cv[k7]}function O7(e,t,r){Re(2,arguments);var n=S7(e,t)/P2;return E7(r?.roundingMethod)(n)}function T2(e,t){Re(2,arguments);var r=Lt(t);return y7(e,-r)}var C7=864e5;function P7(e){Re(1,arguments);var t=at(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/C7)+1}function Ci(e){Re(1,arguments);var t=1,r=at(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function N2(e){Re(1,arguments);var t=at(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=Ci(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var a=Ci(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function T7(e){Re(1,arguments);var t=N2(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ci(r);return n}var N7=6048e5;function I2(e){Re(1,arguments);var t=at(e),r=Ci(t).getTime()-T7(t).getTime();return Math.round(r/N7)+1}function jn(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=at(e),h=f.getUTCDay(),p=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function tp(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=at(e),d=u.getUTCFullYear(),f=Wi(),h=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var m=jn(p,t),v=new Date(0);v.setUTCFullYear(d,0,h),v.setUTCHours(0,0,0,0);var y=jn(v,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function I7(e,t){var r,n,i,o,a,s,c,l;Re(1,arguments);var u=Wi(),d=Lt((r=(n=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),f=tp(e,t),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var p=jn(h,t);return p}var A7=6048e5;function A2(e,t){Re(1,arguments);var r=at(e),n=jn(r,t).getTime()-I7(r,t).getTime();return Math.round(n/A7)+1}function Se(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var D7={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return Se(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Se(n+1,2)},d:function(t,r){return Se(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Se(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Se(t.getUTCHours(),r.length)},m:function(t,r){return Se(t.getUTCMinutes(),r.length)},s:function(t,r){return Se(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Se(o,r.length)}};const Gr=D7;var Xn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},R7={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return Gr.y(t,r)},Y:function(t,r,n,i){var o=tp(t,i),a=o>0?o:1-o;if(r==="YY"){var s=a%100;return Se(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(t,r){var n=N2(t);return Se(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Se(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Se(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Se(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return Gr.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Se(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var o=A2(t,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(t,r,n){var i=I2(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Se(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Gr.d(t,r)},D:function(t,r,n){var i=P7(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Se(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Se(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Se(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Se(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),o;switch(i===12?o=Xn.noon:i===0?o=Xn.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),o;switch(i>=17?o=Xn.evening:i>=12?o=Xn.afternoon:i>=4?o=Xn.morning:o=Xn.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Gr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Gr.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Se(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Gr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Gr.s(t,r)},S:function(t,r){return Gr.S(t,r)},X:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return Tv(a);case"XXXX":case"XX":return Sn(a);case"XXXXX":case"XXX":default:return Sn(a,":")}},x:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"x":return Tv(a);case"xxxx":case"xx":return Sn(a);case"xxxxx":case"xxx":default:return Sn(a,":")}},O:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Pv(a,":");case"OOOO":default:return"GMT"+Sn(a,":")}},z:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Pv(a,":");case"zzzz":default:return"GMT"+Sn(a,":")}},t:function(t,r,n,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return Se(a,r.length)},T:function(t,r,n,i){var o=i._originalDate||t,a=o.getTime();return Se(a,r.length)}};function Pv(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var a=t||"";return r+String(i)+a+Se(o,2)}function Tv(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Se(Math.abs(e)/60,2)}return Sn(e,t)}function Sn(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),o=Se(Math.floor(i/60),2),a=Se(i%60,2);return n+o+r+a}const F7=R7;var Nv=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},D2=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},L7=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Nv(t,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",Nv(i,r)).replace("{{time}}",D2(o,r))},M7={p:D2,P:L7};const Rd=M7;var j7=["D","DD"],z7=["YY","YYYY"];function R2(e){return j7.indexOf(e)!==-1}function F2(e){return z7.indexOf(e)!==-1}function Qs(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var U7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},V7=function(t,r,n){var i,o=U7[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const B7=V7;function lu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var W7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},q7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G7={date:lu({formats:W7,defaultWidth:"full"}),time:lu({formats:q7,defaultWidth:"full"}),dateTime:lu({formats:H7,defaultWidth:"full"})};const Q7=G7;var K7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Y7=function(t,r,n,i){return K7[t]};const X7=Y7;function oo(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var Z7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},J7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},rS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},nS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iS=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},oS={ordinalNumber:iS,era:oo({values:Z7,defaultWidth:"wide"}),quarter:oo({values:J7,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:oo({values:eS,defaultWidth:"wide"}),day:oo({values:tS,defaultWidth:"wide"}),dayPeriod:oo({values:rS,defaultWidth:"wide",formattingValues:nS,defaultFormattingWidth:"wide"})};const aS=oS;function ao(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?lS(s,function(d){return d.test(a)}):sS(s,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function sS(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function lS(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function cS(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var uS=/^(\d+)(th|st|nd|rd)?/i,dS=/\d+/i,fS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hS={any:[/^b/i,/^(a|c)/i]},pS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mS={any:[/1/i,/2/i,/3/i,/4/i]},vS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},yS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},bS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$S={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_S={ordinalNumber:cS({matchPattern:uS,parsePattern:dS,valueCallback:function(t){return parseInt(t,10)}}),era:ao({matchPatterns:fS,defaultMatchWidth:"wide",parsePatterns:hS,defaultParseWidth:"any"}),quarter:ao({matchPatterns:pS,defaultMatchWidth:"wide",parsePatterns:mS,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ao({matchPatterns:vS,defaultMatchWidth:"wide",parsePatterns:yS,defaultParseWidth:"any"}),day:ao({matchPatterns:gS,defaultMatchWidth:"wide",parsePatterns:bS,defaultParseWidth:"any"}),dayPeriod:ao({matchPatterns:$S,defaultMatchWidth:"any",parsePatterns:wS,defaultParseWidth:"any"})};const xS=_S;var SS={code:"en-US",formatDistance:B7,formatLong:Q7,formatRelative:X7,localize:aS,match:xS,options:{weekStartsOn:0,firstWeekContainsDate:1}};const L2=SS;var kS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ES=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OS=/^'([^]*?)'?$/,CS=/''/g,PS=/[a-zA-Z]/;function oc(e,t,r){var n,i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,w;Re(2,arguments);var x=String(t),E=Wi(),S=(n=(i=r?.locale)!==null&&i!==void 0?i:E.locale)!==null&&n!==void 0?n:L2,T=Lt((o=(a=(s=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&s!==void 0?s:E.firstWeekContainsDate)!==null&&a!==void 0?a:(d=E.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Lt((h=(p=(m=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(y=r.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:E.weekStartsOn)!==null&&p!==void 0?p:(g=E.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&h!==void 0?h:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var L=at(e);if(!x7(L))throw new RangeError("Invalid time value");var K=C2(L),D=T2(L,K),R={firstWeekContainsDate:T,weekStartsOn:M,locale:S,_originalDate:L},U=x.match(ES).map(function(j){var Y=j[0];if(Y==="p"||Y==="P"){var oe=Rd[Y];return oe(j,S.formatLong)}return j}).join("").match(kS).map(function(j){if(j==="''")return"'";var Y=j[0];if(Y==="'")return TS(j);var oe=F7[Y];if(oe)return!(r!=null&&r.useAdditionalWeekYearTokens)&&F2(j)&&Qs(j,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&R2(j)&&Qs(j,t,String(e)),oe(D,j,S.localize,R);if(Y.match(PS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return j}).join("");return U}function TS(e){var t=e.match(OS);return t?t[1].replace(CS,"'"):e}function NS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(r){return typeof r}:Ra=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ra(e)}function M2(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}}),t&&Fd(e,t)}function Fd(e,t){return Fd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Fd(e,t)}function j2(e){var t=AS();return function(){var n=Ks(e),i;if(t){var o=Ks(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return IS(this,i)}}function IS(e,t){return t&&(Ra(t)==="object"||typeof t=="function")?t:Ld(e)}function Ld(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AS(){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 Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function rp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function np(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}function Md(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var DS=10,z2=function(){function e(){rp(this,e),Md(this,"subPriority",0)}return np(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),RS=function(e){M2(r,e);var t=j2(r);function r(n,i,o,a,s){var c;return rp(this,r),c=t.call(this),c.value=n,c.validateValue=i,c.setValue=o,c.priority=a,s&&(c.subPriority=s),c}return np(r,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,a){return this.setValue(i,o,this.value,a)}}]),r}(z2),FS=function(e){M2(r,e);var t=j2(r);function r(){var n;rp(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Md(Ld(n),"priority",DS),Md(Ld(n),"subPriority",-1),n}return np(r,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}}]),r}(z2);function LS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MS(e,t,r){return t&&Av(e.prototype,t),r&&Av(e,r),e}var we=function(){function e(){LS(this,e)}return MS(e,[{key:"run",value:function(r,n,i,o){var a=this.parse(r,n,i,o);return a?{setter:new RS(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(r,n,i){return!0}}]),e}();function Fa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fa=function(r){return typeof r}:Fa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fa(e)}function jS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zS(e,t,r){return t&&Dv(e.prototype,t),r&&Dv(e,r),e}function US(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}}),t&&jd(e,t)}function jd(e,t){return jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jd(e,t)}function VS(e){var t=WS();return function(){var n=Ys(e),i;if(t){var o=Ys(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return BS(this,i)}}function BS(e,t){return t&&(Fa(t)==="object"||typeof t=="function")?t:zd(e)}function zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WS(){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 Ys(e){return Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ys(e)}function Rv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qS=function(e){US(r,e);var t=VS(r);function r(){var n;jS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Rv(zd(n),"priority",140),Rv(zd(n),"incompatibleTokens",["R","u","t","T"]),n}return zS(r,[{key:"parse",value:function(i,o,a){switch(o){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"});case"GGGGG":return a.era(i,{width:"narrow"});case"GGGG":default:return a.era(i,{width:"wide"})||a.era(i,{width:"abbreviated"})||a.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,a){return o.era=a,i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we),Qe={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},mr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ke(e,t){return e&&{value:t(e.value),rest:e.rest}}function je(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function vr(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,i=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(i*P2+o*b7+a*$7),rest:t.slice(r[0].length)}}function U2(e){return je(Qe.anyDigitsSigned,e)}function He(e,t){switch(e){case 1:return je(Qe.singleDigit,t);case 2:return je(Qe.twoDigits,t);case 3:return je(Qe.threeDigits,t);case 4:return je(Qe.fourDigits,t);default:return je(new RegExp("^\\d{1,"+e+"}"),t)}}function Xs(e,t){switch(e){case 1:return je(Qe.singleDigitSigned,t);case 2:return je(Qe.twoDigitsSigned,t);case 3:return je(Qe.threeDigitsSigned,t);case 4:return je(Qe.fourDigitsSigned,t);default:return je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ip(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function V2(e,t){var r=t>0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var o=n+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return r?i:1-i}function B2(e){return e%400===0||e%4===0&&e%100!==0}function La(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?La=function(r){return typeof r}:La=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(e)}function HS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GS(e,t,r){return t&&Fv(e.prototype,t),r&&Fv(e,r),e}function QS(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}}),t&&Ud(e,t)}function Ud(e,t){return Ud=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ud(e,t)}function KS(e){var t=XS();return function(){var n=Zs(e),i;if(t){var o=Zs(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return YS(this,i)}}function YS(e,t){return t&&(La(t)==="object"||typeof t=="function")?t:Vd(e)}function Vd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XS(){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 Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Zs(e)}function Lv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ZS=function(e){QS(r,e);var t=KS(r);function r(){var n;HS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Lv(Vd(n),"priority",130),Lv(Vd(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return GS(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Ke(He(4,i),s);case"yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var c=V2(a.year,s);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ma(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(r){return typeof r}:Ma=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ma(e)}function JS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ek(e,t,r){return t&&Mv(e.prototype,t),r&&Mv(e,r),e}function tk(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}}),t&&Bd(e,t)}function Bd(e,t){return Bd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Bd(e,t)}function rk(e){var t=ik();return function(){var n=Js(e),i;if(t){var o=Js(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return nk(this,i)}}function nk(e,t){return t&&(Ma(t)==="object"||typeof t=="function")?t:Wd(e)}function Wd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ik(){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 Js(e){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Js(e)}function jv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ok=function(e){tk(r,e);var t=rk(r);function r(){var n;JS(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),jv(Wd(n),"priority",130),jv(Wd(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return ek(r,[{key:"parse",value:function(i,o,a){var s=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Ke(He(4,i),s);case"Yo":return Ke(a.ordinalNumber(i,{unit:"year"}),s);default:return Ke(He(o.length,i),s)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,a,s){var c=tp(i,s);if(a.isTwoDigitYear){var l=V2(a.year,c);return i.setUTCFullYear(l,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}var u=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(u,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),jn(i,s)}}]),r}(we);function ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ja=function(r){return typeof r}:ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ja(e)}function ak(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sk(e,t,r){return t&&zv(e.prototype,t),r&&zv(e,r),e}function lk(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}}),t&&qd(e,t)}function qd(e,t){return qd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},qd(e,t)}function ck(e){var t=dk();return function(){var n=el(e),i;if(t){var o=el(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return uk(this,i)}}function uk(e,t){return t&&(ja(t)==="object"||typeof t=="function")?t:Hd(e)}function Hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dk(){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 el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},el(e)}function Uv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fk=function(e){lk(r,e);var t=ck(r);function r(){var n;ak(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Uv(Hd(n),"priority",130),Uv(Hd(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return sk(r,[{key:"parse",value:function(i,o){return Xs(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Ci(s)}}]),r}(we);function za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?za=function(r){return typeof r}:za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},za(e)}function hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pk(e,t,r){return t&&Vv(e.prototype,t),r&&Vv(e,r),e}function mk(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}}),t&&Gd(e,t)}function Gd(e,t){return Gd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Gd(e,t)}function vk(e){var t=gk();return function(){var n=tl(e),i;if(t){var o=tl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yk(this,i)}}function yk(e,t){return t&&(za(t)==="object"||typeof t=="function")?t:Qd(e)}function Qd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gk(){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 tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},tl(e)}function Bv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bk=function(e){mk(r,e);var t=vk(r);function r(){var n;hk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Bv(Qd(n),"priority",130),Bv(Qd(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return pk(r,[{key:"parse",value:function(i,o){return Xs(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,a){return i.setUTCFullYear(a,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ua(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ua=function(r){return typeof r}:Ua=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ua(e)}function $k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wk(e,t,r){return t&&Wv(e.prototype,t),r&&Wv(e,r),e}function _k(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}}),t&&Kd(e,t)}function Kd(e,t){return Kd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Kd(e,t)}function xk(e){var t=kk();return function(){var n=rl(e),i;if(t){var o=rl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Sk(this,i)}}function Sk(e,t){return t&&(Ua(t)==="object"||typeof t=="function")?t:Yd(e)}function Yd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kk(){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 rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},rl(e)}function qv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ek=function(e){_k(r,e);var t=xk(r);function r(){var n;$k(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),qv(Yd(n),"priority",120),qv(Yd(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return wk(r,[{key:"parse",value:function(i,o,a){switch(o){case"Q":case"QQ":return He(o.length,i);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(i,{width:"wide",context:"formatting"})||a.quarter(i,{width:"abbreviated",context:"formatting"})||a.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Va(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Va=function(r){return typeof r}:Va=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Va(e)}function Ok(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ck(e,t,r){return t&&Hv(e.prototype,t),r&&Hv(e,r),e}function Pk(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}}),t&&Xd(e,t)}function Xd(e,t){return Xd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Xd(e,t)}function Tk(e){var t=Ik();return function(){var n=nl(e),i;if(t){var o=nl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Nk(this,i)}}function Nk(e,t){return t&&(Va(t)==="object"||typeof t=="function")?t:Zd(e)}function Zd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ik(){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 nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nl(e)}function Gv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ak=function(e){Pk(r,e);var t=Tk(r);function r(){var n;Ok(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Gv(Zd(n),"priority",120),Gv(Zd(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return Ck(r,[{key:"parse",value:function(i,o,a){switch(o){case"q":case"qq":return He(o.length,i);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(i,{width:"wide",context:"standalone"})||a.quarter(i,{width:"abbreviated",context:"standalone"})||a.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ba(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ba=function(r){return typeof r}:Ba=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ba(e)}function Dk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rk(e,t,r){return t&&Qv(e.prototype,t),r&&Qv(e,r),e}function Fk(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}}),t&&Jd(e,t)}function Jd(e,t){return Jd=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Jd(e,t)}function Lk(e){var t=jk();return function(){var n=il(e),i;if(t){var o=il(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Mk(this,i)}}function Mk(e,t){return t&&(Ba(t)==="object"||typeof t=="function")?t:ef(e)}function ef(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jk(){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 il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},il(e)}function Kv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zk=function(e){Fk(r,e);var t=Lk(r);function r(){var n;Dk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Kv(ef(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Kv(ef(n),"priority",110),n}return Rk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"M":return Ke(je(Qe.month,i),s);case"MM":return Ke(He(2,i),s);case"Mo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(i,{width:"wide",context:"formatting"})||a.month(i,{width:"abbreviated",context:"formatting"})||a.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(r){return typeof r}:Wa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wa(e)}function Uk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vk(e,t,r){return t&&Yv(e.prototype,t),r&&Yv(e,r),e}function Bk(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}}),t&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},tf(e,t)}function Wk(e){var t=Hk();return function(){var n=ol(e),i;if(t){var o=ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return qk(this,i)}}function qk(e,t){return t&&(Wa(t)==="object"||typeof t=="function")?t:rf(e)}function rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hk(){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 ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ol(e)}function Xv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gk=function(e){Bk(r,e);var t=Wk(r);function r(){var n;Uk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Xv(rf(n),"priority",110),Xv(rf(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return Vk(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l-1};switch(o){case"L":return Ke(je(Qe.month,i),s);case"LL":return Ke(He(2,i),s);case"Lo":return Ke(a.ordinalNumber(i,{unit:"month"}),s);case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(i,{width:"wide",context:"standalone"})||a.month(i,{width:"abbreviated",context:"standalone"})||a.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Qk(e,t,r){Re(2,arguments);var n=at(e),i=Lt(t),o=A2(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(r){return typeof r}:qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qa(e)}function Kk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yk(e,t,r){return t&&Zv(e.prototype,t),r&&Zv(e,r),e}function Xk(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}}),t&&nf(e,t)}function nf(e,t){return nf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},nf(e,t)}function Zk(e){var t=eE();return function(){var n=al(e),i;if(t){var o=al(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Jk(this,i)}}function Jk(e,t){return t&&(qa(t)==="object"||typeof t=="function")?t:of(e)}function of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eE(){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 al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},al(e)}function Jv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tE=function(e){Xk(r,e);var t=Zk(r);function r(){var n;Kk(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Jv(of(n),"priority",100),Jv(of(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return Yk(r,[{key:"parse",value:function(i,o,a){switch(o){case"w":return je(Qe.week,i);case"wo":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a,s){return jn(Qk(i,a,s),s)}}]),r}(we);function rE(e,t){Re(2,arguments);var r=at(e),n=Lt(t),i=I2(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}function Ha(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(r){return typeof r}:Ha=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ha(e)}function nE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iE(e,t,r){return t&&ey(e.prototype,t),r&&ey(e,r),e}function oE(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}}),t&&af(e,t)}function af(e,t){return af=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},af(e,t)}function aE(e){var t=lE();return function(){var n=sl(e),i;if(t){var o=sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return sE(this,i)}}function sE(e,t){return t&&(Ha(t)==="object"||typeof t=="function")?t:sf(e)}function sf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lE(){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 sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(e)}function ty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cE=function(e){oE(r,e);var t=aE(r);function r(){var n;nE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ty(sf(n),"priority",100),ty(sf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return iE(r,[{key:"parse",value:function(i,o,a){switch(o){case"I":return je(Qe.week,i);case"Io":return a.ordinalNumber(i,{unit:"week"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,a){return Ci(rE(i,a))}}]),r}(we);function Ga(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(r){return typeof r}:Ga=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ga(e)}function uE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t,r){return t&&ry(e.prototype,t),r&&ry(e,r),e}function fE(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}}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},lf(e,t)}function hE(e){var t=mE();return function(){var n=ll(e),i;if(t){var o=ll(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pE(this,i)}}function pE(e,t){return t&&(Ga(t)==="object"||typeof t=="function")?t:Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mE(){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 ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(e)}function cu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vE=[31,28,31,30,31,30,31,31,30,31,30,31],yE=[31,29,31,30,31,30,31,31,30,31,30,31],gE=function(e){fE(r,e);var t=hE(r);function r(){var n;uE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cu(Qa(n),"priority",90),cu(Qa(n),"subPriority",1),cu(Qa(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return dE(r,[{key:"parse",value:function(i,o,a){switch(o){case"d":return je(Qe.date,i);case"do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=B2(a),c=i.getUTCMonth();return s?o>=1&&o<=yE[c]:o>=1&&o<=vE[c]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ka=function(r){return typeof r}:Ka=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ka(e)}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $E(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),e}function wE(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}}),t&&cf(e,t)}function cf(e,t){return cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cf(e,t)}function _E(e){var t=SE();return function(){var n=cl(e),i;if(t){var o=cl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return xE(this,i)}}function xE(e,t){return t&&(Ka(t)==="object"||typeof t=="function")?t:Ya(e)}function Ya(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SE(){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 cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(e)}function uu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var kE=function(e){wE(r,e);var t=_E(r);function r(){var n;bE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),uu(Ya(n),"priority",90),uu(Ya(n),"subpriority",1),uu(Ya(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return $E(r,[{key:"parse",value:function(i,o,a){switch(o){case"D":case"DD":return je(Qe.dayOfYear,i);case"Do":return a.ordinalNumber(i,{unit:"date"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){var a=i.getUTCFullYear(),s=B2(a);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function op(e,t,r){var n,i,o,a,s,c,l,u;Re(2,arguments);var d=Wi(),f=Lt((n=(i=(o=(a=r?.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=at(e),p=Lt(t),m=h.getUTCDay(),v=p%7,y=(v+7)%7,b=(y<f?7:0)+p-m;return h.setUTCDate(h.getUTCDate()+b),h}function Xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(r){return typeof r}:Xa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xa(e)}function EE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OE(e,t,r){return t&&iy(e.prototype,t),r&&iy(e,r),e}function CE(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}}),t&&uf(e,t)}function uf(e,t){return uf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},uf(e,t)}function PE(e){var t=NE();return function(){var n=ul(e),i;if(t){var o=ul(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return TE(this,i)}}function TE(e,t){return t&&(Xa(t)==="object"||typeof t=="function")?t:df(e)}function df(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NE(){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 ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(e)}function oy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var IE=function(e){CE(r,e);var t=PE(r);function r(){var n;EE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),oy(df(n),"priority",90),oy(df(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return OE(r,[{key:"parse",value:function(i,o,a){switch(o){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Za(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Za=function(r){return typeof r}:Za=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Za(e)}function AE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DE(e,t,r){return t&&ay(e.prototype,t),r&&ay(e,r),e}function RE(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}}),t&&ff(e,t)}function ff(e,t){return ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ff(e,t)}function FE(e){var t=ME();return function(){var n=dl(e),i;if(t){var o=dl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return LE(this,i)}}function LE(e,t){return t&&(Za(t)==="object"||typeof t=="function")?t:hf(e)}function hf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ME(){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 dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(e)}function sy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jE=function(e){RE(r,e);var t=FE(r);function r(){var n;AE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),sy(hf(n),"priority",90),sy(hf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return DE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"e":case"ee":return Ke(He(o.length,i),c);case"eo":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"eee":return a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function Ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ja=function(r){return typeof r}:Ja=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ja(e)}function zE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UE(e,t,r){return t&&ly(e.prototype,t),r&&ly(e,r),e}function VE(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}}),t&&pf(e,t)}function pf(e,t){return pf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},pf(e,t)}function BE(e){var t=qE();return function(){var n=fl(e),i;if(t){var o=fl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return WE(this,i)}}function WE(e,t){return t&&(Ja(t)==="object"||typeof t=="function")?t:mf(e)}function mf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qE(){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 fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(e)}function cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var HE=function(e){VE(r,e);var t=BE(r);function r(){var n;zE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),cy(mf(n),"priority",90),cy(mf(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return UE(r,[{key:"parse",value:function(i,o,a,s){var c=function(u){var d=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+d};switch(o){case"c":case"cc":return Ke(He(o.length,i),c);case"co":return Ke(a.ordinalNumber(i,{unit:"day"}),c);case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})||a.day(i,{width:"abbreviated",context:"standalone"})||a.day(i,{width:"short",context:"standalone"})||a.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=op(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(we);function GE(e,t){Re(2,arguments);var r=Lt(t);r%7===0&&(r=r-7);var n=1,i=at(e),o=i.getUTCDay(),a=r%7,s=(a+7)%7,c=(s<n?7:0)+r-o;return i.setUTCDate(i.getUTCDate()+c),i}function es(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?es=function(r){return typeof r}:es=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},es(e)}function QE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KE(e,t,r){return t&&uy(e.prototype,t),r&&uy(e,r),e}function YE(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}}),t&&vf(e,t)}function vf(e,t){return vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vf(e,t)}function XE(e){var t=JE();return function(){var n=hl(e),i;if(t){var o=hl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ZE(this,i)}}function ZE(e,t){return t&&(es(t)==="object"||typeof t=="function")?t:yf(e)}function yf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JE(){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 hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(e)}function dy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var eO=function(e){YE(r,e);var t=XE(r);function r(){var n;QE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),dy(yf(n),"priority",90),dy(yf(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return KE(r,[{key:"parse",value:function(i,o,a){var s=function(l){return l===0?7:l};switch(o){case"i":case"ii":return He(o.length,i);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return Ke(a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiii":return Ke(a.day(i,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Ke(a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Ke(a.day(i,{width:"wide",context:"formatting"})||a.day(i,{width:"abbreviated",context:"formatting"})||a.day(i,{width:"short",context:"formatting"})||a.day(i,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,a){return i=GE(i,a),i.setUTCHours(0,0,0,0),i}}]),r}(we);function ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(r){return typeof r}:ts=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ts(e)}function tO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rO(e,t,r){return t&&fy(e.prototype,t),r&&fy(e,r),e}function nO(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}}),t&&gf(e,t)}function gf(e,t){return gf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},gf(e,t)}function iO(e){var t=aO();return function(){var n=pl(e),i;if(t){var o=pl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return oO(this,i)}}function oO(e,t){return t&&(ts(t)==="object"||typeof t=="function")?t:bf(e)}function bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aO(){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 pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pl(e)}function hy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sO=function(e){nO(r,e);var t=iO(r);function r(){var n;tO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),hy(bf(n),"priority",80),hy(bf(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return rO(r,[{key:"parse",value:function(i,o,a){switch(o){case"a":case"aa":case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(r){return typeof r}:rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},rs(e)}function lO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function py(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cO(e,t,r){return t&&py(e.prototype,t),r&&py(e,r),e}function uO(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}}),t&&$f(e,t)}function $f(e,t){return $f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$f(e,t)}function dO(e){var t=hO();return function(){var n=ml(e),i;if(t){var o=ml(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return fO(this,i)}}function fO(e,t){return t&&(rs(t)==="object"||typeof t=="function")?t:wf(e)}function wf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hO(){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 ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ml(e)}function my(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pO=function(e){uO(r,e);var t=dO(r);function r(){var n;lO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),my(wf(n),"priority",80),my(wf(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return cO(r,[{key:"parse",value:function(i,o,a){switch(o){case"b":case"bb":case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(r){return typeof r}:ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ns(e)}function mO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vO(e,t,r){return t&&vy(e.prototype,t),r&&vy(e,r),e}function yO(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}}),t&&_f(e,t)}function _f(e,t){return _f=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_f(e,t)}function gO(e){var t=$O();return function(){var n=vl(e),i;if(t){var o=vl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return bO(this,i)}}function bO(e,t){return t&&(ns(t)==="object"||typeof t=="function")?t:xf(e)}function xf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $O(){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 vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vl(e)}function yy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wO=function(e){yO(r,e);var t=gO(r);function r(){var n;mO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),yy(xf(n),"priority",80),yy(xf(n),"incompatibleTokens",["a","b","t","T"]),n}return vO(r,[{key:"parse",value:function(i,o,a){switch(o){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})||a.dayPeriod(i,{width:"abbreviated",context:"formatting"})||a.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,a){return i.setUTCHours(ip(a),0,0,0),i}}]),r}(we);function is(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?is=function(r){return typeof r}:is=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},is(e)}function _O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xO(e,t,r){return t&&gy(e.prototype,t),r&&gy(e,r),e}function SO(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}}),t&&Sf(e,t)}function Sf(e,t){return Sf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Sf(e,t)}function kO(e){var t=OO();return function(){var n=yl(e),i;if(t){var o=yl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return EO(this,i)}}function EO(e,t){return t&&(is(t)==="object"||typeof t=="function")?t:kf(e)}function kf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OO(){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 yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yl(e)}function by(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CO=function(e){SO(r,e);var t=kO(r);function r(){var n;_O(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),by(kf(n),"priority",70),by(kf(n),"incompatibleTokens",["H","K","k","t","T"]),n}return xO(r,[{key:"parse",value:function(i,o,a){switch(o){case"h":return je(Qe.hour12h,i);case"ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?os=function(r){return typeof r}:os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},os(e)}function PO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TO(e,t,r){return t&&$y(e.prototype,t),r&&$y(e,r),e}function NO(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}}),t&&Ef(e,t)}function Ef(e,t){return Ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ef(e,t)}function IO(e){var t=DO();return function(){var n=gl(e),i;if(t){var o=gl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return AO(this,i)}}function AO(e,t){return t&&(os(t)==="object"||typeof t=="function")?t:Of(e)}function Of(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DO(){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 gl(e){return gl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gl(e)}function wy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RO=function(e){NO(r,e);var t=IO(r);function r(){var n;PO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),wy(Of(n),"priority",70),wy(Of(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return TO(r,[{key:"parse",value:function(i,o,a){switch(o){case"H":return je(Qe.hour23h,i);case"Ho":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),r}(we);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(r){return typeof r}:as=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as(e)}function FO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function LO(e,t,r){return t&&_y(e.prototype,t),r&&_y(e,r),e}function MO(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}}),t&&Cf(e,t)}function Cf(e,t){return Cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Cf(e,t)}function jO(e){var t=UO();return function(){var n=bl(e),i;if(t){var o=bl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return zO(this,i)}}function zO(e,t){return t&&(as(t)==="object"||typeof t=="function")?t:Pf(e)}function Pf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UO(){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 bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},bl(e)}function xy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VO=function(e){MO(r,e);var t=jO(r);function r(){var n;FO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),xy(Pf(n),"priority",70),xy(Pf(n),"incompatibleTokens",["h","H","k","t","T"]),n}return LO(r,[{key:"parse",value:function(i,o,a){switch(o){case"K":return je(Qe.hour11h,i);case"Ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(we);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(r){return typeof r}:ss=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ss(e)}function BO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WO(e,t,r){return t&&Sy(e.prototype,t),r&&Sy(e,r),e}function qO(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}}),t&&Tf(e,t)}function Tf(e,t){return Tf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Tf(e,t)}function HO(e){var t=QO();return function(){var n=$l(e),i;if(t){var o=$l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return GO(this,i)}}function GO(e,t){return t&&(ss(t)==="object"||typeof t=="function")?t:Nf(e)}function Nf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QO(){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 $l(e){return $l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},$l(e)}function ky(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var KO=function(e){qO(r,e);var t=HO(r);function r(){var n;BO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),ky(Nf(n),"priority",70),ky(Nf(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return WO(r,[{key:"parse",value:function(i,o,a){switch(o){case"k":return je(Qe.hour24h,i);case"ko":return a.ordinalNumber(i,{unit:"hour"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),r}(we);function ls(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ls=function(r){return typeof r}:ls=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ls(e)}function YO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XO(e,t,r){return t&&Ey(e.prototype,t),r&&Ey(e,r),e}function ZO(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}}),t&&If(e,t)}function If(e,t){return If=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},If(e,t)}function JO(e){var t=tC();return function(){var n=wl(e),i;if(t){var o=wl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return eC(this,i)}}function eC(e,t){return t&&(ls(t)==="object"||typeof t=="function")?t:Af(e)}function Af(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tC(){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 wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wl(e)}function Oy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rC=function(e){ZO(r,e);var t=JO(r);function r(){var n;YO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Oy(Af(n),"priority",60),Oy(Af(n),"incompatibleTokens",["t","T"]),n}return XO(r,[{key:"parse",value:function(i,o,a){switch(o){case"m":return je(Qe.minute,i);case"mo":return a.ordinalNumber(i,{unit:"minute"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),r}(we);function cs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cs=function(r){return typeof r}:cs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cs(e)}function nC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iC(e,t,r){return t&&Cy(e.prototype,t),r&&Cy(e,r),e}function oC(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}}),t&&Df(e,t)}function Df(e,t){return Df=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Df(e,t)}function aC(e){var t=lC();return function(){var n=_l(e),i;if(t){var o=_l(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return sC(this,i)}}function sC(e,t){return t&&(cs(t)==="object"||typeof t=="function")?t:Rf(e)}function Rf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lC(){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 _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_l(e)}function Py(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cC=function(e){oC(r,e);var t=aC(r);function r(){var n;nC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Py(Rf(n),"priority",50),Py(Rf(n),"incompatibleTokens",["t","T"]),n}return iC(r,[{key:"parse",value:function(i,o,a){switch(o){case"s":return je(Qe.second,i);case"so":return a.ordinalNumber(i,{unit:"second"});default:return He(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),r}(we);function us(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?us=function(r){return typeof r}:us=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},us(e)}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ty(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dC(e,t,r){return t&&Ty(e.prototype,t),r&&Ty(e,r),e}function fC(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}}),t&&Ff(e,t)}function Ff(e,t){return Ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ff(e,t)}function hC(e){var t=mC();return function(){var n=xl(e),i;if(t){var o=xl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pC(this,i)}}function pC(e,t){return t&&(us(t)==="object"||typeof t=="function")?t:Lf(e)}function Lf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mC(){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 xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xl(e)}function Ny(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vC=function(e){fC(r,e);var t=hC(r);function r(){var n;uC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ny(Lf(n),"priority",30),Ny(Lf(n),"incompatibleTokens",["t","T"]),n}return dC(r,[{key:"parse",value:function(i,o){var a=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Ke(He(o.length,i),a)}},{key:"set",value:function(i,o,a){return i.setUTCMilliseconds(a),i}}]),r}(we);function ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ds=function(r){return typeof r}:ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ds(e)}function yC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gC(e,t,r){return t&&Iy(e.prototype,t),r&&Iy(e,r),e}function bC(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}}),t&&Mf(e,t)}function Mf(e,t){return Mf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Mf(e,t)}function $C(e){var t=_C();return function(){var n=Sl(e),i;if(t){var o=Sl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return wC(this,i)}}function wC(e,t){return t&&(ds(t)==="object"||typeof t=="function")?t:jf(e)}function jf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _C(){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 Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Sl(e)}function Ay(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xC=function(e){bC(r,e);var t=$C(r);function r(){var n;yC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ay(jf(n),"priority",10),Ay(jf(n),"incompatibleTokens",["t","T","x"]),n}return gC(r,[{key:"parse",value:function(i,o){switch(o){case"X":return vr(mr.basicOptionalMinutes,i);case"XX":return vr(mr.basic,i);case"XXXX":return vr(mr.basicOptionalSeconds,i);case"XXXXX":return vr(mr.extendedOptionalSeconds,i);case"XXX":default:return vr(mr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(r){return typeof r}:fs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fs(e)}function SC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kC(e,t,r){return t&&Dy(e.prototype,t),r&&Dy(e,r),e}function EC(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}}),t&&zf(e,t)}function zf(e,t){return zf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zf(e,t)}function OC(e){var t=PC();return function(){var n=kl(e),i;if(t){var o=kl(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return CC(this,i)}}function CC(e,t){return t&&(fs(t)==="object"||typeof t=="function")?t:Uf(e)}function Uf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PC(){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 kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},kl(e)}function Ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var TC=function(e){EC(r,e);var t=OC(r);function r(){var n;SC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ry(Uf(n),"priority",10),Ry(Uf(n),"incompatibleTokens",["t","T","X"]),n}return kC(r,[{key:"parse",value:function(i,o){switch(o){case"x":return vr(mr.basicOptionalMinutes,i);case"xx":return vr(mr.basic,i);case"xxxx":return vr(mr.basicOptionalSeconds,i);case"xxxxx":return vr(mr.extendedOptionalSeconds,i);case"xxx":default:return vr(mr.extended,i)}}},{key:"set",value:function(i,o,a){return o.timestampIsSet?i:new Date(i.getTime()-a)}}]),r}(we);function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(r){return typeof r}:hs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hs(e)}function NC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function IC(e,t,r){return t&&Fy(e.prototype,t),r&&Fy(e,r),e}function AC(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}}),t&&Vf(e,t)}function Vf(e,t){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(e,t)}function DC(e){var t=FC();return function(){var n=El(e),i;if(t){var o=El(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return RC(this,i)}}function RC(e,t){return t&&(hs(t)==="object"||typeof t=="function")?t:Bf(e)}function Bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FC(){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 El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},El(e)}function Ly(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var LC=function(e){AC(r,e);var t=DC(r);function r(){var n;NC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),Ly(Bf(n),"priority",40),Ly(Bf(n),"incompatibleTokens","*"),n}return IC(r,[{key:"parse",value:function(i){return U2(i)}},{key:"set",value:function(i,o,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),r}(we);function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(r){return typeof r}:ps=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ps(e)}function MC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function My(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jC(e,t,r){return t&&My(e.prototype,t),r&&My(e,r),e}function zC(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}}),t&&Wf(e,t)}function Wf(e,t){return Wf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wf(e,t)}function UC(e){var t=BC();return function(){var n=Ol(e),i;if(t){var o=Ol(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return VC(this,i)}}function VC(e,t){return t&&(ps(t)==="object"||typeof t=="function")?t:qf(e)}function qf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BC(){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 Ol(e){return Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ol(e)}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var WC=function(e){zC(r,e);var t=UC(r);function r(){var n;MC(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o)),jy(qf(n),"priority",20),jy(qf(n),"incompatibleTokens","*"),n}return jC(r,[{key:"parse",value:function(i){return U2(i)}},{key:"set",value:function(i,o,a){return[new Date(a),{timestampIsSet:!0}]}}]),r}(we),qC={G:new qS,y:new ZS,Y:new ok,R:new fk,u:new bk,Q:new Ek,q:new Ak,M:new zk,L:new Gk,w:new tE,I:new cE,d:new gE,D:new kE,E:new IE,e:new jE,c:new HE,i:new eO,a:new sO,b:new pO,B:new wO,h:new CO,H:new RO,K:new VO,k:new KO,m:new rC,s:new cC,S:new vC,X:new xC,x:new TC,t:new LC,T:new WC};function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(r){return typeof r}:ms=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}function zy(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=HC(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2262
2261
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=e[Symbol.iterator]()},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function HC(e,t){if(!!e){if(typeof e=="string")return Uy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uy(e,t)}}function Uy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var GC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KC=/^'([^]*?)'?$/,YC=/''/g,XC=/\S/,ZC=/[a-zA-Z]/;function JC(e,t,r,n){var i,o,a,s,c,l,u,d,f,h,p,m,v,y,b,g,w,x;Re(3,arguments);var E=String(e),S=String(t),T=Wi(),M=(i=(o=n?.locale)!==null&&o!==void 0?o:T.locale)!==null&&i!==void 0?i:L2;if(!M.match)throw new RangeError("locale must contain match property");var L=Lt((a=(s=(c=(l=n?.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&c!==void 0?c:T.firstWeekContainsDate)!==null&&s!==void 0?s:(f=T.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var K=Lt((p=(m=(v=(y=n?.weekStartsOn)!==null&&y!==void 0?y:n==null||(b=n.locale)===null||b===void 0||(g=b.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:T.weekStartsOn)!==null&&m!==void 0?m:(w=T.locale)===null||w===void 0||(x=w.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&p!==void 0?p:0);if(!(K>=0&&K<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(S==="")return E===""?at(r):new Date(NaN);var D={firstWeekContainsDate:L,weekStartsOn:K,locale:M},R=[new FS],U=S.match(QC).map(function(Q){var X=Q[0];if(X in Rd){var ne=Rd[X];return ne(Q,M.formatLong)}return Q}).join("").match(GC),j=[],Y=zy(U),oe;try{var ae=function(){var X=oe.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&F2(X)&&Qs(X,S,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&R2(X)&&Qs(X,S,e);var ne=X[0],ue=qC[ne];if(ue){var de=ue.incompatibleTokens;if(Array.isArray(de)){var Ue=j.find(function(st){return de.includes(st.token)||st.token===ne});if(Ue)throw new RangeError("The format string mustn't contain `".concat(Ue.fullToken,"` and `").concat(X,"` at the same time"))}else if(ue.incompatibleTokens==="*"&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(X,"` and any other token at the same time"));j.push({token:ne,fullToken:X});var Me=ue.run(E,X,M.match,D);if(!Me)return{v:new Date(NaN)};R.push(Me.setter),E=Me.rest}else{if(ne.match(ZC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");if(X==="''"?X="'":ne==="'"&&(X=eP(X)),E.indexOf(X)===0)E=E.slice(X.length);else return{v:new Date(NaN)}}};for(Y.s();!(oe=Y.n()).done;){var xe=ae();if(ms(xe)==="object")return xe.v}}catch(Q){Y.e(Q)}finally{Y.f()}if(E.length>0&&XC.test(E))return new Date(NaN);var _e=R.map(function(Q){return Q.priority}).sort(function(Q,X){return X-Q}).filter(function(Q,X,ne){return ne.indexOf(Q)===X}).map(function(Q){return R.filter(function(X){return X.priority===Q}).sort(function(X,ne){return ne.subPriority-X.subPriority})}).map(function(Q){return Q[0]}),A=at(r);if(isNaN(A.getTime()))return new Date(NaN);var N=T2(A,C2(A)),xt={},St=zy(_e),Mt;try{for(St.s();!(Mt=St.n()).done;){var It=Mt.value;if(!It.validate(N,D))return new Date(NaN);var H=It.set(N,xt,D);Array.isArray(H)?(N=H[0],NS(xt,H[1])):N=H}}catch(Q){St.e(Q)}finally{St.f()}return N}function eP(e){return e.match(KC)[1].replace(YC,"'")}function tP(e){return Re(1,arguments),w7(e,Date.now())}const ot=(e,t)=>Vi("message",r=>E2(r,e)?!0:t),rP=(e,t=r=>JC(r,"yyyy-MM-dd",new Date))=>Vi("between",function(n){return O7(t(n),e)>=0||tP(t(n))}),nP=()=>Ko(zt(),"numericString",e=>e.length===0?!0:/^\d+$/.test(e)),iP=()=>Ko(zt(),"email",e=>e.length===0?!0:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)),Vy=()=>Ko(Bi(),"empty",e=>e===null||e==null);var oP=ft`
2263
2262
  ${wt}
2264
2263
 
@@ -2873,7 +2872,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2873
2872
  ${this.caret?Ia` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
2874
2873
  ${this.loading?Ia`<sl-spinner></sl-spinner>`:""}
2875
2874
  </${t}>
2876
- `}};Ce.styles=oP;$([Ze(".button")],Ce.prototype,"button",2);$([Or()],Ce.prototype,"hasFocus",2);$([Or()],Ce.prototype,"invalid",2);$([k()],Ce.prototype,"title",2);$([k({reflect:!0})],Ce.prototype,"variant",2);$([k({reflect:!0})],Ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"caret",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"loading",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"outline",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"pill",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"circle",2);$([k()],Ce.prototype,"type",2);$([k()],Ce.prototype,"name",2);$([k()],Ce.prototype,"value",2);$([k()],Ce.prototype,"href",2);$([k()],Ce.prototype,"target",2);$([k()],Ce.prototype,"download",2);$([k()],Ce.prototype,"form",2);$([k({attribute:"formaction"})],Ce.prototype,"formAction",2);$([k({attribute:"formenctype"})],Ce.prototype,"formEnctype",2);$([k({attribute:"formmethod"})],Ce.prototype,"formMethod",2);$([k({attribute:"formnovalidate",type:Boolean})],Ce.prototype,"formNoValidate",2);$([k({attribute:"formtarget"})],Ce.prototype,"formTarget",2);$([De("disabled",{waitUntilFirstUpdate:!0})],Ce.prototype,"handleDisabledChange",1);Ce=$([_t("sl-button")],Ce);const aP=O('<photon-checkbox label="Add To Templates" form-name="daw"></photon-checkbox>'),sP=O('<photon-card title="Add Prescription"><div class="flex flex-col gap-3"><photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select><div class="sm:grid sm:grid-cols-2 sm:gap-4"><div><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-med-search-dialog></photon-med-search-dialog></div><div class="py-4 md:py-2"><a class="font-sans text-gray-500 text-sm hover:text-black hover:cursor-pointer">Advanced Search \u2192</a></div></div><div class="md:max-w-[50%] md:pr-2"><photon-datepicker label="Effective Date" required="true"></photon-datepicker></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><div class=""><photon-number-input class="flex-grow flex-1" label="Quantity" required="true" min="1"></photon-number-input><photon-dosage-calculator-dialog></photon-dosage-calculator-dialog><photon-button variant="outline" class="w-fit"><sl-icon slot="suffix" name="calculator"></sl-icon>Dose Calculator</photon-button></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"><photon-button class="w-full xs:w-fit">Add Prescription</photon-button></div></div></div></photon-card>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const lP={treatment:ot(ic(zt(),Bi()),"Please select a treatment..."),dispenseQuantity:ot(su(au(),1),"Quantity must be positive"),daysSupply:ot(su(au(),0),"Days Supply must be at least 0"),refillsInput:ot(su(au(),0),"Refills must be at least 0"),instructions:ot(Ir(zt(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:ot(rP(new Date),"Please choose a date that isn't in the past")},cP=e=>{let t,r;const[n,i]=F(void 0),[o,a]=F(void 0);let s;for(const[c,l]of Object.entries(lP))e.actions.registerValidator({key:c,validator:l});return(()=>{const c=V(()=>document.importNode(sP,!0)),l=c.firstChild,u=l.firstChild,d=u.nextSibling,f=d.firstChild,h=f.firstChild,p=h.nextSibling,m=f.nextSibling,v=m.firstChild,y=d.nextSibling,b=y.firstChild,g=y.nextSibling,w=g.firstChild,x=w.firstChild,E=x.nextSibling,S=E.nextSibling,T=S.firstChild,M=w.nextSibling,L=g.nextSibling,K=L.firstChild,D=K.nextSibling,R=L.nextSibling,U=R.nextSibling,j=U.nextSibling,Y=j.firstChild,oe=Y.firstChild,ae=s;typeof ae=="function"?ee(ae,c):s=c,c._$owner=P(),l.addEventListener("photon-medication-selected",A=>{i(A.detail.medication),e.actions.updateFormValue({key:"treatment",value:A.detail.medication})}),u.addEventListener("photon-treatment-selected",A=>{A.detail.data.__typename==="PrescriptionTemplate"?(e.actions.updateFormValue({key:"treatment",value:A.detail.data.treatment}),A.detail.data.dispenseAsWritten&&e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.data.dispenseAsWritten}),A.detail.data.dispenseQuantity&&e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.data.dispenseQuantity)}),A.detail.data.dispenseUnit&&e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.data.dispenseUnit}),A.detail.data.daysSupply&&e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.data.daysSupply)}),A.detail.data.fillsAllowed&&e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.data.fillsAllowed)-1}),A.detail.data.instructions&&e.actions.updateFormValue({key:"instructions",value:A.detail.data.instructions}),A.detail.data.notes&&e.actions.updateFormValue({key:"notes",value:A.detail.data.notes})):e.actions.updateFormValue({key:"treatment",value:A.detail.data}),e.actions.updateFormValue({key:"catalogId",value:A.detail.catalogId})}),u._$owner=P(),h.addEventListener("photon-checkbox-toggled",A=>e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.checked})),h._$owner=P();const xe=t;typeof xe=="function"?ee(xe,p):t=p,p._$owner=P(),v.$$click=()=>t.open=!0,b.addEventListener("photon-datepicker-selected",A=>e.actions.updateFormValue({key:"effectiveDate",value:A.detail.date})),b._$owner=P(),x.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.input)})}),x._$owner=P();const _e=r;return typeof _e=="function"?ee(_e,E):r=E,E.addEventListener("photon-dose-selected",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.value)}),A.detail.unit==="mL"&&e.actions.updateFormValue({key:"dispenseUnit",value:"Milliliter"})}),E._$owner=P(),S.addEventListener("photon-clicked",()=>{r.open=!0}),S._$owner=P(),T._$owner=P(),M.addEventListener("photon-dispense-unit-selected",A=>e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.dispenseUnit.name})),M._$owner=P(),K.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.input)})}),K._$owner=P(),D.addEventListener("photon-input-changed",A=>e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.input)})),D._$owner=P(),R.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"instructions",value:A.detail.value})),R._$owner=P(),U.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"notes",value:A.detail.value})),U._$owner=P(),_(j,z(re,{get when(){return!e.hideAddToTemplates},get children(){const A=V(()=>document.importNode(aP,!0));return A.addEventListener("photon-checkbox-toggled",N=>e.actions.updateFormValue({key:"addToTemplates",value:N.detail.checked})),A._$owner=P(),W(()=>A.checked=e.store.addToTemplates?.value||!1),A}}),Y),oe.addEventListener("photon-clicked",()=>{const A=["treatment","effectiveDate","dispenseQuantity","daysSupply","refillsInput","instructions"];e.actions.validate(A),e.actions.hasErrors(A)||(e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,catalogId:e.store.catalogId.value??void 0}]}),e.actions.updateFormValue({key:"effectiveDate",value:oc(new Date,"yyyy-MM-dd").toString()}),e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes"]),i(void 0),e.actions.updateFormValue({key:"treatment",value:void 0}),e.actions.updateFormValue({key:"refillsInput",value:0}),e.actions.updateFormValue({key:"dispenseAsWritten",value:!1}),e.actions.updateFormValue({key:"dispenseQuantity",value:1}),e.actions.updateFormValue({key:"daysSupply",value:30}),e.actions.updateFormValue({key:"instructions",value:""}),e.actions.updateFormValue({key:"notes",value:""}))}),oe._$owner=P(),W(A=>{const N=e.store.treatment?.value??void 0,xt=e.store.treatment?.error??!1,St=e.store.treatment?.error,Mt=n(),It=e.store.effectiveDate?.error??!1,H=e.store.effectiveDate?.error,Q=e.store.dispenseQuantity?.error??!1,X=e.store.dispenseQuantity?.error,ne=e.store.treatment?.value??void 0,ue=e.store.dispenseUnit?.value??o()?.name,de=e.store.daysSupply?.error??!1,Ue=e.store.daysSupply?.error,Me=e.store.refillsInput?.error??!1,st=e.store.refillsInput?.error,jt=e.store.instructions?.error??!1,fr=e.store.instructions?.error;return N!==A._v$&&(u.selected=A._v$=N),xt!==A._v$2&&(u.invalid=A._v$2=xt),St!==A._v$3&&(u.helpText=A._v$3=St),Mt!==A._v$4&&(u.offCatalogOption=A._v$4=Mt),It!==A._v$5&&(b.invalid=A._v$5=It),H!==A._v$6&&(b.helpText=A._v$6=H),Q!==A._v$7&&(x.invalid=A._v$7=Q),X!==A._v$8&&(x.helpText=A._v$8=X),ne!==A._v$9&&(E.medication=A._v$9=ne),ue!==A._v$10&&(M.selected=A._v$10=ue),de!==A._v$11&&(K.invalid=A._v$11=de),Ue!==A._v$12&&(K.helpText=A._v$12=Ue),Me!==A._v$13&&(D.invalid=A._v$13=Me),st!==A._v$14&&(D.helpText=A._v$14=st),jt!==A._v$15&&(R.invalid=A._v$15=jt),fr!==A._v$16&&(R.helpText=A._v$16=fr),A},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0}),W(()=>h.checked=e.store.dispenseAsWritten?.value||!1),W(()=>x.value=e.store.dispenseQuantity?.value??1),W(()=>K.value=e.store.daysSupply?.value??30),W(()=>D.value=e.store.refillsInput?.value??0),W(()=>R.value=e.store.instructions?.value),W(()=>U.value=e.store.notes?.value),c})()};Ni(["click"]);const uP=O("<photon-patient-dialog></photon-patient-dialog>"),dP=O('<p class="font-sans text-sm font-medium">Patient Address</p>'),fP=O('<div class="flex flex-col font-sans text-gray-700"><p></p><div class="flex flex-row gap-1"><div class="flex flex-row"><p>,</p><p></p></div><p></p></div></div>'),hP=O('<p class="italic font-sans text-gray-500">Please edit patient and add address</p>'),pP=O('<p class="font-sans text-red-500 text-sm"></p>'),mP=O('<photon-button class="self-end" variant="outline">Edit Patient</photon-button>'),vP=O('<photon-card><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Select Patient</p><photon-patient-select></photon-patient-select></div></photon-card>'),yP=O("<p></p>"),gP=ot(ic(zt(),Bi()),"Please select a patient..."),bP=ot(ic(zt(),Bi()),"Please enter an address for patient..."),$P=e=>{const[t,r]=F(!1),{actions:n}=nc;return e.actions.registerValidator({key:"patient",validator:gP}),e.enableOrder&&e.actions.registerValidator({key:"address",validator:bP}),(()=>{const i=V(()=>document.importNode(vP,!0)),o=i.firstChild,a=o.firstChild,s=a.nextSibling;return i._$owner=P(),s.addEventListener("photon-patient-selected",c=>{e.actions.updateFormValue({key:"patient",value:c.detail.patient}),e.enableOrder&&e.actions.updateFormValue({key:"address",value:c.detail.patient.address})}),s._$owner=P(),_(o,z(re,{get when(){return e.store.patient?.value?.id&&e.enableOrder},get children(){return[(()=>{const c=V(()=>document.importNode(uP,!0));return c.addEventListener("photon-patient-updated",()=>{n.getSelectedPatient(e.client.getSDK(),e.store.patient?.value?.id)}),c._$owner=P(),W(l=>{const u=t(),d=e.store.patient.value.id;return u!==l._v$&&(c.open=l._v$=u),d!==l._v$2&&(c.patientId=l._v$2=d),l},{_v$:void 0,_v$2:void 0}),c})(),z(re,{get when(){return e.store.patient?.value},get children(){return[dP.cloneNode(!0),z(re,{get when(){return e.store.patient.value.address},get children(){const c=fP.cloneNode(!0),l=c.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,h=f.firstChild,p=f.nextSibling,m=d.nextSibling;return _(l,()=>e.store.patient.value.address.street1),_(c,(()=>{const v=pe(()=>!!e.store.patient.value.address.street2);return()=>v()?(()=>{const y=yP.cloneNode(!0);return _(y,()=>e.store.patient.value.address.street2),y})():null})(),u),_(f,()=>e.store.patient.value.address.city,h),_(p,()=>e.store.patient.value.address.state),_(m,()=>e.store.patient.value.address.postalCode),c}}),z(re,{get when(){return!e.store.patient.value.address},get children(){return[(()=>{const c=hP.cloneNode(!0);return W(l=>{const u=!!e.store.address.error,d=!!e.store.address.error,f=!!e.store.address.error,h=!!e.store.address.error;return u!==l._v$3&&c.classList.toggle("p-2",l._v$3=u),d!==l._v$4&&c.classList.toggle("border-red-500",l._v$4=d),f!==l._v$5&&c.classList.toggle("border-2",l._v$5=f),h!==l._v$6&&c.classList.toggle("rounded",l._v$6=h),l},{_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),c})(),z(re,{get when(){return e.store.address.error},get children(){const c=pP.cloneNode(!0);return _(c,()=>e.store.address.error),c}})]}})]}}),(()=>{const c=V(()=>document.importNode(mP,!0));return c.addEventListener("photon-clicked",()=>{r(!1),r(!0)}),c._$owner=P(),c})()]}}),null),W(c=>{const l=e.store.patient?.error??!1,u=e.store.patient?.error,d=e.store.patient?.value?.id??e.patientId,f=e.client.getSDK();return l!==c._v$7&&(s.invalid=c._v$7=l),u!==c._v$8&&(s.helpText=c._v$8=u),d!==c._v$9&&(s.selected=c._v$9=d),f!==c._v$10&&(s.sdk=c._v$10=f),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),i})()},wP=O('<p class="font-sans text-red-500 text-sm pt-1.5"></p>'),_P=O('<div><photon-card><p class="italic font-sans text-gray-500">No prescriptions pending</p></photon-card></div>'),xP=O('<div><photon-card><div class="w-full flex justify-between"><p class="italic font-sans text-gray-500">Loading Prescriptions...</p><sl-spinner style="font-size: 1rem;"></sl-spinner></div></photon-card></div>'),SP=O('<photon-card><photon-dialog label="Delete pending prescription?" confirm-text="Yes, Delete" cancel-text="No, Cancel"><p class="font-sans text-lg xs:text-base">Deleting this prescription will remove it from your pending prescriptions. This action cannot be undone.</p></photon-dialog><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Pending Prescriptions</p></div></photon-card>'),kP=O('<photon-card><div class="flex flex-row items-center"><div class="flex flex-col flex-grow" style="max-width: calc(100% - 36px);"><p class="font-medium font-sans"></p><p class="font-normal text-gray-700 overflow-hidden whitespace-nowrap overflow-ellipsis font-sans"> <!>, <!> refills - </p></div><div><sl-icon-button class="self-end text-xl remove-icon-button" name="trash3"></sl-icon-button></div></div></photon-card>'),EP=ot(Ir(p7(Bi()),1,1/0),"You must add at least 1 Prescription"),OP=e=>{const[t,r]=F(!1),[n,i]=F();return e.actions.registerValidator({key:"draftPrescriptions",validator:EP}),(()=>{const o=V(()=>document.importNode(SP,!0)),a=o.firstChild,s=a.nextSibling;return s.firstChild,o._$owner=P(),a.addEventListener("photon-dialog-confirmed",()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:e.store.draftPrescriptions.value.filter(c=>c.id!==n())}),r(!1),i(void 0)}),a.addEventListener("photon-dialog-canceled",()=>{r(!1),i(void 0)}),a._$owner=P(),_(s,z(re,{get when(){return(e.store.draftPrescriptions?.value??[]).length===0&&!e.isLoading},get children(){const c=V(()=>document.importNode(_P,!0)),l=c.firstChild;return l._$owner=P(),_(c,z(re,{get when(){return e.store.draftPrescriptions?.error},get children(){const u=wP.cloneNode(!0);return _(u,()=>e.store.draftPrescriptions?.error),u}}),null),W(()=>l.invalid=e.store.draftPrescriptions?.error),c}}),null),_(s,z(re,{get when(){return e.isLoading},get children(){const c=V(()=>document.importNode(xP,!0)),l=c.firstChild,u=l.firstChild,d=u.firstChild,f=d.nextSibling;return l._$owner=P(),f._$owner=P(),c}}),null),_(s,z(Rl,{get each(){return e.store.draftPrescriptions?.value??[]},children:c=>(()=>{const l=V(()=>document.importNode(kP,!0)),u=l.firstChild,d=u.firstChild,f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling;y.nextSibling;const b=d.nextSibling,g=b.firstChild;return l._$owner=P(),_(f,()=>c.treatment.name),_(h,()=>c.dispenseQuantity,p),_(h,()=>c.dispenseUnit,m),_(h,()=>c.refillsInput,y),_(h,()=>c.instructions,null),g.$$click=()=>{r(!0),i(c.id)},g._$owner=P(),l})()}),null),W(()=>a.open=t()),o})()};Ni(["click"]);const CP=O('<photon-card><p class="italic font-sans text-gray-500">Please select a patient</p></photon-card>'),PP=O('<photon-card><p class="italic font-sans text-gray-500">Please update patient address in order to select pharmacy</p></photon-card>'),TP=O('<div class="flex flex-col gap-2"><p class="font-sans text-sm font-medium flex-grow">Search for a Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></div>'),NP=O('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Select Pharmacy</p></div></div></photon-card>'),IP=ot(ic(zt(),Bi()),"Please select or search for a pharmacy..."),AP=e=>(e.actions.registerValidator({key:"pharmacy",validator:IP}),(()=>{const t=V(()=>document.importNode(NP,!0)),r=t.firstChild;return r.firstChild,t._$owner=P(),_(r,z(re,{get when(){return!e.store.patient?.value},get children(){const n=V(()=>document.importNode(CP,!0));return n._$owner=P(),n}}),null),_(r,z(re,{get when(){return e.store.patient?.value&&!e.store.address?.value},get children(){const n=V(()=>document.importNode(PP,!0));return n._$owner=P(),n}}),null),_(r,z(re,{get when(){return e.store.patient?.value&&e.store.address?.value},get children(){const n=V(()=>document.importNode(TP,!0)),i=n.firstChild,o=i.nextSibling;return o.addEventListener("photon-pharmacy-selected",a=>{e.actions.updateFormValue({key:"pharmacy",value:a.detail.pharmacy})}),o.addEventListener("photon-pharmacy-removed",a=>{e.actions.updateFormValue({key:"pharmacy",value:void 0})}),o._$owner=P(),W(a=>{const s=e.store.pharmacy?.error??!1,c=e.store.pharmacy?.error,l=e.store.patient.value.address?`${e.store.patient.value.address.street1} ${e.store.patient.value.address.street2||""} ${e.store.patient.value.address.city}, ${e.store.patient.value.address.state} ${e.store.patient.value.address.postalCode}`:"",u=e.store.patient.value.preferredPharmacies?.[0]?.id??"";return s!==a._v$&&(o.invalid=a._v$=s),c!==a._v$2&&(o.helpText=a._v$2=c),l!==a._v$3&&(o.address=a._v$3=l),u!==a._v$4&&(o.selected=a._v$4=u),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),null),t})()),DP=O('<sl-spinner style="font-size: 1rem;"></sl-spinner>'),RP=O('<div class="flex flex-col gap-2"></div>'),FP=O('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Selected Pharmacy</p></div></div></photon-card>'),LP=({pharmacyId:e})=>{const t=rt(),[r,n]=F({});return me(async()=>{if(e&&t){const{data:i}=await t.getSDK().clinical.pharmacy.getPharmacy({id:e});n(i.pharmacy)}}),(()=>{const i=V(()=>document.importNode(FP,!0)),o=i.firstChild;return o.firstChild,i._$owner=P(),_(o,z(re,{get when(){return!r()},get children(){const a=V(()=>document.importNode(DP,!0));return a._$owner=P(),a}}),null),_(o,z(re,{get when(){return r()},get children(){const a=RP.cloneNode(!0);return _(a,()=>r()?.name),a}}),null),i})()};var so=[],MP=class{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){so.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){so=so.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return so[so.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=o2(this.element),r=this.tabDirection==="forward"?e:t;typeof r?.focus=="function"&&r.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}},jP=ft`
2875
+ `}};Ce.styles=oP;$([Xe(".button")],Ce.prototype,"button",2);$([Or()],Ce.prototype,"hasFocus",2);$([Or()],Ce.prototype,"invalid",2);$([k()],Ce.prototype,"title",2);$([k({reflect:!0})],Ce.prototype,"variant",2);$([k({reflect:!0})],Ce.prototype,"size",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"caret",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"loading",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"outline",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"pill",2);$([k({type:Boolean,reflect:!0})],Ce.prototype,"circle",2);$([k()],Ce.prototype,"type",2);$([k()],Ce.prototype,"name",2);$([k()],Ce.prototype,"value",2);$([k()],Ce.prototype,"href",2);$([k()],Ce.prototype,"target",2);$([k()],Ce.prototype,"download",2);$([k()],Ce.prototype,"form",2);$([k({attribute:"formaction"})],Ce.prototype,"formAction",2);$([k({attribute:"formenctype"})],Ce.prototype,"formEnctype",2);$([k({attribute:"formmethod"})],Ce.prototype,"formMethod",2);$([k({attribute:"formnovalidate",type:Boolean})],Ce.prototype,"formNoValidate",2);$([k({attribute:"formtarget"})],Ce.prototype,"formTarget",2);$([De("disabled",{waitUntilFirstUpdate:!0})],Ce.prototype,"handleDisabledChange",1);Ce=$([_t("sl-button")],Ce);const aP=O('<photon-checkbox label="Add To Templates" form-name="daw"></photon-checkbox>'),sP=O('<photon-card title="Add Prescription"><div class="flex flex-col gap-3"><photon-treatment-select label="Search Treatment Catalog"></photon-treatment-select><div class="sm:grid sm:grid-cols-2 sm:gap-4"><div><photon-checkbox label="Dispense as written" tip="This prescription will be filled generically unless this box is checked" form-name="daw" class="flex-grow"></photon-checkbox><photon-med-search-dialog></photon-med-search-dialog></div><div class="py-4 md:py-2"><a class="font-sans text-gray-500 text-sm hover:text-black hover:cursor-pointer">Advanced Search \u2192</a></div></div><div class="md:max-w-[50%] md:pr-2"><photon-datepicker label="Effective Date" required="true"></photon-datepicker></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><div class=""><photon-number-input class="flex-grow flex-1" label="Quantity" required="true" min="1"></photon-number-input><photon-dosage-calculator-dialog></photon-dosage-calculator-dialog><photon-button variant="outline" class="w-fit"><sl-icon slot="suffix" name="calculator"></sl-icon>Dose Calculator</photon-button></div><photon-dispense-units label="Dispense Unit" required="true" force-label-size="true"></photon-dispense-units></div><div class="sm:grid sm:grid-cols-2 sm:gap-4"><photon-number-input class="flex-grow flex-shrink flex-1" label="Days Supply" required="true" min="0"></photon-number-input><photon-number-input class="flex-grow flex-shrink flex-1" label="Refills" required="true" min="0"></photon-number-input></div><photon-textarea label="Patient Instructions (SIG)" form-name="patient_instructions" required="true" placeholder="Enter patient instructions"></photon-textarea><photon-textarea label="Pharmacy Note" placeholder="Enter pharmacy note"></photon-textarea><div class="flex flex-col xs:flex-row gap-2"><div class="flex flex-grow justify-end"><photon-button class="w-full xs:w-fit">Add Prescription</photon-button></div></div></div></photon-card>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const lP={treatment:ot(ic(zt(),Bi()),"Please select a treatment..."),dispenseQuantity:ot(su(au(),1),"Quantity must be positive"),daysSupply:ot(su(au(),0),"Days Supply must be at least 0"),refillsInput:ot(su(au(),0),"Refills must be at least 0"),instructions:ot(Ir(zt(),1,1/0),"Please enter instructions for the patient..."),effectiveDate:ot(rP(new Date),"Please choose a date that isn't in the past")},cP=e=>{let t,r;const[n,i]=F(void 0),[o,a]=F(void 0);let s;for(const[c,l]of Object.entries(lP))e.actions.registerValidator({key:c,validator:l});return(()=>{const c=V(()=>document.importNode(sP,!0)),l=c.firstChild,u=l.firstChild,d=u.nextSibling,f=d.firstChild,h=f.firstChild,p=h.nextSibling,m=f.nextSibling,v=m.firstChild,y=d.nextSibling,b=y.firstChild,g=y.nextSibling,w=g.firstChild,x=w.firstChild,E=x.nextSibling,S=E.nextSibling,T=S.firstChild,M=w.nextSibling,L=g.nextSibling,K=L.firstChild,D=K.nextSibling,R=L.nextSibling,U=R.nextSibling,j=U.nextSibling,Y=j.firstChild,oe=Y.firstChild,ae=s;typeof ae=="function"?ee(ae,c):s=c,c._$owner=P(),l.addEventListener("photon-medication-selected",A=>{i(A.detail.medication),e.actions.updateFormValue({key:"treatment",value:A.detail.medication})}),u.addEventListener("photon-treatment-selected",A=>{A.detail.data.__typename==="PrescriptionTemplate"?(e.actions.updateFormValue({key:"treatment",value:A.detail.data.treatment}),A.detail.data.dispenseAsWritten&&e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.data.dispenseAsWritten}),A.detail.data.dispenseQuantity&&e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.data.dispenseQuantity)}),A.detail.data.dispenseUnit&&e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.data.dispenseUnit}),A.detail.data.daysSupply&&e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.data.daysSupply)}),A.detail.data.fillsAllowed&&e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.data.fillsAllowed)-1}),A.detail.data.instructions&&e.actions.updateFormValue({key:"instructions",value:A.detail.data.instructions}),A.detail.data.notes&&e.actions.updateFormValue({key:"notes",value:A.detail.data.notes})):e.actions.updateFormValue({key:"treatment",value:A.detail.data}),e.actions.updateFormValue({key:"catalogId",value:A.detail.catalogId})}),u._$owner=P(),h.addEventListener("photon-checkbox-toggled",A=>e.actions.updateFormValue({key:"dispenseAsWritten",value:A.detail.checked})),h._$owner=P();const xe=t;typeof xe=="function"?ee(xe,p):t=p,p._$owner=P(),v.$$click=()=>t.open=!0,b.addEventListener("photon-datepicker-selected",A=>e.actions.updateFormValue({key:"effectiveDate",value:A.detail.date})),b._$owner=P(),x.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.input)})}),x._$owner=P();const _e=r;return typeof _e=="function"?ee(_e,E):r=E,E.addEventListener("photon-dose-selected",A=>{e.actions.updateFormValue({key:"dispenseQuantity",value:Number(A.detail.value)}),A.detail.unit==="mL"&&e.actions.updateFormValue({key:"dispenseUnit",value:"Milliliter"})}),E._$owner=P(),S.addEventListener("photon-clicked",()=>{r.open=!0}),S._$owner=P(),T._$owner=P(),M.addEventListener("photon-dispense-unit-selected",A=>e.actions.updateFormValue({key:"dispenseUnit",value:A.detail.dispenseUnit.name})),M._$owner=P(),K.addEventListener("photon-input-changed",A=>{e.actions.updateFormValue({key:"daysSupply",value:Number(A.detail.input)})}),K._$owner=P(),D.addEventListener("photon-input-changed",A=>e.actions.updateFormValue({key:"refillsInput",value:Number(A.detail.input)})),D._$owner=P(),R.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"instructions",value:A.detail.value})),R._$owner=P(),U.addEventListener("photon-textarea-changed",A=>e.actions.updateFormValue({key:"notes",value:A.detail.value})),U._$owner=P(),_(j,z(re,{get when(){return!e.hideAddToTemplates},get children(){const A=V(()=>document.importNode(aP,!0));return A.addEventListener("photon-checkbox-toggled",N=>e.actions.updateFormValue({key:"addToTemplates",value:N.detail.checked})),A._$owner=P(),W(()=>A.checked=e.store.addToTemplates?.value||!1),A}}),Y),oe.addEventListener("photon-clicked",()=>{const A=["treatment","effectiveDate","dispenseQuantity","daysSupply","refillsInput","instructions"];e.actions.validate(A),e.actions.hasErrors(A)||(e.actions.updateFormValue({key:"draftPrescriptions",value:[...e.store.draftPrescriptions?.value||[],{id:String(Math.random()),effectiveDate:e.store.effectiveDate.value,treatment:e.store.treatment.value,dispenseAsWritten:e.store.dispenseAsWritten.value,dispenseQuantity:e.store.dispenseQuantity.value,dispenseUnit:e.store.dispenseUnit.value,daysSupply:e.store.daysSupply.value,refillsInput:e.store.refillsInput.value,instructions:e.store.instructions.value,notes:e.store.notes.value,fillsAllowed:e.store.refillsInput.value+1,addToTemplates:e.store.addToTemplates?.value??!1,catalogId:e.store.catalogId.value??void 0}]}),e.actions.updateFormValue({key:"effectiveDate",value:oc(new Date,"yyyy-MM-dd").toString()}),e.actions.clearKeys(["treatment","dispenseAsWritten","dispenseQuantity","dispenseUnit","daysSupply","refillsInput","instructions","notes"]),i(void 0),e.actions.updateFormValue({key:"treatment",value:void 0}),e.actions.updateFormValue({key:"refillsInput",value:0}),e.actions.updateFormValue({key:"dispenseAsWritten",value:!1}),e.actions.updateFormValue({key:"dispenseQuantity",value:1}),e.actions.updateFormValue({key:"daysSupply",value:30}),e.actions.updateFormValue({key:"instructions",value:""}),e.actions.updateFormValue({key:"notes",value:""}))}),oe._$owner=P(),W(A=>{const N=e.store.treatment?.value??void 0,xt=e.store.treatment?.error??!1,St=e.store.treatment?.error,Mt=n(),It=e.store.effectiveDate?.error??!1,H=e.store.effectiveDate?.error,Q=e.store.dispenseQuantity?.error??!1,X=e.store.dispenseQuantity?.error,ne=e.store.treatment?.value??void 0,ue=e.store.dispenseUnit?.value??o()?.name,de=e.store.daysSupply?.error??!1,Ue=e.store.daysSupply?.error,Me=e.store.refillsInput?.error??!1,st=e.store.refillsInput?.error,jt=e.store.instructions?.error??!1,fr=e.store.instructions?.error;return N!==A._v$&&(u.selected=A._v$=N),xt!==A._v$2&&(u.invalid=A._v$2=xt),St!==A._v$3&&(u.helpText=A._v$3=St),Mt!==A._v$4&&(u.offCatalogOption=A._v$4=Mt),It!==A._v$5&&(b.invalid=A._v$5=It),H!==A._v$6&&(b.helpText=A._v$6=H),Q!==A._v$7&&(x.invalid=A._v$7=Q),X!==A._v$8&&(x.helpText=A._v$8=X),ne!==A._v$9&&(E.medication=A._v$9=ne),ue!==A._v$10&&(M.selected=A._v$10=ue),de!==A._v$11&&(K.invalid=A._v$11=de),Ue!==A._v$12&&(K.helpText=A._v$12=Ue),Me!==A._v$13&&(D.invalid=A._v$13=Me),st!==A._v$14&&(D.helpText=A._v$14=st),jt!==A._v$15&&(R.invalid=A._v$15=jt),fr!==A._v$16&&(R.helpText=A._v$16=fr),A},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0}),W(()=>h.checked=e.store.dispenseAsWritten?.value||!1),W(()=>x.value=e.store.dispenseQuantity?.value??1),W(()=>K.value=e.store.daysSupply?.value??30),W(()=>D.value=e.store.refillsInput?.value??0),W(()=>R.value=e.store.instructions?.value),W(()=>U.value=e.store.notes?.value),c})()};Ni(["click"]);const uP=O("<photon-patient-dialog></photon-patient-dialog>"),dP=O('<p class="font-sans text-sm font-medium">Patient Address</p>'),fP=O('<div class="flex flex-col font-sans text-gray-700"><p></p><div class="flex flex-row gap-1"><div class="flex flex-row"><p>,</p><p></p></div><p></p></div></div>'),hP=O('<p class="italic font-sans text-gray-500">Please edit patient and add address</p>'),pP=O('<p class="font-sans text-red-500 text-sm"></p>'),mP=O('<photon-button class="self-end" variant="outline">Edit Patient</photon-button>'),vP=O('<photon-card><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Select Patient</p><photon-patient-select></photon-patient-select></div></photon-card>'),yP=O("<p></p>"),gP=ot(ic(zt(),Bi()),"Please select a patient..."),bP=ot(ic(zt(),Bi()),"Please enter an address for patient..."),$P=e=>{const[t,r]=F(!1),{actions:n}=nc;return e.actions.registerValidator({key:"patient",validator:gP}),e.enableOrder&&e.actions.registerValidator({key:"address",validator:bP}),(()=>{const i=V(()=>document.importNode(vP,!0)),o=i.firstChild,a=o.firstChild,s=a.nextSibling;return i._$owner=P(),s.addEventListener("photon-patient-selected",c=>{e.actions.updateFormValue({key:"patient",value:c.detail.patient}),e.enableOrder&&e.actions.updateFormValue({key:"address",value:c.detail.patient.address})}),s._$owner=P(),_(o,z(re,{get when(){return e.store.patient?.value?.id&&e.enableOrder},get children(){return[(()=>{const c=V(()=>document.importNode(uP,!0));return c.addEventListener("photon-patient-updated",()=>{n.getSelectedPatient(e.client.getSDK(),e.store.patient?.value?.id)}),c._$owner=P(),W(l=>{const u=t(),d=e.store.patient.value.id;return u!==l._v$&&(c.open=l._v$=u),d!==l._v$2&&(c.patientId=l._v$2=d),l},{_v$:void 0,_v$2:void 0}),c})(),z(re,{get when(){return e.store.patient?.value},get children(){return[dP.cloneNode(!0),z(re,{get when(){return e.store.patient.value.address},get children(){const c=fP.cloneNode(!0),l=c.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,h=f.firstChild,p=f.nextSibling,m=d.nextSibling;return _(l,()=>e.store.patient.value.address.street1),_(c,(()=>{const v=pe(()=>!!e.store.patient.value.address.street2);return()=>v()?(()=>{const y=yP.cloneNode(!0);return _(y,()=>e.store.patient.value.address.street2),y})():null})(),u),_(f,()=>e.store.patient.value.address.city,h),_(p,()=>e.store.patient.value.address.state),_(m,()=>e.store.patient.value.address.postalCode),c}}),z(re,{get when(){return!e.store.patient.value.address},get children(){return[(()=>{const c=hP.cloneNode(!0);return W(l=>{const u=!!e.store.address.error,d=!!e.store.address.error,f=!!e.store.address.error,h=!!e.store.address.error;return u!==l._v$3&&c.classList.toggle("p-2",l._v$3=u),d!==l._v$4&&c.classList.toggle("border-red-500",l._v$4=d),f!==l._v$5&&c.classList.toggle("border-2",l._v$5=f),h!==l._v$6&&c.classList.toggle("rounded",l._v$6=h),l},{_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0}),c})(),z(re,{get when(){return e.store.address.error},get children(){const c=pP.cloneNode(!0);return _(c,()=>e.store.address.error),c}})]}})]}}),(()=>{const c=V(()=>document.importNode(mP,!0));return c.addEventListener("photon-clicked",()=>{r(!1),r(!0)}),c._$owner=P(),c})()]}}),null),W(c=>{const l=e.store.patient?.error??!1,u=e.store.patient?.error,d=e.store.patient?.value?.id??e.patientId,f=e.client.getSDK();return l!==c._v$7&&(s.invalid=c._v$7=l),u!==c._v$8&&(s.helpText=c._v$8=u),d!==c._v$9&&(s.selected=c._v$9=d),f!==c._v$10&&(s.sdk=c._v$10=f),c},{_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0}),i})()},wP=O('<p class="font-sans text-red-500 text-sm pt-1.5"></p>'),_P=O('<div><photon-card><p class="italic font-sans text-gray-500">No prescriptions pending</p></photon-card></div>'),xP=O('<div><photon-card><div class="w-full flex justify-between"><p class="italic font-sans text-gray-500">Loading Prescriptions...</p><sl-spinner style="font-size: 1rem;"></sl-spinner></div></photon-card></div>'),SP=O('<photon-card><photon-dialog label="Delete pending prescription?" confirm-text="Yes, Delete" cancel-text="No, Cancel"><p class="font-sans text-lg xs:text-base">Deleting this prescription will remove it from your pending prescriptions. This action cannot be undone.</p></photon-dialog><div class="flex flex-col gap-3"><p class="font-sans text-l font-medium">Pending Prescriptions</p></div></photon-card>'),kP=O('<photon-card><div class="flex flex-row items-center"><div class="flex flex-col flex-grow" style="max-width: calc(100% - 36px);"><p class="font-medium font-sans"></p><p class="font-normal text-gray-700 overflow-hidden whitespace-nowrap overflow-ellipsis font-sans"> <!>, <!> refills - </p></div><div><sl-icon-button class="self-end text-xl remove-icon-button" name="trash3"></sl-icon-button></div></div></photon-card>'),EP=ot(Ir(p7(Bi()),1,1/0),"You must add at least 1 Prescription"),OP=e=>{const[t,r]=F(!1),[n,i]=F();return e.actions.registerValidator({key:"draftPrescriptions",validator:EP}),(()=>{const o=V(()=>document.importNode(SP,!0)),a=o.firstChild,s=a.nextSibling;return s.firstChild,o._$owner=P(),a.addEventListener("photon-dialog-confirmed",()=>{e.actions.updateFormValue({key:"draftPrescriptions",value:e.store.draftPrescriptions.value.filter(c=>c.id!==n())}),r(!1),i(void 0)}),a.addEventListener("photon-dialog-canceled",()=>{r(!1),i(void 0)}),a._$owner=P(),_(s,z(re,{get when(){return(e.store.draftPrescriptions?.value??[]).length===0&&!e.isLoading},get children(){const c=V(()=>document.importNode(_P,!0)),l=c.firstChild;return l._$owner=P(),_(c,z(re,{get when(){return e.store.draftPrescriptions?.error},get children(){const u=wP.cloneNode(!0);return _(u,()=>e.store.draftPrescriptions?.error),u}}),null),W(()=>l.invalid=e.store.draftPrescriptions?.error),c}}),null),_(s,z(re,{get when(){return e.isLoading},get children(){const c=V(()=>document.importNode(xP,!0)),l=c.firstChild,u=l.firstChild,d=u.firstChild,f=d.nextSibling;return l._$owner=P(),f._$owner=P(),c}}),null),_(s,z(Rl,{get each(){return e.store.draftPrescriptions?.value??[]},children:c=>(()=>{const l=V(()=>document.importNode(kP,!0)),u=l.firstChild,d=u.firstChild,f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=p.nextSibling,v=m.nextSibling,y=v.nextSibling;y.nextSibling;const b=d.nextSibling,g=b.firstChild;return l._$owner=P(),_(f,()=>c.treatment.name),_(h,()=>c.dispenseQuantity,p),_(h,()=>c.dispenseUnit,m),_(h,()=>c.refillsInput,y),_(h,()=>c.instructions,null),g.$$click=()=>{r(!0),i(c.id)},g._$owner=P(),l})()}),null),W(()=>a.open=t()),o})()};Ni(["click"]);const CP=O('<photon-card><p class="italic font-sans text-gray-500">Please select a patient</p></photon-card>'),PP=O('<photon-card><p class="italic font-sans text-gray-500">Please update patient address in order to select pharmacy</p></photon-card>'),TP=O('<div class="flex flex-col gap-2"><p class="font-sans text-sm font-medium flex-grow">Search for a Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></div>'),NP=O('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Select Pharmacy</p></div></div></photon-card>'),IP=ot(ic(zt(),Bi()),"Please select or search for a pharmacy..."),AP=e=>(e.actions.registerValidator({key:"pharmacy",validator:IP}),(()=>{const t=V(()=>document.importNode(NP,!0)),r=t.firstChild;return r.firstChild,t._$owner=P(),_(r,z(re,{get when(){return!e.store.patient?.value},get children(){const n=V(()=>document.importNode(CP,!0));return n._$owner=P(),n}}),null),_(r,z(re,{get when(){return e.store.patient?.value&&!e.store.address?.value},get children(){const n=V(()=>document.importNode(PP,!0));return n._$owner=P(),n}}),null),_(r,z(re,{get when(){return e.store.patient?.value&&e.store.address?.value},get children(){const n=V(()=>document.importNode(TP,!0)),i=n.firstChild,o=i.nextSibling;return o.addEventListener("photon-pharmacy-selected",a=>{e.actions.updateFormValue({key:"pharmacy",value:a.detail.pharmacy})}),o.addEventListener("photon-pharmacy-removed",a=>{e.actions.updateFormValue({key:"pharmacy",value:void 0})}),o._$owner=P(),W(a=>{const s=e.store.pharmacy?.error??!1,c=e.store.pharmacy?.error,l=e.store.patient.value.address?`${e.store.patient.value.address.street1} ${e.store.patient.value.address.street2||""} ${e.store.patient.value.address.city}, ${e.store.patient.value.address.state} ${e.store.patient.value.address.postalCode}`:"",u=e.store.patient.value.preferredPharmacies?.[0]?.id??"";return s!==a._v$&&(o.invalid=a._v$=s),c!==a._v$2&&(o.helpText=a._v$2=c),l!==a._v$3&&(o.address=a._v$3=l),u!==a._v$4&&(o.selected=a._v$4=u),a},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),n}}),null),t})()),DP=O('<sl-spinner style="font-size: 1rem;"></sl-spinner>'),RP=O('<div class="flex flex-col gap-2"></div>'),FP=O('<photon-card><div class="flex flex-col gap-3"><div class="flex flex-row"><p class="font-sans text-l font-medium flex-grow">Selected Pharmacy</p></div></div></photon-card>'),LP=({pharmacyId:e})=>{const t=rt(),[r,n]=F({});return me(async()=>{if(e&&t){const{data:i}=await t.getSDK().clinical.pharmacy.getPharmacy({id:e});n(i.pharmacy)}}),(()=>{const i=V(()=>document.importNode(FP,!0)),o=i.firstChild;return o.firstChild,i._$owner=P(),_(o,z(re,{get when(){return!r()},get children(){const a=V(()=>document.importNode(DP,!0));return a._$owner=P(),a}}),null),_(o,z(re,{get when(){return r()},get children(){const a=RP.cloneNode(!0);return _(a,()=>r()?.name),a}}),null),i})()};var so=[],MP=class{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){so.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){so=so.filter(e=>e!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return so[so.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=o2(this.element),r=this.tabDirection==="forward"?e:t;typeof r?.focus=="function"&&r.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){e.key==="Tab"&&e.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}},jP=ft`
2877
2876
  ${wt}
2878
2877
 
2879
2878
  :host {
@@ -3036,7 +3035,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3036
3035
  </footer>
3037
3036
  </div>
3038
3037
  </div>
3039
- `}};Sr.styles=jP;$([Ze(".dialog")],Sr.prototype,"dialog",2);$([Ze(".dialog__panel")],Sr.prototype,"panel",2);$([Ze(".dialog__overlay")],Sr.prototype,"overlay",2);$([k({type:Boolean,reflect:!0})],Sr.prototype,"open",2);$([k({reflect:!0})],Sr.prototype,"label",2);$([k({attribute:"no-header",type:Boolean,reflect:!0})],Sr.prototype,"noHeader",2);$([De("open",{waitUntilFirstUpdate:!0})],Sr.prototype,"handleOpenChange",1);Sr=$([_t("sl-dialog")],Sr);dr("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});dr("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});dr("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});dr("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});dr("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const zP=O('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>You are not signed in</strong><br></sl-alert>'),UP=O('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>Something went wrong, please contact support at Photon Health <a style="text-decoration:underline" href="mailto:support@photon.health">support@photon.health</a></strong><br></sl-alert>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");function By(e,t){for(let r=0;r<e.length;r++)if(t.indexOf(e[r])===-1)return!1;return!0}const W2=({children:e,permissions:t=[]})=>{const r=rt(),[n,i]=F(r?.authentication.state.isLoading||!1),[o,a]=F(r?.authentication.state.isAuthenticated||!1),[s,c]=F(r?.authentication.state.isInOrg||!1),[l,u]=F(By(t,r?.authentication.state.permissions||[]));return me(()=>{i(r?.authentication.state.isLoading||!1)}),me(()=>{a(r?.authentication.state.isAuthenticated||!1)}),me(()=>{c(r?.authentication.state.isInOrg||!1)}),me(()=>{u(By(t,r?.authentication.state.permissions||[]))}),z(re,{get when(){return r&&!n()},get children(){return[z(re,{get when(){return!o()},get children(){const d=V(()=>document.importNode(zP,!0)),f=d.firstChild;return d._$owner=P(),f._$owner=P(),d}}),z(re,{get when(){return pe(()=>!!o())()&&(!s()||!l())},get children(){const d=V(()=>document.importNode(UP,!0)),f=d.firstChild;return d._$owner=P(),f._$owner=P(),d}}),z(re,{get when(){return pe(()=>!!s())()&&l()},children:e})]}})},VP=O('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>'),BP=O('<photon-button class="w-full xs:w-fit" variant="outline">Add Prescription</photon-button>'),WP=O('<div class="flex flex-row justify-end gap-2"><photon-button class="w-full xs:w-fit"></photon-button></div>'),qP=O('<div><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const HP=Wo`
3038
+ `}};Sr.styles=jP;$([Xe(".dialog")],Sr.prototype,"dialog",2);$([Xe(".dialog__panel")],Sr.prototype,"panel",2);$([Xe(".dialog__overlay")],Sr.prototype,"overlay",2);$([k({type:Boolean,reflect:!0})],Sr.prototype,"open",2);$([k({reflect:!0})],Sr.prototype,"label",2);$([k({attribute:"no-header",type:Boolean,reflect:!0})],Sr.prototype,"noHeader",2);$([De("open",{waitUntilFirstUpdate:!0})],Sr.prototype,"handleOpenChange",1);Sr=$([_t("sl-dialog")],Sr);dr("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});dr("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});dr("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});dr("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});dr("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const zP=O('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>You are not signed in</strong><br></sl-alert>'),UP=O('<sl-alert variant="warning" open><sl-icon slot="icon" name="exclamation-triangle"></sl-icon><strong>Something went wrong, please contact support at Photon Health <a style="text-decoration:underline" href="mailto:support@photon.health">support@photon.health</a></strong><br></sl-alert>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");function By(e,t){for(let r=0;r<e.length;r++)if(t.indexOf(e[r])===-1)return!1;return!0}const W2=({children:e,permissions:t=[]})=>{const r=rt(),[n,i]=F(r?.authentication.state.isLoading||!1),[o,a]=F(r?.authentication.state.isAuthenticated||!1),[s,c]=F(r?.authentication.state.isInOrg||!1),[l,u]=F(By(t,r?.authentication.state.permissions||[]));return me(()=>{i(r?.authentication.state.isLoading||!1)}),me(()=>{a(r?.authentication.state.isAuthenticated||!1)}),me(()=>{c(r?.authentication.state.isInOrg||!1)}),me(()=>{u(By(t,r?.authentication.state.permissions||[]))}),z(re,{get when(){return r&&!n()},get children(){return[z(re,{get when(){return!o()},get children(){const d=V(()=>document.importNode(zP,!0)),f=d.firstChild;return d._$owner=P(),f._$owner=P(),d}}),z(re,{get when(){return pe(()=>!!o())()&&(!s()||!l())},get children(){const d=V(()=>document.importNode(UP,!0)),f=d.firstChild;return d._$owner=P(),f._$owner=P(),d}}),z(re,{get when(){return pe(()=>!!s())()&&l()},children:e})]}})},VP=O('<div class="w-full flex justify-center"><sl-spinner style="font-size: 3rem;"></sl-spinner></div>'),BP=O('<photon-button class="w-full xs:w-fit" variant="outline">Add Prescription</photon-button>'),WP=O('<div class="flex flex-row justify-end gap-2"><photon-button class="w-full xs:w-fit"></photon-button></div>'),qP=O('<div><style></style><style></style><style></style><style></style><div><div class="flex flex-col gap-8"></div></div></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const HP=Wo`
3040
3039
  fragment CatalogTreatmentsFields on Catalog {
3041
3040
  id
3042
3041
  treatments {
@@ -3194,7 +3193,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3194
3193
  content: var(--sl-input-required-content);
3195
3194
  margin-inline-start: var(--sl-input-required-content-offset);
3196
3195
  }
3197
- `,mt=class extends ht{constructor(){super(...arguments),this.formControlController=new Ho(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sl-change")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){return Ie`
3196
+ `,vt=class extends ht{constructor(){super(...arguments),this.formControlController=new Ho(this,{value:e=>e.checked?e.value||"on":void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sl-change")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){return Ie`
3198
3197
  <label
3199
3198
  part="base"
3200
3199
  class=${Ct({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--small":this.size==="small","checkbox--medium":this.size==="medium","checkbox--large":this.size==="large"})}
@@ -3235,7 +3234,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3235
3234
 
3236
3235
  <slot part="label" class="checkbox__label"></slot>
3237
3236
  </label>
3238
- `}};mt.styles=oT;$([Ze('input[type="checkbox"]')],mt.prototype,"input",2);$([Or()],mt.prototype,"hasFocus",2);$([k()],mt.prototype,"title",2);$([k()],mt.prototype,"name",2);$([k()],mt.prototype,"value",2);$([k({reflect:!0})],mt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],mt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],mt.prototype,"checked",2);$([k({type:Boolean,reflect:!0})],mt.prototype,"indeterminate",2);$([rc("checked")],mt.prototype,"defaultChecked",2);$([k({reflect:!0})],mt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],mt.prototype,"required",2);$([De("disabled",{waitUntilFirstUpdate:!0})],mt.prototype,"handleDisabledChange",1);$([De(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],mt.prototype,"handleStateChange",1);mt=$([_t("sl-checkbox")],mt);var aT=ft`
3237
+ `}};vt.styles=oT;$([Xe('input[type="checkbox"]')],vt.prototype,"input",2);$([Or()],vt.prototype,"hasFocus",2);$([k()],vt.prototype,"title",2);$([k()],vt.prototype,"name",2);$([k()],vt.prototype,"value",2);$([k({reflect:!0})],vt.prototype,"size",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"checked",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"indeterminate",2);$([rc("checked")],vt.prototype,"defaultChecked",2);$([k({reflect:!0})],vt.prototype,"form",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"required",2);$([De("disabled",{waitUntilFirstUpdate:!0})],vt.prototype,"handleDisabledChange",1);$([De(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],vt.prototype,"handleStateChange",1);vt=$([_t("sl-checkbox")],vt);var aT=ft`
3239
3238
  ${wt}
3240
3239
 
3241
3240
  :host {
@@ -3286,7 +3285,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3286
3285
  padding: var(--sl-tooltip-padding);
3287
3286
  pointer-events: none;
3288
3287
  }
3289
- `,vt=class extends ht{constructor(){super(...arguments),this.localize=new Bn(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const e=lv(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){const e=lv(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sl-show"),await gr(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=nr(this,"tooltip.show",{dir:this.localize.dir()});await rr(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),await gr(this.body);const{keyframes:e,options:t}=nr(this,"tooltip.hide",{dir:this.localize.dir()});await rr(this.popup.popup,e,t),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,pn(this,"sl-after-show")}async hide(){if(!!this.open)return this.open=!1,pn(this,"sl-after-hide")}render(){return Ie`
3288
+ `,yt=class extends ht{constructor(){super(...arguments),this.localize=new Bn(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(e){this.open&&e.key==="Escape"&&(e.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const e=lv(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),e)}}handleMouseOut(){if(this.hasTrigger("hover")){const e=lv(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),e)}}hasTrigger(e){return this.trigger.split(" ").includes(e)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sl-show"),await gr(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:t}=nr(this,"tooltip.show",{dir:this.localize.dir()});await rr(this.popup.popup,e,t),this.emit("sl-after-show")}else{this.emit("sl-hide"),await gr(this.body);const{keyframes:e,options:t}=nr(this,"tooltip.hide",{dir:this.localize.dir()});await rr(this.popup.popup,e,t),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,pn(this,"sl-after-show")}async hide(){if(!!this.open)return this.open=!1,pn(this,"sl-after-hide")}render(){return Ie`
3290
3289
  <sl-popup
3291
3290
  part="base"
3292
3291
  exportparts="
@@ -3315,7 +3314,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3315
3314
  ${this.content}
3316
3315
  </slot>
3317
3316
  </sl-popup>
3318
- `}};vt.styles=aT;$([Ze("slot:not([name])")],vt.prototype,"defaultSlot",2);$([Ze(".tooltip__body")],vt.prototype,"body",2);$([Ze("sl-popup")],vt.prototype,"popup",2);$([k()],vt.prototype,"content",2);$([k()],vt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"disabled",2);$([k({type:Number})],vt.prototype,"distance",2);$([k({type:Boolean,reflect:!0})],vt.prototype,"open",2);$([k({type:Number})],vt.prototype,"skidding",2);$([k()],vt.prototype,"trigger",2);$([k({type:Boolean})],vt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],vt.prototype,"handleOpenChange",1);$([De(["content","distance","hoist","placement","skidding"])],vt.prototype,"handleOptionsChange",1);$([De("disabled")],vt.prototype,"handleDisabledChange",1);vt=$([_t("sl-tooltip")],vt);dr("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});dr("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const du=O("<style></style>"),sT=O('<sl-tooltip style="--max-width: 200px;"><sl-icon name="info-circle"></sl-icon></sl-tooltip>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const lT=({tip:e,placement:t="top"})=>[(()=>{const r=du.cloneNode(!0);return _(r,ze),r})(),(()=>{const r=du.cloneNode(!0);return _(r,Bt),r})(),(()=>{const r=du.cloneNode(!0);return _(r,Vt),r})(),(()=>{const r=V(()=>document.importNode(sT,!0)),n=r.firstChild;return r.content=e,r.placement=t,r._$owner=P(),n._$owner=P(),r})()],fu=O("<style></style>"),cT=O('<div class="flex items-center py-2"><p class="text-gray-500 text-sm font-medium font-sans"></p><p class="text-gray-400 text-xs pt-1 pl-2 font-sans"></p></div>'),uT=O("<sl-checkbox checked></sl-checkbox>"),dT=O("<sl-checkbox></sl-checkbox>");tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-checkbox",{label:void 0,required:!1,disabled:!1,checked:!1,tip:void 0},e=>{const[t,r]=F(!1);let n;const i=o=>{const a=new CustomEvent("photon-checkbox-toggled",{composed:!0,bubbles:!0,detail:{checked:o}});n?.dispatchEvent(a)};return Tt(()=>{i(t())}),me(()=>{e.checked!==t()&&r(e.checked)}),[(()=>{const o=fu.cloneNode(!0);return _(o,ze),o})(),(()=>{const o=fu.cloneNode(!0);return _(o,Bt),o})(),(()=>{const o=fu.cloneNode(!0);return _(o,Vt),o})(),(()=>{const o=cT.cloneNode(!0),a=o.firstChild,s=a.nextSibling;return _(o,(()=>{const c=pe(()=>!!e.checked);return()=>c()?(()=>{const l=V(()=>document.importNode(uT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})():(()=>{const l=V(()=>document.importNode(dT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})()})(),a),_(a,()=>e.label,null),_(a,z(re,{get when(){return e.tip},get children(){return z(lT,{get tip(){return e.tip||""},placement:"right"})}}),null),_(s,()=>e.required?"Required":"Optional"),o})()]});const fT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity));font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";padding-top:.5rem}
3317
+ `}};yt.styles=aT;$([Xe("slot:not([name])")],yt.prototype,"defaultSlot",2);$([Xe(".tooltip__body")],yt.prototype,"body",2);$([Xe("sl-popup")],yt.prototype,"popup",2);$([k()],yt.prototype,"content",2);$([k()],yt.prototype,"placement",2);$([k({type:Boolean,reflect:!0})],yt.prototype,"disabled",2);$([k({type:Number})],yt.prototype,"distance",2);$([k({type:Boolean,reflect:!0})],yt.prototype,"open",2);$([k({type:Number})],yt.prototype,"skidding",2);$([k()],yt.prototype,"trigger",2);$([k({type:Boolean})],yt.prototype,"hoist",2);$([De("open",{waitUntilFirstUpdate:!0})],yt.prototype,"handleOpenChange",1);$([De(["content","distance","hoist","placement","skidding"])],yt.prototype,"handleOptionsChange",1);$([De("disabled")],yt.prototype,"handleDisabledChange",1);yt=$([_t("sl-tooltip")],yt);dr("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}});dr("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const du=O("<style></style>"),sT=O('<sl-tooltip style="--max-width: 200px;"><sl-icon name="info-circle"></sl-icon></sl-tooltip>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const lT=({tip:e,placement:t="top"})=>[(()=>{const r=du.cloneNode(!0);return _(r,ze),r})(),(()=>{const r=du.cloneNode(!0);return _(r,Bt),r})(),(()=>{const r=du.cloneNode(!0);return _(r,Vt),r})(),(()=>{const r=V(()=>document.importNode(sT,!0)),n=r.firstChild;return r.content=e,r.placement=t,r._$owner=P(),n._$owner=P(),r})()],fu=O("<style></style>"),cT=O('<div class="flex items-center py-2"><p class="text-gray-500 text-sm font-medium font-sans"></p><p class="text-gray-400 text-xs pt-1 pl-2 font-sans"></p></div>'),uT=O("<sl-checkbox checked></sl-checkbox>"),dT=O("<sl-checkbox></sl-checkbox>");tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-checkbox",{label:void 0,required:!1,disabled:!1,checked:!1,tip:void 0},e=>{const[t,r]=F(!1);let n;const i=o=>{const a=new CustomEvent("photon-checkbox-toggled",{composed:!0,bubbles:!0,detail:{checked:o}});n?.dispatchEvent(a)};return Tt(()=>{i(t())}),me(()=>{e.checked!==t()&&r(e.checked)}),[(()=>{const o=fu.cloneNode(!0);return _(o,ze),o})(),(()=>{const o=fu.cloneNode(!0);return _(o,Bt),o})(),(()=>{const o=fu.cloneNode(!0);return _(o,Vt),o})(),(()=>{const o=cT.cloneNode(!0),a=o.firstChild,s=a.nextSibling;return _(o,(()=>{const c=pe(()=>!!e.checked);return()=>c()?(()=>{const l=V(()=>document.importNode(uT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})():(()=>{const l=V(()=>document.importNode(dT,!0)),u=n;return typeof u=="function"?ee(u,l):n=l,l.addEventListener("sl-change",d=>{i(!t()),r(!t())}),l._$owner=P(),W(()=>l.disabled=e.disabled),l})()})(),a),_(a,()=>e.label,null),_(a,z(re,{get when(){return e.tip},get children(){return z(lT,{get tip(){return e.tip||""},placement:"right"})}}),null),_(s,()=>e.required?"Required":"Optional"),o})()]});const fT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity));font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";padding-top:.5rem}
3319
3318
  `,ha=O("<style></style>"),hT=O('<div class="pb-2 flex flex-col"><sl-input class="input" type="date"></sl-input></div>'),pT=O('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm font-sans"></p></div>'),mT=O('<p class="pl-1 text-red-500">*</p>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-datepicker",{label:void 0,required:!1,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=oc(new Date,"yyyy-MM-dd").toString(),n=i=>{const o=new CustomEvent("photon-datepicker-selected",{composed:!0,bubbles:!0,detail:{date:i}});t?.dispatchEvent(o)};return Tt(()=>{n(r)}),[(()=>{const i=ha.cloneNode(!0);return _(i,ze),i})(),(()=>{const i=ha.cloneNode(!0);return _(i,Bt),i})(),(()=>{const i=ha.cloneNode(!0);return _(i,Vt),i})(),(()=>{const i=ha.cloneNode(!0);return _(i,fT),i})(),(()=>{const i=V(()=>document.importNode(hT,!0)),o=i.firstChild,a=t;return typeof a=="function"?ee(a,i):t=i,_(i,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=pT.cloneNode(!0),l=c.firstChild;return _(l,()=>e.label),_(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?mT.cloneNode(!0):null})(),null),c})():null})(),o),o.addEventListener("sl-input",s=>{n(s.target.value)}),o.value=r,o._$owner=P(),W(s=>{const c=e.disabled,l=!!e.invalid,u=e.helpText,d=e.invalid;return c!==s._v$&&(o.disabled=s._v$=c),l!==s._v$2&&o.classList.toggle("invalid",s._v$2=l),u!==s._v$3&&(o.helpText=s._v$3=u),d!==s._v$4&&(o.invalid=s._v$4=d),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),i})()]});const vT=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3320
3319
  `,pa=O("<style></style>"),yT=O('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="number"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),gT=O('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),bT=O('<p class="pl-1 text-red-500">*</p>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-number-input",{label:void 0,required:!1,value:void 0,formName:void 0,min:void 0,max:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-input-changed",{composed:!0,bubbles:!0,detail:{input:n}});t?.dispatchEvent(i)};return Tt(()=>{r(e.value??0)}),[(()=>{const n=pa.cloneNode(!0);return _(n,ze),n})(),(()=>{const n=pa.cloneNode(!0);return _(n,Bt),n})(),(()=>{const n=pa.cloneNode(!0);return _(n,Vt),n})(),(()=>{const n=pa.cloneNode(!0);return _(n,vT),n})(),(()=>{const n=V(()=>document.importNode(yT,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,_(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=gT.cloneNode(!0),l=c.firstChild;return _(l,()=>e.label),_(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?bT.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(s.target.value)}),i.addEventListener("wheel",s=>{s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation()}),i._$owner=P(),_(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.min,d=e.max,f=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.min=s._v$3=u),d!==s._v$4&&(i.max=s._v$4=d),f!==s._v$5&&(i.invalid=s._v$5=f),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0}),W(()=>i.value=e.value),n})()]});const $T=()=>{const[e,t]=gn({dispenseUnits:{data:[],errors:[],isLoading:!1}});return{store:e,actions:{getDispenseUnits:async n=>{t("dispenseUnits",{...e.dispenseUnits,isLoading:!0});const{data:i,errors:o}=await n.clinical.prescription.getDispenseUnits();t("dispenseUnits",{...e.dispenseUnits,isLoading:!1,data:i.dispenseUnits.map((a,s)=>({id:s.toString(),...a})),errors:o})}}}},wT=$T(),_T=O("<div></div>");$e("photon-dispense-units",{label:void 0,required:!1,invalid:!1,helpText:void 0,formName:void 0,disabled:!1,forceLabelSize:!1,selected:void 0},e=>{let t;const r=rt(),{store:n,actions:i}=wT,[o,a]=F(""),s=l=>{const u=new CustomEvent("photon-dispense-unit-selected",{composed:!0,bubbles:!0,detail:{dispenseUnit:{name:l.name}}});t?.dispatchEvent(u)};Tt(async()=>{await i.getDispenseUnits(r.getSDK())});const c=l=>{if(n.dispenseUnits.data.length>0){const u=n.dispenseUnits.data;return l.length===0?u:u.filter(d=>d.name.toLowerCase().includes(l.toLowerCase()))}return[]};return(()=>{const l=_T.cloneNode(!0),u=t;return typeof u=="function"?ee(u,l):t=l,l.addEventListener("photon-data-selected",d=>{s(d.detail.data)}),_(l,z(Nt,{get data(){return c(o())},get label(){return e.label},get disabled(){return e.disabled},get required(){return e.required},get forceLabelSize(){return e.forceLabelSize},placeholder:"Select a dispense unit...",get invalid(){return e.invalid},get isLoading(){return r?.clinical.dispenseUnits.state.isLoading||!1},hasMore:!1,get selectedData(){return pe(()=>!!e.selected)()?n.dispenseUnits.data?.filter(d=>d.name===e.selected)[0]:n.dispenseUnits.data?.[0]},displayAccessor:d=>d.name,onSearchChange:async d=>{a(d)},onHide:async()=>{a("")},noDataMsg:"No dispense units found",get helpText(){return e.helpText}})),l})()});var xT=ft`
3321
3320
  ${wt}
@@ -3539,7 +3538,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3539
3538
  ${this.helpText}
3540
3539
  </slot>
3541
3540
  </div>
3542
- `}};ge.styles=xT;$([Ze(".textarea__control")],ge.prototype,"input",2);$([Or()],ge.prototype,"hasFocus",2);$([k()],ge.prototype,"title",2);$([k()],ge.prototype,"name",2);$([k()],ge.prototype,"value",2);$([k({reflect:!0})],ge.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"filled",2);$([k()],ge.prototype,"label",2);$([k({attribute:"help-text"})],ge.prototype,"helpText",2);$([k()],ge.prototype,"placeholder",2);$([k({type:Number})],ge.prototype,"rows",2);$([k()],ge.prototype,"resize",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"readonly",2);$([k({reflect:!0})],ge.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"required",2);$([k({type:Number})],ge.prototype,"minlength",2);$([k({type:Number})],ge.prototype,"maxlength",2);$([k()],ge.prototype,"autocapitalize",2);$([k()],ge.prototype,"autocorrect",2);$([k()],ge.prototype,"autocomplete",2);$([k({type:Boolean})],ge.prototype,"autofocus",2);$([k()],ge.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ge.prototype,"spellcheck",2);$([k()],ge.prototype,"inputmode",2);$([rc()],ge.prototype,"defaultValue",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ge.prototype,"handleDisabledChange",1);$([De("rows",{waitUntilFirstUpdate:!0})],ge.prototype,"handleRowsChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ge.prototype,"handleValueChange",1);ge=$([_t("sl-textarea")],ge);const ST=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3541
+ `}};ge.styles=xT;$([Xe(".textarea__control")],ge.prototype,"input",2);$([Or()],ge.prototype,"hasFocus",2);$([k()],ge.prototype,"title",2);$([k()],ge.prototype,"name",2);$([k()],ge.prototype,"value",2);$([k({reflect:!0})],ge.prototype,"size",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"filled",2);$([k()],ge.prototype,"label",2);$([k({attribute:"help-text"})],ge.prototype,"helpText",2);$([k()],ge.prototype,"placeholder",2);$([k({type:Number})],ge.prototype,"rows",2);$([k()],ge.prototype,"resize",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"disabled",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"readonly",2);$([k({reflect:!0})],ge.prototype,"form",2);$([k({type:Boolean,reflect:!0})],ge.prototype,"required",2);$([k({type:Number})],ge.prototype,"minlength",2);$([k({type:Number})],ge.prototype,"maxlength",2);$([k()],ge.prototype,"autocapitalize",2);$([k()],ge.prototype,"autocorrect",2);$([k()],ge.prototype,"autocomplete",2);$([k({type:Boolean})],ge.prototype,"autofocus",2);$([k()],ge.prototype,"enterkeyhint",2);$([k({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],ge.prototype,"spellcheck",2);$([k()],ge.prototype,"inputmode",2);$([rc()],ge.prototype,"defaultValue",2);$([De("disabled",{waitUntilFirstUpdate:!0})],ge.prototype,"handleDisabledChange",1);$([De("rows",{waitUntilFirstUpdate:!0})],ge.prototype,"handleRowsChange",1);$([De("value",{waitUntilFirstUpdate:!0})],ge.prototype,"handleValueChange",1);ge=$([_t("sl-textarea")],ge);const ST=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3543
3542
  `,ma=O("<style></style>"),kT=O('<div class="py-2 flex flex-col"><sl-textarea class="input"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-textarea></div>'),ET=O('<div class="flex items-center pb-2 font-sans"><p class="text-gray-700 text-sm"></p></div>'),OT=O('<p class="pl-1 text-red-500">*</p>'),CT=O('<p class="text-gray-400 text-xs pl-2">Optional</p>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-textarea",{label:void 0,required:!1,placeholder:void 0,value:void 0,formName:void 0,helpText:void 0,invalid:!1,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-textarea-changed",{composed:!0,bubbles:!0,detail:{value:n}});t?.dispatchEvent(i)};return Tt(()=>{r(e.value??"")}),[(()=>{const n=ma.cloneNode(!0);return _(n,ze),n})(),(()=>{const n=ma.cloneNode(!0);return _(n,Bt),n})(),(()=>{const n=ma.cloneNode(!0);return _(n,Vt),n})(),(()=>{const n=ma.cloneNode(!0);return _(n,ST),n})(),(()=>{const n=V(()=>document.importNode(kT,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,_(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=ET.cloneNode(!0),l=c.firstChild;return _(l,()=>e.label),_(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?OT.cloneNode(!0):null})(),null),_(c,(()=>{const u=pe(()=>!e.required);return()=>u()?CT.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(s.target.value)}),i._$owner=P(),_(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.invalid,d=e.placeholder;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.invalid=s._v$3=u),d!==s._v$4&&(i.placeholder=s._v$4=d),s},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),W(()=>i.value=e.value?e.value:""),n})()]});const PT=`.button{border-radius:var(--photon-border-radius, .375rem);--tw-text-opacity: 1;color:rgb(209 213 219/var(--tw-text-opacity))}.button:disabled{cursor:not-allowed}.button--solid{--tw-bg-opacity: 1;background-color:rgb(49 130 206/var(--tw-bg-opacity))}.button--solid:hover:disabled{background-color:#3182ce99}.button--solid:disabled{background-color:#3182ce99}.button--solid{--tw-text-opacity: 1;color:rgb(255 255 255/var(--tw-text-opacity))}.button--solid:hover{--tw-bg-opacity: 1;background-color:rgb(43 108 176/var(--tw-bg-opacity))}.button--outline{--tw-text-opacity: 1;color:rgb(49 130 206/var(--tw-text-opacity))}.button--outline:disabled{color:#3182ce99}.button--outline{border-width:1px}.button--outline:disabled{border-color:#3182ce99}.button--outline{--tw-border-opacity: 1;border-color:rgb(49 130 206/var(--tw-border-opacity))}.button--outline:hover{background-color:#3182ce33}.button--xs{height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.875rem;line-height:1.25rem}.button--sm{height:2rem;padding-left:.625rem;padding-right:.625rem;font-size:.875rem;line-height:1.25rem}.button--md{height:2.5rem;padding-left:1rem;padding-right:1rem}.button--lg{height:3rem;padding-left:1.5rem;padding-right:1.5rem;font-size:1.125rem;line-height:1.75rem}.spinner--solid{--indicator-color: white;--track-color: none}.spinner--outline{--indicator-color: rgb(49 130 206 / .6);--track-color: none}
3544
3543
  `,va=O("<style></style>"),TT=O('<button class="rounded-lg font-sans transition ease-in-out delay-50 flex items-center gap-2"><slot name="suffix"></slot><slot name="postfix"></slot></button>'),NT=O('<p class="w-full"><slot></slot></p>'),IT=O('<div class="pt-[3px]"><sl-spinner class="w-[16px]"></sl-spinner></div>'),AT=O('<p class="w-full"></p>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-button",{disabled:!1,loading:!1,loadingText:void 0,full:!1,variant:"solid",size:"md"},e=>{let t;const r=()=>{const n=new CustomEvent("photon-clicked",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(n)};return[(()=>{const n=va.cloneNode(!0);return _(n,ze),n})(),(()=>{const n=va.cloneNode(!0);return _(n,Bt),n})(),(()=>{const n=va.cloneNode(!0);return _(n,Vt),n})(),(()=>{const n=va.cloneNode(!0);return _(n,PT),n})(),(()=>{const n=TT.cloneNode(!0),i=n.firstChild,o=i.nextSibling;n.$$click=()=>r();const a=t;return typeof a=="function"?ee(a,n):t=n,i._$owner=P(),_(n,(()=>{const s=pe(()=>!e.loading);return()=>s()?(()=>{const c=NT.cloneNode(!0),l=c.firstChild;return l._$owner=P(),c})():null})(),o),_(n,(()=>{const s=pe(()=>!!e.loading);return()=>s()?(()=>{const c=V(()=>document.importNode(IT,!0)),l=c.firstChild;return l._$owner=P(),W(u=>{const d=e.variant==="solid",f=e.variant==="outline";return d!==u._v$3&&l.classList.toggle("spinner--solid",u._v$3=d),f!==u._v$4&&l.classList.toggle("spinner--outline",u._v$4=f),u},{_v$3:void 0,_v$4:void 0}),c})():null})(),o),_(n,(()=>{const s=pe(()=>!!(e.loading&&e.loadingText));return()=>s()?(()=>{const c=AT.cloneNode(!0);return _(c,()=>e.loadingText),c})():null})(),o),o._$owner=P(),W(s=>{const c=e.disabled||e.loading,l={button:!0,"button--solid":e.variant==="solid","button--outline":e.variant==="outline","button--lg":e.size=="lg","button--md":e.size=="md","button--sm":e.size=="sm","button--xs":e.size=="xs","xs:w-fit":!0,"w-full":!0};return c!==s._v$&&(n.disabled=s._v$=c),s._v$2=T$(n,l,s._v$2),s},{_v$:void 0,_v$2:void 0}),n})()]});Ni(["click"]);const DT=Wo`
3545
3544
  fragment PatientPharmacyFields on Patient {
@@ -3578,7 +3577,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3578
3577
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OA(e,t){if(!!e){if(typeof e=="string")return Pg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pg(e,t)}}function Pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function PA(e){if(Array.isArray(e))return e}function TA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NA(e,t,r){return t&&Tg(e.prototype,t),r&&Tg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var d$=function(){function e(t,r){TA(this,e),this.metadata=new bt(r);var n=this.getCountryAndCallingCode(t),i=kA(n,2),o=i[0],a=i[1];this.defaultCountry=o,this.defaultCallingCode=a,this.reset()}return NA(e,[{key:"getCountryAndCallingCode",value:function(r){var n,i;return r&&(Jf(r)==="object"?(n=r.defaultCountry,i=r.defaultCallingCode):n=r),n&&!this.metadata.hasCountry(n)&&(n=void 0),[n,i]}},{key:"input",value:function(r){var n=this.parser.input(r,this.state),i=n.digits,o=n.justLeadingPlus;if(o)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var a;if(this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(i,this.state)),a===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var s=this.state.getNationalDigits();s&&(a=this.formatter.format(s,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var r=this;return this.state=new RI({onCountryChange:function(i){r.country=i},onCallingCodeChange:function(i,o){r.metadata.selectNumberingPlan(o,i),r.formatter.reset(r.metadata.numberingPlan,r.state),r.parser.reset(r.metadata.numberingPlan)}}),this.formatter=new cA({state:this.state,metadata:this.metadata}),this.parser=new wA({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){r.determineTheCountryIfNeeded(),r.formatter.reset(r.metadata.numberingPlan,r.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var r=this.state.digits;if(r)return this._getCountry()}},{key:"_getCountry",value:function(){var r=this.state.country;return r}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(r){var n=this;if(this.isInternational()){var i=function(s){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:!!s})+s},o=this.state.callingCode;return i(o?r?"".concat(o," ").concat(r):o:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return r}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.complexPrefixBeforeNationalSignificantNumber,o=r.nationalPrefix,a=n,s=i||o;return s&&(a=s+a),a}},{key:"getNonFormattedNumber",value:function(){var r=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(r?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var r=this.getNonFormattedNumber();if(r)return r.replace(/[\+\d]/g,tr)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var r=this.state.callingCode,n=this.metadata.getCountryCodesForCallingCode(r);return n&&n.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(c$(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var r=this.state,n=r.digits,i=r.callingCode,o=r.country,a=r.nationalSignificantNumber;if(!!n){if(this.isInternational())return i?"+"+i+a:"+"+n;if(o||i){var s=o?this.metadata.countryCallingCode():i;return"+"+s+a}}}},{key:"getNumber",value:function(){var r=this.state,n=r.nationalSignificantNumber,i=r.carrierCode,o=r.callingCode,a=this._getCountry();if(!!n&&!(!a&&!o)){var s=new o$(a||o,n,this.metadata.metadata);return i&&(s.carrierCode=i),s}}},{key:"isPossible",value:function(){var r=this.getNumber();return r?r.isPossible():!1}},{key:"isValid",value:function(){var r=this.getNumber();return r?r.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),e}();function gu(){return QT(TI,arguments)}function Nl(e){return d$.call(this,e,H2)}Nl.prototype=Object.create(d$.prototype,{});Nl.prototype.constructor=Nl;const IA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3579
3578
  `,ba=O("<style></style>"),AA=O('<div class="py-2 flex flex-col font-sans"><sl-input class="input" type="tel" placeholder="( ) ___-____"><p slot="help-text" class="text-red-500 pt-2 h-[21px] font-sans"></p></sl-input></div>'),DA=O('<div class="flex items-center pb-2"><p class="text-gray-700 text-sm"></p></div>'),RA=O('<p class="pl-1 text-red-500">*</p>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-phone-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1},e=>{let t;const r=n=>{const i=new CustomEvent("photon-phone-changed",{composed:!0,bubbles:!0,detail:{phone:n}});t?.dispatchEvent(i)};return Tt(()=>{e.value&&r(gu(e.value,"US").format("E.164"))}),[(()=>{const n=ba.cloneNode(!0);return _(n,ze),n})(),(()=>{const n=ba.cloneNode(!0);return _(n,Bt),n})(),(()=>{const n=ba.cloneNode(!0);return _(n,Vt),n})(),(()=>{const n=ba.cloneNode(!0);return _(n,IA),n})(),(()=>{const n=V(()=>document.importNode(AA,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,_(n,(()=>{const s=pe(()=>!!e.label);return()=>s()?(()=>{const c=DA.cloneNode(!0),l=c.firstChild;return _(l,()=>e.label),_(c,(()=>{const u=pe(()=>!!e.required);return()=>u()?RA.cloneNode(!0):null})(),null),c})():null})(),i),i.addEventListener("sl-input",s=>{r(gu(s.target.value,"US").format("E.164"))}),i._$owner=P(),_(o,()=>e.helpText),W(s=>{const c=!!e.invalid,l=e.disabled,u=e.invalid;return c!==s._v$&&i.classList.toggle("invalid",s._v$=c),l!==s._v$2&&(i.disabled=s._v$2=l),u!==s._v$3&&(i.invalid=s._v$3=u),s},{_v$:void 0,_v$2:void 0,_v$3:void 0}),W(()=>i.value=e.value?new Nl("US").input(gu(e.value,"US").formatNational()):""),n})()]});const FA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3580
3579
  `,LA=O("<div><style></style><style></style></div>"),eh=[{id:"1",name:"MALE"},{id:"2",name:"FEMALE"},{id:"3",name:"UNKNOWN"}];$e("photon-sex-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{let t;const r=n=>{const i=new CustomEvent("photon-sex-selected",{composed:!0,bubbles:!0,detail:{sex:n}});t?.dispatchEvent(i)};return(()=>{const n=LA.cloneNode(!0),i=n.firstChild,o=i.nextSibling,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-data-selected",s=>{r(s.detail.data.name)}),_(i,ze),_(o,FA),_(n,z(Nt,{data:eh,get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:s=>s.name,showOverflow:!0,noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return eh.filter(s=>s.name.toUpperCase()===e.selected)?.[0]}}),null),n})()});const MA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3581
- `,jA=O("<div><style></style><style></style></div>"),bu=[{id:"1",name:"Male/Man"},{id:"2",name:"Female/Woman"},{id:"3",name:"TransMale/TransMan"},{id:"4",name:"TransFemale/TransWoman"},{id:"5",name:"Genderqueery/Gender nonconforming"},{id:"6",name:"Something else"},{id:"7",name:"Decline to answer"}];$e("photon-gender-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=F("");let n;const i=s=>s.length===0?bu:bu.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),o=s=>{const c=new CustomEvent("photon-gender-selected",{composed:!0,bubbles:!0,detail:{gender:s}});n?.dispatchEvent(c)},a=()=>{const s=new CustomEvent("photon-gender-deselected",{composed:!0,bubbles:!0,detail:{}});n?.dispatchEvent(s)};return(()=>{const s=jA.cloneNode(!0),c=s.firstChild,l=c.nextSibling,u=n;return typeof u=="function"?ee(u,s):n=s,s.addEventListener("photon-data-selected",d=>{o(d.detail.data.name)}),s.addEventListener("photon-data-unselected",d=>{a()}),_(c,ze),_(l,MA),_(s,z(Nt,{get data(){return i(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:d=>d.name,showOverflow:!0,onSearchChange:async d=>{r(d)},onHide:async()=>{r("")},noDataMsg:"",get optional(){return!e.required},get helpText(){return e.helpText},get selectedData(){return bu.filter(d=>d.name===e.selected)?.[0]}}),null),s})()});const zA=O('<div class="flex align-center justify-center h-screen"><sl-spinner style="font-size: 3rem;" class="mt-8"></sl-spinner></div>'),UA=O('<photon-card title="Personal"><div class="flex flex-col xs:flex-row xs:gap-4"><photon-text-input class="flex-grow min-w-[40%]" debounce-time="0" label="First Name"></photon-text-input><photon-text-input class="min-w-[48%]" debounce-time="0" label="Last Name"></photon-text-input></div><div class="flex flex-col xs:flex-row items-center xs:gap-4"><photon-datepicker class="pb-3 flex-grow w-full xs:min-w-[40%]" label="Date of Birth"></photon-datepicker><photon-phone-input class="w-full xs:min-w-[48%]" label="Phone Number"></photon-phone-input></div><div class="flex flex-col xs:flex-row justify-between xs:gap-4"><div class="flex-grow w-full xs:min-w-[40%]"><photon-gender-input label="Gender" required="false"></photon-gender-input></div><div class="flex-grow w-full xs:min-w-[40%]"><photon-sex-input label="Sex at Birth" required="false"></photon-sex-input></div></div><photon-text-input debounce-time="0" label="Email"></photon-text-input><hr class="py-2"><p class="font-sans text-lg flex-grow">Address</p><photon-text-input debounce-time="0" label="Street 1"></photon-text-input><photon-text-input debounce-time="0" label="Street 2"></photon-text-input><photon-text-input debounce-time="0" label="City"></photon-text-input><div class="flex gap-4 pb-5 xs:pb-2"><photon-state-input class="flex-grow min-w-[40%]" label="State" required="false"></photon-state-input><photon-text-input debounce-time="0" class="flex-grow min-w-[40%]" label="Zip Code"></photon-text-input></div><hr class="py-2"><p class="font-sans text-lg flex-grow">Preferred Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></photon-card>'),VA=O('<div class="w-full h-full relative"><style></style><style></style><style></style></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const BA=(e,t)=>{const r=e.selectedPatient.data?.address;return t.address_zip?.value&&Y$(t.address_zip?.value)&&t.address_zip?.value!=r?.postalCode?t.address_zip?.value:r?`${r.street1} ${r.street2??""} ${r.city}, ${r.state} ${r.postalCode}`:""};$e("photon-patient-form",{patientId:""},({patientId:e})=>{let t;const r=rt(),{store:n,actions:i}=nc,{actions:o}=q2,{store:a,actions:s}=O2({firstName:void 0,lastName:void 0,dateOfBirth:void 0,phone:void 0,gender:void 0,sex:void 0,email:void 0,address_street1:void 0,address_street2:void 0,address_city:void 0,address_state:void 0,address_zip:void 0,preferredPharmacy:void 0});s.registerValidator({key:"firstName",validator:ot(Ir(zt(),1,1/0),"Please enter a first name...")}),s.registerValidator({key:"lastName",validator:ot(Ir(zt(),1,1/0),"Please enter a last name...")}),s.registerValidator({key:"sex",validator:ot(m7(eh.map(l=>l.name)),"Please enter Sex at Birth...")}),s.registerValidator({key:"phone",validator:ot(Ir(zt(),12),"Please enter a valid phone number...")}),s.registerValidator({key:"email",validator:ot(Ev([iP(),Vy()]),"Please enter a valid email...")}),s.registerValidator({key:"address_zip",validator:ot(Ev([Ir(nP(),0,10),Vy()]),"Please enter a valid zip code...")}),Tt(()=>{e&&i.getSelectedPatient(r.getSDK(),e)});const c=l=>{const u=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{form:l,actions:s,selected:n,reset:()=>{s.reset(),i.reset(),o.reset()}}});t?.dispatchEvent(u)};return me(()=>{n.selectedPatient.data&&(s.updateFormValue({key:"firstName",value:n.selectedPatient.data.name.first}),s.updateFormValue({key:"lastName",value:n.selectedPatient.data.name.last}),s.updateFormValue({key:"phone",value:n.selectedPatient.data.phone}),s.updateFormValue({key:"gender",value:n.selectedPatient.data.gender}),s.updateFormValue({key:"sex",value:n.selectedPatient.data.sex}),s.updateFormValue({key:"email",value:n.selectedPatient.data.email}),s.updateFormValue({key:"address_street1",value:n.selectedPatient.data.address?.street1}),s.updateFormValue({key:"address_street2",value:n.selectedPatient.data.address?.street2}),s.updateFormValue({key:"address_city",value:n.selectedPatient.data.address?.city}),s.updateFormValue({key:"address_state",value:n.selectedPatient.data.address?.state}),s.updateFormValue({key:"address_zip",value:n.selectedPatient.data.address?.postalCode}),s.updateFormValue({key:"preferredPharmacy",value:n.selectedPatient.data.preferredPharmacies?.[0]?.id}))}),me(()=>{c(a)}),(()=>{const l=VA.cloneNode(!0),u=l.firstChild,d=u.nextSibling,f=d.nextSibling,h=t;return typeof h=="function"?ee(h,l):t=l,_(u,ze),_(d,Bt),_(f,Vt),_(l,z(re,{get when(){return n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(zA,!0)),m=p.firstChild;return m._$owner=P(),p}}),null),_(l,z(re,{get when(){return!n.selectedPatient.isLoading},get children(){return z(W2,{permissions:["write:patient"],get children(){const p=V(()=>document.importNode(UA,!0)),m=p.firstChild,v=m.firstChild,y=v.nextSibling,b=m.nextSibling,g=b.firstChild,w=g.nextSibling,x=b.nextSibling,E=x.firstChild,S=E.firstChild,T=E.nextSibling,M=T.firstChild,L=x.nextSibling,K=L.nextSibling,D=K.nextSibling,R=D.nextSibling,U=R.nextSibling,j=U.nextSibling,Y=j.nextSibling,oe=Y.firstChild,ae=oe.nextSibling,xe=Y.nextSibling,_e=xe.nextSibling,A=_e.nextSibling;return p._$owner=P(),v.disabled=!!e,v.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"firstName",value:N.detail.input})}),v._$owner=P(),y.disabled=!!e,y.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"lastName",value:N.detail.input})}),y._$owner=P(),g.disabled=!!e,g.addEventListener("photon-datepicker-selected",async N=>{s.updateFormValue({key:"dateOfBirth",value:N.detail.date})}),g._$owner=P(),w.addEventListener("photon-phone-changed",async N=>{s.updateFormValue({key:"phone",value:N.detail.phone})}),w._$owner=P(),S.addEventListener("photon-gender-selected",N=>{s.updateFormValue({key:"gender",value:N.detail.gender})}),S.addEventListener("photon-gender-deselected",N=>{s.updateFormValue({key:"gender",value:void 0})}),S._$owner=P(),M.disabled=!!e,M.addEventListener("photon-sex-selected",N=>{s.updateFormValue({key:"sex",value:N.detail.sex})}),M.addEventListener("photon-sex-deselected",N=>{s.updateFormValue({key:"sex",value:void 0})}),M._$owner=P(),L.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"email",value:N.detail.input})}),L._$owner=P(),R.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_street1",value:N.detail.input})}),R._$owner=P(),U.optional=!0,U.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_street2",value:N.detail.input})}),U._$owner=P(),j.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_city",value:N.detail.input})}),j._$owner=P(),oe.addEventListener("photon-state-selected",N=>{s.updateFormValue({key:"address_state",value:N.detail.state})}),oe._$owner=P(),ae.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_zip",value:N.detail.input})}),ae._$owner=P(),A.addEventListener("photon-pharmacy-selected",N=>{s.updateFormValue({key:"preferredPharmacy",value:N.detail.pharmacy.id})}),A.patientId=e,A._$owner=P(),W(N=>{const xt=a.firstName?.error,St=a.firstName?.error,Mt=a.lastName?.error,It=a.lastName?.error,H=a.dateOfBirth?.error,Q=a.dateOfBirth?.error,X=a.phone?.error,ne=a.phone?.error,ue=a.gender?.error,de=a.gender?.error!==void 0,Ue=n.selectedPatient.data?.gender,Me=a.sex?.error,st=a.sex?.error!==void 0,jt=n.selectedPatient.data?.sex,fr=a.email?.error,Br=a.email?.error,Je=a.address_street1?.error,qi=a.address_street1?.error,cp=a.address_street2?.error,up=a.address_street2?.error,dp=a.address_city?.error,fp=a.address_city?.error,hp=a.address_state?.error,pp=a.address_state?.error!==void 0,mp=a.state?.value??n.selectedPatient.data?.address?.state,vp=a.address_zip?.error,yp=a.address_zip?.error,gp=BA(n,a),bp=n.selectedPatient.data?.preferredPharmacies?.[0]?.id;return xt!==N._v$&&(v.invalid=N._v$=xt),St!==N._v$2&&(v.helpText=N._v$2=St),Mt!==N._v$3&&(y.invalid=N._v$3=Mt),It!==N._v$4&&(y.helpText=N._v$4=It),H!==N._v$5&&(g.invalid=N._v$5=H),Q!==N._v$6&&(g.helpText=N._v$6=Q),X!==N._v$7&&(w.invalid=N._v$7=X),ne!==N._v$8&&(w.helpText=N._v$8=ne),ue!==N._v$9&&(S.helpText=N._v$9=ue),de!==N._v$10&&(S.invalid=N._v$10=de),Ue!==N._v$11&&(S.selected=N._v$11=Ue),Me!==N._v$12&&(M.helpText=N._v$12=Me),st!==N._v$13&&(M.invalid=N._v$13=st),jt!==N._v$14&&(M.selected=N._v$14=jt),fr!==N._v$15&&(L.invalid=N._v$15=fr),Br!==N._v$16&&(L.helpText=N._v$16=Br),Je!==N._v$17&&(R.invalid=N._v$17=Je),qi!==N._v$18&&(R.helpText=N._v$18=qi),cp!==N._v$19&&(U.invalid=N._v$19=cp),up!==N._v$20&&(U.helpText=N._v$20=up),dp!==N._v$21&&(j.invalid=N._v$21=dp),fp!==N._v$22&&(j.helpText=N._v$22=fp),hp!==N._v$23&&(oe.helpText=N._v$23=hp),pp!==N._v$24&&(oe.invalid=N._v$24=pp),mp!==N._v$25&&(oe.selected=N._v$25=mp),vp!==N._v$26&&(ae.invalid=N._v$26=vp),yp!==N._v$27&&(ae.helpText=N._v$27=yp),gp!==N._v$28&&(A.address=N._v$28=gp),bp!==N._v$29&&(A.selected=N._v$29=bp),N},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0,_v$18:void 0,_v$19:void 0,_v$20:void 0,_v$21:void 0,_v$22:void 0,_v$23:void 0,_v$24:void 0,_v$25:void 0,_v$26:void 0,_v$27:void 0,_v$28:void 0,_v$29:void 0}),W(()=>v.value=a.firstName?.value??n.selectedPatient.data?.name.first),W(()=>y.value=a.lastName?.value??n.selectedPatient.data?.name.last),W(()=>g.value=a.dateOfBirth?.value??n.selectedPatient.data?.dateOfBirth),W(()=>w.value=a.phone?.value??n.selectedPatient.data?.phone),W(()=>L.value=a.email?.value??n.selectedPatient.data?.email),W(()=>R.value=a.address_street1?.value??n.selectedPatient.data?.address?.street1),W(()=>U.value=a.address_street2?.value??n.selectedPatient.data?.address?.street2),W(()=>j.value=a.address_city?.value??n.selectedPatient.data?.address?.city),W(()=>ae.value=a.address_zip?.value??n.selectedPatient.data?.address?.postalCode),p}})}}),null),l})()});const WA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3580
+ `,jA=O("<div><style></style><style></style></div>"),bu=[{id:"1",name:"Male/Man"},{id:"2",name:"Female/Woman"},{id:"3",name:"TransMale/TransMan"},{id:"4",name:"TransFemale/TransWoman"},{id:"5",name:"Genderqueery/Gender nonconforming"},{id:"6",name:"Something else"},{id:"7",name:"Decline to answer"}];$e("photon-gender-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=F("");let n;const i=s=>s.length===0?bu:bu.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),o=s=>{const c=new CustomEvent("photon-gender-selected",{composed:!0,bubbles:!0,detail:{gender:s}});n?.dispatchEvent(c)},a=()=>{const s=new CustomEvent("photon-gender-deselected",{composed:!0,bubbles:!0,detail:{}});n?.dispatchEvent(s)};return(()=>{const s=jA.cloneNode(!0),c=s.firstChild,l=c.nextSibling,u=n;return typeof u=="function"?ee(u,s):n=s,s.addEventListener("photon-data-selected",d=>{o(d.detail.data.name)}),s.addEventListener("photon-data-unselected",d=>{a()}),_(c,ze),_(l,MA),_(s,z(Nt,{get data(){return i(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:d=>d.name,showOverflow:!0,onSearchChange:async d=>{r(d)},onHide:async()=>{r("")},noDataMsg:"",get optional(){return!e.required},get helpText(){return e.helpText},get selectedData(){return bu.filter(d=>d.name===e.selected)?.[0]}}),null),s})()});const zA=O('<div class="flex align-center justify-center h-screen"><sl-spinner style="font-size: 3rem;" class="mt-8"></sl-spinner></div>'),UA=O('<photon-card title="Personal"><div class="flex flex-col xs:flex-row xs:gap-4"><photon-text-input class="flex-grow min-w-[40%]" debounce-time="0" label="First Name"></photon-text-input><photon-text-input class="min-w-[48%]" debounce-time="0" label="Last Name"></photon-text-input></div><div class="flex flex-col xs:flex-row items-center xs:gap-4"><photon-datepicker class="pb-3 flex-grow w-full xs:min-w-[40%]" label="Date of Birth"></photon-datepicker><photon-phone-input class="w-full xs:min-w-[48%]" label="Phone Number"></photon-phone-input></div><div class="flex flex-col xs:flex-row justify-between xs:gap-4"><div class="flex-grow w-full xs:min-w-[40%]"><photon-gender-input label="Gender" required="false"></photon-gender-input></div><div class="flex-grow w-full xs:min-w-[40%]"><photon-sex-input label="Sex at Birth" required="false"></photon-sex-input></div></div><photon-text-input debounce-time="0" label="Email"></photon-text-input><hr class="py-2"><p class="font-sans text-lg flex-grow">Address</p><photon-text-input debounce-time="0" label="Street 1"></photon-text-input><photon-text-input debounce-time="0" label="Street 2"></photon-text-input><photon-text-input debounce-time="0" label="City"></photon-text-input><div class="flex gap-4 pb-5 xs:pb-2"><photon-state-input class="flex-grow min-w-[40%]" label="State" required="false"></photon-state-input><photon-text-input debounce-time="0" class="flex-grow min-w-[40%]" label="Zip Code"></photon-text-input></div><hr class="py-2"><p class="font-sans text-lg flex-grow">Preferred Local Pharmacy</p><photon-pharmacy-search></photon-pharmacy-search></photon-card>'),VA=O('<div class="w-full h-full relative"><style></style><style></style><style></style></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");const BA=(e,t)=>{const r=e.selectedPatient.data?.address;return t.address_zip?.value&&Y$(t.address_zip?.value)&&t.address_zip?.value!=r?.postalCode?t.address_zip?.value:r?`${r.street1} ${r.street2??""} ${r.city}, ${r.state} ${r.postalCode}`:""};$e("photon-patient-form",{patientId:""},({patientId:e})=>{let t;const r=rt(),{store:n,actions:i}=nc,{actions:o}=q2,{store:a,actions:s}=O2({firstName:void 0,lastName:void 0,dateOfBirth:void 0,phone:void 0,gender:void 0,sex:void 0,email:void 0,address_street1:void 0,address_street2:void 0,address_city:void 0,address_state:void 0,address_zip:void 0,preferredPharmacy:void 0});s.registerValidator({key:"firstName",validator:ot(Ir(zt(),1,1/0),"Please enter a first name...")}),s.registerValidator({key:"lastName",validator:ot(Ir(zt(),1,1/0),"Please enter a last name...")}),s.registerValidator({key:"sex",validator:ot(m7(eh.map(l=>l.name)),"Please enter Sex at Birth...")}),s.registerValidator({key:"phone",validator:ot(Ir(zt(),12),"Please enter a valid phone number...")}),s.registerValidator({key:"email",validator:ot(Ev([iP(),Vy()]),"Please enter a valid email...")}),s.registerValidator({key:"address_zip",validator:ot(Ev([Ir(nP(),0,10),Vy()]),"Please enter a valid zip code...")}),Tt(()=>{e&&i.getSelectedPatient(r.getSDK(),e)});const c=l=>{const u=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{form:l,actions:s,selected:n,reset:()=>{s.reset(),i.reset(),o.reset()}}});t?.dispatchEvent(u)};return me(()=>{n.selectedPatient.data&&(s.updateFormValue({key:"firstName",value:n.selectedPatient.data.name.first}),s.updateFormValue({key:"lastName",value:n.selectedPatient.data.name.last}),s.updateFormValue({key:"phone",value:n.selectedPatient.data.phone}),s.updateFormValue({key:"gender",value:n.selectedPatient.data.gender}),s.updateFormValue({key:"sex",value:n.selectedPatient.data.sex}),s.updateFormValue({key:"email",value:n.selectedPatient.data.email}),s.updateFormValue({key:"address_street1",value:n.selectedPatient.data.address?.street1}),s.updateFormValue({key:"address_street2",value:n.selectedPatient.data.address?.street2}),s.updateFormValue({key:"address_city",value:n.selectedPatient.data.address?.city}),s.updateFormValue({key:"address_state",value:n.selectedPatient.data.address?.state}),s.updateFormValue({key:"address_zip",value:n.selectedPatient.data.address?.postalCode}),s.updateFormValue({key:"preferredPharmacy",value:n.selectedPatient.data.preferredPharmacies?.[0]?.id}))}),me(()=>{c(a)}),(()=>{const l=VA.cloneNode(!0),u=l.firstChild,d=u.nextSibling,f=d.nextSibling,h=t;return typeof h=="function"?ee(h,l):t=l,_(u,ze),_(d,Bt),_(f,Vt),_(l,z(re,{get when(){return n.selectedPatient.isLoading},get children(){const p=V(()=>document.importNode(zA,!0)),m=p.firstChild;return m._$owner=P(),p}}),null),_(l,z(re,{get when(){return!n.selectedPatient.isLoading},get children(){return z(W2,{permissions:["write:patient"],get children(){const p=V(()=>document.importNode(UA,!0)),m=p.firstChild,v=m.firstChild,y=v.nextSibling,b=m.nextSibling,g=b.firstChild,w=g.nextSibling,x=b.nextSibling,E=x.firstChild,S=E.firstChild,T=E.nextSibling,M=T.firstChild,L=x.nextSibling,K=L.nextSibling,D=K.nextSibling,R=D.nextSibling,U=R.nextSibling,j=U.nextSibling,Y=j.nextSibling,oe=Y.firstChild,ae=oe.nextSibling,xe=Y.nextSibling,_e=xe.nextSibling,A=_e.nextSibling;return p._$owner=P(),v.disabled=!!e,v.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"firstName",value:N.detail.input})}),v._$owner=P(),y.disabled=!!e,y.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"lastName",value:N.detail.input})}),y._$owner=P(),g.disabled=!!e,g.addEventListener("photon-datepicker-selected",async N=>{s.updateFormValue({key:"dateOfBirth",value:N.detail.date})}),g._$owner=P(),w.addEventListener("photon-phone-changed",async N=>{s.updateFormValue({key:"phone",value:N.detail.phone})}),w._$owner=P(),S.addEventListener("photon-gender-selected",N=>{s.updateFormValue({key:"gender",value:N.detail.gender})}),S.addEventListener("photon-gender-deselected",N=>{s.updateFormValue({key:"gender",value:void 0})}),S._$owner=P(),M.disabled=!!e,M.addEventListener("photon-sex-selected",N=>{s.updateFormValue({key:"sex",value:N.detail.sex})}),M.addEventListener("photon-sex-deselected",N=>{s.updateFormValue({key:"sex",value:void 0})}),M._$owner=P(),L.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"email",value:N.detail.input})}),L._$owner=P(),R.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_street1",value:N.detail.input})}),R._$owner=P(),U.optional=!0,U.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_street2",value:N.detail.input})}),U._$owner=P(),j.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_city",value:N.detail.input})}),j._$owner=P(),oe.addEventListener("photon-state-selected",N=>{s.updateFormValue({key:"address_state",value:N.detail.state})}),oe._$owner=P(),ae.addEventListener("photon-input-changed",async N=>{s.updateFormValue({key:"address_zip",value:N.detail.input})}),ae._$owner=P(),A.addEventListener("photon-pharmacy-selected",N=>{s.updateFormValue({key:"preferredPharmacy",value:N.detail.pharmacy.id})}),A.patientId=e,A._$owner=P(),W(N=>{const xt=a.firstName?.error,St=a.firstName?.error,Mt=a.lastName?.error,It=a.lastName?.error,H=a.dateOfBirth?.error,Q=a.dateOfBirth?.error,X=a.phone?.error,ne=a.phone?.error,ue=a.gender?.error,de=a.gender?.error!==void 0,Ue=n.selectedPatient.data?.gender,Me=a.sex?.error,st=a.sex?.error!==void 0,jt=n.selectedPatient.data?.sex,fr=a.email?.error,Br=a.email?.error,Ze=a.address_street1?.error,qi=a.address_street1?.error,cp=a.address_street2?.error,up=a.address_street2?.error,dp=a.address_city?.error,fp=a.address_city?.error,hp=a.address_state?.error,pp=a.address_state?.error!==void 0,mp=a.state?.value??n.selectedPatient.data?.address?.state,vp=a.address_zip?.error,yp=a.address_zip?.error,gp=BA(n,a),bp=n.selectedPatient.data?.preferredPharmacies?.[0]?.id;return xt!==N._v$&&(v.invalid=N._v$=xt),St!==N._v$2&&(v.helpText=N._v$2=St),Mt!==N._v$3&&(y.invalid=N._v$3=Mt),It!==N._v$4&&(y.helpText=N._v$4=It),H!==N._v$5&&(g.invalid=N._v$5=H),Q!==N._v$6&&(g.helpText=N._v$6=Q),X!==N._v$7&&(w.invalid=N._v$7=X),ne!==N._v$8&&(w.helpText=N._v$8=ne),ue!==N._v$9&&(S.helpText=N._v$9=ue),de!==N._v$10&&(S.invalid=N._v$10=de),Ue!==N._v$11&&(S.selected=N._v$11=Ue),Me!==N._v$12&&(M.helpText=N._v$12=Me),st!==N._v$13&&(M.invalid=N._v$13=st),jt!==N._v$14&&(M.selected=N._v$14=jt),fr!==N._v$15&&(L.invalid=N._v$15=fr),Br!==N._v$16&&(L.helpText=N._v$16=Br),Ze!==N._v$17&&(R.invalid=N._v$17=Ze),qi!==N._v$18&&(R.helpText=N._v$18=qi),cp!==N._v$19&&(U.invalid=N._v$19=cp),up!==N._v$20&&(U.helpText=N._v$20=up),dp!==N._v$21&&(j.invalid=N._v$21=dp),fp!==N._v$22&&(j.helpText=N._v$22=fp),hp!==N._v$23&&(oe.helpText=N._v$23=hp),pp!==N._v$24&&(oe.invalid=N._v$24=pp),mp!==N._v$25&&(oe.selected=N._v$25=mp),vp!==N._v$26&&(ae.invalid=N._v$26=vp),yp!==N._v$27&&(ae.helpText=N._v$27=yp),gp!==N._v$28&&(A.address=N._v$28=gp),bp!==N._v$29&&(A.selected=N._v$29=bp),N},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0,_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0,_v$9:void 0,_v$10:void 0,_v$11:void 0,_v$12:void 0,_v$13:void 0,_v$14:void 0,_v$15:void 0,_v$16:void 0,_v$17:void 0,_v$18:void 0,_v$19:void 0,_v$20:void 0,_v$21:void 0,_v$22:void 0,_v$23:void 0,_v$24:void 0,_v$25:void 0,_v$26:void 0,_v$27:void 0,_v$28:void 0,_v$29:void 0}),W(()=>v.value=a.firstName?.value??n.selectedPatient.data?.name.first),W(()=>y.value=a.lastName?.value??n.selectedPatient.data?.name.last),W(()=>g.value=a.dateOfBirth?.value??n.selectedPatient.data?.dateOfBirth),W(()=>w.value=a.phone?.value??n.selectedPatient.data?.phone),W(()=>L.value=a.email?.value??n.selectedPatient.data?.email),W(()=>R.value=a.address_street1?.value??n.selectedPatient.data?.address?.street1),W(()=>U.value=a.address_street2?.value??n.selectedPatient.data?.address?.street2),W(()=>j.value=a.address_city?.value??n.selectedPatient.data?.address?.city),W(()=>ae.value=a.address_zip?.value??n.selectedPatient.data?.address?.postalCode),p}})}}),null),l})()});const WA=`.input::part(base){border-radius:var(--photon-border-radius, .5rem)}.invalid::part(base){--tw-border-opacity: 1;border-color:rgb(239 68 68/var(--tw-border-opacity));border-width:2px}.invalid::part(form-control-help-text){--tw-text-opacity: 1;color:rgb(239 68 68/var(--tw-text-opacity))}
3582
3581
  `,qA=O("<div><style></style><style></style></div>"),$u=[{id:"1",name:"AL"},{id:"2",name:"AK"},{id:"3",name:"AZ"},{id:"4",name:"AR"},{id:"5",name:"CA"},{id:"6",name:"CO"},{id:"7",name:"CT"},{id:"8",name:"DE"},{id:"9",name:"DC"},{id:"10",name:"FL"},{id:"11",name:"GA"},{id:"12",name:"HI"},{id:"13",name:"ID"},{id:"14",name:"IL"},{id:"15",name:"IN"},{id:"16",name:"IA"},{id:"17",name:"KS"},{id:"18",name:"KY"},{id:"19",name:"LA"},{id:"20",name:"ME"},{id:"21",name:"MD"},{id:"22",name:"MA"},{id:"23",name:"MI"},{id:"24",name:"MN"},{id:"25",name:"MS"},{id:"26",name:"MO"},{id:"27",name:"MT"},{id:"28",name:"NB"},{id:"29",name:"NV"},{id:"30",name:"NH"},{id:"31",name:"NJ"},{id:"32",name:"NM"},{id:"33",name:"NY"},{id:"34",name:"NC"},{id:"35",name:"ND"},{id:"36",name:"OH"},{id:"37",name:"OK"},{id:"38",name:"OR"},{id:"39",name:"PA"},{id:"40",name:"PR"},{id:"41",name:"RI"},{id:"42",name:"SC"},{id:"43",name:"SD"},{id:"44",name:"TN"},{id:"45",name:"TX"},{id:"46",name:"UT"},{id:"47",name:"VT"},{id:"48",name:"VA"},{id:"49",name:"WA"},{id:"50",name:"WV"},{id:"51",name:"WI"},{id:"52",name:"WY"}];$e("photon-state-input",{label:void 0,required:!1,value:void 0,invalid:!1,helpText:void 0,disabled:!1,selected:void 0},e=>{const[t,r]=F("");let n;const i=a=>{const s=new CustomEvent("photon-state-selected",{composed:!0,bubbles:!0,detail:{state:a}});n?.dispatchEvent(s)},o=a=>a.length===0?$u:$u.filter(s=>s.name.toLowerCase().includes(a.toLowerCase()));return(()=>{const a=qA.cloneNode(!0),s=a.firstChild,c=s.nextSibling,l=n;return typeof l=="function"?ee(l,a):n=a,a.addEventListener("photon-data-selected",u=>{i(u.detail.data.name)}),_(s,ze),_(c,WA),_(a,z(Nt,{get data(){return o(t())},get label(){return e.label},get required(){return e.required},placeholder:"",get disabled(){return e.disabled},get invalid(){return e.invalid},isLoading:!1,hasMore:!1,displayAccessor:u=>u.name,showOverflow:!0,onSearchChange:async u=>{r(u)},onHide:async()=>{r("")},noDataMsg:"",optional:!1,get helpText(){return e.helpText},get selectedData(){return $u.filter(u=>u.name===e.selected)?.[0]}}),null),a})()});const HA=O("<sl-icon></sl-icon>"),GA=O('<div class="flex-1 flex justify-end"></div>'),QA=O('<div class="absolute top-0 left-0 w-full z-10"><style></style><photon-dialog confirm-text="Yes, Close" cancel-text="Keep Editing"><p class="font-sans text-lg xs:text-base"></p></photon-dialog><div class="flex items-center px-4 py-2 md:px-8 md:py-3 bg-white fixed w-full z-10 shadow-card"><div class="md:w-1/3 flex justify-start"><photon-button class="close-button" variant="naked"><div class="text-black text-3xl"><sl-icon name="x"></sl-icon></div></photon-button></div><div class="w-full md:w-2/3 flex flex-col md:flex-row"><div class="mb-2 md:mb-0 flex-1 flex justify-end md:justify-center items-center"><p class="ml-1 font-sans text-xl font-medium"></p></div></div></div><div class="w-full h-full bg-[#f7f4f4] pt-28 xs:pt-28 lg:pt-20"><div class="pt-4 pb-52 px-4 w-full h-full sm:w-[600px] xs:mx-auto"></div></div></div>'),f$=({closeTitle:e="Lose unsaved changes?",closeBody:t="You will not be able to recover unsaved changes.",headerRight:r,title:n,titleIconName:i,form:o,onClosed:a,checkShouldWarn:s=()=>!1})=>{let c;const[l,u]=F(!1);return(()=>{const d=V(()=>document.importNode(QA,!0)),f=d.firstChild,h=f.nextSibling,p=h.firstChild,m=h.nextSibling,v=m.firstChild,y=v.firstChild,b=y.firstChild,g=b.firstChild,w=v.nextSibling,x=w.firstChild,E=x.firstChild,S=m.nextSibling,T=S.firstChild,M=c;return typeof M=="function"?ee(M,d):c=d,_(f,ze),h.label=e,h.addEventListener("photon-dialog-confirmed",()=>{u(!1),a()}),h.addEventListener("photon-dialog-canceled",()=>{u(!1)}),h._$owner=P(),_(p,t),y.addEventListener("click",()=>{s()?u(!0):a()}),y._$owner=P(),g.style.setProperty("display","block"),g._$owner=P(),_(x,z(re,{when:i,get children(){const L=V(()=>document.importNode(HA,!0));return L.name=i,L._$owner=P(),L}}),E),_(E,n),_(w,z(re,{when:r,get children(){const L=GA.cloneNode(!0);return _(L,r),L}}),null),_(T,o),W(()=>h.open=l()),d})()},KA=O("<div></div>"),YA=O('<div class="flex space-x-2"><photon-button size="sm" variant="outline">Save and Create Prescription</photon-button><photon-button size="sm">Save</photon-button></div>'),XA=O('<photon-patient-form slot="form"></photon-patient-form>');$e("photon-patient-dialog",{patientId:"",open:!1},e=>{let t;const r=rt(),[n,i]=F(!1),[o,a]=F(void 0),[s,c]=F(void 0),[l,u]=F(void 0),d=(m,v=!1)=>{const y=new CustomEvent("photon-patient-updated",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},f=(m,v=!1)=>{const y=new CustomEvent("photon-patient-created",{composed:!0,bubbles:!0,detail:{patientId:m,createPrescription:v}});t?.dispatchEvent(y)},h=()=>{const m=new CustomEvent("photon-patient-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(m)},p=async(m,v,y,b=!1)=>{i(!0);let g=["firstName","lastName","phone","sex","email"];if(m.address_street1?.value!==void 0||m.address_city?.value!==void 0||m.address_state?.value!==void 0||m.address_zip?.value!==void 0)v.registerValidator({key:"address_street1",validator:ot(Ir(zt(),1,1/0),"Please enter a valid Street 1..")}),v.registerValidator({key:"address_city",validator:ot(Ir(zt(),1,1/0),"Please enter a valid City..")}),v.registerValidator({key:"address_state",validator:ot(Ir(zt(),2,2),"Please enter a valid State..")}),g=[...g,"address_zip","address_street1","address_city","address_state"];else{const x=["address_street1","address_city","address_state"];for(const E of x)v.unRegisterValidator(E)}if(v.validate(g),v.hasErrors(g))return i(!1),!0;m.preferredPharmacy.value&&y.selectedPatient.data?.preferredPharmacies&&y.selectedPatient.data?.preferredPharmacies.length!==0&&!y.selectedPatient.data?.preferredPharmacies?.map(x=>x?.id).filter(x=>x!==null).includes(m.preferredPharmacy.value)&&await r.getSDK().clinical.patient.removePatientPreferredPharmacy({})({variables:{patientId:e.patientId,pharmacyId:y.selectedPatient.data?.preferredPharmacies[0].id},awaitRefetchQueries:!1});const w={...e?.patientId?{id:e.patientId}:{},name:{first:m.firstName.value,last:m.lastName.value},gender:m.gender.value,email:m.email.value,phone:m.phone.value,dateOfBirth:m.dateOfBirth.value,sex:m.sex.value,address:m.address_street1.value!==void 0?{street1:m.address_street1.value,street2:m.address_street2.value,city:m.address_city.value,state:m.address_state.value,postalCode:m.address_zip.value,country:"US"}:void 0,preferredPharmacies:m.preferredPharmacy.value?[m.preferredPharmacy.value]:[]};if(e?.patientId)await r.getSDK().clinical.patient.updatePatient({})({variables:w,awaitRefetchQueries:!1}),d(e.patientId,b);else{const E=await r.getSDK().clinical.patient.createPatient({})({variables:w,awaitRefetchQueries:!1});f(E?.data?.createPatient?.id||"",b)}i(!1),v.resetStores(),e.open=!1};return(()=>{const m=KA.cloneNode(!0),v=t;return typeof v=="function"?ee(v,m):t=m,_(m,z(re,{get when(){return e.open},get children(){return z(f$,{onClosed:()=>{h(),l().resetStores(),e.open=!1},get title(){return e?.patientId?"Update Patient":"Create Patient"},get titleIconName(){return e?.patientId?"pencil-square":"person-plus"},get headerRight(){return(()=>{const y=V(()=>document.importNode(YA,!0)),b=y.firstChild,g=b.nextSibling;return b.$$click=()=>p(o(),l(),s(),!0),b._$owner=P(),g.$$click=()=>p(o(),l(),s(),!1),g._$owner=P(),W(w=>{const x=n(),E=n(),S=n(),T=n();return x!==w._v$&&(b.disabled=w._v$=x),E!==w._v$2&&(b.loading=w._v$2=E),S!==w._v$3&&(g.disabled=w._v$3=S),T!==w._v$4&&(g.loading=w._v$4=T),w},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),y})()},get form(){return(()=>{const y=V(()=>document.importNode(XA,!0));return y.addEventListener("photon-form-updated",b=>{a(b.detail.form),u(Object.assign({},b.detail.actions,{resetStores:b.detail.reset})),c(b.detail.selected)}),y._$owner=P(),W(()=>y.patientId=e.patientId),y})()}})}})),m})()});Ni(["click"]);const ZA=O("<photon-patient-dialog></photon-patient-dialog>");$e("photon-update-patient-dialog",{patientId:"",open:!1},e=>(console.warn("photon-update-patient-dialog will be deprecated soon. Please use photon-patient-dialog instead."),(()=>{const t=V(()=>document.importNode(ZA,!0));return t._$owner=P(),W(r=>{const n=e.patientId,i=e.open;return n!==r._v$&&(t.patientId=r._v$=n),i!==r._v$2&&(t.open=r._v$2=i),r},{_v$:void 0,_v$2:void 0}),t})()));const JA=O('<div class="w-full"></div>'),eD=()=>{let e;const t=rt(),[r,n]=F(!1),[i,o]=F(""),[a,s]=F(),[c,l]=F([]),u=d=>{const f=new CustomEvent("photon-name-selected",{composed:!0,bubbles:!0,detail:{medicationId:d}});e?.dispatchEvent(f)};return me(async()=>{i().length>0&&(n(!0),V(async()=>{const d=String(Math.random());s(d);const{data:f}=await t.getSDK().clinical.searchMedication.getConcepts({name:i()});d===a()&&l(f.medicationConcepts??[]),n(!1)}))},[i]),(()=>{const d=JA.cloneNode(!0),f=e;return typeof f=="function"?ee(f,d):e=d,d.addEventListener("photon-data-selected",h=>{u(h.detail.data.id)}),_(d,z(Nt,{get data(){return c()},label:"Medication Name",placeholder:"Enter a medication name...",get isLoading(){return r()},hasMore:!1,displayAccessor:h=>h.name,onSearchChange:async h=>o(h),onHide:async()=>{o("")},noDataMsg:"No medications found",required:!1})),d})()},tD=O('<div class="w-full"></div>'),rD=e=>{const t=rt(),[r,n]=F(),[i,o]=F(!1),[a]=F(""),[s,c]=F([]),l=h=>{const p=new CustomEvent("photon-strength-selected",{composed:!0,bubbles:!0,detail:{strengthId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-strength-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};me(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getStrengths({id:e.medicationId});h===r()&&c(p.medicationStrengths??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=tD.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),_(h,z(Nt,{actionRef:d,get data(){return s()},label:"Strength",get disabled(){return e.disabled},placeholder:"Select a strength...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No strengths found",required:!1})),h})()},nD=O('<div class="w-full"></div>'),iD=e=>{const t=rt(),[r,n]=F(),[i,o]=F(!1),[a]=F(""),[s,c]=F([]),l=h=>{const p=new CustomEvent("photon-route-selected",{composed:!0,bubbles:!0,detail:{routeId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-route-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};me(async()=>{d.clear(),e.medicationId.length>0&&(o(!0),V(async()=>{const h=String(Math.random());n(h);const{data:p}=await t.getSDK().clinical.searchMedication.getRoutes({id:e.medicationId});h===r()&&c(p.medicationRoutes??[]),o(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=nD.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),_(h,z(Nt,{actionRef:d,get data(){return s()},label:"Route",get disabled(){return e.disabled},placeholder:"Select a route...",get isLoading(){return i()},hasMore:!1,displayAccessor:m=>m.name,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No routes found",required:!1})),h})()},oD=O('<div class="w-full"></div>'),aD=e=>{const t=rt(),[r,n]=F(!1),[i,o]=F(),[a]=F(""),[s,c]=F([]),l=h=>{const p=new CustomEvent("photon-form-selected",{composed:!0,bubbles:!0,detail:{formId:h}});f?.dispatchEvent(p)},u=()=>{const h=new CustomEvent("photon-form-deselected",{composed:!0,bubbles:!0,detail:{}});f?.dispatchEvent(h)};me(async()=>{d.clear(),e.medicationId.length>0&&(n(!0),V(async()=>{const h=String(Math.random());o(h);const{data:p}=await t.getSDK().clinical.searchMedication.getForms({id:e.medicationId});h===i()&&c(p.medicationForms??[]),n(!1)}))},[e.medicationId]);const d={};let f;return(()=>{const h=oD.cloneNode(!0),p=f;return typeof p=="function"?ee(p,h):f=h,h.addEventListener("photon-data-selected",m=>{l(m.detail.data.id)}),h.addEventListener("photon-data-unselected",()=>{u()}),_(h,z(Nt,{actionRef:d,get data(){return s()},label:"Form",get disabled(){return e.disabled},placeholder:"Select a form...",get isLoading(){return r()},hasMore:!1,displayAccessor:m=>m.form,onSearchChange:async m=>a(m),onHide:async()=>{a("")},noDataMsg:"No forms found",required:!1})),h})()},sD=O('<photon-checkbox label="Add Medication to Catalog"></photon-checkbox>'),lD=O('<div><p class="font-sans text-lg text-gray-700 text-center pb-2">Advanced Medication Search</p><div class="flex flex-col xs:flex-row gap-4"></div><div class="flex flex-col xs:flex-row gap-4"></div><hr class="my-8"><p class="font-sans text-gray-700 pb-4">Select a medication:</p><div><photon-radio-group></photon-radio-group></div></div>'),cD=O("<photon-radio-card></photon-radio-card>");tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-med-search",{},()=>{let e;const t=rt(),[r,n]=F(""),[i,o]=F(""),[a,s]=F(""),[c,l]=F(""),[u,d]=F([]),[f,h]=F(!1),[p,m]=F(void 0),[v,y]=F(""),b=(g,w)=>{const x=new CustomEvent("photon-form-updated",{composed:!0,bubbles:!0,detail:{medication:g,addToCatalog:w,catalogId:v()}});e?.dispatchEvent(x)};return Tt(async()=>{const{data:g}=await t.getSDK().clinical.catalog.getCatalogs();g.catalogs.length>0&&y(g.catalogs[0].id)}),me(()=>{const g=c()||a()||i()||r();g.length>0&&V(async()=>{const{data:w}=await t.getSDK().clinical.searchMedication.getProducts({id:g});h(!1),m(void 0),d(w.medicationProducts)})},[r,i,a,c]),me(()=>{p()&&b(p(),f())},[p,f]),(()=>{const g=V(()=>document.importNode(lD,!0)),w=g.firstChild,x=w.nextSibling,E=x.nextSibling,S=E.nextSibling,T=S.nextSibling,M=T.nextSibling,L=M.firstChild,K=e;return typeof K=="function"?ee(K,g):e=g,g.addEventListener("photon-name-selected",D=>{n(D.detail.medicationId)}),g.addEventListener("photon-strength-selected",D=>{o(D.detail.strengthId)}),g.addEventListener("photon-strength-deselected",D=>{o("")}),g.addEventListener("photon-route-selected",D=>{s(D.detail.routeId)}),g.addEventListener("photon-route-deselected",D=>{s("")}),g.addEventListener("photon-form-selected",D=>{l(D.detail.formId)}),g.addEventListener("photon-form-deselected",D=>{l("")}),_(x,z(eD,{}),null),_(x,z(rD,{get medicationId(){return r()},get disabled(){return r().length==0}}),null),_(E,z(iD,{get medicationId(){return i()},get disabled(){return i().length==0}}),null),_(E,z(aD,{get medicationId(){return a()},get disabled(){return a().length==0}}),null),M.addEventListener("photon-option-selected",D=>{m(D.detail.value)}),L._$owner=P(),_(L,z(Rl,{get each(){return u().filter((D,R,U)=>{const j=U.findIndex(Y=>Y.name===D.name);if(R===j)return!0}).sort((D,R)=>D.name.toLowerCase()>R.name.toLowerCase()?-1:1)},children:D=>(()=>{const R=V(()=>document.importNode(cD,!0));return R.value=D,R._$owner=P(),_(R,()=>D.name),R})()})),_(g,z(re,{get when(){return v().length>0},get children(){const D=V(()=>document.importNode(sD,!0));return D.addEventListener("photon-checkbox-toggled",R=>h(R.detail.checked)),D._$owner=P(),W(()=>D.disabled=!p()),W(()=>D.checked=f()),D}}),null),g})()});var uD=ft`
3583
3582
  ${wt}
3584
3583
 
@@ -3700,4 +3699,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3700
3699
 
3701
3700
  <slot part="label" class="radio__label"></slot>
3702
3701
  </span>
3703
- `}};kr.styles=uD;$([Or()],kr.prototype,"checked",2);$([Or()],kr.prototype,"hasFocus",2);$([k()],kr.prototype,"value",2);$([k({reflect:!0})],kr.prototype,"size",2);$([k({type:Boolean,reflect:!0})],kr.prototype,"disabled",2);$([De("checked")],kr.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],kr.prototype,"handleDisabledChange",1);kr=$([_t("sl-radio")],kr);const dD=O('<div><style></style><photon-card><div class="flex items-center gap-2"><p class="font-sans flex-grow text-gray-600 text-sm"><slot></slot></p><input type="radio"></div></photon-card></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-card",{selected:!1,value:""},e=>{let t;const r=()=>{const n=new CustomEvent("photon-radio-selected",{composed:!0,bubbles:!0,detail:{value:e.value}});t?.dispatchEvent(n)};return(()=>{const n=V(()=>document.importNode(dD,!0)),i=n.firstChild,o=i.nextSibling,a=o.firstChild,s=a.firstChild,c=s.firstChild,l=s.nextSibling,u=t;return typeof u=="function"?ee(u,n):t=n,_(i,ze),o.addEventListener("click",()=>r()),o._$owner=P(),c._$owner=P(),W(()=>l.checked=e.selected),n})()});function fD(e){const[t,r]=gn(Array());return me(()=>{if(!e)return;const n=()=>{r(e()?.assignedElements()||[])};return e()?.addEventListener("slotchange",n)},[e]),t}const hD=O('<div><style></style><div class="flex flex-col gap-3"><slot></slot></div></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-group",{},()=>{let e;const[t,r]=F(),n=fD(t),i=o=>{const a=new CustomEvent("photon-option-selected",{composed:!0,bubbles:!0,detail:{value:o}});e?.dispatchEvent(a)};return(()=>{const o=hD.cloneNode(!0),a=o.firstChild,s=a.nextSibling,c=s.firstChild,l=e;return typeof l=="function"?ee(l,o):e=o,o.addEventListener("photon-radio-selected",u=>{u.stopImmediatePropagation(),u.stopPropagation();for(const d of n)d.value.id===u.detail.value.id||d.value===u.detail.value?d.selected=!0:d.selected=!1;i(u.detail.value)}),_(a,ze),ee(u=>r(u),c),c._$owner=P(),o})()});const pD=O('<div><photon-dialog cancel-text="Back" confirm-text="Select Medication" width="min-content"><photon-med-search></photon-med-search></photon-dialog></div>');$e("photon-med-search-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0}},e=>{const t=rt();let r;const[n,i]=F(void 0),[o,a]=F(!1),[s,c]=F(""),[l,u]=F(!1),d=()=>{const f=new CustomEvent("photon-medication-selected",{composed:!0,bubbles:!0,detail:{medication:n()}});r?.dispatchEvent(f)};return(()=>{const f=V(()=>document.importNode(pD,!0)),h=f.firstChild,p=h.firstChild,m=r;return typeof m=="function"?ee(m,f):r=f,f.addEventListener("photon-form-updated",v=>{i(v.detail.medication),a(v.detail.addToCatalog),c(v.detail.catalogId)}),h.addEventListener("photon-dialog-confirmed",async()=>{u(!0),o()&&await t.getSDK().clinical.catalog.addToCatalog({})({variables:{catalogId:s(),treatmentId:n()?.id},awaitRefetchQueries:!1}),d(),u(!1),e.open=!1}),h.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),h._$owner=P(),p._$owner=P(),W(v=>{const y=e.open,b=l(),g=!n();return y!==v._v$&&(h.open=v._v$=y),b!==v._v$2&&(h.loading=v._v$2=b),g!==v._v$3&&(h.disableSubmit=v._v$3=g),v},{_v$:void 0,_v$2:void 0,_v$3:void 0}),f})()});const mD=O('<div class="min-w-[125px]"></div>'),Ng=[{id:"mcg/kg",name:"mcg/kg"},{id:"mg/kg",name:"mg/kg"},{id:"g/kg",name:"g/kg"}],vD=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=mD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ng.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ng[1]}})),i})()},yD=O('<div class="min-w-[125px]"></div>'),Ig=[{id:"mg",name:"mg"},{id:"mcg",name:"mcg"},{id:"g",name:"g"}],gD=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=yD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ig.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ig[0]}})),i})()},bD=O('<div class="min-w-[125px]"></div>'),Ag=[{id:"mL",name:"mL"},{id:"L",name:"L"}],$D=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=bD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ag.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ag[0]}})),i})()},wD=O('<div class="min-w-[125px]"></div>'),Dg=[{id:"lbs",name:"lbs"},{id:"kgs",name:"kgs"}],_D=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=wD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Dg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Dg[0]}})),i})()},xD=O('<div><style></style><div class="flex flex-col xs:flex-row items-start xs:items-center gap-2 pb-2"><p class="font-sans text-lg">Selected Drug: </p></div><div class="flex flex-col"><p class="font-sans pb-1">Input</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Dosage</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Weight</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans pb-1">Liquid Formation</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Drug Amount</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3 flex-shrink"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Per Volume</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans">Result</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Liquid Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div></div></div>'),SD=O("<p></p>"),kD=O('<p class="text-gray-500 font-sans italic">None selected</p>'),wu=(e,t)=>!!((t==="kgs"||t==="g")&&e.includes("kg")||(t==="lbs"||t==="oz")&&e.includes("lb")),ED=(e,t)=>e.includes("kg")&&t.unit==="oz"?t.value/16*.453592:e.includes("kg")&&t.unit==="lbs"?t.value*.453592:e.includes("lb")&&t.unit==="kgs"?t.value*2.20462:e.includes("lb")&&t.unit==="g"?t.value/1e3*2.20462:0,OD=(e,t)=>t==="mcg"&&e.split("/")[0]==="mcg"||t==="mg"&&e.split("/")[0]==="mg"||t==="g"&&e.split("/")[0]==="g",CD=(e,t)=>e.includes("mcg")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("mcg")&&t.unit==="g"?t.value*(1e3*1e3):e.includes("mg")&&t.unit==="mcg"?t.value/1e3:e.includes("mg")&&t.unit==="g"?t.value*1e3:e.includes("g")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("g")&&t.unit==="mg"?t.value/1e3:0,PD=(e,t)=>wu(e.unit,t.unit)&&t.unit==="g"?e.value*(t.value/1e3):wu(e.unit,t.unit)&&t.unit==="oz"?e.value*(t.value/16):wu(e.unit,t.unit)?e.value*t.value:e.value*ED(e.unit,t),TD=(e,t,r,n,i)=>r===0||r.toString().length===0||parseInt(r.toString(),10)===0||window.isNaN(r)?0:OD(t,n)?e*i/r:e*i/CD(t,{value:r,unit:n});$e("photon-dosage-calculator",{medication:void 0},e=>{let t;const[r,n]=F(0),[i,o]=F(0),[a,s]=F(0),[c,l]=F(0),[u,d]=F("mg/kg"),[f,h]=F("lbs"),[p,m]=F("mg"),[v,y]=F("mL"),[b,g]=F(""),[w,x]=F(""),E=S=>{const T=new CustomEvent("photon-dosage-selected",{composed:!0,bubbles:!0,detail:{value:Number(S?w().split(" ")[0]:b().split(" ")[0]),unit:S?w().split(" ")[1]:b().split(" ")[1]}});t?.dispatchEvent(T)};return me(()=>{let S=PD({value:r(),unit:u()},{value:a(),unit:f()});S.toString().split(".").length>1&&S.toString().split(".")[1].length>4&&(S=parseFloat(S.toFixed(4))),g(`${S} ${u().split("/")[0]}`);let T=TD(S,u().split("/")[0],i(),p(),c());i.toString().split(".").length>1&&i.toString().split(".")[1].length>4&&(T=parseFloat(T.toFixed(4))),x(`${T} ${v()}`)},[r,u,f,a,i,c,p,v]),(()=>{const S=V(()=>document.importNode(xD,!0)),T=S.firstChild,M=T.nextSibling;M.firstChild;const L=M.nextSibling,K=L.firstChild,D=K.nextSibling,R=D.firstChild,U=R.nextSibling,j=D.nextSibling,Y=j.firstChild,oe=Y.nextSibling,ae=j.nextSibling,xe=ae.nextSibling,_e=xe.firstChild,A=_e.nextSibling,N=xe.nextSibling,xt=N.firstChild,St=xt.nextSibling,Mt=N.nextSibling,It=Mt.nextSibling,H=It.firstChild,Q=H.nextSibling,X=Q.nextSibling,ne=X.firstChild,ue=ne.nextSibling,de=It.nextSibling,Ue=de.firstChild,Me=Ue.nextSibling,st=Me.nextSibling,jt=st.firstChild,fr=jt.nextSibling,Br=t;return typeof Br=="function"?ee(Br,S):t=S,_(T,ze),_(M,(()=>{const Je=pe(()=>!!e.medication);return()=>Je()?(()=>{const qi=SD.cloneNode(!0);return _(qi,()=>e.medication.name),qi})():kD.cloneNode(!0)})(),null),D.addEventListener("photon-input-changed",Je=>{n(Je.detail.input)}),D.addEventListener("photon-unit-selected",Je=>{d(Je.detail.unit)}),U._$owner=P(),_(D,z(vD,{}),null),j.addEventListener("photon-input-changed",Je=>{s(Je.detail.input)}),j.addEventListener("photon-unit-selected",Je=>{h(Je.detail.unit)}),oe._$owner=P(),_(j,z(_D,{}),null),xe.addEventListener("photon-input-changed",Je=>{o(Je.detail.input)}),xe.addEventListener("photon-unit-selected",Je=>{m(Je.detail.unit)}),A._$owner=P(),_(xe,z(gD,{}),null),N.addEventListener("photon-input-changed",Je=>{l(Je.detail.input)}),N.addEventListener("photon-unit-selected",Je=>{y(Je.detail.unit)}),St._$owner=P(),_(N,z($D,{}),null),Q.disabled=!0,Q._$owner=P(),X.addEventListener("photon-clicked",()=>E(!1)),X._$owner=P(),ue._$owner=P(),Me.disabled=!0,Me._$owner=P(),st.addEventListener("photon-clicked",()=>E(!0)),st._$owner=P(),fr._$owner=P(),W(()=>Q.value=b()??"0"),W(()=>Me.value=w()??"0"),S})()});const ND=O('<div><photon-dialog label="Dosage Calculator"><photon-dosage-calculator></photon-dosage-calculator></photon-dialog></div>');$e("photon-dosage-calculator-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0},medication:{value:void 0,reflect:!0,notify:!1,attribute:"medication",parse:!0}},e=>{rt();let t;const r=(n,i)=>{const o=new CustomEvent("photon-dose-selected",{composed:!0,bubbles:!0,detail:{value:n,unit:i}});t?.dispatchEvent(o)};return(()=>{const n=V(()=>document.importNode(ND,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-dosage-selected",s=>{s.stopImmediatePropagation(),s.stopPropagation(),r(s.detail.value,s.detail.unit),e.open=!1}),i.header=!0,i.hideFooter=!0,i.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),i._$owner=P(),o._$owner=P(),W(s=>{const c=e.open,l=e.medication;return c!==s._v$&&(i.open=s._v$=c),l!==s._v$2&&(o.medication=s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()});const ID=O(`<div><photon-dialog label="Lose Unsaved Prescription?" confirm-text="Yes, Continue" cancel-text="Keep Editing" width="500px"><p class="font-sans text-lg xs:text-base">You have a prescription "<!>" that hasn't been added. Please add it or continue.</p></photon-dialog></div>`),AD=O('<div class="flex flex-row sm:flex-col md:flex-col lg:flex-row gap-2 justify-end items-end"><photon-button size="sm" variant="outline" loading-text="Save prescriptions">Save prescriptions</photon-button><photon-button size="sm" loading-text="Save and create order">Save and create order</photon-button></div>'),DD=O('<div class="w-full h-full bg-[#f7f4f4]"><div class="p-4 w-full h-full sm:w-[600px] xs:mx-auto"><photon-prescribe-workflow hide-submit="true"></photon-prescribe-workflow></div></div>'),RD=O('<div class="pt-2"><sl-alert variant="danger" open><div class="flex items-start xs:items-center gap-4"><sl-icon slot="icon" name="exclamation-octagon" class="text-red-500" style="font-size: 24px;"></sl-icon><p class="font-sans"></p></div></sl-alert></div>'),FD=e=>e().notes?.value.length>0||e().instructions?.value.length>0||e().treatment?.value||e().patient?.value||e().dispenseAsWritten?.value!=!1||e().dispenseQuantity?.value!=1||e().dispenseUnit?.value!="Each"||e().daysSupply?.value!=30||e().refillsInput?.value!=0||e().addToTemplates?.value!=!1||e().effectiveDate?.value!=oc(new Date,"yyyy-MM-dd").toString()||e().draftPrescriptions?.value.length>0;$e("photon-multirx-form-wrapper",{hideTemplates:!1,patientId:void 0,templateIds:void 0},e=>{let t;const r=rt(),[n,i]=F(!1),[o,a]=F([]),[s,c]=F(!1),[l,u]=F(!1),[d,f]=F(),[h,p]=F(),[m,v]=F(!1),{actions:y}=nc;Tt(async()=>{const E=await r.getSDK().authentication.getAccessToken();Z1(E).permissions?.includes("write:prescription")&&c(!0)});const b=(E,S,T)=>{const M=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{patientId:T,prescriptionIds:S,createOrder:E}});t?.dispatchEvent(M)},g=()=>{const E=new CustomEvent("photon-prescriptions-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(E)},w=async(E,S,T)=>{a([]);const M=["patient","draftPrescriptions"];if(S.validate(M),!S.hasErrors(M)){u(!0),S.updateFormValue({key:"errors",value:[]});const K=r.getSDK().clinical.prescription.createPrescriptions({}),D=r.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),R=[];for(const U of E.draftPrescriptions.value){if(U.addToTemplates)try{const{errors:Y}=await D({variables:{catalogId:U.catalogId,treatmentId:U.treatment.id,dispenseAsWritten:U.dispenseAsWritten,dispenseQuantity:U.dispenseQuantity,dispenseUnit:U.dispenseUnit,fillsAllowed:U.refillsInput+1,daysSupply:U.daysSupply,instructions:U.instructions,notes:U.notes},awaitRefetchQueries:!1});Y&&a(Y)}catch(Y){a([Y])}const j={daysSupply:U.daysSupply,dispenseAsWritten:U.dispenseAsWritten,dispenseQuantity:U.dispenseQuantity,dispenseUnit:U.dispenseUnit,effectiveDate:U.effectiveDate,instructions:U.instructions,notes:U.notes,patientId:E.patient?.value.id,fillsAllowed:U.refillsInput+1,treatmentId:U.treatment.id};R.push(j)}if(o().length>0)return;try{const{data:U,errors:j}=await K({variables:{prescriptions:R},refetchQueries:[],awaitRefetchQueries:!1});if(j){a(j);return}b(T,U.createPrescriptions.map(Y=>Y.id),E.patient?.value.id)}catch(U){a([U])}u(!1)}},x=()=>w(d(),h(),!0);return(()=>{const E=V(()=>document.importNode(ID,!0)),S=E.firstChild,T=S.firstChild,M=T.firstChild,L=M.nextSibling;L.nextSibling;const K=t;return typeof K=="function"?ee(K,E):t=E,S.addEventListener("photon-dialog-confirmed",()=>{v(!1),x()}),S.addEventListener("photon-dialog-canceled",()=>{v(!1)}),S._$owner=P(),_(T,()=>d()?.treatment?.value?.name,L),_(E,z(f$,{closeTitle:"Lose unsaved prescriptions?",closeBody:"You will not be able to recover unsaved prescriptions.",onClosed:()=>{g(),y.clearSelectedPatient(),e.open=!1},checkShouldWarn:()=>FD(d),title:"New Prescriptions",titleIconName:"prescription",get headerRight(){return(()=>{const D=V(()=>document.importNode(AD,!0)),R=D.firstChild,U=R.nextSibling;return R.addEventListener("photon-clicked",()=>w(d(),h(),!1)),R._$owner=P(),U.addEventListener("photon-clicked",()=>d()?.treatment?.value?.name?v(!0):x()),U._$owner=P(),W(j=>{const Y=!n()||!s(),oe=l(),ae=!n()||!s(),xe=l();return Y!==j._v$&&(R.disabled=j._v$=Y),oe!==j._v$2&&(R.loading=j._v$2=oe),ae!==j._v$3&&(U.disabled=j._v$3=ae),xe!==j._v$4&&(U.loading=j._v$4=xe),j},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),D})()},get form(){return(()=>{const D=V(()=>document.importNode(DD,!0)),R=D.firstChild,U=R.firstChild;return _(D,z(re,{get when(){return o().length>0},get children(){return z(Rl,{get each(){return o()},children:j=>(()=>{const Y=V(()=>document.importNode(RD,!0)),oe=Y.firstChild,ae=oe.firstChild,xe=ae.firstChild,_e=xe.nextSibling;return oe._$owner=P(),xe._$owner=P(),_(_e,()=>j.message),Y})()})}}),R),U.addEventListener("photon-form-validate",j=>{i(j.detail.canSubmit),p(j.detail.actions),f(j.detail.form)}),U._$owner=P(),W(j=>{const Y=e.hideTemplates,oe=l(),ae=e.patientId,xe=e.templateIds;return Y!==j._v$5&&(U.hideTemplates=j._v$5=Y),oe!==j._v$6&&(U.loading=j._v$6=oe),ae!==j._v$7&&(U.patientId=j._v$7=ae),xe!==j._v$8&&(U.templateIds=j._v$8=xe),j},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),D})()}}),null),W(()=>S.open=m()),E})()});
3702
+ `}};kr.styles=uD;$([Or()],kr.prototype,"checked",2);$([Or()],kr.prototype,"hasFocus",2);$([k()],kr.prototype,"value",2);$([k({reflect:!0})],kr.prototype,"size",2);$([k({type:Boolean,reflect:!0})],kr.prototype,"disabled",2);$([De("checked")],kr.prototype,"handleCheckedChange",1);$([De("disabled",{waitUntilFirstUpdate:!0})],kr.prototype,"handleDisabledChange",1);kr=$([_t("sl-radio")],kr);const dD=O('<div><style></style><photon-card><div class="flex items-center gap-2"><p class="font-sans flex-grow text-gray-600 text-sm"><slot></slot></p><input type="radio"></div></photon-card></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-card",{selected:!1,value:""},e=>{let t;const r=()=>{const n=new CustomEvent("photon-radio-selected",{composed:!0,bubbles:!0,detail:{value:e.value}});t?.dispatchEvent(n)};return(()=>{const n=V(()=>document.importNode(dD,!0)),i=n.firstChild,o=i.nextSibling,a=o.firstChild,s=a.firstChild,c=s.firstChild,l=s.nextSibling,u=t;return typeof u=="function"?ee(u,n):t=n,_(i,ze),o.addEventListener("click",()=>r()),o._$owner=P(),c._$owner=P(),W(()=>l.checked=e.selected),n})()});function fD(e){const[t,r]=gn(Array());return me(()=>{if(!e)return;const n=()=>{r(e()?.assignedElements()||[])};return e()?.addEventListener("slotchange",n)},[e]),t}const hD=O('<div><style></style><div class="flex flex-col gap-3"><slot></slot></div></div>');tt("https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.82/dist/");$e("photon-radio-group",{},()=>{let e;const[t,r]=F(),n=fD(t),i=o=>{const a=new CustomEvent("photon-option-selected",{composed:!0,bubbles:!0,detail:{value:o}});e?.dispatchEvent(a)};return(()=>{const o=hD.cloneNode(!0),a=o.firstChild,s=a.nextSibling,c=s.firstChild,l=e;return typeof l=="function"?ee(l,o):e=o,o.addEventListener("photon-radio-selected",u=>{u.stopImmediatePropagation(),u.stopPropagation();for(const d of n)d.value.id===u.detail.value.id||d.value===u.detail.value?d.selected=!0:d.selected=!1;i(u.detail.value)}),_(a,ze),ee(u=>r(u),c),c._$owner=P(),o})()});const pD=O('<div><photon-dialog cancel-text="Back" confirm-text="Select Medication" width="min-content"><photon-med-search></photon-med-search></photon-dialog></div>');$e("photon-med-search-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0}},e=>{const t=rt();let r;const[n,i]=F(void 0),[o,a]=F(!1),[s,c]=F(""),[l,u]=F(!1),d=()=>{const f=new CustomEvent("photon-medication-selected",{composed:!0,bubbles:!0,detail:{medication:n()}});r?.dispatchEvent(f)};return(()=>{const f=V(()=>document.importNode(pD,!0)),h=f.firstChild,p=h.firstChild,m=r;return typeof m=="function"?ee(m,f):r=f,f.addEventListener("photon-form-updated",v=>{i(v.detail.medication),a(v.detail.addToCatalog),c(v.detail.catalogId)}),h.addEventListener("photon-dialog-confirmed",async()=>{u(!0),o()&&await t.getSDK().clinical.catalog.addToCatalog({})({variables:{catalogId:s(),treatmentId:n()?.id},awaitRefetchQueries:!1}),d(),u(!1),e.open=!1}),h.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),h._$owner=P(),p._$owner=P(),W(v=>{const y=e.open,b=l(),g=!n();return y!==v._v$&&(h.open=v._v$=y),b!==v._v$2&&(h.loading=v._v$2=b),g!==v._v$3&&(h.disableSubmit=v._v$3=g),v},{_v$:void 0,_v$2:void 0,_v$3:void 0}),f})()});const mD=O('<div class="min-w-[125px]"></div>'),Ng=[{id:"mcg/kg",name:"mcg/kg"},{id:"mg/kg",name:"mg/kg"},{id:"g/kg",name:"g/kg"}],vD=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=mD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ng.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ng[1]}})),i})()},yD=O('<div class="min-w-[125px]"></div>'),Ig=[{id:"mg",name:"mg"},{id:"mcg",name:"mcg"},{id:"g",name:"g"}],gD=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=yD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ig.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ig[0]}})),i})()},bD=O('<div class="min-w-[125px]"></div>'),Ag=[{id:"mL",name:"mL"},{id:"L",name:"L"}],$D=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=bD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Ag.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Ag[0]}})),i})()},wD=O('<div class="min-w-[125px]"></div>'),Dg=[{id:"lbs",name:"lbs"},{id:"kgs",name:"kgs"}],_D=()=>{const[e,t]=F(""),r=i=>{const o=new CustomEvent("photon-unit-selected",{composed:!0,bubbles:!0,detail:{unit:i}});n?.dispatchEvent(o)};let n;return(()=>{const i=wD.cloneNode(!0),o=n;return typeof o=="function"?ee(o,i):n=i,i.addEventListener("photon-data-selected",a=>{r(a.detail.data.name)}),_(i,z(Nt,{get data(){return Dg.filter(a=>a.name.includes(e()))},forceLabelSize:!0,isLoading:!1,disabled:!1,placeholder:"Select a unit...",hasMore:!1,displayAccessor:a=>a.name,onSearchChange:async a=>t(a),onHide:async()=>{t("")},noDataMsg:"No units found",required:!1,get selectedData(){return Dg[0]}})),i})()},xD=O('<div><style></style><div class="flex flex-col xs:flex-row items-start xs:items-center gap-2 pb-2"><p class="font-sans text-lg">Selected Drug: </p></div><div class="flex flex-col"><p class="font-sans pb-1">Input</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Dosage</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Weight</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans pb-1">Liquid Formation</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Drug Amount</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3 flex-shrink"></photon-number-input></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-56 xs:basis-60">Per Volume</p><photon-number-input min="0" value="0" class="mb-1.5 max-w-[140px] pl-3 xs:pl-4 pr-3"></photon-number-input></div><p class="font-sans">Result</p><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div><div class="flex items-center"><p class="font-sans text-gray-700 text-sm mb-7 basis-36 xs:basis-[10.5rem]">Liquid Dose</p><photon-text-input class="mb-1.5 max-w-[180px] pl-3 pr-3"></photon-text-input><photon-button class="mb-7">Use<sl-icon name="chevron-right" slot="postfix"></sl-icon></photon-button></div></div></div>'),SD=O("<p></p>"),kD=O('<p class="text-gray-500 font-sans italic">None selected</p>'),wu=(e,t)=>!!((t==="kgs"||t==="g")&&e.includes("kg")||(t==="lbs"||t==="oz")&&e.includes("lb")),ED=(e,t)=>e.includes("kg")&&t.unit==="oz"?t.value/16*.453592:e.includes("kg")&&t.unit==="lbs"?t.value*.453592:e.includes("lb")&&t.unit==="kgs"?t.value*2.20462:e.includes("lb")&&t.unit==="g"?t.value/1e3*2.20462:0,OD=(e,t)=>t==="mcg"&&e.split("/")[0]==="mcg"||t==="mg"&&e.split("/")[0]==="mg"||t==="g"&&e.split("/")[0]==="g",CD=(e,t)=>e.includes("mcg")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("mcg")&&t.unit==="g"?t.value*(1e3*1e3):e.includes("mg")&&t.unit==="mcg"?t.value/1e3:e.includes("mg")&&t.unit==="g"?t.value*1e3:e.includes("g")&&t.unit==="mcg"?t.value/(1e3*1e3):e.includes("g")&&t.unit==="mg"?t.value/1e3:0,PD=(e,t)=>wu(e.unit,t.unit)&&t.unit==="g"?e.value*(t.value/1e3):wu(e.unit,t.unit)&&t.unit==="oz"?e.value*(t.value/16):wu(e.unit,t.unit)?e.value*t.value:e.value*ED(e.unit,t),TD=(e,t,r,n,i)=>r===0||r.toString().length===0||parseInt(r.toString(),10)===0||window.isNaN(r)?0:OD(t,n)?e*i/r:e*i/CD(t,{value:r,unit:n});$e("photon-dosage-calculator",{medication:void 0},e=>{let t;const[r,n]=F(0),[i,o]=F(0),[a,s]=F(0),[c,l]=F(0),[u,d]=F("mg/kg"),[f,h]=F("lbs"),[p,m]=F("mg"),[v,y]=F("mL"),[b,g]=F(""),[w,x]=F(""),E=S=>{const T=new CustomEvent("photon-dosage-selected",{composed:!0,bubbles:!0,detail:{value:Number(S?w().split(" ")[0]:b().split(" ")[0]),unit:S?w().split(" ")[1]:b().split(" ")[1]}});t?.dispatchEvent(T)};return me(()=>{let S=PD({value:r(),unit:u()},{value:a(),unit:f()});S.toString().split(".").length>1&&S.toString().split(".")[1].length>4&&(S=parseFloat(S.toFixed(4))),g(`${S} ${u().split("/")[0]}`);let T=TD(S,u().split("/")[0],i(),p(),c());i.toString().split(".").length>1&&i.toString().split(".")[1].length>4&&(T=parseFloat(T.toFixed(4))),x(`${T} ${v()}`)},[r,u,f,a,i,c,p,v]),(()=>{const S=V(()=>document.importNode(xD,!0)),T=S.firstChild,M=T.nextSibling;M.firstChild;const L=M.nextSibling,K=L.firstChild,D=K.nextSibling,R=D.firstChild,U=R.nextSibling,j=D.nextSibling,Y=j.firstChild,oe=Y.nextSibling,ae=j.nextSibling,xe=ae.nextSibling,_e=xe.firstChild,A=_e.nextSibling,N=xe.nextSibling,xt=N.firstChild,St=xt.nextSibling,Mt=N.nextSibling,It=Mt.nextSibling,H=It.firstChild,Q=H.nextSibling,X=Q.nextSibling,ne=X.firstChild,ue=ne.nextSibling,de=It.nextSibling,Ue=de.firstChild,Me=Ue.nextSibling,st=Me.nextSibling,jt=st.firstChild,fr=jt.nextSibling,Br=t;return typeof Br=="function"?ee(Br,S):t=S,_(T,ze),_(M,(()=>{const Ze=pe(()=>!!e.medication);return()=>Ze()?(()=>{const qi=SD.cloneNode(!0);return _(qi,()=>e.medication.name),qi})():kD.cloneNode(!0)})(),null),D.addEventListener("photon-input-changed",Ze=>{n(Ze.detail.input)}),D.addEventListener("photon-unit-selected",Ze=>{d(Ze.detail.unit)}),U._$owner=P(),_(D,z(vD,{}),null),j.addEventListener("photon-input-changed",Ze=>{s(Ze.detail.input)}),j.addEventListener("photon-unit-selected",Ze=>{h(Ze.detail.unit)}),oe._$owner=P(),_(j,z(_D,{}),null),xe.addEventListener("photon-input-changed",Ze=>{o(Ze.detail.input)}),xe.addEventListener("photon-unit-selected",Ze=>{m(Ze.detail.unit)}),A._$owner=P(),_(xe,z(gD,{}),null),N.addEventListener("photon-input-changed",Ze=>{l(Ze.detail.input)}),N.addEventListener("photon-unit-selected",Ze=>{y(Ze.detail.unit)}),St._$owner=P(),_(N,z($D,{}),null),Q.disabled=!0,Q._$owner=P(),X.addEventListener("photon-clicked",()=>E(!1)),X._$owner=P(),ue._$owner=P(),Me.disabled=!0,Me._$owner=P(),st.addEventListener("photon-clicked",()=>E(!0)),st._$owner=P(),fr._$owner=P(),W(()=>Q.value=b()??"0"),W(()=>Me.value=w()??"0"),S})()});const ND=O('<div><photon-dialog label="Dosage Calculator"><photon-dosage-calculator></photon-dosage-calculator></photon-dialog></div>');$e("photon-dosage-calculator-dialog",{open:{value:!1,reflect:!0,notify:!1,attribute:"open",parse:!0},medication:{value:void 0,reflect:!0,notify:!1,attribute:"medication",parse:!0}},e=>{rt();let t;const r=(n,i)=>{const o=new CustomEvent("photon-dose-selected",{composed:!0,bubbles:!0,detail:{value:n,unit:i}});t?.dispatchEvent(o)};return(()=>{const n=V(()=>document.importNode(ND,!0)),i=n.firstChild,o=i.firstChild,a=t;return typeof a=="function"?ee(a,n):t=n,n.addEventListener("photon-dosage-selected",s=>{s.stopImmediatePropagation(),s.stopPropagation(),r(s.detail.value,s.detail.unit),e.open=!1}),i.header=!0,i.hideFooter=!0,i.addEventListener("photon-dialog-canceled",()=>{e.open=!1}),i._$owner=P(),o._$owner=P(),W(s=>{const c=e.open,l=e.medication;return c!==s._v$&&(i.open=s._v$=c),l!==s._v$2&&(o.medication=s._v$2=l),s},{_v$:void 0,_v$2:void 0}),n})()});const ID=O(`<div><photon-dialog label="Lose Unsaved Prescription?" confirm-text="Yes, Continue" cancel-text="Keep Editing" width="500px"><p class="font-sans text-lg xs:text-base">You have a prescription "<!>" that hasn't been added. Please add it or continue.</p></photon-dialog></div>`),AD=O('<div class="flex flex-row sm:flex-col md:flex-col lg:flex-row gap-2 justify-end items-end"><photon-button size="sm" variant="outline" loading-text="Save prescriptions">Save prescriptions</photon-button><photon-button size="sm" loading-text="Save and create order">Save and create order</photon-button></div>'),DD=O('<div class="w-full h-full bg-[#f7f4f4]"><div class="p-4 w-full h-full sm:w-[600px] xs:mx-auto"><photon-prescribe-workflow hide-submit="true"></photon-prescribe-workflow></div></div>'),RD=O('<div class="pt-2"><sl-alert variant="danger" open><div class="flex items-start xs:items-center gap-4"><sl-icon slot="icon" name="exclamation-octagon" class="text-red-500" style="font-size: 24px;"></sl-icon><p class="font-sans"></p></div></sl-alert></div>'),FD=e=>e().notes?.value.length>0||e().instructions?.value.length>0||e().treatment?.value||e().patient?.value||e().dispenseAsWritten?.value!=!1||e().dispenseQuantity?.value!=1||e().dispenseUnit?.value!="Each"||e().daysSupply?.value!=30||e().refillsInput?.value!=0||e().addToTemplates?.value!=!1||e().effectiveDate?.value!=oc(new Date,"yyyy-MM-dd").toString()||e().draftPrescriptions?.value.length>0;$e("photon-multirx-form-wrapper",{hideTemplates:!1,patientId:void 0,templateIds:void 0},e=>{let t;const r=rt(),[n,i]=F(!1),[o,a]=F([]),[s,c]=F(!1),[l,u]=F(!1),[d,f]=F(),[h,p]=F(),[m,v]=F(!1),{actions:y}=nc;Tt(async()=>{const E=await r.getSDK().authentication.getAccessToken();Z1(E).permissions?.includes("write:prescription")&&c(!0)});const b=(E,S,T)=>{const M=new CustomEvent("photon-prescriptions-created",{composed:!0,bubbles:!0,detail:{patientId:T,prescriptionIds:S,createOrder:E}});t?.dispatchEvent(M)},g=()=>{const E=new CustomEvent("photon-prescriptions-closed",{composed:!0,bubbles:!0,detail:{}});t?.dispatchEvent(E)},w=async(E,S,T)=>{a([]);const M=["patient","draftPrescriptions"];if(S.validate(M),!S.hasErrors(M)){u(!0),S.updateFormValue({key:"errors",value:[]});const K=r.getSDK().clinical.prescription.createPrescriptions({}),D=r.getSDK().clinical.prescriptionTemplate.createPrescriptionTemplate({}),R=[];for(const U of E.draftPrescriptions.value){if(U.addToTemplates)try{const{errors:Y}=await D({variables:{catalogId:U.catalogId,treatmentId:U.treatment.id,dispenseAsWritten:U.dispenseAsWritten,dispenseQuantity:U.dispenseQuantity,dispenseUnit:U.dispenseUnit,fillsAllowed:U.refillsInput+1,daysSupply:U.daysSupply,instructions:U.instructions,notes:U.notes},awaitRefetchQueries:!1});Y&&a(Y)}catch(Y){a([Y])}const j={daysSupply:U.daysSupply,dispenseAsWritten:U.dispenseAsWritten,dispenseQuantity:U.dispenseQuantity,dispenseUnit:U.dispenseUnit,effectiveDate:U.effectiveDate,instructions:U.instructions,notes:U.notes,patientId:E.patient?.value.id,fillsAllowed:U.refillsInput+1,treatmentId:U.treatment.id};R.push(j)}if(o().length>0)return;try{const{data:U,errors:j}=await K({variables:{prescriptions:R},refetchQueries:[],awaitRefetchQueries:!1});if(j){a(j);return}b(T,U.createPrescriptions.map(Y=>Y.id),E.patient?.value.id)}catch(U){a([U])}u(!1)}},x=()=>w(d(),h(),!0);return(()=>{const E=V(()=>document.importNode(ID,!0)),S=E.firstChild,T=S.firstChild,M=T.firstChild,L=M.nextSibling;L.nextSibling;const K=t;return typeof K=="function"?ee(K,E):t=E,S.addEventListener("photon-dialog-confirmed",()=>{v(!1),x()}),S.addEventListener("photon-dialog-canceled",()=>{v(!1)}),S._$owner=P(),_(T,()=>d()?.treatment?.value?.name,L),_(E,z(f$,{closeTitle:"Lose unsaved prescriptions?",closeBody:"You will not be able to recover unsaved prescriptions.",onClosed:()=>{g(),y.clearSelectedPatient(),e.open=!1},checkShouldWarn:()=>FD(d),title:"New Prescriptions",titleIconName:"prescription",get headerRight(){return(()=>{const D=V(()=>document.importNode(AD,!0)),R=D.firstChild,U=R.nextSibling;return R.addEventListener("photon-clicked",()=>w(d(),h(),!1)),R._$owner=P(),U.addEventListener("photon-clicked",()=>d()?.treatment?.value?.name?v(!0):x()),U._$owner=P(),W(j=>{const Y=!n()||!s(),oe=l(),ae=!n()||!s(),xe=l();return Y!==j._v$&&(R.disabled=j._v$=Y),oe!==j._v$2&&(R.loading=j._v$2=oe),ae!==j._v$3&&(U.disabled=j._v$3=ae),xe!==j._v$4&&(U.loading=j._v$4=xe),j},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),D})()},get form(){return(()=>{const D=V(()=>document.importNode(DD,!0)),R=D.firstChild,U=R.firstChild;return _(D,z(re,{get when(){return o().length>0},get children(){return z(Rl,{get each(){return o()},children:j=>(()=>{const Y=V(()=>document.importNode(RD,!0)),oe=Y.firstChild,ae=oe.firstChild,xe=ae.firstChild,_e=xe.nextSibling;return oe._$owner=P(),xe._$owner=P(),_(_e,()=>j.message),Y})()})}}),R),U.addEventListener("photon-form-validate",j=>{i(j.detail.canSubmit),p(j.detail.actions),f(j.detail.form)}),U._$owner=P(),W(j=>{const Y=e.hideTemplates,oe=l(),ae=e.patientId,xe=e.templateIds;return Y!==j._v$5&&(U.hideTemplates=j._v$5=Y),oe!==j._v$6&&(U.loading=j._v$6=oe),ae!==j._v$7&&(U.patientId=j._v$7=ae),xe!==j._v$8&&(U.templateIds=j._v$8=xe),j},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),D})()}}),null),W(()=>S.open=m()),E})()});