1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,872969,813300,216024,881283,636536,43069,558654,989955,e=>{"use strict";let t,n,r,i,o,s,a,l,u,c,d,h,f,p,m,g,y,v,b;class x{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){let t={value:e,next:null};if(this._current){this._last.next=t,this._last=t;return}this._current=t,this._last=t,this._active&&this.flush()}flush(){for(;this._current;){let e=this._current;this._process(e.value),this._current=e.next}this._last=null}}let w="xstate.init",k="xstate.stop";function S(e,t){return{type:`xstate.done.state.${e}`,output:t}}function E(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function _(e){return{type:w,input:e}}function j(e){setTimeout(()=>{throw e})}let C="function"==typeof Symbol&&Symbol.observable||"@@observable";function M(e){if(I(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function $(e){var t;return(t=e)&&"object"==typeof t&&"machine"in t&&"value"in t?e.value:"string"!=typeof e?e:function(e){if(1===e.length)return e[0];let t={},n=t;for(let t=0;t<e.length-1;t++)if(t===e.length-2)n[e[t]]=e[t+1];else{let r=n;n={},r[e[t]]=n}return t}(M(e))}function A(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let o=r[i];n[o]=t(e[o],o,e,i)}return n}function T(e){var t;return void 0===e?[]:I(t=e)?t:[t]}function P(e,t,n,r){return"function"==typeof e?e({context:t,event:n,self:r}):e}function I(e){return Array.isArray(e)}function R(e){var t;return(I(t=e)?t:[t]).map(e=>void 0===e||"string"==typeof e?{target:e}:e)}function O(e){if(void 0!==e&&""!==e)return T(e)}function L(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function V(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function D(e,t){if(t===e||"*"===t)return!0;if(!t.endsWith(".*"))return!1;let n=t.split("."),r=e.split(".");for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if("*"===t)return e===n.length-1;if(t!==i)return!1}return!0}function N(e,t){return`${e.sessionId}.${t}`}let z=0,B=!1,F=((e4={})[e4.NotStarted=0]="NotStarted",e4[e4.Running=1]="Running",e4[e4.Stopped=2]="Stopped",e4),H={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class U{constructor(e,t){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new x(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=F.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const n={...H,...t},{clock:r,logger:i,parent:o,syncSnapshot:s,id:a,systemId:l,inspect:u}=n;this.system=o?o.system:function(e,t){let n=new Map,r=new Map,i=new WeakMap,o=new Set,s={},{clock:a,logger:l}=t,u={schedule:(e,t,n,r,i=Math.random().toString(36).slice(2))=>{let o={source:e,target:t,event:n,delay:r,id:i,startedAt:Date.now()},l=N(e,i);c._snapshot._scheduledEvents[l]=o;let u=a.setTimeout(()=>{delete s[l],delete c._snapshot._scheduledEvents[l],c._relay(e,t,n)},r);s[l]=u},cancel:(e,t)=>{let n=N(e,t),r=s[n];delete s[n],delete c._snapshot._scheduledEvents[n],void 0!==r&&a.clearTimeout(r)},cancelAll:e=>{for(let t in c._snapshot._scheduledEvents){let n=c._snapshot._scheduledEvents[t];n.source===e&&u.cancel(e,n.id)}}},c={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${z++}`,_register:(e,t)=>(n.set(e,t),e),_unregister:e=>{n.delete(e.sessionId);let t=i.get(e);void 0!==t&&(r.delete(t),i.delete(e))},get:e=>r.get(e),getAll:()=>Object.fromEntries(r.entries()),_set:(e,t)=>{let n=r.get(e);if(n&&n!==t)throw Error(`Actor with system ID '${e}' already exists.`);r.set(e,t),i.set(t,e)},inspect:e=>{let t=L(e);return o.add(t),{unsubscribe(){o.delete(t)}}},_sendInspectionEvent:t=>{if(!o.size)return;let n={...t,rootId:e.sessionId};
1o.forEach(e=>e.next?.(n))},_relay:(e,t,n)=>{c._sendInspectionEvent({type:"@xstate.event",sourceRef:e,actorRef:t,event:n}),t._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...c._snapshot._scheduledEvents}}),start:()=>{let e=c._snapshot._scheduledEvents;for(let t in c._snapshot._scheduledEvents={},e){let{source:n,target:r,event:i,delay:o,id:s}=e[t];u.schedule(n,r,i,o,s)}},_clock:a,_logger:l};return c}(this,{clock:r,logger:i}),u&&!o&&this.system.inspect(L(u)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=t?.logger??this.system._logger,this.clock=t?.clock??this.system._clock,this._parent=o,this._syncSnapshot=s,this.options=n,this.src=n.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:e=>{this._deferred.push(e)},system:this.system,stopChild:e=>{if(e._parent!==this)throw Error(`Cannot stop child actor ${e.id} of ${this.id} because it is not a child`);e._stop()},emit:e=>{let t=this.eventListeners.get(e.type),n=this.eventListeners.get("*");if(t||n)for(let r of[...t?t.values():[],...n?n.values():[]])try{r(e)}catch(e){j(e)}},actionExecutor:e=>{let t=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:e.type,params:e.params}}),!e.exec)return;let t=B;try{B=!0,e.exec(e.info,e.params)}finally{B=t}};this._processingStatus===F.Running?t():this._deferred.push(t)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),l&&(this.systemId=l,this.system._set(l,this)),this._initState(t?.snapshot??t?.state),l&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(e){this._snapshot={status:"error",output:void 0,error:e}}}update(e,t){let n;for(this._snapshot=e;n=this._deferred.shift();)try{n()}catch(t){this._deferred.length=0,this._snapshot={...e,status:"error",error:t}}switch(this._snapshot.status){case"active":for(let t of this.observers)try{t.next?.(e)}catch(e){j(e)}break;case"done":var r;for(let t of this.observers)try{t.next?.(e)}catch(e){j(e)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:t,snapshot:e})}subscribe(e,t,n){let r=L(e,t,n);if(this._processingStatus!==F.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(e){j(e)}break;case"error":{let e=this._snapshot.error;if(r.error)try{r.error(e)}catch(e){j(e)}else j(e)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}select(e,t=Object.is){return{subscribe:n=>{let r=L(n),i=e(this.getSnapshot());return this.subscribe(n=>{let o=e(n);t(i,o)||(i=o,r.next?.(o))})},get:()=>e(this.getSnapshot())}}start(){if(this._processingStatus===F.Running)return this;this._syncSnapshot&&this.subscribe({next:e=>{"active"===e.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:e})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=F.Running;let e=_(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let t,n;try{t=this.logic.transition(this._snapshot,e,this._actorScope)}catch(e){n={err:e}}if(n){let{err:e}=n;this._snapshot={...this._snapshot,status:"error",error:e},this._error(e);return}this.update(t,e),e.type===k&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===F.Stopped||((this.mailbox.clear(),this._processingStatus===F.NotStarted)?this._processingStatus=F.Stopped:this.mailbox.enqueue({type:k})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let e of this.observers)try{e.complete?.()}catch(e){j(e)}this.observers.clear(),this.eventListeners.clear()}_reportError(e){if(!this.observers.size){this._parent||j(e),this.eventListeners.clear();return}let t=!1;for(let n of this.observers){let r=n.error;t||=!r;try{r?.(e)}catch(e){j(e)}}this.observers.clear(),this.eventListeners.clear(),t&&j(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,E(this.id,e))}_stopProcedure(){return this._processingStatus!==F.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new x(this._process.bind(this)),this._processingStatus=F.Stopped,this.system._unregister(this)),this}_send(e){this._processingStatus!==F.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){let{devTools:t}=this.options;t&&("function"==typeof t?t:t=>{if("u"<typeof window)return;let n=function(){let t="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g;if(t.__xstate__)return t.__xstate__}();n&&n.register(t)})(this)}toJSON(){return{xstate$$type:1,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[C](){return this}getSnapshot(){return this._snapshot}}function W(e,...[t]){return new U(e,t)}function q(e,t,n,r,{sendId:i}){return[t,{sendId:"function"==typeof i?i(n,r):i},void 0]}function G(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function Y(e){function t(e,t){}return t.type="xstate.cancel",t.sendId=e,t.resolve=q,t.execute=G,t}function K(e,t,n,r,{id:i,systemId:o,src:s,input:a,syncSnapshot:l}){let u,c,d="string"==typeof s?V(t.machine,s):s,h="function"==typeof i?i(n):i;return d&&(c="function"==typeof a?a({context:t.context,event:n.event,self:e.self}):a,u=W(d,{id:h,src:s,parent:e.self,syncSnapshot:l,systemId:o,input:c})),[eV(t,{children:{...t.children,[h]:u}}),{id:i,systemId:o,actorRef:u,src:s,input:c},void 0]}function Z(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==F.Stopped&&t.start()})}function X(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function o(e,t){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=i,o.resolve=K,o.execute=Z,o}function J(e,t,n,r,{actorRef:i}){let o="function"==typeof i?i(n,r):i,s="string"==typeof o?t.children[o]:o,a=t.children;return s&&(a={...a},delete a[s.id]),[eV(t,{children:a}),s,void 0]}function Q(e,t){if(t){if(!function e(t,n){let r=n.getSnapshot();if(r&&"children"in r)for(let n of Object.values(r.children))e(t,n);t.system._unregister(n)}(e,t),t._processingStatus!==F.Running)return void e.stopChild(t);e.defer(()=>{e.stopChild(t)})}}function ee(e){function t(e,t){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=J,t.execute=Q,t}function et(e,{context:t,event:n},{guards:r}){return r.every(r=>en(r,t,n,e))}function en(e,t,n,r){let{machine:i}=r,o="function"==typeof e,s=o?e:i.implementations.guards["string"==typeof e?e:e.type];if(!o&&!s)throw Error(`Guard '${"string"==typeof e?e:e.type}' is not implemented.'.`);if("function"!=typeof s)return en(s,t,n,r);let a={context:t,event:n},l=o||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:t,event:n}):e.params:void 0;return"check"in s?s.check(r,a,s):s(a,l)}function er(e){return"atomic"===e.type||"final"===e.type}function ei(e){return Object.values(e.states).filter(e=>"history"!==e.type)}function eo(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function es(e){let t=new Set(e),n=ea(t);for(let e of t)if("compound"!==e.type||n.get(e)&&n.get(e).length){if("parallel"===e.type){for(let n of ei(e))if("history"!==n.type&&!t.has(n))for(let e of ep(n))t.add(e)}}
1else ep(e).forEach(e=>t.add(e));for(let e of t){let n=e.parent;for(;n;)t.add(n),n=n.parent}return t}function ea(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function el(e,t){return function e(t,n){let r=n.get(t);if(!r)return{};if("compound"===t.type){let e=r[0];if(!e)return{};if(er(e))return e.key}let i={};for(let t of r)i[t.key]=e(t,n);return i}(e,ea(es(t)))}function eu(e,t){return"compound"===t.type?ei(t).some(t=>"final"===t.type&&e.has(t)):"parallel"===t.type?ei(t).every(t=>eu(e,t)):"final"===t.type}let ec=e=>"#"===e[0];function ed(e,t,n){let r=O(n.target),i=n.reenter??!1,o=function(e,t){if(void 0!==t)return t.map(t=>{if("string"!=typeof t)return t;if(ec(t))return e.machine.getStateNodeById(t);let n="."===t[0];if(n&&!e.parent)return ey(e,t.slice(1));let r=n?e.key+t:t;if(e.parent)try{return ey(e.parent,r)}catch(t){throw Error(`Invalid transition definition for state node '${e.id}': 2${t.message}`)}throw Error(`Invalid target: "${t}" is not a valid target from the root node. Did you mean ".${t}"?`)})}(e,r),s={...n,actions:T(n.actions),guard:n.guard,target:o,source:e,reenter
2:i,eventType:t,toJSON:()=>({...s,source:`#${e.id}`,target:o?o.map(e=>`#${e.id}`):void 0})};return s}function eh(e){let t=O(e.config.target);return t?{target:t.map(t=>"string"==typeof t?ey(e.parent,t):t)}:"parallel"===e.parent.type?{target:[e.parent]}:e.parent.initial}function ef(e){return"history"===e.type}function ep(e){let t=em(e);for(let n of t)for(let r of eo(n,e))t.add(r);return t}function em(e){let t=new Set;return!function e(n){if(!t.has(n)){if(t.add(n),"compound"===n.type)e(n.initial.target[0]);else if("parallel"===n.type)for(let t of ei(n))e(t)}}(e),t}function eg(e,t){if(ec(t))return e.machine.getStateNodeById(t);if(!e.states)throw Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function ey(e,t){if("string"==typeof t&&ec(t))try{return e.machine.getStateNodeById(t)}catch{}let n=M(t).slice(),r=e;for(;n.length;){let e=n.shift();if(!e.length)break;r=eg(r,e)}return r}function ev(e,t){if("string"==typeof t){let n=e.states[t];if(!n)throw Error(`State '${t}' does not exist on '${e.id}'`);return[e,n]}let n=Object.keys(t),r=n.map(t=>eg(e,t)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((n,r)=>{let i=eg(e,r);if(!i)return n;let o=ev(i,t[r]);return n.concat(o)},[]))}function eb(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function ex(e,t,n){let r=new Set;for(let i of e){let e=!1,o=new Set;for(let s of r)if(function(e,t){let n=new Set(e),r=new Set(t);for(let e of n)if(r.has(e))return!0;for(let e of r)if(n.has(e))return!0;return!1}(eS([i],t,n),eS([s],t,n)))if(eb(i.source,s.source))o.add(s);else{e=!0;break}if(!e){for(let e of o)r.delete(e);r.add(i)}}return Array.from(r)}function ew(e,t){if(!e.target)return[];let n=new Set;for(let r of e.target)if(ef(r))if(t[r.id])for(let e of t[r.id])n.add(e);else for(let e of ew(eh(r),t))n.add(e);else n.add(r);return[...n]}function ek(e,t){let n=ew(e,t);if(!n)return;if(!e.reenter&&n.every(t=>t===e.source||eb(t,e.source)))return e.source;let r=function(e){let[t,...n]=e;for(let e of eo(t,void 0))if(n.every(t=>eb(t,e)))return e}(n.concat(e.source));return r||(e.reenter?void 0:e.source.machine.root)}function eS(e,t,n){let r=new Set;for(let i of e)if(i.target?.length){let e=ek(i,n);for(let n of(i.reenter&&i.source===e&&r.add(e),t))eb(n,e)&&r.add(n)}return[...r]}function eE(e,t,n,r,i,o){let s=[];if(!e.length)return[t,s];let a=n.actionExecutor;n.actionExecutor=e=>{s.push(e),a(e)};try{let a=new Set(t._nodes),l=t.historyValue,u=ex(e,a,l),c=t;i||([c,l]=function(e,t,n,r,i,o,s,a){let l,u=e,c=eS(r,i,o);for(let e of(c.sort((e,t)=>t.order-e.order),c))for(let t of function(e){return Object.keys(e.states).map(t=>e.states[t]).filter(e=>"history"===e.type)}(e)){let n;n="deep"===t.history?t=>er(t)&&eb(t,e):t=>t.parent===e,(l??={...o})[t.id]=Array.from(i).filter(n)}for(let e of c)u=eC(u,t,n,[...e.exit,...e.invoke.map(e=>ee(e.id))],s,void 0),i.delete(e);return[u,l||o]}(c,r,n,u,a,l,o,n.actionExecutor)),c=eC(c,r,n,u.flatMap(e=>e.actions),o,void 0),c=function(e,t,n,r,i,o,s,a){let l=e,u=new Set,c=new Set;(function(e,t,n,r){for(let i of e){let e=ek(i,t);for(let o of i.target||[])!ef(o)&&(i.source!==o||i.source!==e||i.reenter)&&(r.add(o),n.add(o)),e_(o,t,n,r);for(let o of ew(i,t)){let s=eo(o,e);e?.type==="parallel"&&s.push(e),ej(r,t,n,s,!i.source.parent&&i.reenter?void 0:e)}}})(r,s,c,u),a&&c.add(e.machine.root);let d=new Set;for(let e of[...u].sort((e,t)=>e.order-t.order)){i.add(e);let r=[];for(let t of(r.push(...e.entry),e.invoke))r.push(X(t.src,{...t,syncSnapshot:!!t.onSnapshot}));if(c.has(e)){let t=e.initial.actions;r.push(...t)}if(l=eC(l,t,n,r,o,e.invoke.map(e=>e.id)),"final"===e.type){let r=e.parent,s=r?.type==="parallel"?r:r?.parent,a=s||e;for(r?.type==="compound"&&o.push(S(r.id,void 0!==e.output?P(e.output,l.context,t,n.self):void 0));s?.type==="parallel"&&!d.has(s)&&eu(i,s);)d.add(s),o.push(S(s.id)),a=s,s=s.parent;if(s)continue;l=eV(l,{status:"done",output:function(e,t,n,r,i){if(void 0===r.output)return;let o=S(i.id,void 0!==i.output&&i.parent?P(i.output,e.context,t,n.self):void 0);return P(r.output,e.context,o,n.self)}(l,t,n,l.machine.root,a)})}}return l}(c,r,n,u,a,o,l,i);let d=[...a];"done"===c.status&&(c=eC(c,r,n,d.sort((e,t)=>
2t.order-e.order).flatMap(e=>e.exit),o,void 0));try{if(l===t.historyValue&&function(e,t){if(e.length!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(t._nodes,a))return[c,s];return[eV(c,{_nodes:d,historyValue:l}),s]}catch(e){throw e}}finally{n.actionExecutor=a}}function e_(e,t,n,r){var i,o,s,a;if(ef(e))if(t[e.id]){let s=t[e.id];for(let e of s)r.add(e),e_(e,t,n,r);for(let a of s){i=a,o=e.parent,ej(r,t,n,eo(i,o))}}else{let i=eh(e);for(let o of i.target)r.add(o),i===e.parent?.initial&&n.add(e.parent),e_(o,t,n,r);for(let o of i.target){s=o,a=e.parent,ej(r,t,n,eo(s,a))}}else if("compound"===e.type){let[i]=e.initial.target;ef(i)||(r.add(i),n.add(i)),e_(i,t,n,r),ej(r,t,n,eo(i,e))}else if("parallel"===e.type)for(let i of ei(e).filter(e=>!ef(e)))[...r].some(e=>eb(e,i))||(ef(i)||(r.add(i),n.add(i)),e_(i,t,n,r))}function ej(e,t,n,r,i){for(let o of r)if((!i||eb(o,i))&&e.add(o),"parallel"===o.type)for(let r of ei(o).filter(e=>!ef(e)))[...e].some(e=>eb(e,r))||(e.add(r),e_(r,t,n,e))}function eC(e,t,n,r,i,o){let s=o?[]:void 0,a=function e(t,n,r,i,o,s){let{machine:a}=t,l=t;for(let t of i){var u;let i="function"==typeof t,c=i?t:(u="string"==typeof t?t:t.type,a.implementations.actions[u]),d={context:l.context,event:n,self:r.self,system:r.system},h=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:l.context,event:n}):t.params:void 0;if(!c||!("resolve"in c)){r.actionExecutor({type:"string"==typeof t?t:"object"==typeof t?t.type:t.name||"(anonymous)",info:d,params:h,exec:c}
2);continue}let[f,p,m]=c.resolve(r,l,d,h,c,o);l=f,"retryResolve"in c&&s?.push([c,p]),"execute"in c&&r.actionExecutor({type:c.type,info:d,params:p,exec:c.execute.bind(null,r,p)}),m&&(l=e(l,n,r,m,o,s))}return l}(e,t,n,r,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([e,t])=>{e.retryResolve(n,a,t)}),a}function eM(e,t,n,r){let i=e,o=[];function s(e,t,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:t,snapshot:e[0],_transitions:r}),o.push(e)}if(t.type===k)return s([i=eV(e$(i,t,n),{status:"stopped"}),[]],t,[]),{snapshot:i,microsteps:o};let a=t;if(a.type!==w){let t=a,l=t.type.startsWith("xstate.error.actor"),u=eA(t,i);if(l&&!u.length)return s([i=eV(e,{status:"error",error:t.error}),[]],t,[]),{snapshot:i,microsteps:o};let c=eE(u,e,n,a,!1,r);i=c[0],s(c,t,u)}let l=!0,u=e.machine.options?.maxIterations??1/0,c=0;for(;"active"===i.status;){if(++c>u)throw Error(`Infinite loop detected: the machine has processed more than ${u} microsteps without reaching a stable state. This usually happens when there's a cycle of transitions (e.g., eventless transitions or raised events causing state A -> B -> C -> A).`);let e=l?function(e,t){let n=new Set;for(let r of e._nodes.filter(er))e:for(let i of[r].concat(eo(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||en(r.guard,e.context,t,e)){n.add(r);break e}}return ex(Array.from(n),new Set(e._nodes),e.historyValue)}(i,a):[],t=e.length?i:void 0;if(!e.length){if(!r.length)break;e=eA(a=r.shift(),i)}let o=eE(e,i,n,a,!1,r);l=(i=o[0])!==t,s(o,a,e)}return"active"!==i.status&&e$(i,a,n),{snapshot:i,microsteps:o}}function e$(e,t,n){return eC(e,t,n,Object.values(e.children).map(e=>ee(e)),[],void 0)}function eA(e,t){return t.machine.getTransitionData(t,e)}let eT=function(e){return function e(t,n){let r=$(t),i=$(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(t=>t in i&&e(r[t],i[t]))}(e,this.value)},eP=function(e){return this.tags.has(e)},eI=function(e){let t=this.machine.getTransitionData(this,e);return!!t?.length&&t.some(e=>void 0!==e.target||e.actions.length)},eR=function(){let{_nodes:e,tags:t,machine:n,getMeta:r,toJSON:i,can:o,hasTag:s,matches:a,...l}=this;return{...l,tags:Array.from(t)}},eO=function(){return this._nodes.reduce((e,t)=>(void 0!==t.meta&&(e[t.id]=t.meta),e),{})};function eL(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:el(t.root,e._nodes),tags:new Set(e._nodes.flatMap(e=>e.tags)),children:e.children,historyValue:e.historyValue||{},matches:eT,hasTag:eP,can:eI,getMeta:eO,toJSON:eR}}function eV(e,t={}){return eL({...e,...t},e.machine)}function eD(e,t,n,r,{event:i,id:o,delay:s},{internalQueue:a}){let l,u=t.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let c="function"==typeof i?i(n,r):i;if("string"==typeof s){let e=u&&u[s];l="function"==typeof e?e(n,r):e}else l="function"==typeof s?s(n,r):s;return"number"!=typeof l&&a.push(c),[t,{event:c,id:o,delay:l},void 0]}function eN(e,t){let{event:n,delay:r,id:i}=t;if("number"==typeof r)return void e.defer(()=>{let t=e.self;e.system.scheduler.schedule(t,t,n,r,i)})}function ez(e,t){function n(e,t){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=eD,n.execute=eN,n}let eB="xstate.observable.error",eF="xstate.observable.complete";function eH(e){return{config:e,transition:(e,t)=>{if("active"!==e.status)return e;switch(t.type){case eB:return{...e,status:"error",error:t.data,input:void 0,_subscription:void 0};case eF:return{...e,status:"done",input:void 0,_subscription:void 0};case k:return e._subscription.unsubscribe(),{...e,status:"stopped",input:void 0,_subscription:void 0};default:return e}},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:void 0,input:t,_subscription:void 0}),start:(t,{self:n,system:r,emit:i})=>{"done"!==t.status&&(t._subscription=e({input:t.input,system:r,self:n,emit:i}).subscribe({next:e=>{n._parent&&r._relay(n,n._parent,e)},error:e=>{r._relay(n,n,{type:eB,data:e})},complete:()=>{r._relay(n,n,{type:eF})}}))},getPersistedSnapshot:({_subscription:e,...t})=>t,restoreSnapshot:e=>({...e,_subscription:void 0})}}let eU="xstate.promise.resolve",eW="xstate.promise.reject",eq=ne
2w WeakMap;function eG(e){return{config:e,transition:(e,t,n)=>{if("active"!==e.status)return e;switch(t.type){case eU:{let n=t.data;return{...e,status:"done",output:n,input:void 0}}case eW:return{...e,status:"error",error:t.data,input:void 0};case k:return eq.get(n.self)?.abort(),eq.delete(n.self),{...e,status:"stopped",input:void 0};default:return e}},start:(t,{self:n,system:r,emit:i})=>{if("active"!==t.status)return;let o=new AbortController;eq.set(n,o),Promise.resolve(e({input:t.input,system:r,self:n,signal:o.signal,emit:i})).then(e=>{"active"===n.getSnapshot().status&&(eq.delete(n),r._relay(n,n,{type:eU,data:e}))},e=>{"active"===n.getSnapshot().status&&(eq.delete(n),r._relay(n,n,{type:eW,data:e}))})},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let eY=W((e8=void 0,{config:e6=e=>void 0,transition:(e,t,n)=>({...e,context:e6(e.context)}),getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof e8?e8({input:t}):e8}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e})),eK=eY,eZ=new Set;function eX(e){return e===eY}function eJ(e){for(let t of(eK=e,eZ))t()}e.s(["a",0,eJ,"i",0,eZ,"n",0,eY,"r",0,eX,"t",()=>eK],813300);var eQ,e0,e1,e2,e5,e3,e4,e6,e8,e7,e9,te,tt=e.i(715907);let tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tr=/_key\s*==\s*['"](.*)['"]/,ti=/^\d*:\d*$/;function to(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function ts(e){return"string"==typeof e?tr.test(e.trim()):"object"==typeof e&&"_key"in e}function ta(e){if("string"==typeof e&&ti.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}function tl(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let r=typeof t;if("number"===r)return`${e}[${t}]`;if("string"===r)return`${e}${0===n?"":"."}${t}`;if(ts(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[n,r]=t;return`${e}[${n}:${r}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function tu(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(tn);if(!t)throw Error("Invalid path string");return t.map(tc)}function tc(e){return to(e)?Number(e.replace(/[^\d]/g,"")):ts(e)?{_key:e.match(tr)[1]}:ta(e)?function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e):e}var td=Object.freeze({__proto__:null,fromString:tu,get:function(e,t,n){let r="string"==typeof t?tu(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(to(t)){if(!Array.isArray(i))return n;i=i[t]}if(ts(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i},isIndexSegment:to,isIndexTuple:ta,isKeySegment:ts,reKeySegment:tr,toString:tl});let th="drafts.";function tf(e){return e.startsWith(th)}function tp(e){return e.startsWith("versions.")}function tm(e){return tp(e)?th+tg(e):tf(e)?e:th+e}function tg(e){return tp(e)?e.split(".").slice(2).join("."):tf(e)?e.slice(th.length):e}function ty(e){let{baseUrl:t,workspace:n="default",tool:r="default",id:i,type:o,path:s,projectId:a,dataset:l}=e;if(!t)throw Error("baseUrl is required");if(!s)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let u="default"===n?void 0:n,c="default"===r?void 0:r,d=tg(i),h=Array.isArray(s)?tl(s.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})):s,f=new URLSearchParams({baseUrl:t,id:d,type:o,path:h});if(u&&f.set("workspace",u),c&&f.set("tool",c),a&&f.set("projectId",a),l&&f.set("dataset",l),tf(i)||tp(i)){if(tp(i)){let e=function(e){if(!tp(e))return;let[t,n]=e.split(".");return n}(i);f.set("perspective",e)}}else f.set("perspective","published");let p=["/"===t?"":t];u&&p.push(u);let m=["mode=presentation",`id=${d}`,`type=${o}`,`path=${encodeURIComponent(h)}`];return c&&m.push(`tool=${c}`),p.push("intent","edit",`${m.join(";")}?${f}`),p.join("/")}e.s(["createEditUrl",0,ty,"getDraftId",0,tm,"getPublishedId",0,tg,"studioPath",0,td],216024);e.i(12447);
2function tv(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>{var t;return e.includes("==")?function(e){let[t,n]=e.split("==");if("_key"!==t)throw Error(`Currently only "_key" is supported as path segment. Found ${t}`);if(typeof n>"u")throw Error('Invalid path segment, expected `key=="value"`');return{_key:n.replace(/^['"]/,"").replace(/['"]$/,"")}}(e):tb.test(t=e)?Number(t):t})}let tb=/^-?\d+$/;function tx(e){return"string"==typeof e?._key}function tw(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function tk(e){return"number"==typeof e||tw(e)}let tS=/^[a-z_$]+/;function tE(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:tw(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&tS.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function t_(e){return Array.isArray(e)?e:[e]}function tj(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var t,n,r,i,o,s,a;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:tv(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in(r=t)?Object.keys(r.setIfMissing).map(e=>({path:tv(e),op:{type:"setIfMissing",value:r.setIfMissing[e]}})):[],..."unset"in(i=t)?i.unset.map(e=>({path:tv(e),op:{type:"unset"}})):[],..."inc"in(o=t)?Object.keys(o.inc).map(e=>({path:tv(e),op:{type:"inc",amount:o.inc[e]}})):[],..."inc"in(s=t)?Object.keys(s.dec).map(e=>({path:tv(e),op:{type:"dec",amount:s.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=tC.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${tC.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=tv(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t),..."diffMatchPatch"in(a=t)?Object.keys(a.diffMatchPatch).map(e=>({path:tv(e),op:{type:"diffMatchPatch",value:a.diffMatchPatch[e]}})):[]]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let tC=["before","replace","after"];function tM(e){return tT(e)}function t$(e){return e.flatMap(tM)}function tA(e){return{transactionId:e.id,mutations:t$(e.mutations)}}function tT(e){switch(e.type){case"create":case"createIfNotExists":case"createOrReplace":return{[e.type]:e.document};case"delete":return{delete:{id:e.id}};case"patch":{let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...tP(n)}}))}}}function tP(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[tE(t)]};if("insert"===n.type)return{insert:{[n.position]:tE([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[tE(t)]:n.value}};if("inc"===n.type)return{inc:{[tE(t)]:n.amount}};if("dec"===n.type)return{dec:{[tE(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[tE(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${tE(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>tE([...t,{_key:e._key}])),insert:{[n.position]:tE([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[tE(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>tE(t.concat(e)))};if("replace"===n.type)return{insert:{replace:tE(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[tE(t.concat(n.referenceItem))]};throw"insertIfMissing"===n.type?Error("Patch type insertIfMissing is not supported by Sanity"):Error(`Unknown operation type ${n.type}`)}function tI(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function tR(e,t){return{path:"string"==typeof e?tv(e):e,op:t}}function tO(e,t,n){return{type:"insert",referenceItem:n,position:t,items:t_(e)}}function tL(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function tV(e){return{type:"remove",referenceItem:e}}var tD=Object.freeze({__proto__:null,decode:function(e){return tj(e)},decodeAll:function(e){return e.map(tj)},encode:tM,encodeAll:t$,encodeMutation:tT,encodePatch:tP,encodeTransaction:tA});let tN=new Uint8Array(16),tz=[];for(let e=0;e<256;++e)tz.push((e+256).toString(16).slice(1));let tB=function(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){let r=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(tN);if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(tz[e[t+0]]+tz[e[t+1]]+tz[e[t+2]]+tz[e[t+3]]+"-"+tz[e[t+4]]+tz[e[t+5]]+"-"+tz[e[t+6]]+tz[e[t+7]]+"-"+tz[e[t+8]]+tz[e[t+9]]+"-"+tz[e[t+10]]+tz[e[t+11]]+tz[e[t+12]]+tz[e[t+13]]+tz[e[t+14]]+tz[e[t+15]]).toLowerCase()}(r)}(e,t,n):crypto.randomUUID()};function tF(e,t,n,r,{assignment:i}){if(!t.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let o={},s={context:t.context,event:n.event,spawn:function(e,{machine:t,context:n},r,i){return(o,s)=>{let a=((o,s)=>{if("string"!=typeof o)return W(o,{id:s?.id,parent:e.self,syncSnapshot:s?.syncSnapshot,input:s?.input,src:o,systemId:s?.systemId});{let a=V(t,o);if(!a)throw Error(`Actor logic '${o}' not implemented in machine '${t.id}'`);let l=W(a,{id:s?.id,parent:e.self,syncSnapshot:s?.syncSnapshot,input:"function"==typeof s?.input?s.input({context:n,event:r,self:e.self}):s?.input,src:o,systemId:s?.systemId});return i[l.id]=l,l}})(o,s);return i[a.id]=a,e.defer(()=>{a._processingStatus!==F.Stopped&&a.start()}),a}}(e,t,n.event,o),self:e.self,system:e.system},a={};if("function"==typeof i)a=i(s,r);else for(let e of Object.keys(i)){let t=i[e];a[e]="function"==typeof t?t(s,r):t}let l=Object.assign({},t.context,a);return[eV(t,{context:l,children:Object.keys(o).length?{...t.children,...o}:t.children}),void 0,void 0]}function tH(e){function t(e,t){}return t.type="xstate.assign",t.assignment=e,t.resolve=tF,t}let tU=new WeakMap;function tW(e,t,n){let r=tU.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},tU.set(e,r)),r[t]}let tq={},tG=e=>"string"==typeof e?{type:e}:"function"==typeof e?"resolve"in e?{type:e.type}:{type:e.name}:e;class tY{constructor(e,t){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=t._parent,this.key=t._key,this.machine=t._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join("."),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?A(this.config.states,(e,t)=>new tY(e,{_parent:this,_key:t,_machine:this.machine})):tq,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
2ompound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=T(this.config.entry).slice(),this.exit=T(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=T(e.tags).slice()}_initialize(){this.transitions=function(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(""===n)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,R(r).map(t=>ed(e,n,t)))}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,R(e.config.onDone).map(t=>ed(e,n,t)))}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,R(n.onDone).map(t=>ed(e,r,t)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,R(n.onError).map(t=>ed(e,r,t)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,R(n.onSnapshot).map(t=>ed(e,r,t)))}}for(let n of e.after){let e=t.get(n.eventType);e||(e=[],t.set(n.eventType,e)),e.push(n)}return t}(this),this.config.always&&(this.always=R(this.config.always).map(e=>ed(this,"",e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.t
2ype,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(tG),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(tG),eventType:null})}:void 0,history:this.history,states:A(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(tG)})),entry:this.entry.map(tG),exit:this.exit.map(tG),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return tW(this,"invoke",()=>T(this.config.invoke).map((e,t)=>{var n,r;let{src:i,systemId:o}=e,s=e.id??(n=this.id,`${t}.${n}`),a="string"==typeof i?i:`xstate.invoke.${r=this.id,`${t}.${r}`}`;return{...e,src:a,id:s,systemId:o,toJSON(){let{onDone:t,onError:n,...r}=e;return{...r,type:"xstate.invoke",src:a,id:s}}}}))}get on(){return tW(this,"on",()=>[...this.transitions].flatMap(([e,t])=>t.map(t=>[e,t])).reduce((e,[t,n])=>(e[t]=e[t]||[],e[t].push(n),e),{}))}get after(){return tW(this,"delayedTransitions",()=>{var e;let t;return e=this,(t=e.config.after)?Object.keys(t).flatMap(n=>{var r;let i,o,s=t[n],a=Number.isNaN(+n)?n:+n,l=(r=e.id,o=(i={type:`xstate.after.${a}.${r}`}).type,e.entry.push(ez(i,{id:o,delay:a})),e.exit.push(Y(o)),o);return T("string"==typeof s?{target:s}:s).map(e=>({...e,event:l,delay:a}))}).map(t=>{let{delay:n}=t;return{...ed(e,t.event,t),delay:n}}):[]})}get initial(){return tW(this,"initial",()=>(function(e,t){let n="string"==typeof t?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:t&&"string"!=typeof t?T(t.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r})(this,this.config.initial))}next(e,t){let n,r=t.type,i=[];for(let o of tW(this,`candidates-${r}`,()=>{var e;let t,n;return e=this,t=e.transitions.get(r),n=[...e.transitions.keys()].filter(e=>e!==r&&D(r,e)).sort((e,t)=>t.length-e.length).flatMap(t=>e.transitions.get(t)),t?[...t,...n]:n})){let{guard:s}=o,a=e.context,l=!1;try{l=!s||en(s,a,t,e)}catch(t){let e="string"==typeof s?s:"object"==typeof s?s.type:void 0;throw Error(`Unable to evaluate guard ${e?`'${e}' `:""}in transition for event '${r}' in state node '${this.id}': 3${t.message}`)}if(l){i.push(...o.actions),n=o;break}}return n?[n]:void 0}get events(){return tW(this,"events",()=>{let{states:e}=this,t=new Set(this.ownEvents);if(e)for(let n of Object.keys(e)){let r=e[n];if(r.states)for(let e of r.events)t.add(`${e}`)}return Array.from(t)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(e=>this.transitions.get(e).some(e=>!(!e.target&&!e.actions.length&&!e.reenter)))))}}class tK{constructor(e,t){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.options=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:t?.actors??{},actions:t?.actions??{},delays:t?.delays??{},guards:t?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.options={maxIterations:1/0,...this.config.options},this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new tY(e,{_key:this.id,_machine:this}),this.root._initialize(),function(e){let t=[],n=r=>{Object.values(r).forEach(r=>{if(r.config.route&&r.config.id){let n=r.config.id,i=r.config.route.guard,o=({event:e})=>e.to===`#${n}`,s={...r.config.route,guard:i?function(e){function t(e,t){return!1}return t.check=et,t.guards=e,t}([o,i]):o,target:`#${n}`};t.push(ed(e,"xstate.route",s))}r.states&&n(r.states)})};n(e.states),t.length>0&&e.transitions.set("xstate.route",t)}(this.root),this.states=this.root.states,this.events=this.root.events}provide(e){let{actions:t,guards:n,actors:r,delays:i}=this.implementations;return new tK(this.config,{actions:{...t,...e.actions},guards:{...n,...e.guards},actors:{...r,...e.actors},delays:{...i,...e.delays}})}resolveState(e){var t;let n,r=(n=es(ev(t=this.root,e.value)),el(t,[...n])),i=es(ev(this.root,r));return eL({_nodes:[...i],context:e.context||{},children:{},status:eu(i,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,t,n){return eM(e,t,n,[]).snapshot}microstep(e,t,n){return eM(e,t,n,[]).microsteps.map(([e])=>e)}getTransitionData(e,t){return function e(t,n,r,i){if("string"==typeof n){let e;return(e=eg(t,n).next(r,i))&&e.length?e:t.next(r,i)}if(1===Object.keys(n).length){let o,s;return(s=e(eg(t,(o=Object.keys(n))[0]),n[o[0]],r,i))&&s.length?s:t.next(r,i)}let o=[];for(let s of Object.keys(n)){let a=n[s];if(!a)continue;let l=e(eg(t,s),a,r,i);l&&o.push(...l)}return o.length?o:t.next(r,i)}(this.root,e.value,e,t)||[]}_getPreInitialState(e,t,n){let{context:r}=this.config,i=eL({context:"function"!=typeof r&&r?r:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof r?eC(i,t,e,[tH(({spawn:e,event:t,self:n})=>r({spawn:e,input:t.input,self:n}))],n,void 0):i}getInitialSnapshot(e,t){let n=_(t),r=[],i=eL({context:"function"!=typeof this.config.context&&this.config.context?this.config.context:{},_nodes:[this.root],children:{},status:"active"},this);try{var o,s;i=this._getPreInitialState(e,n,r);let[t]=(o=this.root,s=i,eE([{target:[...em(o)],source:o,reenter:!0,actions:[],eventType:null,toJSON:null}],s,e,n,!0,r)),{snapshot:a}=eM(t,n,e,r);return a}catch(e){return eV(i,{status:"error",error:e})}}
3start(e){Object.values(e.children).forEach(e=>{"active"===e.getSnapshot().status&&e.start()})}getStateNodeById(e){let t=M(e),n=t.slice(1),r=ec(t[0])?t[0].slice(1):t[0],i=this.idMap.get(r);if(!i)throw Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);return ey(i,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,t){return function(e,t){let{_nodes:n,tags:r,machine:i,children:o,context:s,can:a,hasTag:l,matches:u,getMeta:c,toJSON:d,...h}=e,f={};for(let e in o){let n=o[e];f[e]={snapshot:n.getPersistedSnapshot(t),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...h,context:function e(t){let n;for(let r in t){let i=t[r];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(t)?t.slice():{...t})[r]={xstate$$type:1,id:i.id};else{let o=e(i);o!==i&&((n??=Array.isArray(t)?t.slice():{...t})[r]=o)}}return n??t}(s),children:f,historyValue:function(e){if("object"!=typeof e||null===e)return{};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(e=>({id:e.id})))}return t}(h.historyValue)}}(e,t)}restoreSnapshot(e,t){let n={},r=e.children;Object.keys(r).forEach(e=>{let i=r[e],o=i.snapshot,s=i.src,a="string"==typeof s?V(this,s):s;if(!a)return;let l=W(a,{id:e,parent:t.self,syncSnapshot:i.syncSnapshot,snapshot:o,src:s,systemId:i.systemId});n[e]=l});let i=function(e,t){if(!t||"object"!=typeof t)return{};let n={};for(let r in t)for(let i of t[r]){let t=function(e,t){if(t instanceof tY)return t;try{return e.machine.getStateNodeById(t.id)}catch{}}(e,i);t&&(n[r]??=[],n[r].push(t))}return n}(this.root,e.historyValue),o=eL({...e,children:n,_nodes:Array.from(es(ev(this.root,e.value))),historyValue:i},this),s=new Set;return!function e(t,n){if(!s.has(t))for(let r in s.add(t),t){let i=t[r];if(i&&"object"==typeof i){if("xstate$$type"in i&&1===i.xstate$$type){t[r]=n[i.id];continue}e(i,n)}}}(o.context,n),o}}function tZ(e,t,n,r,{event:i}){return[t,{event:"function"==typeof i?i(n,r):i},void 0]}function tX(e,{event:t}){e.defer(()=>e.emit(t))}function tJ(e){function t(e,t){}return t.type="xstate.emit",t.event=e,t.resolve=tZ,t.execute=tX,t}let tQ=((e0={}).Parent="#_parent",e0.Internal="#_internal",e0);function t0(e,t,n,r,{to:i,event:o,id:s,delay:a},l){let u,c,d=t.machine.implementations.delays;if("string"==typeof o)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);let h="function"==typeof o?o(n,r):o;if("string"==typeof a){let e=d&&d[a];u="function"==typeof e?e(n,r):e}else u="function"==typeof a?a(n,r):a;let f="function"==typeof i?i(n,r):i;if("string"==typeof f){if(!(c=f===tQ.Parent?e.self._parent:f===tQ.Internal?e.self:f.startsWith("#_")?t.children[f.slice(2)]:l.deferredActorIds?.includes(f)?f:t.children[f]))throw Error(`Unable to send event to actor '${f}' from machine '${t.machine.id}'.`)}else c=f||e.self;return[t,{to:c,targetId:"string"==typeof f?f:void 0,event:h,id:s,delay:u},void 0]}function t1(e,t,n){"string"==typeof n.to&&(n.to=t.children[n.to])}function t2(e,t){e.defer(()=>{let{to:n,event:r,delay:i,id:o}=t;"number"==typeof i?e.system.scheduler.schedule(e.self,n,r,i,o):e.system._relay(e.self,n,"xstate.error"===r.type?E(e.self.id,r.data):r)})}function t5(e,t,n){function r(e,t){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=t0,r.retryResolve=t1,r.execute=t2,r}function t3(e,t){return t5(tQ.Parent,e,t)}function t4(e,t,n,r,{collect:i}){let o=[],s=function(e){o.push(e)};return s.assign=(...e)=>{o.push(tH(...e))},s.cancel=(...e)=>{o.push(Y(...e))},s.raise=(...e)=>{o.push(ez(...e))},s.sendTo=(...e)=>{o.push(t5(...e))},s.sendParent=(...e)=>{o.push(t3(...e))},s.spawnChild=(...e)=>{o.push(X(...e))},s.stopChild=(...e)=>{o.push(ee(...e))},s.emit=(...e)=>{o.push(tJ(...e))},i({context:n.context,event:n.event,enqueue:s,check:e=>en(e,t.context,n.event,t),self:e.self,system:e.system},r),[t,void 0,o]}function t6(e){function t(e,t){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=t4,t}function t8(e,t,n,r,{value:i,label:o}){return[t,{value:"function"==typeof i?i(n,r):i,label:o},void 0]}function t7({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function t9(e=({context:e,event:t})=>({context:e,event:t}),t){function n(e,t){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=t8,n.execute=t7,n}function ne(e,t){let n=T(t);if(!n.some(t=>D(e.type,t))){let t=1===n.length?`type matching "${n[0]}"`:`one of types matching "${n.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(e)} to have ${t}`)}}function nt({schemas:e,actors:t,actions:n,guards:r,delays:i}){return{assign:tH,sendTo:t5,raise:ez,log:t9,cancel:Y,stopChild:ee,enqueueActions:t6,emit:tJ,spawnChild:X,createStateConfig:e=>e,createAction:e=>e,createMachine:o=>new tK({...o,schemas:e},{actors:t,actions:n,guards:r,delays:i}),extend:o=>nt({schemas:e,actors:t,actions:{...n,...o.actions},guards:{...r,...o.guards},delays:{...i,...o.delays}})}}
3var nn=function(e,t){return(nn=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function nr(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}nn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function ni(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){var u=[a,l];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function no(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ns(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function na(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function nl(e){return this instanceof nl?(this.v=e,this):new nl(e)}function nu(e){return"function"==typeof e}function nc(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var nd=nc(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function nh(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var nf=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,r,i,o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=no(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(nu(l))try{l()}catch(e){i=e instanceof nd?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=no(u),d=c.next();!d.done;d=c.next()){var h=d.value;try{ng(h)}catch(e){i=null!=i?i:[],e instanceof nd?i=na(na([],ns(i)),ns(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new nd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)ng(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nh(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&nh(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),np=nf.EMPTY;function nm(e){return e instanceof nf||e&&"closed"in e&&nu(e.remove)&&nu(e.add)&&nu(e.unsubscribe)}function ng(e){nu(e)?e():e.unsubscribe()}var ny=void 0,nv={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=nv.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,na([e,t],ns(n))):setTimeout.apply(void 0,na([e,t],ns(n)))},clearTimeout:function(e){var t=nv.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function nb(e){nv.setTimeout(function(){!1;throw e})}function nx(){}var nw=nk("C",void 0,void 0);function nk(e,t,n){return{kind:e,value:t,error:n}}var nS=null;function nE(e){var t,n,r,i;1;e()}var n_=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,nm(t)&&t.add(n)):n.destination=nP,n}return nr(t,e),t.create=function(e,t,n){return new n$(e,t,n)},t.prototype.next=function(e){this.isStopped?nT(nk("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?nT(nk("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?nT(nw,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(nf),nj=Function.prototype.bind;function nC(e,t){return nj.call(e,t)}var nM=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){nA(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){nA(e)}else nA(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){nA(e)}},e}(),n$=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;return nu(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:i=t,s.destination=new nM(i),s}return nr(t,e),t}(n_);function nA(e){1;nb(e)}function nT(e,t){}var nP={closed:!0,next:nx,error:function(e){throw e},complete:nx},nI="function"==typeof Symbol&&Symbol.observable||"@@observable";function nR(e){return e}function nO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nL(e)}function nL(e){return 0===e.length?nR:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var nV=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=!function(e){return e&&e instanceof n_||e&&nu(e.next)&&nu(e.error)&&nu(e.complete)&&nm(e)}(e)?new n$(e,t,n):e;return nE(function(){var e=r.operator,t=r.source;i.add(e?e.call(i,t):t?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=nD(t))(function(t,r){var i=new n$({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[nI]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nL(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=nD(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function nD(e){var t;return null!=(t=null!=e?e:ny)?t:Promise}var nN=new nV(function(e){return e.complete()});function nz(e){return function(t){if(nu(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function nB(e,t,n,r,i){return new nF(e,t,n,r,i)}var nF=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return nr(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(n_);function nH(e,t){return nz(function(n,r){var i=0;n.subscribe(nB(r,function(n){r.next(e.call(t,n,i++))}))})}var nU=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function nW(e){return nu(null==e?void 0:e.then)}function nq(e){return Symbol.asyncIterator&&nu(null==e?void 0:e[Symbol.asyncIterator])}function nG(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
3d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var nY="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function nK(e){return nu(null==e?void 0:e[nY])}function nZ(e){return function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof nl?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,function(){var t,n,r;return ni(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,nl(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,nl(void 0)];case 4:return[2,i.sent()];case 5:return[4,nl(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function nX(e){return nu(null==e?void 0:e.getReader)}function nJ(e){if(e instanceof nV)return e;if(null!=e){var t,n,r,i;if(nu(e[nI])){return t=e,new nV(function(e){var n=t[nI]();if(nu(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(nU(e)){return n=e,new nV(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if(nW(e)){return r=e,new nV(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,nb)})}if(nq(e))return nQ(e);if(nK(e)){return i=e,new nV(function(e){var t,n;try{for(var r=no(i),o=r.next();!o.done;o=r.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.complete()})}if(nX(e))return nQ(nZ(e))}throw nG(e)}function nQ(e){return new nV(function(t){(function(e,t){var n,r,i,o,s,a,l,u;return s=this,a=void 0,l=void 0,u=function(){var s;return ni(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=no(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,s,a;o=r,s=i,a=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}(e),a.label=1;case 1:return[4,n.next()];case 2:if((r=a.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(r&&!r.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})},new(l||(l=Promise))(function(e,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function r(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof l?i:new l(function(e){e(i)})).then(n,r)}i((u=u.apply(s,a||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function n0(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function n1(e,t,n){return(void 0===n&&(n=1/0),nu(t))?n1(function(n,r){return nH(function(e,i){return t(n,e,r,i)})(nJ(e(n,r)))},n):("number"==typeof t&&(n=t),nz(function(t,r){var i,o,s,a,l,u,c,d;return i=n,o=[],s=0,a=0,l=!1,u=function(){!l||o.length||s||r.complete()},c=function(e){return s<i?d(e):o.push(e)},d=function(t){s++;var n=!1;nJ(e(t,a++)).subscribe(nB(r,function(e){r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(s--;o.length&&s<i;)!function(){var e=o.shift();d(e)}();u()}catch(e){r.error(e)}}))},t.subscribe(nB(r,c,function(){l=!0,u()})),function(){}}))}function n2(e){return new nV(function(t){nJ(e()).subscribe(t)})}function n5(e,t){return nz(function(n,r){var i=0;n.subscribe(nB(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var n3=Array.isArray,n4=["addListener","removeListener"],n6=["addEventListener","removeEventListener"],n8=["on","off"];function n7(e,t,n,r){if(nu(n)&&(r=n,n=void 0),r){return n7(e,t,n
3).pipe((i=r,nH(function(e){return n3(e)?i.apply(void 0,na([],ns(e))):i(e)})))}var i,o,s,a,l=ns(nu((o=e).addEventListener)&&nu(o.removeEventListener)?n6.map(function(r){return function(i){return e[r](t,i,n)}}):nu((s=e).addListener)&&nu(s.removeListener)?n4.map(n9(e,t)):nu((a=e).on)&&nu(a.off)?n8.map(n9(e,t)):[],2),u=l[0],c=l[1];if(!u&&nU(e))return n1(function(e){return n7(e,t,n)})(nJ(e));if(!u)throw TypeError("Invalid event target");return new nV(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return u(t),function(){return c(t)}})}function n9(e,t){return function(n){return function(r){return e[n](t,r)}}}function re(e){return e<=0?function(){return nN}:nz(function(t,n){var r=0;t.subscribe(nB(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}let rt=e=>({context:t})=>{let{count:n,include:r,exclude:i,responseType:o="message.received"}=e;return{count:n,domain:t.domain,from:t.connectTo,include:r?Array.isArray(r)?r:[r]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:t.target,to:t.name}},rn=n2(()=>n7(window,"message")),rr=e=>eH(({input:t})=>{var n,r,i;let o;return rn.pipe(e?nH(e):nO(),n5(e=>{let{data:n}=e;return(!t.include.length||t.include.includes(n.type))&&(!t.exclude.length||!t.exclude.includes(n.type))&&n.domain===t.domain&&n.from===t.from&&n.to===t.to&&(!t.target||e.source===t.target)}),nH((o=t.responseType,e=>({type:o,message:e}))),t.count?nO((n=t.count,void 0===r&&(r=null),r=null!=r?r:n,nz(function(e,t){var i=[],o=0;e.subscribe(nB(t,function(e){var s,a,l,u,c=null;o++%r==0&&i.push([]);try{for(var d=no(i),h=d.next();!h.done;h=d.next()){var f=h.value;f.push(e),n<=f.length&&(c=null!=c?c:[]).push(f)}}catch(e){s={error:e}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}if(c)try{for(var p=no(c),m=p.next();!m.done;m=p.next()){var f=m.value;nh(i,f),t.next(f)}}catch(e){l={error:e}}finally{try{m&&!m.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}},function(){var e,n;try{for(var r=no(i),o=r.next();!o.done;o=r.next()){var s=o.value;t.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.complete()},void 0,function(){i=null}))})),(i=e=>e,nu(void 0)?n1(i,void 0,1):n1(i,1)),re(t.count)):nO())}),ri="sanity/comlink",ro="comlink/response",rs="comlink/heartbeat",ra="comlink/disconnect",rl="comlink/handshake/syn",ru="comlink/handshake/syn-ack",rc="comlink/handshake/ack",rd=()=>nt({types:{},actors:{listen:eH(({input:e})=>{let t,n=e.signal?n7(e.signal,"abort").pipe((t=`Request ${e.requestId} aborted`,e=>e.pipe(re(1),nH(()=>{throw Error(t)})))):nN;return n7(window,"message").pipe(n5(t=>t.data?.type==="comlink/response"&&t.data?.responseTo===e.requestId&&!!t.source&&e.sources.has(t.source)),re(e.sources.size),nz(function(e,t){nJ(n).subscribe(nB(t,function(){return t.complete()},nx)),t.closed||e.subscribe(t)}))})},actions:{"send message":({context:e},t)=>{let{sources:n,targetOrigin:r}=e,{message:i}=t;n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},"on success":t5(({context:e})=>e.parentRef,({context:e,self:t})=>(e.response&&e.resolvable?.resolve(e.response),{type:"request.success",requestId:t.id,response:e.response,responseTo:e.responseTo})),"on fail":t5(({context:e})=>e.parentRef,({context:e,self:t})=>(e.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${e.type}' on client '${e.from}' (ID: '${e.id}').`),e.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:t.id})),"on abort":t5(({context:e})=>e.parentRef,({context:e,self:t})=>(e.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:t.id}))},guards:{expectsResponse:({context:e})=>e.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:e})=>e.responseTimeout??3e3}}).createMachine({context:({input:e})=>({channelId:e.channelId,data:e.data,domain:e.domain,expectResponse:e.expectResponse??!1,from:e.from,id:`msg-${tB()}`,parentRef:e.parentRef,resolvable:e.resolvable,response:null,responseTimeout:e.responseTimeout,responseTo:e.responseTo,signal:e.signal,sources:e.sources instanceof Set?e.sources:new Set([e.sources]),suppressWarnings:e.suppressWarnings,targetOrigin:e.targetOrigin,to:e.to,type:e.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:e})=>{let{channelId:t,data:n,domain:r,from:i,id:o,responseTo:s,to:a,type:l}=e;return{message:{channelId:t,data:n,domain:r,from:i,id:o,to:a,type:l,responseTo:s}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:e})=>({requestId:e.id,sources:e.sources,signal:e.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:tH({response:({event:e})=>e.data.data,responseTo:({event:e})=>e.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:e,self:t})=>({requestId:t.id,response:e.response,responseTo:e.responseTo})}),rh=()=>nt({types:{},actors:{requestMachine:rd(),listen:rr()},actions:{"buffer handshake":tH({handshakeBuffer:({event:e,context:t})=>(ne(e,"message.received"),[...t.handshakeBuffer,e])}),"buffer message":t6(({enqueue:e})=>{e.assign({buffer:({event:e,context:t})=>(ne(e,"post"),[...t.buffer,{data:e.data,resolvable:e.resolvable,options:e.options}])}),e.emit(({event:e})=>(ne(e,"post"),{type:"buffer.added",message:e.data}))}),"create request":tH({requests:({context:e,event:t,self:n,spawn:r})=>{ne(t,"request");let i=(Array.isArray(t.data)?t.data:[t.data]).map(t=>r("requestMachine",{id:`req-${tB()}`,input:{channelId:e.channelId,data:t.data,domain:e.domain,expectResponse:t.expectResponse,from:e.name,parentRef:n,resolvable:t.resolvable,responseTimeout:t.options?.responseTimeout,responseTo:t.responseTo,signal:t.options?.signal,sources:e.target,suppressWarnings:t.o
3ptions?.suppressWarnings,targetOrigin:e.targetOrigin,to:e.connectTo,type:t.type}}));return[...e.requests,...i]}}),"emit heartbeat":tJ(()=>({type:"heartbeat"})),"emit received message":t6(({enqueue:e})=>{e.emit(({event:e})=>(ne(e,"message.received"),{type:"message",message:e.message.data}))}),"emit status":tJ((e,t)=>({type:"status",status:t.status})),"post message":ez(({event:e})=>(ne(e,"post"),{type:"request",data:{data:e.data.data,expectResponse:!!e.resolvable,type:e.data.type,resolvable:e.resolvable,options:e.options}})),"process pending handshakes":t6(({context:e,enqueue:t})=>{e.handshakeBuffer.forEach(e=>t.raise(e)),t.assign({handshakeBuffer:[]})}),"remove request":t6(({context:e,enqueue:t,event:n})=>{ne(n,["request.success","request.failed","request.aborted"]),ee(n.requestId),t.assign({requests:e.requests.filter(({id:e})=>e!==n.requestId)})}),"send response":ez(({event:e})=>(ne(e,["message.received","heartbeat.received"]),{type:"request",data:{type:ro,responseTo:e.message.data.id,data:void 0}})),"send handshake syn ack":ez({type:"request",data:{type:ru}}),"send pending messages":t6(({enqueue:e})=>{e.raise(({context:e})=>({type:"request",data:e.buffer.map(({data:e,resolvable:t,options:n})=>({data:e.data,type:e.type,expectResponse:!!t,resolvable:t,options:n}))})),e.emit(({context:e})=>({type:"buffer.flushed",messages:e.buffer.map(({data:e})=>e)})),e.assign({buffer:[]})}),"set connection config":tH({channelId:({event:e})=>(ne(e,"handshake.syn"),e.message.data.channelId),target:({event:e})=>(ne(e,"handshake.syn"),e.message.source||void 0),targetOrigin:({event:e})=>(ne(e,"handshake.syn"),e.message.origin)})},guards:{hasSource:({context:e})=>null!==e.target}}).createMachine({id:"node",context:({input:e})=>({buffer:[],channelId:null,connectTo:e.connectTo,domain:e.domain??"sanity/comlink",handshakeBuffer:[],name:e.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:rt({include:rl,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}},initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:rt({include:rc,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:rt({include:ra,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:rt({exclude:[ra,rl,rc,rs,ro]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:rt({exclude:[ra,rl,rc,rs,ro]})},{id:"listen for heartbeat",src:"listen",input:rt({include:rs,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:rt({include:ra,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}}),rf=(e,t=rh())=>{let n=W(t,{input:e}),r=new Map,i=new Map,o;n.on("message",({message:e})=>{let t=r.get(e.type);if(t)return void t.forEach(t=>t(e.data));let n=i.get(e.type);n?n.add(e):i.set(e.type,new Set([e]))});let s=()=>{n.stop()};return{actor:n,fetch:(e,t,r)=>{let i,o,{responseTimeout:s=1e4,signal:a,suppressWarnings:l}=r||{},u="function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((e,t)=>{i=e,o=t}),resolve:i,reject:o};return n.send({type:"post",data:{type:e,data:t},resolvable:u,options:{responseTimeout:s,signal:a,suppressWarnings:l}}),u.promise},machine:t,on:(e,t,n)=>{let o=r.get(e)||new Set;r.has(e)||r.set(e,o),o.add(t);let s=i.get(e);if(s){let r=n?.replay??1;Array.from(s).slice(-r).forEach(({data:e})=>t(e)),i.delete(e)}return()=>{o.delete(t)}},onStatus:(e,t)=>{let r=n.on("status",n=>{o=n.status,t&&n.status!==t||e(n.status)});return o&&e(o),()=>r.unsubscribe()},post:(e,t)=>
3{n.send({type:"post",data:{type:e,data:t}})},start:()=>(n.start(),s),stop:s}};e.s(["DOMAIN",0,ri,"MSG_DISCONNECT",0,ra,"MSG_HANDSHAKE_ACK",0,rc,"MSG_HANDSHAKE_SYN",0,rl,"MSG_HANDSHAKE_SYN_ACK",0,ru,"MSG_HEARTBEAT",0,rs,"MSG_RESPONSE",0,ro,"createListenLogic",0,rr,"createNode",0,rf,"createNodeMachine",0,rh,"createRequestMachine",0,rd],881283);let rp={"handshake/syn":rl,"handshake/syn-ack":ru,"handshake/ack":rc,"channel/response":ro,"channel/heartbeat":rs,"channel/disconnect":ra,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},rm={[rl]:"handshake/syn",[ru]:"handshake/syn-ack",[rc]:"handshake/ack",[ro]:"channel/response",[rs]:"channel/heartbeat",[ra]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},rg=e=>{let{data:t}=e;return t&&"object"==typeof t&&"domain"in t&&"type"in t&&"from"in t&&"to"in t&&("sanity/channels"===t.domain&&(t.domain=ri),"overlays"===t.to&&(t.to="visual-editing"),"overlays"===t.from&&(t.from="visual-editing"),t.channelId=t.connectionId,delete t.connectionId,t.type=rp[t.type]??t.type),e},ry=({context:e},t)=>{let{sources:n,targetOrigin:r}=e,i=(e=>{let{channelId:t,...n}=e,r={...n,connectionId:t};return r.domain===ri&&(r.domain="sanity/channels"),"visual-editing"===r.to&&(r.to="overlays"),"visual-editing"===r.from&&(r.from="overlays"),r.type=rm[r.type]??r.type,"channel/response"===r.type&&r.responseTo&&!r.data&&(r.data={responseTo:r.responseTo}),("handshake/syn"===r.type||"handshake/syn-ack"===r.type||"handshake/ack"===r.type)&&(r.data={id:r.connectionId}),r})(t.message);n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},rv=()=>({listen:rr(rg),requestMachine:rd().provide({actions:{"send message":ry}})});function rb(){return window.self!==window.top}function rx(){return!!window.opener}e.s(["createCompatibilityActors",0,rv,"isMaybePreviewIframe",0,rb,"isMaybePreviewWindow",0,rx],636536);let rw=/_key\s*==\s*['"](.*)['"]/,rk=/^\d*:\d*$/;function rS(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function rE(e){return"string"==typeof e?rw.test(e.trim()):"object"==typeof e&&"_key"in e}var r_=e.i(15010);let rj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rC=/_key\s*==\s*['"](.*)['"]/;function rM(e,t,n){let r="string"==typeof t?function(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(rj);if(!t)throw Error("Invalid path string");return t.map(r$)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(rS(t)){if(!Array.isArray(i))return n;i=i[t]}if(rE(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&i?i[t]:void 0),void 0===i)return n}return i}function r$(e){return rS(e)?Number(e.replace(/[^\d]/g,"")):rE(e)?{_key:e.match(rC)[1]}:!function(e){if("string"==typeof e&&rk.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}(e)?e:function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e)}function rA(){return(0,r_.useSyncExternalStore)(rI,rP,rT)}function rT(){return eY}function rP(){return eK}function rI(e){return eZ.add(e),()=>eZ.delete(e)}function rR(){let e=(0,tt.c)(2),t=rA(),n;return e[0]===t?n=e[1]:(n=eX(t),e[0]=t,e[1]=n),!n}function rO(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function rL(e,t){let n=rb(),r=rx();if(eX(t)||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=tm(e),o=tg(e),s=t.getSnapshot().context?.documents,a=s?.[i],l=s?.[o],u=a||l;if(!u)throw Error(`Document "${e}" not found`);let c=a.getSnapshot().context?.local||l.getSnapshot().context?.local,d=new Promise(e=>{if(c)e(c);else{let t=u.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:a,draftId:i,getSnapshot:()=>d,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function rV(){let e=(0,tt.c)(7),t=rA(),n;e[0]===t?n=e[1]:(n=e=>({id:e,commit:()=>{let{draftDoc:n}=rL(e,t);n.send({type:"submit"})},get:n=>{let{snapshot:r}=rL(e,t);return n?rM(r,n):r},getSnapshot:function(e,t){let{getSnapshot:n}=rL(e,t);return n}(e,t),patch:async(n,r)=>{let i=rL(e,t),{draftDoc:o,draftId:s,getSnapshot:a,publishedId:l}=i,{commit:u=!0}=r||{},c=await ("function"==typeof n?n({draftId:s,publishedId:l,get snapshot(){return i.snapshot},getSnapshot:a}):n),d=await a();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:s}},{type:"patch",id:s,patches:t_(c),...{}}]}),u&&("object"==typeof u&&"debounce"in u?rO(()=>o.send({type:"submit"}),u.debounce)():o.send({type:"submit"}))}}),e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=(e,n,r)=>{let{draftDoc:i}=rL(e,t),{commit:o}=r||{},s=void 0===o||o;i.send({type:"mutate",mutations:n}),s&&("object"==typeof s&&"debounce"in s?rO(()=>i.send({type:"submit"}),s.debounce)():i.send({type:"submit"}))},e[2]=t,e[3]=i);let o=i,s;return e[4]!==r||e[5]!==o?(s={getDocument:r,mutateDocument:o},e[4]=r,e[5]=o,e[6]=s):s=e[6],s}function rD(e){let t=(()=>
3{if(u)return u;u=[];for(let e=0;e<256;++e)u[e]=(e+256).toString(16).slice(1);return u})();return(function(e=16){let t=new Uint8Array(e);return crypto.getRandomValues(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function rN(e){let t="string"==typeof e?e:e.path,n=t.lastIndexOf("."),r=t.substring(n+1,t.length);if(!r.indexOf("["))throw Error("Invalid path: not an array");let i=t.lastIndexOf("["),o=t.substring(0,i),s,a;if(r.includes("_key")){let e=r.indexOf('"')+1,t=r.indexOf('"',e);s=r.substring(e,t),a=!0}else{let e=r.indexOf("[")+1,t=r.indexOf("]",e);s=r.substring(e,t),a=!1}if(!o||!s)throw Error("Invalid path");return{path:o,key:s,hasExplicitKey:a}}function rz(e,t,n="after"){let{path:r,key:i}=rN(e);return[tR(r,tO({...rM(t,e.path),_key:rD()},n,{_key:i}))]}function rB(e,t){let{path:n,key:r}=rN(e),i=rM(t,n).findIndex(e=>e._key===r);return[tR(n,tL(i,i+1))]}function rF(e,t,n){let{path:r,key:i}=rN(e);return[tR(r,tO([{_type:t,_key:rD()}],n,{_key:i}))]}async function rH(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=rN(e),o=await t.getSnapshot(),s=rM(o,r),a=rM(o,e.path),l=s.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===s.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===s.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[tR(r,tL(l,l+1)),tR(r,tO(a,c,u))]}e.s(["a",0,rB,"c",0,rR,"i",0,rH,"l",0,rM,"n",0,rF,"o",0,rV,"r",0,rN,"s",0,rA,"t",0,rz],43069);var rU=e.i(576955);function rW(e){let[t,n]=e;return[t,n]}function rq(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let s=Math.min(i,o);if(n===r)return s;let a=0,l=1;for(let e=0;-1!==e;){let t=n.substring(s-l);if(-1===(e=r.indexOf(t)))break;l+=e,(0===e||n.substring(s-l)===r.substring(0,l))&&(a=l,l++)}return a}function rG(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function rY(e,t){if(!e||!t||e[e.length-1]!==t[t.length-1])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function rK(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function rZ(e,t,n,r,i){let o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=r3(o,s,{checkLines:!1,deadline:i}),c=r3(a,l,{checkLines:!1,deadline:i});return u.concat(c)}function rX(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",s,a,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=rG(e.slice(n),t.slice(i)),c=rY(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),s=e.slice(0,n-c),a=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[s||"",a||"",l||"",u||"",o||""]:null}var rJ=Object.defineProperty,rQ=Object.getOwnPropertySymbols,r0=Object.prototype.hasOwnProperty,r1=Object.prototype.propertyIsEnumerable,r2=(e,t,n)=>t in e?rJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function r5(e,t,n){if(null===e||null===t)throw Error("Null input. (diff)");let r=r3(e,t,function(e){let t;var n,r={checkLines:!0,deadline:(n=e.timeout||1,t=1,"u">typeof n&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+1e3*t)},i=e;for(var o in i||(i={}))r0.call(i,o)&&r2(r,o,i[o]);if(rQ)for(var o of rQ(i))r1.call(i,o)&&r2(r,o,i[o]);return r}(n||{}));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let i=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&r8(e,t,1),rK(i)&&0===n&&r8(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(r),r}function r3(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=rG(r,i),s=r.substring(0,o);o=rY(r=r.substring(o),i=i.substring(o));let a=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,s=i.indexOf(o);if(-1!==s)return r=[[1,i.substring(0,s)],[0,o],[1,i.substring(s+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let a=function(e,t,n=1){let r,i,o,s,a;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;
3let c=rX(l,u,Math.ceil(l.length/4)),d=rX(l,u,Math.ceil(l.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(i=r[0],o=r[1],s=r[2],a=r[3]):(s=r[0],a=r[1],i=r[2],o=r[3]),[i,o,s,a,r[4]]}(e,t);if(a){let e=a[0],t=a[1],r=a[2],i=a[3],o=a[4],s=r3(e,r,n),l=r3(t,i,n);return s.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,s=-1,a=n.length;for(;s<e.length-1;){-1===(s=e.indexOf(` 4`,i))&&(s=e.length-1);let l=e.slice(i,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a===o&&(l=e.slice(i),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),i=s+1}return t}n[0]="";let o=4e4,s=i(e);return o=65535,{chars1:s,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let s=o.lineArray,a=r3(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(a,s),(a=r7(a)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<a.length;){switch(a[l][0]){case 1:c++,h+=a[l][1];break;case -1:u++,d+=a[l][1];break;case 0:if(u>=1&&c>=1){a.splice(l-u-c,u+c),l=l-u-c;let e=r3(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)a.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return a.pop(),a}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),s=2*o,a=Array(s),l=Array(s);for(let e=0;e<s;e++)a[e]=-1,l[e]=-1;a[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,h=0,f=0,p=0;for(let m=0;m<o&&!(Date.now()>n);m++){for(let f=-m+d;f<=m-h;f+=2){let p,g=o+f,y=(p=f===-m||f!==m&&a[g-1]<a[g+1]?a[g+1]:a[g-1]+1)-f;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(a[g]=p,p>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-f;if(i>=0&&i<s&&-1!==l[i]&&p>=r-l[i])return rZ(e,t,p,y,n)}}for(let d=-m+f;d<=m-p;d+=2){let h,g=o+d,y=(h=d===-m||d!==m&&l[g-1]<l[g+1]?l[g+1]:l[g-1]+1)-d;for(;h<r&&y<i&&e.charAt(r-h-1)===t.charAt(i-y-1);)h++,y++;if(l[g]=h,h>r)p+=2;else if(y>i)f+=2;else if(!c){let i=o+u-d;if(i>=0&&i<s&&-1!==a[i]){let s=a[i],l=o+s-i;if(s>=(h=r-h))return rZ(e,t,s,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return s&&l.unshift([0,s]),a&&l.push([0,a]),l=is(l)}function r4(e,t,n){return 1===n?e+t:t+e}function r6(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function r8(e,t,n){var r,i;let o=1===n?-1:1,s=null,a=null,l=t+n;for(;l>=0&&l<e.length&&(null===s||null===a);l+=n){let[r,i]=e[l];if(0!==i.length){if(1===r){null===s&&(s=l);continue}else if(-1===r){null===a&&(a=l);continue}else if(0===r){if(null===s&&null===a){let[r,i]=r6(e[t][1],n);e[t][1]=r,e[l][1]=r4(e[l][1],i,o);return}break}}}if(null!==s&&null!==a&&(r=s,i=a,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=r6(e[s][1],o),[l]=r6(e[a][1],o);e[s][1]=r,e[a][1]=l,e[t][1]=r4(e[t][1],i,n);return}let[u,c]=r6(e[t][1],n);e[t][1]=u,null===s?(e.splice(l,0,[1,c]),null!==a&&a>=l&&a++):e[s][1]=r4(e[s][1],c,o),null===a?e.splice(l,0,[-1,c]):e[a][1]=r4(e[a][1],c,o)}function r7(e){let t=e.map(e=>rW(e)),n=!1,r=[],i=0,o=null,s=0,a=0,l=0,u=0,c=0;for(;s<t.length;)0===t[s][0]?(r[i++]=s,a=u,l=c,u=0,c=0,o=t[s][1]):(1===t[s][0]?u+=t[s][1].length:c+=t[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,s=--i>0?r[i-1]:-1,a=0,l=0,u=0,c=0,o=null,n=!0)),s++;for(n&&(t=is(t)),t=io(t),s=1;s<t.length;){if(-1===t[s-1][0]&&1===t[s][0]){let e=t[s-1][1],n=t[s][1],r=rq(e,n),i=rq(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(s,0,[0,n.substring(0,r)]),t[s-1][1]=e.substring(0,e.length-r),t[s+1][1]=n.substring(r),s++):(i>=e.length/2||i>=n.length/2)&&(t.splice(s,0,[0,e.substring(0,i)]),t[s-1][0]=1,t[s-1][1]=n.substring(0,n.length-i),t[s+1][0]=-1,t[s+1][1]=e.substring(i),s++),s++}s++}return t}let r9=/[^a-zA-Z0-9]/,ie=/\s/,it=/[\r\n]/,ir=/\n\r?\n$/,ii=/^\r?\n\r?\n/;function io(e){let t=e.map(e=>rW(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(r9),o=r.match(r9),s=i&&n.match(ie),a=o&&r.match(ie),l=s&&n.match(it),u=a&&r.match(it),c=l&&e.match(ir),d=u&&t.match(ii);return c||d?5:l||u?4:i&&!s&&a?3:s||a?2:i||o?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],i=t[r][1],o=t[r+1][1],s=rY(e,i);if(s){let t=i.substring(i.length-s);e=e.substring(0,e.length-s),i=t+i.substring(0,i.length-s),o=t+o}let a=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>=c&&(c=t,a=e,l=i,u=o)}t[r-1][1]!==a&&(a?t[r-1][1]=a:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function is(e){let t=e.map(e=>rW(e));t.push([0,""]);let n=0,r=0,i=0,o="",s="",a;for(;n<t.length;)switch(t[n][0]){case 1:i++,s+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(a=rG(s,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=s.substring(0,a):(t.splice(0,0,[0,s.substring(0,a)]),n++),s=s.substring(a),o=o.substring(a)),0!==(a=rY(s,o))&&(t[n][1]=s.substring(s.length-a)+t[n][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),s.length&&(t.splice(n,0,[1,s]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),l=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),l=!0)),n++;return l&&(t=is(t)),t}var ia=Object.defineProperty,il=Object.getOwnPropertySymbols,iu=Object.prototype.hasOwnProperty,ic=Object.prototype.propertyIsEnumerable,id=(e,t,n)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ih=(e,t)=>{for(var n in t||(t={}
4))iu.call(t,n)&&id(e,n,t[n]);if(il)for(var n of il(t))ic.call(t,n)&&id(e,n,t[n]);return e};let ip={threshold:.5,distance:1e3};function im(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let i=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(i,i+t.length)===t?i:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let i=ih(ih({},ip),r),o=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function s(e,r){let o=e/t.length,s=Math.abs(n-r);return i.distance?o+s/i.distance:s?1:o}let a=i.threshold,l=e.indexOf(t,n);-1!==l&&(a=Math.min(s(0,l),a),-1!==(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,l),a)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,f=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)s(r,n+d)<=a?c=d:h=d,d=Math.floor((h-c)/2+c);h=d;let i=Math.max(1,n-d+1),p=Math.min(n+d,e.length)+t.length,m=Array(p+2);m[p+1]=(1<<r)-1;for(let t=p;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?m[t]=(m[t+1]<<1|1)&c:m[t]=(m[t+1]<<1|1)&c|((f[t+1]|f[t])<<1|1)|f[t+1],m[t]&u){let e=s(r,t-1);if(e<=a)if(a=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}if(s(r+1,n)>a)break;f=m}return l}(e,t,i,r):-1}function ig(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function iy(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function iv(e,t){let n=0,r=0,i=0,o=0,s;for(s=0;s<e.length&&(1!==e[s][0]&&(n+=e[s][1].length),-1!==e[s][0]&&(r+=e[s][1].length),!(n>t));s++)i=n,o=r;return e.length!==s&&-1===e[s][0]?o:o+(t-i)}function ib(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=ix(r)}return t}function ix(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function iw(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var ik=Object.defineProperty,iS=Object.getOwnPropertySymbols,iE=Object.prototype.hasOwnProperty,i_=Object.prototype.propertyIsEnumerable,ij=(e,t,n)=>t in e?ik(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iC=(e,t)=>{for(var n in t||(t={}))iE.call(t,n)&&ij(e,n,t[n]);if(iS)for(var n of iS(t))i_.call(t,n)&&ij(e,n,t[n]);return e};let iM={margin:4};function i$(e={}){return iC(iC({},iM),e)}function iA(e,t,n){if(0===t.length)return[];let r=[],i=iw(0,0),o=0,s=0,a=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[f,p]=h,m=p.length,g=ib(p);switch(!o&&0!==f&&(i.start1=s,i.start2=a,i.utf8Start1=l,i.utf8Start2=u),f){case 1:i.diffs[o++]=h,i.length2+=m,i.utf8Length2+=g,d=d.substring(0,a)+p+d.substring(a);break;case -1:i.length1+=m,i.utf8Length1+=g,i.diffs[o++]=h,d=d.substring(0,a)+d.substring(a+m);break;case 0:m<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=h,i.length1+=m,i.length2+=m,i.utf8Length1+=g,i.utf8Length2+=g):m>=2*n.margin&&o&&(iT(i,c,n),r.push(i),i=iw(-1,-1),o=0,c=d,s=a,l=u);break;default:throw Error("Unknown diff type")}1!==f&&(s+=m,l+=g),-1!==f&&(a+=m,u+=g)}return o&&(iT(i,c,n),r.push(i)),r}function iT(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),i=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)i+=n.margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=n.margin;let o=e.start2-i;o>=1&&rK(t[o])&&o--;let s=t.substring(o,e.start2);s&&e.diffs.unshift([0,s]);let a=s.length,l=ib(s),u=e.start2+e.length1+i;u<t.length&&rK(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=ib(c);e.start1-=a,e.start2-=a,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=a+d,e.length2+=a+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let iP=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function iI(e){return parseInt(e,10)}function iR(e){let t,n,r,{utf8Length1:i,utf8Length2:o,utf8Start1:s,utf8Start2:a,diffs:l}=e;t=0===i?`${s},0`:1===i?`${s+1}`:`${s+1},${i}`,n=0===o?`${a},0`:1===o?`${a+1}`:`${a+1},${o}`;let u=[`@@ -${t} +${n} @@ 5`];for(let e=0;e<l.length;e++){switch(l[e][0]){case 1:r="+";break;case -1:r="-";break;case 0:r=" ";break;default:throw Error("Unknown patch operation.")}u[e+1]=`${r+encodeURI(l[e][1])} 6`}return u.join("").replace(/%20/g," ")}function iO(e,t){if("number"==typeof t){var n=e.length,r=t;if(0===n&&(-1===r||0===r))return 0;let i=r<0?n+r:r;return i>=n||i<0?null:i}if(tw(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function iL(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function iV(e,t){let n={...e};for(let e of t)delete n[e];return n}function iD(e,t){var n;if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let r=iO(t,e.referenceItem);if(null===r)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:iL(t,(n=e.position,"before"===n?r:r+1),0,e.
6items)}let iN=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var iz=Object.freeze({__proto__:null,assign:function(e,t){if(!tI(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(iN(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let i=function(e,t,n={}){let r=0,i=0;function o(e){for(;r<e;){let e=t.codePointAt(i);if(typeof e>"u")return i;r+=ix(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let s=[];for(let t of e)s.push({diffs:t.diffs.map(e=>rW(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return s}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,s=n.deleteThreshold||.4,a=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],i=r.diffs;if(0===i.length||0!==i[0][0])i.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=a+r+a,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let i=r.start1,o=r.start2,s="";for(;0!==r.diffs.length;){let a=iw(i-s.length,o-s.length),l=!0;if(""!==s){let e=ib(s);a.length1=s.length,a.utf8Length1=e,a.length2=s.length,a.utf8Length2=e,a.diffs.push([0,s])}for(;0!==r.diffs.length&&a.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],s=ib(n);if(1===e){a.length2+=n.length,a.utf8Length2+=s,o+=n.length;let e=r.diffs.shift();e&&a.diffs.push(e),l=!1}else -1===e&&1===a.diffs.length&&0===a.diffs[0][0]&&n.length>64?(a.length1+=n.length,a.utf8Length1+=s,i+=n.length,l=!1,a.diffs.push([e,n]),r.diffs.shift()):(s=ib(n=n.substring(0,32-a.length1-t)),a.length1+=n.length,a.utf8Length1+=s,i+=n.length,0===e?(a.length2+=n.length,a.utf8Length2+=s,o+=n.length):l=!1,a.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}s=(s=iy(a.diffs)).substring(s.length-t);let u=ig(r.diffs).substring(0,t),c=ib(u);""!==u&&(a.length1+=u.length,a.length2+=u.length,a.utf8Length1+=c,a.utf8Length2+=c,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=u:a.diffs.push([0,u])),l||e.splice(++n,0,a)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=ig(i[e].diffs),o,a=-1;if(n.length>32?-1!==(o=im(r,n.substring(0,32),t))&&(-1===(a=im(r,n.substring(n.length-32),t+n.length-32))||o>=a)&&(o=-1):o=im(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===a?r.substring(o,o+n.length):r.substring(o,a+32),n===c)r=r.substring(0,o)+iy(i[e].diffs)+r.substring(o+n.length);else{let t=r5(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case -1:r+=s.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>s)u[e]=!1;else{t=io(t);let n=0,s=0;for(let a=0;a<i[e].diffs.length;a++){let l=i[e].diffs[a];0!==l[0]&&(s=iv(t,n)),1===l[0]?r=r.substring(0,o+s)+l[1]+r.substring(o+s):-1===l[0]&&(r=r.substring(0,o+s)+r.
6substring(o+iv(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(a.length,r.length-a.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(` 7`),r=0;for(;r<n.length;){let e=n[r].match(iP);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=iw(iI(e[1]),iI(e[3]));for(t.push(i),""===e[2]?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):"0"===e[2]?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=iI(e[2]),i.length1=i.utf8Length1),""===e[4]?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):"0"===e[4]?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=iI(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e,t=n[r],o=t.charAt(0);if("@"===o)break;if(""===o){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let s=ib(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=s;else if("+"===o)i.diffs.push([1,e]),i.length2-=s;else if(" "===o)i.diffs.push([0,e]),i.length1-=s,i.length2-=s;else throw Error(`Invalid patch mode "${o}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:iD,insertIfMissing:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insertIfMissing()" on non-array value');
7if(0===e.items.length)return t;let n=e.items.filter(e=>!t.find(t=>e._key===t?._key));return 0===n.length?t:iD({items:n,referenceItem:e.referenceItem,position:e.position},t)},remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=iO(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return iL(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=iO(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return iL(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!tI(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:iV(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
7if(0===e.items.length)return t;let n={},r=[];e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)});let i=Object.keys(n);if(0===i.length&&0==r.length)return t;let o=[...t];for(let t of i){let r=Number(t);o[r]=e.items[n[r]]}return iD({items:r,referenceItem:e.referenceItem,position:e.position},o)}});function iB(e,t){return e.reduce((e,t)=>iF(t,e),t)}function iF(e,t){return function e(t,n,r){if(!(t.length>0)){if(!(n.type in iz))throw Error(`Invalid operation type: "${n.type}"`);return iz[n.type](n,r)}let[i,...o]=t;if(tk(i)&&Array.isArray(r)){var s=i,a=o,l=n,u=r;let t=iO(u,s);if(null===t||-1===t)return u;let c=u[t],d=e(a,l,c);return d===c?u:iL(u,t,1,void 0===d?[]:[d])}if("string"==typeof i&&tI(r)){var c=i,d=o,h=n,f=r;let t=f[c];if(void 0===t&&d.length>0)return f;let s=e(d,h,t);return void 0===s?iV(f,[c]):s===t?f:{...f,[c]:s}}throw Error(`Cannot apply operation of type "${n.type}" to path ${tE(t)} on ${typeof r} value`)}(e.path,e.op,t)}function iH(e){return"_id"in e}function iU(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(tk(t)){if(!Array.isArray(n))return;if(tw(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let iW=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t},iq="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iG=new Uint8Array(16),iY=[];for(let e=0;e<256;++e)iY.push((e+256).toString(16).slice(1));let iK=function(e,n,r){if(iq&&!n&&!e)return iq();let i=(e=e||{}).random??e.rng?.()??function(){if(!t){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");t=crypto.getRandomValues.bind(crypto)}return t(iG)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){if((r=r||0)<0||r+16>n.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[r+e]=i[e];return n}return function(e,t=0){return(iY[e[t+0]]+iY[e[t+1]]+iY[e[t+2]]+iY[e[t+3]]+"-"+iY[e[t+4]]+iY[e[t+5]]+"-"+iY[e[t+6]]+iY[e[t+7]]+"-"+iY[e[t+8]]+iY[e[t+9]]+"-"+iY[e[t+10]]+iY[e[t+11]]+iY[e[t+12]]+iY[e[t+13]]+iY[e[t+14]]+iY[e[t+15]]).toLowerCase()}(i)};function iZ(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}function iX(e,t){return t.reduce((e,t)=>{let n=iJ(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function iJ(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=(n=t.document,iH(n)?n:{...n,_id:iW()});return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type){return n=e,iH((r=t).document)?n?{status:"noop"}:{status:"created",id:r.document._id,after:r.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("delete"===t.type){return i=e,o=t,i?o.id!==i._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:o.id,before:i,after:void 0}:{status:"noop"}}if("createOrReplace"===t.type){return s=e,iH((a=t).document)?s?{status:"updated",id:a.document._id,before:s,after:a.document}:{status:"created",id:a.document._id,after:a.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("patch"===t.type){var n,r,i,o,s,a,l=e,u=t;if(!l)return{status:"error",message:"Cannot apply patch on nonexistent document"};let c=function(e,t){if(e.options?.ifRevision&&t._rev!==e.options.ifRevision)throw Error("Revision mismatch");if(e.id!==t._id)throw Error(`Document id mismatch. Refusing to apply mutation for document with id="${e.id}" on the given document with id="${t._id}"`);return iB(e.patches,t)}(u,l);return l===c?{status:"noop"}:{status:"updated",id:u.id,before:l,after:c}}throw Error(`Invalid mutation type: ${t.type}`)}
7function iQ(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function i0(e,t){return tE(e)===tE(t)}function i1(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=iF(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=iU(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t){if("string"==typeof e&&"string"==typeof t){let n=r5(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>rW(e)),r=!1,i=[],o=0,s=null,a=0,l=!1,u=!1,c=!1,d=!1;for(;a<n.length;)0===n[a][0]?(n[a][1].length<t&&(c||d)?(i[o++]=a,l=c,u=d,s=n[a][1]):(o=0,s=null),c=!1,d=!1):(-1===n[a][0]?d=!0:c=!0,s&&(l&&u&&c&&d||s.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+ +!!t,0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,s]),n[i[o-1]+1][0]=1,o--,s=null,l&&u?(c=!0,d=!0,o=0):(a=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),a++;return r&&(n=is(n)),n}(n=r7(n))),iA(e,n,i$(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return iA(ig(e),e,i$(void 0));if("string"==typeof e&&t&&Array.isArray(t))return iA(e,t,i$(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(iR).join("")}};return e.flatMap(e=>i0(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function i2(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(iZ(t)!==e)return[];let n=i;return i=iX(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:i1(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),s=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{s=iB(t.mutation.dmpPatches,s),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{s=iB(t.mutation.original,s),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`,{cause:t})}}else s=iX(s,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||iZ(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:iU(e.path,s)}})})})),s]}let i5=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class i3{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=i5[e];if(!t)throw Error(`Unknown opcode: ${e}`);this[`process${t}`].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||(e.keys=this.model.objectGetKeys(e.value).sort()),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyArray(e.value)),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyObject(e.value)),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyString(e.value)),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}}function i4(e){return e>>16?4:e>>11?3:e>>7?2:1}function i6(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){let t=i4(e.codePointAt(i));4===t&&i++,r+=t}return i}class i8{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}
7objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let i=i6(t,n),o=i6(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var i7=nc(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),i9=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return nr(t,e),t.prototype.lift=function(e){var t=new oe(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new i7},t.prototype.next=function(e){var t=this;nE(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=no(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;nE(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;nE(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?np:(this.currentObservers=null,i.push(e),new nf(function(){t.currentObservers=null,nh(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new nV;return e.source=this,e},t.create=function(e,t){return new oe(e,t)},t}(nV),oe=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return nr(t,e),t.prototype.next=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.next)||n.call(t,e)},t.prototype.error=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.error)||n.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!=(n=null==(t=this.source)?void 0:t.subscribe(e))?n:np},t}(i9);function ot(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new i9}:t,r=e.resetOnError,i=void 0===r||r,o=e.resetOnComplete,s=void 0===o||o,a=e.resetOnRefCountZero,l=void 0===a||a;return function(e){var t,r,o,a=0,u=!1,c=!1,d=function(){null==r||r.unsubscribe(),r=void 0},h=function(){d(),t=o=void 0,u=c=!1},f=function(){var e=t;h(),null==e||e.unsubscribe()};return nz(function(e,p){a++,c||u||d();var m=o=null!=o?o:n();p.add(function(){0!=--a||c||u||(r=on(f,l))}),m.subscribe(p),!t&&a>0&&(t=new n$({next:function(e){return m.next(e)},error:function(e){c=!0,d(),r=on(h,i,e),m.error(e)},complete:function(){u=!0,d(),r=on(h,s),m.complete()}}),nJ(e).subscribe(t))})(e)}}function on(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0===t)return void e();if(!1!==t){var i=new n$({next:function(){i.unsubscribe(),e()}});return nJ(t.apply(void 0,na([],ns(n)))).subscribe(i)}}function or(e){return e[e.length-1]}function oi(e,t){return void 0===t&&(t=0),nz(function(n,r){n.subscribe(nB(r,function(n){return n0(r,e,function(){return r.next(n)},t)},function(){return n0(r,e,function(){return r.complete()},t)},function(n){return n0(r,e,function(){return r.error(n)},t)}))})}function oo(e,t){return void 0===t&&(t=0),nz(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function os(e,t){if(!e)throw Error("Iterable cannot be null");return new nV(function(n){n0(n,t,function(){var r=e[Symbol.asyncIterator]();n0(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function oa(){for(var e,t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=(e=or(r))&&nu(e.schedule)?r.pop():void 0,s=(t=1/0,"number"==typeof or(r)?r.pop():t);return r.length?1===r.length?nJ(r[0]):(void 0===(n=s)&&(n=1/0),n1(nR,n))(o?function(e,t){if(null!=e){if(nu(e[nI]))return nJ(e).pipe(oo(t),oi(t));if(nU(e))return new nV(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(nW(e))return nJ(e).pipe(oo(t),oi(t));if(nq(e))return os(e,t);if(nK(e))return new nV(function(n){var r;return n0(n,t,function(){r=e[nY](),n0(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return nu(null==r?void 0:r.return)&&r.return()}});if(nX(e))return os(nZ(e),t)}throw nG(e)}(r,o):nJ(r)):nN}var ol={now:function(){return(ol.delegate||Date).now()},delegate:void 0},ou=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=ol);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return nr(t,e),t.prototype.next=function(t){var n=this.isStopped,r=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!n&&(r.push(t),i||r.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,n=this._buffer,r=this._infiniteTimeWindow,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){for(var o=t.now(),s=0,a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}},t}(i9),oc=function(e){function t(t,n){return e.call(this)||this}return nr(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(nf),od={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=od.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,na([e,t],ns(n))):setInterval.apply(void 0,na([e,t],ns(n)))},clearInterval:function(e){var t=od.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},oh=function(e){function t(t,n){var r=e.call(this,t,n)||this;
7return r.scheduler=t,r.work=n,r.pending=!1,r}return nr(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!=(n=this.id)?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),od.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&od.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nh(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(oc),of=1,op={};function om(e){return e in op&&(delete op[e],!0)}var og=function(e){var t=of++;return op[t]=!0,e7||(e7=Promise.resolve()),e7.then(function(){return om(t)&&e()}),t},oy=function(e){om(e)},ov={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ov.delegate;return((null==n?void 0:n.setImmediate)||og).apply(void 0,na([],ns(e)))},clearImmediate:function(e){var t=ov.delegate;return((null==t?void 0:t.clearImmediate)||oy)(e)},delegate:void 0},ob=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return nr(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=ov.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i,o=t.actions;null!=n&&(null==(i=o[o.length-1])?void 0:i.id)!==n&&(ov.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oh),ox=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=ol.now,e}(),ow=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nr(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift())if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(function(e){function t(t,n){void 0===n&&(n=ox.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return nr(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active)return void n.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift())if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(ox)))(ob);function ok(e){var t,n,r,i,o,s,a,l;let u=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe(ot({resetOnRefCountZero:!0})),c=u.pipe(n5(e=>"reconnect"===e.type)),d=u.pipe(n5(e=>"welcome"===e.type)),h=u.pipe(n5(e=>"mutation"===e.type)),f=oa(d,c).pipe((l=!1,t={bufferSize:1,refCount:!0},a=void 0===(i=t.bufferSize)?1/0:i,n=void 0===(o=t.windowTime)?1/0:o,l=void 0!==(s=t.refCount)&&s,r=t.scheduler,ot({connector:function(){return new ou(a,n,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l}))).pipe(n5(e=>"welcome"===e.type));return oa(f,h,c)}let oS=nt({types:{},actions:{"assign error to context":tH({error:({event:e})=>e}),"clear error from context":tH({error:void 0}),"connect to server-sent events":ez({type:"connect"}),"listen to server-sent events":X("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||ok(e.client),id:e.id})}),"stop listening to server-sent events":ee("listener"),"buffer remote mutation events":tH({mutationEvents:({event:e,context:t})=>(ne(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":tH({stagedChanges:({event:e,context:t})=>(ne(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":t6(({enqueue:e})=>{e.assign(({event:e,context:t})=>{ne(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,i=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(i||e.previousRev!==r?._rev||(i=!0),i&&(r=oE(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.i
7d,r);let[o,s]=i2(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:s,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":tH(({event:e,context:t})=>{ne(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=oE(n,e.effects.apply,e.resultRev);t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[i,o]=i2(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":tH({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":tH({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":tH({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":tH({submitTransactionsAttempts:0}),"stage mutation":tH({stagedChanges:({event:e,context:t})=>(ne(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":tH({stashedChanges:({event:e,context:t})=>(ne(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":t6(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{var n;ne(e,"mutate");let r=new Map;return t.local&&r.set(t.id,t.local),n=function(e,t){let n=Object.create(null);for(let r of e){let e=iZ(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=iJ(i,r);if("error"===o.status)throw Error(o.message);"noop"!==o.status&&("updated"===o.status||"created"===o.status||"deleted"===o.status)&&(e in n||(n[e]={before:i,after:void 0,muts:[]}),t.set(e,o.after),n[e].after=o.after,n[e].muts.push(r))}return Object.entries(n).map(([e,{before:t,after:n,muts:r}])=>({id:e,status:n?t?"updated":"created":"deleted",mutations:r,before:t,after:n}))}(e.mutations,r),n.forEach(e=>{("created"===e.status||"updated"===e.status)&&r.set(e.id,e.after),"deleted"===e.status&&r.delete(e.id)}),r.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":t3(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":t3(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":t3(({context:e,event:t})=>(ne(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":eH(({input:e})=>{let{listener:t,id:n}=e;return n2(()=>t).pipe(n5(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),oi(ow))}),"fetch remote snapshot":eG(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":eG(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",tA(e),{visibility:"async",returnDocuments:!1,signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}})},delays:{fetchRemoteSnapshotTimeout:({context:e})=>1e3*Math.pow(2,e.fetchRemoteSnapshotAttempts),submitTransactionsTimeout:({context:e})=>1e3*Math.pow(2,e.submitTransactionsAttempts)}}).createMachine({id:"document-mutator",context:({input:e})=>({client:e.client.withConfig({allowReconfigure:!1}),sharedListener:e.sharedListener,id:e.id,remote:void 0,local:void 0,mutationEvents:[],stagedChanges:[],stashedChanges:[],error:void 0,fetchRemoteSnapshotAttempts:0,submitTransactionsAttempts:0,cache:e.cache}),entry:["connect to server-sent events"],on:{mutate:{actions:["rebase local snapshot","stage mutation"]}},initial:"disconnected",states:{disconnected:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}}},connecting:{on:{welcome:"connected",reconnect:"reconnecting",error:"connectFailure"},tags:["busy"]},connectFailure:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}},entry:["stop listening to server-sent events","assign error to context"],exit:["clear error from context"],tags:["error"]},reconnecting:{on:{welcome:{target:"connected"},error:{target:"connectFailure"}},tags:["busy","error"]},connected:{on:{mutation:{actions:["buffer remote mutation events"]},reconnect:"reconnecting"},entry:["clear error from context"],initial:"loading",states:{loading:{invoke:{src:"fetch remote snapshot",id:"getDocument",input:({context:e})=>({client:e.client,id:e.id}),onError:{target:"loadFailure"},onDone:{target:"loaded",actions:["rebase fetched remote snapshot","reset fetch attempts"]}},tags:["busy"]},loaded:{entry:["send sync event to parent"],on:{mutation:{actions:["apply mendoza patch","send mutation event to parent"]}},initial:"pristine",states:{pristine:{on:{mutate:{actions:["rebase local snapshot","stage mutation"],target:"dirty"}},tags:["ready"]},dirty:{on:{submit:"submitting"},tags:["ready"]},submitting:{on:{mutate:{actions:["rebase local snapshot","stash mutation"]}},invoke:{src:"submit mutations as transactions",id:"submitTransactions",input:({context:e})=>{var t,n;let r,i,o=new Map;return o.set(e.id,e.remote),{client:e.client,transactions:(t=e.stagedChanges,n=e=>
7!e.transaction,r=[],i=[],t.forEach(e=>{n(e)?i.push(e):(i.length>0&&r.push(i),i=[],r.push([e]))}),i.length>0&&r.push(i),r).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>{var t;return{...e,mutations:(t=e.mutations,Object.values((0,rU.default)(t,iZ)).flatMap(e=>{var t,n;return(0===(n=0===(t=e).length?t:t.reduce((e,t)=>"delete"===t.type?[t]:(e.push(t),e),[])).length?n:n.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):iQ(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])}))}}).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n,i;return n=e,i=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),tx(n)&&tx(i)?n._key===i._key:"number"==typeof n?Number(n)===Number(i):n===i}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&i0(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):iQ(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&i0(e.path,t.path))||e.push(t),e),[])})})).map(e=>{var t;return{...e,mutations:(t=o,e.mutations.map((e,n)=>{var r,i;if("patch"!==e.type)return e;let o=t.get(e.id);return o?(r=o,{...i=e,patches:i1(r,i.patches)}):e}))}}).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{id:iK(),mutations:e.mutations})}},onError:{target:"submitFailure"},onDone:{target:"pristine",actions:["restore stashed changes","reset submit attempts","send pristine event to parent"]}},tags:["busy","ready"]},submitFailure:{exit:["clear error from context"],after:{submitTransactionsTimeout:{actions:["increment submit attempts"],target:"submitting"}},on:{retry:"submitting"},tags:["error","ready"]}}},loadFailure:{exit:["clear error from context"],after:{fetchRemoteSnapshotTimeout:{actions:["increment fetch attempts"],target:"loading"}},on:{retry:"loading"},tags:["error"]}}}}});function oE(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new i3(new i8,r,t).process());return i?Object.assign(i,{_rev:n}):null}let o_=e=>{let t=eG(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:i}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),n=eG(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=tD.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return oS.provide({actions:{"send sync event to parent":t6(({enqueue:e})=>{e.sendParent(({context:e})=>({type:"sync",id:e.id,document:e.remote})),e.emit(({context:e})=>({type:"ready",snapshot:e.local}))})},actors:{"fetch remote snapshot":t,"submit mutations as transactions":n}})},oj=nt({types:{},actions:{"emit sync event":tJ(({event:e})=>(ne(e,"sync"),e)),"emit mutation event":tJ(({event:e})=>(ne(e,"mutation"),e)),"emit rebased event":tJ(({event:e})=>(ne(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":tJ(({event:e})=>(ne(e,["pristine"]),e)),"add document actor":tH({documents:({context:e,event:t,spawn:n})=>{ne(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
7:{id:r,client:e.client,sharedListener:e.sharedListener||ok(e.client)},id:r})}}}),"stop remote snapshot":ee(({context:e,event:t})=>(ne(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":tH({documents:({context:e,event:t})=>{if(ne(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:oS}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),oC=e=>oj.provide({actors:{documentMutatorMachine:o_(e)}});e.s(["n",0,o_,"t",0,oC],558654);let oM={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function o$(e){return e||n?{lang:e?.lang??n?.lang,message:e?.message,abortEarly:e?.abortEarly??n?.abortEarly,abortPipeEarly:e?.abortPipeEarly??n?.abortPipeEarly}:oM}function oA(e,t,n,s,a){var l,u,c,d;let h,f=a&&"input"in a?a.input:n.value,p=a?.expected??e.expects??null,m=a?.received??("string"==(h=typeof f)?`"${f}"`:"number"===h||"bigint"===h||"boolean"===h?`${f}`:"object"===h||"function"===h?(f&&Object.getPrototypeOf(f)?.constructor?.name)??"null":h),g={kind:e.kind,type:e.type,input:f,expected:p,received:m,message:`Invalid ${t}: ${p?`Expected ${p} but r`:"R"}eceived ${m}`,requirement:e.requirement,path:a?.path,issues:a?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},y="schema"===e.kind,v=a?.message??e.message??(l=e.reference,u=g.lang,o?.get(l)?.get(u))??(y?(c=g.lang,i?.get(c)):null)??s.message??(d=g.lang,r?.get(d));void 0!==v&&(g.message="function"==typeof v?v(g):v),y&&(n.typed=!1),n.issues?n.issues.push(g):n.issues=[g]}let oT=new WeakMap;function oP(e){let t=oT.get(e);return t||(t={version:1,vendor:"valibot",validate:t=>e["~run"]({value:t},o$())},oT.set(e,t)),t}var oI=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function oR(e,t){return{kind:"validation",type:"min_length",reference:oR,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(e,t){return e.typed&&e.value.length<this.requirement&&oA(this,"length",e,t,{received:`${e.value.length}`}),e}}}let oO={abortEarly:!0};function oL(e,t,n){return"function"==typeof e.fallback?e.fallback(t,n):e.fallback}function oV(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function oD(e,t){return{kind:"schema",type:"object",reference:oD,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return oP(this)},"~run"(e,t){let n=e.value;if(n&&"object"==typeof n)for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||("exact_optional"===i.type||"optional"===i.type||"nullish"===i.type)&&void 0!==i.default){let o=r in n?n[r]:oV(i),s=i["~run"]({value:o},t);if(s.issues){let i={type:"object",origin:"value",input:n,key:r,value:o};for(let t of s.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=s.issues),t.abortEarly){e.typed=!1;break}}s.typed||(e.typed=!1),e.value[r]=s.value}else if(void 0!==i.fallback)e.value[r]=oL(i);else if("exact_optional"!==i.type&&"optional"!==i.type&&"nullish"!==i.type&&(oA(this,"key",e,t,{input:void 0,expected:`"${r}"`,path:[{type:"object",origin:"key",input:n,key:r,value:n[r]}]}),t.abortEarly))break}else oA(this,"type",e,t);return e}}}function oN(e,t){return{kind:"schema",type:"optional",reference:oN,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return oP(this)},"~run"(e,t){return void 0===e.value&&(void 0!==this.default&&(e.value=oV(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped["~run"](e,t)}}}function oz(e){return{kind:"schema",type:"string",reference:oz,expects:"string",async:!1,message:e,get"~standard"(){return oP(this)},"~run"(e,t){return"string"==typeof e.value?e.typed=!0:oA(this,"type",e,t),e}}}function oB(...e){return{...e[0],pipe:e,get"~standard"(){return oP(this)},"~run"(t,n){for(let r of e)if("metadata"!==r.kind){if(t.issues&&("schema"===r.kind||"transformation"===r.kind)){t.typed=!1;break}t.issues&&(n.abortEarly||n.abortPipeEarly)||(t=r["~run"](t,n))}return t}}}function oF(e,t,n){let r=e["~run"]({value:t},o$(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}let oH=oB(oz(),oR(1)),oU=oN(oH),oW=oD({baseUrl:oH,dataset:oU,id:oH,path:oH,projectId:oU,tool:oU,type:oU,workspace:oU,perspective:{...e1=oz(),fallback:"drafts",get"~standard"(){return oP(this)},"~run"(e,t){let n=e1["~run"](e,t);return n.issues?{typed:!0,value:oL(this,n,t)}:n}}});function oq(e){return!oW["~run"]({value:e},oO).issues}function oG(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}let oY=/^([\w-]+):(0|[1-9][0-9]{0,8}
7)$/,oK=/^([\w-]+):([0-9]+),([0-9]+)$/,oZ=/^([\w-]+):([\w-]+)$/,oX=oB(oz(),oR(1)),oJ=oD({origin:oX,href:oX,data:oN(function e(t,n,r){return{kind:"schema",type:"record",reference:e,expects:"Object",async:!1,key:t,value:n,message:r,get"~standard"(){return oP(this)},"~run"(e,t){let n=e.value;if(n&&"object"==typeof n){for(let r in e.typed=!0,e.value={},n)if(Object.prototype.hasOwnProperty.call(n,r)&&"__proto__"!==r&&"prototype"!==r&&"constructor"!==r){let i=n[r],o=this.key["~run"]({value:r},t);if(o.issues){let s={type:"object",origin:"key",input:n,key:r,value:i};for(let t of o.issues)t.path=[s],e.issues?.push(t);if(e.issues||(e.issues=o.issues),t.abortEarly){e.typed=!1;break}}let s=this.value["~run"]({value:i},t);if(s.issues){let o={type:"object",origin:"value",input:n,key:r,value:i};for(let t of s.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=s.issues),t.abortEarly){e.typed=!1;break}}o.typed&&s.typed||(e.typed=!1),o.typed&&(e.value[o.value]=s.value)}}else oA(this,"type",e,t);return e}}}(oz(),function e(){return{kind:"schema",type:"unknown",reference:e,expects:"unknown",async:!1,get"~standard"(){return oP(this)},"~run":e=>(e.typed=!0,e)}}()))});function oQ(e){let t=e.indexOf("/intent/edit/");if(-1!==t)try{let n=e.slice(t+13),r=n.indexOf("?"),i=-1===r?n:n.slice(0,r),o={};for(let e of i.split(";")){let t=e.indexOf("=");if(-1===t)continue;let n=e.slice(0,t);("id"===n||"type"===n||"path"===n||"tool"===n)&&(o[n]=decodeURIComponent(e.slice(t+1)))}-1!==r&&Object.assign(o,Object.fromEntries(new URLSearchParams(n.slice(r+1)))),o.baseUrl??=e.slice(0,t)||"/";let s=oF(oW,o);return s.success?s.output:void 0}catch{return}}function o0(e){let t=oF(oW,e);if(t.success)return t.output;let n=oF(oJ,e);if(n.success){let{href:e}=n.output;try{let t=new URL(e,typeof document>"u"?"https://example.com":location.origin);return t.searchParams.size>0?function(e,t){let n=e["~run"]({value:t},o$(void 0));if(n.issues)throw new oI(n.issues);return n.value}(oW,Object.fromEntries(t.searchParams.entries())):oQ(e)??n.output}catch(t){return oQ(e)||(console.error("Failed to parse sanity node",t),n.output)}}}function o1(e){if("object"==typeof e&&e)return o0(e);try{return o0(JSON.parse(e))}catch{let t=e.split(";").reduce((e,t)=>{let[n,r]=t.split("=");if(!n||t.includes("=")&&!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=td.toString(function(e){let t=[];for(let n of e.split(".")){let e=oY.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=oK.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=oZ.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"perspective":e.perspective=r;break;case"tool":e.tool=r;break;case"workspace":e.workspace=r;break;case"projectId":e.projectId=r;break;case"dataset":e.dataset=r}return e},{});if(oq(t))return t;return}}e.s(["createDataAttribute",0,function e(t){function n(e){return e?"string"==typeof e?td.fromString(e):e:[]}function r(e){if(!e.id)throw Error("`id` is required to create a data attribute");if(!e.type)throw Error("`type` is required to create a data attribute");if(!e.path||!e.path.length)throw Error("`path` is required to create a data attribute");return function(e){let{id:t,path:n,baseUrl:r,tool:i,workspace:o,type:s}=e;if(oq(e))return[["id",tg(t)],["type",s],["path",oG(td.fromString(n))],["base",encodeURIComponent(r)],["workspace",o],["tool",i]].filter(([,e])=>!!e).map(e=>e.join("=")).join(";")}({baseUrl:e.baseUrl||"/",workspace:e.workspace,tool:e.tool,type:e.type,id:e.id,path:"string"==typeof e.path?e.path:td.toString(e.path),perspective:e.perspective})}let i=e=>r({...t,path:[...n(t.path),...n(e)]});return i.toString=function(){return r(t)},i.combine=function(n){return e({...t,...n})},i.scope=function(r){return e({...t,path:[...n(t.path),...n(r)]})},i},"decodeSanityNodeData",0,o1,"pathToUrlString",0,oG],989955);var o2={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},o5={0:8203,1:8204,2:8205,3:65279},o3={0:String.fromCodePoint(o5[0]),1:String.fromCodePoint(o5[1]),2:String.fromCodePoint(o5[2]),3:String.fromCodePoint(o5[3])},o4=[,,,,].fill(String.fromCodePoint(o5[0])).join(""),o6=Object.fromEntries(Object.entries(o3).map(e=>[e[1],+e[0]])),o8=Object.fromEntries(Object.entries(o2).map(e=>
7e.reverse())),o7=`${Object.values(o2).map(e=>`\\u{${e.toString(16)}}`).join("")}`,o9=RegExp(`[${o7}]{4,}`,"gu");function se(e){let t=e.match(o9);if(t)return function(e,t=!1){let n=Array.from(e),r=1/0,i=-1;for(let e=0;e<n.length;++e)n[e]===o4[0]&&n[e+1]===o4[1]&&n[e+2]===o4[2]&&n[e+3]===o4[3]&&(r=Math.min(r,e),i=Math.max(i,e));if(-1===i)return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${o8[e[2*t].codePointAt(0)]}${o8[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],s=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!s--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t);for(let e=r;e<=i;++e)if(!((n.length-e)%4))try{let r=n.slice(e+4),i=new Uint8Array(r.length/4);for(let e=0;e<i.length;e++)i[e]=o6[r[4*e]]<<6|o6[r[4*e+1]]<<4|o6[r[4*e+2]]<<2|o6[r[4*e+3]];let o=new TextDecoder().decode(i);if(t){let e=o.indexOf("\0");return -1===e&&(e=o.length),[JSON.parse(o.slice(0,e))]}return o.split("\0").filter(Boolean).map(e=>JSON.parse(e))}catch{}return[]}(t[0],!0)[0]}let st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));let sn=new Uint8Array(16);function sr(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){let r=(e||={}).random??e.rng?.()??crypto.getRandomValues(sn);if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n||=0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]).toLowerCase()}(r)}(e,t,n):crypto.randomUUID()}let si=!0;function so(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function ss(e,t,n){return"x"===n?{x:e.x+t,y:e.y,w:e.w-2*t,h:e.h}:{x:e.x,y:e.y+t,w:e.w,h:e.h-2*t}}function sa(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function sl(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function su(e,t,n){let r,i,o={x:e.x1,y:e.y1};if(t.some(e=>{var t;let r,i;return t=ss(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"),r=o.x>=t.x&&o.x<=t.x+t.w,i=o.y>=t.y&&o.y<=t.y+t.h,r&&i}))return null;for(let s of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:s,y1:a,x2:l,y2:u}=t;if(n===i&&r===o||s===l&&a===u)return!1;let c=(u-a)*(i-n)-(l-s)*(o-r);if(0===c)return!1;let d=((l-s)*(r-a)-(u-a)*(n-s))/c,h=((i-n)*(r-a)-(o-r)*(n-s))/c;return!(d<0)&&!(d>1)&&!(h<0)&&!(h>1)&&{x:n+d*(i-n),y:r+d*(o-r)}}(e,n[t]);if(i){let e=!1;for(let t=0;t<r.length;t++)r[t].x===i.x&&r[t].y===i.y&&(e=!0);e||r.push(i)}}return 0!==r.length&&r.sort((t,n)=>sl(t,{x:e.x1,y:e.y1})-sl(n,{x:e.x1,y:e.y1}))}(e,ss(s,Math.min(s.w,s.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?sl(o,e)<sl(o,r)&&(r=e,i=s):(r=e,i=s)}}return i||null}function sc(e,t,n){let{x:r,y:i,w:o,h:s}=e,{x:a,y:l}=n;return{x:a+(r-a)*t,y:l+(i-l)*t,w:o*t,h:s*t}}function sd(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function sh(e,t){return t.find(t=>sa(so(t.elements.element),e))?.sanity}function sf(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:sh(t.left,e)}:null,right:t.right?{rect:t.right,sanity:sh(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:sh(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:sh(t.bottom,e)}:null}}function sp(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}function sm(e,t,n){let r=so(t),i=[...t.querySelectorAll(":where(h1, h2, h3, h4, p, a, img, span, button):not(:has(*))")];e.x<=r.x&&(e.x=r.x),e.x>=r.x+r.w&&(e.x=r.x+r.w),e.y>=r.y+r.h&&(e.y=r.y+r.h),e.y<=r.y&&(e.y=r.y);let o=i.map(e=>{let t=sc(so(e),n,{x:r.x,y:r.y});return{x:t.x-r.x,y:t.y-r.y,w:t.w,h:t.h,tagName:e.tagName}});return{offsetX:(r.x-e.x)*n,offsetY:(r.y-e.y)*n,w:r.w*n,h:r.h*n,maxWidth:r.w*n*.75,childRects:o}}async function sg(e,t,n,r,i){return new Promise(o=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*i),o()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!0}),document.body.style.overflow="hidden",document.body.style.height="100%",document.documentElement.style.overflow="initial",document.documentElement.style.height="100%",setTimeout(()=>{e.style.transformOrigin="50% 0px",e.style.transition="transform 150ms ease",e.style.transform=`translate3d(0px, ${-n+scrollY}px, 0px) scale(${t})`},25)})}function sy(e){let t,n,r={min:t=Math.max(0,Math.min(...e.map(e=>e.x))),max:n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w))),width:n-t},i=sd(e),o=r.min>8&&r.min+r.width<=window.innerWidth-8,s=i.min>8&&i.min+i.height<=document.body.scrollHeight-8,a=o&&s;return{x:a?r.min-8:r.min,y:a?i.min-8:i.min,w:a?r.width+16:r.width,h:a?i.height+16:i.height}}async function sv(e,t,n,r,i,o){return new Promise(s=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let a=n-window.innerHeight,l=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*i),s()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-a+l)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let sb=!1,sx={x:0,y:0},sw={x:0,y:0},sk=typeof document>"u"?0:document.documentElement.scrollHeight,sS=null,sE=e=>e instanceof HTMLElement||e instanceof SVGElement,s_=e=>e&&sE(e)?e.dataset?.sanityOverlayElement?e:s_(e.parentElement):null;function sj(e){return o9.lastIndex=0,o9.test(e)}function sC(e){return o9.lastIndex=0,e.replace(o9,"")}function sM(e,t=!1){return sj(e)?function(e,t=!1){try{let n=se(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}function s$(e){return"path"in e}function sA(e){if(!e.length||!e.map(e=>s$(e)).every((e,t,n)=>e===n[0]))return;if(!s$(e[0]))return e[0];let t=e.filter(s$),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n
7)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function sT(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function sP(e){if(!sT(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function sI(e,t){return!!sT(e.path)&&!!sT(t.path)&&sP(e.path)===sP(t.path)}function sR(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!s$(t)||!sT(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),s=n.getAttribute("data-sanity-drag-disable"),a=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!s&&s$(o.sanity)&&sI(t,o.sanity)&&(null===i||i===a)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let sO=(0,r_.createContext)(null);var sL=e.i(438232);let sV={sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},sD={textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},sN={border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},sz={dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},sB={border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}},radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},sF=new WeakMap;function sH(e){let t=sF.get(e);if(t)return t;let n=sW(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:sU(e,e.button.default),ghost:sU(e,e.button.ghost),bleed:sU(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:sq(e.input.default),invalid:sq(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:sU(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return sF.set(e,r),r}function sU(e,t){return{default:{enabled:sW(e,t.default.enabled),hovered:sW(e,t.default.hovered),pressed:sW(e,t.default.pressed),selected:sW(e,t.default.selected),disabled:sW(e,t.default.disabled)},neutral:{enabled:sW(e,t.default.enabled),hovered:sW(e,t.default.hovered),pressed:sW(e,t.default.pressed),selected:sW(e,t.default.selected),disabled:sW(e,t.default.disabled)},primary:{enabled:sW(e,t.primary.enabled),hovered:sW(e,t.primary.hovered),pressed:sW(e,t.primary.pressed),selected:sW(e,t.primary.selected),disabled:sW(e,t.primary.disabled)},suggest:{enabled:sW(e,t.primary.enabled),hovered:sW(e,t.primary.hovered),pressed:sW(e,t.primary.pressed),selected:sW(e,t.primary.selected),disabled:sW(e,t.primary.disabled)},positive:{enabled:sW(e,t.positive.enabled),hovered:sW(e,t.positive.hovered),pressed:sW(e,t.positive.pressed),selected:sW(e,t.positive.selected),disabled:sW(e,t.positive.disabled)},caution:{enabled:sW(e,t.caution.enabled),hovered:sW(e,t.caution.hovered),pressed:sW(e,t.caution.pressed),selected:sW(e,t.caution.selected),disabled:sW(e,t.caution.disabled)},critical:{enabled:sW(e,t.critical.enabled),hovered:sW(e,t.critical.hovered),pressed:sW(e,t.critical.pressed),selected:sW(e,t.critical.selected),disabled:sW(e,t.critical.disabled)}}}function sW(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg},cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg}
7,critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function sq(e){return{enabled:sG(e.enabled),disabled:sG(e.disabled),readOnly:sG(e.readOnly),hovered:sG(e.hovered)}}function sG(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let sY=new WeakMap;function sK(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=sY.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...sV,...e.sanity.avatar},button:{...sD,...e.sanity.button},card:sN,color:sH(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...sB,...e.sanity.input,checkbox:{...sB.checkbox,...e.sanity.input.checkbox},radio:{...sB.radio,...e.sanity.input.radio},switch:{...sB.switch,...e.sanity.input.switch}},layer:e.sanity.layer??sz,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return sY.set(e,n),n}let sZ=[],sX={},sJ={variants:{initial:{scale:.97,willChange:"transform"},hidden:{opacity:0},visible:{opacity:1,transition:{duration:.1}},scaleIn:{scale:1},scaleOut:{scale:.97}},transition:{type:"spring",visualDuration:.2,bounce:.25},initial:["hidden","initial"],animate:["visible","scaleIn"],exit:["hidden","scaleOut"]};function sQ(e){return 0===e?0:`${e/16}rem`}function s0(e,t,n){return(t?.map(n)||[]).map((t,n)=>0===n?t:{[`@media screen and (min-width: ${e[n-1]}px)`]:t})}function s1(e,t){return void 0===e?t||sZ:Array.isArray(e)?e:[e]}function s2(e,t,n=sZ){if(!Array.isArray(n))throw Error("the property must be array of numbers");if(0===n.length)return null;let{media:r,space:i}=sK(e);return s0(r,n,e=>{var n;return n=sQ(i[e]),t.reduce((e,t)=>(e[t]=n,e),{})})}function s5(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!1,configurable:!1}),r},enumerable:!0,configurable:!0})}function s3(e){return 2===e._version}let s4=new WeakMap,s6=new WeakMap,s8=["transparent","default","primary","positive","caution","critical"];function s7(e,t){let n={};for(let r of s8)s5(n,r,()=>{var n;return{base:{bg:(n=t[e][r]).bg,fg:n.fg,border:n.border,focusRing:n.focusRing,shadow:n.shadow},button:n.button,card:n.selectable.default,dark:n._dark,input:{default:ae(n.input.default),invalid:ae(n.input.invalid)},muted:{...n.button.ghost,transparent:n.button.ghost.default},solid:{...n.button.default,transparent:n.button.default.default},selectable:n.selectable,spot:{gray:n.avatar.gray.bg,blue:n.avatar.blue.bg,purple:n.avatar.purple.bg,magenta:n.avatar.magenta.bg,red:n.avatar.red.bg,orange:n.avatar.orange.bg,yellow:n.avatar.yellow.bg,green:n.avatar.green.bg,cyan:n.avatar.cyan.bg},syntax:n.syntax}});return n}function s9(e){let t=s6.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:s,input:a,media:l,radius:u,shadow:c,space:d,style:h}=e,f={};s5(f,"light",()=>s7("light",i)),s5(f,"dark",()=>s7("dark",i));let p={_version:0,avatar:n,button:r,container:o,color:f,focusRing:a.text.focusRing,fonts:s,input:a,media:l,radius:u,shadows:c,space:d,styles:h,v2:e};return s6.set(e,p),p}function ae(e){return{enabled:at(e.enabled),disabled:at(e.disabled),readOnly:at(e.readOnly),hovered:at(e.hovered)}}function at(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let an=new Map;var ar=e.i(247167);Object.create(null);var ai="-ms-",ao="-moz-",as="-webkit-",aa="comm",al="rule",au="decl",ac="@keyframes",ad=Math.abs,ah=String.fromCharCode,af=Object.assign;function ap(e,t){return(e=t.exec(e))?e[0]:e}function am(e,t,n){return e.replace(t,n)}function ag(e,t,n){return e.indexOf(t,n)}function ay(e,t){return 0|e.charCodeAt(t)}function av(e,t,n){return e.slice(t,n)}function ab(e){return e.length}function ax(e,t){return t.push(e),e}function aw(e,t){return e.filter(function(e){return!ap(e,t)})}var ak=1,aS=1,aE=0,a_=0,aj=0,aC="";function aM(e,t,n,r,i,o,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ak,column:aS,length:s,return:"",siblings:a}}function a$(e,t){return af(aM("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function aA(e){for(;e.root;)e=a$(e.root,{children:[e]});ax(e,e.siblings)}
7function aT(){return aj=a_<aE?ay(aC,a_++):0,aS++,10===aj&&(aS=1,ak++),aj}function aP(){return ay(aC,a_)}function aI(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function aR(e){var t,n;return(t=a_-1,n=function e(t){for(;aT();)switch(aj){case t:return a_;case 34:case 39:34!==t&&39!==t&&e(aj);break;case 40:41===t&&e(t);break;case 92:aT()}return a_}(91===e?e+2:40===e?e+1:e),av(aC,t,n)).trim()}function aO(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function aL(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case au:return e.return=e.return||e.value;case aa:return"";case ac:return e.return=e.value+"{"+aO(e.children,r)+"}";case al:if(!ab(e.value=e.props.join(",")))return""}return ab(n=aO(e.children,r))?e.return=e.value+"{"+n+"}":""}function aV(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case au:e.return=function e(t,n,r){var i;switch(i=n,45^ay(t,0)?(((i<<2^ay(t,0))<<2^ay(t,1))<<2^ay(t,2))<<2^ay(t,3):0){case 5103:return as+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return as+t+t;case 4855:return as+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return ao+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return as+t+ao+t+ai+t+t;case 5936:switch(ay(t,n+11)){case 114:return as+t+ai+am(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
7case 108:return as+t+ai+am(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return as+t+ai+am(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return as+t+ai+t+t;case 6165:return as+t+ai+"flex-"+t+t;case 5187:return as+t+am(t,/(\w+).+(:[^]+)/,as+"box-$1$2"+ai+"flex-$1$2")+t;case 5443:return as+t+ai+"flex-item-"+am(t,/flex-|-self/g,"")+(ap(t,/flex-|baseline/)?"":ai+"grid-row-"+am(t,/flex-|-self/g,""))+t;case 4675:return as+t+ai+"flex-line-pack"+am(t,/align-content|flex-|-self/g,"")+t;case 5548:return as+t+ai+am(t,"shrink","negative")+t;case 5292:return as+t+ai+am(t,"basis","preferred-size")+t;case 6060:return as+"box-"+am(t,"-grow","")+as+t+ai+am(t,"grow","positive")+t;case 4554:return as+am(t,/([^-])(transform)/g,"$1"+as+"$2")+t;case 6187:return am(am(am(t,/(zoom-|grab)/,as+"$1"),/(image-set)/,as+"$1"),t,"")+t;case 5495:case 3959:return am(t,/(image-set\([^]*)/,as+"$1$`$1");case 4968:return am(am(t,/(.+:)(flex-)?(.*)/,as+"box-pack:$3"+ai+"flex-pack:$3"),/space-between/,"justify")+as+t+t;case 4200:if(!ap(t,/flex-|baseline/))return ai+"grid-column-align"+av(t,n)+t;break;case 2592:case 3360:return ai+am(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,ap(e.props,/grid-\w+-end/)}))return~ag(t+(r=r[n].value),"span",0)?t:ai+am(t,"-start","")+t+ai+"grid-row-span:"+(~ag(r,"span",0)?ap(r,/\d+/):ap(r,/\d+/)-ap(t,/\d+/))+";";return ai+am(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return ap(e.props,/grid-\w+-start/)})?t:ai+am(am(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return am(t,/(.+)-inline(.+)/,as+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ab(t)-1-n>6)switch(ay(t,n+1)){case 109:if(45!==ay(t,n+4))break;case 102:return am(t,/(.+:)(.+)-([^]+)/,"$1"+as+"$2-$3$1"+ao+(108==ay(t,n+3)?"$3":"$2-$3"))+t;case 115:return~ag(t,"stretch",0)?e(am(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return am(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,o,s,a){return ai+n+":"+r+a+(i?ai+n+"-span:"+(o?s:s-r)+a:"")+t});case 4949:if(121===ay(t,n+6))return am(t,":",":"+as)+t;break;case 6444:switch(ay(t,45===ay(t,14)?18:11)){case 120:return am(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+as+(45===ay(t,14)?"inline-":"")+"box$3$1"+as+"$2$3$1"+ai+"$2box$3")+t;case 100:return am(t,":",":"+ai)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return am(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case ac:return aO([a$(e,{value:am(e.value,"@","@"+as)})],r);case al:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(ap(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":aA(a$(e,{props:[am(t,/:(read-\w+)/,":"+ao+"$1")]})),aA(a$(e,{props:[t]})),af(e,{props:aw(n,r)});break;case"::placeholder":aA(a$(e,{props:[am(t,/:(plac\w+)/,":"+as+"input-$1")]})),aA(a$(e,{props:[am(t,/:(plac\w+)/,":"+ao+"$1")]})),aA(a$(e,{props:[am(t,/:(plac\w+)/,ai+"input-$1")]})),aA(a$(e,{props:[t]})),af(e,{props:aw(n,r)})}return""},i.map(o).join("")}}}function aD(e,t,n,r,i,o,s,a,l,u,c,d){for(var h=i-1,f=0===i?o:[""],p=f.length,m=0,g=0,y=0;m<r;++m)for(var v=0,b=av(e,h+1,h=ad(g=s[m])),x=e;v<p;++v)(x=(g>0?f[v]+" "+b:am(b,/&\f/g,f[v])).trim())&&(l[y++]=x);return aM(e,t,n,0===i?al:a,l,u,c,d)}function aN(e,t,n,r,i){return aM(e,t,n,au,av(e,0,r),av(e,r+1,-1),r,i)}let az=void 0!==ar.default&&void 0!==ar.default.env&&(ar.default.env.REACT_APP_SC_ATTR||ar.default.env.SC_ATTR)||"data-styled",aB="active",aF="data-styled-version",aH="6.5.3",aU="/*!sc*/\n",aW="u">typeof window&&"u">typeof document;function aq(e){if(void 0!==ar.default&&void 0!==ar.default.env){let t=ar.default.env[e];if(void 0!==t&&""!==t)return"false"!==t}}let aG=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!=(te=null!=(e9=aq("REACT_APP_SC_DISABLE_SPEEDY"))?e9:aq("SC_DISABLE_SPEEDY"))?te:void 0!==ar.default&&void 0!==ar.default.env&&!1);function aY(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let aK=new Map,aZ=new Map,aX=1,aJ=e=>{if(aK.has(e))return aK.get(e);for(;aZ.has(aX);)aX++;let t=aX++;return aK.set(e,t),aZ.set(t,e),t},aQ=e=>aZ.get(e),a0=(e,t)=>{aX=t+1,aK.set(e,t),aZ.set(t,e)},a1=Object.freeze([]),a2=Object.freeze({}),a5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,a3=/(^-|-$)/g;function a4(e){return e.replace(a5,"-").replace(a3,"")}let a6=/(a)(d)/gi,a8=e=>String.fromCharCode(e+(e>25?39:97));function a7(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=a8(t%52)+n;return(a8(t%52)+n).replace(a6,"$1-$2")}let a9=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e};function le(e){return"string"==typeof e}let lt=Symbol.for("react.memo"),ln=Symbol.for("react.forward_ref"),lr={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},li={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ls={[ln]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[lt]:lo};function la(e){return("type"in e&&e.type.$$typeof)===lt?lo:"$$typeof"in e?ls[e.$$typeof]:lr}let ll=Object.defineProperty,lu=Object.getOwnPropertyNames,lc=Object.getOwnPropertySymbols,ld=Object.getOwnPropertyDescriptor,lh=Object.getPrototypeOf,lf=Object.prototype;function lp(e){return"function"==typeof e}let lm=Symbol.for("react.forward_ref");function lg(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===lm&&"styledComponentId"in e}function ly(e,t){return e&&t?e+" "+t:e||t||""}function lv(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function lb(e,t){Object.defineProperty(e,"toString",{value:t})}let lx=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if((r<<=1)<0)throw aY(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+aU;return t}},lw=`style[${az}][${aF}="${aH}"]`,lk=RegExp(`^${az}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),lS=e=>"u">typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,lE=e=>{if(!e)return document;if(lS(e))return e;if("getRootNode"in e){let t=e.getRootNode();if(lS(t))return t}return document}
7,l_=(e,t,n)=>{let r,i=n.split(",");for(let n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},lj=(e,t)=>{var n;let r=(null!=(n=t.textContent)?n:"").split(aU),i=[];for(let t=0,n=r.length;t<n;t++){let n=r[t].trim();if(!n)continue;let o=n.match(lk);if(o){let t=0|parseInt(o[1],10),n=o[2];0!==t&&(a0(n,t),l_(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},lC=e=>{let t=lE(e.options.target).querySelectorAll(lw);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(az)!==aB&&(lj(e,r),r.parentNode&&r.parentNode.removeChild(r))}},lM=!1,l$=(e,t)=>{let n,r=document.head,i=e||r,o=document.createElement("style"),s=(n=Array.from(i.querySelectorAll(`style[${az}]`)))[n.length-1],a=void 0!==s?s.nextSibling:null;o.setAttribute(az,aB),o.setAttribute(aF,aH);let l=t||function(){if(!1!==lM)return lM;if("u">typeof document){let e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return lM=e.nonce||e.getAttribute("content")||void 0;let t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return lM=t.getAttribute("content")||void 0}return lM="u">typeof __webpack_nonce__?__webpack_nonce__:void 0}();return l&&o.setAttribute("nonce",l),i.insertBefore(o,a),o},lA=class{constructor(e,t){this.element=l$(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;let n=null!=(t=e.getRootNode().styleSheets)?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.ownerNode===e)return r}throw aY(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){let t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},lT=class{constructor(e,t){this.element=l$(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},lP=aW,lI={isServer:!aW,useCSSOMInjection:!aG};class lR{static registerId(e){return aJ(e)}constructor(e=a2,t={},n){this.options=Object.assign(Object.assign({},lI),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&aW&&lP&&(lP=!1,lC(this)),lb(this,()=>(e=>{let t=e.getTag(),{length:n}=t,r="";for(let i=0;i<n;i++){let n=aQ(i);if(void 0===n)continue;let o=e.names.get(n);if(void 0===o||!o.size)continue;let s=t.getGroup(i);if(0===s.length)continue;let a=az+".g"+i+'[id="'+n+'"]',l="";for(let e of o)e.length>0&&(l+=e+",");r+=s+a+'{content:"'+l+'"}'+aU}return r})(this))}rehydrate(){!this.server&&aW&&lC(this)}reconstructWithOptions(e,t=!0){let n=new lR(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&aW&&e.target!==this.options.target&&lE(this.options.target)!==lE(e.target)&&lC(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=new lx((({useCSSOMInjection:e,target:t,nonce:n})=>e?new lA(t,n):new lT(t,n))(this.options)))}hasNameForId(e,t){var n,r;return null!=(r=null==(n=this.names.get(e))?void 0:n.has(t))&&r}registerName(e,t){aJ(e),e.startsWith("sc-keyframes-")&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(aJ(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(aJ(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}let lO=new WeakSet,lL={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function lV(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}let lD=Symbol.for("sc-keyframes");function lN(e){return lp(e)&&!(e.prototype&&e.prototype.isReactComponent)}let lz=e=>null==e||!1===e||""===e,lB=Symbol.for("react.client.reference");function lF(e){return e.$$typeof===lB}function lH(e,t,n,r,i=[]){if(lz(e))return i;let o=typeof e;if("string"===o)return i.push(e),i;if("function"===o)return lF(e)?i:lN(e)&&t?lH(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let o=0;o<e.length;o++)lH(e[o],t,n,r,i);return i}return lg(e)?i.push(`.${e.styledComponentId}`):"object"==typeof e&&null!==e&&lD in e?n?(e.inject(n,r),i.push(e.getName(r))):i.push(e):lF(e)||(lv(e)?e.toString!==Object.prototype.toString?i.push(e.toString()):function e(t,n){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&!lz(i)&&(Array.isArray(i)&&lO.has(i)||lp(i)?n.push(lV(r)+":",i,";"):lv(i)?(n.push(r+" {"),e(i,n),n.push("}")):n.push(lV(r)+": "+(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in lL||r.startsWith("--")?String(i).trim():i+"px")+";"))}}(e,i):i.push(e.toString())),i}let lU=a9(5381,aH);class lW{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=a9(lU,t),this.baseStyle=n,lR.registerId(t)}
7generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){let o=this.rules[r];if("string"==typeof o)i+=o;else if(o)if(lN(o)){let r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=lH(r,e,t,n).join(""))}else i+=lH(o,e,t,n).join("")}if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);let e=n.hash?n.hash+i:i,o=this.dynamicNameCache.get(e);if(!o){if(o=a7(a9(a9(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){let e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=ly(r,o)}}return r}}let lq=/&/g;function lG(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function lY(e){let t=e.length,n="",r=0,i=0,o=0,s=!1,a=!1;for(let l=0;l<t;l++){let u=e.charCodeAt(l);if(0!==o||s||47!==u||42!==e.charCodeAt(l+1))if(s)42===u&&47===e.charCodeAt(l+1)&&(s=!1,l++);else if(34!==u&&39!==u||lG(e,l)){if(0===o)if(123===u)i++;else if(125===u){if(--i<0){a=!0;let n=l+1;for(;n<t;){let t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}else 0===o?o=u:o===u&&(o=0);else s=!0,l++}return a||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}let lK=new lR,lZ=function({options:e=a2,plugins:t=a1}=a2){var n,r,i;let o,s,a,l=(e,t,n)=>n.startsWith(s)&&n.endsWith(s)&&n.replaceAll(s,"").length>0?`.${o}`:e,u=t.slice();u.push(e=>{e.type===al&&e.value.includes("&")&&(a||(a=RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(lq,s).replace(a,l))}),e.prefix&&u.push(aV),u.push(aL);let c=[],d=(i=(r=u.concat((n=e=>c.push(e),function(e){!e.root&&(e=e.return)&&n(e)}))).length,function(e,t,n,o){for(var s="",a=0;a<i;a++)s+=r[a](e,t,n,o)||"";return s}),h=(t,n="",r="",i="&")=>{var l,u,h;o=i,s=n,a=void 0;let f=function(e){let t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return lY(e);let r=e.length,i="",o=0,s=0,a=0,l=0,u=0,c=!1;for(;s<r;){let t=e.charCodeAt(s);if(34!==t&&39!==t||lG(e,s))if(0===a)if(47===t&&s+1<r&&42===e.charCodeAt(s+1)){for(s+=2;s+1<r&&(42!==e.charCodeAt(s)||47!==e.charCodeAt(s+1));)s++;s+=2}else if(40!==t)if(41!==t)if(l>0)s++;else if(42===t&&s+1<r&&47===e.charCodeAt(s+1))i+=e.substring(o,s),s+=2,o=s,c=!0;else if(47===t&&s+1<r&&47===e.charCodeAt(s+1)){for(i+=e.substring(o,s);s<r&&10!==e.charCodeAt(s);)s++;o=s,c=!0}else 123===t?u++:125===t&&u--,s++;else l>0&&l--,s++;else l++,s++;else s++;else 0===a?a=t:a===t&&(a=0),s++}return c?(o<r&&(i+=e.substring(o)),0===u?i:lY(i)):0===u?e:lY(e)}(t),p=(h=function e(t,n,r,i,o,s,a,l,u){for(var c,d,h,f,p=0,m=0,g=a,y=0,v=0,b=0,x=1,w=1,k=1,S=0,E="",_=o,j=s,C=i,M=E;w;)switch(b=S,S=aT()){case 40:if(108!=b&&58==ay(M,g-1)){-1!=ag(M+=am(aR(S),"&","&\f"),"&\f",ad(p?l[p-1]:0))&&(k=-1);break}case 34:case 39:case 91:M+=aR(S);break;case 9:case 10:case 13:case 32:M+=function(e){for(;aj=aP();)if(aj<33)aT();else break;return aI(e)>2||aI(aj)>3?"":" "}(b);break;case 92:M+=function(e,t){for(var n;--t&&aT()&&!(aj<48)&&!(aj>102)&&(!(aj>57)||!(aj<65))&&(!(aj>70)||!(aj<97)););return n=a_+(t<6&&32==aP()&&32==aT()),av(aC,e,n)}(a_-1,7);continue;case 47:switch(aP()){case 42:case 47:ax((c=function(e,t){for(;aT();)if(e+aj===57)break;else if(e+aj===84&&47===aP())break;return"/*"+av(aC,t,a_-1)+"*"+ah(47===e?e:aT())}(aT(),a_),d=n,h=r,f=u,aM(c,d,h,aa,ah(aj),av(c,2,-2),0,f)),u),(5==aI(b||1)||5==aI(aP()||1))&&ab(M)&&" "!==av(M,-1,void 0)&&(M+=" ");break;default:M+="/"}break;case 123*x:l[p++]=ab(M)*k;case 125*x:case 59:case 0:switch(S){case 0:case 125:w=0;case 59+m:-1==k&&(M=am(M,/\f/g,"")),v>0&&(ab(M)-g||0===x&&47===b)&&ax(v>32?aN(M+";",i,r,g-1,u):aN(am(M," ","")+";",i,r,g-2,u),u);break;case 59:M+=";";default:if(ax(C=aD(M,n,r,p,m,o,l,E,_=[],j=[],g,s),s),123===S)if(0===m)e(M,n,C,C,_,s,g,l,j);else{switch(y){case 99:if(110===ay(M,3))break;case 108:if(97===ay(M,2))break;default:m=0;case 100:case 109:case 115:}m?e(t,C,C,i&&ax(aD(t,C,C,0,0,o,l,E,o,_=[],g,j),j),o,j,g,l,i?_:j):e(M,C,C,C,[""],j,0,l,j)}}p=m=v=0,x=k=1,E=M="",g=a;break;case 58:g=1+ab(M),v=b;default:if(x<1){if(123==S)--x;else if(125==S&&0==x++&&125==(aj=a_>0?ay(aC,--a_):0,aS--,10===aj&&(aS=1,ak--),aj))continue}switch(M+=ah(S),S*x){case 38:k=m>0?1:(M+="\f",-1);break;case 44:l[p++]=(ab(M)-1)*k,k=1;break;case 64:45===aP()&&(M+=aR(aT())),y=aP(),m=g=ab(E=M+=function(e){for(;!aI(aP());)aT();return av(aC,e,a_)}(a_)),S++;break;case 45:45===b&&2==ab(M)&&(x=0)}}return s}("",null,null,null,[""],(u=l=r||n?r+" "+n+" { "+f+" }":f,ak=aS=1,aE=ab(aC=u),a_=0,l=[]),0,[0],l),aC="",h);return e.namespace&&(p=function e(t,n){let r=n+" ",i=","+r;for(let o=0;o<t.length;o++){let s=t[o];if("rule"===s.type){s.value=(r+s.value).replaceAll(",",i);let e=s.props,t=[];for(let n=0;n<e.length;n++)t[n]=r+e[n];s.props=t}Array.isArray(s.children)&&"@keyframes"!==s.type&&e(s.children,n)}return t}(p,e.namespace)),c=[],aO(p,d),c},f=5381;for(let e=0;e<t.length;e++)t[e].name||aY(15),f=a9(f,t[e].name);return(null==e?void 0:e.namespace)&&(f=a9(f,e.namespace)),(null==e?void 0:e.prefix)&&(f=a9(f,"p")),h.hash=5381!==f?f.toString():"",h}(),lX=r_.default.createContext({shouldForwardProp:void 0,styleSheet:lK,stylis:lZ,stylisPlugins:void 0});lX.Consumer;let lJ=r_.default.createContext(void 0);function lQ(e){let t=r_.default.useContext(lJ),n=r_.default.useMemo(()=>(function(e,t){if(!e)throw aY(14);if(lp(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw aY(8);return t?Object.assign(Object.assign({},t),e):e})(e.theme,t),[e.theme,t]);return e.children?r_.default.createElement(lJ.Provider,{value:n},e.children):null}lJ.Consumer;let l0=Object.prototype.hasOwnProperty,l1={};function l2(e,t,n){var r,i;let o,s,a=lg(e),l=!le(e),{attrs:u=a1,componentId:c=(r=t.displayName,i=t.parentComponentId,l1[o="string"!=typeof r?"sc":a4(r)]=(l1[o]||0)+1,s=o+"-"+a7(a9(5381,aH+o+l1[o])>>>0),i?i+"-"+s:s),displayName:d=le(e)?`styled.${e}`:`Styled(${e.displayName||e.name||"Component"})`}=t,h=t.displayName&&t.componentId?a4(t.displayName)+"-"+t.componentId:t.componentId||c,f=a&&e.attrs?e.attrs.concat(u).filter(
7Boolean):u,{shouldForwardProp:p}=t;if(a&&e.shouldForwardProp){let n=e.shouldForwardProp;if(t.shouldForwardProp){let e=t.shouldForwardProp;p=(t,r)=>n(t,r)&&e(t,r)}else p=n}let m=new lW(n,h,a?e.componentStyle:void 0);function g(e,t){return function(e,t,n){let r,i,{attrs:o,componentStyle:s,defaultProps:a,foldedComponentIds:l,styledComponentId:u,target:c}=e,d=r_.default.useContext(lJ),h=r_.default.useContext(lX),f=e.shouldForwardProp||h.shouldForwardProp,p=function(e,t,n=a2){return e.theme!==n.theme&&e.theme||t||n.theme}(t,d,a)||a2;{let e=r_.default.useRef(null),n=e.current;if(null!==n&&n[1]===p&&n[2]===h.styleSheet&&n[3]===h.stylis&&n[7]===s&&function(e,t,n){let r=0;for(let n in t)if(l0.call(t,n)&&(r++,e[n]!==t[n]))return!1;return r===n}(n[0],t,n[4]))r=n[5],i=n[6];else{r=function(e,t,n){let r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){let o=e[n],s=lp(o)?o(i?Object.assign({},r):r):o;for(let e in s)"className"===e?r.className=ly(r.className,s[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),s[e]):e in t&&void 0===t[e]||(r[e]=s[e])}return"className"in t&&"string"==typeof t.className&&(r.className=ly(r.className,t.className)),r}(o,t,p),i=s.generateAndInjectStyles(r,h.styleSheet,h.stylis);let n=0;for(let e in t)l0.call(t,e)&&n++;e.current=[t,p,h.styleSheet,h.stylis,n,r,i,s]}}let m=r.as||c,g=function(e,t,n,r){let i={};for(let o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(r,m,p,f),y=ly(l,u);return i&&(y+=" "+i),r.className&&(y+=" "+r.className),g[le(m)&&m.includes("-")?"class":"className"]=y,n&&(g.ref=n),(0,r_.createElement)(m,g)}(y,e,t)}g.displayName=d;let y=r_.default.forwardRef(g);return y.attrs=f,y.componentStyle=m,y.displayName=d,y.shouldForwardProp=p,y.foldedComponentIds=a?ly(e.foldedComponentIds,e.styledComponentId):"",y.styledComponentId=h,y.target=a?e.target:e,Object.defineProperty(y,"defaultProps",{get(){return this._foldedDefaultProps},set(t){this._foldedDefaultProps=a?function(e,...t){for(let n of t)!function e(t,n,r=!1){if(!r&&!lv(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(let r=0;r<n.length;r++)t[r]=e(t[r],n[r]);else if(lv(n))for(let r in n)t[r]=e(t[r],n[r]);return t}(e,n,!0);return e}({},e.defaultProps,t):t}}),lb(y,()=>`.${y.styledComponentId}`),l&&function e(t,n,r){if("string"!=typeof n){let i=lh(n);i&&i!==lf&&e(t,i,r);let o=lu(n).concat(lc(n)),s=la(t),a=la(n);for(let e=0;e<o.length;++e){let i=o[e];if(!(i in li||r&&r[i]||a&&i in a||s&&i in s)){let e=ld(n,i);try{ll(t,i,e)}catch(e){}}}}return t}(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}var l5=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function l3(e,t){let n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}let l4=e=>(lO.add(e),e);function l6(e,...t){return lp(e)||lv(e)?l4(lH(l3(a1,[e,...t]))):0===t.length&&1===e.length&&"string"==typeof e[0]?lH(e):l4(lH(l3(e,t)))}let l8=e=>(function e(t,n,r=a2){if(!n)throw aY(1,n);let i=(e,...i)=>t(n,r,l6(e,...i));return i.attrs=i=>e(t,n,Object.assign(Object.assign({}
7,r),{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)})),i.withConfig=i=>e(t,n,Object.assign(Object.assign({},r),i)),i})(l2,e);l5.forEach(e=>{l8[e]=l8(e)});var l7=e.i(179684);let l9={'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},ue={content:"content-box",border:"border-box"},ut={stretch:"stretch",fill:"100%"};function un(e){let{media:t}=sK(e.theme);return s0(t,e.$display,e=>({"&:not([hidden])":{display:e}}))}function ur(e){let{media:t}=sK(e.theme);return s0(t,e.$sizing,e=>({boxSizing:ue[e]}))}function ui(e){let{media:t}=sK(e.theme);return s0(t,e.$height,e=>({height:ut[e]}))}function uo(e){let{media:t}=sK(e.theme);return s0(t,e.$overflow,e=>({overflow:e}))}let us={minWidth:0,minHeight:0};function ua(){return[us,ul]}function ul(e){let{media:t}=sK(e.theme);return e.$flex?s0(t,e.$flex,e=>({flex:`${e}`})):sZ}let uu={auto:"auto",full:"1 / -1"},uc={auto:"auto",full:"1 / -1"};function ud(e){let{media:t}=sK(e.theme);return s0(t,e.$row,e=>"number"==typeof e?{gridRow:`span ${e} / span ${e}`}:{gridRow:uu[e]})}function uh(e){let{media:t}=sK(e.theme);return s0(t,e.$rowStart,e=>({gridRowStart:`${e}`}))}function uf(e){let{media:t}=sK(e.theme);return s0(t,e.$rowEnd,e=>({gridRowEnd:`${e}`}))}function up(e){let{media:t}=sK(e.theme);return s0(t,e.$column,e=>"number"==typeof e?{gridColumn:`span ${e} / span ${e}`}:{gridColumn:uc[e]})}function um(e){let{media:t}=sK(e.theme);return s0(t,e.$columnStart,e=>({gridColumnStart:`${e}`}))}function ug(e){let{media:t}=sK(e.theme);return s0(t,e.$columnEnd,e=>({gridColumnEnd:`${e}`}))}let uy=l8.div.withConfig({displayName:"StyledBox",componentId:"sc-ok8ezo-0"})(function(){return l9},ua,function(){return[ur,ui,uo,un]},function(){return[ud,uh,uf,up,um,ug]},function(e){let{theme:t}=e;return[s2(t,["margin"],e.$margin),s2(t,["marginLeft","marginRight"],e.$marginX),s2(t,["marginTop","marginBottom"],e.$marginY),s2(t,["marginTop"],e.$marginTop),s2(t,["marginRight"],e.$marginRight),s2(t,["marginBottom"],e.$marginBottom),s2(t,["marginLeft"],e.$marginLeft)].filter(Boolean)},function(e){let{theme:t}=e;return[s2(t,["padding"],e.$padding),s2(t,["paddingLeft","paddingRight"],e.$paddingX),s2(t,["paddingTop","paddingBottom"],e.$paddingY),s2(t,["paddingTop"],e.$paddingTop),s2(t,["paddingRight"],e.$paddingRight),s2(t,["paddingBottom"],e.$paddingBottom),s2(t,["paddingLeft"],e.$paddingLeft)].filter(Boolean)}),uv=function(e){let t,n,r,i,o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j=(0,tt.c)(110),C,M,$,A,T,P,I,R,O,L,V,D,N,z,B,F,H,U,W,q,G,Y,K,Z,X,J,Q,ee;j[0]===e?(C=j[1],M=j[2],$=j[3],A=j[4],T=j[5],P=j[6],I=j[7],R=j[8],O=j[9],L=j[10],V=j[11],D=j[12],N=j[13],z=j[14],B=j[15],F=j[16],H=j[17],U=j[18],W=j[19],q=j[20],G=j[21],Y=j[22],K=j[23],Z=j[24],X=j[25],J=j[26],Q=j[27],ee=j[28]):({as:X,ref:Y,gridColumn:M,gridColumnStart:A,gridColumnEnd:$,display:J,flex:C,height:R,margin:Q,marginX:N,marginY:z,marginTop:D,marginRight:V,marginBottom:O,marginLeft:L,overflow:B,padding:ee,paddingX:q,paddingY:G,paddingTop:W,paddingRight:U,paddingBottom:F,paddingLeft:H,gridRow:T,gridRowStart:I,gridRowEnd:P,sizing:Z,...K}=e,j[0]=e,j[1]=C,j[2]=M,j[3]=$,j[4]=A,j[5]=T,j[6]=P,j[7]=I,j[8]=R,j[9]=O,j[10]=L,j[11]=V,j[12]=D,j[13]=N,j[14]=z,j[15]=B,j[16]=F,j[17]=H,j[18]=U,j[19]=W,j[20]=q,j[21]=G,j[22]=Y,j[23]=K,j[24]=Z,j[25]=X,j[26]=J,j[27]=Q,j[28]=ee);let et=void 0===X?"div":X,en=void 0===J?"block":J,er=void 0===Q?0:Q,ei=void 0===ee?0:ee,eo="string"==typeof et?et:void 0,es;return j[29]===M?es=j[30]:(es=s1(M),j[29]=M,j[30]=es),j[31]===A?n=j[32]:(n=s1(A),j[31]=A,j[32]=n),j[33]===$?r=j[34]:(r=s1($),j[33]=$,j[34]=r),j[35]===en?i=j[36]:(i=s1(en),j[35]=en,j[36]=i),j[37]===C?o=j[38]:(o=s1(C),j[37]=C,j[38]=o),j[39]===R?s=j[40]:(s=s1(R),j[39]=R,j[40]=s),j[41]===er?a=j[42]:(a=s1(er),j[41]=er,j[42]=a),j[43]===N?l=j[44]:(l=s1(N),j[43]=N,j[44]=l),j[45]===z?u=j[46]:(u=s1(z),j[45]=z,j[46]=u),j[47]===D?c=j[48]:(c=s1(D),j[47]=D,j[48]=c),j[49]===V?d=j[50]:(d=s1(V),j[49]=V,j[50]=d),j[51]===O?h=j[52]:(h=s1(O),j[51]=O,j[52]=h),j[53]===L?f=j[54]:(f=s1(L),j[53]=L,j[54]=f),j[55]===B?p=j[56]:(p=s1(B),j[55]=B,j[56]=p),j[57]===ei?m=j[58]:(m=s1(ei),j[57]=ei,j[58]=m),j[59]===q?g=j[60]:(g=s1(q),j[59]=q,j[60]=g),j[61]===G?y=j[62]:(y=s1(G),j[61]=G,j[62]=y),j[63]===W?v=j[64]:(v=s1(W),j[63]=W,j[64]=v),j[65]===U?b
7=j[66]:(b=s1(U),j[65]=U,j[66]=b),j[67]===F?x=j[68]:(x=s1(F),j[67]=F,j[68]=x),j[69]===H?w=j[70]:(w=s1(H),j[69]=H,j[70]=w),j[71]===T?k=j[72]:(k=s1(T),j[71]=T,j[72]=k),j[73]===I?S=j[74]:(S=s1(I),j[73]=I,j[74]=S),j[75]===P?E=j[76]:(E=s1(P),j[75]=P,j[76]=E),j[77]===Z?_=j[78]:(_=s1(Z),j[77]=Z,j[78]=_),j[79]!==e.children||j[80]!==Y||j[81]!==K||j[82]!==s||j[83]!==a||j[84]!==l||j[85]!==u||j[86]!==c||j[87]!==d||j[88]!==h||j[89]!==f||j[90]!==p||j[91]!==m||j[92]!==g||j[93]!==y||j[94]!==v||j[95]!==b||j[96]!==x||j[97]!==w||j[98]!==k||j[99]!==S||j[100]!==E||j[101]!==_||j[102]!==et||j[103]!==eo||j[104]!==es||j[105]!==n||j[106]!==r||j[107]!==i||j[108]!==o?(t=(0,sL.jsx)(uy,{"data-as":eo,"data-ui":"Box",...K,$column:es,$columnStart:n,$columnEnd:r,$display:i,$flex:o,$height:s,$margin:a,$marginX:l,$marginY:u,$marginTop:c,$marginRight:d,$marginBottom:h,$marginLeft:f,$overflow:p,$padding:m,$paddingX:g,$paddingY:y,$paddingTop:v,$paddingRight:b,$paddingBottom:x,$paddingLeft:w,$row:k,$rowStart:S,$rowEnd:E,$sizing:_,as:et,ref:Y,children:e.children}),j[79]=e.children,j[80]=Y,j[81]=K,j[82]=s,j[83]=a,j[84]=l,j[85]=u,j[86]=c,j[87]=d,j[88]=h,j[89]=f,j[90]=p,j[91]=m,j[92]=g,j[93]=y,j[94]=v,j[95]=b,j[96]=x,j[97]=w,j[98]=k,j[99]=S,j[100]=E,j[101]=_,j[102]=et,j[103]=eo,j[104]=es,j[105]=n,j[106]=r,j[107]=i,j[108]=o,j[109]=t):t=j[109],t};function ub(e){let{media:t,radius:n}=sK(e.theme);return s0(t,e.$radius,e=>{let t=0;return"number"==typeof e&&(t=sQ(n[e])),"full"===e&&(t="9999px"),{borderRadius:t}})}function ux(){let e=(0,tt.c)(2),t=function(){let e=r_.default.useContext(lJ);if(!e)throw aY(18);return e}(),n;return e[0]===t?n=e[1]:(n=sK(t),e[0]=t,e[1]=n),n}function uw(e,t,n=!1){return{"--card-backdrop-color":e.backdrop,"--card-focus-ring-color":e.focusRing,"--card-shadow-outline-color":e.shadow.outline,"--card-shadow-umbra-color":e.shadow.umbra,"--card-shadow-penumbra-color":e.shadow.penumbra,"--card-shadow-ambient-color":e.shadow.ambient,"--card-accent-fg-color":t.accent.fg,"--card-avatar-gray-bg-color":t.avatar.gray.bg,"--card-avatar-gray-fg-color":t.avatar.gray.fg,"--card-avatar-blue-bg-color":t.avatar.blue.bg,"--card-avatar-blue-fg-color":t.avatar.blue.fg,"--card-avatar-purple-bg-color":t.avatar.purple.bg,"--card-avatar-purple-fg-color":t.avatar.purple.fg,"--card-avatar-magenta-bg-color":t.avatar.magenta.bg,"--card-avatar-magenta-fg-color":t.avatar.magenta.fg,"--card-avatar-red-bg-color":t.avatar.red.bg,"--card-avatar-red-fg-color":t.avatar.red.fg,"--card-avatar-orange-bg-color":t.avatar.orange.bg,"--card-avatar-orange-fg-color":t.avatar.orange.fg,"--card-avatar-yellow-bg-color":t.avatar.yellow.bg,"--card-avatar-yellow-fg-color":t.avatar.yellow.fg,"--card-avatar-green-bg-color":t.avatar.green.bg,"--card-avatar-green-fg-color":t.avatar.green.fg,"--card-avatar-cyan-bg-color":t.avatar.cyan.bg,"--card-avatar-cyan-fg-color":t.avatar.cyan.fg,"--card-bg-color":t.bg,"--card-bg-image":n?`repeating-conic-gradient(${t.bg} 0% 25%, ${t.muted.bg} 0% 50%)`:void 0,"--card-border-color":t.border,"--card-badge-default-bg-color":t.badge.default.bg,"--card-badge-default-dot-color":t.badge.default.dot,"--card-badge-default-fg-color":t.badge.default.fg,"--card-badge-default-icon-color":t.badge.default.icon,"--card-badge-neutral-bg-color":t.badge.neutral?.bg,"--card-badge-neutral-dot-color":t.badge.neutral?.dot,"--card-badge-neutral-fg-color":t.badge.neutral?.fg,"--card-badge-neutral-icon-color":t.badge.neutral?.icon,"--card-badge-primary-bg-color":t.badge.primary.bg,"--card-badge-primary-dot-color":t.badge.primary.dot,"--card-badge-primary-fg-color":t.badge.primary.fg,"--card-badge-primary-icon-color":t.badge.primary.icon,"--card-badge-suggest-bg-color":t.badge.suggest?.bg,"--card-badge-suggest-dot-color":t.badge.suggest?.dot,"--card-badge-suggest-fg-color":t.badge.suggest?.fg,"--card-badge-suggest-icon-color":t.badge.suggest?.icon,"--card-badge-positive-bg-color":t.badge.positive.bg,"--card-badge-positive-dot-color":t.badge.positive.dot,"--card-badge-positive-fg-color":t.badge.positive.fg,"--card-badge-positive-icon-color":t.badge.positive.icon,"--card-badge-caution-bg-color":t.badge.caution.bg,"--card-badge-caution-dot-color":t.badge.caution.dot,"--card-badge-caution-fg-color":t.badge.caution.fg,"--card-badge-caution-icon-color":t.badge.caution.icon,"--card-badge-critical-bg-color":t.badge.critical.bg,"--card-badge-critical-dot-color":t.badge.critical.dot,"--card-badge-critical-fg-color":t.badge.critical.fg,"--card-badge-critical-icon-color":t.badge.critical.icon,"--card-code-bg-color":t.code.bg,"--card-code-fg-color":t.code.fg,"--card-fg-color":t.fg,"--card-icon-color":t.icon,"--card-kbd-bg-color":t.kbd.bg,"--card-kbd-border-color":t.kbd.border,"--card-kbd-fg-color":t.kbd.fg,"--card-link-fg-color":t.link.fg,"--card-muted-bg-color":t.muted.bg,"--card-muted-fg-color":t.muted.fg,"--card-skeleton-color-from":t.skeleton.from,"--card-skeleton-color-to":t.skeleton.to,"--card-bg2-color":t.muted.bg,"--card-link-color":t.link.fg,"--card-hairline-soft-color":t.border,"--card-hairline-hard-color":t.border}}function uk(e){return`inset 0 0 0 ${e.width}px ${e.color}`}function uS(e){let{base:t,border:n,focusRing:r}=e,i=r.offset+r.width,o=0-r.offset,s=t?t.bg:"var(--card-bg-color)";return[o>0&&`inset 0 0 0 ${o}px var(--card-focus-ring-color)`,n&&uk(n),o<0&&`0 0 0 ${0-o}px ${s}`,i>0&&`0 0 0 ${i}
7px var(--card-focus-ring-color)`].filter(Boolean).join(",")}function uE(e){let{card:t,media:n}=sK(e.theme),r=`${t.border?.width??1}px solid var(--card-border-color)`;return s0(n,e.$border,e=>e?{"&&":{border:r}}:{"&&":{border:0}})}function u_(e){let{card:t,media:n}=sK(e.theme),r=`${t.border?.width??1}px solid var(--card-border-color)`;return s0(n,e.$borderTop,e=>e?{"&&":{borderTop:r}}:{"&&":{borderTop:0}})}function uj(e){let{card:t,media:n}=sK(e.theme),r=`${t.border?.width??1}px solid var(--card-border-color)`;return s0(n,e.$borderRight,e=>e?{"&&":{borderRight:r}}:{"&&":{borderRight:0}})}function uC(e){let{card:t,media:n}=sK(e.theme),r=`${t.border?.width??1}px solid var(--card-border-color)`;return s0(n,e.$borderBottom,e=>e?{"&&":{borderBottom:r}}:{"&&":{borderBottom:0}})}function uM(e){let{card:t,media:n}=sK(e.theme),r=`${t.border?.width??1}px solid var(--card-border-color)`;return s0(n,e.$borderLeft,e=>e?{"&&":{borderLeft:r}}:{"&&":{borderLeft:0}})}function u$(e,t){return`${e.map(sQ).join(" ")} ${t}`}let uA="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g;function uT(e,t){let n=Symbol.for(e);if(typeof document>"u"){let n=(0,r_.createContext)(t);return n.displayName=e,n}return uA[n]=uA[n]||(0,r_.createContext)(t),uA[n]}let uP=uT("@sanity/ui/context/theme",null);function uI(e){let t,n,r=(0,tt.c)(15),i=(0,r_.useContext)(uP),{children:o}=e,s=e.scheme??(i?.scheme||"light"),a=e.theme??(i?.theme||null),l=e.tone??(i?.tone||"default"),u;t:{let e;if(!a){u=null;break t}r[0]!==a||r[1]!==s||r[2]!==l?(e={version:0,theme:a,scheme:s,tone:l},r[0]=a,r[1]=s,r[2]=l,r[3]=e):e=r[3],u=e}let c=u,d;n:{let e;if(!a){d=null;break n}r[4]!==a||r[5]!==s||r[6]!==l?(e=function(e,t,n){var r,i,o,s,a;let l,u=function(e,t,n){let r=an.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(u)return u;let c=s3(e)?s9(e):e,d=s3(e)?e:function(e){if(e.v2)return e.v2;let t=s4.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,focusRing:s,fonts:a,input:l,layer:u,media:c,radius:d,shadows:h,space:f,styles:p}=e,m={_version:2,avatar:{...sV,...n},button:{...sD,...r},card:sN,color:{light:{transparent:sH(i.light.transparent),default:sH(i.light.default),neutral:sH(i.light.transparent),primary:sH(i.light.primary),suggest:sH(i.light.primary),positive:sH(i.light.positive),caution:sH(i.light.caution),critical:sH(i.light.critical)},dark:{transparent:sH(i.dark.transparent),default:sH(i.dark.default),neutral:sH(i.dark.transparent),primary:sH(i.dark.primary),suggest:sH(i.dark.primary),positive:sH(i.dark.positive),caution:sH(i.dark.caution),critical:sH(i.dark.critical)}},container:o,font:a,input:{...sB,...l,checkbox:{...sB.checkbox,...l.checkbox},radio:{...sB.radio,...l.radio},switch:{...sB.switch,...l.switch}},layer:u??sz,media:c,radius:d,shadow:h,space:f,style:p};return s4.set(e,m),m}(e),h=c.layer||sz,f=d.color[t]||d.color.light,p="neutral"in(r=f[n]||f.default).badge?r:{...r,badge:{...r.badge,neutral:r.badge.default,suggest:r.badge.primary},button:{bleed:{...r.button.bleed,neutral:r.button.bleed.default,suggest:r.button.bleed.primary},default:{...r.button.default,neutral:r.button.default.default,suggest:r.button.default.primary},ghost:{...r.button.ghost,neutral:r.button.ghost.default,suggest:r.button.ghost.primary}},selectable:{...r.selectable,neutral:r.selectable.default,suggest:r.selectable.primary}},m=d.layer||sz,{color:g,...y}=c,v={...y,layer:h,v2:{...d,_resolved:!0,color:p,layer:m}};s5(v,"color",()=>{let e=c.color[t]||c.color.light;return e[n]||e.default});let b={sanity:v};return i=e,o=t,s=n,a=b,an.has(o)||an.set(o,new Map),(l=an.get(o)).has(s)||l.set(s,new WeakMap),l.get(s).set(i,a),b}(a,s,l),r[4]=a,r[5]=s,r[6]=l,r[7]=e):e=r[7],d=e}let h=d;if(!h){let e;return r[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,sL.jsx)("pre",{children:'ThemeProvider: no "theme" property provided'}),r[8]=e):e=r[8],e}return r[9]!==o||r[10]!==h?(t=(0,sL.jsx)(lQ,{theme:h,children:o}),r[9]=o,r[10]=h,r[11]=t):t=r[11],r[12]!==t||r[13]!==c?(n=(0,sL.jsx)(uP.Provider,{value:c,children:t}),r[12]=t,r[13]=c,r[14]=n):n=r[14],n}function uR(){let e=(0,r_.useContext)(uP);
7if(!e)throw Error("useRootTheme(): missing context value");return e}function uO(e){let t=(0,tt.c)(5),{children:n,scheme:r,tone:i}=e,o=uR(),s=r||o.scheme,a;return t[0]!==n||t[1]!==o.theme||t[2]!==s||t[3]!==i?(a=(0,sL.jsx)(uI,{scheme:s,theme:o.theme,tone:i,children:n}),t[0]=n,t[1]=o.theme,t[2]=s,t[3]=i,t[4]=a):a=t[4],a}let uL=l8(uv).withConfig({displayName:"StyledCard",componentId:"sc-immb6s-0"})(function(){return[uE,u_,uj,uC,uM]},ub,function(e){let{card:t,media:n,shadow:r}=sK(e.theme);return s0(n,e.$shadow,e=>(function(e,t=1){return e?{boxShadow:`0 0 0 ${sQ(t)} var(--card-shadow-outline-color), ${u$(e.umbra,"var(--card-shadow-umbra-color)")}, ${u$(e.penumbra,"var(--card-shadow-penumbra-color)")}, ${u$(e.ambient,"var(--card-shadow-ambient-color)")}`}:sX})(r[e],t.shadow.outline))},function(e){return[function(e){let{$checkered:t}=e,{space:n}=sK(e.theme);return l6`${t&&l6`background-size:${n[3]}px ${n[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`} &[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`}(e),function(e){let{$checkered:t,$focusRing:n,$muted:r}=e,{card:i,color:o,style:s}=sK(e.theme),a={width:i.border.width,color:"var(--card-border-color)"};return l6`color-scheme:${o._dark?"dark":"light"};${uw(o,o,t)} background-color:${r?"var(--card-muted-bg-color)":"var(--card-bg-color)"};color:var(--card-fg-color);&[data-as='button']{--card-focus-ring-box-shadow:none;cursor:default;box-shadow:var(--card-focus-ring-box-shadow);&:disabled{${uw(o,o.selectable.default.disabled,t)}}&:not(:disabled){&[data-pressed]{${uw(o,o.selectable.default.pressed,t)}}&[data-selected]{${uw(o,o.selectable.default.selected,t)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${uw(o,o.selectable.default.hovered,t)}}&:active{${uw(o,o.selectable.default.pressed,t)}}}}&:focus-visible{--card-focus-ring-box-shadow:${n?uS({base:o,border:a,focusRing:i.focusRing}):void 0};}}}&[data-as='a']{cursor:pointer;box-shadow:var(--card-focus-ring-box-shadow);&[data-disabled]{${uw(o,o.selectable.default.disabled,t)}}&:not([data-disabled]){&[data-pressed]{${uw(o,o.selectable.default.pressed,t)}}&[data-selected]{${uw(o,o.selectable.default.selected,t)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${uw(o,o.selectable.default.hovered,t)}}&:active{${uw(o,o.selectable.default.pressed,t)}}}}&:focus-visible{--card-focus-ring-box-shadow:${n?uS({base:o,border:a,focusRing:i.focusRing}):void 0};}}}${s?.card?.root}`}(e)]}),uV=function(e){let t,n,r,i,o,s,a=(0,tt.c)(57),l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E;a[0]===e?(l=a[1],u=a[2],c=a[3],d=a[4],h=a[5],f=a[6],p=a[7],m=a[8],g=a[9],y=a[10],v=a[11],b=a[12],x=a[13],w=a[14],k=a[15],S=a[16],E=a[17]):({__unstable_checkered:w,__unstable_focusRing:k,as:l,border:u,borderTop:f,borderRight:h,borderBottom:c,borderLeft:d,muted:p,pressed:m,radius:S,ref:g,scheme:v,selected:b,shadow:x,tone:E,...y}=e,a[0]=e,a[1]=l,a[2]=u,a[3]=c,a[4]=d,a[5]=h,a[6]=f,a[7]=p,a[8]=m,a[9]=g,a[10]=y,a[11]=v,a[12]=b,a[13]=x,a[14]=w,a[15]=k,a[16]=S,a[17]=E);let _=void 0!==w&&w,j=void 0!==k&&k,C=void 0===S?0:S,M=void 0===E?"default":E,$=(0,l7.isValidElementType)(l)?l:"div",A=uR(),T="inherit"===M?A.tone:M,P="string"==typeof $?$:void 0,I=A.scheme,R;a[18]===u?R=a[19]:(R=s1(u),a[18]=u,a[19]=R),a[20]===f?t=a[21]:(t=s1(f),a[20]=f,a[21]=t),a[22]===h?n=a[23]:(n=s1(h),a[22]=h,a[23]=n),a[24]===c?r=a[25]:(r=s1(c),a[24]=c,a[25]=r),a[26]===d?i=a[27]:(i=s1(d),a[26]=d,a[27]=i);let O=p??!1,L;a[28]===C?L=a[29]:(L=s1(C),a[28]=C,a[29]=L),a[30]===x?o=a[31]:(o=s1(x),a[30]=x,a[31]=o);let V=_?"":void 0,D=m?"":void 0,N=b?"":void 0,z;return a[32]!==$||a[33]!==_||a[34]!==j||a[35]!==g||a[36]!==y||a[37]!==A.scheme||a[38]!==b||a[39]!==i||a[40]!==O||a[41]!==L||a[42]!==o||a[43]!==V||a[44]!==D||a[45]!==N||a[46]!==P||a[47]!==R||a[48]!==t||a[49]!==n||a[50]!==r||a[51]!==T?(z=(0,sL.jsx)(uL,{"data-as":P,"data-scheme":I,"data-ui":"Card","data-tone":T,...y,$border:R,$borderTop:t,$borderRight:n,$borderBottom:r,$borderLeft:i,$checkered:_,$focusRing:j,$muted:O,$radius:L,$shadow:o,$tone:T,"data-checkered":V,"data-pressed":D,"data-selected":N,forwardedAs:$,ref:g,selected:b}),a[32]=$,a[33]=_,a[34]=j,a[35]=g,a[36]=y,a[37]=A.scheme,a[38]=b,a[39]=i,a[40]=O,a[41]=L,a[42]=o,a[43]=V,a[44]=D,a[45]=N,a[46]=P,a[47]=R,a[48]=t,a[49]=n,a[50]=r,a[51]=T,a[52]=z):z=a[52],a[53]!==v||a[54]!==z||a[55]!==T?(s=(0,sL.jsx)(uO,{scheme:v,tone:T,children:z}),a[53]=v,a[54]=z,a[55]=T,a[56]=s):s=a[56],s};function uD(){return 0}function uN(){let e,t,n,r=(0,tt.c)(2),{media:i}=ux(),o;r[0]===i?o=r[1]:(e=i.length,n=()=>
7{if(!t){t=[];for(let r=e;r>-1;--r){var n;let e=0===(n=r)?`screen and (max-width: ${i[n]-1}px)`:n===i.length?`screen and (min-width: ${i[n-1]}px)`:`screen and (min-width: ${i[n-1]}px) and (max-width: ${i[n]-1}px)`;t.push({index:r,mq:window.matchMedia(e)})}}return t},o={getSnapshot:()=>{for(let{index:e,mq:t}of n())if(t.matches)return e;return 0},subscribe:e=>{let t=[];for(let{mq:r}of n()){let n=()=>{r.matches&&e()};r.addEventListener("change",n),t.push(()=>r.removeEventListener("change",n))}return()=>{for(let e of t)e()}}},r[0]=i,r[1]=o);let s=o;return(0,r_.useSyncExternalStore)(s.subscribe,s.getSnapshot,uD)}function uz(e,t){let n,r,i=(0,tt.c)(4);return(0,r_.useDebugValue)(e),i[0]===e?n=i[1]:(n=t=>{let n=window.matchMedia(e);return n.addEventListener("change",t),()=>n.removeEventListener("change",t)},i[0]=e,i[1]=n),i[2]===e?r=i[3]:(r=()=>window.matchMedia(e).matches,i[2]=e,i[3]=r),(0,r_.useSyncExternalStore)(n,r,t)}function uB(e){return uz("(prefers-reduced-motion: reduce)",void 0===e?uF:e)}function uF(){return!1}function uH(e){return!(!e||"object"!=typeof e||Array.isArray(e))}function uU(e){if(!uH(e)||0!==e.version)throw Error("the context value is not compatible");if(!e)throw Error("components using `useLayer()` should be wrapped in a <LayerProvider>.");if(0===e.version)return e;throw Error("could not get layer context")}let uW=uT("@sanity/ui/context/layer",null),uq={childLayers:new Map,childrenWithoutLevel:0};function uG(e,t){let{level:n}=t;switch(t.type){case"child/register":{if(void 0===n)return{...e,childrenWithoutLevel:e.childrenWithoutLevel+1};let t=new Map(e.childLayers);return t.set(n,(t.get(n)??0)+1),{...e,childLayers:t}}case"child/unregister":{if(void 0===n)return{...e,childrenWithoutLevel:e.childrenWithoutLevel-1};let t=new Map(e.childLayers),r=t.get(n)??0;return 1===r?t.delete(n):t.set(n,r-1),{...e,childLayers:t}}default:return e}}function uY(e){let t,n=(0,tt.c)(19),{children:r,zOffset:i}=e,o=void 0===i?0:i,s=(0,r_.useContext)(uW),a;n[0]===s?a=n[1]:(a=s&&uU(s),n[0]=s,n[1]=a);let l=a,u=l?.registerChild,c=(l?.level??0)+1,d;n[2]===o?d=n[3]:(d=s1(o),n[2]=o,n[3]=d);let h=d,f=h.length-1,p=Math.min(uN(),f),m=l?l.zIndex+h[p]:h[p],[g,y]=(0,r_.useReducer)(uG,uq),{childLayers:v,childrenWithoutLevel:b}=g,x=v.size+b,w=0===x,k;n[4]===u?k=n[5]:(k=e=>{let t=u?.(e);return y({type:"child/register",level:e}),()=>{y({type:"child/unregister",level:e}),t?.()}},n[4]=u,n[5]=k);let S=k,E,_;n[6]!==c||n[7]!==u?(E=()=>u?.(c),_=[c,u],n[6]=c,n[7]=u,n[8]=E,n[9]=_):(E=n[8],_=n[9]),(0,r_.useEffect)(E,_),n[10]!==w||n[11]!==c||n[12]!==S||n[13]!==x||n[14]!==m?(t={version:0,isTopLayer:w,level:c,registerChild:S,size:x,zIndex:m},n[10]=w,n[11]=c,n[12]=S,n[13]=x,n[14]=m,n[15]=t):t=n[15];let j=t,C;return n[16]!==r||n[17]!==j?(C=(0,sL.jsx)(uW.Provider,{value:j,children:r}),n[16]=r,n[17]=j,n[18]=C):C=n[18],C}function uK(){let e=(0,tt.c)(2),t=(0,r_.useContext)(uW);if(!t)throw Error("useLayer(): missing context value");try{let n;return e[0]===t?n=e[1]:(n=uU(t),e[0]=t,e[1]=n),n}catch(e){throw e instanceof Error?Error(`useLayer(): ${e.message}`):Error(`useLayer(): ${e}`)}}let uZ={"&&:not([hidden])":{display:"flex"}};function uX(e){let{media:t}=sK(e.theme);return s0(t,e.$align,e=>({alignItems:e}))}function uJ(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$gap,e=>({gap:e?sQ(n[e]):void 0}))}function uQ(e){let{media:t}=sK(e.theme);return s0(t,e.$wrap,e=>({flexWrap:e}))}function u0(e){let{media:t}=sK(e.theme);return s0(t,e.$justify,e=>({justifyContent:e}))}function u1(e){let{media:t}=sK(e.theme);return s0(t,e.$direction,e=>({flexDirection:e}))}let u2=l8(uv).withConfig({displayName:"StyledFlex",componentId:"sc-f161j9-0"})(ua,function(){return[uZ,uX,uJ,uQ,u0,u1]}),u5=function(e){let t,n,r,i,o,s=(0,tt.c)(28),a,l,u,c,d,h,f,p;s[0]===e?(a=s[1],l=s[2],u=s[3],c=s[4],d=s[5],h=s[6],f=s[7],p=s[8]):({align:a,as:l,direction:f,gap:u,justify:c,ref:d,wrap:p,...h}=e,s[0]=e,s[1]=a,s[2]=l,s[3]=u,s[4]=c,s[5]=d,s[6]=h,s[7]=f,s[8]=p);let m=void 0===f?"row":f,g;return s[9]===a?g=s[10]:(g=s1(a),s[9]=a,s[10]=g),s[11]===m?t=s[12]:(t=s1(m),s[11]=m,s[12]=t),s[13]===u?n=s[14]:(n=s1(u),s[13]=u,s[14]=n),s[15]===c?r=s[16]:(r=s1(c),s[15]=c,s[16]=r),s[17]===p?i=s[18]:(i=s1(p),s[17]=p,s[18]=i),s[19]!==l||s[20]!==d||s[21]!==h||s[22]!==g||s[23]!==t||s[24]!==n||s[25]!==r||s[26]!==i?(o=(0,sL.jsx)(u2,{"data-ui":"Flex",...h,$align:g,$direction:t,$gap:n,$justify:r,$
7wrap:i,forwardedAs:l,ref:d}),s[19]=l,s[20]=d,s[21]=h,s[22]=g,s[23]=t,s[24]=n,s[25]=r,s[26]=i,s[27]=o):o=s[27],o};function u3(e,t){let{$size:n,$weight:r}=t,{font:i,media:o}=sK(t.theme),{family:s,sizes:a,weights:l}=i[e],u=r&&l[r]||l.regular,c=a[2],d={position:"relative",fontFamily:s,fontWeight:`${u}`,padding:"1px 0",margin:0,"&:before":{content:'""',display:"block",height:0},"&:after":{content:'""',display:"block",height:0},"& > code, & > span":{display:"block"},"&:not([hidden])":{display:"block"}};return n?[d,...s0(o,n,e=>(function(e){let{ascenderHeight:t,descenderHeight:n,fontSize:r,iconSize:i,letterSpacing:o,lineHeight:s}=e,a=t+n,l=s-a,u=2*Math.floor(1.125*r/2)+1;return{fontSize:sQ(r),lineHeight:`calc(${s} / ${r})`,letterSpacing:sQ(o),transform:`translateY(${sQ(n)})`,"&:before":{marginTop:`calc(${sQ(0-a)} - 1px)`},"&:after":{marginBottom:"-1px"},"& svg:not([data-sanity-icon])":{fontSize:`calc(${u} / 16 * 1rem)`,margin:sQ((l-u)/2)},"& [data-sanity-icon]":{fontSize:`calc(${i} / 16 * 1rem)`,margin:sQ((l-i)/2)}}})(a[e]||c))]:(u3.warned||=(console.warn("No size specified for responsive font",{fontKey:e,$size:n,props:t,base:d}),!0),[d])}function u4(e){let{media:t}=sK(e.theme);return s0(t,e.$align,e=>({textAlign:e}))}function u6(e){let t=(0,tt.c)(2),n;return t[0]===e.children?n=t[1]:(n=(0,sL.jsx)("span",{className:"elmvdc0",children:e.children}),t[0]=e.children,t[1]=n),n}let u8=l8.div.withConfig({displayName:"StyledText",componentId:"sc-300p63-0"})(function(e){return u3("text",e)},u4,function(e){let{$accent:t,$muted:n}=e,{font:r}=sK(e.theme);return l6`color:var(--card-fg-color);${t&&l6`color:var(--card-accent-fg-color);`} ${n&&l6`color:var(--card-muted-fg-color);`} & code{font-family:${r.code.family};border-radius:1px;background-color:var(--card-code-bg-color);color:var(--card-code-fg-color);}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${r.text.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;color:var(--card-icon-color);& path{vector-effect:non-scaling-stroke !important;}}`}),u7=function(e){let t,n,r,i,o=(0,tt.c)(27),s,a,l,u,c,d,h,f,p;o[0]===e?(s=o[1],a=o[2],l=o[3],u=o[4],c=o[5],d=o[6],h=o[7],f=o[8],p=o[9]):({accent:c,align:s,children:a,muted:d,ref:l,size:h,textOverflow:f,weight:p,...u}=e,o[0]=e,o[1]=s,o[2]=a,o[3]=l,o[4]=u,o[5]=c,o[6]=d,o[7]=h,o[8]=f,o[9]=p);let m=void 0!==c&&c,g=void 0!==d&&d,y=void 0===h?2:h,v=a;if("ellipsis"===f){let e;o[10]===v?e=o[11]:(e=(0,sL.jsx)(u6,{children:v}),o[10]=v,o[11]=e),v=e}return o[12]===s?t=o[13]:(t=s1(s),o[12]=s,o[13]=t),o[14]===y?n=o[15]:(n=s1(y),o[14]=y,o[15]=n),o[16]===v?r=o[17]:(r=(0,sL.jsx)("span",{children:v}),o[16]=v,o[17]=r),o[18]!==m||o[19]!==g||o[20]!==l||o[21]!==u||o[22]!==t||o[23]!==n||o[24]!==r||o[25]!==p?(i=(0,sL.jsx)(u8,{"data-ui":"Text",...u,$accent:m,$align:t,$muted:g,ref:l,$size:n,$weight:p,children:r}),o[18]=m,o[19]=g,o[20]=l,o[21]=u,o[22]=t,o[23]=n,o[24]=r,o[25]=p,o[26]=i):i=o[26],i},u9={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"},gridTemplateColumns:"minmax(0, 1fr)",gridAutoRows:"min-content"},ce=l8(uv).withConfig({displayName:"StyledStack",componentId:"sc-z8vnhh-0"})(function(){return u9},function(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$space,e=>({gridGap:sQ(n[e])}))}),ct=function(e){let t,n=(0,tt.c)(13),r,i,o,s;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4]):({as:r,gap:i,ref:o,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s);let a="string"==typeof r?r:void 0,l;return n[5]===i?l=n[6]:(l=s1(i),n[5]=i,n[6]=l),n[7]!==r||n[8]!==o||n[9]!==s||n[10]!==a||n[11]!==l?(t=(0,sL.jsx)(ce,{"data-as":a,"data-ui":"Stack",...s,$space:l,forwardedAs:r,ref:o}),n[7]=r,n[8]=o,n[9]=s,n[10]=a,n[11]=l,n[12]=t):t=n[12],t},cn=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"spinner",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9
7183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})});function cr(e){let t,n=(0,tt.c)(3),r;return n[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,sL.jsx)(cn,{className:"_1b6o2se1"}),n[0]=r):r=n[0],n[1]===e?t=n[2]:(t=(0,sL.jsx)(u7,{"data-ui":"Spinner",...e,children:r}),n[1]=e,n[2]=t),t}function ci(...e){return e.filter(Boolean).join(",")}let co=l8.button.withConfig({displayName:"StyledButton",componentId:"sc-d920a4-0"})(ub,function(e){let{$width:t}=e,{style:n}=sK(e.theme);return l6`${n?.button};-webkit-font-smoothing:inherit;appearance:none;display:inline-flex;align-items:center;font:inherit;border:0;outline:none;user-select:none;text-decoration:none;border:0;box-sizing:border-box;padding:0;margin:0;white-space:nowrap;text-align:left;position:relative;vertical-align:top;${"fill"===t&&l6`width:-moz-available;width:-webkit-fill-available;width:stretch;`} & > span{display:block;flex:1;min-width:0;border-radius:inherit;}&::-moz-focus-inner{border:0;padding:0;}`},function(e){let{$mode:t}=e,{button:n,color:r,style:i}=sK(e.theme);e.$mode;let o=r.button[t]||r.button.default,s=o[e.$tone]||o.default,a={width:n.border.width,color:"var(--card-border-color)"};return[uw(r,s.enabled),{backgroundColor:"var(--card-bg-color)",color:"var(--card-fg-color)",boxShadow:uk(a),'&:disabled, &[data-disabled="true"]':uw(r,s.disabled),"&:not([data-disabled='true'])":{boxShadow:ci(uk(a),void 0),"&:focus":{boxShadow:uS({base:r,border:{width:2,color:r.bg},focusRing:n.focusRing})},"&:focus:not(:focus-visible)":{boxShadow:ci(uk(a),void 0)},"@media (hover: hover)":{"&:hover":uw(r,s.hovered),"&:active":uw(r,s.pressed),"&[data-hovered]":uw(r,s.hovered)},"&[data-selected]":uw(r,s.pressed)}}
7,i?.button?.root].filter(Boolean)}),cs=function(e){let t,n,r,i=(0,tt.c)(87),o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C,M,$,A,T;i[0]===e?(o=i[1],s=i[2],a=i[3],l=i[4],u=i[5],c=i[6],d=i[7],h=i[8],f=i[9],p=i[10],m=i[11],g=i[12],y=i[13],v=i[14],b=i[15],x=i[16],w=i[17],k=i[18],S=i[19],E=i[20],_=i[21],j=i[22],C=i[23],M=i[24],$=i[25],A=i[26],T=i[27]):({children:a,disabled:l,ref:g,fontSize:b,icon:o,iconRight:s,justify:x,loading:u,mode:w,padding:k,paddingX:p,paddingY:m,paddingTop:f,paddingBottom:c,paddingLeft:d,paddingRight:h,radius:S,selected:v,gap:E,text:M,textAlign:$,textWeight:A,tone:_,type:j,muted:C,width:T,...y}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=a,i[4]=l,i[5]=u,i[6]=c,i[7]=d,i[8]=h,i[9]=f,i[10]=p,i[11]=m,i[12]=g,i[13]=y,i[14]=v,i[15]=b,i[16]=x,i[17]=w,i[18]=k,i[19]=S,i[20]=E,i[21]=_,i[22]=j,i[23]=C,i[24]=M,i[25]=$,i[26]=A,i[27]=T);let P=void 0===b?1:b,I=void 0===x?"center":x,R=void 0===w?"default":w,O=void 0===k?3:k,L=void 0===S?2:S,V=void 0===E?3:E,D=void 0===_?"default":_,N=void 0===j?"button":j,z=void 0!==C&&C,{button:B}=ux(),F;i[28]===I?F=i[29]:(F=s1(I),i[28]=I,i[29]=F);let H=F,U;i[30]===O?U=i[31]:(U=s1(O),i[30]=O,i[31]=U);let W=U,q;i[32]===p?q=i[33]:(q=s1(p),i[32]=p,i[33]=q);let G=q,Y;i[34]===m?Y=i[35]:(Y=s1(m),i[34]=m,i[35]=Y);let K=Y,Z;i[36]===f?Z=i[37]:(Z=s1(f),i[36]=f,i[37]=Z);let X=Z,J;i[38]===c?J=i[39]:(J=s1(c),i[38]=c,i[39]=J);let Q=J,ee;i[40]===d?ee=i[41]:(ee=s1(d),i[40]=d,i[41]=ee);let et=ee,en;i[42]===h?en=i[43]:(en=s1(h),i[42]=h,i[43]=en);let er=en,ei;i[44]===L?ei=i[45]:(ei=s1(L),i[44]=L,i[45]=ei);let eo=ei,es;i[46]===V?es=i[47]:(es=s1(V),i[46]=V,i[47]=es);let ea=es,el;i[48]!==W||i[49]!==Q||i[50]!==et||i[51]!==er||i[52]!==X||i[53]!==G||i[54]!==K?(el={padding:W,paddingX:G,paddingY:K,paddingTop:X,paddingBottom:Q,paddingLeft:et,paddingRight:er},i[48]=W,i[49]=Q,i[50]=et,i[51]=er,i[52]=X,i[53]=G,i[54]=K,i[55]=el):el=i[55];let eu=el,ec=!!(u||l),ed=v?"":void 0,eh=!!(u||l),ef;return i[56]===u?ef=i[57]:(ef=!!u&&(0,sL.jsx)("div",{className:"_2mi48t0","data-ui":"ButtonLoading",children:(0,sL.jsx)(cr,{})}),i[56]=u,i[57]=ef),i[58]!==o||i[59]!==s||i[60]!==eu||i[61]!==B||i[62]!==P||i[63]!==H||i[64]!==z||i[65]!==ea||i[66]!==M||i[67]!==$||i[68]!==A?(t=(o||M||s)&&(0,sL.jsx)(uv,{as:"span",...eu,children:(0,sL.jsxs)(u5,{as:"span",justify:H,gap:ea,children:[o&&(0,sL.jsxs)(u7,{size:P,children:[(0,r_.isValidElement)(o)&&o,(0,l7.isValidElementType)(o)&&(0,sL.jsx)(o,{})]}),M&&(0,sL.jsx)(uv,{children:(0,sL.jsx)(u7,{muted:z,align:$,size:P,textOverflow:"ellipsis",weight:A??B.textWeight,children:M})}),s&&(0,sL.jsxs)(u7,{size:P,children:[(0,r_.isValidElement)(s)&&s,(0,l7.isValidElementType)(s)&&(0,sL.jsx)(s,{})]})]})}),i[58]=o,i[59]=s,i[60]=eu,i[61]=B,i[62]=P,i[63]=H,i[64]=z,i[65]=ea,i[66]=M,i[67]=$,i[68]=A,i[69]=t):t=i[69],i[70]!==eu||i[71]!==a?(n=a&&(0,sL.jsx)(uv,{as:"span",...eu,children:a}),i[70]=eu,i[71]=a,i[72]=n):n=i[72],i[73]!==R||i[74]!==eo||i[75]!==g||i[76]!==y||i[77]!==ec||i[78]!==ed||i[79]!==eh||i[80]!==ef||i[81]!==t||i[82]!==n||i[83]!==D||i[84]!==N||i[85]!==T?(r=(0,sL.jsxs)(co,{"data-ui":"Button",...y,$mode:R,$radius:eo,$tone:D,"data-disabled":ec,"data-selected":ed,disabled:eh,ref:g,type:N,$width:T,children:[ef,t,n]}),i[73]=R,i[74]=eo,i[75]=g,i[76]=y,i[77]=ec,i[78]=ed,i[79]=eh,i[80]=ef,i[81]=t,i[82]=n,i[83]=D,i[84]=N,i[85]=T,i[86]=r):r=i[86],r},ca={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},cl={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},cu={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"};function cc(e){let{media:t}=sK(e.theme);return s0(t,e.$autoFlow,e=>({gridAutoFlow:e}))}function cd(e){let{media:t}=sK(e.theme);return s0(t,e.$autoRows,e=>({gridAutoRows:e&&cu[e]}))}function ch(e){let{media:t}=sK(e.theme);return s0(t,e.$autoCols,e=>({gridAutoColumns:e&&cl[e]}))}function cf(e){let{media:t}=sK(e.theme);return s0(t,e.$columns,e=>({gridTemplateColumns:e&&`repeat(${e},minmax(0,1fr));`}))}function cp(e){let{media:t}=sK(e.theme);return s0(t,e.$rows,e=>({gridTemplateRows:e&&`repeat(${e},minmax(0,1fr));`}))}function cm(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$gap,e=>({gridGap:e?sQ(n[e]):void 0}))}
7function cg(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$gapX,e=>({columnGap:e?sQ(n[e]):void 0}))}function cy(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$gapY,e=>({rowGap:e?sQ(n[e]):void 0}))}let cv=l8(uv).withConfig({displayName:"StyledGrid",componentId:"sc-uknjwi-0"})(function(){return[ca,cc,cd,ch,cf,cp,cm,cg,cy]}),cb=function(e){let t,n,r,i,o,s,a,l,u=(0,tt.c)(43),c,d,h,f,p,m,g,y,v,b,x,w;u[0]===e?(c=u[1],d=u[2],h=u[3],f=u[4],p=u[5],m=u[6],g=u[7],y=u[8],v=u[9],b=u[10],x=u[11],w=u[12]):({as:c,autoRows:f,autoCols:d,autoFlow:h,gridTemplateColumns:v,gap:m,gapX:g,gapY:y,gridTemplateRows:b,children:p,ref:x,...w}=e,u[0]=e,u[1]=c,u[2]=d,u[3]=h,u[4]=f,u[5]=p,u[6]=m,u[7]=g,u[8]=y,u[9]=v,u[10]=b,u[11]=x,u[12]=w);let k="string"==typeof c?c:void 0,S;return u[13]===f?S=u[14]:(S=s1(f),u[13]=f,u[14]=S),u[15]===d?t=u[16]:(t=s1(d),u[15]=d,u[16]=t),u[17]===h?n=u[18]:(n=s1(h),u[17]=h,u[18]=n),u[19]===v?r=u[20]:(r=s1(v),u[19]=v,u[20]=r),u[21]===m?i=u[22]:(i=s1(m),u[21]=m,u[22]=i),u[23]===g?o=u[24]:(o=s1(g),u[23]=g,u[24]=o),u[25]===y?s=u[26]:(s=s1(y),u[25]=y,u[26]=s),u[27]===b?a=u[28]:(a=s1(b),u[27]=b,u[28]=a),u[29]!==c||u[30]!==p||u[31]!==x||u[32]!==w||u[33]!==k||u[34]!==S||u[35]!==t||u[36]!==n||u[37]!==r||u[38]!==i||u[39]!==o||u[40]!==s||u[41]!==a?(l=(0,sL.jsx)(cv,{"data-as":k,"data-ui":"Grid",...w,$autoRows:S,$autoCols:t,$autoFlow:n,$columns:r,$gap:i,$gapX:o,$gapY:s,$rows:a,forwardedAs:c,ref:x,children:p}),u[29]=c,u[30]=p,u[31]=x,u[32]=w,u[33]=k,u[34]=S,u[35]=t,u[36]=n,u[37]=r,u[38]=i,u[39]=o,u[40]=s,u[41]=a,u[42]=l):l=u[42],l};function cx(){for(var e,t=0,n="",r=arguments.length;t<r;t++)(e=arguments[t])&&"string"==typeof e&&(n+=(n&&" ")+e);return n}var cw=e.i(488171);let ck=uT("@sanity/ui/context/boundaryElement",null),cS={version:0,element:null};function cE(){let e=(0,r_.useContext)(ck);if(e&&(!uH(e)||0!==e.version))throw Error("useBoundaryElement(): the context value is not compatible");return e||cS}let c_="@sanity/ui/context/portal",cj=Symbol.for(`${c_}/element`);uA[cj]=null;let cC=uT(c_,{version:0,boundaryElement:null,get element(){return typeof document>"u"?null:(uA[cj]||(uA[cj]=document.createElement("div"),uA[cj].setAttribute("data-portal",""),document.body.appendChild(uA[cj])),uA[cj])}});function cM(){let e=(0,r_.useContext)(cC);if(!e)throw Error("usePortal(): missing context value");if(!uH(e)||0!==e.version)throw Error("usePortal(): the context value is not compatible");return e}function c$(e){let t,n=(0,tt.c)(3),{children:r,__unstable_name:i}=e,o=cM(),s=(i?o.elements&&o.elements[i]:o.element)||o.elements?.default;return s?(n[0]!==r||n[1]!==s?(t=(0,cw.createPortal)(r,s),n[0]=r,n[1]=s,n[2]=t):t=n[2],t):null}function cA(e,t,n){let r=t.x-e.x,i=t.y-e.y;return cT(e,t,Math.min(1,n/Math.sqrt(r*r+i*i)))}function cT(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function cP(e){let t,n,r,i,o,s=(0,tt.c)(44),a,l,u,c,d,h,f;s[0]===e?(a=s[1],l=s[2],u=s[3],c=s[4],d=s[5],h=s[6],f=s[7]):({className:a,width:f,height:l,radius:h,ref:u,style:d,...c}=e,s[0]=e,s[1]=a,s[2]=l,s[3]=u,s[4]=c,s[5]=d,s[6]=h,s[7]=f);let p=void 0===h?0:h,{card:m}=ux(),g=`stroke-mask-${(0,r_.useId)()}`,y=m.shadow.outline,v=f/2,b;s[8]!==v||s[9]!==l||s[10]!==p||s[11]!==f?(b=(function(e){let t=e.length,n=[];for(let r=0;r<t;r+=1){let t=e[r],i=e[r-1],o=e[r+1];if(i&&t.radius){let e=cA(t,i,t.radius),r=cA(t,o,t.radius),s=cT(e,t,.5),a=cT(t,r,.5);n.push({type:"point",...e}),n.push({type:"curve",curveEnd:r,startControl:s,endControl:a})}else n.push({type:"point",...t})}return n})([{x:0,y:0},{x:p,y:0,radius:p},{x:v,y:l-1,radius:p},{x:f-p,y:0,radius:p},{x:f,y:0}]).map((e,t)=>"point"===e.type?`${0===t?"M":"L"} ${e.x} ${e.y}`:"curve"===e.type?`C ${e.startControl.x} ${e.startControl.y} ${e.endControl.x} ${e.endControl.y} ${e.curveEnd.x} ${e.curveEnd.y}`:"").join(" "),s[8]=v,s[9]=l,s[10]=p,s[11]=f,s[12]=b):b=s[12];let x=b,w=`${x}`,k=`${x} M ${f} -1 M 0 -1 Z`,S;s[13]===a?S=s[14]:(S=cx("_62mlcb1",a),s[13]=a,s[14]=S);let E=`${f}px`,_;s[15]===E?_=s[16]:(_=function(e){var t={};for(var n in e){var r=e[n];null!=r&&(t[function(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}(n)]=r)}return Object.defineProperty(t,"toString",{value:function(){return Object.keys(this).map(e=>"".concat(e,":").concat(this[e])).join(";")},writable:!1}),t}({"var(--_62mlcb0)":E}),s[15]=E,s[16]=_),s[17]!==d||s[18]!==_?(t={...d,..._},s[17]=d,s[18]=_,s[19]=t):t=s[19];let j=`0 0 ${f} ${f}`,C;s[20]!==y||s[21]!==f?(C=(0,sL.jsx)("rect",{x:0,y:y,width:f,height:f,fill:"white"}),s[20]=y,s[21]=f,s[22]=C):C=s[22],s[23]!==g||s[24]!==C?(n=(0,sL.jsx)("mask",{id:g,children:C}),s[23]=g,s[24]=C,s[25]=n):n=s[25];let M=`url(#${g})`,$=2*y,A;return s[26]!==w||s[27]!==$||s[28]!==M?(A=(0,sL.jsx)("path",{className:"_62mlcb2",d:w,mask:M,strokeWidth:$}),s[26]=w,s[27]=$,s[28]=M,s[29]=A):A=s[29],s[30]===k?r=s[31]:(r=(0,sL.jsx)("path",{className:"_62mlcb3",d:k}),s[30]=k,s[31]=r),s[32]!==A||s[33]!==r||s[34]!==j||s[35]!==n||s[36]!==f?(i=(0,sL.jsxs)("svg",{width:f,height:f,viewBox:j,children:[n,A,r]}),s[32]=A,s[33]=r,s[34]=j,s[35]=n,s[36]=f,s[37]=i):i=s[37],s[38]!==u||s[39]!==c||s[40]!==i||s[41]!==S||s[42]!==t?(o=(0,sL.jsx)("div",{"data-ui":"Arrow",...c,className:S,ref:u,style:t,children:i}),s[38]=u,s[39]=c,s[40]=i,s[41]=S,s[42]=t,s[43]=o):o=s[43],o}function cI(e){return e instanceof Node&&e.nodeType===Node.ELEMENT_NODE}function cR(e){return cI(e)&&"A"===e.nodeName}let cO=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"close",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M18 7L7 18M7 7L18 18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})});function cL(e){let{$fontSize:t,$iconLeft:n,$iconRight:r,$padding:i,$space:o}=e,{font:s,media:a,space:l}=sK(e.theme),u=Math.max(i.length,o.length,t.length),c=[],d=[],h=[];for(let e=0;e<u;e+=1)h[e]=void 0===t[e]?h[e-1]:t[e],c[e]=void 0===i[e]?c[e-1]:i[e],d[e]=void 0===o[e]?d[e-1]:o[e];return s0(a,c,(e,t)=>{let i=s.text.sizes[h[t]]||s.text.sizes[2],o=i.lineHeight-i.ascenderHeight-i.descenderHeight,a=l[c[t]],u=l[d[t]],f={paddingTop:sQ(a-i.ascenderHeight),paddingRight:sQ(a),paddingBottom:sQ(a-i.descenderHeight),paddingLeft:sQ(a)};return r&&(f.paddingRight=sQ(a+o+u)),n&&(f.paddingLeft=sQ(a+o+u)),f})}let cV={zIndex:2},cD=l8(uV).attrs({forwardedAs:"span"}).withConfig({displayName:"Prefix",componentId:"sc-k29dck-0"})`border-top-right-radius:0;border-bottom-right-radius:0;& >
7 span{display:block;margin:-1px;}`,cN=l8(uV).attrs({forwardedAs:"span"}).withConfig({displayName:"Suffix",componentId:"sc-k29dck-1"})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`,cz=l8.input.withConfig({displayName:"Input",componentId:"sc-k29dck-2"})(cL,function(e){let{$scheme:t,$tone:n,$weight:r}=e,{color:i,font:o}=sK(e.theme);return l6`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${o.text.family};font-weight:${r&&o.text.weights[r]||o.text.weights.regular};margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}&[data-scheme='${t}'][data-tone='${n}']{--input-fg-color:${i.input.default.enabled.fg};--input-placeholder-color:${i.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${i.input.default.enabled.fg};--input-placeholder-color:${i.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${i.input.default.disabled.fg};--input-placeholder-color:${i.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${i.input.invalid.enabled.fg};--input-placeholder-color:${i.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${i.input.default.readOnly.fg};--input-placeholder-color:${i.input.default.readOnly.placeholder};}}`},function(e){let{font:t,media:n}=sK(e.theme);return s0(n,e.$fontSize,e=>{let n=t.text.sizes[e]||t.text.sizes[2];return{fontSize:sQ(n.fontSize),lineHeight:`${n.lineHeight/n.fontSize}`}})}),cB=l8.span.withConfig({displayName:"Presentation",componentId:"sc-k29dck-3"})(ub,function(e){let{$hasPrefix:t,$hasSuffix:n,$scheme:r,$tone:i,$unstableDisableFocusRing:o}=e,{color:s,input:a}=sK(e.theme);return l6`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${t?0:void 0};border-bottom-left-radius:${t?0:void 0};border-top-right-radius:${n?0:void 0};border-bottom-right-radius:${n?0:void 0};&[data-scheme='${r}'][data-tone='${i}']{--card-bg-color:${s.input.default.enabled.bg};--card-fg-color:${s.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${uk({color:s.input.default.enabled.border,width:a.border.width})};}*:not(:disabled):invalid + &{--card-bg-color:${s.input.invalid.enabled.bg};--card-fg-color:${s.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${uk({color:s.input.invalid.enabled.border,width:a.border.width})};}}*:not(:disabled):focus + &{&[data-border]{--input-box-shadow:${o?void 0:uS({border:{color:s.input.default.enabled.border,width:a.border.width},focusRing:a.text.focusRing})};}&:not([data-border]){--input-box-shadow:${o?void 0:uS({focusRing:a.text.focusRing})};}}*:not(:invalid):disabled + &{--card-bg-color:${s.input.default.disabled.bg} !important;--card-fg-color:${s.input.default.disabled.fg} !important;--card-icon-color:${s.input.default.disabled.fg} !important;&[data-border]{--input-box-shadow:${uk({color:s.input.default.disabled.border,width:a.border.width})};}}*:invalid:disabled + &{--card-bg-color:${s.input.invalid.disabled.bg} !important;--card-fg-color:${s.input.invalid.disabled.fg} !important;--card-icon-color:${s.input.invalid.disabled.fg} !important;&[data-border]{--input-box-shadow:${uk({color:s.input.invalid.disabled.border,width:a.border.width})};}}*:not(:invalid):read-only + &{--card-bg-color:${s.input.default.readOnly.bg} !important;--card-fg-color:${s.input.default.readOnly.fg} !important;}*:invalid:read-only + &{--card-bg-color:${s.input.invalid.readOnly.bg} !important;--card-fg-color:${s.input.invalid.readOnly.fg} !important;}@media (hover:hover){*:not(:disabled):not(:read-only):not(:invalid):hover + &{--card-bg-color:${s.input.default.hovered.bg};--card-fg-color:${s.input.default.hovered.fg};}*:invalid:not(:disabled):not(:read-only):hover + &{--card-bg-color:${s.input.invalid.hovered.bg};--card-fg-color:${s.input.invalid.hovered.fg};}
7*:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border]{--input-box-shadow:${uk({color:s.input.default.hovered.border,width:a.border.width})};}*:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border]{--input-box-shadow:${uk({color:s.input.invalid.hovered.border,width:a.border.width})};}}}`}),cF=l8(uV).withConfig({displayName:"RightCard",componentId:"sc-k29dck-4"})`background-color:transparent;position:absolute;top:0;right:0;`;function cH(e){var t;let n,r,i,o,s,a,l,u,c=(0,tt.c)(93),d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C,M,$;c[0]===e?(d=c[1],h=c[2],f=c[3],p=c[4],m=c[5],g=c[6],y=c[7],v=c[8],b=c[9],x=c[10],w=c[11],k=c[12],S=c[13],E=c[14],_=c[15],j=c[16],C=c[17],M=c[18],$=c[19]):({__unstable_disableFocusRing:f,border:k,clearButton:p,disabled:S,fontSize:E,gap:_,icon:d,iconRight:h,onClear:y,padding:j,prefix:v,radius:C,readOnly:b,ref:g,suffix:w,customValidity:m,type:M,weight:$,...x}=e,c[0]=e,c[1]=d,c[2]=h,c[3]=f,c[4]=p,c[5]=m,c[6]=g,c[7]=y,c[8]=v,c[9]=b,c[10]=x,c[11]=w,c[12]=k,c[13]=S,c[14]=E,c[15]=_,c[16]=j,c[17]=C,c[18]=M,c[19]=$);let A=void 0===k||k,T=void 0!==S&&S,P=void 0===E?2:E,I=void 0===_?3:_,R=void 0===j?3:j,O=void 0===C?2:C,L=void 0===M?"text":M,V=(0,r_.useRef)(null),D=uR(),N;c[20]===P?N=c[21]:(N=s1(P),c[20]=P,c[21]=N);let z=N,B;c[22]===R?B=c[23]:(B=s1(R),c[22]=R,c[23]=B);let F=B,H;c[24]===O?H=c[25]:(H=s1(O),c[24]=O,c[25]=H);let U=H,W;c[26]===I?W=c[27]:(W=s1(I),c[26]=I,c[27]=W);let q=W,G=!!p,Y=!!d,K=!!h,Z=!!w,X=!!v,J;c[28]===Symbol.for("react.memo_cache_sentinel")?(J=()=>V.current,c[28]=J):J=c[28],(0,r_.useImperativeHandle)(g,J),t=m,(n=(0,tt.c)(4))[0]!==t||n[1]!==V?(r=()=>{V.current?.setCustomValidity(t||"")},i=[t,V],n[0]=t,n[1]=V,n[2]=r,n[3]=i):(r=n[2],i=n[3]),(0,r_.useEffect)(r,i),c[29]===y?o=c[30]:(o=e=>{e.preventDefault(),e.stopPropagation(),y&&y(),V.current?.focus()},c[29]=y,c[30]=o);let Q=o,ee;c[31]!==v||c[32]!==U?(ee=v&&(0,sL.jsx)(cD,{borderTop:!0,borderLeft:!0,borderBottom:!0,radius:U,sizing:"border",tone:"inherit",children:(0,sL.jsx)("span",{children:v})}),c[31]=v,c[32]=U,c[33]=ee):ee=c[33];let et=ee,en=A?"":void 0,er;c[34]!==d||c[35]!==z||c[36]!==F?(er=d&&(0,sL.jsx)(uv,{className:"_8fnjkq0",padding:F,children:(0,sL.jsxs)(u7,{size:z,children:[(0,r_.isValidElement)(d)&&d,(0,l7.isValidElementType)(d)&&(0,sL.jsx)(d,{})]})}),c[34]=d,c[35]=z,c[36]=F,c[37]=er):er=c[37],c[38]!==G||c[39]!==h||c[40]!==z||c[41]!==F?(s=!G&&h&&(0,sL.jsx)(uv,{className:"_8fnjkq1",padding:F,children:(0,sL.jsxs)(u7,{size:z,children:[(0,r_.isValidElement)(h)&&h,(0,l7.isValidElementType)(h)&&(0,sL.jsx)(h,{})]})}),c[38]=G,c[39]=h,c[40]=z,c[41]=F,c[42]=s):s=c[42],c[43]!==X||c[44]!==Z||c[45]!==f||c[46]!==U||c[47]!==D.scheme||c[48]!==D.tone||c[49]!==en||c[50]!==er||c[51]!==s?(a=(0,sL.jsxs)(cB,{$hasPrefix:X,$unstableDisableFocusRing:f,$hasSuffix:Z,$radius:U,$scheme:D.scheme,$tone:D.tone,"data-border":en,"data-scheme":D.scheme,"data-tone":D.tone,children:[er,s]}),c[43]=X,c[44]=Z,c[45]=f,c[46]=U,c[47]=D.scheme,c[48]=D.tone,c[49]=en,c[50]=er,c[51]=s,c[52]=a):a=c[52];let ei=a,eo;c[53]===F?eo=c[54]:(eo=F.map(cW),c[53]=F,c[54]=eo);let es=eo,ea;c[55]===F?ea=c[56]:(ea=F.map(cU),c[55]=F,c[56]=ea);let el=ea,eu="object"==typeof p?p:sX,ec;c[57]!==p||c[58]!==es||c[59]!==el||c[60]!==eu||c[61]!==m||c[62]!==T||c[63]!==z||c[64]!==Q||c[65]!==U||c[66]!==b?(ec=!T&&!b&&p&&(0,sL.jsx)(cF,{forwardedAs:"span",padding:es,style:cV,tone:m?"critical":"inherit",children:(0,sL.jsx)(cs,{"aria-label":"Clear","data-qa":"clear-button",fontSize:z,icon:cO,mode:"bleed",padding:el,radius:U,...eu,className:cx("_8fnjkq2",eu.className),onClick:Q,onMouseDown:cq})}),c[57]=p,c[58]=es,c[59]=el,c[60]=eu,c[61]=m,c[62]=T,c[63]=z,c[64]=Q,c[65]=U,c[66]=b,c[67]=ec):ec=c[67];let ed=ec,eh;c[68]!==U||c[69]!==w?(eh=w&&(0,sL.jsx)(cN,{borderTop:!0,borderRight:!0,borderBottom:!0,radius:U,sizing:"border",tone:"inherit",children:(0,sL.jsx)("span",{children:w})}),c[68]=U,c[69]=w,c[70]=eh):eh=c[70];let ef=eh,ep=K||G,em;return c[71]!==Y||c[72]!==T||c[73]!==z||c[74]!==F||c[75]!==b||c[76]!==x||c[77]!==D.scheme||c[78]!==D.tone||c[79]!==q||c[80]!==ep||c[81]!==L||c[82]!==$?(em=(0,sL.jsx)(cz,{"data-as":"input","data-scheme":D.scheme,"data-tone":D.tone,...x,$fontSize:z,$iconLeft:Y,$iconRight:ep,$padding:F,$scheme:D.scheme,$space:q,$tone:D.tone,$weight:$,disabled:T,readOnly:b,ref:V,type:L}),c[71]=Y,c[72]=T,c[73]=z,c[74]=F,c[75]=b,c[76]=x,c[77]=D.scheme,c[78]=D.tone,c[79]=q,c[80]=ep,c[81]=L,c[82]=$,c[83]=em):em=c[83],c[84]!==ed||c[85]!==ei||c[86]!==em?(l=(0,sL.jsxs)("span",{className:"_1lyk8y2",children:[em,ei,ed]}),c[84]=ed,c[85]=ei,c[86]=em,c[87]=l):l=c[87],c[88]!==et||c[89]!==D.tone||c[90]!==ef||c[91]!==l?(u=(0,sL.jsxs)(uV,{as:"span",className:"_1lyk8y0","data-ui":"TextInput",display:"flex",tone:D.tone,children:[et,l,ef]}),c[88]=et,c[89]=D.tone,c[90]=ef,c[91]=l,c[92]=u):u=c[92],u}function cU(e){return 0===e||1===e?0:2===e?1:e-1}function cW(e){return 0===e?0:1===e||2===e?1:e-2}function cq(e){e.preventDefault(),e.stopPropagation()}let cG=(m=new WeakMap,g=new WeakMap,{subscribe(e,t){let n=g.get(e)||[],r=m.get(e);return g.has(e)||(g.set(e,n),r=({subscribe(e,t){let n=new ResizeObserver(([e])=>{t({_contentRect:e.contentRect,border:{width:e.borderBoxSize[0].inlineSize,height:e.borderBoxSize[0].blockSize},content:{width:e.contentRect.width,height:e.contentRect.height}})});return n.observe(e),()=>{n.unobserve(e),n.disconnect()}}}).subscribe(e,e=>{for(let t of n)t(e)})),n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1),0===n.length&&r&&r()}}}),cY=r_.default.createContext(!0);function cK(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}let cZ="use"in r_.default?()=>{try{return r_.default.use(cY)}catch{return!1}}:()=>!1;function cX(e){let t=r_.default.useRef(cK);r_.default.useInsertionEffect(()=>{t.current=e},[e]);let[n]=r_.default.useState(()=>(...e)=>(cZ()&&cK(),(0,t.current)(...e)));return n}function cJ(){return sZ}let cQ=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],c0=["50","100","200","300","400","500","600","700","800","900","950"],c1=["multiply","screen"],c2=["transparent","default","neutral","primary","suggest","positive","caution","critical"],c5=["default","neutral","primary","suggest","positive","caution","critical"],c3=["enabled","hovered","pressed","selected","disabled"],c4=["default","ghost","bleed"],c6=["default","invali
7d"],c8=["enabled","hovered","readOnly","disabled"];function c7(e){return c0.includes(e)}function c9(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}function de(e){return/^\d+%$/.test(e)}function dt(e){let t=e.split("/"),n=t.shift()||"",[r,i]=n.split(" ");if(c7(r)){let e=t.shift()||"";return de(i)?{type:"color",tint:r,mix:Number(i.slice(0,-1))/100}:c9(e)?{type:"color",tint:r,opacity:Number(e)}:{type:"color",tint:r}}if("black"===r||"white"===r){let e=t.shift()||"";return de(i)?{type:"color",key:r,mix:Number(i.slice(0,-1))/100}:c9(e)?{type:"color",key:r,opacity:Number(e)}:{type:"color",key:r}}if(cQ.includes(r)){let[e,i]=(n=t.shift()||"").split(" ");if(c7(e)){let n=t.shift()||"";return de(i)?{type:"color",hue:r,tint:e,mix:Number(i.slice(0,-1))/100}:c9(n)?{type:"color",hue:r,tint:e,opacity:Number(n)}:{type:"color",hue:r,tint:e}}return{type:"hue",value:r}}if(c1.includes(r))return{type:"blendMode",value:r}}[...cQ],[...c2],[...c5],[...c3],[...c6],[...c8];let dn=["500","500"];function dr(e,t=dn){var n;let r,{hue:i,scheme:o}=e,s=dt(t[+("light"!==o)]);if(!s||"color"!==s.type)throw Error(`Invalid color token: ${t[0]}`);return n={...s,hue:s.hue||i},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0===n.mix?(void 0!==n.opacity&&(r+=`/${n.opacity}`),r):`${r} ${100*n.mix}%`}let di={base:{"*":{_blend:["multiply","screen"],accent:{fg:["purple/600","purple/400"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},backdrop:["gray/200/0.5","black/0.5"],badge:{"*":{bg:["100","900"],fg:["600","400"],icon:["500","500"],dot:["500","500"]},positive:{bg:["200 50%","900"],fg:["600","500"]},caution:{bg:["200 50%","900"],fg:["600","500"]}},bg:["50","950"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["800","200"],focusRing:["blue/500","blue/500"],icon:["600","400"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/600","blue/300"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},shadow:{outline:["500/0.3","500/0.4"],umbra:["gray/500/0.1","black/0.2"],penumbra:["gray/500/0.07","black/0.14"],ambient:["gray/500/0.06","black/0.12"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},transparent:{bg:["50","black"]},default:{bg:["white","950"],fg:["800","200"],muted:{fg:["600","400"]}},primary:{_hue:"blue"},suggest:{_hue:"purple"},positive:{_hue:"green",shadow:{outline:["500/0.4","500/0.4"]}},caution:{_hue:"yellow",shadow:{outline:["600/0.3","500/0.4"]}},critical:{_hue:"red"}},button:{default:{"*":{"*":{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500/0","400/0"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["950","50"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},hovered:{bg:["600","300"],border:["700/0","300/0"]},pressed:{bg:["700","300"]},selected:{bg:["700","300"]},disabled:{_hue:"gray",accent:{fg:["100 70%","900 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/500","gray/400"],fg:["white","black"]}},badge:{"*":{bg:["gray/700","gray/300"],fg:["white","black"],dot:["white","black"],icon:["white","black"]}},bg:["300","600"],code:{bg:["950","50"],fg:["300","600"]},fg:["300","600"],muted:{bg:["950","50"],fg:["300","600"]},kbd:{bg:["black","white"],fg:["white","black"],border:["700","300"]},link:{fg:["100 70%","900 70%"]}}},default:{"*":{avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},bg:["800","200"],muted:{bg:["950","50"],fg:["400","600"]}},hovered:{bg:["900","100"]},pressed:{bg:["black","white"]},selected:{bg:["black","white"]}}},ghost:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 60%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["50","950"],border:["100","900"],code:{bg:["500 10%","400 10%"],fg:["700 60%","400 60%"]},fg:["600","400"],icon:["700 60%","300 60%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 60%","blue/300 60%"]},muted:{bg:["100","950"],fg:["700 60%","300 60%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["100","900"],fg:["700","300"]},pressed:{bg:["200","800"],fg:["800","200"]},selected:{bg:["200","800"],fg:["800","200"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}}
7,badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["300","700"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}},positive:{"*":{border:["600 20%","800"]}},caution:{"*":{border:["600 20%","800"]}}},bleed:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["white/0","black/0"],code:{bg:["50","950"],fg:["700 75%","300 75%"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["700","300"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["100","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","900"],fg:["800","200"],icon:["800 70%","300 70%"]},pressed:{bg:["100","800"],fg:["800","200"],icon:["800 70%","200 70%"]},selected:{bg:["100","900"],fg:["800","200"],icon:["800 60%","200 60%"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["400","600"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}}}},input:{"*":{"*":{_blend:["multiply","screen"],bg:["white","black"],border:["200","700"],fg:["black","200"],muted:{bg:["50","950"]},placeholder:["400","600"]},hovered:{border:["300","700"]},readOnly:{bg:["50","950"],border:["200","800"],fg:["800","200"]},disabled:{bg:["50","950"],fg:["400","600"],border:["100","900"],placeholder:["200","800 50%"]}},invalid:{"*":{_hue:"red",bg:["100","950"]}}},selectable:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","950"]},pressed:{bg:["100","900"]},selected:{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["multiply","screen"],bg:["white","black"],fg:["black","white"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500 20%","400 20%"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["500 10%","400 10%"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["200","800"],icon:["200","800"],kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]},muted:{bg:["50 50%","950 50%"],fg:["200","800"]}}},default:{selected:{_hue:"blue"}},critical:{disabled:{bg:["50 50%","950 50%"]}}},syntax:{atrule:["purple/600","purple/400"],attrName:["green/600","green/400"],attrValue:["yellow/600","yellow/400"],attribute:["yellow/600","yellow/400"],boolean:["purple/600","purple/400"],builtin:["purple/600","purple/400"],c
7data:["yellow/600","yellow/400"],char:["yellow/600","yellow/400"],class:["orange/600","orange/400"],className:["cyan/600","cyan/400"],comment:["gray/400","gray/600"],constant:["purple/600","purple/400"],deleted:["red/600","red/400"],entity:["red/600","red/400"],function:["green/600","green/400"],hexcode:["blue/600","blue/400"],id:["purple/600","purple/400"],important:["purple/600","purple/400"],inserted:["yellow/600","yellow/400"],keyword:["magenta/600","magenta/400"],number:["purple/600","purple/400"],operator:["magenta/600","magenta/400"],property:["blue/600","blue/400"],pseudoClass:["yellow/600","yellow/400"],pseudoElement:["yellow/600","yellow/400"],punctuation:["gray/600","gray/400"],regex:["blue/600","blue/400"],selector:["red/600","red/400"],string:["yellow/600","yellow/400"],symbol:["purple/600","purple/400"],tag:["red/600","red/400"],unit:["orange/600","orange/400"],url:["red/600","red/400"],variable:["red/600","red/400"]}};function ds(e){return!(!e||"object"!=typeof e||Array.isArray(e))}function da(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(dl,{})}function dl(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];e[n]=ds(r)&&ds(i)?da(r,i):i}return e}function du(e,t){let{scheme:n}=e,r={};for(let e of c2)s5(r,e,()=>(function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])[+("light"!==n)],_dark:"dark"===n,accent:{fg:dr(o,i?.accent?.fg)},avatar:dc({scheme:n},i),backdrop:dr(o,i?.backdrop),badge:dh(i?.badge,{scheme:n},t),bg:dr(o,i?.bg),border:dr(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of c4)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of c5)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,s={};for(let e of c3)s[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:s}=e,a=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[s],u=l?._hue||a?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c[+("light"!==o)],accent:{fg:dr(d,l?.accent?.fg)},avatar:dc({scheme:o},l),badge:dh(l?.badge,{scheme:o},t),bg:dr(d,l?.bg),border:dr(d,l?.border),code:{bg:dr(d,l?.code?.bg),fg:dr(d,l?.code?.fg)},fg:dr(d,l?.fg),icon:dr(d,l?.icon),muted:{bg:dr(d,l?.muted?.bg),fg:dr(d,l?.muted?.fg)},kbd:{bg:dr(d,l?.kbd?.bg),fg:dr(d,l?.kbd?.fg),border:dr(d,l?.kbd?.border)},link:{fg:dr(d,l?.link?.fg)},skeleton:{from:dr(d,l?.skeleton?.from),to:dr(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return s}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:dr(o,i?.code?.bg),fg:dr(o,i?.code?.fg)}
7,fg:dr(o,i?.fg),focusRing:dr(o,i?.focusRing),icon:dr(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:df({mode:"default",scheme:n,tone:r},t),invalid:df({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:dr(o,i?.kbd?.bg),fg:dr(o,i?.kbd?.fg),border:dr(o,i?.kbd?.border)},link:{fg:dr(o,i?.link?.fg)},muted:{bg:dr(o,i?.muted?.bg),fg:dr(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of c5)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of c3)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,s=t?.color?.base?.[n],a=t?.color?.selectable?.[o]?.[i],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u[+("light"!==r)],accent:{fg:dr(c,a?.accent?.fg)},avatar:dc({scheme:r},a),badge:dh(a?.badge,{scheme:r},t),bg:dr(c,a?.bg),border:dr(c,a?.border),code:{bg:dr(c,a?.code?.bg),fg:dr(c,a?.code?.fg)},fg:dr(c,a?.fg),icon:dr(c,a?.icon),muted:{bg:dr(c,a?.muted?.bg),fg:dr(c,a?.muted?.fg)},kbd:{bg:dr(c,a?.kbd?.bg),fg:dr(c,a?.kbd?.fg),border:dr(c,a?.kbd?.border)},link:{fg:dr(c,a?.link?.fg)},skeleton:{from:dr(c,a?.skeleton?.from),to:dr(c,a?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:dr(o,i?.shadow?.outline),umbra:dr(o,i?.shadow?.umbra),penumbra:dr(o,i?.shadow?.penumbra),ambient:dr(o,i?.shadow?.ambient)}}({scheme:n,tone:r},t),skeleton:{from:dr(o,i?.skeleton?.from),to:dr(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:dr(i,r?.atrule),attrName:dr(i,r?.attrName),attrValue:dr(i,r?.attrValue),attribute:dr(i,r?.attribute),boolean:dr(i,r?.boolean),builtin:dr(i,r?.builtin),cdata:dr(i,r?.cdata),char:dr(i,r?.char),class:dr(i,r?.class),className:dr(i,r?.className),comment:dr(i,r?.comment),constant:dr(i,r?.constant),deleted:dr(i,r?.deleted),doctype:dr(i,r?.doctype),entity:dr(i,r?.entity),function:dr(i,r?.function),hexcode:dr(i,r?.hexcode),id:dr(i,r?.id),important:dr(i,r?.important),inserted:dr(i,r?.inserted),keyword:dr(i,r?.keyword),number:dr(i,r?.number),operator:dr(i,r?.operator),prolog:dr(i,r?.prolog),property:dr(i,r?.property),pseudoClass:dr(i,r?.pseudoClass),pseudoElement:dr(i,r?.pseudoElement),punctuation:dr(i,r?.punctuation),regex:dr(i,r?.regex),selector:dr(i,r?.selector),string:dr(i,r?.string),symbol:dr(i,r?.symbol),tag:dr(i,r?.tag),unit:dr(i,r?.unit),url:dr(i,r?.url),variable:dr(i,r?.variable)}}({scheme:n},t)}})({scheme:n,tone:e},t));return r}function dc(e,t){let{scheme:n}=e;return{gray:dd({color:"gray",scheme:n},t),blue:dd({color:"blue",scheme:n},t),purple:dd({color:"purple",scheme:n},t),magenta:dd({color:"magenta",scheme:n},t),red:dd({color:"red",scheme:n},t),orange:dd({color:"orange",scheme:n},t),yellow:dd({color:"yellow",scheme:n},t),green:dd({color:"green",scheme:n},t),cyan:dd({color:"cyan",scheme:n},t)}}function dd(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])[+("light"!==r)],bg:dr(o,i?.bg),fg:dr(o,i?.fg)}}function dh(e,t,n){let{scheme:r}=t,i={};for(let t of c5)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],s={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:dr(s,o?.bg),fg:dr(s,o?.fg),dot:dr(s,o?.dot),icon:dr(s,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function df(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:dp({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:dp({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:dp({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:dp({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function dp(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,s=t?.color?.base?.[n],a=t?.color?.input?.[r]?.[o],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u[+("light"!==i)],bg:dr(c,a?.bg),border:dr(c,a?.border),fg:dr(c,a?.fg),muted:{bg:dr(c,a?.muted?.bg)},placeholder:dr(c,a?.placeholder)}}function dm(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function dg(e,t,n,r,i){var o;return n*(1-(o=dm((i-e)/(t-e))))+r*o}function dy(e){return Math.round(e)}function dv(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function db(e){let t=dy(dm(Math.round(e.r),0,255)),n=dy(dm(Math.round(e.g),0,255)),r=dy(dm(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(0x1000000+(t<<16)+(n<<8)+r).toString(16).slice(1)}let dx=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function dw(e){var t;if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return dv(e);if(e.startsWith("hsl(")){let n,r,i,o,s,a,l,u;return n=(t=function(e){let t=dx.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e)).s/100,o=(i=(1-Math.abs(2*(r=t.l/100)-1))*n)*(1-Math.abs(t.h/60%2-1)),s=r-i/2,a=0,l=0,u=0,0<=t.h&&t.h<60?(a=i,l=o,u=0):60<=t.h&&t.h<120?(a=o,l=i,u=0):120<=t.h&&t.h<180?(a=0,l=i,u=o):180<=t.h&&t.h<240?(a=0,l=o,u=i):240<=t.h&&t.h<300?(a=o,l=0,u=i):300<=t.h&&t.h<360&&(a=i,l=0,u=o),{r:Math.round((a+s)*255),g:Math.round((l+s)*255),b:Math.round((u+s)*255)}}if(e.startsWith("rgba(")){let t;return{r:parseInt((t=e.replace(/rgba\(|\)/g,"").split(","))[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}throw Error(`parseColor: unexpected color format: "${e}"`)}let dk=[0,255];function dS(e,t){var n,r,i,o,s,a,l,u,c,d,h;let f,{bg:p,blendMode:m,colorPalette:g}=t;if("white"===p)throw Error("Cannot blend with white background");let y=dt(e);
7if(!y||"color"!==y.type)throw Error(`Invalid color token value: ${e}`);let v="";if("black"===y.key&&(v=dE(g.black)),"white"===y.key&&(v=dE(g.white)),y.hue&&y.tint&&(v=dE(g[y.hue][y.tint])),!v)throw Error(`Invalid color token value: ${e}`);let b=v,x={blendMode:m,bg:p,black:dE(g.black),white:dE(g.white)};try{v=function(e,t){var n,r,i,o,s,a;let{blendMode:l}=t,u=dw(e),c=dw(t.black),d=dw(t.white),h=t.bg?dw(t.bg):"multiply"===l?d:c,f={r:[c.r,d.r],g:[c.g,d.g],b:[c.b,d.b]},p={r:dm(dg(...f.r,...dk,h.r),...dk),g:dm(dg(...f.g,...dk,h.g),...dk),b:dm(dg(...f.b,...dk,h.b),...dk)},m={r:dm(dg(...f.r,...dk,u.r),...dk),g:dm(dg(...f.g,...dk,u.g),...dk),b:dm(dg(...f.b,...dk,u.b),...dk)},g="multiply"===l?{r:255*(p.r/255*(m.r/255)),g:255*(p.g/255*(m.g/255)),b:255*(p.b/255*(m.b/255))}:{r:255*((n=p.r/255)+(r=m.r/255)-n*r),g:255*((i=p.g/255)+(o=m.g/255)-i*o),b:255*((s=p.b/255)+(a=m.b/255)-s*a)};return db({r:dm(dg(...dk,...f.r,g.r),...f.r),g:dm(dg(...dk,...f.g,g.g),...f.g),b:dm(dg(...dk,...f.b,g.b),...f.b)})}(v,x),p&&void 0!==y.mix&&(v=db((n=dv(p),r=dv(v),i=y.mix,{r:(o=n.r,s=r.r,o+(s-o)*i),g:(a=n.g,l=r.g,a+(l-a)*i),b:(u=n.b,c=r.b,u+(c-u)*i)})))}catch(e){throw console.warn("could not blend",v,x),e}return"#aN"===v&&(console.warn(`invalid color token value: ${e}`),v=b),void 0!==y.opacity&&(d=v,h=y.opacity,f=dw(d),v=`rgba(${f.r},${f.g},${f.b},${h})`),v}function dE(e){return"string"==typeof e?e:e.hex}function d_(e,t){let n=dj(t.default,{colorPalette:e}),r=n.bg;if("white"===r)throw Error("Cannot blend with white background");let i={default:n};for(let n of c2){if("default"===n)continue;let o="transparent"===n?{colorPalette:e}:{bg:r,colorPalette:e};s5(i,n,()=>dj(t[n],o))}return i}function dj(e,t){var n,r,i,o;let{colorPalette:s,bg:a}=t,l=e._blend||"multiply",u=dS(e.bg,{colorPalette:s,bg:a,blendMode:l}),c={colorPalette:s,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:s},{default:d$(n.default,r),ghost:d$(n.ghost,r),bleed:d$(n.bleed,r)}),h=function(e,t){let n={};for(let o of c5){var r,i;n[o]=(r=e[o],i=t,{enabled:dA(r.enabled,i),hovered:dA(r.hovered,i),pressed:dA(r.pressed,i),selected:dA(r.selected,i),disabled:dA(r.disabled,i)})}return n}(e.selectable,{colorPalette:s,baseBg:u,blendMode:l}),f={outline:dS(e.shadow.outline,c),umbra:dS(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),penumbra:dS(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),ambient:dS(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:dS(e.accent.fg,c)},avatar:dC(e.avatar,{baseBg:u,colorPalette:s,blendMode:l}),backdrop:dS(e.backdrop,c),badge:dM(e.badge,{baseBg:u,colorPalette:s,blendMode:l}),bg:u,border:dS(e.border,c),button:d,code:{bg:dS(e.code.bg,c),fg:dS(e.code.fg,c)},fg:dS(e.fg,c),focusRing:dS(e.focusRing,c),icon:dS(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:s,blendMode:l},{default:dT(i.default,o),invalid:dT(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=dS(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:dS(e.fg,s),border:dS(e.border,s)}}(e.kbd,{baseBg:u,colorPalette:s,blendMode:l}),link:{fg:dS(e.link.fg,c)},muted:{bg:dS(e.muted.bg,c),fg:dS(e.muted.fg,c)},shadow:f,skeleton:{from:dS(e.skeleton.from,c),to:dS(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:dS(e.atrule,o),attrName:dS(e.attrName,o),attrValue:dS(e.attrValue,o),attribute:dS(e.attribute,o),boolean:dS(e.boolean,o),builtin:dS(e.builtin,o),cdata:dS(e.cdata,o),char:dS(e.char,o),class:dS(e.class,o),className:dS(e.className,o),comment:dS(e.comment,o),constant:dS(e.constant,o),deleted:dS(e.deleted,o),doctype:dS(e.doctype,o),entity:dS(e.entity,o),function:dS(e.function,o),hexcode:dS(e.hexcode,o),id:dS(e.id,o),important:dS(e.important,o),inserted:dS(e.inserted,o),keyword:dS(e.keyword,o),number:dS(e.number,o),operator:dS(e.operator,o),prolog:dS(e.prolog,o),property:dS(e.property,o),pseudoClass:dS(e.pseudoClass,o),pseudoElement:dS(e.pseudoElement,o),punctuation:dS(e.punctuation,o),regex:dS(e.regex,o),selector:dS(e.selector,o),string:dS(e.string,o),symbol:dS(e.symbol,o),tag:dS(e.tag,o),unit:dS(e.unit,o),url:dS(e.url,o),variable:dS(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:s,blendMode:l}),selectable:h}}function dC(e,t){let n={};for(let r of cQ)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=dS(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:s,fg:dS(e.fg,{bg:s,blendMode:o,colorPalette:i})}}(e[r],t);return n}function dM(e,t){let n={};for(let r of c5)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=dS(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:dS(e.dot,s),fg:dS(e.fg,s),icon:dS(e.icon,s)}}(e[r],t);return n}function d$(e,t){let n={};for(let o of c5){var r,i;n[o]=(r=e[o],i=t,{enabled:dA(r.enabled,i),hovered:dA(r.hovered,i),pressed:dA(r.pressed,i),selected:dA(r.selected,i),disabled:dA(r.disabled,i)})}return n}function dA(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=dS(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:s,blendMode:o,colorPalette:i};return{_blend:o,accent:{fg:dS(e.accent.fg,a)},avatar:dC(e.avatar,{baseBg:s,colorPalette:i,blendMode:o}),badge:dM(e.badge,{baseBg:s,colorPalette:i,blendMode:o}),bg:s,border:dS(e.border,a),code:{bg:dS(e.code.bg,a),fg:dS(e.code.fg,a)},fg:dS(e.fg,a),icon:dS(e.icon,a),link:{fg:dS(e.link.fg,a)},muted:{bg:dS(e.muted.bg,a),fg:dS(e.muted.fg,a)},kbd:{bg:dS(e.kbd.bg,a),fg:dS(e.kbd.fg,a),border:dS(e.kbd.border,a)},skeleton:{from:dS(e.skeleton?.from,a),to:dS(e.skeleton?.to,a)}}}function dT(e,t){return{enabled:dP(e.enabled,t),hovered:dP(e.hovered,t),readOnly:dP(e.readOnly,t),disabled:dP(e.disabled,t)}}function dP(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=dS(e.bg,{colorPalette:i,bg:n,blendMode:r}),a={colorPalette:i,bg:s,blendMode:o};return{_blend:o,bg:s,border:dS(e.border,a),fg:dS(e.fg,a),muted:{bg:dS(e.muted.bg,a)},placeholder:dS(e.placeholder,a)}}let dI=l8(uv).withConfig({displayName:"StyledInline",componentId:"sc-ntfhm-0"})(function(){return{lineHeight:"0","&&:not([hidden])":{display:"block"},"& > div":{display:"inline-block",verticalAlign:"middle"}}}
7,function(e){let{media:t,space:n}=sK(e.theme);return s0(t,e.$space,e=>{let t=sQ(.5===e?n[1]/2:n[e]);return{margin:`-${t} 0 0 -${t}`,"& > div":{padding:`${t} 0 0 ${t}`}}})});function dR(e){return e&&(0,sL.jsx)("div",{children:e})}let dO=function(e){let t,n,r=(0,tt.c)(16),i,o,s,a,l;r[0]===e?(i=r[1],o=r[2],s=r[3],a=r[4],l=r[5]):({as:i,children:o,gap:s,ref:a,...l}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=a,r[5]=l),r[6]===o?t=r[7]:(t=r_.Children.map(o,dR),r[6]=o,r[7]=t);let u=t,c;return r[8]===s?c=r[9]:(c=s1(s),r[8]=s,r[9]=c),r[10]!==i||r[11]!==u||r[12]!==a||r[13]!==l||r[14]!==c?(n=(0,sL.jsx)(dI,{"data-ui":"Inline",...l,$space:c,forwardedAs:i,ref:a,children:u}),r[10]=i,r[11]=u,r[12]=a,r[13]=l,r[14]=c,r[15]=n):n=r[15],n},dL=l8.kbd.withConfig({displayName:"StyledKBD",componentId:"sc-d2v61l-0"})(ub,function(){return l6`--card-bg-color:var(--card-kbd-bg-color);--card-border-color:var(--card-kbd-border-color);--card-fg-color:var(--card-kbd-fg-color);box-shadow:inset 0 0 0 1px var(--card-border-color);background:var(--card-bg-color);font:inherit;vertical-align:top;&:not([hidden]){display:inline-block;}`}),dV=l8(function(e){let t,n,r,i=(0,tt.c)(20),o,s,a,l,u,c;i[0]===e?(o=i[1],s=i[2],a=i[3],l=i[4],u=i[5],c=i[6]):({children:o,fontSize:l,padding:u,radius:c,ref:s,...a}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=a,i[4]=l,i[5]=u,i[6]=c);let d=void 0===l?0:l,h=void 0===u?1:u,f=void 0===c?2:c,p;return i[7]===f?p=i[8]:(p=s1(f),i[7]=f,i[8]=p),i[9]!==o||i[10]!==d?(t=(0,sL.jsx)(u7,{as:"span",size:d,weight:"semibold",children:o}),i[9]=o,i[10]=d,i[11]=t):t=i[11],i[12]!==h||i[13]!==t?(n=(0,sL.jsx)(uv,{as:"span",padding:h,children:t}),i[12]=h,i[13]=t,i[14]=n):n=i[14],i[15]!==s||i[16]!==a||i[17]!==p||i[18]!==n?(r=(0,sL.jsx)(dL,{"data-ui":"KBD",...a,$radius:p,ref:s,children:n}),i[15]=s,i[16]=a,i[17]=p,i[18]=n,i[19]=r):r=i[19],r}).withConfig({displayName:"Key",componentId:"sc-ttp6vu-0"})`&:not([hidden]){display:block;}`;function dD(e){let t,n,r,i,o=(0,tt.c)(31),s,a,l,u,c,d,h,f;o[0]===e?(s=o[1],a=o[2],l=o[3],u=o[4],c=o[5],d=o[6],h=o[7],f=o[8]):({className:s,fontSize:a,gap:f,keys:l,padding:u,radius:c,ref:d,...h}=e,o[0]=e,o[1]=s,o[2]=a,o[3]=l,o[4]=u,o[5]=c,o[6]=d,o[7]=h,o[8]=f);let p=void 0===f?.5:f,m;o[9]===p?m=o[10]:(m=s1(p),o[9]=p,o[10]=m);let g=m;if(!l||0===l.length){let e;return o[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,sL.jsx)(sL.Fragment,{}),o[11]=e):e=o[11],e}if(o[12]===s?t=o[13]:(t=cx("_1ljw6pi0",s),o[12]=s,o[13]=t),o[14]!==a||o[15]!==l||o[16]!==u||o[17]!==c){let e;o[19]!==a||o[20]!==u||o[21]!==c?(e=(e,t)=>(0,sL.jsx)(dV,{fontSize:a,padding:u,radius:c,children:e},t),o[19]=a,o[20]=u,o[21]=c,o[22]=e):e=o[22],n=l.map(e),o[14]=a,o[15]=l,o[16]=u,o[17]=c,o[18]=n}else n=o[18];return o[23]!==g||o[24]!==n?(r=(0,sL.jsx)(dO,{as:"span",gap:g,children:n}),o[23]=g,o[24]=n,o[25]=r):r=o[25],o[26]!==d||o[27]!==h||o[28]!==t||o[29]!==r?(i=(0,sL.jsx)("kbd",{className:t,"data-ui":"Hotkeys",ref:d,...h,children:r}),o[26]=d,o[27]=h,o[28]=t,o[29]=r,o[30]=i):i=o[30],i}function dN(e){let t,n,r,i,o,s=(0,tt.c)(29),a,l,u,c,d,h,f,p;s[0]===e?(a=s[1],l=s[2],u=s[3],c=s[4],d=s[5],h=s[6],f=s[7],p=s[8]):({as:f,children:a,className:l,onActivate:c,onFocus:d,ref:u,style:p,...h}=e,s[0]=e,s[1]=a,s[2]=l,s[3]=u,s[4]=c,s[5]=d,s[6]=h,s[7]=f,s[8]=p);let m=void 0===f?"div":f,g=void 0===p?sX:p,{zIndex:y,isTopLayer:v}=uK(),b=(0,r_.useRef)(null),x=(0,r_.useRef)(null),w=(0,r_.useRef)(v),k;s[9]===Symbol.for("react.memo_cache_sentinel")?(k=()=>x.current,s[9]=k):k=s[9],(0,r_.useImperativeHandle)(u,k),s[10]!==v||s[11]!==c?(t=()=>{w.current!==v&&v&&c?.({activeElement:b.current}),w.current=v},n=[v,c],s[10]=v,s[11]=c,s[12]=t,s[13]=n):(t=s[12],n=s[13]),(0,r_.useEffect)(t,n),s[14]!==v||s[15]!==d?(r=e=>{d?.(e);let t=x.current,n=document.activeElement;v&&t&&n&&cI(n)&&(t.contains(n)||t===n)&&(b.current=n)},s[14]=v,s[15]=d,s[16]=r):r=s[16];let S=r,E;return s[17]===l?E=s[18]:(E=cx("_1xz6t3i0",l),s[17]=l,s[18]=E),s[19]!==g||s[20]!==y?(i={...g,zIndex:y},s[19]=g,s[20]=y,s[21]=i):i=s[21],s[22]!==m||s[23]!==a||s[24]!==S||s[25]!==h||s[26]!==E||s[27]!==i?(o=(0,sL.jsx)(m,{"data-ui":"Layer",...h,className:E,onFocus:S,ref:x,style:i,children:a}),s[22]=m,s[23]=a,s[24]=S,s[25]=h,s[26]=E,s[27]=i,s[28]=o):o=s[28],o}function dz(e){let t,n=(0,tt.c)(10),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({children:r,zOffset:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s=void 0===o?1:o,a;return n[4]!==r||n[5]!==i?(a=(0,sL.jsx)(dN,{...i,children:r}),n[4]=r,n[5]=i,n[6]=a):a=n[6],n[7]!==a||n[8]!==s?(t=(0,sL.jsx)(uY,{zOffset:s,children:a}),n[7]=a,n[8]=s,n[9]=t):t=n[9],t}let dB=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"remove",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M5 12.5H20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}
7),dF=(v={...eQ=void 0,color:{base:function(e){let t={};for(let n of c2)t[n]=function(e,t){let n=da(e?.base?.["*"],e?.base?.[t]),r=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:r,avatar:cQ.reduce((e,t)=>({...e,[t]:da({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:c5.reduce((t,i)=>({...t,[i]:{_hue:e?.base?.[i]?._hue||r,...n.badge?.["*"],...n.badge?.[i]}}),{})}}(e,n);return t}(y=da(di,eQ?.color)),button:function(e){let t={};for(let n of c4)t[n]=function(e,t){let n={};for(let r of c5)n[r]=function(e,t,n){let r={};for(let i of c3)r[i]=function(e,t,n,r){let i=da(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[r],e?.button?.[n]?.[t]?.[r]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:cQ.reduce((e,t)=>({...e,[t]:da({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:c5.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,n,t,i);return r}(e,t,r);return n}(e,n);return t}(y),input:function(e){let t={};for(let n of c6)t[n]=function(e,t){let n={};for(let r of c8)n[r]=function(e,t,n){let r=da(e?.input?.["*"]?.["*"],e?.
7input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(e,t,r);return n}(e,n);return t}(y),selectable:function(e){let t={};for(let n of c5)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let r of c3)n[r]=function(e,t,n){let r=da(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),i=r._hue||e?.base?.[t]?._hue;return{...r,_hue:i,avatar:cQ.reduce((e,t)=>({...e,[t]:da({_hue:t},r.avatar?.["*"],r.avatar?.[t])}),{}),badge:c5.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||i,...r.badge?.["*"],...r.badge?.[n]}}),{})}}(e,t,r);return n}(e,n);return t}(y),syntax:y.syntax}},s5(b={},"light",()=>du({scheme:"light"},v)),s5(b,"dark",()=>du({scheme:"dark"},v)),s9({_version:2,avatar:(void 0)??sV,button:(void 0)??sD,card:(void 0)??sN,color:(h=b,e2=void 0,c=e2?.palette??{black:{title:"Black",hex:"#0d0e12"},white:{title:"White",hex:"#ffffff"},gray:{50:{title:"Gray 50",hex:"#f6f6f8"},100:{title:"Gray 100",hex:"#eeeef1"},200:{title:"Gray 200",hex:"#e3e4e8"},300:{title:"Gray 300",hex:"#bbbdc9"},400:{title:"Gray 400",hex:"#9499ad"},500:{title:"Gray 500",hex:"#727892"},600:{title:"Gray 600",hex:"#515870"},700:{title:"Gray 700",hex:"#383d51"},800:{title:"Gray 800",hex:"#252837"},900:{title:"Gray 900",hex:"#1b1d27"},950:{title:"Gray 950",hex:"#13141b"}},blue:{50:{title:"Blue 50",hex:"#f5f8ff"},100:{title:"Blue 100",hex:"#e5edff"},200:{title:"Blue 200",hex:"#dbe5ff"},300:{title:"Blue 300",hex:"#a8bfff"},400:{title:"Blue 400",hex:"#7595ff"},500:{title:"Blue 500",hex:"#556bfc"},600:{title:"Blue 600",hex:"#4043e7"},700:{title:"Blue 700",hex:"#2927aa"},800:{title:"Blue 800",hex:"#192457"},900:{title:"Blue 900",hex:"#161a41"},950:{title:"Blue 950",hex:"#101228"}},purple:{50:{title:"Purple 50",hex:"#f8f5ff"},100:{title:"Purple 100",hex:"#f1ebff"},200:{title:"Purple 200",hex:"#ece1fe"},300:{title:"Purple 300",hex:"#ccb1fc"},400:{title:"Purple 400",hex:"#b087f7"},500:{title:"Purple 500",hex:"#8f57ef"},600:{title:"Purple 600",hex:"#721fe5"},700:{title:"Purple 700",hex:"#4c1a9e"},800:{title:"Purple 800",hex:"#2f1862"},900:{title:"Purple 900",hex:"#23173f"},950:{title:"Purple 950",hex:"#181128"}},magenta:{50:{title:"Magenta 50",hex:"#fef6f9"},100:{title:"Magenta 100",hex:"#fde8ef"},200:{title:"Magenta 200",hex:"#fcdee9"},300:{title:"Magenta 300",hex:"#f7abc5"},400:{title:"Magenta 400",hex:"#f0709b"},500:{title:"Magenta 500",hex:"#e72767"},600:{title:"Magenta 600",hex:"#b11651"},700:{title:"Magenta 700",hex:"#7c1342"},800:{title:"Magenta 800",hex:"#4b1130"},900:{title:"Magenta 900",hex:"#341325"},950:{title:"Magenta 950",hex:"#1f0f14"}},red:{50:{title:"Red 50",hex:"#fff6f5"},100:{title:"Red 100",hex:"#ffe7e5"},200:{title:"Red 200",hex:"#ffdedc"},300:{title:"Red 300",hex:"#fdada5"},400:{title:"Red 400",hex:"#f77769"},500:{title:"Red 500",hex:"#ef4434"},600:{title:"Red 600",hex:"#cc2819"},700:{title:"Red 700",hex:"#8b2018"},800:{title:"Red 800",hex:"#4d1714"},900:{title:"Red 900",hex:"#321615"},950:{title:"Red 950",hex:"#1e1011"}},orange:{50:{title:"Orange 50",hex:"#fff7f0"},100:{title:"Orange 100",hex:"#ffeadb"},200:{title:"Orange 200",hex:"#ffddc7"},300:{title:"Orange 300",hex:"#ffb685"},400:{title:"Orange 400",hex:"#ff8e42"},500:{title:"Orange 500",hex:"#fa6400"},600:{title:"Orange 600",hex:"#b14802"},700:{title:"Orange 700",hex:"#7c3404"},800:{title:"Orange 800",hex:"#461e07"},900:{title:"Orange 900",hex:"#32160b"},950:{title:"Orange 950",hex:"#21120d"}},yellow:{50:{title:"Yellow 50",hex:"#fefae1"},100:{title:"Yellow 100",hex:"#fcf3bb"},200:{title:"Yellow 200",hex:"#f9e994"},300:{title:"Yellow 300",hex:"#f7d455"},400:{title:"Yellow 400",hex:"#f9bc15"},500:{title:"Yellow 500",hex:"#d28a04"},600:{title:"Yellow 600",hex:"#965908"},700:{title:"Yellow 700",hex:"#653a0b"},800:{title:"Yellow 800",hex:"#3b220c"},900:{title:"Yellow 900",hex:"#271a11"},950:{title:"Yellow 950",hex:"#181410"}},green:{50:{title:"Green 50",hex:"#e7fef5"},100:{title:"Green 100",hex:"#c5fce8"},200:{title:"Green 200",hex:"#a9f9dc"},300:{title:"Green 300",hex:"#59f3ba"},400:{title:"Green 400",hex:"#0ff0a1"},500:{title:"Green 500",hex:"#04b97a"},600:{title:"Green 600",hex:"#01794f"},700:{title:"Green 700",hex:"#015133"},800:{title:"Green 800",hex:"#023120"},900:{title:"Green 900",hex:"#06231a"},950:{title:"Green 950",hex:"#071715"}},cyan:{50:{title:"Cyan 50",hex:"#e7fefe"},100:{title:"Cyan 100",hex:"#c5fcfc"},200:{title:"Cyan 200",hex:"#96f8f8"},300:{title:"Cyan 300",hex:"#62efef"},400:{title:"Cyan 400",hex:"#18e2e2"},500:{title:"Cyan 500",hex:"#04b8be"},600:{title:"Cyan 600",hex:"#037782"},700:{title:"Cyan 700",hex:"#024950"},800:{title:"Cyan 800",hex:"#042f34"},900:{title:"Cyan 900",hex:"#072227"},950:{title:"Cyan 950",hex:"#0d181c"}}},s5(d={},"light",()=>d_(c,h.light)),s5(d,"dark",()=>d_(c,h.dark)),d),container:(void 0)??[320,640,960,1280,1600,1920],font:(void 0)??{code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0}
7,{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},input:(void 0)??sB,layer:(void 0)??sz,media:(void 0)??[360,600,900,1200,1800,2400],radius:(void 0)??[0,1,3,6,9,12,21],shadow:(void 0)??[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:(void 0)??[0,4,8,12,20,32,52,84,136,220],style:(void 0)??{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}}));function dH(e){let t,n,r=(0,tt.c)(35),i,o,s,a,l,u,c,d,h,f,p,m;r[0]===e?(i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],c=r[7],d=r[8],h=r[9],f=r[10],p=r[11],m=r[12]):({className:i,icon:a,id:l,focused:o,fontSize:p,label:u,onClick:c,onFocus:d,padding:m,ref:s,selected:f,...h}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=a,r[5]=l,r[6]=u,r[7]=c,r[8]=d,r[9]=h,r[10]=f,r[11]=p,r[12]=m);let g=void 0===p?1:p,y=void 0===m?2:m,v=(0,r_.useRef)(null),b=(0,r_.useRef)(!1),x;r[13]===Symbol.for("react.memo_cache_sentinel")?(x=()=>v.current,r[13]=x):x=r[13],(0,r_.useImperativeHandle)(s,x),r[14]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{b.current=!1},r[14]=t):t=r[14];let w=t,k;r[15]===d?k=r[16]:(k=e=>{b.current=!0,d&&d(e)},r[15]=d,r[16]=k);let S=k,E,_;r[17]===o?(E=r[18],_=r[19]):(E=()=>{o&&!b.current&&(v.current&&v.current.focus(),b.current=!0)},_=[o],r[17]=o,r[18]=E,r[19]=_),(0,r_.useEffect)(E,_),r[20]===i?n=r[21]:(n=cx("gpfraw0",i),r[20]=i,r[21]=n);let j=f?"true":"false",C=f?0:-1,M;return r[22]!==g||r[23]!==S||r[24]!==a||r[25]!==l||r[26]!==u||r[27]!==c||r[28]!==y||r[29]!==h||r[30]!==f||r[31]!==n||r[32]!==j||r[33]!==C?(M=(0,sL.jsx)(cs,{className:n,"data-ui":"Tab",...h,"aria-selected":j,fontSize:g,icon:a,id:l,mode:"bleed",onClick:c,onBlur:w,onFocus:S,padding:y,ref:v,role:"tab",selected:f,tabIndex:C,text:u,type:"button"}),r[22]=g,r[23]=S,r[24]=a,r[25]=l,r[26]=u,r[27]=c,r[28]=y,r[29]=h,r[30]=f,r[31]=n,r[32]=j,r[33]=C,r[34]=M):M=r[34],M}function dU(e){let t,n=(0,tt.c)(20),r,i,o,s;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4]):({children:r,className:i,ref:o,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s);let[a,l]=(0,r_.useState)(-1),u;
7if(n[5]!==r||n[6]!==a){let e=r_.Children.toArray(r).filter(r_.isValidElement),t;n[8]===a?t=n[9]:(t=(e,t)=>(0,r_.cloneElement)(e,{focused:a===t,key:t,onFocus:()=>l(t)}),n[8]=a,n[9]=t),u=e.map(t),n[5]=r,n[6]=a,n[7]=u}else u=n[7];let c=u,d=c.length,h;n[10]===d?h=n[11]:(h=e=>{"ArrowLeft"===e.key&&l(e=>(e+d-1)%d),"ArrowRight"===e.key&&l(e=>(e+1)%d)},n[10]=d,n[11]=h);let f=h,p;return n[12]===i?p=n[13]:(p=cx("_11igkzi0",i),n[12]=i,n[13]=p),n[14]!==f||n[15]!==o||n[16]!==s||n[17]!==p||n[18]!==c?(t=(0,sL.jsx)(dO,{className:p,"data-ui":"TabList",...s,onKeyDown:f,ref:o,role:"tablist",children:c}),n[14]=f,n[15]=o,n[16]=s,n[17]=p,n[18]=c,n[19]=t):t=n[19],t}function dW(e){return uz("(prefers-color-scheme: dark)",void 0===e?dq:e)}function dq(){return!1}uT("@sanity/ui/context/dialog",{version:0}),uT("@sanity/ui/context/tree",null);function dG(e){let t=(0,tt.c)(7),{boundaryElement:n,children:r,element:i,__unstable_elements:o}=e,s=(0,r_.useSyncExternalStore)(dZ,dK,dY),a=n||null,l=i||s,u;t[0]!==o||t[1]!==a||t[2]!==l?(u={version:0,boundaryElement:a,element:l,elements:o},t[0]=o,t[1]=a,t[2]=l,t[3]=u):u=t[3];let c=u,d;return t[4]!==r||t[5]!==c?(d=(0,sL.jsx)(cC.Provider,{value:c,children:r}),t[4]=r,t[5]=c,t[6]=d):d=t[6],d}function dY(){return null}function dK(){return document.body}r_.Component;let dZ=()=>()=>{},dX=(0,r_.createContext)(null);function dJ(e){let t=(0,r_.useRef)(null);return null===t.current&&(t.current=e()),t.current}let dQ="u">typeof window?r_.useLayoutEffect:r_.useEffect,d0=e=>"object"==typeof e&&null!==e;function d1(e){return d0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var d2=r_;let d5=(0,r_.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function d3(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class d4 extends d2.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(d1(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=d1(e)&&e.offsetWidth||0,r=d1(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function d6({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){let s=(0,d2.useId)(),a=(0,d2.useRef)(null),l=(0,d2.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=(0,d2.useContext)(d5),c=function(...e){return r_.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d3(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d3(e[t],null)}}}}(...e),e)}(a,!1!==o?e.props?.ref??e?.ref:void 0);return(0,d2.useInsertionEffect)(()=>{let{width:e,height:c,top:d,left:h,right:f,bottom:p,direction:m}=l.current;if(t||!1===o||!a.current||!e||!c)return;let g="rtl"===m,y="left"===n?g?`right: ${f}`:`left: ${h}`:g?`left: ${h}`:`right: ${f}`,v="bottom"===r?`bottom: ${p}`:`top: ${d}`;a.current.dataset.motionPopId=s;let b=document.createElement("style");u&&(b.nonce=u);let x=i??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(` 8 [data-motion-pop-id="${s}"] { 9 position: absolute !important; 10 width: ${e}px !important; 11 height: ${c}px !important; 12 ${y}px !important; 13 ${v}px !important; 14 } 15 `),()=>{a.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),(0,sL.jsx)(d4,{isPresent:t,childRef:a,sizeRef:l,pop:o,children:!1===o?e:d2.cloneElement(e,{ref:c})})}let d8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,anchorY:l,root:u})=>{let c=dJ(d7),d=(0,r_.useId)(),h=(0,r_.useRef)(n),f=(0,r_.useRef)(r);dQ(()=>{h.current=n,f.current=r});let p=!0,m=(0,r_.useMemo)(()=>(p=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{for(let t of(c.set(e,!0),c.values()))if(!t)return;r&&r()},register:e=>(c.set(e,!1),()=>
15{c.delete(e),h.current||c.size||f.current?.()})}),[n,c,r]);return o&&p&&(m={...m}),(0,r_.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),r_.useEffect(()=>{n||c.size||!r||r()},[n]),e=(0,sL.jsx)(d6,{pop:"popLayout"===s,isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),(0,sL.jsx)(dX.Provider,{value:m,children:e})};function d7(){return new Map}let d9=()=>{},he=()=>{};ar.default;let ht={name:"@sanity/ui/origin",fn({middlewareData:e,placement:t,rects:n}){let[r]=t.split("-"),i=n.floating.width,o=n.floating.height,s=e.shift?.x||0,a=e.shift?.y||0;if(i<=0||o<=0)return{};let{originX:l,originY:u}=["bottom","top"].includes(r)?{originX:hr(.5-s/i,0,1),originY:+("bottom"!==r)}:{originX:+("left"===r),originY:hr(.5-a/o,0,1)};return{data:{originX:l,originY:u}}}};function hn(e,t){if(void 0!==e&&void 0!==t)return`${100*e}% ${100*t}%`}function hr(e,t,n){return Math.min(Math.max(e,t),n)}function hi(e){let t,n,r=(0,tt.c)(9),{mode:i,layoutMode:o,children:s}=e,[a,l]=(0,r_.useState)(i),u="visible"===i;if(u&&"visible"!==a)return l("visible"),null;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>l("hidden"),r[0]=t):t=r[0];let c=t;he(r_.Activity);let d=u?void 0:c,h="pop"===o?"popLayout":"sync",f;return r[1]!==u||r[2]!==d||r[3]!==h||r[4]!==s?(f=(0,sL.jsx)(d8,{isPresent:u,onExitComplete:d,presenceAffectsLayout:!1,mode:h,children:s}),r[1]=u,r[2]=d,r[3]=h,r[4]=s,r[5]=f):f=r[5],r[6]!==a||r[7]!==f?(n=(0,sL.jsx)(r_.Activity,{mode:a,children:f}),r[6]=a,r[7]=f,r[8]=n):n=r[8],n}function ho(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}var hs=e.i(258950),ha=e.i(953760);let hl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hu=new Set([...hl,"pathRotation"]),hc=(e,t,n)=>n>t?t:n<e?e:n,hd={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},hh={...hd,transform:e=>hc(0,1,e)},hf={...hd,default:1},hp=e=>Math.round(1e5*e)/1e5,hm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,hg=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hy=(e,t)=>n=>!!("string"==typeof n&&hg.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),hv=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,s,a]=r.match(hm);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},hb={...hd,transform:e=>Math.round(hc(0,255,e))},hx={test:hy("rgb","red"),parse:hv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+hb.transform(e)+", "+hb.transform(t)+", "+hb.transform(n)+", "+hp(hh.transform(r))+")"},hw={test:hy("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:hx.transform},hk=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),hS=hk("deg"),hE=hk("%"),h_=hk("px"),hj=hk("vh"),hC=hk("vw"),hM={...hE,parse:e=>hE.parse(e)/100,transform:e=>hE.transform(100*e)},h$={test:hy("hsl","hue"),parse:hv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+hE.transform(hp(t))+", "+hE.transform(hp(n))+", "+hp(hh.transform(r))+")"},hA={test:e=>hx.test(e)||hw.test(e)||h$.test(e),parse:e=>hx.test(e)?hx.parse(e):h$.test(e)?h$.parse(e):hw.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?hx.transform(e):h$.transform(e),getAnimatableNone:e=>{let t=hA.parse(e);return t.alpha=0,hA.transform(t)}},hT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,hP="number",hI="color",hR=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hO(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,s=t.replace(hR,e=>(hA.test(e)?(r.color.push(o),i.push(hI),n.push(hA.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(hP),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function hL({split:e,types:t}){let n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){let e=t[o];e===hP?i+=hp(r[o]):e===hI?i+=hA.transform(r[o]):i+=r[o]}return i}}let hV={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(hm)?.length||0)+(e.match(hT)?.length||0)>0},parse:function(e){return hO(e).values},createTransformer:function(e){return hL(hO(e))},getAnimatableNone:function(e){let t=hO(e);return hL(t)(t.values.map((e,n)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:hA.test(e)?hA.getAnimatableNone(e):e)(e,t.split[n])))}},hD=new Set(["brightness","contrast","saturate","opacity"]);function hN(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(hm)||[];if(!r)return e;let i=n.replace(r,""),o=+!!hD.has(t);return r!==n&&(o*=100),t+"("+o+i+")"}let hz=/\b([a-z-]*)\(.*?\)/gu,hB={...hV,getAnimatableNone:e=>{let t=e.match(hz);return t?t.map(hN).join(" "):e}},hF={...hV,getAnimatableNone:e=>{let t=hV.parse(e);return hV.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},hH={...hd,transform:Math.round},hU={borderWidth:h_,borderTopWidth:h_,borderRightWidth:h_,borderBottomWidth:h_,borderLeftWidth:h_,borderRadius:h_,borderTopLeftRadius:h_,borderTopRightRadius:h_,borderBottomRightRadius:h_,borderBottomLeftRadius:h_,width:h_,maxWidth:h_,height:h_,maxHeight:h_,top:h_,right:h_,bottom:h_,left:h_,inset:h_,insetBlock:h_,insetBlockStart:h_,insetBlockEnd:h_,insetInline:h_,insetInlineStart:h_,insetInlineEnd:h_,padding:h_,paddingTop:h_,paddingRight:h_,paddingBottom:h_,paddingLeft:h_,paddingBlock:h_,paddingBlockStart:h_,paddingBlockEnd:h_,paddingInline:h_,paddingInlineStart:h_,paddingInlineEnd:h_,margin:h_,marginTop:h_,marginRight:h_,marginBottom:h_,marginLeft:h_,marginBlock:h_,marginBlockStart:h_,marginBlockEnd:h_,marginInline:h_,marginInlineStart:h_,marginInlineEnd:h_,fontSize:h_,backgroundPositionX:h_,backgroundPositionY:h_,rotate:hS,pathRotation:hS,rotateX:hS,rotateY:hS,rotateZ:hS,scale:hf,scaleX:hf,scaleY:hf,scaleZ:hf,skew:hS,skewX:hS,skewY:hS,distance:h_,translateX:h_,translateY:h_,translateZ:h_,x:h_,y:h_,z:h_,perspective:h_,transformPerspective:h_,opacity:hh,originX:hM,originY:hM,originZ:h_,zIndex:hH,fillOpacity:hh,strokeOpacity:hh,numOctaves:hH},hW={...hU,color:hA,backgroundColor:hA,outlineColor:hA,fill:hA,stroke:hA,borderColor:hA,borderTopColor:hA,borderRightColor:hA,borderBottomColor:hA,borderLeftColor:hA,filter:hB,WebkitFilter:hB,mask:hF,WebkitMask:hF},hq=e=>hW[e],hG=()=>({translate:0,scale:1,origin:0,originPoint:0}),hY=()=>({x:hG(),y:hG()}),hK=()=>({min:0,max:0}),hZ=()=>({x:hK(),y:hK()}),hX=e=>!!(e&&e.getVelocity),hJ=new Set(["width","height","top","left","right","bottom",...hl]),hQ=e=>t=>t.test(e),h0=[hd,h_,hE,hS,hC,hj,{test:e=>"auto"===e,parse:e=>e}],h1=e=>h0.find(hQ(e)),h2=e=>t=>"string"==typeof t&&t.startsWith(e),h5=h2("--"),h3=h2("var(--"),h4=e=>!!h3(e)&&h6.test(e.split("/*")[0].trim()),h6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function h8(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let h7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,h9=e=>180*e/Math.PI,fe=e=>fn(h9(Math.atan2(e[1],e[0]))),ft={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fe,rotateZ:fe,skewX:e=>h9(Math.atan(e[1])),skewY:e=>h9(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fn=e=>((e%=360)<0&&(e+=360),e),fr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fr,scaleY:fi,scale:e=>(fr(e)+fi(e))/2,rotateX:e=>fn(h9(Math.atan2(e[6],e[5]))),rotateY:e=>fn(h9(Math.atan2(-e[2],e[0]))),rotateZ:fe,rotate:fe,skewX:e=>h9(Math.atan(e[4])),skewY:e=>h9(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fs(e){return+!!e.includes("scale")}function fa(e,t){let n,r;if(!e||"none"===e)return fs(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=fo,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ft,r=t}if(!r)return fs(t);let o=n[t],s=r[1].split(",").map(fl);return"function"==typeof o?o(s):s[o]}function fl(e){return parseFloat(e.trim())}let fu=e=>e===hd||e===h_,fc=new Set(["x","y","z"]),fd=hl.filter(e=>!fc.has(e)),fh={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fa(t,"x"),y:(e,{transform:t})=>fa(t,"y")};fh.translateX=fh.x,fh.translateY=fh.y;let ff=e=>e,fp={},fm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fg(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=fm.reduce((e,t)=>
15(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&r?t:n;return i&&o.add(e),a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=s,m=()=>{let o=fp.useManualTiming,s=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1)),i.timestamp=s,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:fm.reduce((t,o)=>{let a=s[o];return t[o]=(t,o=!1,s=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||e(m)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<fm.length;t++)s[fm[t]].cancel(e)},state:i,steps:s}}let{schedule:fy,cancel:fv,state:fb,steps:fx}=fg("u">typeof requestAnimationFrame?requestAnimationFrame:ff,!0),fw=new Set,fk=!1,fS=!1,fE=!1;function f_(){if(fS){let e=Array.from(fw).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t,r=(t=[],fd.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(+!!n.startsWith("scale")))}),t);r.length&&(n.set(e,r),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}fS=!1,fk=!1,fw.forEach(e=>e.complete(fE)),fw.clear()}function fj(){fw.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fS=!0)})}class fC{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(fw.add(this),fk||(fk=!0,fy.read(fj),fy.resolveKeyframes(f_))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){let i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),fw.delete(this)}cancel(){"scheduled"===this.state&&(fw.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let fM=new Set([hB,hF]);function f$(e,t){let n=hq(e);return fM.has(n)||(n=hV),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let fA=new Set(["auto","none","0"]);class fT extends fC{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&h4(r=r.trim())){let i=function e(t,n,r=1){he(`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[i,o]=function(e){let t=h7.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let s=window.getComputedStyle(n).getPropertyValue(i);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return h4(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!hJ.has(n)||2!==e.length)return;let[r,i]=e,o=h1(r),s=h1(i);if(h8(r)!==h8(i)&&fh[n]){this.needsMeasurement=!0;return}if(o!==s)if(fu(o)&&fu(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else fh[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!fA.has(t)&&hO(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=f$(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fh[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=fh[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
15h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let fP=e=>1e3*e;function fI(e,t){-1===e.indexOf(t)&&e.push(t)}function fR(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class fO{constructor(){this.subscriptions=[]}add(e){return fI(this.subscriptions,e),()=>fR(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fL(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}function fV(e){let t;return()=>(void 0===t&&(t=e()),t)}let fD={};function fN(e,t){let n=fV(e);return()=>fD[t]??n()}let fz=fN(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),fB=e=>null!==e;function fF(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(fB),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}class fH{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let fU=e=>Array.isArray(e)&&"number"==typeof e[0],fW=fN(()=>{try{document.createElement("div").animate({opacity:0}
15,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),fq=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},fG=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fY={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fG([0,.65,.55,1]),circOut:fG([.55,0,1,.45]),backIn:fG([.31,.01,.66,-.59]),backOut:fG([.33,1.53,.69,.99])};function fK(e){return"function"==typeof e&&"applyToOptions"in e}class fZ extends fH{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,he(e.type);const l=function({type:e,...t}){return fK(e)&&fW()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?fW()?fq(t,n):"ease-out":fU(t)?fG(t):Array.isArray(t)?t.map(t=>e(t,n)||fY.easeOut):fY[t]}(a,i);Array.isArray(d)&&(c.easing=d);let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=fF(r,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),fL(t,n,e),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=fP(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&fz())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ff):r(this)}}let fX=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),{schedule:fJ}=fg(queueMicrotask,!1);function fQ(){s=void 0}let f0={now:()=>(void 0===s&&f0.set(fb.isProcessing||fp.useManualTiming?fb.timestamp:performance.now()),s),set:e=>{s=e,queueMicrotask(fQ)}},f1=(e,t)=>t?1e3/t*e:0,f2;class f5{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=f0.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=f0.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new fO);let n=this.events[e].add(t);return"change"===e?()=>{n(),fy.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
15setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return f2&&f2.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=f0.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return f1(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function f3(e,t){return new f5(e,t)}let f4=[...h0,hA,hV],f6=new WeakMap;function f8(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function f7(e){return"string"==typeof e||Array.isArray(e)}let f9=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pe=["initial",...f9];function pt(e){return f8(e.animate)||pe.some(t=>f7(e[t]))}function pn(e){return!!(pt(e)||e.variants)}let pr={current:null},pi={current:!1},po="u">typeof window;function ps(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function pa(e,t,n,r){if("function"==typeof t){let[i,o]=ps(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=ps(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let pl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pu={};class pc{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fC,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=f0.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,fy.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=pt(t),this.isVariantNode=pn(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&hX(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,f6.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
15h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(pi.current||function(){if(pi.current=!0,po)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pr.current=e.matches;e.addEventListener("change",t),t()}else pr.current=!1}(),this.shouldReduceMotion=pr.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),fv(this.notifyUpdate),fv(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&fX.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:o,duration:s}=t.accelerate,a=new fZ({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:fP(s)}),l=n(a);this.valueSubscriptions.set(e,()=>{l(),a.cancel()});return}let r=hu.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&fy.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in pu){let t=pu[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):hZ()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<pl.length;t++){let n=pl[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if(hX(i))e.addValue(r,i);else if(hX(o))e.addValue(r,f3(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,f3(void 0!==t?t:i,{owner:e}))}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=f3(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=n){let r,i;if("string"==typeof n&&(r=n,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r)||(i=n,/^0[^.\s]+$/u.test(i))))n=parseFloat(n);else{let r;r=n,!f4.find(hQ(r))&&hV.test(t)&&(n=f$(e,t))}this.setBaseTarget(e,hX(n)?n.get():n)}return hX(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=pa(this.props,n,this.presenceContext?.custom);r&&(t=r[e])}if(n&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||hX(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new fO),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){fJ.render(this.render)}}class pd extends pc{constructor(){super(...arguments),this.KeyframeResolver=fT}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;hX(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function ph(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let pf=(e,t)=>
15t&&"number"==typeof e?t.transform(e):e,pp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pm=hl.length;function pg(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,s=!1,a=!1;for(let e in t){let n=t[e];if(hu.has(e)){s=!0;continue}if(h5(e)){i[e]=n;continue}{let t=pf(n,hU[e]);e.startsWith("origin")?(a=!0,o[e]=t):r[e]=t}}if(!t.transform&&(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<pm;o++){let s=hl[o],a=e[s];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===+!!s.startsWith("scale");else{let e=parseFloat(a);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=pf(a,hU[s]);if(!l){i=!1;let t=pp[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}let o=e.pathRotation;return o&&(i=!1,r+=`rotate(${pf(o,hU.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}let py={offset:"stroke-dashoffset",array:"stroke-dasharray"},pv={offset:"strokeDashoffset",array:"strokeDasharray"},pb=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function px(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(pg(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of pb)void 0!==d[e]&&(h[e]=d[e],delete d[e]);(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?py:pv;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}(d,i,o,s,!1)}let pw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),pk=e=>"string"==typeof e&&"svg"===e.toLowerCase();function pS(e,{style:t,vars:n},r,i){let o,s=e.style;for(o in t)s[o]=t[o];for(o in i?.applyProjectionStyles(s,r),n)s.setProperty(o,n[o])}let pE=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function p_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let pj={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!h_.test(e))return e;else e=parseFloat(e);let n=p_(e,t.target.x),r=p_(e,t.target.y);return`${n}% ${r}%`}},pC=(e,t,n)=>e+(t-e)*n,pM={borderRadius:{...pj,applyTo:[...pE]},borderTopLeftRadius:pj,borderTopRightRadius:pj,borderBottomLeftRadius:pj,borderBottomRightRadius:pj,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=hV.parse(e);if(r.length>5)return e;let i=hV.createTransformer(e),o=+("number"!=typeof r[0]),s=n.x.scale*t.x,a=n.y.scale*t.y;r[0+o]/=s,r[1+o]/=a;let l=pC(s,a,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};function p$(e,{layout:t,layoutId:n}){return hu.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!pM[e]||"opacity"===e)}function pA(e,t,n){let r=e.style,i=t?.style,o={};if(!r)return o;for(let t in r)(hX(r[t])||i&&hX(i[t])||p$(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(o[t]=r[t]);return o}function pT(e,t,n){let r=pA(e,t,n);for(let n in e)(hX(e[n])||hX(t[n]))&&(r[-1!==hl.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class pP extends pd{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hZ}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(hu.has(t)){let e=hq(t);return e&&e.default||0}if(pb.includes(t)){let n=getComputedStyle(e)[t];if("string"==typeof n&&n)return n.trim()}return t=pw.has(t)?t:ph(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return pT(e,t,n)}
15build(e,t,n){px(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){for(let n in pS(e,t,void 0,r),t.attrs)e.setAttribute(pw.has(n)?n:ph(n),t.attrs[n])}mount(e){this.isSVGTag=pk(e.tagName),super.mount(e)}}function pI({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pR(e){return void 0===e||1===e}function pO({scale:e,scaleX:t,scaleY:n}){return!pR(e)||!pR(t)||!pR(n)}function pL(e){return pO(e)||pV(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pV(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function pD(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function pN(e,t=0,n=1,r,i){e.min=pD(e.min,t,n,r,i),e.max=pD(e.max,t,n,r,i)}function pz(e,{x:t,y:n}){pN(e.x,t.translate,t.scale,t.originPoint),pN(e.y,n.translate,n.scale,n.originPoint)}function pB(e,t){e.min+=t,e.max+=t}function pF(e,t,n,r,i=.5){let o=pC(e.min,e.max,i);pN(e,t,n,o,r)}function pH(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function pU(e,t,n){let r=n??e;pF(e.x,pH(t.x,r.x),t.scaleX,t.scale,t.originX),pF(e.y,pH(t.y,r.y),t.scaleY,t.scale,t.originY)}function pW(e,t){return pI(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class pq extends pd{constructor(){super(...arguments),this.type="html",this.renderInstance=pS}mount(e){he(e.style),super.mount(e)}readValueFromInstance(e,t){if(hu.has(t))return this.projection?.isProjecting?fs(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return fa(n,t)})(e,t);{let n=window.getComputedStyle(e),r=(h5(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return pW(e,t)}build(e,t,n){pg(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return pA(e,t,n)}}let pG=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pY(e){if("string"!=typeof e||e.includes("-"));else if(pG.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let pK=(0,r_.createContext)({}),pZ=(0,r_.createContext)({strict:!1}),pX=(0,r_.createContext)({});function pJ(e){return Array.isArray(e)?e.join(" "):e}let pQ=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function p0(e,t,n){for(let r in t)hX(t[r])||p$(r,n)||(e[r]=t[r])}let p1=()=>({...pQ(),attrs:{}}),p2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function p5(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||p2.has(e)}function p3(e){return hX(e)?e.get():e}let p4=e=>(t,n)=>{let r=(0,r_.useContext)(pX),i=(0,r_.useContext)(dX),o=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=p3(o[e]);let{initial:s,animate:a}=e,l=pt(e),u=pn(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===s)?a:s;if(d&&"boolean"!=typeof d&&!f8(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=pa(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}(n,r,i,e),renderState:t()}})(e,t,r,i);return n?o():dJ(o)},p6=p4({scrapeMotionValuesFromProps:pA,createRenderState:pQ}),p8=p4({scrapeMotionValuesFromProps:pT,createRenderState:p1}),p7={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},p9=!1;function me(){return!function(){if(p9)return;let e={};for(let t in p7)e[t]={isEnabled:e=>p7[t].some(t=>!!e[t])};pu=e,p9=!0}(),pu}let mt=Symbol.for("motionComponentSymbol"),mn="data-"+ph("framerAppearId"),mr=(0,r_.createContext)({});function mi(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function mo(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&function(e){let t=me();for(let n in e)t[n]={...t[n],...e[n]};pu=t}(r);let o=n?"svg"===n:pY(e),s=o?p8:p6;function a(n,r){var a;let l,u,c,d={...(0,r_.useContext)(d5),...n,layoutId:function({layoutId:e}){let t=(0,r_.useContext)(pK).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:h,isValidProp:f}=d,p=function(e){let{initial:t,animate:n}=function(e,t){if(pt(e)){let{initial:t,animate:n}=e;return{initial:!1===t||f7(t)?t:void 0,animate:f7(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r_.useContext)(pX));return(0,r_.useMemo)(()=>({initial:t,animate:n}),[pJ(t),pJ(n)])}(n),m=s(n,h);if(!h&&"u">typeof window){(0,r_.useContext)(pZ).strict;let t=function(e){let{drag:t,layout:n}
15=me();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(d);l=t.MeasureLayout,p.visualElement=function(e,t,n,r,i,o){let{visualElement:s}=(0,r_.useContext)(pX),a=(0,r_.useContext)(pZ),l=(0,r_.useContext)(dX),u=(0,r_.useContext)(d5),c=u.reducedMotion,d=u.skipAnimations,h=(0,r_.useRef)(null),f=(0,r_.useRef)(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:o}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let p=h.current,m=(0,r_.useContext)(mr);p&&!p.projection&&i&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&mi(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(h.current,n,i,m);let g=(0,r_.useRef)(!1);(0,r_.useInsertionEffect)(()=>{p&&g.current&&p.update(n,l)});let y=n[mn],v=(0,r_.useRef)(!!y&&"u">typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return dQ(()=>{f.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),(0,r_.useEffect)(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}(e,m,d,i,t.ProjectionNode,o)}return(0,sL.jsxs)(pX.Provider,{value:p,children:[l&&p.visualElement?(0,sL.jsx)(l,{visualElement:p.visualElement,...d}):null,function(e,t,n,{latestValues:r},i,o=!1,s,a){let l=(s??pY(e)?function(e,t,n,r){let i=(0,r_.useMemo)(()=>{let n=p1();return px(n,t,pk(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};p0(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n,r,i={},o=(n=e.style||{},p0(r={},n,e),Object.assign(r,function({transformTemplate:e},t){return(0,r_.useMemo)(()=>{let n=pQ();return pg(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=o,i})(t,r,i,e),u=function(e,t,n,r){let i={};for(let o in e)("values"!==o||"object"!=typeof e.values)&&!hX(e[o])&&((o.startsWith("on")?!p5(o):r?.(o)??!p5(o))||!0===n&&p5(o)||!t&&!p5(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}(t,"string"==typeof e,o,a),c=e!==r_.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=(0,r_.useMemo)(()=>hX(d)?d.get():d,[d]);return(0,r_.createElement)(e,{...c,children:h})}(e,n,(a=p.visualElement,u=(0,r_.useRef)(r),(0,r_.useInsertionEffect)(()=>{u.current=r}),c=(0,r_.useRef)(null),(0,r_.useCallback)(e=>{e&&m.onMount?.(e),a&&(e?a.mount(e):a.unmount());let t=u.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(c.current=n)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e)},[a])),m,h,t,o,f)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,r_.forwardRef)(a);return l[mt]=e,l}class ms{constructor(e){this.isMounted=!1,this.node=e}update(){}}function ma(e,t,n){let r=e.getProps();return pa(r,t,void 0!==n?n:r.custom,e)}function ml(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function mu(e,t){let n=e?.[t]??e?.default??e;return n!==e?ml(n,e):n}let mc=e=>Array.isArray(e);function md(e,t){let n=e.getValue("willChange");if(hX(n)&&n.add)return n.add(t);if(!n&&fp.WillChange){let n=new fp.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let mh=(...e)=>e.reduce((e,t)=>
15n=>t(e(n)));function mf(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mp(e,t){return n=>n>0?t:e}let mm=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},mg=[hw,hx,h$];function my(e){let t=mg.find(t=>t.test(e));if(d9(`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===h$&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=mf(a,r,e+1/3),o=mf(a,r,e),s=mf(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let mv=(e,t)=>{let n=my(e),r=my(t);if(!n||!r)return mp(e,t);let i={...n};return e=>(i.red=mm(n.red,r.red,e),i.green=mm(n.green,r.green,e),i.blue=mm(n.blue,r.blue,e),i.alpha=pC(n.alpha,r.alpha,e),hx.transform(i))},mb=new Set(["none","hidden"]);function mx(e,t){return n=>pC(e,t,n)}function mw(e){return"number"==typeof e?mx:"string"==typeof e?h4(e)?mp:hA.test(e)?mv:mE:Array.isArray(e)?mk:"object"==typeof e?hA.test(e)?mv:mS:mp}function mk(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>mw(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function mS(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=mw(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let mE=(e,t)=>{let n=hV.createTransformer(t),r=hO(e),i=hO(t);if(!(r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length))return d9(`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mp(e,t);if(mb.has(e)&&!i.values.length||mb.has(t)&&!r.values.length)return mb.has(e)?n=>n<=0?e:t:n=>n>=1?t:e;return mh(mk(function(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}(r,i),i.values),n)};function m_(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?pC(e,t,n):mw(e)(e,t)}let mj=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>fy.update(t,e),stop:()=>fv(t),now:()=>fb.isProcessing?fb.timestamp:f0.now()}};function mC(e,t=50,n=2e4,r){let i=0,o=e.next(i);for(r?.push(o.value);!o.done&&i<n;)i+=t,o=e.next(i),r?.push(o.value);return i>=n?1/0:i}let mM=.01,m$=2,mA=.005,mT=.5;function mP(e,t){return e*Math.sqrt(1-t*t)}let mI=["duration","bounce"],mR=["stiffness","damping","mass"];function mO(e,t){return t.some(t=>void 0!==e[t])}function mL(e=.3,t=.3){let n,r,i="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:s}=i,a=i.keyframes[0],l=i.keyframes[i.keyframes.length-1],u={done:!1,value:a},{stiffness:c,damping:d,mass:h,duration:f,velocity:p,isResolvedFromDuration:m}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!mO(e,mR)&&mO(e,mI))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*hc(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:i}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let i,o;d9(fP(10));let s=1-t;s=hc(.05,1,s),e=hc(.01,10,e/1e3),s<1?(i=t=>{let r=t*s,i=r*e;return .001-(r-n)/mP(t,s)*Math.exp(-i)},o=t=>{let r=t*s*e,o=s*s*t*t*e,a=Math.exp(-r),l=mP(t*t,s);return(r*n+n-o)*a*(-i(t)+.001>0?-1:1)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let a=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=fP(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{let t=a*a*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...i,velocity:-((i.velocity||0)/1e3)}),g=p||0,y=d/(2*Math.sqrt(c*h)),v=l-a,b=Math.sqrt(c/h)/1e3,x=y*b,w=5>Math.abs(v);if(o||(o=w?mM:m$),s||(s=w?mA:mT),y<1){let e=mP(b,y),t=(g+x*v)/e,i=x*t+v*e,o=x*v-t*e,s=-1,a=0,u=0,c=n=>{if(n!==s){s=n;
15let r=Math.exp(-x*n),c=Math.sin(e*n),d=Math.cos(e*n);a=l-r*(t*c+v*d),u=r*(i*c+o*d)}};n=e=>(c(e),a),r=e=>(c(e),u)}else if(1===y){n=e=>l-Math.exp(-b*e)*(v+(g+b*v)*e);let e=g+b*v;r=t=>Math.exp(-b*t)*(b*e*t-g)}else{let e=b*Math.sqrt(y*y-1);n=t=>{let n=Math.exp(-x*t),r=Math.min(e*t,300);return l-n*((g+x*v)*Math.sinh(r)+e*v*Math.cosh(r))/e};let t=(g+x*v)/e,i=x*t-v*e,o=x*v-t*e;r=t=>{let n=Math.exp(-x*t),r=Math.min(e*t,300);return n*(i*Math.sinh(r)+o*Math.cosh(r))}}let k={calculatedDuration:m&&f||null,velocity:e=>fP(r(e)),next:e=>{let t=n(e);return m?u.done=e>=f:u.done=Math.abs(fP(r(e)))<=o&&Math.abs(l-t)<=s,u.value=u.done?l:t,u},toString:()=>{let e=Math.min(mC(k),2e4),t=fq(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}function mV({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let d,h,f=e[0],p={done:!1,value:f},m=n*t,g=f+m,y=void 0===s?g:s(g);y!==g&&(m=y-f);let v=e=>-m*Math.exp(-e/r),b=e=>{let t=v(e);p.done=Math.abs(t)<=u,p.value=p.done?y:y+t},x=e=>{let t;if((t=p.value)<a||t>l){var n;d=e,h=mL({keyframes:[p.value,(n=p.value,void 0===a?l:void 0===l||Math.abs(a-n)<Math.abs(l-n)?a:l)],velocity:-v(e)/r*1e3,damping:i,stiffness:o,restDelta:u,restSpeed:c})}};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,b(e),x(e)),void 0!==d&&e>=d)?h.next(e-d):(t||b(e),p)}}}mL.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(mC(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:i/1e3}}(e,100,mL);return e.ease=t.ease,e.duration=fP(t.duration),e.type="keyframes",e};let mD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function mN(e,t,n,r){return e===t&&n===r?ff:i=>0===i||1===i?i:mD(function(e,t,n,r,i){let o,s,a=0;do(o=mD(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s;while(Math.abs(o)>1e-7&&++a<12)return s}(i,0,1,e,n),t,r)}let mz=mN(.42,0,1,1),mB=mN(0,0,.58,1),mF=mN(.42,0,.58,1),mH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,mU=e=>t=>1-e(1-t),mW=mN(.33,1.53,.69,.99),mq=mU(mW),mG=mH(mq),mY=e=>e>=1?1:(e*=2)<1?.5*mq(e):.5*(2-Math.pow(2,-10*(e-1))),mK=e=>1-Math.sin(Math.acos(e)),mZ=mU(mK),mX=mH(mK),mJ={linear:ff,easeIn:mz,easeInOut:mF,easeOut:mB,circIn:mK,circInOut:mX,circOut:mZ,backIn:mq,backInOut:mG,backOut:mW,anticipate:mY},mQ=e=>{if(fU(e)){he(e.length);let[t,n,r,i]=e;return mN(t,n,r,i)}return"string"==typeof e?(he(mJ[e],`Invalid easing type '${e}'`),mJ[e]):e},m0=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1};function m1({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){var i;let o,s=Array.isArray(r)&&"number"!=typeof r[0]?r.map(mQ):mQ(r),a={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(he(t.length),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,n){let r=[],i=n||fp.mix||m_,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=mh(Array.isArray(t)?t[n]||ff:t,o)),r.push(o)}return r}(t,r,i),l=a.length,u=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=m0(e[r],e[r+1],n);return a[r](i)};return n?t=>u(hc(e[0],e[o-1],t)):u}((i=n&&n.length===t.length?n:(!function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=m0(0,t,r);e.push(pC(n,1,i))}}(o=[0],t.length-1),o),i.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||mF).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(a.value=l(t),a.done=t>=e,a)}}let m2={decay:mV,inertia:mV,tween:m1,keyframes:m1,spring:mL};function m5(e){"string"==typeof e.type&&(e.type=m2[e.type])}let m3=e=>e/100;class m4 extends fH{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==f0.now()&&this.tick(f0.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;m5(e);let{type:t=m1,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:s}=e,a=t||m1;a!==m1&&"number"!=typeof s[0]&&(this.mixKeyframes=mh(m3,m_(s[0],s[1])),s=[0,100]);let l=a({...e,keyframes:s}
15);"mirror"===i&&(this.mirroredGenerator=a({...e,keyframes:[...s].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=mC(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let n,{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let b=this.currentTime,x=r;if(d){let e=Math.min(this.currentTime,i)/a,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,f&&(n-=f/a)):"mirror"===h&&(x=s)),b=hc(0,1,n)*a}v?(this.delayState.value=c[0],n=this.delayState):n=x.next(b),o&&!v&&(n.value=o(n.value));let{done:w}=n;v||null===l||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&p!==mV&&(n.value=fF(c,this.options,g,this.speed)),m&&m(n.value),k&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=fP(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e,t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let n=this.generator.next(t).value;return f1(n-(e=>this.generator.next(e).value)(e=Math.max(t-5,0)),t-e)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(f0.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=mj,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(f0.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let m6={anticipate:mY,backInOut:mG,circInOut:mX};class m8 extends fZ{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in m6&&(e.ease=m6[e.ease])}(e),m5(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new m4({...o,autoplay:!1}),a=Math.max(10,f0.now()-this.startTime),l=hc(0,10,a-10),u=s.sample(a).value,{name:c}=this.options;i&&c&&fL(i,c,u),t.setWithVelocity(s.sample(Math.max(0,a-l)).value,u,l),s.stop()}}let m7=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(hV.test(e)||"0"===e)&&!e.startsWith("url("));function m9(e){e.duration=0,e.type="keyframes"}let ge=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,gt=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),gn=fV(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class gr extends fH{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:
15o="loop",keyframes:s,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=f0.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:a,motionValue:l,element:u,...c},h=u?.KeyframeResolver||fC;this.keyframeResolver=new h(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){let i;this.keyframeResolver=void 0;let{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=f0.now();let d=!0;!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=m7(i,t),a=m7(o,t);return d9(`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||fK(n))&&r)}(e,o,s,a)&&(d=!1,(fp.instantAnimations||!l)&&c?.(fF(e,n,t)),e[0]=e[e.length-1],m9(n),n.repeat=0);let h={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=d&&!u&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:a}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:c}=t.owner.getProps();return gn()&&n&&(fX.has(n)||gt.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&ge.test(e[t]))return!0;return!1}(a))&&("transform"!==n||!c)&&!u&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(h),p=h.motionValue?.owner?.current;if(f)try{i=new m8({...h,element:p})}catch{i=new m4(h)}else i=new m4(h);i.finished.then(()=>{this.notifyFinished()}).catch(ff),this.pendingTimeline&&(this.stopTimeline=i.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=i}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fE=!0,fj(),f_(),fE=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let gi={type:"spring",stiffness:500,damping:25,restSpeed:10},go={type:"keyframes",duration:.8},gs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ga=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),gl=(e,t,n,r={},i,o)=>s=>{let a=mu(r,e)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u-=fP(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function(e){for(let t in e)if(!ga.has(t))return!0;return!1}(a)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?go:hu.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:gi:gs)(e,c)),c.duration&&(c.duration=fP(c.duration)),c.repeatDelay&&(c.repeatDelay=fP(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(m9(c),0===c.delay&&(d=!0)),(fp.instantAnimations||fp.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,m9(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&void 0!==t.get()){let e=fF(c.keyframes,a);if(void 0!==e)return void fy.update(()=>{c.onUpdate(e),c.onComplete()})}return a.isSync?new m4(c):new gr(c)},gu="u">typeof window;function gc(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...a}=t,l=e.getDefaultTransition();o=o?ml(o,l):l;let u=o?.reduceMotion,c=o?.skipAnimations;r&&(o=r);let d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=o?.path;for(let t in f&&f.animateVisualElement(e,a,o,n,d),a){let r=e.getValue(t,e.latestValues[t]??null),i=a[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let s={delay:n,...mu(o||{},t)};c&&(s.skipAnimations=!0);let l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!s.velocity){fy.update(()=>r.set(i));continue}let f=!1;if(gu&&window.MotionHandoffAnimation){let n=e.props[mn];if(n){let e=window.MotionHandoffAnimation(n,t,fy);null!==e&&(s.startTime=e,f=!0)}}md(e,t);let p=u??e.shouldReduceMotion;r.start(gl(t,r,i,p&&hJ.has(t)?{type:!1}:s,e,f));let m=r.animation;m&&d.push(m)}if(s){let t=()=>fy.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=ma(e,t)||{};for(let t in i={...i,...n}){var o;let n=mc(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,f3(n))}}(e,s)});d.length?Promise.all(d).then(t):t()}return d}function gd(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
15e.sortNodePosition(t)).indexOf(t),s=e.size,a=(s-1)*r;return"function"==typeof n?n(o,s):1===i?o*r:a-o*r}function gh(e,t,n={}){let r=ma(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let o=r?()=>Promise.all(gc(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,i=0,o=1,s){let a=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),a.push(gh(l,t,{...s,delay:n+("function"==typeof r?0:r)+gd(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,r,o,s,a,n)}:()=>Promise.resolve(),{when:a}=i;if(!a)return Promise.all([o(),s(n.delay)]);{let[e,t]="beforeChildren"===a?[o,s]:[s,o];return e().then(()=>t())}}let gf=pe.length;function gp(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}let gm=[...f9].reverse(),gg=f9.length;function gy(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gv(){return{animate:gy(!0),whileInView:gy(),whileHover:gy(),whileTap:gy(),whileDrag:gy(),whileFocus:gy(),exit:gy()}}let gb=0;function gx(e){return[e("x"),e("y")]}function gw(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}let gk={x:!1,y:!1};function gS(e){return e.max-e.min}function gE(e,t,n,r=.5){e.origin=r,e.originPoint=pC(t.min,t.max,e.origin),e.scale=gS(n)/gS(t),e.translate=pC(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function g_(e,t,n,r){gE(e.x,t.x,n.x,r?r.originX:void 0),gE(e.y,t.y,n.y,r?r.originY:void 0)}function gj(e,t,n,r=0){e.min=(r?pC(n.min,n.max,r):n.min)+t.min,e.max=e.min+gS(t)}function gC(e,t,n,r=0){let i=r?pC(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+gS(t)}function gM(e,t,n,r){gC(e.x,t.x,n.x,r?.x),gC(e.y,t.y,n.y,r?.y)}function g$(e){return d0(e)&&"ownerSVGElement"in e}function gA(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}let gT=new WeakMap,gP=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:g$(r)&&"getBBox"in r?r.getBBox()[t]:r[n],gI=gP("inline","width","offsetWidth"),gR=gP("block","height","offsetHeight");function gO({target:e,borderBoxSize:t}){gT.get(e)?.forEach(n=>{n(e,{get width(){return gI(e,t)},get height(){return gR(e,t)}})})}function gL(e){e.forEach(gO)}let gV=new Set;function gD(e,t){let n;return"function"==typeof e?(gV.add(e),l||(l=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};gV.forEach(t=>t(e))},window.addEventListener("resize",l)),()=>{gV.delete(e),gV.size||"function"!=typeof l||(window.removeEventListener("resize",l),l=void 0)}):(!a&&"u">typeof ResizeObserver&&(a=new ResizeObserver(gL)),(n=gA(e)).forEac
15h(e=>{let n=gT.get(e);n||(n=new Set,gT.set(e,n)),n.add(t),a?.observe(e)}),()=>{n.forEach(e=>{let n=gT.get(e);n?.delete(t),n?.size||a?.unobserve(e)})})}let gN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),gz=new Set(["INPUT","SELECT","TEXTAREA"]),gB=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function gF(e){return{point:{x:e.pageX,y:e.pageY}}}function gH(e,t,n,r){return gw(e,t,e=>gB(e)&&n(e,gF(e)),r)}let gU=({current:e})=>e?e.ownerDocument.defaultView:null,gW=(e,t)=>Math.abs(e-t),gq=new Set(["auto","scroll"]);class gG{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gY(this.lastRawMoveEventInfo,this.transformPagePoint));let n=gZ(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(gW(e.x,t.x)**2+gW(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!i)return;let{point:o}=n,{timestamp:s}=fb;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=gY(t,this.transformPagePoint),fy.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=gZ("pointercancel"===e.type?this.lastMoveEventInfo:gY(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!gB(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const a=gY(gF(e),this.transformPagePoint),{point:l}=a,{timestamp:u}=fb;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,gZ(a,this.history));const d={passive:!0,capture:!0};this.removeListeners=mh(gH(this.contextWindow,"pointermove",this.handlePointerMove,d),gH(this.contextWindow,"pointerup",this.handlePointerUp,d),gH(this.contextWindow,"pointercancel",this.handlePointerUp,d)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(gq.has(e.overflowX)||gq.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(0!==i.x||0!==i.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),fy.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),fv(this.updatePoint)}}function gY(e,t){return t?{point:t(e.point)}:e}function gK(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gZ({point:e},t){return{point:e,delta:gK(e,gX(t)),offset:gK(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,n=null,r=gX(e);for(;t>=0&&(n=e[t],!(r.timestamp-n.timestamp>fP(.1)));)t--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&r.timestamp-n.timestamp>2*fP(.1)&&(n=e[1]);let i=(r.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};let o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(t)}}function gX(e){return e[e.length-1]}function gJ(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function gQ(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}
15function g0(e,t,n){return{min:g1(e,t),max:g1(e,n)}}function g1(e,t){return"number"==typeof e?e:e[t]||0}let g2=new WeakMap;class g5{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=hZ(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let i=e=>{t&&this.snapToCursor(gF(e).point),this.stopAnimation()},o=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(gk[e])return null;else return gk[e]=!0,()=>{gk[e]=!1};return gk.x||gk.y?null:(gk.x=gk.y=!0,()=>{gk.x=gk.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gx(e=>{let t=this.getAxisMotionValue(e).get()||0;if(hE.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=gS(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&fy.update(()=>i(e,t),!1,!0),md(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&fy.update(()=>o(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new gG(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:gU(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&fy.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!g4(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?pC(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?pC(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&mi(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:gJ(e.x,n,i),y:gJ(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:g0(e,"left","right"),y:g0(e,"top","bottom")}}(t),r!==this.constraints&&!mi(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&gx(e=>{var t,r;let i;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=n.layoutBox[e],r=this.constraints[e],i={},void 0!==r.min&&(i.min=r.min-t.min),void 0!==r.max&&(i.max=r.max-t.min),i))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!mi(t))return!1;let r=t.current;he();let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let o=function(e,t,n){let r=pW(e,n),{scroll:i}=t;return i&&(pB(r.x,i.offset.x),pB(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),s=(e=i.layout.layoutBox,{x:gQ(e.x,o.x),y:gQ(e.y,o.y)});if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=pI(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(gx(s=>{if(!g4(s,t,this.currentDirection))return;let l=a&&a[s]||{};(!0===o||o===s)&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return md(this.visualElement,e),n.start(gl(e,n,0,t,this.visualElement,!1))}stopAnimation(){gx(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){gx(t=>{let{drag:n}=this.getProps();if(!g4(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-pC(n,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!mi(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};gx(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var n,i;let o,s,a,l=t.get();r[e]=(n={min:l,max:l},i=this.constraints[e],o=.5,s=gS(n),(a=gS(i))>s?o=m0(i.min,i.max-s,n.min):s>a&&(o=m0(n.min,n.max-a,i.min)),hc(0,1,o))}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),gx(t=>{if(!g4(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(pC(i,o,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;g2.set(this.visualElement,this);let t=this.visualElement.current,n=gH(t,"pointerdown",e=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=e.target,o=i!==t&&(gz.has(i.tagName)||!0===i.isContentEditable);n&&r&&!o&&this.start(e)}),r=()=>{var n,r,i;let o,s,{dragConstraints:a}=this.getProps();mi(a)&&a.current&&(this.constraints=this.resolveRefConstraints(),e||(n=t,r=a.current,o=gD(n,g3(i=()=>this.scalePositionWithinConstraints())),s=gD(r,g3(i)),e=()=>{o(),s()}))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),fy.read(r);let s=gw(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(gx(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function g3(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function g4(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let g6=e=>(t,n)=>{e&&fy.update(()=>e(t,n),!1,!0)},g8={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var g7=r_;let g9=!1;class ye extends g7.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),g9&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),g8.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),g9=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||fy.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),fJ.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;g9=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function yt(e){let[t,n]=function(e=!0){let t=(0,r_.useContext)(dX);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,o=(0,r_.useId)();(0,r_.useEffect)(()=>
15{if(e)return i(o)},[e]);let s=(0,r_.useCallback)(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}(),r=(0,g7.useContext)(pK);return(0,sL.jsx)(ye,{...e,layoutGroup:r,switchLayoutGroup:(0,g7.useContext)(mr),isPresent:t,safeToRemove:n})}let yn=pE.length,yr=e=>"string"==typeof e?parseFloat(e):e,yi=e=>"number"==typeof e||h_.test(e);function yo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ys=yl(0,.5,mZ),ya=yl(.5,.95,ff);function yl(e,t,n){return r=>r<e?0:r>t?1:n(m0(e,t,r))}function yu(e,t){e.min=t.min,e.max=t.max}function yc(e,t){yu(e.x,t.x),yu(e.y,t.y)}function yd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function yh(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function yf(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(hE.test(t)&&(t=parseFloat(t),t=pC(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=pC(o.min,o.max,r);e===o&&(a-=t),e.min=yh(e.min,t,n,a,i),e.max=yh(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let yp=["x","scaleX","originX"],ym=["y","scaleY","originY"];function yg(e,t,n,r){yf(e.x,t,yp,n?n.x:void 0,r?r.x:void 0),yf(e.y,t,ym,n?n.y:void 0,r?r.y:void 0)}function yy(e){return 0===e.translate&&1===e.scale}function yv(e){return yy(e.x)&&yy(e.y)}function yb(e,t){return e.min===t.min&&e.max===t.max}function yx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yw(e,t){return yx(e.x,t.x)&&yx(e.y,t.y)}function yk(e){return gS(e.x)/gS(e.y)}function yS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class yE{constructor(){this.members=[]}add(e){fI(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&!1!==r.isConnected||n.snapshot||(fR(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(fR(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(void 0===r||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let y_=(e,t)=>e.depth-t.depth;class yj{constructor(){this.children=[],this.isDirty=!1}add(e){fI(this.children,e),this.isDirty=!0}remove(e){fR(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(y_),this.isDirty=!1,this.children.forEach(e)}}let yC=["","X","Y","Z"],yM=0;function y$(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=yM++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
15{this.projectionUpdateScheduled=!1,this.nodes.forEach(yI),this.nodes.forEach(yF),this.nodes.forEach(yH),this.nodes.forEach(yR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new yj)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new fO),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=g$(t)&&!(g$(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;fy.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==r){let t,o;r=e,this.root.updateBlockedByResize=!0,n&&n(),t=f0.now(),o=({timestamp:e})=>{let n=e-t;n>=250&&(fv(o),i())},fy.setup(o,!0),n=()=>fv(o),g8.hasAnimatedSinceResize&&(g8.hasAnimatedSinceResize=!1,this.nodes.forEach(yB))}})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||i.getDefaultTransition()||yK,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!yw(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...mu(o,"layout"),onPlay:s,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||yB(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fv(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yU),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[mn];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",fy,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEac
15h(yV),this.nodes.forEach(yL);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(yD);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yN),this.nodes.forEach(yz),this.nodes.forEach(yT),this.nodes.forEach(yP)):this.nodes.forEach(yD),this.clearAllSnapshots();let e=f0.now();fb.delta=hc(0,1e3/60,e-fb.timestamp),fb.timestamp=e,fb.isProcessing=!0,fx.update.process(fb),fx.preRender.process(fb),fx.render.process(fb),fb.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fJ.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yO),this.sharedNodes.forEach(yW)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fy.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fy.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||gS(this.snapshot.measuredBox.x)||gS(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=hZ()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!yv(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||pL(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),yJ((t=r).x),yJ(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return hZ();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(y0))){let{scroll:e}=this.root;e&&(pB(t.x,e.offset.x),pB(t.y,e.offset.y))}return t}removeElementScroll(e){let t=hZ();if(yc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&yc(t,e),pB(t.x,i.offset.x),pB(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||hZ();yc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(pB(r.x,-n.scroll.offset.x),pB(r.y,-n.scroll.offset.y)),pL(n.latestValues)&&pU(r,n.latestValues,n.layout?.layoutBox)}return pL(this.latestValues)&&pU(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=hZ();yc(t,e);for(let e=0;e<this.path.length;e++){let n,r=this.path[e];pL(r.latestValues)&&(r.instance&&(pO(r.latestValues)&&r.updateSnapshot(),yc(n=hZ(),r.measurePageBox())),yg(t,r.latestValues,r.snapshot?.layoutBox,n))}return pL(this.latestValues)&&yg(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==fb.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
15isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=fb.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=hZ(),this.targetWithTransforms=hZ()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,a,l,u;this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,gj(s.x,a.x,l.x,u?.x),gj(s.y,a.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):yc(this.target,this.layout.layoutBox),pz(this.target,this.targetDelta)):yc(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||pO(this.parent.latestValues)||pV(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=hZ(),this.relativeTargetOrigin=hZ(),gM(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),yc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===fb.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;yc(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){let i,o,s=n.length;if(s){t.x=t.y=1;for(let a=0;a<s;a++){o=(i=n[a]).projectionDelta;let{visualElement:s}=i.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(pB(e.x,-i.scroll.offset.x),pB(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,pz(e,o)),r&&pL(i.latestValues)&&pU(e,i.latestValues,i.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=hZ());let{target:a}=e;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(yd(this.prevProjectionDelta.x,this.projectionDelta.x),yd(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),g_(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&yS(this.projectionDelta.x,this.prevProjectionDelta.x)&&yS(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hY(),this.projectionDelta=hY(),this.projectionDeltaWithTransform=hY()}setAnimationOrigin(e,t=!1,n){let r,i=this.snapshot,o=i?i.latestValues:{},s={...this.latestValues},a=hY();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=hZ(),u=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,h=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(yY));this.animationProgress=0;let f=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,i=f?.(n);if(i?(a.x.translate=i.x,a.x.scale=pC(e.x.scale,1,n),a.x.origin=e.x.origin,a.x.originPoint=e.x.originPoint,a.y.translate=i.y,a.y.scale=pC(e.y.scale,1,n),a.y.origin=e.y.origin,a.y.originPoint=e.y.originPoint):(yq(a.x,e.x,n),yq(a.y,e.y,n)),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,p,m,g,y,v;gM(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,y=l,v=n,yG(m.x,g.x,y.x,v),yG(m.y,g.y,y.y,v),r&&(c=this.relativeTarget,p=r,yb(c.x,p.x)&&yb(c.y,p.y))&&(this.isProjectionDirty=!1),r||(r=hZ()),yc(r,this.relativeTarget)}u&&(this.animationValues=s,function(e,t,n,r,i,o){i?(e.opacity=pC(0,n.opacity??1,ys(r)),e.opacityExit=pC(t.opacity??1,0,ya(r))):o&&(e.opacity=pC(t.opacity??1,n.opacity??1,r));for(let i=0;i<yn;i++){let o=pE[i],s=yo(t,o),a=yo(n,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||yi(s)===yi(a)?(e[o]=Math.max(pC(yr(s),yr(a),r),0),(hE.test(a)||hE.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=pC(t.rotate||0,n.rotate||0,r))}(s,o,this.latestValues,n,h,d)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=s),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(fv(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fy.update(()=>{var t,n,r;let i;g8.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=f3(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,n=[0,1e3],r={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}},(i=hX(t)?t:f3(t)).start(gl("",i,n,r)),i.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&yQ(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||hZ();let t=gS(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=gS(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}yc(t,n),pU(t,i),g_(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
15)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new yE),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&y$("z",e,r,this.animationValues);for(let t=0;t<yC.length;t++)y$(`rotate${yC[t]}`,e,r,this.animationValues),y$(`skew${yC[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=p3(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=p3(t?.pointerEvents)||""),this.hasProjected&&!pL(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
15let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:o,rotateY:s,skewX:a,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),o&&(r+=`rotateX(${o}deg) `),s&&(r+=`rotateY(${s}deg) `),a&&(r+=`skewX(${a}deg) `),l&&(r+=`skewY(${l}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:s,y:a}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*a.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,pM){if(void 0===i[t])continue;let{correct:n,applyTo:s,isCSSVariable:a}=pM[t],l="none"===o?i[t]:n(i[t],r);if(s){let t=s.length;for(let n=0;n<t;n++)e[s[n]]=l}else a?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?p3(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(yL),this.root.sharedNodes.clear()}}}function yT(e){e.updateLayout()}function yP(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)gx(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=gS(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){let e="x"===i?"y":"x";yu(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else yQ(i,t.layoutBox,n)&&gx(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],s=gS(n[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=hY();g_(s,n,t.layoutBox);let a=hY();o?g_(a,e.applyTransform(r,!0),t.measuredBox):g_(a,n,t.layoutBox);let l=!yv(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=e.options.layoutAnchor||void 0,a=hZ();gM(a,t.layoutBox,i.layoutBox,s);let l=hZ();gM(l,n,o.layoutBox,s),yw(a,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function yI(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yO(e){e.clearSnapshot()}function yL(e){e.clearMeasurements()}function yV(e){e.isLayoutDirty=!0,e.updateLayout()}function yD(e){e.isLayoutDirty=!1}function yN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function yz(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yB(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yF(e){e.resolveTargetDelta()}function yH(e){e.calcProjection()}function yU(e){e.resetSkewAndRotation()}function yW(e){e.removeLeadSnapshot()}function yq(e,t,n){e.translate=pC(t.translate,0,n),e.scale=pC(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function yG(e,t,n,r){e.min=pC(t.min,n.min,r),e.max=pC(t.max,n.max,r)}function yY(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let yK={duration:.45,ease:[.4,0,.1,1]},yZ=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yX=yZ("applewebkit/")&&!yZ("chrome/")?Math.round:ff;function yJ(e){e.min=yX(e.min),e.max=yX(e.max)}
15function yQ(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(yk(t)-yk(n)))}function y0(e){return e!==e.root&&e.scroll?.wasRoot}let y1=yA({attachResizeListener:(e,t)=>gw(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),y2={current:void 0},y5=yA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!y2.current){let e=new y1({});e.mount(window),e.setOptions({layoutScroll:!0}),y2.current=e}return y2.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function y3(e,t){let n=gA(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function y4(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&fy.postRender(()=>i(t,gF(t)))}let y6=(e,t)=>!!t&&(e===t||y6(e,t.parentElement)),y8=new WeakSet;function y7(e){return t=>{"Enter"===t.key&&e(t)}}function y9(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ve(e){return gB(e)&&!(gk.x||gk.y)}let vt=new WeakSet;
15function vn(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&fy.postRender(()=>i(t,gF(t)))}let vr=new WeakMap,vi=new WeakMap,vo=e=>{let t=vr.get(e.target);t&&t(e)},vs=e=>{e.forEach(vo)},va={some:0,all:1},vl=function(e,t){if("u"<typeof Proxy)return mo;let n=new Map,r=(n,r)=>mo(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,mo(o,void 0,e,t)),n.get(o))})}({animation:{Feature:class extends ms{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>gh(e,t,n)));else if("string"==typeof t)r=gh(e,t,n);else{let i="function"==typeof t?ma(e,t,n.custom):t;r=Promise.all(gc(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=gv(),r=!0,i=!1,o=t=>(n,r)=>{let i=ma(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function s(s){let{props:a}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<gf;e++){let r=pe[e],i=t.props[r];(f7(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<gg;t++){var f,p;let m=gm[t],g=n[m],y=void 0!==a[m]?a[m]:l[m],v=f7(y),b=m===s?g.isActive:null;!1===b&&(h=t);let x=y===l[m]&&y!==a[m]&&v;if(x&&(r||i)&&e.manuallyAnimateOnMount&&(x=!1),g.protectedKeys={...d},!g.isActive&&null===b||!y&&!g.prevProp||f8(y)||"boolean"==typeof y)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let w=(f=g.prevProp,"string"==typeof(p=y)?p!==f:!!Array.isArray(p)&&!gp(p,f)),k=w||m===s&&g.isActive&&!x&&v||t>h&&v,S=!1,E=Array.isArray(y)?y:[y],_=E.reduce(o(m),{});!1===b&&(_={});let{prevResolvedValues:j={}}=g,C={...j,..._},M=t=>{k=!0,c.has(t)&&(S=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in C){let t=_[e],n=j[e];if(!d.hasOwnProperty(e))(mc(t)&&mc(n)?!gp(t,n)||w:t!==n)?null!=t?M(e):c.add(e):void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0}g.prevProp=y,g.prevResolvedValues=_,g.isActive&&(d={...d,..._}),(r||i)&&e.blockInitialAnimation&&(k=!1);let $=x&&w,A=!$||S;k&&A&&u.push(...E.map(t=>{let n={type:m};if("string"==typeof t&&(r||i)&&!$&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ma(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=gd(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof a.initial){let n=ma(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let m=!!u.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,i=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=gv(),i=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();f8(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ms{constructor(){super(...arguments),this.id=gb++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let n=ma(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
15{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends ms{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.stopObserver?.();let{viewport:n={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:s}=n,a={root:r?r.current:void 0,rootMargin:i,threshold:"number"==typeof o?o:va[o]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,s&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)};this.stopObserver=(e=this.node.current,t=function({root:e,...t}){let n=e||document;vi.has(n)||vi.set(n,{});let r=vi.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(vs,{root:e,...t})),r[i]}(a),vr.set(e,l),t.observe(e),()=>{vr.delete(e),t.unobserve(e)})}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends ms{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[r,i,o]=y3(e,n),s=e=>{let r=e.currentTarget;if(!ve(e)||vt.has(e))return;y8.add(r),n.stopPropagation&&vt.add(e);let o=t(r,e),s={...i,capture:!0},a=(e,t)=>{window.removeEventListener("pointerup",l,s),window.removeEventListener("pointercancel",u,s),y8.has(r)&&y8.delete(r),ve(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{a(e,r===window||r===document||n.useGlobalTarget||y6(r,e.target))},u=e=>{a(e,!1)};window.addEventListener("pointerup",l,s),window.addEventListener("pointercancel",u,s)};return r.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),d1(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let r=y7(()=>{if(y8.has(n))return;y9(n,"down");let e=y7(()=>{y9(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>y9(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),gN.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(vn(this.node,t,"Start"),(e,{success:t})=>vn(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}},focus:{Feature:class extends ms{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=mh(gw(this.node.current,"focus",()=>this.onFocus()),gw(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ms{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=y3(e,n);return r.forEach(e=>{let n,r=!1,o=!1,s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},a=e=>{r=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(r){o=!0;return}s(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||gk.x||gk.y)return;o=!1;let s=t(e,r);"function"==typeof s&&(n=s,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",a,i)},i)}),o}(e,(e,t)=>(y4(this.node,t,"Start"),e=>y4(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends ms{constructor(){super(...arguments),this.removePointerDownListener=ff}onPointerDown(e){this.session=new gG(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gU(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:g6(e),onStart:g6(t),onMove:g6(n),onEnd:(e,t)=>{delete this.session,r&&fy.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=gH(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ms{constructor(e){super(e),this.removeGroupControls=ff,this.removeListeners=ff,this.controls=new g5(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ff}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:y5,MeasureLayout:yt},layout:{ProjectionNode:y5,MeasureLayout:yt}},(e,t)=>t.isSVG??pY(e)?new pP(t):new pq(t,{allowProjection:e!==r_.Fragment})),vu=[0,0,0,0],vc={top:["bottom","left","right"],"top-start":["bottom-start","left-start","right-start"],"top-end":["bottom-end","left-end","right-end"],bottom:["top","left","right"],"bottom-start":["top-start","left-start","right-start"],"bottom-end":["top-end","left-end","right-end"],left:["right","top","bottom"],"left-start":["right-start","to
15p-start","bottom-start"],"left-end":["right-end","top-end","bottom-end"],right:["left","top","bottom"],"right-start":["left-start","top-start","bottom-start"],"right-end":["left-end","top-end","bottom-end"]},vd=l8(vl.create(uV)).withConfig({displayName:"MotionCard",componentId:"sc-wieb5w-0"})`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`;function vh(e){let t,n,r,i=(0,tt.c)(61),o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C;i[0]===e?(o=i[1],s=i[2],a=i[3],l=i[4],u=i[5],c=i[6],d=i[7],h=i[8],f=i[9],p=i[10],m=i[11],g=i[12],y=i[13],v=i[14],b=i[15],x=i[16],w=i[17],k=i[18],S=i[19],E=i[20],_=i[21],j=i[22],C=i[23]):({__unstable_margins:d,animate:o,arrow:s,arrowRef:a,arrowX:l,arrowY:u,children:c,padding:m,placement:g,originX:h,originY:f,overflow:p,radius:y,ref:v,scheme:x,shadow:w,strategy:k,style:S,tone:E,width:_,x:j,y:C,...b}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=a,i[4]=l,i[5]=u,i[6]=c,i[7]=d,i[8]=h,i[9]=f,i[10]=p,i[11]=m,i[12]=g,i[13]=y,i[14]=v,i[15]=b,i[16]=x,i[17]=w,i[18]=k,i[19]=S,i[20]=E,i[21]=_,i[22]=j,i[23]=C);let{zIndex:M}=uK(),$=d||vu,A=(j??0)+$[3],T=(C??0)+$[0],P;i[24]!==h||i[25]!==f?(P=hn(h,f),i[24]=h,i[25]=f,i[26]=P):P=i[26];let I=o?"transform":void 0,R;i[27]!==k||i[28]!==S||i[29]!==P||i[30]!==I||i[31]!==_||i[32]!==A||i[33]!==T||i[34]!==M?(R={left:A,position:k,top:T,transformOrigin:P,width:_,zIndex:M,willChange:I,...S},i[27]=k,i[28]=S,i[29]=P,i[30]=I,i[31]=_,i[32]=A,i[33]=T,i[34]=M,i[35]=R):R=i[35];let O=R,L=null===l?void 0:l,V=null===u?void 0:u,D;i[36]!==L||i[37]!==V?(D={left:L,top:V,right:void 0,bottom:void 0},i[36]=L,i[37]=V,i[38]=D):D=i[38];let N=D,z=o?sJ:void 0,B;return i[39]!==c||i[40]!==m?(B=(0,sL.jsx)(u5,{direction:"column",flex:1,padding:m,children:c}),i[39]=c,i[40]=m,i[41]=B):B=i[41],i[42]!==p||i[43]!==B?(t=(0,sL.jsx)(u5,{"data-ui":"Popover__wrapper",direction:"column",flex:1,overflow:p,children:B}),i[42]=p,i[43]=B,i[44]=t):t=i[44],i[45]!==s||i[46]!==a||i[47]!==N?(n=s&&(0,sL.jsx)(cP,{ref:a,style:N,width:19,height:8,radius:2}),i[45]=s,i[46]=a,i[47]=N,i[48]=n):n=i[48],i[49]!==g||i[50]!==y||i[51]!==v||i[52]!==b||i[53]!==O||i[54]!==x||i[55]!==w||i[56]!==z||i[57]!==t||i[58]!==n||i[59]!==E?(r=(0,sL.jsxs)(vd,{"data-ui":"Popover",...b,"data-placement":g,radius:y,ref:v,scheme:x,shadow:w,sizing:"border",style:O,tone:E,...z,children:[t,n]}),i[49]=g,i[50]=y,i[51]=v,i[52]=b,i[53]=O,i[54]=x,i[55]=w,i[56]=z,i[57]=t,i[58]=n,i[59]=E,i[60]=r):r=i[60],r}let vf=()=>{let e=(0,tt.c)(2),{zIndex:t}=uK(),n;return e[0]===t?n=e[1]:(n=(0,sL.jsx)("div",{"data-ui":"PopoverOverlay",style:{height:"100vh",inset:0,position:"fixed",width:"100vw",zIndex:t}}),e[0]=t,e[1]=n),n};function vp(e){let t,n,r,i,o,s,a,l=(0,tt.c)(126),{container:u,layer:c}=ux(),d=cE(),h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C,M,$,A,T,P,I,R,O,L,V,D,N,z;if(l[0]!==e){let{__unstable_margins:t,animate:n,arrow:r,children:i,constrainSize:o,content:s,disabled:a,fallbackPlacements:u,matchReferenceWidth:c,floatingBoundary:d,modal:B,onActivate:F,open:H,overflow:U,padding:W,placement:q,placementStrategy:G,portal:Y,preventOverflow:K,radius:Z,ref:X,referenceBoundary:J,referenceElement:Q,scheme:ee,shadow:et,tone:en,width:er,zOffset:ei,updateRef:eo,...es}=e;M=t,$=n,P=r,g=i,I=o,y=s,v=a,h=u,x=c,f=d,w=B,k=H,R=U,S=W,O=q,L=G,E=Y,V=K,D=Z,b=X,p=J,_=Q,C=ee,N=et,A=en,T=er,m=ei,z=eo,j=es,l[0]=e,l[1]=h,l[2]=f,l[3]=p,l[4]=m,l[5]=g,l[6]=y,l[7]=v,l[8]=b,l[9]=x,l[10]=w,l[11]=k,l[12]=S,l[13]=E,l[14]=_,l[15]=j,l[16]=C,l[17]=M,l[18]=$,l[19]=A,l[20]=T,l[21]=P,l[22]=I,l[23]=R,l[24]=O,l[25]=L,l[26]=V,l[27]=D,l[28]=N,l[29]=z}else h=l[1],f=l[2],p=l[3],m=l[4],g=l[5],y=l[6],v=l[7],b=l[8],x=l[9],w=l[10],k=l[11],S=l[12],E=l[13],_=l[14],j=l[15],C=l[16],M=l[17],$=l[18],A=l[19],T=l[20],P=l[21],I=l[22],R=l[23],O=l[24],L=l[25],V=l[26],D=l[27],N=l[28],z=l[29];let B=void 0===M?vu:M,F=void 0!==$&&$,H=void 0!==P&&P,U=void 0!==I&&I,W=void 0===R?"hidden":R,q=void 0===O?"bottom":O,G=void 0===L?"flip":L,Y=void 0===V||V,K=void 0===D?3:D,Z=void 0===N?3:N,X=void 0===A?"inherit":A,J=void 0===T?"auto":T,Q=h??vc[e.placement??"bottom"],ee=f??d.element,et=p??d.element,en=d.element??ee,er=m??c.popover.zOffset,ei=!uB()&&F,eo=function(e){let t=(0,tt.c)(3),[n,r]=(0,r_.useState)(null),i,o;return t[0]===e?(i=t[1],o=t[2]):(i=()=>
15{if(e)return cG.subscribe(e,r)},o=[e],t[0]=e,t[1]=i,t[2]=o),(0,r_.useEffect)(i,o),n}(en)?.border,es;l[30]===S?es=l[31]:(es=s1(S),l[30]=S,l[31]=es);let ea=es,el;l[32]===K?el=l[33]:(el=s1(K),l[32]=K,l[33]=el);let eu=el,ec;l[34]===Z?ec=l[35]:(ec=s1(Z),l[34]=Z,l[35]=ec);let ed=ec,eh=s1(J),ef;l[36]===er?ef=l[37]:(ef=s1(er),l[36]=er,l[37]=ef);let ep=ef,em=(0,r_.useRef)(null),eg=(0,r_.useRef)(null),ey;l[38]===Symbol.for("react.memo_cache_sentinel")?(ey=()=>em.current,l[38]=ey):ey=l[38],(0,r_.useImperativeHandle)(b,ey);let ev=uN(),eb=U||Y?eo?.width:void 0,ex=function(e){let{container:t,mediaIndex:n,width:r}=e,i=r[n],o=void 0===i?r[r.length-1]:i;return"number"==typeof o?t[o]:void 0}({container:u,mediaIndex:ev,width:eh}),ew=(0,r_.useRef)(ex),ek,eS;l[39]===ex?(ek=l[40],eS=l[41]):(ek=()=>{ew.current=ex},eS=[ex],l[39]=ex,l[40]=ek,l[41]=eS),(0,r_.useEffect)(ek,eS),l[42]!==eb||l[43]!==ex?(t=function(e){let{boundaryWidth:t,currentWidth:n}=e;if(void 0!==n||void 0!==t)return Math.min(n??1/0,(t||1/0)-8)}({boundaryWidth:eb,currentWidth:ex}),l[42]=eb,l[43]=ex,l[44]=t):t=l[44];let eE=t,e_=(0,r_.useRef)(eE),ej,eC;l[45]===eE?(ej=l[46],eC=l[47]):(ej=()=>{e_.current=eE},eC=[eE],l[45]=eE,l[46]=ej,l[47]=eC),(0,r_.useEffect)(ej,eC);let eM=(0,r_.useRef)(void 0),e$,eA;l[48]!==x||l[49]!==eE||l[50]!==k||l[51]!==ex?(e$=()=>{let e=em.current;if(!k||!e)return;let t=eM.current;x?void 0!==t&&(e.style.width=`${t}px`):void 0!==ex&&(e.style.width=`${ex}px`),"number"==typeof eE&&(e.style.maxWidth=`${eE}px`)},eA=[ex,x,eE,k],l[48]=x,l[49]=eE,l[50]=k,l[51]=ex,l[52]=e$,l[53]=eA):(e$=l[52],eA=l[53]),(0,r_.useEffect)(e$,eA);let[eT,eP]=(0,r_.useState)(void 0),eI;l[54]!==ei||l[55]!==H||l[56]!==U||l[57]!==Q||l[58]!==ee||l[59]!==B||l[60]!==x||l[61]!==q||l[62]!==G||l[63]!==Y||l[64]!==et?(eI={animate:ei,arrowProp:H,arrowRef:eg,constrainSize:U,fallbackPlacements:Q,floatingBoundary:ee,margins:B,matchReferenceWidth:x,maxWidthRef:e_,placementProp:q,placementStrategy:G,preventOverflow:Y,referenceBoundary:et,referenceWidthRef:eM,rootBoundary:"viewport",setReferenceWidth:eP,widthRef:ew},l[54]=ei,l[55]=H,l[56]=U,l[57]=Q,l[58]=ee,l[59]=B,l[60]=x,l[61]=q,l[62]=G,l[63]=Y,l[64]=et,l[65]=eI):eI=l[65];let eR=function(e){let t=(0,tt.c)(42),{animate:n,arrowProp:r,arrowRef:i,constrainSize:o,fallbackPlacements:s,floatingBoundary:a,margins:l,matchReferenceWidth:u,maxWidthRef:c,placementProp:d,placementStrategy:h,preventOverflow:f,referenceBoundary:p,referenceWidthRef:m,rootBoundary:g,setReferenceWidth:y,widthRef:v}=e,b;if(t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==o||t[4]!==s||t[5]!==a||t[6]!==l||t[7]!==u||t[8]!==c||t[9]!==d||t[10]!==h||t[11]!==f||t[12]!==p||t[13]!==m||t[14]!==g||t[15]!==y||t[16]!==v){let e;if(b=[],o||f)if("autoPlacement"===h){let e;t[18]!==s||t[19]!==d?(e=(0,hs.autoPlacement)({allowedPlacements:[d].concat(s)}),t[18]=s,t[19]=d,t[20]=e):e=t[20],b.push(e)}else{let e=a||void 0,n;t[21]!==s||t[22]!==g||t[23]!==e?(n=(0,hs.flip)({boundary:e,fallbackPlacements:s,padding:4,rootBoundary:g}),t[21]=s,t[22]=g,t[23]=e,t[24]=n):n=t[24],b.push(n)}if(t[25]===Symbol.for("react.memo_cache_sentinel")?(e=(0,hs.offset)({mainAxis:4}),t[25]=e):e=t[25],b.push(e),o||u){let e=a||void 0,n;t[26]!==o||t[27]!==l||t[28]!==u||t[29]!==c||t[30]!==m||t[31]!==y||t[32]!==e||t[33]!==v?(n=function(e){let{constrainSize:t,margins:n,matchReferenceWidth:r,maxWidthRef:i,padding:o=0,referenceWidthRef:s,setReferenceWidth:a,widthRef:l}=e;return{name:"@sanity/ui/size",async fn(u){let{elements:c,placement:d,platform:h,rects:f}=u,{floating:p,reference:m}=f,g=await (0,ha.detectOverflow)(u,{altBoundary:!0,boundary:e.boundaryElement||void 0,elementContext:"floating",padding:o,rootBoundary:"viewport"}),y=1/0,v=1/0,b=p.width,x=p.height;d.includes("top")&&(y=b-(g.left+g.right),v=x-g.top),d.includes("right")&&(y=b-g.right,v=x-(g.top+g.bottom)),d.includes("bottom")&&(y=b-(g.left+g.right),v=x-g.bottom),d.includes("left")&&(y=b-g.left,v=x-(g.top+g.bottom));let w=y-n[1]-n[3],k=v-n[0]-n[2],S=m.width-n[1]-n[3];s.current=S,a(S),r?c.floating.style.width=`${S}px`:void 0!==l.current&&(c.floating.style.width=`${l.current}px`),t&&(c.floating.style.maxWidth=`${Math.min(w,i.current??1/0)}px`,c.floating.style.maxHeight=`${k}
15px`);let E=await h.getDimensions(c.floating),_=E.height;return b!==E.width||x!==_?{reset:{rects:!0}}:{}}}}({boundaryElement:e,constrainSize:o,margins:l,matchReferenceWidth:u,maxWidthRef:c,padding:4,referenceWidthRef:m,setReferenceWidth:y,widthRef:v}),t[26]=o,t[27]=l,t[28]=u,t[29]=c,t[30]=m,t[31]=y,t[32]=e,t[33]=v,t[34]=n):n=t[34],b.push(n)}if(f){let e=a||void 0,n;t[35]!==g||t[36]!==e?(n=(0,hs.shift)({boundary:e,rootBoundary:g,padding:4}),t[35]=g,t[36]=e,t[37]=n):n=t[37],b.push(n)}if(r){let e;t[38]===i?e=t[39]:(e=(0,hs.arrow)({element:i,padding:4}),t[38]=i,t[39]=e),b.push(e)}n&&b.push(ht);let x=p||void 0,w;t[40]===x?w=t[41]:(w=(0,hs.hide)({boundary:x,padding:4,strategy:"referenceHidden"}),t[40]=x,t[41]=w),b.push(w),t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=s,t[5]=a,t[6]=l,t[7]=u,t[8]=c,t[9]=d,t[10]=h,t[11]=f,t[12]=p,t[13]=m,t[14]=g,t[15]=y,t[16]=v,t[17]=b}else b=t[17];return b}(eI),eO;l[66]===_?eO=l[67]:(eO=_?{reference:_}:void 0,l[66]=_,l[67]=eO),l[68]!==eR||l[69]!==q||l[70]!==eO?(n={middleware:eR,placement:q,whileElementsMounted:ha.autoUpdate,elements:eO},l[68]=eR,l[69]=q,l[70]=eO,l[71]=n):n=l[71];let{x:eL,y:eV,middlewareData:eD,placement:eN,refs:ez,strategy:eB,update:eF}=(0,hs.useFloating)(n),eH=eD.hide?.referenceHidden,eU=eD.arrow?.x,eW=eD.arrow?.y,eq=eD["@sanity/ui/origin"]?.originX,eG=eD["@sanity/ui/origin"]?.originY,eY;l[72]===Symbol.for("react.memo_cache_sentinel")?(eY=e=>{eg.current=e},l[72]=eY):eY=l[72];let eK=eY,eZ;l[73]===ez?eZ=l[74]:(eZ=e=>{em.current=e,ez.setFloating(e)},l[73]=ez,l[74]=eZ);let eX=eZ,eJ;l[75]===g?eJ=l[76]:(eJ=g?ho(g):null,l[75]=g,l[76]=eJ),l[77]===ez.reference.current?r=l[78]:(r=()=>ez.reference.current,l[77]=ez.reference.current,l[78]=r),(0,r_.useImperativeHandle)(eJ,r);t:{let e;if(_){i=g;break t}if(!g){i=null;break t}l[79]!==g||l[80]!==ez.setReference?(e=(0,r_.cloneElement)(g,{ref:ez.setReference}),l[79]=g,l[80]=ez.setReference,l[81]=e):e=l[81],i=e}let eQ=i,e0,e1;if(l[82]===eF?(e0=l[83],e1=l[84]):(e0=()=>eF,e1=[eF],l[82]=eF,l[83]=e0,l[84]=e1),(0,r_.useImperativeHandle)(z,e0,e1),v){let e;return l[85]===g?e=l[86]:(e=g||(0,sL.jsx)(sL.Fragment,{}),l[85]=g,l[86]=e),e}l[87]===w?o=l[88]:(o=w&&(0,sL.jsx)(vf,{}),l[87]=w,l[88]=o);let e2=x?eT:ex,e5;l[89]!==ei||l[90]!==H||l[91]!==eU||l[92]!==eW||l[93]!==y||l[94]!==B||l[95]!==eq||l[96]!==eG||l[97]!==W||l[98]!==ea||l[99]!==eN||l[100]!==eu||l[101]!==eH||l[102]!==j||l[103]!==C||l[104]!==eX||l[105]!==ed||l[106]!==eB||l[107]!==e2||l[108]!==X||l[109]!==eL||l[110]!==eV?(e5=(0,sL.jsx)(vh,{...j,__unstable_margins:B,animate:ei,arrow:H,arrowRef:eK,arrowX:eU,arrowY:eW,hidden:eH,overflow:W,padding:ea,placement:eN,radius:eu,ref:eX,scheme:C,shadow:ed,originX:eq,originY:eG,strategy:eB,tone:X,width:e2,x:eL,y:eV,children:y}),l[89]=ei,l[90]=H,l[91]=eU,l[92]=eW,l[93]=y,l[94]=B,l[95]=eq,l[96]=eG,l[97]=W,l[98]=ea,l[99]=eN,l[100]=eu,l[101]=eH,l[102]=j,l[103]=C,l[104]=eX,l[105]=ed,l[106]=eB,l[107]=e2,l[108]=X,l[109]=eL,l[110]=eV,l[111]=e5):e5=l[111],l[112]!==o||l[113]!==e5||l[114]!==ep?(s=(0,sL.jsxs)(uY,{zOffset:ep,children:[o,e5]}),l[112]=o,l[113]=e5,l[114]=ep,l[115]=s):s=l[115];let e3=s,e4;l[116]!==e3||l[117]!==E?(e4=E?(0,sL.jsx)(c$,{__unstable_name:"string"==typeof E?E:void 0,children:e3}):e3,l[116]=e3,l[117]=E,l[118]=e4):e4=l[118];let e6=e4,e8;return l[119]!==ei||l[120]!==k||l[121]!==e6?(e8=ei?(0,sL.jsx)(hi,{layoutMode:"default",mode:k?"visible":"hidden",children:e6}):(0,sL.jsx)(r_.Activity,{mode:k?"visible":"hidden",children:e6}),l[119]=ei,l[120]=k,l[121]=e6,l[122]=e8):e8=l[122],l[123]!==eQ||l[124]!==e8?(a=(0,sL.jsxs)(sL.Fragment,{children:[e8,eQ]}),l[123]=eQ,l[124]=e8,l[125]=a):a=l[125],a}let vm=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"chevron-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M10 8L14.5 12.5L10 17",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vg=uT("@sanity/ui/context/menu",null);function vy(e){return cR(e)&&"true"!==e.getAttribute("data-disabled")||cI(e)&&"BUTTON"===e.nodeName&&!e.disabled}function vv(e){return e.filter(vy)}let vb=[];function vx(){}function vw(e){var t,n,r;let i,o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x,w,k=(0,tt.c)(54),S,E,_,j,C,M,$,A,T,P,I,R,O,L;k[0]===e?(S=k[1],E=k[2],_=k[3],j=k[4],C=k[5],M=k[6],$=k[7],A=k[8],T=k[9],P=k[10],I=k[11],R=k[12],O=k[13],L=k[14]):({children:S,className:E,onClickOutside:j,onEscape:C,onItemClick:M,onItemSelect:$,onKeyDown:A,originElement:T,padding:R,ref:_,registerElement:P,shouldFocus:O,gap:L,...I}=e,k[0]=e,k[1]=S,k[2]=E,k[3]=_,k[4]=j,k[5]=C,k[6]=M,k[7]=$,k[8]=A,k[9]=T,k[10]=P,k[11]=I,k[12]=R,k[13]=O,k[14]=L);let V=void 0===R?1:R,D=void 0===O?null:O,N=void 0===L?1:L,z=(0,r_.useRef)(null),B;k[15]===Symbol.for("react.memo_cache_sentinel")?(B=()=>z.current,k[15]=B):B=k[15],(0,r_.useImperativeHandle)(_,B);let{isTopLayer:F}=uK(),H;k[16]!==A||k[17]!==T||k[18]!==D?(H={onKeyDown:A,originElement:T,shouldFocus:D,rootElementRef:z},k[16]=A,k[17]=T,k[18]=D,k[19]=H):H=k[19];let{activeElement:U,activeIndex:W,handleItemMouseEnter:q,handleItemMouseLeave:G,handleKeyDown:Y,mount:K}=function(e){let t,n,r=(0,tt.c)(23),{onKeyDown:i,originElement:o,shouldFocus:s,rootElementRef:a}=e,l;r[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],r[0]=l):l=r[0];let u=(0,r_.useRef)(l),[c,d]=(0,r_.useState)(-1),h=(0,r_.useRef)(c),[f,p]=(0,r_.useState)(null),m;r[1]===Symbol.for("react.memo_cache_sentinel")?(m=e=>{d(e),h.current=e,p(u.current[e]||null)},r[1]=m):m=r[1];let g=m,y;r[2]===a?y=r[3]:(y=(e,t)=>e?(-1===u.current.indexOf(e)&&(u.current.push(e),function(e,t){if(!e)return;let n=new WeakMap;for(let r of t)n.set(r,function(e,t){let n=[],r=t;for(;r!==e;){let t=r.parentElement;if(!t)break;let i=Array.from(t.childNodes).indexOf(r);if(n.unshift(i),t===e)break;r=t}return n}(e,r));t.sort((e,t)=>
15{let r=n.get(e)||vb,i=n.get(t)||vb,o=Math.max(r.length,i.length);for(let e=0;e<o;e+=1){let t=r[e]||-1,n=i[e]||-1;if(t!==n)return t-n}return 0})}(a.current,u.current)),t&&g(u.current.indexOf(e)),()=>{let t=u.current.indexOf(e);t>-1&&u.current.splice(t,1)}):vx,r[2]=a,r[3]=y);let v=y,b,x;r[4]===Symbol.for("react.memo_cache_sentinel")?(b=()=>()=>g(-1),x=[g],r[4]=b,r[5]=x):(b=r[4],x=r[5]),(0,r_.useEffect)(b,x),r[6]!==i||r[7]!==o?(t=e=>{if("Tab"===e.key){o&&o.focus();return}if("Home"===e.key){e.preventDefault(),e.stopPropagation();let t=vv(u.current)[0];if(!t)return;g(u.current.indexOf(t));return}if("End"===e.key){e.preventDefault(),e.stopPropagation();let t=vv(u.current),n=t[t.length-1];if(!n)return;g(u.current.indexOf(n));return}if("ArrowUp"===e.key){e.preventDefault(),e.stopPropagation();let t=vv(u.current),n=t.length;if(0===n)return;let r=u.current[h.current],i=t.indexOf(r),o=t[i=(i-1+n)%n];g(u.current.indexOf(o));return}if("ArrowDown"===e.key){e.preventDefault(),e.stopPropagation();let t=vv(u.current),n=t.length;if(0===n)return;let r=u.current[h.current],i=t.indexOf(r),o=t[i=(i+1)%n];g(u.current.indexOf(o));return}i&&i(e)},r[6]=i,r[7]=o,r[8]=t):t=r[8];let w=t,k;r[9]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{let t=e.currentTarget;g(u.current.indexOf(t))},r[9]=k):k=r[9];let S=k,E;r[10]===a?E=r[11]:(E=()=>{g(-2),a.current?.focus()},r[10]=a,r[11]=E);let _=E,j,C;return r[12]!==c||r[13]!==a||r[14]!==s?(j=()=>{if(!a.current)return;let e=requestAnimationFrame(()=>{if(-1===c){if("first"===s){let e=vv(u.current)[0];e&&g(u.current.indexOf(e))}if("last"===s){let e=vv(u.current),t=e[e.length-1];t&&g(u.current.indexOf(t))}return}(u.current[c]||null)?.focus()});return()=>cancelAnimationFrame(e)},C=[c,a,g,s],r[12]=c,r[13]=a,r[14]=s,r[15]=j,r[16]=C):(j=r[15],C=r[16]),(0,r_.useEffect)(j,C),r[17]!==f||r[18]!==c||r[19]!==_||r[20]!==w||r[21]!==v?(n={activeElement:f,activeIndex:c,handleItemMouseEnter:S,handleItemMouseLeave:_,handleKeyDown:w,mount:v},r[17]=f,r[18]=c,r[19]=_,r[20]=w,r[21]=v,r[22]=n):n=r[22],n}(H),Z=(0,r_.useRef)(null),X;k[20]===P?X=k[21]:(X=e=>{Z.current&&=(Z.current(),null),z.current=e,z.current&&P&&(Z.current=P(z.current))},k[20]=P,k[21]=X);let J=X,Q,ee;k[22]!==W||k[23]!==$?(Q=()=>{$&&$(W)},ee=[W,$],k[22]=W,k[23]=$,k[24]=Q,k[25]=ee):(Q=k[24],ee=k[25]),(0,r_.useEffect)(Q,ee),k[26]===Symbol.for("react.memo_cache_sentinel")?(g=()=>[z.current],k[26]=g):g=k[26],t=F&&j,n=g,o=(0,tt.c)(9),s=void 0===n?cJ:n,void 0!==o[0]||o[1]!==s||o[2]!==t?(a=e=>{let n;if(!t)return;let r=e.target;if(r instanceof Node){if(!n||n.contains(r)){for(let e of s().flat())if(e&&(r===e||e.contains(r)))return;t(e)}}},o[0]=void 0,o[1]=s,o[2]=t,o[3]=a):a=o[3],l=cX(a),u=!!t,o[4]!==u||o[5]!==l?(c=()=>{if(!u)return;let e=e=>l(e);return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},o[4]=u,o[5]=l,o[6]=c):c=o[6],o[7]===u?i=o[8]:(i=[u],o[7]=u,o[8]=i),(0,r_.useEffect)(c,i),(0,r_.useDebugValue)(t?"MouseDown On":"MouseDown Off"),k[27]!==F||k[28]!==C?(y=e=>{F&&"Escape"===e.key&&(e.stopPropagation(),C&&C())},k[27]=F,k[28]=C,k[29]=y):y=k[29],r=y,(h=(0,tt.c)(7))[0]===r?f=h[1]:(f=e=>r(e),h[0]=r,h[1]=f),p=cX(f),h[2]!==p||void 0!==h[3]?(m=()=>{let e=e=>p(e);return window.addEventListener("keydown",e,void 0),()=>window.removeEventListener("keydown",e,void 0)},h[2]=p,h[3]=void 0,h[4]=m):m=h[4],void 0===h[5]?d=h[6]:(d=[void 0],h[5]=void 0,h[6]=d),(0,r_.useEffect)(m,d),k[30]!==U||k[31]!==q||k[32]!==G||k[33]!==K||k[34]!==j||k[35]!==C||k[36]!==M||k[37]!==P?(v={version:2,activeElement:U,mount:K,onClickOutside:j,onEscape:C,onItemClick:M,onItemMouseEnter:q,onItemMouseLeave:G,registerElement:P},k[30]=U,k[31]=q,k[32]=G,k[33]=K,k[34]=j,k[35]=C,k[36]=M,k[37]=P,k[38]=v):v=k[38];let et=v,en;return k[39]===E?en=k[40]:(en=cx("_196sf460",E),k[39]=E,k[40]=en),k[41]!==S||k[42]!==N?(b=(0,sL.jsx)(ct,{gap:N,children:S}),k[41]=S,k[42]=N,k[43]=b):b=k[43],k[44]!==Y||k[45]!==J||k[46]!==V||k[47]!==I||k[48]!==en||k[49]!==b?(x=(0,sL.jsx)(uv,{className:en,"data-ui":"Menu",...I,onKeyDown:Y,padding:V,ref:J,role:"menu",tabIndex:-1,children:b}),k[44]=Y,k[45]=J,k[46]=V,k[47]=I,k[48]=en,k[49]=b,k[50]=x):x=k[50],k[51]!==x||k[52]!==et?(w=(0,sL.jsx)(vg.Provider,{value:et,children:x}
15),k[51]=x,k[52]=et,k[53]=w):w=k[53],w}function vk(e){let t,n,r,i,o,s,a,l,u=(0,tt.c)(56),{__unstable_disableRestoreFocusOnClose:c,button:d,id:h,menu:f,onClose:p,onOpen:m,popover:g,ref:y}=e,v=void 0!==c&&c,[b,x]=(0,r_.useState)(!1),[w,k]=(0,r_.useState)(null),[S,E]=(0,r_.useState)(null),_;u[0]===Symbol.for("react.memo_cache_sentinel")?(_=[],u[0]=_):_=u[0];let[j,C]=(0,r_.useState)(_),M=(0,r_.useRef)(b),$,A;u[1]!==m||u[2]!==b?($=()=>{m&&b&&!M.current&&m()},A=[m,b],u[1]=m,u[2]=b,u[3]=$,u[4]=A):($=u[3],A=u[4]),(0,r_.useEffect)($,A),u[5]!==p||u[6]!==b?(t=()=>{p&&!b&&M.current&&p()},n=[p,b],u[5]=p,u[6]=b,u[7]=t,u[8]=n):(t=u[7],n=u[8]),(0,r_.useEffect)(t,n),u[9]===b?(r=u[10],i=u[11]):(r=()=>{M.current=b},i=[b],u[9]=b,u[10]=r,u[11]=i),(0,r_.useEffect)(r,i),u[12]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{x(vS),k(null)},u[12]=o):o=u[12];let T=o,P;u[13]===b?P=u[14]:(P=e=>{b&&e.preventDefault()},u[13]=b,u[14]=P);let I=P,R;u[15]===Symbol.for("react.memo_cache_sentinel")?(R=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),x(!0),k("first");return}if("ArrowUp"===e.key){e.preventDefault(),x(!0),k("last");return}},u[15]=R):R=u[15];let O=R,L;u[16]!==S||u[17]!==j?(L=e=>{let t=e.target;if(t instanceof Node&&(!S||t!==S&&!S.contains(t))){for(let e of j)if(t===e||e.contains(t))return;x(!1)}},u[16]=S,u[17]=j,u[18]=L):L=u[18];let V=L,D;u[19]!==S||u[20]!==v?(D=()=>{x(!1),!v&&S&&S.focus()},u[19]=S,u[20]=v,u[21]=D):D=u[21];let N=D,z;u[22]===j?z=u[23]:(z=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of j)if(e===t||e.contains(t))return;x(!1)}},u[22]=j,u[23]=z);let B=z,F;u[24]!==S||u[25]!==v?(F=()=>{x(!1),!v&&S&&S.focus()},u[24]=S,u[25]=v,u[26]=F):F=u[26];let H=F,U;u[27]===Symbol.for("react.memo_cache_sentinel")?(U=e=>(C(t=>t.concat([e])),()=>C(t=>t.filter(t=>t!==e))),u[27]=U):U=u[27];let W=U,q;u[28]!==S||u[29]!==B||u[30]!==H||u[31]!==V||u[32]!==N||u[33]!==h||u[34]!==f||u[35]!==w?(q=f&&(0,r_.cloneElement)(f,{"aria-labelledby":h,onBlurCapture:B,onClickOutside:V,onEscape:N,onItemClick:H,originElement:S,registerElement:W,shouldFocus:w}),u[28]=S,u[29]=B,u[30]=H,u[31]=V,u[32]=N,u[33]=h,u[34]=f,u[35]=w,u[36]=q):q=u[36];let G=q,Y;u[37]!==d||u[38]!==I||u[39]!==h||u[40]!==b?(Y=d&&(0,r_.cloneElement)(d,{"data-ui":"MenuButton",id:h,onClick:T,onKeyDown:O,onMouseDown:I,"aria-haspopup":!0,"aria-expanded":b,ref:E,selected:d.props.selected??b}),u[37]=d,u[38]=I,u[39]=h,u[40]=b,u[41]=Y):Y=u[41];let K=Y,Z,X;u[42]===S?(Z=u[43],X=u[44]):(Z=()=>S,X=[S],u[42]=S,u[43]=Z,u[44]=X),(0,r_.useImperativeHandle)(y,Z,X),u[45]===g?s=u[46]:(s=g||{},u[45]=g,u[46]=s),u[47]===s?a=u[48]:(a={overflow:"auto",portal:!0,...s},u[47]=s,u[48]=a);let J=a,Q;return u[49]===K?Q=u[50]:(Q=K||(0,sL.jsx)(sL.Fragment,{}),u[49]=K,u[50]=Q),u[51]!==G||u[52]!==b||u[53]!==J||u[54]!==Q?(l=(0,sL.jsx)(vp,{"data-ui":"MenuButton__popover",...J,content:G,open:b,children:Q}),u[51]=G,u[52]=b,u[53]=J,u[54]=Q,u[55]=l):l=u[55],l}function vS(e){return!e}let vE=function(e){let t,n=(0,tt.c)(12),r,i,o,s;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4]):({as:s,className:r,ref:i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s);let a=void 0===s?"hr":s,l;return n[5]===r?l=n[6]:(l=cx("_17s3sc10",r),n[5]=r,n[6]=l),n[7]!==a||n[8]!==i||n[9]!==o||n[10]!==l?(t=(0,sL.jsx)(a,{"data-ui":"MenuDivider",className:l,ref:i,...o}),n[7]=a,n[8]=i,n[9]=o,n[10]=l,n[11]=t):t=n[11],t},v_=l8(uv).withConfig({displayName:"Selectable",componentId:"sc-71o6vd-0"})(ub,function(){return l6`background-color:inherit;color:inherit;&[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{text-decoration:none;}`},function(e){let{$tone:t}=e,{color:n,style:r}=sK(e.theme),i=n.selectable[t];return l6`${uw(n,i.enabled)} background-color:var(--card-bg-color);color:var(--card-fg-color);outline:none;&[data-as='button']{&:disabled{${uw(n,i.disabled)}}&:not(:disabled){&[aria-pressed='true']{${uw(n,i.pressed)}}&[data-selected],&[aria-selected='true'] > &{${uw(n,i.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${uw(n,i.hovered)}}&:active{${uw(n,i.pressed)}}}}}}&[data-as='a']{&[data-disabled]{${uw(n,i.disabled)}}&:not([data-disabled]){&[data-pressed]{${uw(n,i.pressed)}}&[data-selected]{${uw(n,i.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${uw(n,i.hovered)}}&:active{${uw(n,i.pressed)}}}}}}${r?.card?.root}`});function vj(){let e=(0,r_.useContext)(vg);if(!e)throw Error("useMenu(): missing context value");if(!uH(e)||2!==e.version)throw Error("useMenu(): the context value is not compatible");return e}let vC=function(e){let t,n,r,i,o,s,a,l,u,c,d,h,f,p=(0,tt.c)(81),m,g,y,v,b,x,w,k,S,E,_,j,C;p[0]===e?(m=p[1],g=p[2],y=p[3],v=p[4],b=p[5],x=p[6],w=p[7],k=p[8],S=p[9],E=p[10],_=p[11],j=p[12],C=p[
1513]):({as:w,children:g,fontSize:k,icon:m,menu:y,onClick:v,padding:S,popover:b,radius:E,gap:_,text:C,tone:j,...x}=e,p[0]=e,p[1]=m,p[2]=g,p[3]=y,p[4]=v,p[5]=b,p[6]=x,p[7]=w,p[8]=k,p[9]=S,p[10]=E,p[11]=_,p[12]=j,p[13]=C);let M=void 0===w?"button":w,$=void 0===k?1:k,A=void 0===S?3:S,T=void 0===E?2:E,P=void 0===_?3:_,I=void 0===j?"default":j,R=vj(),{scheme:O}=uR(),{activeElement:L,mount:V,onClickOutside:D,onEscape:N,onItemClick:z,onItemMouseEnter:B,registerElement:F}=R,H=B??R.onItemMouseEnter,[U,W]=(0,r_.useState)(null),[q,G]=(0,r_.useState)(!1),[Y,K]=(0,r_.useState)(null),Z=!!L&&L===U,[X,J]=(0,r_.useState)(!1),Q;p[14]===H?Q=p[15]:(Q=e=>{J(!1),H(e),G(!0)},p[14]=H,p[15]=Q);let ee=Q,et;p[16]===U?et=p[17]:(et=e=>{"ArrowLeft"===e.key&&(e.stopPropagation(),G(!1),requestAnimationFrame(()=>{U?.focus()}))},p[16]=U,p[17]=et);let en=et,er;p[18]===v?er=p[19]:(er=e=>{v?.(e),K("first"),G(!0)},p[18]=v,p[19]=er);let ei=er,eo;p[20]===z?eo=p[21]:(eo=()=>{G(!1),z?.()},p[20]=z,p[21]=eo);let es=eo,ea;p[22]===Symbol.for("react.memo_cache_sentinel")?(ea=()=>J(!0),p[22]=ea):ea=p[22];let el=ea,eu,ec;p[23]!==V||p[24]!==U?(eu=()=>V(U),ec=[V,U],p[23]=V,p[24]=U,p[25]=eu,p[26]=ec):(eu=p[25],ec=p[26]),(0,r_.useEffect)(eu,ec),p[27]===Z?(t=p[28],n=p[29]):(t=()=>{Z||G(!1)},n=[Z],p[27]=Z,p[28]=t,p[29]=n),(0,r_.useEffect)(t,n),p[30]===q?(r=p[31],i=p[32]):(r=()=>{q||J(!1)},i=[q],p[30]=q,p[31]=r,p[32]=i),(0,r_.useEffect)(r,i),p[33]===Y?(o=p[34],s=p[35]):(o=()=>{if(!Y)return;let e=requestAnimationFrame(()=>K(null));return()=>cancelAnimationFrame(e)},s=[Y],p[33]=Y,p[34]=o,p[35]=s),(0,r_.useEffect)(o,s),p[36]!==g||p[37]!==es||p[38]!==en||p[39]!==y||p[40]!==D||p[41]!==N||p[42]!==F||p[43]!==Y?(a=(0,sL.jsx)(vw,{...y,onClickOutside:D,onEscape:N,onItemClick:es,onKeyDown:en,onMouseEnter:el,registerElement:F,shouldFocus:Y,children:g}),p[36]=g,p[37]=es,p[38]=en,p[39]=y,p[40]=D,p[41]=N,p[42]=F,p[43]=Y,p[44]=a):a=p[44];let ed=a,eh;p[45]===Symbol.for("react.memo_cache_sentinel")?(eh=e=>{let t=e.currentTarget;if(document.activeElement===t&&"ArrowRight"===e.key){K("first"),G(!0),J(!0);return}},p[45]=eh):eh=p[45];let ef=eh,ep="button"===M?X:void 0,em="button"===M?void 0:X,eg=!X&&Z?"":void 0,ey;p[46]===T?ey=p[47]:(ey=s1(T),p[46]=T,p[47]=ey);let ev="button"===M?"button":void 0,eb;return p[48]!==m||p[49]!==$?(eb=m&&(0,sL.jsxs)(u7,{size:$,children:[(0,r_.isValidElement)(m)&&m,(0,l7.isValidElementType)(m)&&(0,sL.jsx)(m,{})]}),p[48]=m,p[49]=$,p[50]=eb):eb=p[50],p[51]!==$||p[52]!==C?(l=(0,sL.jsx)(uv,{flex:1,children:(0,sL.jsx)(u7,{size:$,textOverflow:"ellipsis",weight:"medium",children:C})}),p[51]=$,p[52]=C,p[53]=l):l=p[53],p[54]===Symbol.for("react.memo_cache_sentinel")?(u=(0,sL.jsx)(vm,{}),p[54]=u):u=p[54],p[55]===$?c=p[56]:(c=(0,sL.jsx)(u7,{size:$,children:u}),p[55]=$,p[56]=c),p[57]!==P||p[58]!==A||p[59]!==eb||p[60]!==l||p[61]!==c?(d=(0,sL.jsxs)(u5,{gap:P,padding:A,children:[eb,l,c]}),p[57]=P,p[58]=A,p[59]=eb,p[60]=l,p[61]=c,p[62]=d):d=p[62],p[63]!==M||p[64]!==ei||p[65]!==ee||p[66]!==x||p[67]!==O||p[68]!==ep||p[69]!==em||p[70]!==eg||p[71]!==ey||p[72]!==ev||p[73]!==d||p[74]!==I?(h=(0,sL.jsx)(v_,{"data-as":M,"data-ui":"MenuGroup",forwardedAs:M,...x,"aria-pressed":ep,"data-pressed":em,"data-selected":eg,$radius:ey,$tone:I,$scheme:O,onClick:ei,onKeyDown:ef,onMouseEnter:ee,ref:W,tabIndex:-1,type:ev,children:d}),p[63]=M,p[64]=ei,p[65]=ee,p[66]=x,p[67]=O,p[68]=ep,p[69]=em,p[70]=eg,p[71]=ey,p[72]=ev,p[73]=d,p[74]=I,p[75]=h):h=p[75],p[76]!==ed||p[77]!==q||p[78]!==b||p[79]!==h?(f=(0,sL.jsx)(vp,{...b,content:ed,"data-ui":"MenuGroup__popover",open:q,children:h}),p[76]=ed,p[77]=q,p[78]=b,p[79]=h,p[80]=f):f=p[80],f},vM=function(e){let t,n,r,i,o,s,a=(0,tt.c)(76),l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C,M,$,A;a[0]===e?(l=a[1],u=a[2],c=a[3],d=a[4],h=a[5],f=a[6],p=a[7],m=a[8],g=a[9],y=a[10],v=a[11],b=a[12],x=a[13],w=a[14],k=a[15],S=a[16],E=a[17],_=a[18],j=a[19],C=a[20],M=a[21],$=a[22],A=a[23]):({as:E,children:c,disabled:d,fontSize:_,hotkeys:f,icon:l,iconRight:u,onClick:p,padding:j,paddingX:b,paddingY:x,paddingTop:v,paddingRight:y,paddingBottom:m,paddingLeft:g,pressed:w,radius:C,ref:h,selected:S,gap:M,text:A,tone:$,...k}=e,a[0]=e,a[1]=l,a[2]=u,a[3]=c,a[4]=d,a[5]=h,a[6]=f,a[7]=p,a[8]=m,a[9]=g,a[10]=y,a[11]=v,a[12]=b,a[13]=x,a[14]=w,a[15]=k,a[16]=S,a[17]=E,a[18]=_,a[19]=j,a[20]=C,a[21]=M,a[22]=$,a[23]=A);let T=void 0===E?"button":E,P=void 0===_?1:_,I=void 0===j?3:j,R=void 0===C?2:C,O=void 0===M?3:M,L=void 0===$?"default":$,{scheme:V}=uR(),D=vj(),{activeElement:N,mount:z,onItemClick:B,onItemMouseEnter:F,onItemMouseLeave:H}=D,U=F??D.onItemMouseEnter,W=H??D.onItemMouseLeave,[q,G]=(0,r_.useState)(null),Y=!!N&&N===q,K=(0,r_.useRef)(null),Z;a[24]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>K.current,a[24]=Z):Z=a[24],(0,r_.useImperativeHandle)(h,Z),a[25]!==z||a[26]!==q||a[27]!==S?(t=()=>z(q,S),n=[z,q,S],a[25]=z,a[26]=q,a[27]=S,a[28]=t,a[29]=n):(t=a[28],n=a[29]),(0,r_.useEffect)(t,n),a[30]!==d||a[31]!==p||a[32]!==B?(r=e=>{d||(p&&p(e),B&&B())},a[30]=d,a[31]=p,a[32]=B,a[33]=r):r=a[33];let X=r,J;a[34]!==I||a[35]!==m||a[36]!==g||a[37]!==y||a[38]!==v||a[39]!==b||a[40]!==x?(J={padding:I,paddingX:b,paddingY:x,paddingTop:v,paddingRight:y,paddingBottom:m,paddingLeft:g},a[34]=I,a[35]=m,a[36]=g,a[37]=y,a[38]=v,a[39]=b,a[40]=x,a[41]=J):J=a[41];let Q=J,ee;a[42]===P?ee=a[43]:(ee=s1(P).map(v$),a[42]=P,a[43]=ee);let et=ee,en;a[44]===Symbol.for("react.memo_cache_sentinel")?(en=e=>{K.current=e,G(e)},a[44]=en):en=a[44];let er=en,ei="button"!==T&&w?"":void 0,eo=Y?"":void 0,es=d?"":void 0,ea;a[45]===R?ea=a[46]:(ea=s1(R),a[45]=R,a[46]=ea),a[47]===Symbol.for("react.memo_cache_sentinel")?(i=s1(0),a[47]=i):i=a[47];let el=d?"default":L,eu="button"===T?"button":void 0,ec;return a[48]!==l||a[49]!==u||a[50]!==P||a[51]!==O||a[52]!==f||a[53]!==et||a[54]!==Q||a[55]!==A?(ec=(l||A||u)&&(0,sL.jsxs)(u5,{as:"span",gap:O,align:"center",...Q,children:[l&&(0,sL.jsxs)(u7,{size:P,children:[(0,r_.isValidElement)(l)&&l,(0,l7.isValidElementType)(l)&&(0,sL.jsx)(l,{})]}),A&&(0,sL.jsx)(uv,{flex:1,children:(0,sL.jsx)(u7,{size:P,textOverflow:"ellipsis",weight:"medium",children:A})}),f&&(0,sL.jsx)(dD,{fontSize:et,keys:f,style:{marginTop:-4,marginBottom:-4}}),u&&(0,sL.jsxs)(u7,{size:P,children:[(0,r_.isValidElement)(u)&&u,(0,l7.isValidElementType)(u)&&(0,sL.jsx)(u,{})]})]}),a[48]=l,a[49]=u,a[50]=P,a[51]=O,a[52]=f,a[53]=et,a[54]=Q,a[55]=A,a[56]=ec):ec=a[56],a[57]!==c||a[58]!==Q?(o=c&&(0,sL.jsx)(uv,{as:"span",...Q,children:c}),a[57]=c,a[58]=Q,a[59]=o):o=a[59],a[60]!==T||a[61]!==d||a[62]!==X||a[63]!==U||a[64]!==W||a[65]!==k||a[66]!==V||a[67]!==ei||a[68]!==eo||a[69]!==es||a[70]!==ea||a[71]!==el||a[72]!==eu||a[73]!==ec||a[74]!==o?(s=(0,sL.jsxs)(v_,{"data-ui":"MenuItem",role:"menuitem",...k,"data-pressed":ei,"data-selected":eo,"data-disabled":es,forwardedAs:T,$radius:ea,$padding:i,$tone:el,$scheme:V,disabled:d,onClick:X,onMouseEnter:U,onMouseLeave:W,ref:er,tabIndex:-1,type:eu,children:[ec,o]}),a[60]=T,a[61]=d,a[62]=X,a[63]=U,a[64]=W,a[65]=k,a[66]=V,a[67]=ei,a[68]=eo,a[69]=es,a[70]=ea,a[71]=el,a[72]=eu,a[73]=ec,a[74]=o,a[75]=s):s=a[75],s};function v$(e){return e-1}let vA=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"block-content",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 7.60002L11 7.60003V6.40003L21 6.40002V7.60002Z",fill:"currentColor"}),(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 11.2667L12.4833 11.2667V10.0667L21 10.0667V11.2667Z",fill:"currentColor"}),(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 14.9334H13.9254V13.7334L21 13.7334V14.9334Z",fill:"currentColor"}),(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 18.6002H4V17.4002H21V18.6002Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M9.86438 15.6H11.2L8.27623 7.60003H6.92377L4 15.6H5.29072L6.0371 13.4767H9.12362L9.86438 15.6ZM7.53546 9.05255H7.63086L8.80374 12.4344H6.35698L7.53546 9.05255Z",fill:"currentColor"})]})}),vT=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"checkmark-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M9.5 12.1316L11.7414 14.5L16 10M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vP=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"cube",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M4.5 8L12.5 3L20.5 8V17L12.5 22L4.5 17V8Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M12.5 22V13M12.5 13L4.5 8M12.5 13L20.5 8",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),vI=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"image",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M5.5 15.5L8.79289 12.2071C9.18342 11.8166 9.81658 11.8166 10.2071 12.2071L12.8867 14.8867C13.2386 15.2386 13.7957 15.2782 14.1938 14.9796L15.1192 14.2856C15.3601 14.1049 15.6696 14.0424 15.9618 14.1154L19.5 15M5.5 6.5H19.5V18.5H5.5V6.5ZM15.5 10.5C15.5 11.0523 15.0523 11.5 14.5 11.5C13.9477 11.5 13.5 11.0523 13.5 10.5C13.5 9.94772 13.9477 9.5 14.5 9.5C15.0523 9.5 15.5 9.94772 15.5 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vR=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"number",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.0165 17.6336H3.83636V16.4336H21.0165V17.6336Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M7.09808 13.3967V7.508H5.74066L3.83636 8.78241V10.091L5.65277 8.88495H5.74066V13.3967H3.84125V14.5539H8.89984V13.3967H7.09808Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M9.81781 9.63202V9.66132H11.1069V9.62714C11.1069 8.95331 11.5756 8.49432 12.2739 8.49432C12.9575 8.49432 13.4018 8.89471 13.4018 9.50507C13.4018 9.9787 13.1528 10.3498 12.1909 11.3117L9.89594 13.5822V14.5539H14.8618V13.3869H11.7807V13.299L13.1577 11.9855C14.3491 10.843 14.7543 10.1838 14.7543 9.41229C14.7543 8.19159 13.7729 7.36639 12.3178 7.36639C10.8383 7.36639 9.81781 8.28436 9.81781 9.63202Z",fill:"currentColor"}
15),(0,sL.jsx)("path",{d:"M17.6694 11.4631H18.5092C19.3198 11.4631 19.8422 11.8683 19.8422 12.4982C19.8422 13.1183 19.3295 13.5139 18.5239 13.5139C17.767 13.5139 17.2592 13.133 17.2104 12.5324H15.9262C15.9897 13.8508 17.0248 14.6955 18.5629 14.6955C20.1401 14.6955 21.2192 13.841 21.2192 12.591C21.2192 11.6584 20.6528 11.0334 19.7006 10.9211V10.8332C20.4721 10.6769 20.9457 10.0666 20.9457 9.23651C20.9457 8.12323 19.9741 7.36639 18.5434 7.36639C17.0541 7.36639 16.1118 8.17694 16.0629 9.50018H17.2983C17.3422 8.88007 17.8061 8.48456 18.4995 8.48456C19.2075 8.48456 19.6567 8.85565 19.6567 9.44159C19.6567 10.0324 19.1977 10.4182 18.4946 10.4182H17.6694V11.4631Z",fill:"currentColor"})]})}),vO=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"string",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M11.6748 15.5227H13.1855L9.87842 6.36304H8.34863L5.0415 15.5227H6.50146L7.3457 13.0916H10.8369L11.6748 15.5227ZM9.04053 8.02612H9.14844L10.4751 11.8982H7.70752L9.04053 8.02612Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M16.8101 14.488C16.0674 14.488 15.5278 14.1262 15.5278 13.5042C15.5278 12.8948 15.9595 12.571 16.9116 12.5076L18.6001 12.3997V12.9773C18.6001 13.8342 17.8384 14.488 16.8101 14.488ZM16.4609 15.637C17.3687 15.637 18.124 15.2434 18.5366 14.5515H18.6445V15.5227H19.9585V10.8C19.9585 9.34009 18.981 8.47681 17.248 8.47681C15.6802 8.47681 14.563 9.23853 14.4233 10.4255H15.7437C15.896 9.93677 16.4229 9.65747 17.1846 9.65747C18.1177 9.65747 18.6001 10.0701 18.6001 10.8V11.3967L16.7275 11.5046C15.0835 11.6062 14.1567 12.3235 14.1567 13.5676C14.1567 14.8308 15.1279 15.637 16.4609 15.637Z",fill:"currentColor"}),(0,sL.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.9585 18.637L5.0415 18.637V17.437L19.9585 17.437V18.637Z",fill:"currentColor"})]})}),vL=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"th-list",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M9.5 6.5V10.5M9.5 10.5V14.5M9.5 10.5H19.5M9.5 10.5H5.5M9.5 14.5V18.5M9.5 14.5H19.5M9.5 14.5H5.5M5.5 6.5H19.5V18.5H5.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vV=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"search",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M15.0355 15.0355L20 20M16.5 11.5C16.5 14.2614 14.2614 16.5 11.5 16.5C8.73858 16.5 6.5 14.2614 6.5 11.5C6.5 8.73858 8.73858 6.5 11.5 6.5C14.2614 6.5 16.5 8.73858 16.5 11.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vD=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"th-large",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M12.5 6.5V12.5M12.5 12.5V18.5M12.5 12.5H19.5M12.5 12.5H5.5M19.5 12.5V6.5H5.5V12.5M19.5 12.5V18.5H5.5V12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),vN=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"ulist",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M7.10153 17.5C7.10153 17.8322 6.83221 18.1016 6.5 18.1016C6.16778 18.1016 5.89847 17.8322 5.89847 17.5C5.89847 17.1678 6.16778 16.8985 6.5 16.8985C6.83221 16.8985 7.10153 17.1678 7.10153 17.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M7.10153 7.49997C7.10153 7.83218 6.83221 8.1015 6.5 8.1015C6.16778 8.1015 5.89847 7.83218 5.89847 7.49997C5.89847 7.16775 6.16778 6.89844 6.5 6.89844C6.83221 6.89844 7.10153 7.16775 7.10153 7.49997Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M7.10153 12.5C7.10153 12.8322 6.83221 13.1015 6.5 13.1015C6.16778 13.1015 5.89847 12.8322 5.89847 12.5C5.89847 12.1678 6.16778 11.8984 6.5 11.8984C6.83221 11.8984 7.10153 12.1678 7.10153 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M10 7.5H19M10 17.5H19M10 12.5H19",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),vz={top:["top-end","top-start","bottom","left","right"],"top-start":["top","top-end","bottom-start","left-start","right-start"],"top-end":["top","top-start","bottom-end","left-end","right-end"],bottom:["bottom-end","bottom-start","to
15p","left","right"],"bottom-start":["bottom","bottom-end","top-start","left-start","right-start"],"bottom-end":["bottom","bottom-start","top-end","left-end","right-end"],left:["left-end","left-start","right","top","bottom"],"left-start":["left","left-end","right-start","top-start","bottom-start"],"left-end":["left","left-start","right-end","top-end","bottom-end"],right:["right-end","right-start","left","top","bottom"],"right-start":["right","right-end","left-start","top-start","bottom-start"],"right-end":["right","right-start","left-end","top-end","bottom-end"]},vB=vl.create(uV);function vF(e){let t,n,r=(0,tt.c)(47),i,o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x;r[0]===e?(i=r[1],o=r[2],s=r[3],a=r[4],l=r[5],u=r[6],c=r[7],d=r[8],h=r[9],f=r[10],p=r[11],m=r[12],g=r[13],y=r[14],v=r[15],b=r[16],x=r[17]):({animate:i,arrow:o,arrowRef:s,arrowX:a,arrowY:l,children:u,className:c,originX:d,originY:h,padding:f,placement:p,radius:m,ref:g,scheme:v,shadow:b,style:x,...y}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s,r[4]=a,r[5]=l,r[6]=u,r[7]=c,r[8]=d,r[9]=h,r[10]=f,r[11]=p,r[12]=m,r[13]=g,r[14]=y,r[15]=v,r[16]=b,r[17]=x),r[18]!==d||r[19]!==h?(t=hn(d,h),r[18]=d,r[19]=h,r[20]=t):t=r[20];let w=i?"transform":void 0,k;r[21]!==x||r[22]!==t||r[23]!==w?(k={transformOrigin:t,willChange:w,...x},r[21]=x,r[22]=t,r[23]=w,r[24]=k):k=r[24];let S=k,E=null===a?void 0:a,_=null===l?void 0:l,j;r[25]!==E||r[26]!==_?(j={left:E,top:_,right:void 0,bottom:void 0},r[25]=E,r[26]=_,r[27]=j):j=r[27];let C=j,M;r[28]===c?M=r[29]:(M=cx("_54iwec1",c),r[28]=c,r[29]=M);let $=i?sJ:void 0,A;return r[30]!==o||r[31]!==s||r[32]!==C?(A=o&&(0,sL.jsx)(cP,{ref:s,style:C,width:15,height:6,radius:2}),r[30]=o,r[31]=s,r[32]=C,r[33]=A):A=r[33],r[34]!==u||r[35]!==f||r[36]!==p||r[37]!==m||r[38]!==g||r[39]!==y||r[40]!==S||r[41]!==v||r[42]!==b||r[43]!==M||r[44]!==$||r[45]!==A?(n=(0,sL.jsxs)(vB,{className:M,"data-ui":"Tooltip__card",...y,"data-placement":p,padding:f,radius:m,ref:g,scheme:v,shadow:b,style:S,...$,children:[u,A]}),r[34]=u,r[35]=f,r[36]=p,r[37]=m,r[38]=g,r[39]=y,r[40]=S,r[41]=v,r[42]=b,r[43]=M,r[44]=$,r[45]=A,r[46]=n):n=r[46],n}let vH=uT("@sanity/ui/context/tooltipDelayGroup",null);function vU(e){let t,n,r,i,o,s,a,l,u,c,d,h,f,p,m,g=(0,tt.c)(125),y=cE(),{layer:v}=ux(),{animate:b,arrow:x,boundaryElement:w,children:k,content:S,disabled:E,fallbackPlacements:_,padding:j,placement:C,portal:M,radius:$,ref:A,scheme:T,shadow:P,zOffset:I,delay:R,...O}=e,L=void 0!==x&&x,V=void 0===j?2:j,D=void 0===C?"bottom":C,N=void 0===$?2:$,z=void 0===P?2:P,B=w??y?.element,F=_??vz[e.placement??"bottom"],H=I??v.tooltip.zOffset,U=!uB()&&void 0!==b&&b,W;g[0]===F?W=g[1]:(W=s1(F),g[0]=F,g[1]=W);let q=W,G=(0,r_.useRef)(null),[Y,K]=(0,r_.useState)(null),Z=(0,r_.useRef)(null),[X,J]=(0,r_.useState)(0),Q;g[2]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>G.current,g[2]=Q):Q=g[2],(0,r_.useImperativeHandle)(A,Q);let ee=cM(),et="string"==typeof M?ee.elements?.[M]||null:ee.element,en;g[3]!==U||g[4]!==L||g[5]!==B||g[6]!==q?(en={animate:U,arrowProp:L,arrowRef:Z,boundaryElement:B,fallbackPlacements:q,rootBoundary:"viewport"},g[3]=U,g[4]=L,g[5]=B,g[6]=q,g[7]=en):en=g[7];let er=function(e){let t=(0,tt.c)(17),{animate:n,arrowProp:r,arrowRef:i,boundaryElement:o,fallbackPlacements:s,rootBoundary:a}=e,l;if(t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==o||t[4]!==s||t[5]!==a){let e;l=[];let u=o||void 0,c;t[7]!==s||t[8]!==a||t[9]!==u?(c=(0,hs.flip)({boundary:u,fallbackPlacements:s,padding:4,rootBoundary:a}),t[7]=s,t[8]=a,t[9]=u,t[10]=c):c=t[10],l.push(c),t[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,hs.offset)({mainAxis:4}),t[11]=e):e=t[11],l.push(e);let d=o||void 0,h;if(t[12]!==a||t[13]!==d?(h=(0,hs.shift)({boundary:d,rootBoundary:a,padding:4}),t[12]=a,t[13]=d,t[14]=h):h=t[14],l.push(h),r){let e;t[15]===i?e=t[16]:(e=(0,hs.arrow)({element:i,padding:4}),t[15]=i,t[16]=e),l.push(e)}n&&l.push(ht),t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=s,t[5]=a,t[6]=l}else l=t[6];return l}(en),ei;g[8]===Y?ei=g[9]:(ei={reference:Y},g[8]=Y,g[9]=ei),g[10]!==er||g[11]!==D||g[12]!==ei?(t={middleware:er,placement:D,whileElementsMounted:ha.autoUpdate,elements:ei},g[10]=er,g[11]=D,g[12]=ei,g[13]=t):t=g[13];let{floatingStyles:eo,placement:es,middlewareData:ea,refs:el,update:eu}=(0,hs.useFloating)(t),ec=ea.arrow?.x,ed=ea.arrow?.y,eh=ea["@sanity/ui/origin"]?.originX,ef=ea["@sanity/ui/origin"]?.originY,ep=(0,r_.useId)(),[em,eg]=function(e){let t,n=(0,tt.c)(5),[r,i]=(0,r_.useState)(e),o=(0,r_.useRef)(void 0),s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=(e,t)=>{let n=()=>{i(e)};if(o.current&&=void clearTimeout(o.current),!t)return n();
15o.current=setTimeout(n,t)},n[0]=s):s=n[0];let a=s,l,u;return n[1]===Symbol.for("react.memo_cache_sentinel")?(l=()=>()=>{o.current&&clearTimeout(o.current)},u=[],n[1]=l,n[2]=u):(l=n[1],u=n[2]),(0,r_.useEffect)(l,u),n[3]===r?t=n[4]:(t=[r,a],n[3]=r,n[4]=t),t}(!1),ey=(0,r_.useContext)(vH),ev;g[14]===ey?ev=g[15]:(ev=ey||{},g[14]=ey,g[15]=ev);let{setIsGroupActive:eb,setOpenTooltipId:ex}=ev,ew=em||ey?.openTooltipId===ep,ek=null!==ey,eS="number"==typeof R?R:R?.open||0,eE="number"==typeof R?R:R?.close||0,e_=ek?ey.openDelay:eS,ej=ek?ey.closeDelay:eE,eC;g[16]!==ej||g[17]!==ek||g[18]!==e_||g[19]!==eb||g[20]!==eg||g[21]!==ex||g[22]!==ep?(eC=(e,t)=>{if(ek)if(e){let n=t?0:e_;eb?.(e,n),ex?.(ep,n)}else eb?.(e,ej>200?ej:200),ex?.(null,t?0:ej);else eg(e,t?0:e?e_:ej)},g[16]=ej,g[17]=ek,g[18]=e_,g[19]=eb,g[20]=eg,g[21]=ex,g[22]=ep,g[23]=eC):eC=g[23];let eM=eC,e$;g[24]!==k?.props||g[25]!==eM?(e$=e=>{eM(!1),k?.props?.onBlur?.(e)},g[24]=k?.props,g[25]=eM,g[26]=e$):e$=g[26],k?.props;let eA=e$,eT;g[27]!==k?.props||g[28]!==eM?(eT=e=>{eM(!1,!0),k?.props.onClick?.(e)},g[27]=k?.props,g[28]=eM,g[29]=eT):eT=g[29],k?.props;let eP=eT,eI;g[30]!==k?.props||g[31]!==eM?(eI=e=>{eM(!1,!0),k?.props.onContextMenu?.(e)},g[30]=k?.props,g[31]=eM,g[32]=eI):eI=g[32],k?.props;let eR=eI,eO;g[33]!==k?.props||g[34]!==eM?(eO=e=>{eM(!0),k?.props?.onFocus?.(e)},g[33]=k?.props,g[34]=eM,g[35]=eO):eO=g[35],k?.props;let eL=eO,eV;g[36]!==k?.props||g[37]!==eM?(eV=e=>{eM(!0),k?.props?.onMouseEnter?.(e)},g[36]=k?.props,g[37]=eM,g[38]=eV):eV=g[38],k?.props;let eD=eV,eN;g[39]!==k?.props||g[40]!==eM?(eN=e=>{eM(!1),k?.props?.onMouseLeave?.(e)},g[39]=k?.props,g[40]=eM,g[41]=eN):eN=g[41],k?.props;let ez=eN,eB;g[42]!==eM||g[43]!==ek||g[44]!==Y||g[45]!==ew?(eB={handleIsOpenChange:eM,referenceElement:Y,showTooltip:ew,isInsideGroup:ek},g[42]=eM,g[43]=ek,g[44]=Y,g[45]=ew,g[46]=eB):eB=g[46],function(e){let t,n=(0,tt.c)(10),{handleIsOpenChange:r,referenceElement:i,showTooltip:o,isInsideGroup:s}=e,a;n[0]!==r||n[1]!==i?(a=(e,t)=>{i&&(i===e||e instanceof Node&&i.contains(e)||(r(!1),t()))},n[0]=r,n[1]=i,n[2]=a):a=n[2];let l=cX(a),u;n[3]!==s||n[4]!==l||n[5]!==o?(u=()=>{if(!o||s)return;let e=t=>{l(t.target,()=>window.removeEventListener("mousemove",e))};return window.addEventListener("mousemove",e),()=>window.removeEventListener("mousemove",e)},n[3]=s,n[4]=l,n[5]=o,n[6]=u):u=n[6],n[7]!==s||n[8]!==o?(t=[s,o],n[7]=s,n[8]=o,n[9]=t):t=n[9],(0,r_.useEffect)(u,t)}(eB),g[47]!==E||g[48]!==eM||g[49]!==ew?(n=()=>{E&&ew&&eM(!1)},r=[E,eM,ew],g[47]=E,g[48]=eM,g[49]=ew,g[50]=n,g[51]=r):(n=g[50],r=g[51]),(0,r_.useEffect)(n,r),g[52]!==S||g[53]!==eM||g[54]!==ew?(i=()=>{!S&&ew&&eM(!1)},o=[S,eM,ew],g[52]=S,g[53]=eM,g[54]=ew,g[55]=i,g[56]=o):(i=g[55],o=g[56]),(0,r_.useEffect)(i,o),g[57]===eM?s=g[58]:(s=()=>eM(!1,!0),g[57]=eM,g[58]=s);let eF=cX(s),eH;g[59]!==eF||g[60]!==ew?(eH=()=>{if(!ew)return;let e=function(e){"Escape"===e.key&&eF()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},g[59]=eF,g[60]=ew,g[61]=eH):eH=g[61],g[62]===ew?a=g[63]:(a=[ew],g[62]=ew,g[63]=a),(0,r_.useEffect)(eH,a),g[64]!==B||g[65]!==et?.offsetWidth?(l=()=>{J(Math.min(...B?[B.offsetWidth]:[],et?.offsetWidth||document.body.offsetWidth)-8)},g[64]=B,g[65]=et?.offsetWidth,g[66]=l):l=g[66],g[67]!==B||g[68]!==et?(u=[B,et],g[67]=B,g[68]=et,g[69]=u):u=g[69],(0,r_.useLayoutEffect)(l,u),g[70]===eu?c=g[71]:(c=e=>{Z.current=e,eu()},g[70]=eu,g[71]=c);let eU=c,eW;g[72]===el?eW=g[73]:(eW=e=>{G.current=e,el.setFloating(e)},g[72]=el,g[73]=eW);let eq=eW,eG;t:{let e;if(!k){eG=null;break t}g[74]!==k||g[75]!==eA||g[76]!==eP||g[77]!==eR||g[78]!==eL||g[79]!==eD||g[80]!==ez?(e=(0,r_.cloneElement)(k,{onBlur:eA,onFocus:eL,onMouseEnter:eD,onMouseLeave:ez,onClick:eP,onContextMenu:eR,ref:K}),g[74]=k,g[75]=eA,g[76]=eP,g[77]=eR,g[78]=eL,g[79]=eD,g[80]=ez,g[81]=e):e=g[81],eG=e}let eY=eG,eK;if(g[82]===k?eK=g[83]:(eK=k?ho(k):null,g[82]=k,g[83]=eK),g[84]===Y?(d=g[85],h=g[86]):(d=()=>Y,h=[Y],g[84]=Y,g[85]=d,g[86]=h),(0,r_.useImperativeHandle)(eK,d,h),!eY){let e;return g[87]===Symbol.for("react.memo_cache_sentinel")?(e=(0,sL.jsx)(sL.Fragment,{}),g[87]=e):e=g[87],e}if(E)return eY;let eZ=cx("_54iwec0",O.className),eX=X>0?`${X}px`:void 0,eJ;g[88]!==eo||g[89]!==eX?(eJ={...eo,maxWidth:eX},g[88]=eo,g[89]=eX,g[90]=eJ):eJ=g[90],g[91]!==U||g[92]!==L||g[93]!==ec||g[94]!==ed||g[95]!==S||g[96]!==eh||g[97]!==ef||g[98]!==V||g[99]!==es||g[100]!==N||g[101]!==O||g[102]!==T||g[103]!==eU||g[104]!==eq||g[105]!==z?(f=(0,sL.jsx)(vF,{...O,animate:U,arrow:L,arrowRef:e
15U,arrowX:ec,arrowY:ed,originX:eh,originY:ef,padding:V,placement:es,radius:N,ref:eq,scheme:T,shadow:z,children:S}),g[91]=U,g[92]=L,g[93]=ec,g[94]=ed,g[95]=S,g[96]=eh,g[97]=ef,g[98]=V,g[99]=es,g[100]=N,g[101]=O,g[102]=T,g[103]=eU,g[104]=eq,g[105]=z,g[106]=f):f=g[106],g[107]!==dz||g[108]!==O||g[109]!==eq||g[110]!==eZ||g[111]!==eJ||g[112]!==f||g[113]!==H?(p=(0,sL.jsx)(dz,{"data-ui":"Tooltip",...O,className:eZ,ref:eq,style:eJ,zOffset:H,children:f}),g[107]=dz,g[108]=O,g[109]=eq,g[110]=eZ,g[111]=eJ,g[112]=f,g[113]=H,g[114]=p):p=g[114];let eQ=p,e0;g[115]!==M||g[116]!==eQ?(e0=M?(0,sL.jsx)(c$,{__unstable_name:"string"==typeof M?M:void 0,children:eQ}):eQ,g[115]=M,g[116]=eQ,g[117]=e0):e0=g[117];let e1=e0,e2;return g[118]!==U||g[119]!==ew||g[120]!==e1?(e2=U?(0,sL.jsx)(hi,{layoutMode:"default",mode:ew?"visible":"hidden",children:e1}):(0,sL.jsx)(r_.Activity,{mode:ew?"visible":"hidden",children:e1}),g[118]=U,g[119]=ew,g[120]=e1,g[121]=e2):e2=g[121],g[122]!==eY||g[123]!==e2?(m=(0,sL.jsxs)(sL.Fragment,{children:[e2,eY]}),g[122]=eY,g[123]=e2,g[124]=m):m=g[124],m}let vW=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n};var vq=(e5={Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"},function(e){return null==e5?void 0:e5[e]}),vG=e.g&&e.g.Object===Object&&e.g,vY="object"==typeof self&&self&&self.Object===Object&&self,vK=(vG||vY||Function("return this")()).Symbol;let vZ=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var vX=Array.isArray,vJ=Object.prototype,vQ=vJ.hasOwnProperty,v0=vJ.toString,v1=vK?vK.toStringTag:void 0;let v2=function(e){var t=vQ.call(e,v1),n=e[v1];try{e[v1]=void 0;var r=!0}catch(e){}var i=v0.call(e);return r&&(t?e[v1]=n:delete e[v1]),i};var v5=Object.prototype.toString,v3=vK?vK.toStringTag:void 0;let v4=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v3&&v3 in Object(e)?v2(e):v5.call(e)},v6=function(e){return"symbol"==typeof e||null!=e&&"object"==typeof e&&"[object Symbol]"==v4(e)};var v8=1/0,v7=vK?vK.prototype:void 0,v9=v7?v7.toString:void 0;let be=function e(t){if("string"==typeof t)return t;if(vX(t))return vZ(t,e)+"";if(v6(t))return v9?v9.call(t):"";var n=t+"";return"0"==n&&1/t==-v8?"-0":n},bt=function(e){return null==e?"":be(e)};
15var bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,br=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),bi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bs="\\ud800-\\udfff",ba="\\u2700-\\u27bf",bl="a-z\\xdf-\\xf6\\xf8-\\xff",bu="A-Z\\xc0-\\xd6\\xd8-\\xde",bc="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bd="['â]",bh="["+bc+"]",bf="["+bl+"]",bp="[^"+bs+bc+"\\d+"+ba+bl+bu+"]",bm="(?:\\ud83c[\\udde6-\\uddff]){2}",bg="[\\ud800-\\udbff][\\udc00-\\udfff]",by="["+bu+"]",bv="(?:"+bf+"|"+bp+")",bb="(?:"+by+"|"+bp+")",bx="(?:"+bd+"(?:d|ll|m|re|s|t|ve))?",bw="(?:"+bd+"(?:D|LL|M|RE|S|T|VE))?",bk="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",bS="[\\ufe0e\\ufe0f]?",bE="(?:\\u200d(?:"+["[^"+bs+"]",bm,bg].join("|")+")"+bS+bk+")*",b_="(?:"+["["+ba+"]",bm,bg].join("|")+")"+(bS+bk+bE),bj=RegExp([by+"?"+bf+"+"+bx+"(?="+[bh,by,"$"].join("|")+")",bb+"+"+bw+"(?="+[bh,by+bv,"$"].join("|")+")",by+"?"+bv+"+"+bx,by+"+"+bw,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",b_].join("|"),"g");let bC=function(e,t,n){if(e=bt(e),void 0===(t=n?void 0:t)){var r;return(r=e,bo.test(r))?e.match(bj)||[]:e.match(bi)||[]}return e.match(t)||[]};var bM=RegExp("['â]","g");let b$=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o},bA=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:b$(e,t,n)};var bT=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let bP=function(e){return bT.test(e)};var bI="\\ud800-\\udfff",bR="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",bO="\\ud83c[\\udffb-\\udfff]",bL="[^"+bI+"]",bV="(?:\\ud83c[\\udde6-\\uddff]){2}",bD="[\\ud800-\\udbff][\\udc00-\\udfff]",bN="(?:"+bR+"|"+bO+")?",bz="[\\ufe0e\\ufe0f]?",bB="(?:\\u200d(?:"+[bL,bV,bD].join("|")+")"+bz+bN+")*",bF=RegExp(bO+"(?="+bO+")|"+("(?:"+[bL+bR+"?",bR,bV,bD,"["+bI+"]"].join("|"))+")"+(bz+bN+bB),"g");let bH=function(e){var t,n=bP(e=bt(e))?bP(t=e)?t.match(bF)||[]:t.split(""):void 0,r=n?n[0]:e.charAt(0),i=n?bA(n,1).join(""):e.slice(1);return r.toUpperCase()+i};var bU=(e3=function(e,t,n){return e+(n?" ":"")+bH(t)},function(e){var t;return vW(bC(((t=bt(t=e))&&t.replace(bn,vq).replace(br,"")).replace(bM,"")),e3,"")});function bW(e){if(!e)return(0,sL.jsx)(vP,{});if("string"===e.type)return(0,sL.jsx)(vO,{});if("number"===e.type)return(0,sL.jsx)(vR,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,sL.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,sL.jsx)(vO,{});if("boolean"===n)return(0,sL.jsx)(vT,{});if("number"===n)return(0,sL.jsx)(vR,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,sL.jsx)(vA,{}):(0,sL.jsx)(vL,{});if("object"===n){if("image"===e.name)return(0,sL.jsx)(vI,{});if("block"===e.name)return(0,sL.jsx)(vO,{})}return(0,sL.jsx)(vP,{})}let bq=l6` 16 overflow-y: scroll; 17 overscroll-behavior: contain; 18 -ms-overflow-style: none; 19 scrollbar-width: none; 20 21 &:before { 22 content: ''; 23 display: block; 24 height: calc(100% + 1px); 25 position: absolute; 26 top: 0; 27 width: 100%; 28 z-index: -1; 29 } 30`,bG=l8.div` 31 height: 100%; 32 inset: 0; 33 pointer-events: all; 34 position: fixed; 35 width: 100%; 36 display: flex; 37 justify-content: center; 38 align-items: center; 39 40 ${e=>e.$blockScroll&&bq} 41`,bY=l8.div` 42 background: transparent; 43 height: 100%; 44 inset: 0; 45 position: absolute; 46 width: 100%; 47`,bK=e=>{let t=(0,tt.c)(2),n;return t[0]===e?n=t[1]:(n=(0,sL.jsx)(c$,{children:(0,sL.jsx)(bZ,{...e})}),t[0]=e,t[1]=n),n},bZ=e=>{let t,n=(0,tt.c)(7),{children:r,onDismiss:i,setBoundaryElement:o,blockScroll:s}=e,a=void 0===s||s,l;return n[0]===i?l=n[1]:(l=(0,sL.jsx)(bY,{onMouseDownCapture:()=>{i?.()}}),n[0]=i,n[1]=l),n[2]!==a||n[3]!==r||n[4]!==o||n[5]!==l?(t=(0,sL.jsxs)(bG,{"data-sanity-overlay-element":!0,ref:o,onClick:bX,$blockScroll:a,children:[l,r]}),n[2]=a,n[3]=r,n[4]=o,n[5]=l,n[6]=t):t=n[6],t};function bX(e){e.stopPropagation()}function bJ(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let bQ={"Visual Editing Drag Sequence Completed":bJ({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":bJ({name:"Visual Editing Drag Minimap Enabled",description:"The zoomed-out minimap view is enabled during a drag sequence.",version:1}),"Visual Editing Context Menu Item Removed":bJ({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":bJ({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":bJ({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":bJ({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":bJ({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":bJ({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},b0=(0,r_.createContext)(void 0);function b1(){let e=(0,r_.useContext)(b0);if(!e)throw Error("Telemetry context is missing");return e}function b2(e){let t=function e(t){var n;return!!(n=t)&&("object"==typeof n||"function"==typeof n)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function b5(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let b3="all-items",b4={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",alignItems:"start"};function b6(e){let t,n,r,i,o,s,a=(0,tt.c)(54),l=void 0===e.showIcons||e.showIcons,u=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter,c;a[0]!==e.groups||a[1]!==e.labels?(c=e.groups?[{name:b3,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(b9)]:[],a[0]=e.groups,a[1]=e.labels,a[2]=c):c=a[2],a[3]===e.views?t=a[4]:(t=e.views??[{name:"list"}],a[3]=e.views,a[4]=t),a[5]===t?n=a[6]:(n=t.map(b7),a[5]=t,a[6]=n),a[7]!==c||a[8]!==n?(r={query:"",groups:c,views:n},a[7]=c,a[8]=n,a[9]=r):r=a[9];let[d,h]=(0,r_.useReducer)(b5,r),f,p,m,g,y,v,b,x,w;if(a[10]!==e||a[11]!==u||a[12]!==l||a[13]!==d.groups||a[14]!==d.query||a[15]!==d.views){var k,S,E;let t,n,r,i=(k=e.schemaTypes,S=d.query,E=d.groups,k.filter(e=>{var t,n;let r,i;return t=e,(!(r=E.find(e=>e.selected))||r.name===b3||r.of?.includes(t.name))&&(n=e,i=S.trim().toLowerCase(),n.title?n.title?.toLowerCase().includes(i):n.name.includes(i))})),o=d.views.find(b8),s=u||d.views.length>1,c=d.groups&&d.groups.length>0,_=s||c;m=vw,w=0,p=u5,v="column",b="fill",a[25]===_?t=a[26]:(t=_?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},a[25]=_,a[26]=t),a[27]!==e.labels||a[28]!==u||a[29]!==s||a[30]!==d.query||a[31]!==d.views?(n=s?(0,sL.jsxs)(u5,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[u?(0,sL.jsx)(uv,{flex:1,children:(0,sL.jsx)(cH,{autoFocus:!0,border:!1,fontSize:1,icon:vV,onChange:e=>{h({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:d.query})}):null,d.views.length>1?(0,sL.jsx)(uv,{flex:"none",children:(0,sL.jsx)(xn,{views:d.views,onToggle:e=>{h({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,a[27]=e.labels,a[28]=u,a[29]=s,a[30]=d.query,a[31]=d.views,a[32]=n):n=a[32],a[33]!==c||a[34]!==d.groups?(r=c?(0,sL.jsx)(uv,{paddingTop:1,paddingX:1,children:(0,sL.jsx)(dU,{gap:1,children:d.groups.map(e=>(0,sL.jsx)(dH,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??bU(e.name),selected:e.selected,onClick:()=>{h({type:"select group",name:e.name})}},e.name))})}
47):null,a[33]=c,a[34]=d.groups,a[35]=r):r=a[35],a[36]!==t||a[37]!==n||a[38]!==r?(x=(0,sL.jsxs)(uv,{...t,children:[n,r]}),a[36]=t,a[37]=n,a[38]=r,a[39]=x):x=a[39],f=uv,g=1,y=0===i.length?(0,sL.jsx)(uv,{padding:2,children:(0,sL.jsx)(u7,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):o?"grid"===o.name?(0,sL.jsx)(cb,{autoRows:"auto",flex:1,gap:1,style:b4,children:i.map(t=>(0,sL.jsx)(xi,{icon:l?b2(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:o.previewImageUrl?.(t.name),schemaType:t},t.name))}):(0,sL.jsx)(ct,{flex:1,gap:1,children:i.map(t=>(0,sL.jsx)(vM,{icon:l?b2(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??bU(t.name)},t.name))}):null,a[10]=e,a[11]=u,a[12]=l,a[13]=d.groups,a[14]=d.query,a[15]=d.views,a[16]=f,a[17]=p,a[18]=m,a[19]=g,a[20]=y,a[21]=v,a[22]=b,a[23]=x,a[24]=w}else f=a[16],p=a[17],m=a[18],g=a[19],y=a[20],v=a[21],b=a[22],x=a[23],w=a[24];return a[40]!==f||a[41]!==g||a[42]!==y?(i=(0,sL.jsx)(f,{padding:g,children:y}),a[40]=f,a[41]=g,a[42]=y,a[43]=i):i=a[43],a[44]!==p||a[45]!==i||a[46]!==v||a[47]!==b||a[48]!==x?(o=(0,sL.jsxs)(p,{direction:v,height:b,children:[x,i]}),a[44]=p,a[45]=i,a[46]=v,a[47]=b,a[48]=x,a[49]=o):o=a[49],a[50]!==m||a[51]!==o||a[52]!==w?(s=(0,sL.jsx)(m,{padding:w,children:o}),a[50]=m,a[51]=o,a[52]=w,a[53]=s):s=a[53],s}function b8(e){return e.selected}function b7(e,t){return{...e,selected:0===t}}function b9(e){return{...e,selected:!1}}let xe={grid:vD,list:vN},xt={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function xn(e){let t,n,r=(0,tt.c)(11),i=e.views.findIndex(xr),o=e.views[i+1]??e.views[0],s=e.labels[xt[o.name]],a;r[0]===s?a=r[1]:(a=(0,sL.jsx)(u7,{size:1,children:s}),r[0]=s,r[1]=a);let l=xe[o.name],u;return r[2]!==o.name||r[3]!==e?(u=()=>{e.onToggle(o.name)},r[2]=o.name,r[3]=e,r[4]=u):u=r[4],r[5]!==l||r[6]!==u?(t=(0,sL.jsx)(cs,{mode:"bleed",icon:l,onClick:u}),r[5]=l,r[6]=u,r[7]=t):t=r[7],r[8]!==a||r[9]!==t?(n=(0,sL.jsx)(vU,{content:a,placement:"top",portal:!0,children:t}),r[8]=a,r[9]=t,r[10]=n):n=r[10],n}function xr(e){return e.selected}function xi(e){let t,n,r,i,o,s,a,l=(0,tt.c)(20),[u,c]=(0,r_.useState)(!1),d=e.icon,h=!!e.previewImageUrl&&!u,f;l[0]===Symbol.for("react.memo_cache_sentinel")?(f={overflow:"hidden"},l[0]=f):f=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(t={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},l[1]=t):t=l[1],l[2]!==d||l[3]!==h?(n=(0,l7.isValidElementType)(d)&&!h?(0,sL.jsx)(u5,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,sL.jsx)(u7,{size:1,children:(0,sL.jsx)(d,{})})}):null,l[2]=d,l[3]=h,l[4]=n):n=l[4],l[5]!==h||l[6]!==e.previewImageUrl?(r=h?(0,sL.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{c(!0)}}):null,l[5]=h,l[6]=e.previewImageUrl,l[7]=r):r=l[7],l[8]===Symbol.for("react.memo_cache_sentinel")?(i=(0,sL.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}
47),l[8]=i):i=l[8],l[9]!==n||l[10]!==r?(o=(0,sL.jsxs)(uv,{flex:"none",style:t,children:[n,r,i]}),l[9]=n,l[10]=r,l[11]=o):o=l[11];let p=e.schemaType.title??e.schemaType.name,m;return l[12]===p?m=l[13]:(m=(0,sL.jsx)(uv,{flex:"none",paddingX:2,paddingY:1,children:(0,sL.jsx)(u7,{size:1,weight:"medium",children:p})}),l[12]=p,l[13]=m),l[14]!==o||l[15]!==m?(s=(0,sL.jsxs)(u5,{direction:"column",gap:1,padding:1,children:[o,m]}),l[14]=o,l[15]=m,l[16]=s):s=l[16],l[17]!==e.onClick||l[18]!==s?(a=(0,sL.jsx)(vM,{padding:0,radius:2,onClick:e.onClick,style:f,children:s}),l[17]=e.onClick,l[18]=s,l[19]=a):a=l[19],a}let xo={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter typesâ¦","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},xs=e=>{let t,n=(0,tt.c)(11),{node:r,onSelect:i}=e,o;n[0]===r.options?.insertMenu?o=n[1]:(o=r.options?.insertMenu||{},n[0]=r.options?.insertMenu,n[1]=o);let s=o,a;n[2]===s.views?a=n[3]:(a=s.views?.map(xa),n[2]=s.views,n[3]=a);let l=a,u;return n[4]===r.of?u=n[5]:(u=r.of.map(xl),n[4]=r.of,n[5]=u),n[6]!==s||n[7]!==i||n[8]!==u||n[9]!==l?(t=(0,sL.jsx)(b6,{...s,labels:xo,schemaTypes:u,onSelect:i,views:l}),n[6]=s,n[7]=i,n[8]=u,n[9]=l,n[10]=t):t=n[10],t};function xa(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function xl(e){return{...e,icon:bW(e)}}let xu=e=>{let t,n,r=(0,tt.c)(10),i,o,s;return r[0]===e?(i=r[1],o=r[2],s=r[3]):({children:i,style:s,...o}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=s),r[4]===s?t=r[5]:(t={...s,pointerEvents:"all"},r[4]=s,r[5]=t),r[6]!==i||r[7]!==o||r[8]!==t?(n=(0,sL.jsx)("div",{style:t,"data-sanity-overlay-element":!0,...o,children:i}),r[6]=i,r[7]=o,r[8]=t,r[9]=n):n=r[9],n},xc=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"arrow-down",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M12.5 19.5V5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M18 14L12.5 19.5L7 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),xd=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"arrow-up",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M7 11L12.5 5.5L18 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M12.5 5.5V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),xh=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"copy",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M8.5 8.5H5.5V20.5H16.5V16.5M19.5 4.5H8.5V16.5H19.5V4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),xf=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"insert-above",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M14.5 10.5556L10.5 10.5556M12.5 12.5L12.5 8.5M18.5 5.5L6.5 5.5M18.5 19.5L6.5 19.5L6.5 15.5L18.5 15.5L18.5 19.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})})}),xp=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"insert-below",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M10.5 14.5H14.5M12.5 12.5V16.5M6.5 19.5H18.5M6.5 5.5H18.5V9.5H6.5V5.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})})}),xm=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"publish",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M4.99997 5.50006H20M12.5 9.00005V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M7.5 14L12.5 9.00006L17.5 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),xg=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"sort",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M8.5 18.5V6M16.5 19V6.5M12 15L8.5 18.5L5 15M13 10L16.5 6.5L20 10",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),xy=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"unpublish",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M5 19.5H20M12.5 16V5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M17.5 11L12.5 16L7.5 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),xv=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"document",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M18.5 20.5H6.5V9.5L11.5 4.5H18.5V20.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),xb=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"drag-handle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M9.5 8C10.3284 8 11 7.32843 11 6.5C11 5.67157 10.3284 5 9.5 5C8.67157 5 8 5.67157 8 6.5C8 7.32843 8.67157 8 9.5 8Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M9.5 14C10.3284 14 11 13.3284 11 12.5C11 11.6716 10.3284 11 9.5 11C8.67157 11 8 11.6716 8 12.5C8 13.3284 8.67157 14 9.5 14Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M11 18.5C11 19.3284 10.3284 20 9.5 20C8.67157 20 8 19.3284 8 18.5C8 17.6716 8.67157 17 9.5 17C10.3284 17 11 17.6716 11 18.5Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M15.5 8C16.3284 8 17 7.32843 17 6.5C17 5.67157 16.3284 5 15.5 5C14.6716 5 14 5.67157 14 6.5C14 7.32843 14.6716 8 15.5 8Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11C16.3284 11 17 11.6716 17 12.5Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z",fill:"currentColor"})]})}),xx=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"ellipsis-vertical",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M14 6.5C14 7.32843 13.3284 8 12.5 8C11.6716 8 11 7.32843 11 6.5C11 5.67157 11.6716 5 12.5 5C13.3284 5 14 5.67157 14 6.5Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M14 12.5C14 13.3284 13.3284 14 12.5 14C11.6716 14 11 13.3284 11 12.5C11 11.6716 11.6716 11 12.5 11C13.3284 11 14 11.6716 14 12.5Z",fill:"currentColor"}),(0,sL.jsx)("path",{d:"M14 18.5C14 19.3284 13.3284 20 12.5 20C11.6716 20 11 19.3284 11 18.5C11 17.6716 11.6716 17 12.5 17C13.3284 17 14 17.6716 14 18.5Z",fill:"currentColor"})]})}),xw=(0,r_.forwardRef)(function(e,t){return(0,sL.jsx)("svg",{"data-sanity-icon":"plug",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,sL.jsx)("path",{d:"M13.25 8.5L16.75 5M16.25 11.5L19.75 8M9.25 15.5L5.25 19.5M7.75 14L9.75 12C8.25 10 8.75 9 9.75 8C10.15 7.6 11.25 6.5 11.25 6.5L18.25 13.5C18.25 13.5 17.3825 14.3675 16.75 15C15.75 16 14.75 16.5 12.75 15L10.75 17L7.75 14Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),xk=e=>"object"==typeof e&&null!=e&&1===e.nodeType,xS=(e,t)=>
47(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,xE=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n,r=getComputedStyle(e,null);return xS(r.overflowY,t)||xS(r.overflowX,t)||!!(n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1},x_=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,xj=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},xC=(e,t)=>{var n,r,i,o;let s;if("u"<typeof document)return[];let{scrollMode:a,block:l,inline:u,boundary:c,skipOverflowHiddenElements:d}=t,h="function"==typeof c?c:e=>e!==c;if(!xk(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],m=e;for(;xk(m)&&h(m);){if((m=xj(m))===f){p.push(m);break}null!=m&&m===document.body&&xE(m)&&!xE(document.documentElement)||null!=m&&xE(m,d)&&p.push(m)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,y=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:v,scrollY:b}=window,{height:x,width:w,top:k,right:S,bottom:E,left:_}=e.getBoundingClientRect(),{top:j,right:C,bottom:M,left:$}={top:parseFloat((s=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0},A="start"===l||"nearest"===l?k-j:"end"===l?E+M:k+x/2-j+M,T="center"===u?_+w/2-$+C:"end"===u?S+C:_-$,P=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:i,right:o,bottom:s,left:c}=t.getBoundingClientRect();if("if-needed"===a&&k>=0&&_>=0&&E<=y&&S<=g&&(t===f&&!xE(t)||k>=i&&E<=s&&_>=c&&S<=o))break;let d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),m=parseInt(d.borderTopWidth,10),j=parseInt(d.borderRightWidth,10),C=parseInt(d.borderBottomWidth,10),M=0,$=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-j:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-C:0,O="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)M="start"===l?A:"end"===l?A-y:"nearest"===l?x_(b,b+y,y,m,C,b+A,b+A+x,x):A-y/2,$="start"===u?T:"center"===u?T-g/2:"end"===u?T-g:x_(v,v+g,g,h,j,v+T,v+T+w,w),M=Math.max(0,M+b),$=Math.max(0,$+v);else{M="start"===l?A-i-m:"end"===l?A-s+C+R:"nearest"===l?x_(i,s,n,m,C+R,A,A+x,x):A-(i+n/2)+R/2,$="start"===u?T-c-h:"center"===u?T-(c+r/2)+I/2:"end"===u?T-o+j+I:x_(c,o,r,h,j+I,T,T+w,w);let{scrollLeft:e,scrollTop:a}=t;M=0===L?0:Math.max(0,Math.min(a+M/L,t.scrollHeight-n/L+R)),$=0===O?0:Math.max(0,Math.min(e+$/O,t.scrollWidth-r/O+I)),A+=a-M,T+=e-$}P.push({el:t,top:M,left:$})}return P},xM=(0,r_.forwardRef)(function(e,t){return(0,sL.jsxs)("svg",{"data-sanity-icon":"expand",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,sL.jsx)("path",{d:"M14 6.5H18.5V11M11 18.5H6.5V14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,sL.jsx)("path",{d:"M18.5 6.5L14 11M6.5 18.5L11 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})});function x$(e){if(e.defaultPrevented)return;let{clipboardData:t}=e;if(!t)return;let n=document.activeElement;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){let r=function(e){try{let{selectionStart:t,selectionEnd:n,value:r}=e;return null===t||null===n||t===n?null:r.slice(t,n)}catch{return null}}(n);if(!r||!sj(r))return;e.preventDefault(),t.setData("text/plain",sC(r));return}let r=document.getSelection();if(!r||r.isCollapsed||0===r.rangeCount)return;let i=r.toString(),o=function(e){let t="";for(let n=0;n<e.rangeCount;n++){let r=document.createElement("div");r.appendChild(e.getRangeAt(n).cloneContents()),t+=r.innerHTML}return t}(r);(sj(i)||sj(o))&&(e.preventDefault(),t.setData("text/plain",sC(i)),o&&t.setData("text/html",sC(o)))}let xA={IMG:["alt"],TIME:["datetime"],SVG:["aria-label"]};function xT(e){return e.nodeType===Node.ELEMENT_NODE}function xP(e){return xT(e)&&"SANITY-VISUAL-EDITING"===e.tagName.toUpperCase()}function xI(e){let t=xT(e)?e:e.parentElement;return!!t&&null!==t.closest("sanity-visual-editing")}function xR(e){return!!document.head&&document.head.contains(e)}
47function xO(e,t,n,r,i){if(!(!n||!sj(n))){if(r)return void i("head",e,t,n);xA[e.tagName.toUpperCase()]?.includes(t.toLowerCase())||i("attribute",e,t,n)}}function xL(e,t,n){let{attributes:r}=e;for(let i=0;i<r.length;i++){let o=r[i];o&&xO(e,o.name,o.value,t,n)}}function xV(e,t,n){let r=e.parentElement,i;if(t)i="head";else{if(!r)return;switch(r.tagName.toUpperCase()){case"SCRIPT":i="script";break;case"STYLE":i="style";break;case"TEXTAREA":i="form-value";break;default:return}}let o=e.textContent;o&&sj(o)&&n(i,r??void 0,void 0,o)}function xD(e,t,n){xT(e)?xP(e)||xL(e,t,n):e.nodeType===Node.TEXT_NODE&&xV(e,t,n)}function xN(e,t,n){xD(e,t,n);let r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>xP(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),i;for(;i=r.nextNode();)xD(i,t,n)}let xz=new Set,xB=null;function xF(e){if(xB!==e)for(let t of(xB=e,xz))t()}let xH=e=>{let t,n,r=(0,tt.c)(8),{comlink:i,history:o}=e,s,a;return r[0]!==i||r[1]!==o?(s=()=>i?.on("presentation/navigate",e=>{o?.update(e)}),a=[i,o],r[0]=i,r[1]=o,r[2]=s,r[3]=a):(s=r[2],a=r[3]),(0,r_.useEffect)(s,a),r[4]!==i||r[5]!==o?(t=()=>{if(o)return o.subscribe(e=>{e.title=e.title||document.title,i?.post("visual-editing/navigate",e)})},n=[i,o],r[4]=i,r[5]=o,r[6]=t,r[7]=n):(t=r[6],n=r[7]),(0,r_.useEffect)(t,n),null},xU=new Set,xW=null,xq=null,xG=null,xY=null,xK=null,xZ=new Set,xX=!1,xJ=0;function xQ(e){return xZ.add(e),()=>xZ.delete(e)}function x0(){return xX}let x1=e=>{let t=(0,tt.c)(3),{comlink:n}=e,r,i;return t[0]===n?(r=t[1],i=t[2]):(r=()=>{let e=()=>{n.post("visual-editing/meta",{title:document.title})},t=new MutationObserver(t=>{let[n]=t;"TITLE"===n.target.nodeName&&e()});return t.observe(document.head,{subtree:!0,characterData:!0,childList:!0}),e(),()=>t.disconnect()},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,r_.useEffect)(r,i),null};function x2(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let x5=(0,r_.createContext)(null);function x3(){let e=(0,r_.useContext)(x5);if(!e)throw Error("Schema context is missing");return e}function x4(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>rF(e,n,r))}function x6(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:xh,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>rz(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function x8(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:dB,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>rB(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function x7(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[s,a,l,u]=await Promise.all([rH(n,r,"previous"),rH(n,r,"next"),rH(n,r,"first"),rH(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:xm,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Up",icon:xd,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Down",icon:xc,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:xy,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:xg,items:o}),t&&i.push({type:"divider"})),i}async function x9(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...x6(e)),i.push(...x8(e)),i.push(...await x7(e)),i.push({type:"action",label:"Insert before",icon:xf,action:x4(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:xp,action:x4(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let we=e=>{let t,n,r,i,o=(0,tt.c)(12),{label:s,parent:a,width:l,onSelect:u,boundaryElement:c}=e,d;return o[0]===Symbol.for("react.memo_cache_sentinel")?(d=["left-start","right","left","right-end","left-end","bottom","top"],o[0]=d):d=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(t=[4,4,4,4],o[1]=t):t=o[1],o[2]!==c||o[3]!==l?(n={arrow:!1,constrainSize:!0,floatingBoundary:c,padding:0,placement:"right-start",fallbackPlacements:d,preventOverflow:!0,width:l,__unstable_margins:t},o[2]=c,o[3]=l,o[4]=n):n=o[4],o[5]!==u||o[6]!==a?(r=(0,sL.jsx)(xs,{node:a,onSelect:u}),o[5]=u,o[6]=a,o[7]=r):r=o[7],o[8]!==s||o[9]!==n||o[10]!==r?(i=(0,sL.jsx)(vC,{fontSize:1,icon:xp,padding:2,popover:n,gap:2,text:s,children:r}),o[8]=s,o[9]=n,o[10]=r,o[11]=i):i=o[11],i};async function wt(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...x6(e)),i.push(...x8(e)),i.push(...await x7(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,sL.jsx)(we,{label:"Insert before",onSelect:e=>{x4(n,t,e.name,"before")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})}),i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,sL.jsx)(we,{label:"Insert after",onSelect:e=>{x4(n,t,e.name,"after")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})})}else i.push({type:"group",label:"Insert before",icon:xf,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:bW(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:x4(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:xp,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:bW(e),action:x4(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let wn=[-4,4,-4,4];function wr(e){let t=(0,tt.c)(27),{node:n,onDismiss:r,boundaryElement:i}=e,o=b1(),s;t[0]!==n||t[1]!==r||t[2]!==o?(s=()=>{"action"===n.type&&(n.action?.(),r?.(),n.telemetryEvent&&o(n.telemetryEvent,null))},t[0]=n,t[1]=r,t[2]=o,t[3]=s):s=t[3];let a=s;if("divider"===n.type){let e;return t[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,sL.jsx)(vE,{}),t[4]=e):e=t[4],e}if("action"===n.type){let e=!n.action,r;return t[5]!==n.hotkeys||t[6]!==n.icon||t[7]!==n.label||t[8]!==a||t[9]!==e?(r=(0,sL.jsx)(vM,{fontSize:1,hotkeys:n.hotkeys,icon:n.icon,padding:2,gap:2,text:n.label,disabled:e,onClick:a}),t[5]=n.hotkeys,t[6]=n.icon,t[7]=n.label,t[8]=a,t[9]=e,t[10]=r):r=t[10],r}if("group"===n.type){let e,o=n.icon,s;t[11]===Symbol.for("react.memo_cache_sentinel")?(s={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:wn},t[11]=s):s=t[11];let a=n.label,l;if(t[12]!==i||t[13]!==n.items||t[14]!==r){let e;t[16]!==i||t[17]!==r?(e=(e,t)=>(0,sL.jsx)(wr,{node:e,onDismiss:r,boundaryElement:i},t),t[16]=i,t[17]=r,t[18]=e):e=t[18],l=n.items.map(e),t[12]=i,t[13]=n.items,t[14]=r,t[15]=l}else l=t[15];return t[19]!==n.icon||t[20]!==n.label||t[21]!==l?(e=(0,sL.jsx)(vC,{fontSize:1,icon:o,padding:2,popover:s,gap:2,text:a,children:l}),t[19]=n.icon,t[20]=n.label,t[21]=l,t[22]=e):e=t[22],e}
47if("custom"===n.type){let{component:e}=n,r;return t[23]!==e||t[24]!==i||t[25]!==o?(r=(0,sL.jsx)(e,{boundaryElement:i,sendTelemetry:o}),t[23]=e,t[24]=i,t[25]=o,t[26]=r):r=t[26],r}return null}let wi=e=>{let t,n,r,i,o,s,a,l,u=(0,tt.c)(43),{node:c,onDismiss:d,position:h}=e,{x:f,y:p}=h,[m,g]=(0,r_.useState)(null),{getField:y}=x3(),{getDocument:v}=rV(),b;u[0]!==y||u[1]!==c?(b=y(c),u[0]=y,u[1]=c,u[2]=b):b=u[2];let{field:x,parent:w}=b,k=x?.title||x?.name||"Unknown type",[S,E]=(0,r_.useState)(void 0),_,j;u[3]!==x||u[4]!==v||u[5]!==c||u[6]!==w?(_=()=>{(async()=>{let e=v(c.id);e&&E(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?x9({node:t,field:n,doc:i}):r?.type==="union"?wt({node:t,parent:r,doc:i}):Promise.resolve([])}({node:c,field:x,parent:w,doc:e}))})()},j=[x,c,w,v],u[3]=x,u[4]=v,u[5]=c,u[6]=w,u[7]=_,u[8]=j):(_=u[7],j=u[8]),(0,r_.useEffect)(_,j),u[9]!==f||u[10]!==p?(t={getBoundingClientRect:()=>({bottom:p,left:f,right:f,top:p,width:0,height:0})},u[9]=f,u[10]=p,u[11]=t):t=u[11];let C=t,M;u[12]===x?M=u[13]:(M=bW(x),u[12]=x,u[13]=M);let $=M,A;u[14]===Symbol.for("react.memo_cache_sentinel")?(A={minWidth:120,maxWidth:160},u[14]=A):A=u[14],u[15]!==$||u[16]!==S?(n=(0,sL.jsx)(uv,{flex:"none",children:S?(0,sL.jsx)(u7,{size:1,children:$}):(0,sL.jsx)(cr,{size:1})}),u[15]=$,u[16]=S,u[17]=n):n=u[17];let T=S?k:"Loading...",P;u[18]===T?P=u[19]:(P=(0,sL.jsx)(ct,{flex:1,gap:2,children:(0,sL.jsx)(u7,{size:1,weight:"semibold",children:T})}),u[18]=T,u[19]=P),u[20]!==n||u[21]!==P?(r=(0,sL.jsxs)(u5,{gap:2,padding:2,children:[n,P]}),u[20]=n,u[21]=P,u[22]=r):r=u[22],u[23]!==m||u[24]!==S||u[25]!==d?(i=S&&(0,sL.jsxs)(sL.Fragment,{children:[(0,sL.jsx)(vE,{}),S.map((e,t)=>(0,sL.jsx)(wr,{node:e,onDismiss:d,boundaryElement:m},t))]}),u[23]=m,u[24]=S,u[25]=d,u[26]=i):i=u[26],u[27]!==r||u[28]!==i?(o=(0,sL.jsxs)(vw,{style:A,children:[r,i]}),u[27]=r,u[28]=i,u[29]=o):o=u[29];let I=`${f}-${p}`,R;return u[30]!==f||u[31]!==p?(R={position:"absolute",left:f,top:p},u[30]=f,u[31]=p,u[32]=R):R=u[32],u[33]!==I||u[34]!==R?(s=(0,sL.jsx)("div",{style:R},I),u[33]=I,u[34]=R,u[35]=s):s=u[35],u[36]!==C||u[37]!==o||u[38]!==s?(a=(0,sL.jsx)(vp,{__unstable_margins:wn,arrow:!1,open:!0,placement:"right-start",referenceElement:C,content:o,children:s}),u[36]=C,u[37]=o,u[38]=s,u[39]=a):a=u[39],u[40]!==d||u[41]!==a?(l=(0,sL.jsx)(bK,{setBoundaryElement:g,onDismiss:d,children:a}),u[40]=d,u[41]=a,u[42]=l):l=u[42],l},wo="(anchor-name: --sanity-ve-overlay) and (position-try-fallbacks: flip-block)",ws=(0,r_.createContext)(null),wa=e=>l6` 48 @supports ${wo} { 49 position: fixed; 50 position-anchor: --sanity-ve-overlay; 51 inset: auto; 52 ${e} 53 position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; 54 position-try: flip-block, flip-inline, flip-block flip-inline; 55 } 56`,wl=l8(uV)` 57 background-color: var(--overlay-bg); 58 border-radius: 3px; 59 pointer-events: none; 60 position: absolute; 61 overflow: visible; 62 box-shadow: var(--overlay-box-shadow); 63 transition: none; 64 65 /* Scoped so each overlay's labels bind to this box, not the last overlay on the page. */ 66 anchor-name: --sanity-ve-overlay; 67 anchor-scope: --sanity-ve-overlay; 68 69 --overlay-bg: transparent; 70 --overlay-box-shadow: inset 0 0 0 1px transparent; 71 72 [data-overlays] & { 73 --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color)); 74 --overlay-box-shadow: inset 0 0 0 2px 75 color-mix(in srgb, transparent 50%, var(--card-focus-ring-color)); 76 } 77 78 [data-fading-out] & { 79 transition: 80 box-shadow 1550ms, 81 background-color 1550ms; 82 83 --overlay-bg: rgba(0, 0, 255, 0); 84 --overlay-box-shadow: inset 0 0 0 1px transparent; 85 } 86 87 &[data-focused] { 88 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 89 } 90 91 &[data-hovered]:not([data-focused]) { 92 transition: none; 93 --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color); 94 } 95 96 /* [data-unmounted] & { 97 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 98 } */ 99 100 :link { 101 text-decoration: none; 102 } 103`,wu=l8(u5)` 104 bottom: 100%; 105 cursor: pointer; 106 pointer-events: none; 107 position: absolute; 108 right: 0; 109 110 [data-hovered]:not([data-menu-open]) & { 111 pointer-events: all; 112 } 113 114 [data-flipped] & { 115 bottom: auto; 116 top: 100%; 117 } 118 119 ${wa(l6` 120 bottom: anchor(top); 121 right: anchor(right); 122 `)} 123`,wc=l8(u5)` 124 top: 100%; 125 cursor: pointer; 126 pointer-events: none; 127 position: absolute; 128 left: 0; 129 130 gap: 4px; 131 padding: 4px 0; 132 flex-wrap: wrap; 133 134 [data-hovered]:not([data-menu-open]) & { 135 pointer-events: all; 136 } 137 138 [data-flipped] & { 139 top: calc(100% + 2rem); 140 } 141 142 ${wa(l6` 143 top: anchor(bottom); 144 left: anchor(left); 145 `)} 146`,wd=l8(u5)` 147 margin: -0.5rem; 148 149 [data-hovered]:not([data-menu-open]) & { 150 pointer-events: all; 151 } 152`,wh=l8(u5)` 153 bottom: 100%; 154 cursor: pointer; 155 pointer-events: none; 156 position: absolute; 157 left: 0; 158 159 [data-hovered]:not([data-menu-open]) & { 160 pointer-events: all; 161 } 162 163 [data-flipped] & { 164 bottom: auto; 165 top: 100%; 166 } 167 168 ${wa(l6` 169 bottom: anchor(top); 170 left: anchor(left); 171 `)} 172`,wf=l8(uV)` 173 cursor: pointer; 174 background-color: var(--card-focus-ring-color); 175 right: 0; 176 border-radius: 3px; 177 178 & [data-ui='Text'] { 179 color: #fff; 180 white-space: nowrap; 181 } 182`,wp=l8(u5)` 183 display: flex; 184 align-items: center; 185 background-color: var(--card-focus-ring-color); 186 right: 0; 187 border-radius: 3px; 188 & [data-ui='Text'], 189 & [data-sanity-icon] { 190 color: #fff; 191 white-space: nowrap; 192 } 193`,wm=l8.div` 194 position: absolute; 195 inset: 0; 196 pointer-events: all; 197`,wg=e=>{let t,n,r,i,o,s,a,l,u=(0,tt.c)(60),{id:c,element:d,focused:h,componentResolver:f,node:p,showActions:m,draggable:g,targets:y,elementType:v,comlink:b,onActivateExclusivePlugin:x,onMenuOpenChange:w,inFrame:k}=e,{getField:S,getType:E}=x3(),_;
197u[0]!==E||u[1]!==p?(_=E(p),u[0]=E,u[1]=p,u[2]=_):_=u[2];let j=_,C;u[3]===p?C=u[4]:(C="path"in p?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:s,perspective:a}=e,[l,u]=ty({baseUrl:i,workspace:s,tool:o,type:n,id:t,path:r?oG(td.fromString(r)):[]}).split("?"),c=new URLSearchParams(u),d=a||c.get("perspective");return"drafts"===d?c.delete("perspective"):d&&c.set("perspective",d),`${l}?${c}`}(p):p.href,u[3]=p,u[4]=C);let M=C,$=function(){let e=(0,r_.useContext)(ws);if(!e)throw Error("Preview Snapshots context is missing");return e}(),A;t:{let e;if(!("path"in p)){A=void 0;break t}u[5]!==p||u[6]!==$?(e=$.find(e=>e._id===p.id)?.title,u[5]=p,u[6]=$,u[7]=e):e=u[7],A=e}let T=A,P;u[8]!==d||u[9]!==h||u[10]!==S||u[11]!==E?(P=function(e,t){let n=E(e),{field:r,parent:i}=S(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:d,targetElement:t||d,field:r,focused:!!h,node:e,parent:i,type:o}},u[8]=d,u[9]=h,u[10]=S,u[11]=E,u[12]=P):P=u[12];let I=P,R;if(u[13]!==v||u[14]!==I||u[15]!==p?(R="element"===v?I(p):void 0,u[13]=v,u[14]=I,u[15]=p,u[16]=R):R=u[16],u[17]!==I||u[18]!==y){let e;u[20]===I?e=u[21]:(e=e=>I(e.sanity,e.element),u[20]=I,u[21]=e),t=y.map(e).filter(wx),u[17]=I,u[18]=y,u[19]=t}else t=u[19];u[22]!==R||u[23]!==t?(n={legacyComponentContext:R,pluginContexts:t},u[22]=R,u[23]=t,u[24]=n):n=u[24];let O=n,L=function(e,t){let n=(0,tt.c)(3),r;if(n[0]!==e||n[1]!==t){t:{if(!e){r=void 0;break t}let n=t?.(e);if(!n){r=void 0;break t}if((0,r_.isValidElement)(n)){r=n;break t}r=(Array.isArray(n)?n:[n]).map(wv)}n[0]=e,n[1]=t,n[2]=r}else r=n[2];return r}(O.legacyComponentContext,f),V=function(e,t){let n=(0,tt.c)(5),r;if(n[0]!==e||n[1]!==t){let i;n[3]===t?i=n[4]:(i=e=>{let n={id:sr(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},n[3]=t,n[4]=i),r=e.map(i),n[0]=e,n[1]=t,n[2]=r}else r=n[2];return r}(O.pluginContexts,e.plugins),D;u[25]===j?D=u[26]:(D=j?.icon?(0,sL.jsx)("div",{dangerouslySetInnerHTML:{__html:j.icon}}):(0,sL.jsx)(xv,{}),u[25]=j,u[26]=D);let N=D,z=(0,r_.useId)(),B;u[27]===V?B=u[28]:(B=V?.some(ww),u[27]=V,u[28]=B);let F=B||V?.length>1,H;u[29]===c?H=u[30]:(H=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:c}}))},u[29]=c,u[30]=H);let U=H,W;return u[31]!==M||u[32]!==k||u[33]!==m?(W=m?(0,sL.jsx)(wu,{gap:1,paddingY:1,children:(0,sL.jsx)(wb,{inFrame:k,href:M})}):null,u[31]=M,u[32]=k,u[33]=m,u[34]=W):W=u[34],u[35]!==b||u[36]!==g||u[37]!==U||u[38]!==N||u[39]!==z||u[40]!==V||u[41]!==x||u[42]!==w||u[43]!==F||u[44]!==T?(r=(T||F)&&(0,sL.jsx)(wh,{gap:1,paddingY:1,onClick:U,children:(0,sL.jsxs)(wp,{gap:2,padding:2,children:[g&&(0,sL.jsx)(uv,{marginRight:1,children:(0,sL.jsx)(u7,{className:"drag-handle",size:0,children:(0,sL.jsx)(xb,{})})}),(0,sL.jsx)(u7,{size:0,children:N}),T&&(0,sL.jsx)(u7,{size:1,weight:"medium",children:T}),F&&(0,sL.jsx)(uv,{paddingLeft:2,onClick:wk,children:(0,sL.jsx)(wd,{children:(0,sL.jsx)(vk,{id:z,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{w?.(!0)},onClose:()=>{w?.(!1)},button:(0,sL.jsx)(cs,{icon:xx,tone:"primary",padding:2}),menu:(0,sL.jsx)(vw,{paddingY:0,children:(0,sL.jsx)(xu,{children:V?.map((e,t)=>(0,sL.jsxs)(r_.Fragment,{children:[(0,sL.jsxs)(ct,{role:"group",paddingY:1,gap:0,children:[(0,sL.jsx)(vM,{paddingY:2,text:(0,sL.jsx)(uv,{paddingY:2,children:(0,sL.jsx)(u7,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&b?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?(0,sL.jsx)(vM,{paddingY:2,icon:t.icon||(0,sL.jsx)(xw,{}),text:(0,sL.jsx)(uv,{paddingY:2,children:(0,sL.jsx)(u7,{size:1,children:t.title||t.name})}),onClick:()=>x?.(t,e.context)},t.name):null)]}),t<V.length-1&&(0,sL.jsx)(vE,{})]},e.id))})})})})})]})}),u[35]=b,u[36]=g,u[37]=U,u[38]=N,u[39]=z,u[40]=V,u[41]=x,u[42]=w,u[43]=F,u[44]=T,u[45]=r):r=u[45],u[46]===V?i=u[47]:(i=V?.map(wS),u[46]=V,u[47]=i),u[48]===i?o=u[49]:(o=(0,sL.jsx)(wc,{children:i}),u[48]=i,u[49]=o),u[50]!==W||u[51]!==r||u[52]!==o?(s=(0,sL.jsxs)(xu,{children:[W,r,o]}),u[50]=W,u[51]=r,u[52]=o,u[53]=s):s=u[53],u[54]!==L||u[55]!==O.legacyComponentContext?(a=Array.isArray(L)?L.map((e,t)=>{let{component:n,props:r}=e;return(0,sL.jsx)(n,{PointerEvents:xu,...O.legacyComponentContext,...r},t)}):L,u[54]=L,u[55]=O.legacyComponentContext,u[56]=a):a=u[56],u[57]!==s||u[58]!==a?(l=(0,sL.jsxs)(sL.Fragment,{children:[s,a]}),u[57]=s,u[58]=a,u[59]=l):l=u[59],l},wy=(0,r_.memo)(function(e){let t,n,r,i,o=(0,tt.c)(38),{draggable:s,focused:a,hovered:l,rect:u,wasMaybeCollapsed:c,enableScrollIntoView:d,inFrame:h}=e,f=(0,r_.useRef)(null),p=(0,r_.useRef)(!1),m=`${u.w}
197px`,g=`${u.h}px`,y=`${u.y}px`,v=`${u.x}px`,b;o[0]!==m||o[1]!==g||o[2]!==y||o[3]!==v?(b={width:m,height:g,top:y,left:v},o[0]=m,o[1]=g,o[2]=y,o[3]=v,o[4]=b):b=o[4];let x=b,w,k;o[5]!==d||o[6]!==a||o[7]!==c?(w=()=>{if(!p.current&&!c&&!0===a&&f.current&&d){let e=f.current;!function(e,t){let n;if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let r={top:parseFloat((n=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(n.scrollMarginRight)||0,bottom:parseFloat(n.scrollMarginBottom)||0,left:parseFloat(n.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(xC(e,t));let i="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:n,top:o,left:s}of xC(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=o-r.top+r.bottom,t=s-r.left+r.right;n.scroll({top:e,left:t,behavior:i})}}(f.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}p.current=!0===a},k=[a,c,d],o[5]=d,o[6]=a,o[7]=c,o[8]=w,o[9]=k):(w=o[8],k=o[9]),(0,r_.useEffect)(w,k);let[S,E]=(0,r_.useState)(!1),_,j;o[10]===l?(_=o[11],j=o[12]):(_=()=>{if(function(e=globalThis.CSS?.supports?.bind(globalThis.CSS)){return e?.(wo)===!0}())return;if(!f.current||!l)return void E(!1);let e=new IntersectionObserver(e=>{let[t]=e;E(t.boundingClientRect.top<0)},{threshold:1});return e.observe(f.current),()=>e.disconnect()},j=[l],o[10]=l,o[11]=_,o[12]=j),(0,r_.useEffect)(_,j);let[C,M]=(0,r_.useState)(null),$;o[13]===Symbol.for("react.memo_cache_sentinel")?($=()=>{M(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},o[13]=$):$=o[13];let A=$,T;o[14]===Symbol.for("react.memo_cache_sentinel")?(T=(e,t)=>{M({plugin:e,context:t})},o[14]=T):T=o[14];let P=T,I=C?.plugin.component,[R,O]=(0,r_.useState)(!1),L;o[15]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{(0,r_.startTransition)(()=>O(!1))},o[15]=L):L=o[15],o[16]===l?t=o[17]:(t=[l],o[16]=l,o[17]=t),(0,r_.useEffect)(L,t),o[18]!==I||o[19]!==R?(n=R||I?(0,sL.jsx)(bZ,{onDismiss:A,blockScroll:R}):null,o[18]=I,o[19]=R,o[20]=n):n=o[20];let V=a?"":void 0,D=l?"":void 0,N=S?"":void 0,z=s?"":void 0,B=R?"":void 0,F;return o[21]!==I||o[22]!==C||o[23]!==l||o[24]!==h||o[25]!==e?(F=I?(0,sL.jsx)(wm,{"data-sanity-overlay-element":!0,onClick:wE,children:(0,sL.jsx)(I,{...C.context,closeExclusiveView:A})}):l?(0,sL.jsx)(wg,{...e,inFrame:h,onActivateExclusivePlugin:P,onMenuOpenChange:O}):null,o[21]=I,o[22]=C,o[23]=l,o[24]=h,o[25]=e,o[26]=F):F=o[26],o[27]!==x||o[28]!==V||o[29]!==D||o[30]!==N||o[31]!==z||o[32]!==B||o[33]!==F?(r=(0,sL.jsx)(wl,{"data-focused":V,"data-hovered":D,"data-flipped":N,"data-draggable":z,"data-menu-open":B,ref:f,style:x,children:F}),o[27]=x,o[28]=V,o[29]=D,o[30]=N,o[31]=z,o[32]=B,o[33]=F,o[34]=r):r=o[34],o[35]!==n||o[36]!==r?(i=(0,sL.jsxs)(sL.Fragment,{children:[n,r]}),o[35]=n,o[36]=r,o[37]=i):i=o[37],i});function wv(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let wb=(0,r_.memo)(function(e){let t,n=(0,tt.c)(8),{inFrame:r}=e,i=(0,r_.useSyncExternalStore)(w_,wj),o;n[0]!==e.href||n[1]!==i?(o=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,i),n[0]=e.href,n[1]=i,n[2]=o):o=n[2];let s=o,a=r?void 0:"_blank",l=r?"noopener":"noopener noreferrer",u;return n[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,sL.jsx)(wf,{padding:2,children:(0,sL.jsx)(u7,{size:1,weight:"medium",children:"Open in Studio"})}),n[3]=u):u=n[3],n[4]!==s||n[5]!==a||n[6]!==l?(t=(0,sL.jsx)(uv,{as:"a",href:s,target:a,rel:l,children:u}),n[4]=s,n[5]=a,n[6]=l,n[7]=t):t=n[7],t});function wx(e){return void 0!==e}function ww(e){return e.exclusive.length>0}function wk(e){e.stopPropagation()}function wS(e){return(0,sL.jsx)(r_.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,sL.jsx)(n,{...e.context},t.name):null})},e.id)}function wE(e){e.stopPropagation()}function w_(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function wj(){return window.location.href}let wC=e=>{let t=(0,tt.c)(5),{dragGroupRect:n}=e,r=`${n.y}px`,i=`${n.x}px`,o=`${n.w-1}px`,s=`${n.h-1}px`,a;return t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==s?(a=(0,sL.jsx)("div",{style:{position:"absolute",top:r,left:i,width:o,height:s,border:"1px dashed #f0709b",pointerEvents:"none"}}),t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a):a=t[4],a},wM=e=>{let t=(0,tt.c)(4),{dragInsertPosition:n}=e;if(null===n)return;let r=n?.left||n?.right?"horizontal":"vertical",i=0,o=0,s=0,a=0;if("horizontal"===r){let{left:e,right:t}=n;if(s=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,s=.0125*Math.min(t.rect.h,e.rect.h);i=.5*n+.5*r-3,o=e.rect.y+s,a=Math.min(t.rect.h,e.rect.h)-2*s}else if(t&&!e){let e=.0125*t.rect.h;i=t.rect.x-3,o=t.rect.y+e,a=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;i=e.rect.x+e.rect.w-3,o=e.rect.y+t,a=e.rect.h-2*t}}else{let{bottom:e,top:t}=n;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,l=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);a=6,i=n+u,o=.5*r+.5*l-3,s=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;i=e.rect.x+t,o=e.rect.y-3,s=e.rect.w-2*t,a=6}else if(t&&!e){let e=.0125*t.rect.w;i=t.rect.x+e,o=t.rect.y+t.rect.h-3,s=t.rect.w-2*e,a=6}}let l=`${s}px`,u=`${a}px`,c=`translate(${i}px, ${o}px)`,d;return t[0]!==l||t[1]!==u||t[2]!==c?(d=(0,sL.jsx)("div",{style:{position:"absolute",width:l,height:u,transform:c,background:"#556bfc",border:"2px s
197olid white",borderRadius:"999px",zIndex:"999999"}}),t[0]=l,t[1]=u,t[2]=c,t[3]=d):d=t[3],d},w$=l8.div` 198 --drag-preview-opacity: 0.98; 199 --drag-preview-skeleton-stroke: #ffffff; 200 201 @media (prefers-color-scheme: dark) { 202 --drag-preview-skeleton-stroke: #383d51; 203 } 204 205 position: fixed; 206 display: grid; 207 transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`}; 208 width: ${({$width:e})=>`${e}px`}; 209 height: ${({$height:e})=>`${e}px`}; 210 z-index: 9999999; 211 opacity: var(--drag-preview-opacity); 212 cursor: move; 213 214 .drag-preview-content-wrapper { 215 position: relative; 216 width: 100%; 217 height: 100%; 218 container-type: inline-size; 219 } 220 221 [data-ui='card'] { 222 position: relative; 223 width: 100%; 224 height: 100%; 225 } 226 227 .drag-preview-skeleton { 228 position: absolute; 229 inset: 0; 230 231 rect { 232 stroke: var(--drag-preview-skeleton-stroke); 233 } 234 } 235 236 .drag-preview-handle { 237 position: absolute; 238 top: 4cqmin; 239 left: 4cqmin; 240 width: 6cqmin; 241 fill: var(--drag-preview-handle-fill); 242 } 243`,wA=e=>{var t,n;let r,i,o,s,a,l=(0,tt.c)(50),{skeleton:u}=e,c=Math.min(u.maxWidth,window.innerWidth/2),d=u.w>c?c/u.w:1,h=u.offsetX*d,f=u.offsetY*d,p=dW(),m=ux(),g=m.radius[~~(n=(u.w-0)*((t=m.radiu
243s.length-2)-1)/1920+1,n<1?1:n>t?t:n)],y,v,b,x,w,k,S,E,_,j,C,M,$,A,T,P;if(l[0]!==h||l[1]!==f||l[2]!==p||l[3]!==g||l[4]!==d||l[5]!==u.childRects||l[6]!==u.h||l[7]!==u.w){let e=u.childRects.filter(wT),t=u.childRects.filter(wP);v=w$,x=u.w,w=u.h,k=h,S=f,E=d,y=uV,M=g,$=4,A="hidden",T="transparent",P=p?"dark":"light",C="drag-preview-content-wrapper",_="drag-preview-skeleton",j=`0 0 ${u.w} ${u.h}`,b=[...e,...t],l[0]=h,l[1]=f,l[2]=p,l[3]=g,l[4]=d,l[5]=u.childRects,l[6]=u.h,l[7]=u.w,l[8]=y,l[9]=v,l[10]=b,l[11]=x,l[12]=w,l[13]=k,l[14]=S,l[15]=E,l[16]=_,l[17]=j,l[18]=C,l[19]=M,l[20]=$,l[21]=A,l[22]=T,l[23]=P}else y=l[8],v=l[9],b=l[10],x=l[11],w=l[12],k=l[13],S=l[14],E=l[15],_=l[16],j=l[17],C=l[18],M=l[19],$=l[20],A=l[21],T=l[22],P=l[23];return l[24]!==b||l[25]!==m.color?(r=b.map((e,t)=>(0,sL.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:m.color.skeleton.from},t)),l[24]=b,l[25]=m.color,l[26]=r):r=l[26],l[27]!==r||l[28]!==_||l[29]!==j?(i=(0,sL.jsx)("svg",{className:_,viewBox:j,children:r}),l[27]=r,l[28]=_,l[29]=j,l[30]=i):i=l[30],l[31]!==i||l[32]!==C?(o=(0,sL.jsx)("div",{className:C,children:i}),l[31]=i,l[32]=C,l[33]=o):o=l[33],l[34]!==y||l[35]!==o||l[36]!==M||l[37]!==$||l[38]!==A||l[39]!==T||l[40]!==P?(s=(0,sL.jsx)(y,{radius:M,shadow:$,overflow:A,tone:T,scheme:P,children:o}),l[34]=y,l[35]=o,l[36]=M,l[37]=$,l[38]=A,l[39]=T,l[40]=P,l[41]=s):s=l[41],l[42]!==v||l[43]!==x||l[44]!==w||l[45]!==k||l[46]!==S||l[47]!==E||l[48]!==s?(a=(0,sL.jsx)(v,{$width:x,$height:w,$offsetX:k,$offsetY:S,$scaleFactor:E,children:s}),l[42]=v,l[43]=x,l[44]=w,l[45]=k,l[46]=S,l[47]=E,l[48]=s,l[49]=a):a=l[49],a};function wT(e){return"IMG"===e.tagName}function wP(e){return"IMG"!==e.tagName}let wI=l8(uV)` 244 position: fixed; 245 bottom: 2rem; 246 left: 2rem; 247`,wR=()=>{let e,t=(0,tt.c)(2),n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={zIndex:"999999"},t[0]=n):n=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,sL.jsx)(wI,{padding:2,shadow:2,radius:2,style:n,children:(0,sL.jsxs)(u5,{align:"center",gap:2,children:[(0,sL.jsx)(dD,{keys:["Shift"]}),(0,sL.jsx)(u7,{size:1,children:"Zoom Out"}),(0,sL.jsx)(xM,{})]})}),t[1]=e):e=t[1],e};function wO(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,variant:s,isDragging:a,dragInsertPosition:l,dragShowMinimap:u,dragShowMinimapPrompt:c,dragSkeleton:d,dragMinimapTransition:h,dragGroupRect:f}=e,p=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(p=n.slice(i.length).startsWith("["))}return"presentation/perspective"===n&&(o=t.data.perspective,s=t.data.variant||void 0),"element/contextmenu"===n&&(r="sanity"in t?{node:t.sanity,position:t.position}:null),("element/click"===n||"element/mouseleave"===n||"overlay/blur"===n||"presentation/blur"===n||"presentation/focus"===n)&&(r=null),"overlay/dragUpdateInsertPosition"===n&&(l=t.insertPosition),"overlay/dragStart"===n&&(a=!0),"overlay/dragUpdateSkeleton"===t.type&&(d=t.skeleton),"overlay/dragEnd"===n&&(a=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(c=t.display),"overlay/dragStartMinimapTransition"===n&&(h=!0),"overlay/dragEndMinimapTransition"===n&&(h=!1),"overlay/dragUpdateGroupRect"===n&&(f=t.groupRect),"overlay/dragToggleMinimap"===n&&(u=t.display),{...e,contextMenu:r,elements:((e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>
247{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}})(e.elements,t),dragInsertPosition:l,dragSkeleton:d,dragGroupRect:f,isDragging:a,focusPath:i,perspective:o,variant:s,wasMaybeCollapsed:p,dragShowMinimap:u,dragShowMinimapPrompt:c,dragMinimapTransition:h}}let wL=function(e){let t,n,r,i=(0,tt.c)(13),{comlink:o,children:s}=e,a;i[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],i[0]=a):a=i[0];let[l,u]=(0,r_.useState)(a),c;i[1]===o?c=i[2]:(c=async e=>{if(o)try{let t=await o.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});u(t.snapshots)}catch{}},i[1]=o,i[2]=c);let d=c,h,f;return i[3]!==o||i[4]!==d?(h=()=>{if(!o)return;let e=new AbortController,t=o.onStatus(()=>{d(e.signal)},"connected");return()=>{e.abort(),t()}},f=[o,d],i[3]=o,i[4]=d,i[5]=h,i[6]=f):(h=i[5],f=i[6]),(0,r_.useEffect)(h,f),i[7]===o?(n=i[8],r=i[9]):(n=()=>o?.on("presentation/preview-snapshots",e=>{u(e.snapshots)}),r=[o],i[7]=o,i[8]=n,i[9]=r),(0,r_.useEffect)(n,r),i[10]!==s||i[11]!==l?(t=(0,sL.jsx)(ws.Provider,{value:l,children:s}),i[10]=s,i[11]=l,i[12]=t):t=i[12],t};function wV(e){return"document"===e.type}function wD(e){return"type"===e.type}let wN=function(e){let t,n,r=(0,tt.c)(22),{comlink:i,children:o,elements:s}=e,a;r[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Map,r[0]=a):a=r[0];let[l,u]=(0,r_.useState)(a),[c,d]=(0,r_.useState)(null),h,f;r[1]===i?(h=r[2],f=r[3]):(h=()=>{if(!i)return;let e=async function(e){if(i)try{let t=await i.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});d(t.schema)}catch{}},t=new AbortController,n=i.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},f=[i],r[1]=i,r[2]=h,r[3]=f),(0,r_.useEffect)(h,f),r[4]===Symbol.for("react.memo_cache_sentinel")?(t=[],r[4]=t):t=r[4];let p=(0,r_.useRef)(t),m=(0,r_.useDeferredValue)(s),g;r[5]===m?g=r[6]:(g=m.reduce((e,t)=>{let{sanity:n}=t;if(!("id"in n)||!n.path.includes("[_key=="))return e;let r=n.path.split(".").toReversed().reduce((e,t)=>e.length?[t,...e]:t.includes("[_key==")?[t]:[],[]).join(".");return e.find(e=>e.id===n.id&&e.path===r)||e.push({id:n.id,path:r}),e},[]),r[5]=m,r[6]=g);let y=g,v=(0,r_.useRef)(null),b,x;r[7]!==i||r[8]!==y?(b=()=>{if(!y.length||!i)return;let e=async(e,t)=>{let n=p.current;try{p.current=e;let n=await i.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;u(n.types),v.current=null}catch{}t.aborted&&(p.current=n)};y.some(e=>!p.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(v.current?.abort(),v.current=new AbortController,e(y,v.current.signal))},x=[i,y],r[7]=i,r[8]=y,r[9]=b,r[10]=x):(b=r[9],x=r[10]),(0,r_.useEffect)(b,x),r[11]===c?n=r[12]:(n=(e,t)=>{if(!c||"string"!=typeof e&&(!("path"in e)||!Array.isArray(c)))return;let n="string"==typeof e?e:e.type;return c.filter("document"===(t||"document")?wV:wD).find(e=>e.name===n)},r[11]=c,r[12]=n);let w=n,k;r[13]!==w||r[14]!==l?(k=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=w(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(wz);try{return function t(n,r,i,o){let s=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[a,...u]=r;if("fields"in n){let e=n.fields[a];if(!e&&"rest"in n)return t(n.rest,r,n,s);if(!u.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`);return t(e.value,u,n,[...s,a])}if("array"===n.type)return t(n.of,r,n,s);if("arrayItem"===n.type)return u.length?t(n.value,u,n,[...s,a]):{field:n,parent:i};if("union"===n.type){let r=a.startsWith("[_key==")?l?.get(e.id)?.get([s.join("."),a].filter(Boolean).join("")):a;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),u,n,[...s,a])}if("unionOption"===n.type)return a?t(n.value,r,n,s):{field:n,parent:i};if("inline"===n.type)return t(w(n.name,"type").value,r,n,s);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},r[13]=w,r[14]=l,r[15]=k):k=r[15];let S=k,E;r[16]!==S||r[17]!==w?(E={getField:S,getType:w},r[16]=S,r[17]=w,r[18]=E):E=r[18];let _=E,j;
247return r[19]!==o||r[20]!==_?(j=(0,sL.jsx)(x5.Provider,{value:_,children:o}),r[19]=o,r[20]=_,r[21]=j):j=r[21],j};function wz(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let wB=(f={},p=new Set,{getState:()=>f,setState:e=>{f=e(f),p.forEach(e=>e())},subscribe:e=>(p.add(e),()=>p.delete(e))}),wF=e=>{let t,n,r,i=(0,tt.c)(11),{comlink:o,children:s}=e,a,l;i[0]===o?(a=i[1],l=i[2]):(a=()=>o?.on("presentation/shared-state",wH),l=[o],i[0]=o,i[1]=a,i[2]=l),(0,r_.useEffect)(a,l),i[3]===o?(t=i[4],n=i[5]):(t=()=>{(async function(){let e=await o?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&wB.setState(()=>e.state)})().catch(wU)},n=[o],i[3]=o,i[4]=t,i[5]=n),(0,r_.useEffect)(t,n),i[6]===o?r=i[7]:(r={comlink:o,store:wB},i[6]=o,i[7]=r);let u=r,c;return i[8]!==s||i[9]!==u?(c=(0,sL.jsx)(sO.Provider,{value:u,children:s}),i[8]=s,i[9]=u,i[10]=c):c=i[10],c};function wH(e){"value"in e?wB.setState(t=>({...t,[e.key]:e.value})):wB.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function wU(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let wW=e=>{let t=(0,tt.c)(5),{children:n,comlink:r}=e,i;t[0]===r?i=t[1]:(i=(e,t)=>{if(!r)return;let n=bQ[e];if(n)r.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=(0,sL.jsx)(b0.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s};function wq(){}function wG(e){let{id:t,type:n,projectId:r,dataset:i}=e;return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}}function wY(e){return e.id}let wK=l8.div` 248 background-color: transparent; 249 direction: ltr; 250 inset: 0; 251 pointer-events: none; 252 position: absolute; 253 width: 100%; 254 height: 100%; 255 z-index: ${({$zIndex:e})=>e??"9999999"}; 256`;function wZ(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let wX=e=>{let t=(0,tt.c)(8),{documentIds:n}=e,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[i,o]=(0,r_.useState)(r),s,a;t[1]===n?(s=t[2],a=t[3]):(s=()=>{(0,r_.startTransition)(()=>o(e=>{let t=Array.from(new Set(n));return e.length===t.length&&e.reduce(w6,t)?.length===0?e:t}))},a=[n],t[1]=n,t[2]=s,t[3]=a),(0,r_.useEffect)(s,a);let l=rA(),u,c;return t[4]!==l||t[5]!==i?(u=()=>{for(let e of i)l.send({type:"observe",documentId:tm(e)}),l.send({type:"observe",documentId:tg(e)});return()=>{for(let e of i)l.send({type:"unobserve",documentId:tm(e)}),l.send({type:"unobserve",documentId:tg(e)})}},c=[l,i],t[4]=l,t[5]=i,t[6]=u,t[7]=c):(u=t[6],c=t[7]),(0,r_.useEffect)(u,c),null},wJ=e=>{var t;let n,r,i,o,s,a,l=(0,tt.c)(12),{comlink:u,dispatch:c,inFrame:d,inPopUp:h,onDrag:f,overlayEnabled:p,rootElement:m,shouldHideActions:g}=e,{dispatchDragEndEvent:y}=function(){let e,t=(0,tt.c)(4),{getDocument:n}=rV(),r,i;return t[0]===n?(r=t[1],i=t[2]):(r=()=>{let e=e=>{let{insertPosition:t,target:r,preventInsertDefault:i}=e.detail;if(i)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=n(r.id),{node:t,position:i}=o,{key:s,hasExplicitKey:a}=rN(r),{path:l,key:u}=rN(t);l&&u&&u!==s&&e.patch(async e=>{let{getSnapshot:t}=e,n=rM(await t(),r.path);return a?[tR(l,tV({_key:s})),tR(l,tO(n,i,{_key:u}))]:[tR(l,tV(~~s)),tR(l,tO(n,i,u>s?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,r_.useEffect)(r,i),t[3]===Symbol.for("react.memo_cache_sentinel")?(e={dispatchDragEndEvent:x2},t[3]=e):e=t[3],e}(),v=b1(),b;l[0]!==u||l[1]!==c||l[2]!==y||l[3]!==f||l[4]!==v?(b=e=>{if("element/click"===e.type){let{sanity:t}=e;u?.post("visual-editing/focus",t),v("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)u?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)u?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;y({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&v("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type)return void f(e.x,e.y);else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)v("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}c(e)},l[0]=u,l[1]=c,l[2]=y,l[3]=f,l[4]=v,l[5]=b):b=l[5];let x=(t=b,n=(0,tt.c)(8),r=(0,r_.useRef)(void 0),i=rR(),n[0]!==m||n[1]!==t||n[2]!==d||n[3]!==h||n[4]!==i||n[5]!==g?(o=()=>
256{if(m)return r.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i,shouldHideActions:o=!1}){let s=!1,a=new Map,l=new WeakMap,u=new Set,c=new WeakMap,d=new WeakMap,h,f,p,m=!1,g=[],y=()=>g[g.length-1];function v(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function b({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),h.observe(o),e({type:"element/activate",id:t})}function x({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;v(i,r),h.unobserve(o),g=g.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of g){if(t===n){let n=l.get(t)?.sanity;if(!n||!s$(n))return;if(sR(t,n,u,l)){let n=t.style.cursor;n&&d.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}k(n)}}function k(t){e({type:"overlay/setCursor",element:t,cursor:d.get(t)})}function S(d){for(let h of function e(t){let n=[];function r(e,t,n,r){let i=o1(t);if(!i)return;let o=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);if(o)return{elements:{element:e,measureElement:o},sanity:i,reason:n,preventGrouping:r}}if(t)for(let i of t.childNodes)!function t(i,o){let s=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=sA(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&i&&o){let e=sM(o);return e?r(i,e,"stega-text",!0):void 0}else if(t.nodeType===Node.ELEMENT_NODE){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&sj(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&sj(t.textContent)));if("IMG"===t.tagName){let e=sM(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=sM(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=sM(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),a=o;if(i.nodeType===Node.ELEMENT_NODE&&i.dataset?.sanityEditGroup!==void 0&&(a={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(a)),s){let e={elements:s.elements,sanity:s.sanity,reason:s.reason};a&&!s.preventGrouping?a.targets.push(e):n.push({elements:s.elements,type:"element",targets:[e]})}if(i.nodeType===Node.ELEMENT_NODE&&"IMG"!==i.tagName&&"SCRIPT"!==i.tagName&&"SANITY-VISUAL-EDITING"!==i.tagName)for(let e of i.childNodes)t(e,a)}(i,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:sA(e.targets.map(({sanity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(d)){if("group"===h.type){for(let e of h.targets){let t=l.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===h.targets.length&&E(h.elements.element)}if(!h.commonSanity)continue;let{element:d}=h.elements;l.has(d)?function(t){let{element:n}=t.elements,r=l.get(n);r&&(l.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:so(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(h):function({type:d,elements:h,commonSanity:p,targets:v}){let{element:x,measureElement:S}=h,E={click(t){var r;let i=t.target;if(!si||x!==y()||!x.contains(i)||0!==(r=t).button||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;n&&o&&(t.preventDefault(),t.stopPropagation());let s=l.get(x)?.sanity;s&&!m&&e({type:"element/click",id:_,sanity:s})},contextmenu(t){if(!si||!("path"in p)||!n&&!r||!i||!p.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;x===y()&&x.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:_,position:{x:t.clientX,y:t.clientY},sanity:p}))},mousedown(t){if(!si||t.currentTarget!==g.at(-1)||x.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=l.get(x)?.sanity;if(!o||!s$(o)||!sT(o.path))return;let s=sR(x,p,u,l);s&&(t.preventDefault(),function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:s,onSequenceStart:a,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>so(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!sa(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minima
256p-disable"),f=!!r.getAttribute("data-sanity-drag-prevent-default"),p=r.getAttribute("data-unstable_sanity-drag-document-height"),m=r.getAttribute("data-unstable_sanity-drag-group-height"),g=null,y=sp(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||sd(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=sd(e.map(e=>sc(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,m?~~m:null),w=!1,k=!1,S=!0;sb||(sS={body:{overflow:window.getComputedStyle(document.body).overflow,height:window.getComputedStyle(document.body).height},documentElement:{overflow:window.getComputedStyle(document.documentElement).overflow,height:window.getComputedStyle(document.documentElement).height}},sk=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>so(e.elements.element))},150),_=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:sm(sw,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),sg(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:sy(u)})},300)}))},j=e=>{Math.abs(e.deltaY)>=10&&x<1&&!sb&&!k&&!h&&S&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),k=!0),!e.shiftKey||sb||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),sb=!0,setTimeout(()=>{_()},50))},C=e=>{if(e.preventDefault(),sx=function(e){let t=document.body,n=window.getComputedStyle(t).transform;if("none"===n)return{x:e.x,y:e.y};let r=new DOMMatrix(n).inverse(),i=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:i.x,y:i.y}}(sw=sp(e)),4>Math.abs(sl(sw,y)))return;if(!w){let e=sy(u),t=sm(sw,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,a()}o({type:"overlay/dragUpdateCursorPosition",x:sw.x,y:sw.y}),!e.shiftKey||sb||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),sb=!0,setTimeout(()=>{_()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:su(r,t,n),right:su(i,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},i={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:su(r,t,n),bottom:su(i,t,n)}}}(sw,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:sf(i,g=t,c)})},M=()=>{S=!1,o({type:"overlay/dragEnd",target:s,insertPosition:g?sf(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),k&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),sb||(clearInterval(E),l(),I(),P()),T()},$=e=>{"Shift"===e.key&&sb&&(sb=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:sm(sw,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{sv(sx.y,v,sk,o,150,sS)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),S||(clearInterval(E),T(),I(),P(),l()))},A=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{sv(sx.y,v,sk,o,150,sS).then(()=>{sb=!1})},50),clearInterval(E),T(),I(),P(),l()},T=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("wheel",j),window.removeEventListener("mouseup",M)},P=()=>{window.removeEventListener("keyup",$)},I=()=>{window.removeEventListener("blur",A)};window.addEventListener("blur",A),window.addEventListener("keyup",$),window.addEventListener("wheel",j),window.addEventListener("mousemove",C),window.addEventListener("mouseup",M)}({element:x,handler:e,mouseEvent:t,overlayGroup:s,target:o,onSequenceStart:()=>{m=!0},onSequenceEnd:()=>{setTimeout(()=>{m=!1},250)}}))},mousemove(e){E.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",E.mouseenter),t.addEventListener("mouseleave",E.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&x.closest("[data-vercel-edit-info]")||x.closest("[data-vercel-edit-target]")||(g.push(x),e({type:"element/mouseenter",id:_,rect:so(x)}),w(x))},mouseleave(n){function r(){g.pop();let t=y();if(e({type:"element/mouseleave",id:_}),t){w(t);let n=l.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:so(t)})}k(x)}let{relatedTarget:i}=n,o=s_(i),s=t.contains(o);if(sE(o)&&s)return function e(t){let n=i=>{let{relatedTarget:o}=i;s_(o)?o&&sE(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},_=sr(),j={type:d,id:_,elements:h,sanity:p,handlers:E};u.add(x),c.set(S,x),a.set(_,x),l.set(x,j),f?.observe(x),e({type:"element/register",elementType:d,id:_,element:x,rect:so(x),sanity:p,dragDisabled:!!x.getAttribute("data-sanity-drag-disable"),targets:v.map(e=>({sanity:e.sanity,element:e.elements.element}))}),s&&b(j)}(h)}}function E(t){let n=l.get(t);if(n){let{id:r,handlers:i}=n;v(t,i),h.unobserve(t),l.delete(t),u.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function _(t){let n=l.get(t);n&&e({type:"element/updateRect",id:n.id,rect:so(t)})}function j(e){if(s)for(let t of e){let{target:e}=t,n=sE(e)&&l.get(e);n&&(t.isIntersecting?b(n):x(n))}}function C(t){let n=s_(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}g=[],e({type:"overlay/blur"})}function M(){g=[],e({type:"overlay/reset-mouse-state"})}function $(){for(let e of u)_(e)}function A(t){"Escape"===t.key&&(g=[],e({type:"overlay/blur"}))}function T(e){let{target:t}=e;if(!(t===window.document||!sE(t)))for(let e of u)t.contains(e)&&_(e)}function P(){s||=(f=new IntersectionObserver(j,{threshold:.3}
256),u.forEach(e=>f.observe(e)),e({type:"overlay/activate"}),!0)}function I(){s&&=(f?.disconnect(),u.forEach(e=>{let t=l.get(e);t&&x(t)}),e({type:"overlay/deactivate"}),!1)}function R(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let i=l.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of u)_(e)}),window.addEventListener("click",C),window.addEventListener("contextmenu",C),window.addEventListener("sanity-overlay/exclusive-plugin-closed",M),window.addEventListener("sanity-overlay/label-click",R),window.addEventListener("keydown",A),window.addEventListener("resize",$),window.addEventListener("scroll",T,{capture:!0,passive:!0}),h=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(sE(e)){let t=c.get(e);if(!t)return;_(t)}}}),(p=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:i}=r,o="characterData"===i?e.parentElement:e;if(!(o===t||t.contains(o))&&(n=!0,sE(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;S({childNodes:[sE(e)?e:o]})}}if(n)for(let e of u)e.isConnected||E(e),l.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),S(document.body),P(),{activate:P,deactivate:I,destroy:function(){window.removeEventListener("click",C),window.removeEventListener("contextmenu",C),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",M),window.removeEventListener("sanity-overlay/label-click",R),window.removeEventListener("keydown",A),window.removeEventListener("resize",$),window.removeEventListener("scroll",T),p.disconnect(),h.disconnect(),u.forEach(e=>{E(e)}),a.clear(),u.clear(),g=[],I()}}}({handler:t,overlayElement:m,inFrame:d,inPopUp:h,optimisticActorReady:i,shouldHideActions:g}),()=>{r.current?.destroy(),r.current=void 0}}
256,s=[m,t,d,h,i,g],n[0]=m,n[1]=t,n[2]=d,n[3]=h,n[4]=i,n[5]=g,n[6]=o,n[7]=s):(o=n[6],s=n[7]),(0,r_.useEffect)(o,s),r),w;return l[6]!==x.current||l[7]!==p?(w=()=>{p?x.current?.activate():x.current?.deactivate(),si=p},l[6]=x.current,l[7]=p,l[8]=w):w=l[8],l[9]!==x||l[10]!==p?(a=[x,p],l[9]=x,l[10]=p,l[11]=a):a=l[11],(0,r_.useEffect)(w,a),null};function wQ(e){let t,n,r,i,o,s,a,l,u,c,d,h,f,p,m,g,y,v,b,x,w,k,S,E,_,j,C,M=(0,tt.c)(80),{comlink:$,comlinkStatus:A,componentResolver:T,inFrame:P,inPopUp:I,zIndex:R,onPerspectiveChange:O,onVariantChange:L}=e,V=dW(),D;M[0]===Symbol.for("react.memo_cache_sentinel")?(D={contextMenu:null,dragInsertPosition:null,dragShowMinimap:!1,dragShowMinimapPrompt:!1,dragSkeleton:null,elements:[],focusPath:"",isDragging:!1,perspective:"published",variant:void 0,wasMaybeCollapsed:!1,dragMinimapTransition:!1,dragGroupRect:null},M[0]=D):D=M[0];let[N,z]=(0,r_.useReducer)(wO,D),{contextMenu:B,dragInsertPosition:F,dragShowMinimap:H,dragShowMinimapPrompt:U,dragSkeleton:W,elements:q,isDragging:G,perspective:Y,variant:K,wasMaybeCollapsed:Z,dragMinimapTransition:X,dragGroupRect:J}=N,[Q,ee]=(0,r_.useState)(null),et;M[1]===Symbol.for("react.memo_cache_sentinel")?(et=e=>{e&&ee(e)},M[1]=et):et=M[1];let en=et,[er,ei]=(0,r_.useState)(!0),eo=(0,r_.useRef)(er),es;M[2]===Symbol.for("react.memo_cache_sentinel")?(es=()=>{let e=!eo.current;eo.current=e,si=e,ei(e)},M[2]=es):es=M[2];let ea=es,el,eu;M[3]===$?(el=M[4],eu=M[5]):(el=()=>{let e=[$?.on("presentation/focus",e=>{z({type:"presentation/focus",data:e})}),$?.on("presentation/blur",e=>{z({type:"presentation/blur",data:e})}),$?.on("presentation/toggle-overlay",()=>{ea()})].filter(Boolean);return()=>e.forEach(w5)},eu=[$,ea],M[3]=$,M[4]=el,M[5]=eu),(0,r_.useEffect)(el,eu),n=(0,tt.c)(14),r=!!O,i=!!L,n[0]!==z||n[1]!==O||n[2]!==L?(o=e=>{z({type:"presentation/perspective",data:e}),O?.(e.perspective),L?.(e.variant||void 0)},n[0]=z,n[1]=O,n[2]=L,n[3]=o):o=n[3],s=(0,r_.useEffectEvent)(o),n[4]!==$||n[5]!==s||n[6]!==r||n[7]!==i?(a=()=>{let e=new AbortController;$?.fetch("visual-editing/fetch-perspective",{handlesPerspectiveChange:r,handlesVariantChange:i},{signal:e.signal,suppressWarnings:!0}).then(e=>{s(e)}).catch(wq);let t=$?.on("presentation/perspective",e=>{s(e)});return()=>{t?.(),e.abort()}},n[4]=$,n[5]=s,n[6]=r,n[7]=i,n[8]=a):a=n[8],n[9]!==$||n[10]!==z||n[11]!==r||n[12]!==i?(t=[$,z,r,i],n[9]=$,n[10]=z,n[11]=r,n[12]=i,n[13]=t):t=n[13],(0,r_.useEffect)(a,t),l=(0,tt.c)(8),u=(0,r_.useRef)(void 0),l[0]===$?c=l[1]:(c=(e,t,n)=>{$?.post("visual-editing/documents",{documents:e,perspective:t,variant:n})},l[0]=$,l[1]=c),d=c,l[2]!==q||l[3]!==Y||l[4]!==d||l[5]!==K?(h=()=>{let e,t,n=(e=[...q].sort((e,t)=>{let n=e.rect.y-t.rect.y;return 0===n?e.rect.x-t.rect.x:n}),t=new Set,e.reduce((e,n)=>{let{sanity:r}=n;return!(!r||!("id"in r)||t.has(r.id))&&(t.add(r.id),e.push(r)),e},[])),r=n.map(wY),i=u.current?.orderedIds;if(!i||i.length!==r.length||r.some((e,t)=>e!==i[t])||Y!==u.current?.perspective||K!==u.current?.variant){let e=n.map(wG);u.current={orderedIds:r,perspective:Y,variant:K},d(e,Y,K)}},f=[q,Y,K,d],l[2]=q,l[3]=Y,l[4]=d,l[5]=K,l[6]=h,l[7]=f):(h=l[6],f=l[7]),(0,r_.useEffect)(h,f),M[6]===Q?p=M[7]:(p=(e,t)=>{Q&&(Q.style.setProperty("--drag-preview-x",`${e}px`),Q.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},M[6]=Q,M[7]=p);let ec=p,ed,eh;M[8]===Symbol.for("react.memo_cache_sentinel")?(ed=()=>{let e=!1,t=t=>{w4(t)&&e&&(e=!1,ea())},n=t=>{var n,r;if(w4(t)){if(t.ctrlKey||t.metaKey||t.shiftKey)return;e||(e=!0,ea())}n=["mod","\\"],r=t,n.every(e=>w3[e]?r[w3[e]]:r.key===e.toUpperCase())&&ea()},r=()=>{e&&(e=!1,ea())};return window.addEventListener("click",w2),window.addEventListener("keydown",n),window.addEventListener("keyup",t),window.addEventListener("blur",r),()=>{window.removeEventListener("click",w2),window.removeEventListener("keydown",n),window.removeEventListener("keyup",t),window.removeEventListener("blur",r)}},eh=[ea],M[8]=ed,M[9]=eh):(ed=M[8],eh=M[9]),(0,r_.useEffect)(ed,eh);let[ef,ep]=(0,r_.useState)(!1),[em,eg]=(0,r_.useState)(!1),ey=(0,r_.useRef)(void 0),ev,eb;M[10]===er?(ev=M[11],eb=M[12]):(eb=()=>{if(er)return wZ(()=>{ep(!0),wZ(()=>{eg(!0),ey.current=setTimeout(()=>{eg(!1),ep(!1)},1500)})});ey.current&&(clearTimeout(ey.current),(0,r_.startTransition)(()=>{ep(!1),eg(!1)}))},ev=[er],M[10]=er,M[11]=ev,M[12]=eb),(0,r_.useEffect)(eb,ev),M[13]===q?m=M[14]:(m=q.flatMap(w1),M[13]=q,M[14]=m);let ex=m,ew;M[15]===Symbol.for("react.memo_cache_sentinel")?(ew=()=>{z({type:"overlay/blur"})},M[15]=ew):ew=M[15];let ek=ew,eS=rR(),eE=eS?T:void 0,[e_,ej]=(0,r_.useState)(!1);!e_&&P&&"connected"===A&&ej(!0);t:{let t;if(G){let e;M[16]===Symbol.for("react.memo_cache_sentinel")?(e=[],M[16]=e):e=M[16],g=e;break t}M[17]!==$||M[18]!==eE||M[19]!==X||M[20]!==H||M[21]!==q||M[22]!==P||M[23]!==G||M[24]!==eS||M[25]!==e.plugins||M[26]!==e_||M[27]!==Z?(t=q.filter(w0).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:s,sanity:a,dragDisabled:l,targets:u,elementType:c}=t,d=!l&&!!r.getAttribute("data-sanity")&&eS&&q.some(e=>"id"in e.sanity&&"id"in a&&sI(e.sanity,a)&&e.sanity.path!==a.path);return(0,sL.jsx)(wy,{comlink:$,componentResolver:eE,plugins:e.plugins,element:r,enableScrollIntoView:!G&&!X&&!H,id:n,focused:i,hovered:o,node:a,rect:s,showActions:!e_,draggable:d,isDragging:G||X,wasMaybeCollapsed:i&&Z,targets:u,elementType:c,inFrame:P},n)}),M[17]=$,M[18]=eE,M[19]=X,M[20]=H,M[21]=q,M[22]=P,M[23]=G,M[24]=eS,M[25]=e.plugins,M[26]=e_,M[27]=Z,M[28]=t):t=M[28],g=t}let eC=g,eM=V?"dark":"light",e$=em?"":void 0,eA=ef?"":void 0,eT;return M[29]!==ex||M[30]!==Y?(eT=(0,sL.jsx)(wX,{documentIds:ex,perspective:Y}),M[29]=ex,M[30]=Y,M[31]=eT):eT=M[31],M[32]!==$||M[33]!==P||M[34]!==I||M[35]!==er||M[36]!==Q||M[37]!==e_||M[38]!==ec?(y=(0,sL.jsx)(wJ,{comlink:$,dispatch:z,inFrame:P,inPopUp:I,onDrag:ec,overlayEnabled:er,rootElement:Q,shouldHideActions:e_}),M[32]=$,M[33]=P,M[34]=I,M[35]=er,M[36]=Q,M[37]=e_,M[38]=ec,M[39]=y):y=M[39],M[40]===B?v=M[41]:(v=B&&(0,sL.jsx)(wi,{...B,onDismiss:ek}),M[40]=B,M[41]=v),M[42]!==J||M[43]!==F||M[44]!==X||M[45]!==U||M[46]!==G?(b=G&&!X&&(0,sL.jsxs)(sL.Fragment,{children:[F&&(0,sL.jsx)(wM,{dragInsertPosition:F}),U&&(0,sL.jsx)(wR,{}),J&&(0,sL.jsx)(wC,{dragGroupRect:J})]}),M[42]=J,M[43]=F,M[44]=X,M[45]=U,M[46]=G,M[47]=b):b=M[47],M[48]!==W||M[49]!==G?(x=G&&W&&(0,sL.jsx)(wA,{skeleton:W}),M[48]=W,M[49]=G,M[50]=x):x=M[50],M[51]!==eC||M[52]!==e$||M[53]!==eA||M[54]!==eT||M[55]!==y||M[56]!==v||M[57]!==b||M[58]!==x||M[59]!==R?(w=(0,sL.jsxs)(wK,{"data-fading-out":e$,"data-overlays":eA,ref:en,$zIndex:R,children:[eT,y,v,eC,b,x]}),M[51]=eC,M[52]=e$,M[53]=eA,M[54]=eT,M[55]=y,M[56]=v,M[57]=b,M[58]=x,M[59]=R,M[60]=w):w=M[60],M[61]!==$||M[62]!==w?(k=(0,sL.jsx)(wF,{
256comlink:$,children:w}),M[61]=$,M[62]=w,M[63]=k):k=M[63],M[64]!==$||M[65]!==k?(S=(0,sL.jsx)(wL,{comlink:$,children:k}),M[64]=$,M[65]=k,M[66]=S):S=M[66],M[67]!==$||M[68]!==q||M[69]!==S?(E=(0,sL.jsx)(wN,{comlink:$,elements:q,children:S}),M[67]=$,M[68]=q,M[69]=S,M[70]=E):E=M[70],M[71]!==Q||M[72]!==E?(_=(0,sL.jsx)(uY,{children:(0,sL.jsx)(dG,{element:Q,children:E})}),M[71]=Q,M[72]=E,M[73]=_):_=M[73],M[74]!==eM||M[75]!==_?(j=(0,sL.jsx)(uI,{scheme:eM,theme:dF,tone:"transparent",children:_}),M[74]=eM,M[75]=_,M[76]=j):j=M[76],M[77]!==$||M[78]!==j?(C=(0,sL.jsx)(wW,{comlink:$,children:j}),M[77]=$,M[78]=j,M[79]=C):C=M[79],C}function w0(e){return e.activated||e.focused}function w1(e){return"id"in e.sanity?[e.sanity.id]:[]}function w2(e){let t=e.target;if((cR(t)||cI(t)&&t.closest("a"))&&e.altKey){e.preventDefault(),e.stopPropagation();let t=new MouseEvent(e.type,{...e,altKey:!1,bubbles:!0,cancelable:!0});e.target?.dispatchEvent(t)}}function w5(e){return e()}let w3={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function w4(e){return"Alt"===e.key}function w6(e,t){return e.filter(e=>e!==t)}let w8=e=>{let t=(0,tt.c)(4),{comlink:n,refresh:r}=e,i=(0,r_.useRef)(0),o=(0,r_.useRef)(0),s,a;return t[0]!==n||t[1]!==r?(s=()=>n.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(i.current);let t=r(e);if(!1===t)return;n.post("visual-editing/refreshing",e);let o=!1;i.current=window.setTimeout(()=>{n.post("visual-editing/refreshed",e),o=!0},3e3),t?.finally?.(()=>{o||(clearTimeout(i.current),n.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(o.current);let t=r(e);if(!1===t)return;n.post("visual-editing/refreshing",e),o.current=window.setTimeout(()=>{let t=r(e);!1!==t&&(n.post("visual-editing/refreshing",e),t?.finally?.(()=>{n.post("visual-editing/refreshed",e)})||n.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{n.post("visual-editing/refreshed",e)})||n.post("visual-editing/refreshed",e)}}),a=[n,r],t[0]=n,t[1]=r,t[2]=s,t[3]=a):(s=t[2],a=t[3]),(0,r_.useEffect)(s,a),null};function w7(e){let{data:t,origin:n}=e;t&&"object"==typeof t&&"domain"in t&&"sanity/channels"===t.domain&&"from"in t&&"presentation"===t.from&&"type"in t&&"presentation/status"===t.type&&window.parent.postMessage({domain:"sanity/channels",type:"visual-editing/status",data:{origin:location.origin}},n)}function w9(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function ke(){}let kt=(0,r_.lazy)(()=>e.A(359155)),kn=e=>{var t;let n,r,i,o,s,a,l,u,c,d,h,f,p=(0,tt.c)(44),{components:m,plugins:g,history:y,keepStegaOnCopy:v,portal:b,refresh:x,zIndex:w,onPerspectiveChange:k,onVariantChange:S,onSuspiciousStega:E}=e,_=void 0===b||b,[j,C]=(0,r_.useState)(null),[M,$]=(0,r_.useState)(null),A,T;p[0]===Symbol.for("react.memo_cache_sentinel")?(A=()=>{(0,r_.startTransition)(()=>{C(rb()),$(rx())})},T=[],p[0]=A,p[1]=T):(A=p[0],T=p[1]),(0,r_.useEffect)(A,T),p[2]===v?(o=p[3],s=p[4]):(o=()=>{if(!v)return document.addEventListener("copy",x$),()=>{document.removeEventListener("copy",x$)}},s=[v],p[2]=v,p[3]=o,p[4]=s),(0,r_.useEffect)(o,s),p[5]===E?a=p[6]:(a=e=>E?.(e),p[5]=E,p[6]=a);let P=(0,r_.useEffectEvent)(a),I="function"==typeof E,R;p[7]!==P||p[8]!==I?(R=()=>{if(I){let e,t,n,r,i,o,s,a,l,u;return e=new Set,t=[],n=[],r=!1,i=null,o=!1,s=(n,r,i,o)=>{let s=sC(o),a=`${n}|${i??""}|${s}`;e.has(a)||(e.add(a),t.push({kind:n,element:r,attribute:i,value:o,cleaned:s,sanity:function(e){try{let t=se(e);return t&&"object"==typeof t&&"sanity.io"===t.origin?o1(t)??t:void 0}catch{return}}(o)}))},a=()=>{if(i=null,!o){if(r||(r=!0,function(e){let{documentElement:t,head:n,body:r}=document;t&&xL(t,!1,e),n&&xN(n,!0,e),r&&xN(r,!1,e),function(e){let t=location.href;if(sj(t))return e("url",void 0,void 0,t);try{let n=decodeURIComponent(t);sj(n)&&e("url",void 0,void 0,n)}catch{}}(e)}(s)),n.length>0)for(let e of n.splice(0))!function(e,t){let{target:n,type:r}=e;if(!(!n.isConnected||xI(n)))if("attributes"===r){if(xT(n)&&e.attributeName){let r=n.getAttributeNS(e.attributeNamespace,e.attributeName);xO(n,e.attributeName,r,xR(n),t)}}else if("characterData"===r)xV(n,xR(n),t);else for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];!r||!r.isConnected||xI(r)||xN(r,xR(r),t)}}(e,s);t.length>0&&P(t.splice(0))}},l=()=>{i||o||(i=function(e){if("function"==typeof requestIdleCallback){let t=requestIdleCallback(e,{timeout:1e3});return()=>cancelIdleCallback(t)}let t=setTimeout(e,0);return()=>clearTimeout(t)}(a))},(u=new MutationObserver(e=>{for(let t of e)n.push(t);l()})).observe(document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}
256),l(),()=>{o=!0,u.disconnect(),i?.(),i=null}}},p[7]=P,p[8]=I,p[9]=R):R=p[9],p[10]===I?l=p[11]:(l=[I],p[10]=I,p[11]=l),(0,r_.useEffect)(R,l);let[O,L]=(0,r_.useState)(null),V,D;p[12]===_?(V=p[13],D=p[14]):(V=()=>{if(!1===_)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),(0,r_.startTransition)(()=>L(e)),()=>{(0,r_.startTransition)(()=>L(null)),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},D=[_],p[12]=_,p[13]=V,p[14]=D),(0,r_.useEffect)(V,D);let[N,z]=function(e){let t,n,r,i=(0,tt.c)(9),o=void 0===e||e,[s,a]=(0,r_.useState)(),[l,u]=(0,r_.useState)("idle"),c,d;return i[0]===o?(c=i[1],d=i[2]):(c=()=>{if(!o)return;let e=rf({name:"visual-editing",connectTo:"presentation"},rh().provide({actors:rv()})),t=e.onStatus(()=>u("connected"),"connected");(0,r_.startTransition)(()=>a(e));let n=e.start();return()=>{t(),n(),(0,r_.startTransition)(()=>a(void 0))}},d=[o],i[0]=o,i[1]=c,i[2]=d),(0,r_.useEffect)(c,d),i[3]===l?(t=i[4],n=i[5]):(t=()=>{if("connected"===l)return;let e=new AbortController;return window.addEventListener("message",w7,{signal:e.signal}),()=>{e.abort()}},n=[l],i[3]=l,i[4]=t,i[5]=n),(0,r_.useEffect)(t,n),i[6]!==s||i[7]!==l?(r=[s,l],i[6]=s,i[7]=l,i[8]=r):r=i[8],r}(!0===j||!0===M);t="connected"===z?N:void 0,(n=(0,tt.c)(3))[0]===t?(r=n[1],i=n[2]):(r=()=>{let e,n;if(!t)return;let r=(e=new ou(1),n=new i9,t.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(t=>{e.next(t.event)}).catch(()=>{}
256),t.on("presentation/snapshot-event",t=>{"reconnect"===t.event.type&&e.next(t.event),"mutation"===t.event.type&&n.next(t.event)}),oa(e,n)),i=W(oC(t),{input:{client:{withConfig:ke},sharedListener:r}});i.start();let o=new AbortController;return t.fetch("visual-editing/features",void 0,{signal:o.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&eJ(i)}).catch(w9),()=>{i.stop(),o.abort()}},i=[t],n[0]=t,n[1]=r,n[2]=i),(0,r_.useEffect)(r,i);let B=(0,r_.useDeferredValue)((0,r_.useSyncExternalStore)(xQ,x0,kr),!1),F,H;p[15]!==z||p[16]!==j||p[17]!==M?(F=()=>{if("connected"===z)xF(M?"presentation-window":"presentation-iframe");else if(j||M){let e=setTimeout(ki,1e3);return()=>{clearTimeout(e),xF(null)}}else xF("standalone");return ko},H=[z,M,j],p[15]=z,p[16]=j,p[17]=M,p[18]=F,p[19]=H):(F=p[18],H=p[19]),(0,r_.useEffect)(F,H),p[20]!==N||p[21]!==z||p[22]!==m||p[23]!==j||p[24]!==M||p[25]!==k||p[26]!==S||p[27]!==g||p[28]!==w?(u=null!==j&&null!==M&&(0,sL.jsx)(wQ,{comlink:N,comlinkStatus:z,componentResolver:m,onPerspectiveChange:k,onVariantChange:S,plugins:g,inFrame:j,inPopUp:M,zIndex:w}),p[20]=N,p[21]=z,p[22]=m,p[23]=j,p[24]=M,p[25]=k,p[26]=S,p[27]=g,p[28]=w,p[29]=u):u=p[29],p[30]!==N||p[31]!==y||p[32]!==x?(c=N&&(0,sL.jsxs)(sL.Fragment,{children:[(0,sL.jsx)(xH,{comlink:N,history:y}),(0,sL.jsx)(x1,{comlink:N}),x&&(0,sL.jsx)(w8,{comlink:N,refresh:x})]}),p[30]=N,p[31]=y,p[32]=x,p[33]=c):c=p[33],p[34]!==z||p[35]!==B?(d="connected"===z&&B&&(0,sL.jsx)(r_.Suspense,{children:(0,sL.jsx)(kt,{})}),p[34]=z,p[35]=B,p[36]=d):d=p[36],p[37]!==u||p[38]!==c||p[39]!==d?(h=(0,sL.jsxs)(sL.Fragment,{children:[u,c,d]}),p[37]=u,p[38]=c,p[39]=d,p[40]=h):h=p[40];let U=h;return!1!==_&&O?(p[41]!==U||p[42]!==O?(f=(0,cw.createPortal)(U,O),p[41]=U,p[42]=O,p[43]=f):f=p[43],f):U};function kr(){return!1}function ki(){return xF("standalone")}function ko(){return xF(null)}kn.displayName="VisualEditing",e.s(["a",()=>xY,"c",0,function(e,t){for(let n of(xq=e,xG=t,xU))n()},"d",0,function(e){for(let t of(xK=e,xU))t()},"f",0,function(e){return xU.add(e),()=>xU.delete(e)},"i",()=>xG,"l",0,function(e){for(let t of(xW=e,xU))t()},"m",0,function(e){return xz.add(e),()=>void xz.delete(e)},"n",0,function(){if(xJ++,!xX)for(let e of(xX=!0,xZ))e();return()=>{if(0==--xJ&&xX)for(let e of(xX=!1,xZ))e()}},"o",()=>xq,"p",0,function(){return xB},"r",()=>xW,"s",()=>xK,"t",0,kn,"u",0,function(e){for(let t of(xY=e,xU))t()}],872969)},100236,(e,t,n)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,n)=>{var r=e.r(100236),i="object"==typeof self&&self&&self.Object===Object&&self;t.exports=r||i||Function("return this")()},630353,(e,t,n)=>{t.exports=e.r(139088).Symbol},243436,(e,t,n)=>{var r=e.r(630353),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},223243,(e,t,n)=>{var r=Object.prototype.toString;t.exports=function(e){return r.call(e)}},377684,(e,t,n)=>{var r=e.r(630353),i=e.r(243436),o=e.r(223243),s=r?r.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},771223,(e,t,n)=>{var r=e.r(377684),i=e.r(12447);t.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},853789,(e,t,n)=>{t.exports=e.r(139088)["__core-js_shared__"]},269553,(e,t,n)=>{var r,i=e.r(853789),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(e){return!!o&&o in e}},776366,(e,t,n)=>{var r=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},54368,(e,t,n)=>{var r=e.r(771223),i=e.r(269553),o=e.r(12447),s=e.r(776366),a=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},263958,(e,t,n)=>{t.exports=function(e,t){return null==e?void 0:e[t]}},841920,(e,t,n)=>{var r=e.r(54368),i=e.r(263958);t.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},524251,(e,t,n)=>{var r=e.r(841920);t.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},674548,(e,t,n)=>{var r=e.r(524251);t.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},564254,(e,t,n)=>{t.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}},536755,(e,t,n)=>{t.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}},98728,(e,t,n)=>{t.exports=e.r(536755)()},855803,(e,t,n)=>{t.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},877289,(e,t,n)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},566645,(e,t,n)=>{var r=e.r(377684),i=e.r(877289);t.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},473250,(e,t,n)=>{var r=e.r(566645),i=e.r(877289),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;t.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},45350,(e,t,n)=>{t.exports=Array.isArray},24013,(e,t,n)=>{t.exports=function(){return!1}},356956,(e,t,n)=>{var r=e.r(139088),i=e.r(24013),o=n&&!n.nodeType&&n,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0;t.exports=(a?a.isBuffer:void 0)||i},66397,(e,t,n)=>
256{var r=/^(?:0|[1-9]\d*)$/;t.exports=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},98376,(e,t,n)=>{t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},476602,(e,t,n)=>{var r=e.r(377684),i=e.r(98376),o=e.r(877289),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},233999,(e,t,n)=>{t.exports=function(e){return function(t){return e(t)}}},180156,(e,t,n)=>{var r=e.r(100236),i=n&&!n.nodeType&&n,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process;t.exports=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}()},3023,(e,t,n)=>{var r=e.r(476602),i=e.r(233999),o=e.r(180156),s=o&&o.isTypedArray;t.exports=s?i(s):r},458877,(e,t,n)=>{var r=e.r(855803),i=e.r(473250),o=e.r(45350),s=e.r(356956),a=e.r(66397),l=e.r(3023),u=Object.prototype.hasOwnProperty;t.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&s(e),h=!n&&!c&&!d&&l(e),f=n||c||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)(t||u.call(e,g))&&!(f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&p.push(g);return p}},763996,(e,t,n)=>{var r=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},825717,(e,t,n)=>{t.exports=function(e,t){return function(n){return e(t(n))}}},942369,(e,t,n)=>{t.exports=e.r(825717)(Object.keys,Object)},848477,(e,t,n)=>{var r=e.r(763996),i=e.r(942369),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},351095,(e,t,n)=>{var r=e.r(771223),i=e.r(98376);t.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},33679,(e,t,n)=>{var r=e.r(458877),i=e.r(848477),o=e.r(351095);t.exports=function(e){return o(e)?r(e):i(e)}},163799,(e,t,n)=>{var r=e.r(98728),i=e.r(33679);t.exports=function(e,t){return e&&r(e,t,i)}},873554,(e,t,n)=>{var r=e.r(351095);t.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},453587,(e,t,n)=>{var r=e.r(163799);t.exports=e.r(873554)(r)},105143,(e,t,n)=>{var r=e.r(453587);t.exports=function(e,t,n,i){return r(e,function(e,r,o){t(i,e,n(e),o)}),i}},665742,(e,t,n)=>{t.exports=function(){this.__data__=[],this.size=0}},25172,(e,t,n)=>{t.exports=function(e,t){return e===t||e!=e&&t!=t}},134314,(e,t,n)=>{var r=e.r(25172);t.exports=function(e,t){for(var n=e.length;n--;
256)if(r(e[n][0],t))return n;return -1}},419206,(e,t,n)=>{var r=e.r(134314),i=Array.prototype.splice;t.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},467763,(e,t,n)=>{var r=e.r(134314);t.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},523407,(e,t,n)=>{var r=e.r(134314);t.exports=function(e){return r(this.__data__,e)>-1}},553833,(e,t,n)=>{var r=e.r(134314);t.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},729039,(e,t,n)=>{var r=e.r(665742),i=e.r(419206),o=e.r(467763),s=e.r(523407),a=e.r(553833);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},405400,(e,t,n)=>{var r=e.r(729039);t.exports=function(){this.__data__=new r,this.size=0}},986238,(e,t,n)=>{t.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},957831,(e,t,n)=>{t.exports=function(e){return this.__data__.get(e)}},977802,(e,t,n)=>{t.exports=function(e){return this.__data__.has(e)}},687362,(e,t,n)=>{t.exports=e.r(841920)(e.r(139088),"Map")},932760,(e,t,n)=>{t.exports=e.r(841920)(Object,"create")},150514,(e,t,n)=>{var r=e.r(932760);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},197617,(e,t,n)=>{t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},757412,(e,t,n)=>{var r=e.r(932760),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},623592,(e,t,n)=>{var r=e.r(932760),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},239004,(e,t,n)=>{var r=e.r(932760);t.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},734421,(e,t,n)=>{var r=e.r(150514),i=e.r(197617),o=e.r(757412),s=e.r(623592),a=e.r(239004);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},848994,(e,t,n)=>{var r=e.r(734421),i=e.r(729039),o=e.r(687362);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},224053,(e,t,n)=>{t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},487994,(e,t,n)=>{var r=e.r(224053);t.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},996768,(e,t,n)=>{var r=e.r(487994);t.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},929932,(e,t,n)=>{var r=e.r(487994);t.exports=function(e){return r(this,e).get(e)}},892647,(e,t,n)=>{var r=e.r(487994);t.exports=function(e){return r(this,e).has(e)}},446644,(e,t,n)=>{var r=e.r(487994);t.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},587547,(e,t,n)=>{var r=e.r(848994),i=e.r(996768),o=e.r(929932),s=e.r(892647),a=e.r(446644);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,t.exports=l},320517,(e,t,n)=>{var r=e.r(729039),i=e.r(687362),o=e.r(587547);t.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},901551,(e,t,n)=>{var r=e.r(729039),i=e.r(405400),o=e.r(986238),s=e.r(957831),a=e.r(977802),l=e.r(320517);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=l,t.exports=u},221274,(e,t,n)=>{t.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},439805,(e,t,n)=>{t.exports=function(e){return this.__data__.has(e)}},27493,(e,t,n)=>{var r=e.r(587547),i=e.r(221274),o=e.r(439805);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,t.exports=s},851477,(e,t,n)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},315262,(e,t,n)=>{t.exports=function(e,t){return e.has(t)}},206856,(e,t,n)=>{var r=e.r(27493),i=e.r(851477),o=e.r(315262);t.exports=function(e,t,n,s,a,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var y=e[p],v=t[p];if(s)var b=u?s(v,y,p,t,e,l):s(y,v,p,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(y===e||a(y,e,n,s,l)))return g.push(t)})){m=!1;break}}else if(!(y===v||a(y,v,n,s,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},263750,(e,t,n)=>{t.exports=e.r(139088).Uint8Array},75331,(e,t,n)=>{t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},899850,(e,t,n)=>{t.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},678012,(e,t,n)=>{var r=e.r(630353),i=e.r(263750),o=e.r(25172),s=e.r(206856),a=e.r(75331),l=e.r(899850),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;t.exports=function(e,t,n,r,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)break;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=s(f(e),f(t),r,u,d,h);return h.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},169102,(e,t,n)=>{t.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},823403,(e,t,n)=>{var r=e.r(169102),i=e.r(45350);t.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},536100,(e,t,n)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},45159,(e,t,n)=>{t.exports=function(){return[]}},717332,(e,t,n)=>{var r=e.r(536100),i=e.r(45159),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;t.exports=s?function(e){return null==e?[]:r(s(e=Object(e)),function(t){return o.call(e,t)})}:i},413370,(e,t,n)=>{var r=e.r(823403),i=e.r(717332),o=e.r(33679);t.exports=function(e){return r(e,o,i)}},330698,(e,t,n)=>{var r=e.r(413370),i=Object.prototype.hasOwnProperty;t.exports=function(e,t,n,o,s,a){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d<c;){var y=e[h=u[d]],v=t[h];if(o)var b=l?o(v,y,h,t,e,a):o(y,v,h,e,t,a);if(!(void 0===b?y===v||s(y,v,n,o,a):b)){m=!1;break}
256g||(g="constructor"==h)}if(m&&!g){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a.delete(e),a.delete(t),m}},801419,(e,t,n)=>{t.exports=e.r(841920)(e.r(139088),"DataView")},717074,(e,t,n)=>{t.exports=e.r(841920)(e.r(139088),"Promise")},106966,(e,t,n)=>{t.exports=e.r(841920)(e.r(139088),"Set")},573895,(e,t,n)=>{t.exports=e.r(841920)(e.r(139088),"WeakMap")},367426,(e,t,n)=>{var r=e.r(801419),i=e.r(687362),o=e.r(717074),s=e.r(106966),a=e.r(573895),l=e.r(377684),u=e.r(776366),c="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",m=u(r),g=u(i),y=u(o),v=u(s),b=u(a),x=l;(r&&x(new r(new ArrayBuffer(1)))!=p||i&&x(new i)!=c||o&&x(o.resolve())!=d||s&&x(new s)!=h||a&&x(new a)!=f)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case m:return p;case g:return c;case y:return d;case v:return h;case b:return f}return t}),t.exports=x},178353,(e,t,n)=>{var r=e.r(901551),i=e.r(206856),o=e.r(678012),s=e.r(330698),a=e.r(367426),l=e.r(45350),u=e.r(356956),c=e.r(3023),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(e,t,n,m,g,y){var v=l(e),b=l(t),x=v?h:a(e),w=b?h:a(t);x=x==d?f:x,w=w==d?f:w;var k=x==f,S=w==f,E=x==w;if(E&&u(e)){if(!u(t))return!1;v=!0,k=!1}if(E&&!k)return y||(y=new r),v||c(e)?i(e,t,n,m,g,y):o(e,t,x,n,m,g,y);if(!(1&n)){var _=k&&p.call(e,"__wrapped__"),j=S&&p.call(t,"__wrapped__");
256if(_||j){var C=_?e.value():e,M=j?t.value():t;return y||(y=new r),g(C,M,n,m,y)}}return!!E&&(y||(y=new r),s(e,t,n,m,g,y))}},421885,(e,t,n)=>{var r=e.r(178353),i=e.r(877289);t.exports=function e(t,n,o,s,a){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,s,e,a):t!=t&&n!=n)}},748299,(e,t,n)=>{var r=e.r(901551),i=e.r(421885);t.exports=function(e,t,n,o){var s=n.length,a=s,l=!o;if(null==e)return!a;for(e=Object(e);s--;){var u=n[s];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<a;){var c=(u=n[s])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var f=new r;if(o)var p=o(d,h,c,e,t,f);if(!(void 0===p?i(h,d,3,o,f):p))return!1}}return!0}},715782,(e,t,n)=>{var r=e.r(12447);t.exports=function(e){return e==e&&!r(e)}},741903,(e,t,n)=>{var r=e.r(715782),i=e.r(33679);t.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},165570,(e,t,n)=>{t.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},623426,(e,t,n)=>{var r=e.r(748299),i=e.r(741903),o=e.r(165570);t.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},361884,(e,t,n)=>{var r=e.r(377684),i=e.r(877289);t.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},9903,(e,t,n)=>{var r=e.r(45350),i=e.r(361884),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},657588,(e,t,n)=>{var r=e.r(587547);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},688832,(e,t,n)=>{var r=e.r(657588);t.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},902677,(e,t,n)=>{var r=e.r(688832),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;t.exports=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t})},892708,(e,t,n)=>{t.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},372537,(e,t,n)=>{var r=e.r(630353),i=e.r(892708),o=e.r(45350),s=e.r(361884),a=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;t.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}},702922,(e,t,n)=>{var r=e.r(372537);t.exports=function(e){return null==e?"":r(e)}},186287,(e,t,n)=>{var r=e.r(45350),i=e.r(9903),o=e.r(902677),s=e.r(702922);t.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},2054,(e,t,n)=>{var r=e.r(361884),i=1/0;t.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},333141,(e,t,n)=>{var r=e.r(186287),i=e.r(2054);t.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},482820,(e,t,n)=>{var r=e.r(333141);t.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},240688,(e,t,n)=>{t.exports=function(e,t){return null!=e&&t in Object(e)}},215359,(e,t,n)=>{var r=e.r(186287),i=e.r(473250),o=e.r(45350),s=e.r(66397),a=e.r(98376),l=e.r(2054);t.exports=function(e,t,n){t=r(t,e);for(var u=-1,c=t.length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(h,c)&&(o(e)||i(e))}},76590,(e,t,n)=>{var r=e.r(240688),i=e.r(215359);t.exports=function(e,t){return null!=e&&i(e,t,r)}},772298,(e,t,n)=>{var r=e.r(421885),i=e.r(482820),o=e.r(76590),s=e.r(9903),a=e.r(715782),l=e.r(165570),u=e.r(2054);t.exports=function(e,t){return s(e)&&a(t)?l(u(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,3)}}},653336,(e,t,n)=>{t.exports=function(e){return e}},601079,(e,t,n)=>{t.exports=function(e){return function(t){return null==t?void 0:t[e]}}},430970,(e,t,n)=>{var r=e.r(333141);t.exports=function(e){return function(t){return r(t,e)}}},433906,(e,t,n)=>{var r=e.r(601079),i=e.r(430970),o=e.r(9903),s=e.r(2054);t.exports=function(e){return o(e)?r(s(e)):i(e)}},666305,(e,t,n)=>{var r=e.r(623426),i=e.r(772298),o=e.r(653336),s=e.r(45350),a=e.r(433906);t.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},895261,(e,t,n)=>{var r=e.r(564254),i=e.r(105143),o=e.r(666305),s=e.r(45350);t.exports=function(e,t){return function(n,a){var l=s(n)?r:i,u=t?t():{};return l(n,e,o(a,2),u)}}},576955,(e,t,n)=>{var r=e.r(674548),i=e.r(895261),o=Object.prototype.hasOwnProperty;t.exports=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])})},12447,(e,t,n)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},778804,(e,t,n)=>{"use strict";var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case s:case d:case h:case m:return e;default:switch(e=e&&e.$$typeof){case u:case c:case p:case f:case l:return e;default:return t}}case i:return t}}}n.ContextConsumer=l,n.ContextProvider=u,n.Element=r,n.ForwardRef=c,n.Fragment=o,n.Lazy=p,n.Memo=f,n.Portal=i,n.Profiler=a,n.StrictMode=s,n.Suspense=
256d,n.SuspenseList=h,n.isContextConsumer=function(e){return y(e)===l},n.isContextProvider=function(e){return y(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return y(e)===c},n.isFragment=function(e){return y(e)===o},n.isLazy=function(e){return y(e)===p},n.isMemo=function(e){return y(e)===f},n.isPortal=function(e){return y(e)===i},n.isProfiler=function(e){return y(e)===a},n.isStrictMode=function(e){return y(e)===s},n.isSuspense=function(e){return y(e)===d},n.isSuspenseList=function(e){return y(e)===h},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===s||e===d||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===u||e.$$typeof===l||e.$$typeof===c||e.$$typeof===g||void 0!==e.getModuleId)||!1},n.typeOf=y},179684,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(778804)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.