@homepages/concrete 11.0.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/codemods/manifest.json +6 -0
- package/dist/artifact/playground/client/assets/index-BcLGpWLR.js +1266 -0
- package/dist/artifact/playground/client/index.html +1 -1
- package/dist/artifact/playground/host.mjs +39 -40
- package/dist/base.css +17 -57
- package/dist/cli/capture/capture.js +8 -6
- package/dist/cli/dev/workspace-reader.js +1 -0
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +1 -1
- package/dist/packages/internal/fill-bake/dist/held-rows.js +2 -0
- package/dist/packages/internal/fill-bake/dist/index.js +1 -0
- package/dist/packages/internal/format-geometry/dist/capture.js +3 -11
- package/dist/packages/internal/format-geometry/dist/format.d.ts +2 -8
- package/dist/packages/internal/format-geometry/dist/geometry.js +2 -13
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +1 -1
- package/dist/primitives/FrameShell.d.ts +5 -2
- package/dist/primitives/FrameShell.js +2 -1
- package/dist/rules/registry.js +1 -1
- package/dist/schema/format.d.ts +0 -1
- package/dist/schema/format.js +1 -2
- package/dist/schema/manifest.js +18 -24
- package/dist/site-analytics.js +6 -1
- package/dist/site-runtime/window-height.js +19 -0
- package/dist/template/define-template.d.ts +11 -0
- package/dist/template/define-template.js +1 -0
- package/dist/template/materialize.js +2 -0
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +2 -2
- package/package.json +1 -1
- package/dist/artifact/playground/client/assets/index-ByeGGedv.js +0 -1259
|
@@ -0,0 +1,1266 @@
|
|
|
1
|
+
var gx=e=>{throw TypeError(e)};var _m=(e,t,r)=>t.has(e)||gx("Cannot "+r);var z=(e,t,r)=>(_m(e,t,"read from private field"),r?r.call(e):t.get(e)),Me=(e,t,r)=>t.has(e)?gx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ve=(e,t,r,a)=>(_m(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),He=(e,t,r)=>(_m(e,t,"access private method"),r);var Lu=(e,t,r,a)=>({set _(l){ve(e,t,l,r)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(l){if(l.ep)return;l.ep=!0;const c=r(l);fetch(l.href,c)}})();function sM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jm={exports:{}},ys={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var yx;function cM(){if(yx)return ys;yx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var m in l)m!=="key"&&(c[m]=l[m])}else c=l;return l=c.ref,{$$typeof:e,type:a,key:u,ref:l!==void 0?l:null,props:c}}return ys.Fragment=t,ys.jsx=r,ys.jsxs=r,ys}var bx;function uM(){return bx||(bx=1,jm.exports=cM()),jm.exports}var d=uM(),Om={exports:{}},Be={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var vx;function dM(){if(vx)return Be;vx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),k=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=k&&N[k]||N["@@iterator"],typeof N=="function"?N:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function C(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}C.prototype.isReactComponent={},C.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=C.prototype;function A(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}var D=A.prototype=new O;D.constructor=A,E(D,C.prototype),D.isPureReactComponent=!0;var R=Array.isArray;function P(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function H(N,q,I){var F=I.ref;return{$$typeof:e,type:N,key:q,ref:F!==void 0?F:null,props:I}}function ne(N,q){return H(N.type,q,N.props)}function Y(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function oe(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return q[I]})}var K=/\/+/g;function X(N,q){return typeof N=="object"&&N!==null&&N.key!=null?oe(""+N.key):q.toString(36)}function le(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(P,P):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function M(N,q,I,F,ae){var ce=typeof N;(ce==="undefined"||ce==="boolean")&&(N=null);var he=!1;if(N===null)he=!0;else switch(ce){case"bigint":case"string":case"number":he=!0;break;case"object":switch(N.$$typeof){case e:case t:he=!0;break;case b:return he=N._init,M(he(N._payload),q,I,F,ae)}}if(he)return ae=ae(N),he=F===""?"."+X(N,0):F,R(ae)?(I="",he!=null&&(I=he.replace(K,"$&/")+"/"),M(ae,q,I,"",function(de){return de})):ae!=null&&(Y(ae)&&(ae=ne(ae,I+(ae.key==null||N&&N.key===ae.key?"":(""+ae.key).replace(K,"$&/")+"/")+he)),q.push(ae)),1;he=0;var be=F===""?".":F+":";if(R(N))for(var $=0;$<N.length;$++)F=N[$],ce=be+X(F,$),he+=M(F,q,I,ce,ae);else if($=w(N),typeof $=="function")for(N=$.call(N),$=0;!(F=N.next()).done;)F=F.value,ce=be+X(F,$++),he+=M(F,q,I,ce,ae);else if(ce==="object"){if(typeof N.then=="function")return M(le(N),q,I,F,ae);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return he}function V(N,q,I){if(N==null)return N;var F=[],ae=0;return M(N,F,"","",function(ce){return q.call(I,ce,ae++)}),F}function te(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var pe=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Q={map:V,forEach:function(N,q,I){V(N,function(){q.apply(this,arguments)},I)},count:function(N){var q=0;return V(N,function(){q++}),q},toArray:function(N){return V(N,function(q){return q})||[]},only:function(N){if(!Y(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Be.Activity=v,Be.Children=Q,Be.Component=C,Be.Fragment=r,Be.Profiler=l,Be.PureComponent=A,Be.StrictMode=a,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Be.__COMPILER_RUNTIME={__proto__:null,c:function(N){return L.H.useMemoCache(N)}},Be.cache=function(N){return function(){return N.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(N,q,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var F=E({},N.props),ae=N.key;if(q!=null)for(ce in q.key!==void 0&&(ae=""+q.key),q)!T.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(F[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)F.children=I;else if(1<ce){for(var he=Array(ce),be=0;be<ce;be++)he[be]=arguments[be+2];F.children=he}return H(N.type,ae,F)},Be.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:c,_context:N},N},Be.createElement=function(N,q,I){var F,ae={},ce=null;if(q!=null)for(F in q.key!==void 0&&(ce=""+q.key),q)T.call(q,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ae[F]=q[F]);var he=arguments.length-2;if(he===1)ae.children=I;else if(1<he){for(var be=Array(he),$=0;$<he;$++)be[$]=arguments[$+2];ae.children=be}if(N&&N.defaultProps)for(F in he=N.defaultProps,he)ae[F]===void 0&&(ae[F]=he[F]);return H(N,ce,ae)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(N){return{$$typeof:m,render:N}},Be.isValidElement=Y,Be.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:te}},Be.memo=function(N,q){return{$$typeof:g,type:N,compare:q===void 0?null:q}},Be.startTransition=function(N){var q=L.T,I={};L.T=I;try{var F=N(),ae=L.S;ae!==null&&ae(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(P,pe)}catch(ce){pe(ce)}finally{q!==null&&I.types!==null&&(q.types=I.types),L.T=q}},Be.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Be.use=function(N){return L.H.use(N)},Be.useActionState=function(N,q,I){return L.H.useActionState(N,q,I)},Be.useCallback=function(N,q){return L.H.useCallback(N,q)},Be.useContext=function(N){return L.H.useContext(N)},Be.useDebugValue=function(){},Be.useDeferredValue=function(N,q){return L.H.useDeferredValue(N,q)},Be.useEffect=function(N,q){return L.H.useEffect(N,q)},Be.useEffectEvent=function(N){return L.H.useEffectEvent(N)},Be.useId=function(){return L.H.useId()},Be.useImperativeHandle=function(N,q,I){return L.H.useImperativeHandle(N,q,I)},Be.useInsertionEffect=function(N,q){return L.H.useInsertionEffect(N,q)},Be.useLayoutEffect=function(N,q){return L.H.useLayoutEffect(N,q)},Be.useMemo=function(N,q){return L.H.useMemo(N,q)},Be.useOptimistic=function(N,q){return L.H.useOptimistic(N,q)},Be.useReducer=function(N,q,I){return L.H.useReducer(N,q,I)},Be.useRef=function(N){return L.H.useRef(N)},Be.useState=function(N){return L.H.useState(N)},Be.useSyncExternalStore=function(N,q,I){return L.H.useSyncExternalStore(N,q,I)},Be.useTransition=function(){return L.H.useTransition()},Be.version="19.2.6",Be}var xx;function ug(){return xx||(xx=1,Om.exports=dM()),Om.exports}var x=ug();const Dr=sM(x);var Am={exports:{}},bs={},Nm={exports:{}},Mm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var wx;function fM(){return wx||(wx=1,(function(e){function t(M,V){var te=M.length;M.push(V);e:for(;0<te;){var pe=te-1>>>1,Q=M[pe];if(0<l(Q,V))M[pe]=V,M[te]=Q,te=pe;else break e}}function r(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var V=M[0],te=M.pop();if(te!==V){M[0]=te;e:for(var pe=0,Q=M.length,N=Q>>>1;pe<N;){var q=2*(pe+1)-1,I=M[q],F=q+1,ae=M[F];if(0>l(I,te))F<Q&&0>l(ae,I)?(M[pe]=ae,M[F]=te,pe=F):(M[pe]=I,M[q]=te,pe=q);else if(F<Q&&0>l(ae,te))M[pe]=ae,M[F]=te,pe=F;else break e}}return V}function l(M,V){var te=M.sortIndex-V.sortIndex;return te!==0?te:M.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,m=u.now();e.unstable_now=function(){return u.now()-m}}var p=[],g=[],b=1,v=null,k=3,w=!1,j=!1,E=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(M){for(var V=r(g);V!==null;){if(V.callback===null)a(g);else if(V.startTime<=M)a(g),V.sortIndex=V.expirationTime,t(p,V);else break;V=r(g)}}function R(M){if(E=!1,D(M),!j)if(r(p)!==null)j=!0,P||(P=!0,oe());else{var V=r(g);V!==null&&le(R,V.startTime-M)}}var P=!1,L=-1,T=5,H=-1;function ne(){return _?!0:!(e.unstable_now()-H<T)}function Y(){if(_=!1,P){var M=e.unstable_now();H=M;var V=!0;try{e:{j=!1,E&&(E=!1,O(L),L=-1),w=!0;var te=k;try{t:{for(D(M),v=r(p);v!==null&&!(v.expirationTime>M&&ne());){var pe=v.callback;if(typeof pe=="function"){v.callback=null,k=v.priorityLevel;var Q=pe(v.expirationTime<=M);if(M=e.unstable_now(),typeof Q=="function"){v.callback=Q,D(M),V=!0;break t}v===r(p)&&a(p),D(M)}else a(p);v=r(p)}if(v!==null)V=!0;else{var N=r(g);N!==null&&le(R,N.startTime-M),V=!1}}break e}finally{v=null,k=te,w=!1}V=void 0}}finally{V?oe():P=!1}}}var oe;if(typeof A=="function")oe=function(){A(Y)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,X=K.port2;K.port1.onmessage=Y,oe=function(){X.postMessage(null)}}else oe=function(){C(Y,0)};function le(M,V){L=C(function(){M(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(M){switch(k){case 1:case 2:case 3:var V=3;break;default:V=k}var te=k;k=V;try{return M()}finally{k=te}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(M,V){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=k;k=M;try{return V()}finally{k=te}},e.unstable_scheduleCallback=function(M,V,te){var pe=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?pe+te:pe):te=pe,M){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,M={id:b++,callback:V,priorityLevel:M,startTime:te,expirationTime:Q,sortIndex:-1},te>pe?(M.sortIndex=te,t(g,M),r(p)===null&&M===r(g)&&(E?(O(L),L=-1):E=!0,le(R,te-pe))):(M.sortIndex=Q,t(p,M),j||w||(j=!0,P||(P=!0,oe()))),M},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(M){var V=k;return function(){var te=k;k=V;try{return M.apply(this,arguments)}finally{k=te}}}})(Mm)),Mm}var kx;function hM(){return kx||(kx=1,Nm.exports=fM()),Nm.exports}var Cm={exports:{}},dn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Sx;function mM(){if(Sx)return dn;Sx=1;var e=ug();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(p,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:p,containerInfo:g,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return dn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,dn.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return c(p,g,null,b)},dn.flushSync=function(p){var g=u.T,b=a.p;try{if(u.T=null,a.p=2,p)return p()}finally{u.T=g,a.p=b,a.d.f()}},dn.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(p,g))},dn.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},dn.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin),k=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?a.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:k,fetchPriority:w}):b==="script"&&a.d.X(p,{crossOrigin:v,integrity:k,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},dn.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);a.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(p)},dn.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin);a.d.L(p,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},dn.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=m(g.as,g.crossOrigin);a.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(p)},dn.requestFormReset=function(p){a.d.r(p)},dn.unstable_batchedUpdates=function(p,g){return p(g)},dn.useFormState=function(p,g,b){return u.H.useFormState(p,g,b)},dn.useFormStatus=function(){return u.H.useHostTransitionStatus()},dn.version="19.2.6",dn}var Ex;function S2(){if(Ex)return Cm.exports;Ex=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cm.exports=mM(),Cm.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var _x;function pM(){if(_x)return bs;_x=1;var e=hM(),t=ug(),r=S2();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function m(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(a(188))}function g(n){var i=n.alternate;if(!i){if(i=c(n),i===null)throw Error(a(188));return i!==n?null:n}for(var o=n,s=i;;){var f=o.return;if(f===null)break;var h=f.alternate;if(h===null){if(s=f.return,s!==null){o=s;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===o)return p(f),n;if(h===s)return p(f),i;h=h.sibling}throw Error(a(188))}if(o.return!==s.return)o=f,s=h;else{for(var y=!1,S=f.child;S;){if(S===o){y=!0,o=f,s=h;break}if(S===s){y=!0,s=f,o=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===o){y=!0,o=h,s=f;break}if(S===s){y=!0,s=h,o=f;break}S=S.sibling}if(!y)throw Error(a(189))}}if(o.alternate!==s)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?n:i}function b(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=b(n),i!==null)return i;n=n.sibling}return null}var v=Object.assign,k=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function oe(n){return n===null||typeof n!="object"?null:(n=Y&&n[Y]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function X(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===K?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case P:return"SuspenseList";case H:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case j:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case L:return i=n.displayName||null,i!==null?i:X(n.type)||"Memo";case T:i=n._payload,n=n._init;try{return X(n(i))}catch{}}return null}var le=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},pe=[],Q=-1;function N(n){return{current:n}}function q(n){0>Q||(n.current=pe[Q],pe[Q]=null,Q--)}function I(n,i){Q++,pe[Q]=n.current,n.current=i}var F=N(null),ae=N(null),ce=N(null),he=N(null);function be(n,i){switch(I(ce,i),I(ae,n),I(F,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?I1(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=I1(i),n=H1(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(F),I(F,n)}function $(){q(F),q(ae),q(ce)}function de(n){n.memoizedState!==null&&I(he,n);var i=F.current,o=H1(i,n.type);i!==o&&(I(ae,n),I(F,o))}function ge(n){ae.current===n&&(q(F),q(ae)),he.current===n&&(q(he),hs._currentValue=te)}var _e,Re;function De(n){if(_e===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);_e=i&&i[1]||"",Re=-1<o.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+_e+n+Re}var xe=!1;function $e(n,i){if(!n||xe)return"";xe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(i){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(re){var J=re}Reflect.construct(n,[],me)}else{try{me.call()}catch(re){J=re}n.call(me.prototype)}}else{try{throw Error()}catch(re){J=re}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var U=y.split(`
|
|
44
|
+
`),W=S.split(`
|
|
45
|
+
`);for(f=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;f<W.length&&!W[f].includes("DetermineComponentFrameRoot");)f++;if(s===U.length||f===W.length)for(s=U.length-1,f=W.length-1;1<=s&&0<=f&&U[s]!==W[f];)f--;for(;1<=s&&0<=f;s--,f--)if(U[s]!==W[f]){if(s!==1||f!==1)do if(s--,f--,0>f||U[s]!==W[f]){var se=`
|
|
46
|
+
`+U[s].replace(" at new "," at ");return n.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",n.displayName)),se}while(1<=s&&0<=f);break}}}finally{xe=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?De(o):""}function yt(n,i){switch(n.tag){case 26:case 27:case 5:return De(n.type);case 16:return De("Lazy");case 13:return n.child!==i&&i!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return $e(n.type,!1);case 11:return $e(n.type.render,!1);case 1:return $e(n.type,!0);case 31:return De("Activity");default:return""}}function Ee(n){try{var i="",o=null;do i+=yt(n,o),o=n,n=n.return;while(n);return i}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Mt=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,ni=e.unstable_cancelCallback,ui=e.unstable_shouldYield,Si=e.unstable_requestPaint,Ut=e.unstable_now,ii=e.unstable_getCurrentPriorityLevel,sn=e.unstable_ImmediatePriority,Jt=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,rt=e.log,tt=e.unstable_setDisableYieldValue,Xe=null,ot=null;function Ot(n){if(typeof rt=="function"&&tt(n),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(Xe,n)}catch{}}var kt=Math.clz32?Math.clz32:ke,Ei=Math.log,ue=Math.LN2;function ke(n){return n>>>=0,n===0?32:31-(Ei(n)/ue|0)|0}var je=256,Te=262144,qe=4194304;function Ie(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function St(n,i,o){var s=n.pendingLanes;if(s===0)return 0;var f=0,h=n.suspendedLanes,y=n.pingedLanes;n=n.warmLanes;var S=s&134217727;return S!==0?(s=S&~h,s!==0?f=Ie(s):(y&=S,y!==0?f=Ie(y):o||(o=S&~n,o!==0&&(f=Ie(o))))):(S=s&~h,S!==0?f=Ie(S):y!==0?f=Ie(y):o||(o=s&~n,o!==0&&(f=Ie(o)))),f===0?0:i!==0&&i!==f&&(i&h)===0&&(h=f&-f,o=i&-i,h>=o||h===32&&(o&4194048)!==0)?i:f}function Et(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Kt(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cn(){var n=qe;return qe<<=1,(qe&62914560)===0&&(qe=4194304),n}function un(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function At(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function qn(n,i,o,s,f,h){var y=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var S=n.entanglements,U=n.expirationTimes,W=n.hiddenUpdates;for(o=y&~o;0<o;){var se=31-kt(o),me=1<<se;S[se]=0,U[se]=-1;var J=W[se];if(J!==null)for(W[se]=null,se=0;se<J.length;se++){var re=J[se];re!==null&&(re.lane&=-536870913)}o&=~me}s!==0&&Wi(n,s,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(y&~i))}function Wi(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var s=31-kt(i);n.entangledLanes|=i,n.entanglements[s]=n.entanglements[s]|1073741824|o&261930}function na(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var s=31-kt(o),f=1<<s;f&i|n[s]&i&&(n[s]|=i),o&=~f}}function ee(n,i){var o=i&-i;return o=(o&42)!==0?1:Se(o),(o&(n.suspendedLanes|i))!==0?0:o}function Se(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Pe(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Ct(){var n=V.p;return n!==0?n:(n=window.event,n===void 0?32:cx(n.type))}function nt(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var Fn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Fn,vn="__reactProps$"+Fn,Xa="__reactContainer$"+Fn,gf="__reactEvents$"+Fn,ZO="__reactListeners$"+Fn,WO="__reactHandles$"+Fn,jb="__reactResources$"+Fn,Al="__reactMarker$"+Fn;function yf(n){delete n[Nt],delete n[vn],delete n[gf],delete n[ZO],delete n[WO]}function Za(n){var i=n[Nt];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Xa]||o[Nt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=K1(n);n!==null;){if(o=n[Nt])return o;n=K1(n)}return i}n=o,o=n.parentNode}return null}function Wa(n){if(n=n[Nt]||n[Xa]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Nl(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function Ja(n){var i=n[jb];return i||(i=n[jb]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Yt(n){n[Al]=!0}var Ob=new Set,Ab={};function ia(n,i){eo(n,i),eo(n+"Capture",i)}function eo(n,i){for(Ab[n]=i,n=0;n<i.length;n++)Ob.add(i[n])}var JO=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Nb={},Mb={};function eA(n){return Mt.call(Mb,n)?!0:Mt.call(Nb,n)?!1:JO.test(n)?Mb[n]=!0:(Nb[n]=!0,!1)}function Sc(n,i,o){if(eA(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var s=i.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Ec(n,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+o)}}function _i(n,i,o,s){if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+s)}}function Pn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cb(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function tA(n,i,o){var s=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,h=s.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){o=""+y,h.call(this,y)}}),Object.defineProperty(n,i,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function bf(n){if(!n._valueTracker){var i=Cb(n)?"checked":"value";n._valueTracker=tA(n,i,""+n[i])}}function Rb(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),s="";return n&&(s=Cb(n)?n.checked?"true":"false":n.value),n=s,n!==o?(i.setValue(n),!0):!1}function _c(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var nA=/[\n"\\]/g;function Vn(n){return n.replace(nA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function vf(n,i,o,s,f,h,y,S){n.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?n.type=y:n.removeAttribute("type"),i!=null?y==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Pn(i)):n.value!==""+Pn(i)&&(n.value=""+Pn(i)):y!=="submit"&&y!=="reset"||n.removeAttribute("value"),i!=null?xf(n,y,Pn(i)):o!=null?xf(n,y,Pn(o)):s!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Pn(S):n.removeAttribute("name")}function Tb(n,i,o,s,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),i!=null||o!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){bf(n);return}o=o!=null?""+Pn(o):"",i=i!=null?""+Pn(i):o,S||i===n.value||(n.value=i),n.defaultValue=i}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,n.checked=S?n.checked:!!s,n.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.name=y),bf(n)}function xf(n,i,o){i==="number"&&_c(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function to(n,i,o,s){if(n=n.options,i){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=!0;for(o=0;o<n.length;o++)f=i.hasOwnProperty("$"+n[o].value),n[o].selected!==f&&(n[o].selected=f),f&&s&&(n[o].defaultSelected=!0)}else{for(o=""+Pn(o),i=null,f=0;f<n.length;f++){if(n[f].value===o){n[f].selected=!0,s&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Db(n,i,o){if(i!=null&&(i=""+Pn(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Pn(o):""}function Lb(n,i,o,s){if(i==null){if(s!=null){if(o!=null)throw Error(a(92));if(le(s)){if(1<s.length)throw Error(a(93));s=s[0]}o=s}o==null&&(o=""),i=o}o=Pn(i),n.defaultValue=o,s=n.textContent,s===o&&s!==""&&s!==null&&(n.value=s),bf(n)}function no(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var iA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zb(n,i,o){var s=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?s?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":s?n.setProperty(i,o):typeof o!="number"||o===0||iA.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}function $b(n,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,o!=null){for(var s in o)!o.hasOwnProperty(s)||i!=null&&i.hasOwnProperty(s)||(s.indexOf("--")===0?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="");for(var f in i)s=i[f],i.hasOwnProperty(f)&&o[f]!==s&&zb(n,f,s)}else for(var h in i)i.hasOwnProperty(h)&&zb(n,h,i[h])}function wf(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),aA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function jc(n){return aA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ji(){}var kf=null;function Sf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var io=null,ro=null;function Ub(n){var i=Wa(n);if(i&&(n=i.stateNode)){var o=n[vn]||null;e:switch(n=i.stateNode,i.type){case"input":if(vf(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Vn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var s=o[i];if(s!==n&&s.form===n.form){var f=s[vn]||null;if(!f)throw Error(a(90));vf(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)s=o[i],s.form===n.form&&Rb(s)}break e;case"textarea":Db(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&to(n,!!o.multiple,i,!1)}}}var Ef=!1;function Ib(n,i,o){if(Ef)return n(i,o);Ef=!0;try{var s=n(i);return s}finally{if(Ef=!1,(io!==null||ro!==null)&&(hu(),io&&(i=io,n=ro,ro=io=null,Ub(i),n)))for(i=0;i<n.length;i++)Ub(n[i])}}function Ml(n,i){var o=n.stateNode;if(o===null)return null;var s=o[vn]||null;if(s===null)return null;o=s[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(n=n.type,s=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!s;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var Oi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_f=!1;if(Oi)try{var Cl={};Object.defineProperty(Cl,"passive",{get:function(){_f=!0}}),window.addEventListener("test",Cl,Cl),window.removeEventListener("test",Cl,Cl)}catch{_f=!1}var Ji=null,jf=null,Oc=null;function Hb(){if(Oc)return Oc;var n,i=jf,o=i.length,s,f="value"in Ji?Ji.value:Ji.textContent,h=f.length;for(n=0;n<o&&i[n]===f[n];n++);var y=o-n;for(s=1;s<=y&&i[o-s]===f[h-s];s++);return Oc=f.slice(n,1<s?1-s:void 0)}function Ac(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Nc(){return!0}function Bb(){return!1}function xn(n){function i(o,s,f,h,y){this._reactName=o,this._targetInst=f,this.type=s,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(o=n[S],this[S]=o?o(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Nc:Bb,this.isPropagationStopped=Bb,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),i}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mc=xn(ra),Rl=v({},ra,{view:0,detail:0}),oA=xn(Rl),Of,Af,Tl,Cc=v({},Rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Tl&&(Tl&&n.type==="mousemove"?(Of=n.screenX-Tl.screenX,Af=n.screenY-Tl.screenY):Af=Of=0,Tl=n),Of)},movementY:function(n){return"movementY"in n?n.movementY:Af}}),qb=xn(Cc),lA=v({},Cc,{dataTransfer:0}),sA=xn(lA),cA=v({},Rl,{relatedTarget:0}),Nf=xn(cA),uA=v({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),dA=xn(uA),fA=v({},ra,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),hA=xn(fA),mA=v({},ra,{data:0}),Fb=xn(mA),pA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bA(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=yA[n])?!!i[n]:!1}function Mf(){return bA}var vA=v({},Rl,{key:function(n){if(n.key){var i=pA[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Ac(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?gA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mf,charCode:function(n){return n.type==="keypress"?Ac(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ac(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),xA=xn(vA),wA=v({},Cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pb=xn(wA),kA=v({},Rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mf}),SA=xn(kA),EA=v({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),_A=xn(EA),jA=v({},Cc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),OA=xn(jA),AA=v({},ra,{newState:0,oldState:0}),NA=xn(AA),MA=[9,13,27,32],Cf=Oi&&"CompositionEvent"in window,Dl=null;Oi&&"documentMode"in document&&(Dl=document.documentMode);var CA=Oi&&"TextEvent"in window&&!Dl,Vb=Oi&&(!Cf||Dl&&8<Dl&&11>=Dl),Gb=" ",Kb=!1;function Yb(n,i){switch(n){case"keyup":return MA.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ao=!1;function RA(n,i){switch(n){case"compositionend":return Qb(i);case"keypress":return i.which!==32?null:(Kb=!0,Gb);case"textInput":return n=i.data,n===Gb&&Kb?null:n;default:return null}}function TA(n,i){if(ao)return n==="compositionend"||!Cf&&Yb(n,i)?(n=Hb(),Oc=jf=Ji=null,ao=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Vb&&i.locale!=="ko"?null:i.data;default:return null}}var DA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xb(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!DA[n.type]:i==="textarea"}function Zb(n,i,o,s){io?ro?ro.push(s):ro=[s]:io=s,i=xu(i,"onChange"),0<i.length&&(o=new Mc("onChange","change",null,o,s),n.push({event:o,listeners:i}))}var Ll=null,zl=null;function LA(n){T1(n,0)}function Rc(n){var i=Nl(n);if(Rb(i))return n}function Wb(n,i){if(n==="change")return i}var Jb=!1;if(Oi){var Rf;if(Oi){var Tf="oninput"in document;if(!Tf){var e0=document.createElement("div");e0.setAttribute("oninput","return;"),Tf=typeof e0.oninput=="function"}Rf=Tf}else Rf=!1;Jb=Rf&&(!document.documentMode||9<document.documentMode)}function t0(){Ll&&(Ll.detachEvent("onpropertychange",n0),zl=Ll=null)}function n0(n){if(n.propertyName==="value"&&Rc(zl)){var i=[];Zb(i,zl,n,Sf(n)),Ib(LA,i)}}function zA(n,i,o){n==="focusin"?(t0(),Ll=i,zl=o,Ll.attachEvent("onpropertychange",n0)):n==="focusout"&&t0()}function $A(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Rc(zl)}function UA(n,i){if(n==="click")return Rc(i)}function IA(n,i){if(n==="input"||n==="change")return Rc(i)}function HA(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Mn=typeof Object.is=="function"?Object.is:HA;function $l(n,i){if(Mn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),s=Object.keys(i);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var f=o[s];if(!Mt.call(i,f)||!Mn(n[f],i[f]))return!1}return!0}function i0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function r0(n,i){var o=i0(n);n=0;for(var s;o;){if(o.nodeType===3){if(s=n+o.textContent.length,n<=i&&s>=i)return{node:o,offset:i-n};n=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=i0(o)}}function a0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?a0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function o0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=_c(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=_c(n.document)}return i}function Df(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var BA=Oi&&"documentMode"in document&&11>=document.documentMode,oo=null,Lf=null,Ul=null,zf=!1;function l0(n,i,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;zf||oo==null||oo!==_c(s)||(s=oo,"selectionStart"in s&&Df(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ul&&$l(Ul,s)||(Ul=s,s=xu(Lf,"onSelect"),0<s.length&&(i=new Mc("onSelect","select",null,i,o),n.push({event:i,listeners:s}),i.target=oo)))}function aa(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var lo={animationend:aa("Animation","AnimationEnd"),animationiteration:aa("Animation","AnimationIteration"),animationstart:aa("Animation","AnimationStart"),transitionrun:aa("Transition","TransitionRun"),transitionstart:aa("Transition","TransitionStart"),transitioncancel:aa("Transition","TransitionCancel"),transitionend:aa("Transition","TransitionEnd")},$f={},s0={};Oi&&(s0=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);function oa(n){if($f[n])return $f[n];if(!lo[n])return n;var i=lo[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in s0)return $f[n]=i[o];return n}var c0=oa("animationend"),u0=oa("animationiteration"),d0=oa("animationstart"),qA=oa("transitionrun"),FA=oa("transitionstart"),PA=oa("transitioncancel"),f0=oa("transitionend"),h0=new Map,Uf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Uf.push("scrollEnd");function ri(n,i){h0.set(n,i),ia(i,[n])}var Tc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Gn=[],so=0,If=0;function Dc(){for(var n=so,i=If=so=0;i<n;){var o=Gn[i];Gn[i++]=null;var s=Gn[i];Gn[i++]=null;var f=Gn[i];Gn[i++]=null;var h=Gn[i];if(Gn[i++]=null,s!==null&&f!==null){var y=s.pending;y===null?f.next=f:(f.next=y.next,y.next=f),s.pending=f}h!==0&&m0(o,f,h)}}function Lc(n,i,o,s){Gn[so++]=n,Gn[so++]=i,Gn[so++]=o,Gn[so++]=s,If|=s,n.lanes|=s,n=n.alternate,n!==null&&(n.lanes|=s)}function Hf(n,i,o,s){return Lc(n,i,o,s),zc(n)}function la(n,i){return Lc(n,null,null,i),zc(n)}function m0(n,i,o){n.lanes|=o;var s=n.alternate;s!==null&&(s.lanes|=o);for(var f=!1,h=n.return;h!==null;)h.childLanes|=o,s=h.alternate,s!==null&&(s.childLanes|=o),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(f=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,f&&i!==null&&(f=31-kt(o),n=h.hiddenUpdates,s=n[f],s===null?n[f]=[i]:s.push(i),i.lane=o|536870912),h):null}function zc(n){if(50<os)throw os=0,Qh=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var co={};function VA(n,i,o,s){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(n,i,o,s){return new VA(n,i,o,s)}function Bf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ai(n,i){var o=n.alternate;return o===null?(o=Cn(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function p0(n,i){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function $c(n,i,o,s,f,h){var y=0;if(s=n,typeof n=="function")Bf(n)&&(y=1);else if(typeof n=="string")y=XN(n,o,F.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case H:return n=Cn(31,o,i,f),n.elementType=H,n.lanes=h,n;case E:return sa(o.children,f,h,i);case _:y=8,f|=24;break;case C:return n=Cn(12,o,i,f|2),n.elementType=C,n.lanes=h,n;case R:return n=Cn(13,o,i,f),n.elementType=R,n.lanes=h,n;case P:return n=Cn(19,o,i,f),n.elementType=P,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:y=10;break e;case O:y=9;break e;case D:y=11;break e;case L:y=14;break e;case T:y=16,s=null;break e}y=29,o=Error(a(130,n===null?"null":typeof n,"")),s=null}return i=Cn(y,o,i,f),i.elementType=n,i.type=s,i.lanes=h,i}function sa(n,i,o,s){return n=Cn(7,n,s,i),n.lanes=o,n}function qf(n,i,o){return n=Cn(6,n,null,i),n.lanes=o,n}function g0(n){var i=Cn(18,null,null,0);return i.stateNode=n,i}function Ff(n,i,o){return i=Cn(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var y0=new WeakMap;function Kn(n,i){if(typeof n=="object"&&n!==null){var o=y0.get(n);return o!==void 0?o:(i={value:n,source:i,stack:Ee(i)},y0.set(n,i),i)}return{value:n,source:i,stack:Ee(i)}}var uo=[],fo=0,Uc=null,Il=0,Yn=[],Qn=0,er=null,di=1,fi="";function Ni(n,i){uo[fo++]=Il,uo[fo++]=Uc,Uc=n,Il=i}function b0(n,i,o){Yn[Qn++]=di,Yn[Qn++]=fi,Yn[Qn++]=er,er=n;var s=di;n=fi;var f=32-kt(s)-1;s&=~(1<<f),o+=1;var h=32-kt(i)+f;if(30<h){var y=f-f%5;h=(s&(1<<y)-1).toString(32),s>>=y,f-=y,di=1<<32-kt(i)+f|o<<f|s,fi=h+n}else di=1<<h|o<<f|s,fi=n}function Pf(n){n.return!==null&&(Ni(n,1),b0(n,1,0))}function Vf(n){for(;n===Uc;)Uc=uo[--fo],uo[fo]=null,Il=uo[--fo],uo[fo]=null;for(;n===er;)er=Yn[--Qn],Yn[Qn]=null,fi=Yn[--Qn],Yn[Qn]=null,di=Yn[--Qn],Yn[Qn]=null}function v0(n,i){Yn[Qn++]=di,Yn[Qn++]=fi,Yn[Qn++]=er,di=i.id,fi=i.overflow,er=n}var en=null,xt=null,Je=!1,tr=null,Xn=!1,Gf=Error(a(519));function nr(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hl(Kn(i,n)),Gf}function x0(n){var i=n.stateNode,o=n.type,s=n.memoizedProps;switch(i[Nt]=n,i[vn]=s,o){case"dialog":Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":case"embed":Qe("load",i);break;case"video":case"audio":for(o=0;o<ss.length;o++)Qe(ss[o],i);break;case"source":Qe("error",i);break;case"img":case"image":case"link":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"input":Qe("invalid",i),Tb(i,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",i);break;case"textarea":Qe("invalid",i),Lb(i,s.value,s.defaultValue,s.children)}o=s.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||s.suppressHydrationWarning===!0||$1(i.textContent,o)?(s.popover!=null&&(Qe("beforetoggle",i),Qe("toggle",i)),s.onScroll!=null&&Qe("scroll",i),s.onScrollEnd!=null&&Qe("scrollend",i),s.onClick!=null&&(i.onclick=ji),i=!0):i=!1,i||nr(n,!0)}function w0(n){for(en=n.return;en;)switch(en.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:en=en.return}}function ho(n){if(n!==en)return!1;if(!Je)return w0(n),Je=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||um(n.type,n.memoizedProps)),o=!o),o&&xt&&nr(n),w0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));xt=G1(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));xt=G1(n)}else i===27?(i=xt,gr(n.type)?(n=pm,pm=null,xt=n):xt=i):xt=en?Wn(n.stateNode.nextSibling):null;return!0}function ca(){xt=en=null,Je=!1}function Kf(){var n=tr;return n!==null&&(En===null?En=n:En.push.apply(En,n),tr=null),n}function Hl(n){tr===null?tr=[n]:tr.push(n)}var Yf=N(null),ua=null,Mi=null;function ir(n,i,o){I(Yf,i._currentValue),i._currentValue=o}function Ci(n){n._currentValue=Yf.current,q(Yf)}function Qf(n,i,o){for(;n!==null;){var s=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,s!==null&&(s.childLanes|=i)):s!==null&&(s.childLanes&i)!==i&&(s.childLanes|=i),n===o)break;n=n.return}}function Xf(n,i,o,s){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var U=0;U<i.length;U++)if(S.context===i[U]){h.lanes|=o,S=h.alternate,S!==null&&(S.lanes|=o),Qf(h.return,o,n),s||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(a(341));y.lanes|=o,h=y.alternate,h!==null&&(h.lanes|=o),Qf(y,o,n),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function mo(n,i,o,s){n=null;for(var f=i,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var S=f.type;Mn(f.pendingProps.value,y.value)||(n!==null?n.push(S):n=[S])}}else if(f===he.current){if(y=f.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(hs):n=[hs])}f=f.return}n!==null&&Xf(i,n,o,s),i.flags|=262144}function Ic(n){for(n=n.firstContext;n!==null;){if(!Mn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function da(n){ua=n,Mi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function tn(n){return k0(ua,n)}function Hc(n,i){return ua===null&&da(n),k0(n,i)}function k0(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Mi===null){if(n===null)throw Error(a(308));Mi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Mi=Mi.next=i;return o}var GA=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,s){n.push(s)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},KA=e.unstable_scheduleCallback,YA=e.unstable_NormalPriority,It={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zf(){return{controller:new GA,data:new Map,refCount:0}}function Bl(n){n.refCount--,n.refCount===0&&KA(YA,function(){n.controller.abort()})}var ql=null,Wf=0,po=0,go=null;function QA(n,i){if(ql===null){var o=ql=[];Wf=0,po=tm(),go={status:"pending",value:void 0,then:function(s){o.push(s)}}}return Wf++,i.then(S0,S0),i}function S0(){if(--Wf===0&&ql!==null){go!==null&&(go.status="fulfilled");var n=ql;ql=null,po=0,go=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function XA(n,i){var o=[],s={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return n.then(function(){s.status="fulfilled",s.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(s.status="rejected",s.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),s}var E0=M.S;M.S=function(n,i){l1=Ut(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&QA(n,i),E0!==null&&E0(n,i)};var fa=N(null);function Jf(){var n=fa.current;return n!==null?n:bt.pooledCache}function Bc(n,i){i===null?I(fa,fa.current):I(fa,i.pool)}function _0(){var n=Jf();return n===null?null:{parent:It._currentValue,pool:n}}var yo=Error(a(460)),eh=Error(a(474)),qc=Error(a(542)),Fc={then:function(){}};function j0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function O0(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(ji,ji),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n;default:if(typeof i.status=="string")i.then(ji,ji);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(s){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=s}},function(s){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=s}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n}throw ma=i,yo}}function ha(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(ma=o,yo):o}}var ma=null;function A0(){if(ma===null)throw Error(a(459));var n=ma;return ma=null,n}function N0(n){if(n===yo||n===qc)throw Error(a(483))}var bo=null,Fl=0;function Pc(n){var i=Fl;return Fl+=1,bo===null&&(bo=[]),O0(bo,n,i)}function Pl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Vc(n,i){throw i.$$typeof===k?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function M0(n){function i(G,B){if(n){var Z=G.deletions;Z===null?(G.deletions=[B],G.flags|=16):Z.push(B)}}function o(G,B){if(!n)return null;for(;B!==null;)i(G,B),B=B.sibling;return null}function s(G){for(var B=new Map;G!==null;)G.key!==null?B.set(G.key,G):B.set(G.index,G),G=G.sibling;return B}function f(G,B){return G=Ai(G,B),G.index=0,G.sibling=null,G}function h(G,B,Z){return G.index=Z,n?(Z=G.alternate,Z!==null?(Z=Z.index,Z<B?(G.flags|=67108866,B):Z):(G.flags|=67108866,B)):(G.flags|=1048576,B)}function y(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function S(G,B,Z,fe){return B===null||B.tag!==6?(B=qf(Z,G.mode,fe),B.return=G,B):(B=f(B,Z),B.return=G,B)}function U(G,B,Z,fe){var Le=Z.type;return Le===E?se(G,B,Z.props.children,fe,Z.key):B!==null&&(B.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===T&&ha(Le)===B.type)?(B=f(B,Z.props),Pl(B,Z),B.return=G,B):(B=$c(Z.type,Z.key,Z.props,null,G.mode,fe),Pl(B,Z),B.return=G,B)}function W(G,B,Z,fe){return B===null||B.tag!==4||B.stateNode.containerInfo!==Z.containerInfo||B.stateNode.implementation!==Z.implementation?(B=Ff(Z,G.mode,fe),B.return=G,B):(B=f(B,Z.children||[]),B.return=G,B)}function se(G,B,Z,fe,Le){return B===null||B.tag!==7?(B=sa(Z,G.mode,fe,Le),B.return=G,B):(B=f(B,Z),B.return=G,B)}function me(G,B,Z){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=qf(""+B,G.mode,Z),B.return=G,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case w:return Z=$c(B.type,B.key,B.props,null,G.mode,Z),Pl(Z,B),Z.return=G,Z;case j:return B=Ff(B,G.mode,Z),B.return=G,B;case T:return B=ha(B),me(G,B,Z)}if(le(B)||oe(B))return B=sa(B,G.mode,Z,null),B.return=G,B;if(typeof B.then=="function")return me(G,Pc(B),Z);if(B.$$typeof===A)return me(G,Hc(G,B),Z);Vc(G,B)}return null}function J(G,B,Z,fe){var Le=B!==null?B.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Le!==null?null:S(G,B,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return Z.key===Le?U(G,B,Z,fe):null;case j:return Z.key===Le?W(G,B,Z,fe):null;case T:return Z=ha(Z),J(G,B,Z,fe)}if(le(Z)||oe(Z))return Le!==null?null:se(G,B,Z,fe,null);if(typeof Z.then=="function")return J(G,B,Pc(Z),fe);if(Z.$$typeof===A)return J(G,B,Hc(G,Z),fe);Vc(G,Z)}return null}function re(G,B,Z,fe,Le){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return G=G.get(Z)||null,S(B,G,""+fe,Le);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case w:return G=G.get(fe.key===null?Z:fe.key)||null,U(B,G,fe,Le);case j:return G=G.get(fe.key===null?Z:fe.key)||null,W(B,G,fe,Le);case T:return fe=ha(fe),re(G,B,Z,fe,Le)}if(le(fe)||oe(fe))return G=G.get(Z)||null,se(B,G,fe,Le,null);if(typeof fe.then=="function")return re(G,B,Z,Pc(fe),Le);if(fe.$$typeof===A)return re(G,B,Z,Hc(B,fe),Le);Vc(B,fe)}return null}function Ne(G,B,Z,fe){for(var Le=null,lt=null,Ce=B,Ve=B=0,We=null;Ce!==null&&Ve<Z.length;Ve++){Ce.index>Ve?(We=Ce,Ce=null):We=Ce.sibling;var st=J(G,Ce,Z[Ve],fe);if(st===null){Ce===null&&(Ce=We);break}n&&Ce&&st.alternate===null&&i(G,Ce),B=h(st,B,Ve),lt===null?Le=st:lt.sibling=st,lt=st,Ce=We}if(Ve===Z.length)return o(G,Ce),Je&&Ni(G,Ve),Le;if(Ce===null){for(;Ve<Z.length;Ve++)Ce=me(G,Z[Ve],fe),Ce!==null&&(B=h(Ce,B,Ve),lt===null?Le=Ce:lt.sibling=Ce,lt=Ce);return Je&&Ni(G,Ve),Le}for(Ce=s(Ce);Ve<Z.length;Ve++)We=re(Ce,G,Ve,Z[Ve],fe),We!==null&&(n&&We.alternate!==null&&Ce.delete(We.key===null?Ve:We.key),B=h(We,B,Ve),lt===null?Le=We:lt.sibling=We,lt=We);return n&&Ce.forEach(function(wr){return i(G,wr)}),Je&&Ni(G,Ve),Le}function Ue(G,B,Z,fe){if(Z==null)throw Error(a(151));for(var Le=null,lt=null,Ce=B,Ve=B=0,We=null,st=Z.next();Ce!==null&&!st.done;Ve++,st=Z.next()){Ce.index>Ve?(We=Ce,Ce=null):We=Ce.sibling;var wr=J(G,Ce,st.value,fe);if(wr===null){Ce===null&&(Ce=We);break}n&&Ce&&wr.alternate===null&&i(G,Ce),B=h(wr,B,Ve),lt===null?Le=wr:lt.sibling=wr,lt=wr,Ce=We}if(st.done)return o(G,Ce),Je&&Ni(G,Ve),Le;if(Ce===null){for(;!st.done;Ve++,st=Z.next())st=me(G,st.value,fe),st!==null&&(B=h(st,B,Ve),lt===null?Le=st:lt.sibling=st,lt=st);return Je&&Ni(G,Ve),Le}for(Ce=s(Ce);!st.done;Ve++,st=Z.next())st=re(Ce,G,Ve,st.value,fe),st!==null&&(n&&st.alternate!==null&&Ce.delete(st.key===null?Ve:st.key),B=h(st,B,Ve),lt===null?Le=st:lt.sibling=st,lt=st);return n&&Ce.forEach(function(lM){return i(G,lM)}),Je&&Ni(G,Ve),Le}function gt(G,B,Z,fe){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:e:{for(var Le=Z.key;B!==null;){if(B.key===Le){if(Le=Z.type,Le===E){if(B.tag===7){o(G,B.sibling),fe=f(B,Z.props.children),fe.return=G,G=fe;break e}}else if(B.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===T&&ha(Le)===B.type){o(G,B.sibling),fe=f(B,Z.props),Pl(fe,Z),fe.return=G,G=fe;break e}o(G,B);break}else i(G,B);B=B.sibling}Z.type===E?(fe=sa(Z.props.children,G.mode,fe,Z.key),fe.return=G,G=fe):(fe=$c(Z.type,Z.key,Z.props,null,G.mode,fe),Pl(fe,Z),fe.return=G,G=fe)}return y(G);case j:e:{for(Le=Z.key;B!==null;){if(B.key===Le)if(B.tag===4&&B.stateNode.containerInfo===Z.containerInfo&&B.stateNode.implementation===Z.implementation){o(G,B.sibling),fe=f(B,Z.children||[]),fe.return=G,G=fe;break e}else{o(G,B);break}else i(G,B);B=B.sibling}fe=Ff(Z,G.mode,fe),fe.return=G,G=fe}return y(G);case T:return Z=ha(Z),gt(G,B,Z,fe)}if(le(Z))return Ne(G,B,Z,fe);if(oe(Z)){if(Le=oe(Z),typeof Le!="function")throw Error(a(150));return Z=Le.call(Z),Ue(G,B,Z,fe)}if(typeof Z.then=="function")return gt(G,B,Pc(Z),fe);if(Z.$$typeof===A)return gt(G,B,Hc(G,Z),fe);Vc(G,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,B!==null&&B.tag===6?(o(G,B.sibling),fe=f(B,Z),fe.return=G,G=fe):(o(G,B),fe=qf(Z,G.mode,fe),fe.return=G,G=fe),y(G)):o(G,B)}return function(G,B,Z,fe){try{Fl=0;var Le=gt(G,B,Z,fe);return bo=null,Le}catch(Ce){if(Ce===yo||Ce===qc)throw Ce;var lt=Cn(29,Ce,null,G.mode);return lt.lanes=fe,lt.return=G,lt}finally{}}}var pa=M0(!0),C0=M0(!1),rr=!1;function th(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nh(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ar(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function or(n,i,o){var s=n.updateQueue;if(s===null)return null;if(s=s.shared,(ct&2)!==0){var f=s.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),s.pending=i,i=zc(n),m0(n,null,o),i}return Lc(n,s,i,o),zc(n)}function Vl(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,na(n,o)}}function ih(n,i){var o=n.updateQueue,s=n.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var f=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var y={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,o=o.next}while(o!==null);h===null?f=h=i:h=h.next=i}else f=h=i;o={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var rh=!1;function Gl(){if(rh){var n=go;if(n!==null)throw n}}function Kl(n,i,o,s){rh=!1;var f=n.updateQueue;rr=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var U=S,W=U.next;U.next=null,y===null?h=W:y.next=W,y=U;var se=n.alternate;se!==null&&(se=se.updateQueue,S=se.lastBaseUpdate,S!==y&&(S===null?se.firstBaseUpdate=W:S.next=W,se.lastBaseUpdate=U))}if(h!==null){var me=f.baseState;y=0,se=W=U=null,S=h;do{var J=S.lane&-536870913,re=J!==S.lane;if(re?(Ze&J)===J:(s&J)===J){J!==0&&J===po&&(rh=!0),se!==null&&(se=se.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var Ne=n,Ue=S;J=i;var gt=o;switch(Ue.tag){case 1:if(Ne=Ue.payload,typeof Ne=="function"){me=Ne.call(gt,me,J);break e}me=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ue.payload,J=typeof Ne=="function"?Ne.call(gt,me,J):Ne,J==null)break e;me=v({},me,J);break e;case 2:rr=!0}}J=S.callback,J!==null&&(n.flags|=64,re&&(n.flags|=8192),re=f.callbacks,re===null?f.callbacks=[J]:re.push(J))}else re={lane:J,tag:S.tag,payload:S.payload,callback:S.callback,next:null},se===null?(W=se=re,U=me):se=se.next=re,y|=J;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;re=S,S=re.next,re.next=null,f.lastBaseUpdate=re,f.shared.pending=null}}while(!0);se===null&&(U=me),f.baseState=U,f.firstBaseUpdate=W,f.lastBaseUpdate=se,h===null&&(f.shared.lanes=0),dr|=y,n.lanes=y,n.memoizedState=me}}function R0(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function T0(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)R0(o[n],i)}var vo=N(null),Gc=N(0);function D0(n,i){n=Hi,I(Gc,n),I(vo,i),Hi=n|i.baseLanes}function ah(){I(Gc,Hi),I(vo,vo.current)}function oh(){Hi=Gc.current,q(vo),q(Gc)}var Rn=N(null),Zn=null;function lr(n){var i=n.alternate;I(zt,zt.current&1),I(Rn,n),Zn===null&&(i===null||vo.current!==null||i.memoizedState!==null)&&(Zn=n)}function lh(n){I(zt,zt.current),I(Rn,n),Zn===null&&(Zn=n)}function L0(n){n.tag===22?(I(zt,zt.current),I(Rn,n),Zn===null&&(Zn=n)):sr()}function sr(){I(zt,zt.current),I(Rn,Rn.current)}function Tn(n){q(Rn),Zn===n&&(Zn=null),q(zt)}var zt=N(0);function Kc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||hm(o)||mm(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ri=0,Fe=null,mt=null,Ht=null,Yc=!1,xo=!1,ga=!1,Qc=0,Yl=0,wo=null,ZA=0;function Rt(){throw Error(a(321))}function sh(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Mn(n[o],i[o]))return!1;return!0}function ch(n,i,o,s,f,h){return Ri=h,Fe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?bv:Eh,ga=!1,h=o(s,f),ga=!1,xo&&(h=$0(i,o,s,f)),z0(n),h}function z0(n){M.H=Zl;var i=mt!==null&&mt.next!==null;if(Ri=0,Ht=mt=Fe=null,Yc=!1,Yl=0,wo=null,i)throw Error(a(300));n===null||Bt||(n=n.dependencies,n!==null&&Ic(n)&&(Bt=!0))}function $0(n,i,o,s){Fe=n;var f=0;do{if(xo&&(wo=null),Yl=0,xo=!1,25<=f)throw Error(a(301));if(f+=1,Ht=mt=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}M.H=vv,h=i(o,s)}while(xo);return h}function WA(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?Ql(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Fe.flags|=1024),i}function uh(){var n=Qc!==0;return Qc=0,n}function dh(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function fh(n){if(Yc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Yc=!1}Ri=0,Ht=mt=Fe=null,xo=!1,Yl=Qc=0,wo=null}function hn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Fe.memoizedState=Ht=n:Ht=Ht.next=n,Ht}function $t(){if(mt===null){var n=Fe.alternate;n=n!==null?n.memoizedState:null}else n=mt.next;var i=Ht===null?Fe.memoizedState:Ht.next;if(i!==null)Ht=i,mt=n;else{if(n===null)throw Fe.alternate===null?Error(a(467)):Error(a(310));mt=n,n={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Ht===null?Fe.memoizedState=Ht=n:Ht=Ht.next=n}return Ht}function Xc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ql(n){var i=Yl;return Yl+=1,wo===null&&(wo=[]),n=O0(wo,n,i),i=Fe,(Ht===null?i.memoizedState:Ht.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?bv:Eh),n}function Zc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ql(n);if(n.$$typeof===A)return tn(n)}throw Error(a(438,String(n)))}function hh(n){var i=null,o=Fe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var s=Fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(i={data:s.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=Xc(),Fe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),s=0;s<n;s++)o[s]=ne;return i.index++,o}function Ti(n,i){return typeof i=="function"?i(n):i}function Wc(n){var i=$t();return mh(i,mt,n)}function mh(n,i,o){var s=n.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=o;var f=n.baseQueue,h=s.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,s.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{i=f.next;var S=y=null,U=null,W=i,se=!1;do{var me=W.lane&-536870913;if(me!==W.lane?(Ze&me)===me:(Ri&me)===me){var J=W.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),me===po&&(se=!0);else if((Ri&J)===J){W=W.next,J===po&&(se=!0);continue}else me={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=me,y=h):U=U.next=me,Fe.lanes|=J,dr|=J;me=W.action,ga&&o(h,me),h=W.hasEagerState?W.eagerState:o(h,me)}else J={lane:me,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=J,y=h):U=U.next=J,Fe.lanes|=me,dr|=me;W=W.next}while(W!==null&&W!==i);if(U===null?y=h:U.next=S,!Mn(h,n.memoizedState)&&(Bt=!0,se&&(o=go,o!==null)))throw o;n.memoizedState=h,n.baseState=y,n.baseQueue=U,s.lastRenderedState=h}return f===null&&(s.lanes=0),[n.memoizedState,s.dispatch]}function ph(n){var i=$t(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=n;var s=o.dispatch,f=o.pending,h=i.memoizedState;if(f!==null){o.pending=null;var y=f=f.next;do h=n(h,y.action),y=y.next;while(y!==f);Mn(h,i.memoizedState)||(Bt=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,s]}function U0(n,i,o){var s=Fe,f=$t(),h=Je;if(h){if(o===void 0)throw Error(a(407));o=o()}else o=i();var y=!Mn((mt||f).memoizedState,o);if(y&&(f.memoizedState=o,Bt=!0),f=f.queue,bh(B0.bind(null,s,f,n),[n]),f.getSnapshot!==i||y||Ht!==null&&Ht.memoizedState.tag&1){if(s.flags|=2048,ko(9,{destroy:void 0},H0.bind(null,s,f,o,i),null),bt===null)throw Error(a(349));h||(Ri&127)!==0||I0(s,i,o)}return o}function I0(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Fe.updateQueue,i===null?(i=Xc(),Fe.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function H0(n,i,o,s){i.value=o,i.getSnapshot=s,q0(i)&&F0(n)}function B0(n,i,o){return o(function(){q0(i)&&F0(n)})}function q0(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Mn(n,o)}catch{return!0}}function F0(n){var i=la(n,2);i!==null&&_n(i,n,2)}function gh(n){var i=hn();if(typeof n=="function"){var o=n;if(n=o(),ga){Ot(!0);try{o()}finally{Ot(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:n},i}function P0(n,i,o,s){return n.baseState=o,mh(n,mt,typeof s=="function"?s:Ti)}function JA(n,i,o,s,f){if(tu(n))throw Error(a(485));if(n=i.action,n!==null){var h={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};M.T!==null?o(!0):h.isTransition=!1,s(h),o=i.pending,o===null?(h.next=i.pending=h,V0(i,h)):(h.next=o.next,i.pending=o.next=h)}}function V0(n,i){var o=i.action,s=i.payload,f=n.state;if(i.isTransition){var h=M.T,y={};M.T=y;try{var S=o(f,s),U=M.S;U!==null&&U(y,S),G0(n,i,S)}catch(W){yh(n,i,W)}finally{h!==null&&y.types!==null&&(h.types=y.types),M.T=h}}else try{h=o(f,s),G0(n,i,h)}catch(W){yh(n,i,W)}}function G0(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(s){K0(n,i,s)},function(s){return yh(n,i,s)}):K0(n,i,o)}function K0(n,i,o){i.status="fulfilled",i.value=o,Y0(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,V0(n,o)))}function yh(n,i,o){var s=n.pending;if(n.pending=null,s!==null){s=s.next;do i.status="rejected",i.reason=o,Y0(i),i=i.next;while(i!==s)}n.action=null}function Y0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Q0(n,i){return i}function X0(n,i){if(Je){var o=bt.formState;if(o!==null){e:{var s=Fe;if(Je){if(xt){t:{for(var f=xt,h=Xn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Wn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){xt=Wn(f.nextSibling),s=f.data==="F!";break e}}nr(s)}s=!1}s&&(i=o[0])}}return o=hn(),o.memoizedState=o.baseState=i,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Q0,lastRenderedState:i},o.queue=s,o=pv.bind(null,Fe,s),s.dispatch=o,s=gh(!1),h=Sh.bind(null,Fe,!1,s.queue),s=hn(),f={state:i,dispatch:null,action:n,pending:null},s.queue=f,o=JA.bind(null,Fe,f,h,o),f.dispatch=o,s.memoizedState=n,[i,o,!1]}function Z0(n){var i=$t();return W0(i,mt,n)}function W0(n,i,o){if(i=mh(n,i,Q0)[0],n=Wc(Ti)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var s=Ql(i)}catch(y){throw y===yo?qc:y}else s=i;i=$t();var f=i.queue,h=f.dispatch;return o!==i.memoizedState&&(Fe.flags|=2048,ko(9,{destroy:void 0},eN.bind(null,f,o),null)),[s,h,n]}function eN(n,i){n.action=i}function J0(n){var i=$t(),o=mt;if(o!==null)return W0(i,o,n);$t(),i=i.memoizedState,o=$t();var s=o.queue.dispatch;return o.memoizedState=n,[i,s,!1]}function ko(n,i,o,s){return n={tag:n,create:o,deps:s,inst:i,next:null},i=Fe.updateQueue,i===null&&(i=Xc(),Fe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(s=o.next,o.next=n,n.next=s,i.lastEffect=n),n}function ev(){return $t().memoizedState}function Jc(n,i,o,s){var f=hn();Fe.flags|=n,f.memoizedState=ko(1|i,{destroy:void 0},o,s===void 0?null:s)}function eu(n,i,o,s){var f=$t();s=s===void 0?null:s;var h=f.memoizedState.inst;mt!==null&&s!==null&&sh(s,mt.memoizedState.deps)?f.memoizedState=ko(i,h,o,s):(Fe.flags|=n,f.memoizedState=ko(1|i,h,o,s))}function tv(n,i){Jc(8390656,8,n,i)}function bh(n,i){eu(2048,8,n,i)}function tN(n){Fe.flags|=4;var i=Fe.updateQueue;if(i===null)i=Xc(),Fe.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function nv(n){var i=$t().memoizedState;return tN({ref:i,nextImpl:n}),function(){if((ct&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function iv(n,i){return eu(4,2,n,i)}function rv(n,i){return eu(4,4,n,i)}function av(n,i){if(typeof i=="function"){n=n();var o=i(n);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function ov(n,i,o){o=o!=null?o.concat([n]):null,eu(4,4,av.bind(null,i,n),o)}function vh(){}function lv(n,i){var o=$t();i=i===void 0?null:i;var s=o.memoizedState;return i!==null&&sh(i,s[1])?s[0]:(o.memoizedState=[n,i],n)}function sv(n,i){var o=$t();i=i===void 0?null:i;var s=o.memoizedState;if(i!==null&&sh(i,s[1]))return s[0];if(s=n(),ga){Ot(!0);try{n()}finally{Ot(!1)}}return o.memoizedState=[s,i],s}function xh(n,i,o){return o===void 0||(Ri&1073741824)!==0&&(Ze&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=c1(),Fe.lanes|=n,dr|=n,o)}function cv(n,i,o,s){return Mn(o,i)?o:vo.current!==null?(n=xh(n,o,s),Mn(n,i)||(Bt=!0),n):(Ri&42)===0||(Ri&1073741824)!==0&&(Ze&261930)===0?(Bt=!0,n.memoizedState=o):(n=c1(),Fe.lanes|=n,dr|=n,i)}function uv(n,i,o,s,f){var h=V.p;V.p=h!==0&&8>h?h:8;var y=M.T,S={};M.T=S,Sh(n,!1,i,o);try{var U=f(),W=M.S;if(W!==null&&W(S,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var se=XA(U,s);Xl(n,i,se,zn(n))}else Xl(n,i,s,zn(n))}catch(me){Xl(n,i,{then:function(){},status:"rejected",reason:me},zn())}finally{V.p=h,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function nN(){}function wh(n,i,o,s){if(n.tag!==5)throw Error(a(476));var f=dv(n).queue;uv(n,f,i,te,o===null?nN:function(){return fv(n),o(s)})}function dv(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:te},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function fv(n){var i=dv(n);i.next===null&&(i=n.alternate.memoizedState),Xl(n,i.next.queue,{},zn())}function kh(){return tn(hs)}function hv(){return $t().memoizedState}function mv(){return $t().memoizedState}function iN(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=zn();n=ar(o);var s=or(i,n,o);s!==null&&(_n(s,i,o),Vl(s,i,o)),i={cache:Zf()},n.payload=i;return}i=i.return}}function rN(n,i,o){var s=zn();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},tu(n)?gv(i,o):(o=Hf(n,i,o,s),o!==null&&(_n(o,n,s),yv(o,i,s)))}function pv(n,i,o){var s=zn();Xl(n,i,o,s)}function Xl(n,i,o,s){var f={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(tu(n))gv(i,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,o);if(f.hasEagerState=!0,f.eagerState=S,Mn(S,y))return Lc(n,i,f,0),bt===null&&Dc(),!1}catch{}finally{}if(o=Hf(n,i,f,s),o!==null)return _n(o,n,s),yv(o,i,s),!0}return!1}function Sh(n,i,o,s){if(s={lane:2,revertLane:tm(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tu(n)){if(i)throw Error(a(479))}else i=Hf(n,o,s,2),i!==null&&_n(i,n,2)}function tu(n){var i=n.alternate;return n===Fe||i!==null&&i===Fe}function gv(n,i){xo=Yc=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function yv(n,i,o){if((o&4194048)!==0){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,na(n,o)}}var Zl={readContext:tn,use:Zc,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useLayoutEffect:Rt,useInsertionEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useSyncExternalStore:Rt,useId:Rt,useHostTransitionStatus:Rt,useFormState:Rt,useActionState:Rt,useOptimistic:Rt,useMemoCache:Rt,useCacheRefresh:Rt};Zl.useEffectEvent=Rt;var bv={readContext:tn,use:Zc,useCallback:function(n,i){return hn().memoizedState=[n,i===void 0?null:i],n},useContext:tn,useEffect:tv,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,Jc(4194308,4,av.bind(null,i,n),o)},useLayoutEffect:function(n,i){return Jc(4194308,4,n,i)},useInsertionEffect:function(n,i){Jc(4,2,n,i)},useMemo:function(n,i){var o=hn();i=i===void 0?null:i;var s=n();if(ga){Ot(!0);try{n()}finally{Ot(!1)}}return o.memoizedState=[s,i],s},useReducer:function(n,i,o){var s=hn();if(o!==void 0){var f=o(i);if(ga){Ot(!0);try{o(i)}finally{Ot(!1)}}}else f=i;return s.memoizedState=s.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},s.queue=n,n=n.dispatch=rN.bind(null,Fe,n),[s.memoizedState,n]},useRef:function(n){var i=hn();return n={current:n},i.memoizedState=n},useState:function(n){n=gh(n);var i=n.queue,o=pv.bind(null,Fe,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:vh,useDeferredValue:function(n,i){var o=hn();return xh(o,n,i)},useTransition:function(){var n=gh(!1);return n=uv.bind(null,Fe,n.queue,!0,!1),hn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var s=Fe,f=hn();if(Je){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),bt===null)throw Error(a(349));(Ze&127)!==0||I0(s,i,o)}f.memoizedState=o;var h={value:o,getSnapshot:i};return f.queue=h,tv(B0.bind(null,s,h,n),[n]),s.flags|=2048,ko(9,{destroy:void 0},H0.bind(null,s,h,o,i),null),o},useId:function(){var n=hn(),i=bt.identifierPrefix;if(Je){var o=fi,s=di;o=(s&~(1<<32-kt(s)-1)).toString(32)+o,i="_"+i+"R_"+o,o=Qc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=ZA++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:kh,useFormState:X0,useActionState:X0,useOptimistic:function(n){var i=hn();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Sh.bind(null,Fe,!0,o),o.dispatch=i,[n,i]},useMemoCache:hh,useCacheRefresh:function(){return hn().memoizedState=iN.bind(null,Fe)},useEffectEvent:function(n){var i=hn(),o={impl:n};return i.memoizedState=o,function(){if((ct&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Eh={readContext:tn,use:Zc,useCallback:lv,useContext:tn,useEffect:bh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:rv,useMemo:sv,useReducer:Wc,useRef:ev,useState:function(){return Wc(Ti)},useDebugValue:vh,useDeferredValue:function(n,i){var o=$t();return cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=Wc(Ti)[0],i=$t().memoizedState;return[typeof n=="boolean"?n:Ql(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:kh,useFormState:Z0,useActionState:Z0,useOptimistic:function(n,i){var o=$t();return P0(o,mt,n,i)},useMemoCache:hh,useCacheRefresh:mv};Eh.useEffectEvent=nv;var vv={readContext:tn,use:Zc,useCallback:lv,useContext:tn,useEffect:bh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:rv,useMemo:sv,useReducer:ph,useRef:ev,useState:function(){return ph(Ti)},useDebugValue:vh,useDeferredValue:function(n,i){var o=$t();return mt===null?xh(o,n,i):cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=ph(Ti)[0],i=$t().memoizedState;return[typeof n=="boolean"?n:Ql(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:kh,useFormState:J0,useActionState:J0,useOptimistic:function(n,i){var o=$t();return mt!==null?P0(o,mt,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:hh,useCacheRefresh:mv};vv.useEffectEvent=nv;function _h(n,i,o,s){i=n.memoizedState,o=o(s,i),o=o==null?i:v({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var jh={enqueueSetState:function(n,i,o){n=n._reactInternals;var s=zn(),f=ar(s);f.payload=i,o!=null&&(f.callback=o),i=or(n,f,s),i!==null&&(_n(i,n,s),Vl(i,n,s))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var s=zn(),f=ar(s);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=or(n,f,s),i!==null&&(_n(i,n,s),Vl(i,n,s))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=zn(),s=ar(o);s.tag=2,i!=null&&(s.callback=i),i=or(n,s,o),i!==null&&(_n(i,n,o),Vl(i,n,o))}};function xv(n,i,o,s,f,h,y){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(s,h,y):i.prototype&&i.prototype.isPureReactComponent?!$l(o,s)||!$l(f,h):!0}function wv(n,i,o,s){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,s),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,s),i.state!==n&&jh.enqueueReplaceState(i,i.state,null)}function ya(n,i){var o=i;if("ref"in i){o={};for(var s in i)s!=="ref"&&(o[s]=i[s])}if(n=n.defaultProps){o===i&&(o=v({},o));for(var f in n)o[f]===void 0&&(o[f]=n[f])}return o}function kv(n){Tc(n)}function Sv(n){console.error(n)}function Ev(n){Tc(n)}function nu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(s){setTimeout(function(){throw s})}}function _v(n,i,o){try{var s=n.onCaughtError;s(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Oh(n,i,o){return o=ar(o),o.tag=3,o.payload={element:null},o.callback=function(){nu(n,i)},o}function jv(n){return n=ar(n),n.tag=3,n}function Ov(n,i,o,s){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var h=s.value;n.payload=function(){return f(h)},n.callback=function(){_v(i,o,s)}}var y=o.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){_v(i,o,s),typeof f!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function aN(n,i,o,s,f){if(o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(i=o.alternate,i!==null&&mo(i,o,f,!0),o=Rn.current,o!==null){switch(o.tag){case 31:case 13:return Zn===null?mu():o.alternate===null&&Tt===0&&(Tt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,s===Fc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([s]):i.add(s),Wh(n,s,f)),!1;case 22:return o.flags|=65536,s===Fc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([s])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([s]):o.add(s)),Wh(n,s,f)),!1}throw Error(a(435,o.tag))}return Wh(n,s,f),mu(),!1}if(Je)return i=Rn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,s!==Gf&&(n=Error(a(422),{cause:s}),Hl(Kn(n,o)))):(s!==Gf&&(i=Error(a(423),{cause:s}),Hl(Kn(i,o))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,s=Kn(s,o),f=Oh(n.stateNode,s,f),ih(n,f),Tt!==4&&(Tt=2)),!1;var h=Error(a(520),{cause:s});if(h=Kn(h,o),as===null?as=[h]:as.push(h),Tt!==4&&(Tt=2),i===null)return!0;s=Kn(s,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=f&-f,o.lanes|=n,n=Oh(o.stateNode,s,n),ih(o,n),!1;case 1:if(i=o.type,h=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(fr===null||!fr.has(h))))return o.flags|=65536,f&=-f,o.lanes|=f,f=jv(f),Ov(f,n,o,s),ih(o,f),!1}o=o.return}while(o!==null);return!1}var Ah=Error(a(461)),Bt=!1;function nn(n,i,o,s){i.child=n===null?C0(i,null,o,s):pa(i,n.child,o,s)}function Av(n,i,o,s,f){o=o.render;var h=i.ref;if("ref"in s){var y={};for(var S in s)S!=="ref"&&(y[S]=s[S])}else y=s;return da(i),s=ch(n,i,o,y,h,f),S=uh(),n!==null&&!Bt?(dh(n,i,f),Di(n,i,f)):(Je&&S&&Pf(i),i.flags|=1,nn(n,i,s,f),i.child)}function Nv(n,i,o,s,f){if(n===null){var h=o.type;return typeof h=="function"&&!Bf(h)&&h.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=h,Mv(n,i,h,s,f)):(n=$c(o.type,null,s,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(h=n.child,!zh(n,f)){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:$l,o(y,s)&&n.ref===i.ref)return Di(n,i,f)}return i.flags|=1,n=Ai(h,s),n.ref=i.ref,n.return=i,i.child=n}function Mv(n,i,o,s,f){if(n!==null){var h=n.memoizedProps;if($l(h,s)&&n.ref===i.ref)if(Bt=!1,i.pendingProps=s=h,zh(n,f))(n.flags&131072)!==0&&(Bt=!0);else return i.lanes=n.lanes,Di(n,i,f)}return Nh(n,i,o,s,f)}function Cv(n,i,o,s){var f=s.children,h=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,n!==null){for(s=i.child=n.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~h}else s=0,i.child=null;return Rv(n,i,h,o,s)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Bc(i,h!==null?h.cachePool:null),h!==null?D0(i,h):ah(),L0(i);else return s=i.lanes=536870912,Rv(n,i,h!==null?h.baseLanes|o:o,o,s)}else h!==null?(Bc(i,h.cachePool),D0(i,h),sr(),i.memoizedState=null):(n!==null&&Bc(i,null),ah(),sr());return nn(n,i,f,o),i.child}function Wl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Rv(n,i,o,s,f){var h=Jf();return h=h===null?null:{parent:It._currentValue,pool:h},i.memoizedState={baseLanes:o,cachePool:h},n!==null&&Bc(i,null),ah(),L0(i),n!==null&&mo(n,i,s,!0),i.childLanes=f,null}function iu(n,i){return i=au({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Tv(n,i,o){return pa(i,n.child,null,o),n=iu(i,i.pendingProps),n.flags|=2,Tn(i),i.memoizedState=null,n}function oN(n,i,o){var s=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Je){if(s.mode==="hidden")return n=iu(i,s),i.lanes=536870912,Wl(null,n);if(lh(i),(n=xt)?(n=V1(n,Xn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:er!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,en=i,xt=null)):n=null,n===null)throw nr(i);return i.lanes=536870912,null}return iu(i,s)}var h=n.memoizedState;if(h!==null){var y=h.dehydrated;if(lh(i),f)if(i.flags&256)i.flags&=-257,i=Tv(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(Bt||mo(n,i,o,!1),f=(o&n.childLanes)!==0,Bt||f){if(s=bt,s!==null&&(y=ee(s,o),y!==0&&y!==h.retryLane))throw h.retryLane=y,la(n,y),_n(s,n,y),Ah;mu(),i=Tv(n,i,o)}else n=h.treeContext,xt=Wn(y.nextSibling),en=i,Je=!0,tr=null,Xn=!1,n!==null&&v0(i,n),i=iu(i,s),i.flags|=4096;return i}return n=Ai(n.child,{mode:s.mode,children:s.children}),n.ref=i.ref,i.child=n,n.return=i,n}function ru(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function Nh(n,i,o,s,f){return da(i),o=ch(n,i,o,s,void 0,f),s=uh(),n!==null&&!Bt?(dh(n,i,f),Di(n,i,f)):(Je&&s&&Pf(i),i.flags|=1,nn(n,i,o,f),i.child)}function Dv(n,i,o,s,f,h){return da(i),i.updateQueue=null,o=$0(i,s,o,f),z0(n),s=uh(),n!==null&&!Bt?(dh(n,i,h),Di(n,i,h)):(Je&&s&&Pf(i),i.flags|=1,nn(n,i,o,h),i.child)}function Lv(n,i,o,s,f){if(da(i),i.stateNode===null){var h=co,y=o.contextType;typeof y=="object"&&y!==null&&(h=tn(y)),h=new o(s,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=jh,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=s,h.state=i.memoizedState,h.refs={},th(i),y=o.contextType,h.context=typeof y=="object"&&y!==null?tn(y):co,h.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(_h(i,o,y,s),h.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&jh.enqueueReplaceState(h,h.state,null),Kl(i,s,h,f),Gl(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!0}else if(n===null){h=i.stateNode;var S=i.memoizedProps,U=ya(o,S);h.props=U;var W=h.context,se=o.contextType;y=co,typeof se=="object"&&se!==null&&(y=tn(se));var me=o.getDerivedStateFromProps;se=typeof me=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,se||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||W!==y)&&wv(i,h,s,y),rr=!1;var J=i.memoizedState;h.state=J,Kl(i,s,h,f),Gl(),W=i.memoizedState,S||J!==W||rr?(typeof me=="function"&&(_h(i,o,me,s),W=i.memoizedState),(U=rr||xv(i,o,U,s,J,W,y))?(se||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=s,i.memoizedState=W),h.props=s,h.state=W,h.context=y,s=U):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!1)}else{h=i.stateNode,nh(n,i),y=i.memoizedProps,se=ya(o,y),h.props=se,me=i.pendingProps,J=h.context,W=o.contextType,U=co,typeof W=="object"&&W!==null&&(U=tn(W)),S=o.getDerivedStateFromProps,(W=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==me||J!==U)&&wv(i,h,s,U),rr=!1,J=i.memoizedState,h.state=J,Kl(i,s,h,f),Gl();var re=i.memoizedState;y!==me||J!==re||rr||n!==null&&n.dependencies!==null&&Ic(n.dependencies)?(typeof S=="function"&&(_h(i,o,S,s),re=i.memoizedState),(se=rr||xv(i,o,se,s,J,re,U)||n!==null&&n.dependencies!==null&&Ic(n.dependencies))?(W||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,re,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,re,U)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=s,i.memoizedState=re),h.props=s,h.state=re,h.context=U,s=se):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),s=!1)}return h=s,ru(n,i),s=(i.flags&128)!==0,h||s?(h=i.stateNode,o=s&&typeof o.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,n!==null&&s?(i.child=pa(i,n.child,null,f),i.child=pa(i,null,o,f)):nn(n,i,o,f),i.memoizedState=h.state,n=i.child):n=Di(n,i,f),n}function zv(n,i,o,s){return ca(),i.flags|=256,nn(n,i,o,s),i.child}var Mh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ch(n){return{baseLanes:n,cachePool:_0()}}function Rh(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=Ln),n}function $v(n,i,o){var s=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=n!==null&&n.memoizedState===null?!1:(zt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,n===null){if(Je){if(f?lr(i):sr(),(n=xt)?(n=V1(n,Xn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:er!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,en=i,xt=null)):n=null,n===null)throw nr(i);return mm(n)?i.lanes=32:i.lanes=536870912,null}var S=s.children;return s=s.fallback,f?(sr(),f=i.mode,S=au({mode:"hidden",children:S},f),s=sa(s,f,o,null),S.return=i,s.return=i,S.sibling=s,i.child=S,s=i.child,s.memoizedState=Ch(o),s.childLanes=Rh(n,y,o),i.memoizedState=Mh,Wl(null,s)):(lr(i),Th(i,S))}var U=n.memoizedState;if(U!==null&&(S=U.dehydrated,S!==null)){if(h)i.flags&256?(lr(i),i.flags&=-257,i=Dh(n,i,o)):i.memoizedState!==null?(sr(),i.child=n.child,i.flags|=128,i=null):(sr(),S=s.fallback,f=i.mode,s=au({mode:"visible",children:s.children},f),S=sa(S,f,o,null),S.flags|=2,s.return=i,S.return=i,s.sibling=S,i.child=s,pa(i,n.child,null,o),s=i.child,s.memoizedState=Ch(o),s.childLanes=Rh(n,y,o),i.memoizedState=Mh,i=Wl(null,s));else if(lr(i),mm(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var W=y.dgst;y=W,s=Error(a(419)),s.stack="",s.digest=y,Hl({value:s,source:null,stack:null}),i=Dh(n,i,o)}else if(Bt||mo(n,i,o,!1),y=(o&n.childLanes)!==0,Bt||y){if(y=bt,y!==null&&(s=ee(y,o),s!==0&&s!==U.retryLane))throw U.retryLane=s,la(n,s),_n(y,n,s),Ah;hm(S)||mu(),i=Dh(n,i,o)}else hm(S)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,xt=Wn(S.nextSibling),en=i,Je=!0,tr=null,Xn=!1,n!==null&&v0(i,n),i=Th(i,s.children),i.flags|=4096);return i}return f?(sr(),S=s.fallback,f=i.mode,U=n.child,W=U.sibling,s=Ai(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,W!==null?S=Ai(W,S):(S=sa(S,f,o,null),S.flags|=2),S.return=i,s.return=i,s.sibling=S,i.child=s,Wl(null,s),s=i.child,S=n.child.memoizedState,S===null?S=Ch(o):(f=S.cachePool,f!==null?(U=It._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=_0(),S={baseLanes:S.baseLanes|o,cachePool:f}),s.memoizedState=S,s.childLanes=Rh(n,y,o),i.memoizedState=Mh,Wl(n.child,s)):(lr(i),o=n.child,n=o.sibling,o=Ai(o,{mode:"visible",children:s.children}),o.return=i,o.sibling=null,n!==null&&(y=i.deletions,y===null?(i.deletions=[n],i.flags|=16):y.push(n)),i.child=o,i.memoizedState=null,o)}function Th(n,i){return i=au({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function au(n,i){return n=Cn(22,n,null,i),n.lanes=0,n}function Dh(n,i,o){return pa(i,n.child,null,o),n=Th(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Uv(n,i,o){n.lanes|=i;var s=n.alternate;s!==null&&(s.lanes|=i),Qf(n.return,i,o)}function Lh(n,i,o,s,f,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=o,y.tailMode=f,y.treeForkCount=h)}function Iv(n,i,o){var s=i.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var y=zt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,I(zt,y),nn(n,i,s,o),s=Je?Il:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Uv(n,o,i);else if(n.tag===19)Uv(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(o=i.child,f=null;o!==null;)n=o.alternate,n!==null&&Kc(n)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),Lh(i,!1,f,o,h,s);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Kc(n)===null){i.child=f;break}n=f.sibling,f.sibling=o,o=f,f=n}Lh(i,!0,o,null,h,s);break;case"together":Lh(i,!1,null,null,void 0,s);break;default:i.memoizedState=null}return i.child}function Di(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),dr|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(mo(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,o=Ai(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Ai(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function zh(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ic(n)))}function lN(n,i,o){switch(i.tag){case 3:be(i,i.stateNode.containerInfo),ir(i,It,n.memoizedState.cache),ca();break;case 27:case 5:de(i);break;case 4:be(i,i.stateNode.containerInfo);break;case 10:ir(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,lh(i),null;break;case 13:var s=i.memoizedState;if(s!==null)return s.dehydrated!==null?(lr(i),i.flags|=128,null):(o&i.child.childLanes)!==0?$v(n,i,o):(lr(i),n=Di(n,i,o),n!==null?n.sibling:null);lr(i);break;case 19:var f=(n.flags&128)!==0;if(s=(o&i.childLanes)!==0,s||(mo(n,i,o,!1),s=(o&i.childLanes)!==0),f){if(s)return Iv(n,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),I(zt,zt.current),s)break;return null;case 22:return i.lanes=0,Cv(n,i,o,i.pendingProps);case 24:ir(i,It,n.memoizedState.cache)}return Di(n,i,o)}function Hv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Bt=!0;else{if(!zh(n,o)&&(i.flags&128)===0)return Bt=!1,lN(n,i,o);Bt=(n.flags&131072)!==0}else Bt=!1,Je&&(i.flags&1048576)!==0&&b0(i,Il,i.index);switch(i.lanes=0,i.tag){case 16:e:{var s=i.pendingProps;if(n=ha(i.elementType),i.type=n,typeof n=="function")Bf(n)?(s=ya(n,s),i.tag=1,i=Lv(null,i,n,s,o)):(i.tag=0,i=Nh(null,i,n,s,o));else{if(n!=null){var f=n.$$typeof;if(f===D){i.tag=11,i=Av(null,i,n,s,o);break e}else if(f===L){i.tag=14,i=Nv(null,i,n,s,o);break e}}throw i=X(n)||n,Error(a(306,i,""))}}return i;case 0:return Nh(n,i,i.type,i.pendingProps,o);case 1:return s=i.type,f=ya(s,i.pendingProps),Lv(n,i,s,f,o);case 3:e:{if(be(i,i.stateNode.containerInfo),n===null)throw Error(a(387));s=i.pendingProps;var h=i.memoizedState;f=h.element,nh(n,i),Kl(i,s,null,o);var y=i.memoizedState;if(s=y.cache,ir(i,It,s),s!==h.cache&&Xf(i,[It],o,!0),Gl(),s=y.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=zv(n,i,s,o);break e}else if(s!==f){f=Kn(Error(a(424)),i),Hl(f),i=zv(n,i,s,o);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(xt=Wn(n.firstChild),en=i,Je=!0,tr=null,Xn=!0,o=C0(i,null,s,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(ca(),s===f){i=Di(n,i,o);break e}nn(n,i,s,o)}i=i.child}return i;case 26:return ru(n,i),n===null?(o=Z1(i.type,null,i.pendingProps,null))?i.memoizedState=o:Je||(o=i.type,n=i.pendingProps,s=wu(ce.current).createElement(o),s[Nt]=i,s[vn]=n,rn(s,o,n),Yt(s),i.stateNode=s):i.memoizedState=Z1(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return de(i),n===null&&Je&&(s=i.stateNode=Y1(i.type,i.pendingProps,ce.current),en=i,Xn=!0,f=xt,gr(i.type)?(pm=f,xt=Wn(s.firstChild)):xt=f),nn(n,i,i.pendingProps.children,o),ru(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Je&&((f=s=xt)&&(s=$N(s,i.type,i.pendingProps,Xn),s!==null?(i.stateNode=s,en=i,xt=Wn(s.firstChild),Xn=!1,f=!0):f=!1),f||nr(i)),de(i),f=i.type,h=i.pendingProps,y=n!==null?n.memoizedProps:null,s=h.children,um(f,h)?s=null:y!==null&&um(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=ch(n,i,WA,null,null,o),hs._currentValue=f),ru(n,i),nn(n,i,s,o),i.child;case 6:return n===null&&Je&&((n=o=xt)&&(o=UN(o,i.pendingProps,Xn),o!==null?(i.stateNode=o,en=i,xt=null,n=!0):n=!1),n||nr(i)),null;case 13:return $v(n,i,o);case 4:return be(i,i.stateNode.containerInfo),s=i.pendingProps,n===null?i.child=pa(i,null,s,o):nn(n,i,s,o),i.child;case 11:return Av(n,i,i.type,i.pendingProps,o);case 7:return nn(n,i,i.pendingProps,o),i.child;case 8:return nn(n,i,i.pendingProps.children,o),i.child;case 12:return nn(n,i,i.pendingProps.children,o),i.child;case 10:return s=i.pendingProps,ir(i,i.type,s.value),nn(n,i,s.children,o),i.child;case 9:return f=i.type._context,s=i.pendingProps.children,da(i),f=tn(f),s=s(f),i.flags|=1,nn(n,i,s,o),i.child;case 14:return Nv(n,i,i.type,i.pendingProps,o);case 15:return Mv(n,i,i.type,i.pendingProps,o);case 19:return Iv(n,i,o);case 31:return oN(n,i,o);case 22:return Cv(n,i,o,i.pendingProps);case 24:return da(i),s=tn(It),n===null?(f=Jf(),f===null&&(f=bt,h=Zf(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=o),f=h),i.memoizedState={parent:s,cache:f},th(i),ir(i,It,f)):((n.lanes&o)!==0&&(nh(n,i),Kl(i,null,null,o),Gl()),f=n.memoizedState,h=i.memoizedState,f.parent!==s?(f={parent:s,cache:s},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),ir(i,It,s)):(s=h.cache,ir(i,It,s),s!==f.cache&&Xf(i,[It],o,!0))),nn(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Li(n){n.flags|=4}function $h(n,i,o,s,f){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(h1())n.flags|=8192;else throw ma=Fc,eh}else n.flags&=-16777217}function Bv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!nx(i))if(h1())n.flags|=8192;else throw ma=Fc,eh}function ou(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?cn():536870912,n.lanes|=i,jo|=i)}function Jl(n,i){if(!Je)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:s.sibling=null}}function wt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,s=0;if(i)for(var f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=s,n.childLanes=o,i}function sN(n,i,o){var s=i.pendingProps;switch(Vf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(i),null;case 1:return wt(i),null;case 3:return o=i.stateNode,s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Ci(It),$(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(ho(i)?Li(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Kf())),wt(i),null;case 26:var f=i.type,h=i.memoizedState;return n===null?(Li(i),h!==null?(wt(i),Bv(i,h)):(wt(i),$h(i,f,null,s,o))):h?h!==n.memoizedState?(Li(i),wt(i),Bv(i,h)):(wt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==s&&Li(i),wt(i),$h(i,f,n,s,o)),null;case 27:if(ge(i),o=ce.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Li(i);else{if(!s){if(i.stateNode===null)throw Error(a(166));return wt(i),null}n=F.current,ho(i)?x0(i):(n=Y1(f,s,o),i.stateNode=n,Li(i))}return wt(i),null;case 5:if(ge(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Li(i);else{if(!s){if(i.stateNode===null)throw Error(a(166));return wt(i),null}if(h=F.current,ho(i))x0(i);else{var y=wu(ce.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?y.createElement(f,{is:s.is}):y.createElement(f)}}h[Nt]=i,h[vn]=s;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(rn(h,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Li(i)}}return wt(i),$h(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==s&&Li(i);else{if(typeof s!="string"&&i.stateNode===null)throw Error(a(166));if(n=ce.current,ho(i)){if(n=i.stateNode,o=i.memoizedProps,s=null,f=en,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}n[Nt]=i,n=!!(n.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||$1(n.nodeValue,o)),n||nr(i,!0)}else n=wu(n).createTextNode(s),n[Nt]=i,i.stateNode=n}return wt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(s=ho(i),o!==null){if(n===null){if(!s)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Nt]=i}else ca(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),n=!1}else o=Kf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(Tn(i),i):(Tn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return wt(i),null;case 13:if(s=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=ho(i),s!==null&&s.dehydrated!==null){if(n===null){if(!f)throw Error(a(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Nt]=i}else ca(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),f=!1}else f=Kf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(Tn(i),i):(Tn(i),null)}return Tn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=s!==null,n=n!==null&&n.memoizedState!==null,o&&(s=i.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==f&&(s.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),ou(i,i.updateQueue),wt(i),null);case 4:return $(),n===null&&am(i.stateNode.containerInfo),wt(i),null;case 10:return Ci(i.type),wt(i),null;case 19:if(q(zt),s=i.memoizedState,s===null)return wt(i),null;if(f=(i.flags&128)!==0,h=s.rendering,h===null)if(f)Jl(s,!1);else{if(Tt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(h=Kc(n),h!==null){for(i.flags|=128,Jl(s,!1),n=h.updateQueue,i.updateQueue=n,ou(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)p0(o,n),o=o.sibling;return I(zt,zt.current&1|2),Je&&Ni(i,s.treeForkCount),i.child}n=n.sibling}s.tail!==null&&Ut()>du&&(i.flags|=128,f=!0,Jl(s,!1),i.lanes=4194304)}else{if(!f)if(n=Kc(h),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,ou(i,n),Jl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!Je)return wt(i),null}else 2*Ut()-s.renderingStartTime>du&&o!==536870912&&(i.flags|=128,f=!0,Jl(s,!1),i.lanes=4194304);s.isBackwards?(h.sibling=i.child,i.child=h):(n=s.last,n!==null?n.sibling=h:i.child=h,s.last=h)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=Ut(),n.sibling=null,o=zt.current,I(zt,f?o&1|2:o&1),Je&&Ni(i,s.treeForkCount),n):(wt(i),null);case 22:case 23:return Tn(i),oh(),s=i.memoizedState!==null,n!==null?n.memoizedState!==null!==s&&(i.flags|=8192):s&&(i.flags|=8192),s?(o&536870912)!==0&&(i.flags&128)===0&&(wt(i),i.subtreeFlags&6&&(i.flags|=8192)):wt(i),o=i.updateQueue,o!==null&&ou(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==o&&(i.flags|=2048),n!==null&&q(fa),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Ci(It),wt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function cN(n,i){switch(Vf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Ci(It),$(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return ge(i),null;case 31:if(i.memoizedState!==null){if(Tn(i),i.alternate===null)throw Error(a(340));ca()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Tn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ca()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return q(zt),null;case 4:return $(),null;case 10:return Ci(i.type),null;case 22:case 23:return Tn(i),oh(),n!==null&&q(fa),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Ci(It),null;case 25:return null;default:return null}}function qv(n,i){switch(Vf(i),i.tag){case 3:Ci(It),$();break;case 26:case 27:case 5:ge(i);break;case 4:$();break;case 31:i.memoizedState!==null&&Tn(i);break;case 13:Tn(i);break;case 19:q(zt);break;case 10:Ci(i.type);break;case 22:case 23:Tn(i),oh(),n!==null&&q(fa);break;case 24:Ci(It)}}function es(n,i){try{var o=i.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var f=s.next;o=f;do{if((o.tag&n)===n){s=void 0;var h=o.create,y=o.inst;s=h(),y.destroy=s}o=o.next}while(o!==f)}}catch(S){ht(i,i.return,S)}}function cr(n,i,o){try{var s=i.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var h=f.next;s=h;do{if((s.tag&n)===n){var y=s.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var U=o,W=S;try{W()}catch(se){ht(f,U,se)}}}s=s.next}while(s!==h)}}catch(se){ht(i,i.return,se)}}function Fv(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{T0(i,o)}catch(s){ht(n,n.return,s)}}}function Pv(n,i,o){o.props=ya(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(s){ht(n,i,s)}}function ts(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var s=n.stateNode;break;case 30:s=n.stateNode;break;default:s=n.stateNode}typeof o=="function"?n.refCleanup=o(s):o.current=s}}catch(f){ht(n,i,f)}}function hi(n,i){var o=n.ref,s=n.refCleanup;if(o!==null)if(typeof s=="function")try{s()}catch(f){ht(n,i,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){ht(n,i,f)}else o.current=null}function Vv(n){var i=n.type,o=n.memoizedProps,s=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(f){ht(n,n.return,f)}}function Uh(n,i,o){try{var s=n.stateNode;CN(s,n.type,o,i),s[vn]=i}catch(f){ht(n,n.return,f)}}function Gv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&gr(n.type)||n.tag===4}function Ih(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Gv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&gr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Hh(n,i,o){var s=n.tag;if(s===5||s===6)n=n.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(n),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=ji));else if(s!==4&&(s===27&&gr(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(Hh(n,i,o),n=n.sibling;n!==null;)Hh(n,i,o),n=n.sibling}function lu(n,i,o){var s=n.tag;if(s===5||s===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(s!==4&&(s===27&&gr(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(lu(n,i,o),n=n.sibling;n!==null;)lu(n,i,o),n=n.sibling}function Kv(n){var i=n.stateNode,o=n.memoizedProps;try{for(var s=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);rn(i,s,o),i[Nt]=n,i[vn]=o}catch(h){ht(n,n.return,h)}}var zi=!1,qt=!1,Bh=!1,Yv=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function uN(n,i){if(n=n.containerInfo,sm=Au,n=o0(n),Df(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var f=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,S=-1,U=-1,W=0,se=0,me=n,J=null;t:for(;;){for(var re;me!==o||f!==0&&me.nodeType!==3||(S=y+f),me!==h||s!==0&&me.nodeType!==3||(U=y+s),me.nodeType===3&&(y+=me.nodeValue.length),(re=me.firstChild)!==null;)J=me,me=re;for(;;){if(me===n)break t;if(J===o&&++W===f&&(S=y),J===h&&++se===s&&(U=y),(re=me.nextSibling)!==null)break;me=J,J=me.parentNode}me=re}o=S===-1||U===-1?null:{start:S,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(cm={focusedElem:n,selectionRange:o},Au=!1,Qt=i;Qt!==null;)if(i=Qt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Qt=n;else for(;Qt!==null;){switch(i=Qt,h=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)f=n[o],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,o=i,f=h.memoizedProps,h=h.memoizedState,s=o.stateNode;try{var Ne=ya(o.type,f);n=s.getSnapshotBeforeUpdate(Ne,h),s.__reactInternalSnapshotBeforeUpdate=n}catch(Ue){ht(o,o.return,Ue)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)fm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":fm(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,Qt=n;break}Qt=i.return}}function Qv(n,i,o){var s=o.flags;switch(o.tag){case 0:case 11:case 15:Ui(n,o),s&4&&es(5,o);break;case 1:if(Ui(n,o),s&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(y){ht(o,o.return,y)}else{var f=ya(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(y){ht(o,o.return,y)}}s&64&&Fv(o),s&512&&ts(o,o.return);break;case 3:if(Ui(n,o),s&64&&(n=o.updateQueue,n!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{T0(n,i)}catch(y){ht(o,o.return,y)}}break;case 27:i===null&&s&4&&Kv(o);case 26:case 5:Ui(n,o),i===null&&s&4&&Vv(o),s&512&&ts(o,o.return);break;case 12:Ui(n,o);break;case 31:Ui(n,o),s&4&&Wv(n,o);break;case 13:Ui(n,o),s&4&&Jv(n,o),s&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=vN.bind(null,o),IN(n,o))));break;case 22:if(s=o.memoizedState!==null||zi,!s){i=i!==null&&i.memoizedState!==null||qt,f=zi;var h=qt;zi=s,(qt=i)&&!h?Ii(n,o,(o.subtreeFlags&8772)!==0):Ui(n,o),zi=f,qt=h}break;case 30:break;default:Ui(n,o)}}function Xv(n){var i=n.alternate;i!==null&&(n.alternate=null,Xv(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&yf(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var _t=null,wn=!1;function $i(n,i,o){for(o=o.child;o!==null;)Zv(n,i,o),o=o.sibling}function Zv(n,i,o){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(Xe,o)}catch{}switch(o.tag){case 26:qt||hi(o,i),$i(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:qt||hi(o,i);var s=_t,f=wn;gr(o.type)&&(_t=o.stateNode,wn=!1),$i(n,i,o),us(o.stateNode),_t=s,wn=f;break;case 5:qt||hi(o,i);case 6:if(s=_t,f=wn,_t=null,$i(n,i,o),_t=s,wn=f,_t!==null)if(wn)try{(_t.nodeType===9?_t.body:_t.nodeName==="HTML"?_t.ownerDocument.body:_t).removeChild(o.stateNode)}catch(h){ht(o,i,h)}else try{_t.removeChild(o.stateNode)}catch(h){ht(o,i,h)}break;case 18:_t!==null&&(wn?(n=_t,F1(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Do(n)):F1(_t,o.stateNode));break;case 4:s=_t,f=wn,_t=o.stateNode.containerInfo,wn=!0,$i(n,i,o),_t=s,wn=f;break;case 0:case 11:case 14:case 15:cr(2,o,i),qt||cr(4,o,i),$i(n,i,o);break;case 1:qt||(hi(o,i),s=o.stateNode,typeof s.componentWillUnmount=="function"&&Pv(o,i,s)),$i(n,i,o);break;case 21:$i(n,i,o);break;case 22:qt=(s=qt)||o.memoizedState!==null,$i(n,i,o),qt=s;break;default:$i(n,i,o)}}function Wv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Do(n)}catch(o){ht(i,i.return,o)}}}function Jv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Do(n)}catch(o){ht(i,i.return,o)}}function dN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Yv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Yv),i;default:throw Error(a(435,n.tag))}}function su(n,i){var o=dN(n);i.forEach(function(s){if(!o.has(s)){o.add(s);var f=xN.bind(null,n,s);s.then(f,f)}})}function kn(n,i){var o=i.deletions;if(o!==null)for(var s=0;s<o.length;s++){var f=o[s],h=n,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(gr(S.type)){_t=S.stateNode,wn=!1;break e}break;case 5:_t=S.stateNode,wn=!1;break e;case 3:case 4:_t=S.stateNode.containerInfo,wn=!0;break e}S=S.return}if(_t===null)throw Error(a(160));Zv(h,y,f),_t=null,wn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)e1(i,n),i=i.sibling}var ai=null;function e1(n,i){var o=n.alternate,s=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:kn(i,n),Sn(n),s&4&&(cr(3,n,n.return),es(3,n),cr(5,n,n.return));break;case 1:kn(i,n),Sn(n),s&512&&(qt||o===null||hi(o,o.return)),s&64&&zi&&(n=n.updateQueue,n!==null&&(s=n.callbacks,s!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?s:o.concat(s))));break;case 26:var f=ai;if(kn(i,n),Sn(n),s&512&&(qt||o===null||hi(o,o.return)),s&4){var h=o!==null?o.memoizedState:null;if(s=n.memoizedState,o===null)if(s===null)if(n.stateNode===null){e:{s=n.type,o=n.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Al]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),rn(h,s,o),h[Nt]=n,Yt(h),s=h;break e;case"link":var y=ex("link","href",f).get(s+(o.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&h.getAttribute("rel")===(o.rel==null?null:o.rel)&&h.getAttribute("title")===(o.title==null?null:o.title)&&h.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){y.splice(S,1);break t}}h=f.createElement(s),rn(h,s,o),f.head.appendChild(h);break;case"meta":if(y=ex("meta","content",f).get(s+(o.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(o.content==null?null:""+o.content)&&h.getAttribute("name")===(o.name==null?null:o.name)&&h.getAttribute("property")===(o.property==null?null:o.property)&&h.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&h.getAttribute("charset")===(o.charSet==null?null:o.charSet)){y.splice(S,1);break t}}h=f.createElement(s),rn(h,s,o),f.head.appendChild(h);break;default:throw Error(a(468,s))}h[Nt]=n,Yt(h),s=h}n.stateNode=s}else tx(f,n.type,n.stateNode);else n.stateNode=J1(f,s,n.memoizedProps);else h!==s?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,s===null?tx(f,n.type,n.stateNode):J1(f,s,n.memoizedProps)):s===null&&n.stateNode!==null&&Uh(n,n.memoizedProps,o.memoizedProps)}break;case 27:kn(i,n),Sn(n),s&512&&(qt||o===null||hi(o,o.return)),o!==null&&s&4&&Uh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(kn(i,n),Sn(n),s&512&&(qt||o===null||hi(o,o.return)),n.flags&32){f=n.stateNode;try{no(f,"")}catch(Ne){ht(n,n.return,Ne)}}s&4&&n.stateNode!=null&&(f=n.memoizedProps,Uh(n,f,o!==null?o.memoizedProps:f)),s&1024&&(Bh=!0);break;case 6:if(kn(i,n),Sn(n),s&4){if(n.stateNode===null)throw Error(a(162));s=n.memoizedProps,o=n.stateNode;try{o.nodeValue=s}catch(Ne){ht(n,n.return,Ne)}}break;case 3:if(Eu=null,f=ai,ai=ku(i.containerInfo),kn(i,n),ai=f,Sn(n),s&4&&o!==null&&o.memoizedState.isDehydrated)try{Do(i.containerInfo)}catch(Ne){ht(n,n.return,Ne)}Bh&&(Bh=!1,t1(n));break;case 4:s=ai,ai=ku(n.stateNode.containerInfo),kn(i,n),Sn(n),ai=s;break;case 12:kn(i,n),Sn(n);break;case 31:kn(i,n),Sn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 13:kn(i,n),Sn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(uu=Ut()),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 22:f=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,W=zi,se=qt;if(zi=W||f,qt=se||U,kn(i,n),qt=se,zi=W,Sn(n),s&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||U||zi||qt||ba(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){U=o=i;try{if(h=U.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=U.stateNode;var me=U.memoizedProps.style,J=me!=null&&me.hasOwnProperty("display")?me.display:null;S.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Ne){ht(U,U.return,Ne)}}}else if(i.tag===6){if(o===null){U=i;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(Ne){ht(U,U.return,Ne)}}}else if(i.tag===18){if(o===null){U=i;try{var re=U.stateNode;f?P1(re,!0):P1(U.stateNode,!1)}catch(Ne){ht(U,U.return,Ne)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}s&4&&(s=n.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,su(n,o))));break;case 19:kn(i,n),Sn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,su(n,s)));break;case 30:break;case 21:break;default:kn(i,n),Sn(n)}}function Sn(n){var i=n.flags;if(i&2){try{for(var o,s=n.return;s!==null;){if(Gv(s)){o=s;break}s=s.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var f=o.stateNode,h=Ih(n);lu(n,h,f);break;case 5:var y=o.stateNode;o.flags&32&&(no(y,""),o.flags&=-33);var S=Ih(n);lu(n,S,y);break;case 3:case 4:var U=o.stateNode.containerInfo,W=Ih(n);Hh(n,W,U);break;default:throw Error(a(161))}}catch(se){ht(n,n.return,se)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function t1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;t1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Ui(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Qv(n,i.alternate,i),i=i.sibling}function ba(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:cr(4,i,i.return),ba(i);break;case 1:hi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&Pv(i,i.return,o),ba(i);break;case 27:us(i.stateNode);case 26:case 5:hi(i,i.return),ba(i);break;case 22:i.memoizedState===null&&ba(i);break;case 30:ba(i);break;default:ba(i)}n=n.sibling}}function Ii(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var s=i.alternate,f=n,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:Ii(f,h,o),es(4,h);break;case 1:if(Ii(f,h,o),s=h,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(W){ht(s,s.return,W)}if(s=h,f=s.updateQueue,f!==null){var S=s.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)R0(U[f],S)}catch(W){ht(s,s.return,W)}}o&&y&64&&Fv(h),ts(h,h.return);break;case 27:Kv(h);case 26:case 5:Ii(f,h,o),o&&s===null&&y&4&&Vv(h),ts(h,h.return);break;case 12:Ii(f,h,o);break;case 31:Ii(f,h,o),o&&y&4&&Wv(f,h);break;case 13:Ii(f,h,o),o&&y&4&&Jv(f,h);break;case 22:h.memoizedState===null&&Ii(f,h,o),ts(h,h.return);break;case 30:break;default:Ii(f,h,o)}i=i.sibling}}function qh(n,i){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Bl(o))}function Fh(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Bl(n))}function oi(n,i,o,s){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)n1(n,i,o,s),i=i.sibling}function n1(n,i,o,s){var f=i.flags;switch(i.tag){case 0:case 11:case 15:oi(n,i,o,s),f&2048&&es(9,i);break;case 1:oi(n,i,o,s);break;case 3:oi(n,i,o,s),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Bl(n)));break;case 12:if(f&2048){oi(n,i,o,s),n=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ht(i,i.return,U)}}else oi(n,i,o,s);break;case 31:oi(n,i,o,s);break;case 13:oi(n,i,o,s);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?oi(n,i,o,s):ns(n,i):h._visibility&2?oi(n,i,o,s):(h._visibility|=2,So(n,i,o,s,(i.subtreeFlags&10256)!==0||!1)),f&2048&&qh(y,i);break;case 24:oi(n,i,o,s),f&2048&&Fh(i.alternate,i);break;default:oi(n,i,o,s)}}function So(n,i,o,s,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=n,y=i,S=o,U=s,W=y.flags;switch(y.tag){case 0:case 11:case 15:So(h,y,S,U,f),es(8,y);break;case 23:break;case 22:var se=y.stateNode;y.memoizedState!==null?se._visibility&2?So(h,y,S,U,f):ns(h,y):(se._visibility|=2,So(h,y,S,U,f)),f&&W&2048&&qh(y.alternate,y);break;case 24:So(h,y,S,U,f),f&&W&2048&&Fh(y.alternate,y);break;default:So(h,y,S,U,f)}i=i.sibling}}function ns(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,s=i,f=s.flags;switch(s.tag){case 22:ns(o,s),f&2048&&qh(s.alternate,s);break;case 24:ns(o,s),f&2048&&Fh(s.alternate,s);break;default:ns(o,s)}i=i.sibling}}var is=8192;function Eo(n,i,o){if(n.subtreeFlags&is)for(n=n.child;n!==null;)i1(n,i,o),n=n.sibling}function i1(n,i,o){switch(n.tag){case 26:Eo(n,i,o),n.flags&is&&n.memoizedState!==null&&ZN(o,ai,n.memoizedState,n.memoizedProps);break;case 5:Eo(n,i,o);break;case 3:case 4:var s=ai;ai=ku(n.stateNode.containerInfo),Eo(n,i,o),ai=s;break;case 22:n.memoizedState===null&&(s=n.alternate,s!==null&&s.memoizedState!==null?(s=is,is=16777216,Eo(n,i,o),is=s):Eo(n,i,o));break;default:Eo(n,i,o)}}function r1(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function rs(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}r1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)a1(n),n=n.sibling}function a1(n){switch(n.tag){case 0:case 11:case 15:rs(n),n.flags&2048&&cr(9,n,n.return);break;case 3:rs(n);break;case 12:rs(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,cu(n)):rs(n);break;default:rs(n)}}function cu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}r1(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:cr(8,i,i.return),cu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,cu(i));break;default:cu(i)}n=n.sibling}}function o1(n,i){for(;Qt!==null;){var o=Qt;switch(o.tag){case 0:case 11:case 15:cr(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var s=o.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Bl(o.memoizedState.cache)}if(s=o.child,s!==null)s.return=o,Qt=s;else e:for(o=n;Qt!==null;){s=Qt;var f=s.sibling,h=s.return;if(Xv(s),s===o){Qt=null;break e}if(f!==null){f.return=h,Qt=f;break e}Qt=h}}}var fN={getCacheForType:function(n){var i=tn(It),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return tn(It).controller.signal}},hN=typeof WeakMap=="function"?WeakMap:Map,ct=0,bt=null,Ye=null,Ze=0,ft=0,Dn=null,ur=!1,_o=!1,Ph=!1,Hi=0,Tt=0,dr=0,va=0,Vh=0,Ln=0,jo=0,as=null,En=null,Gh=!1,uu=0,l1=0,du=1/0,fu=null,fr=null,Pt=0,hr=null,Oo=null,Bi=0,Kh=0,Yh=null,s1=null,os=0,Qh=null;function zn(){return(ct&2)!==0&&Ze!==0?Ze&-Ze:M.T!==null?tm():Ct()}function c1(){if(Ln===0)if((Ze&536870912)===0||Je){var n=Te;Te<<=1,(Te&3932160)===0&&(Te=262144),Ln=n}else Ln=536870912;return n=Rn.current,n!==null&&(n.flags|=32),Ln}function _n(n,i,o){(n===bt&&(ft===2||ft===9)||n.cancelPendingCommit!==null)&&(Ao(n,0),mr(n,Ze,Ln,!1)),At(n,o),((ct&2)===0||n!==bt)&&(n===bt&&((ct&2)===0&&(va|=o),Tt===4&&mr(n,Ze,Ln,!1)),mi(n))}function u1(n,i,o){if((ct&6)!==0)throw Error(a(327));var s=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Et(n,i),f=s?gN(n,i):Zh(n,i,!0),h=s;do{if(f===0){_o&&!s&&mr(n,i,0,!1);break}else{if(o=n.current.alternate,h&&!mN(o)){f=Zh(n,i,!1),h=!1;continue}if(f===2){if(h=i,n.errorRecoveryDisabledLanes&h)var y=0;else y=n.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=n;f=as;var U=S.current.memoizedState.isDehydrated;if(U&&(Ao(S,y).flags|=256),y=Zh(S,y,!1),y!==2){if(Ph&&!U){S.errorRecoveryDisabledLanes|=h,va|=h,f=4;break e}h=En,En=f,h!==null&&(En===null?En=h:En.push.apply(En,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){Ao(n,0),mr(n,i,0,!0);break}e:{switch(s=n,h=f,h){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:mr(s,i,Ln,!ur);break e;case 2:En=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(f=uu+300-Ut(),10<f)){if(mr(s,i,Ln,!ur),St(s,0,!0)!==0)break e;Bi=i,s.timeoutHandle=B1(d1.bind(null,s,o,En,fu,Gh,i,Ln,va,jo,ur,h,"Throttled",-0,0),f);break e}d1(s,o,En,fu,Gh,i,Ln,va,jo,ur,h,null,-0,0)}}break}while(!0);mi(n)}function d1(n,i,o,s,f,h,y,S,U,W,se,me,J,re){if(n.timeoutHandle=-1,me=i.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ji},i1(i,h,me);var Ne=(h&62914560)===h?uu-Ut():(h&4194048)===h?l1-Ut():0;if(Ne=WN(me,Ne),Ne!==null){Bi=h,n.cancelPendingCommit=Ne(v1.bind(null,n,i,h,o,s,f,y,S,U,se,me,null,J,re)),mr(n,h,y,!W);return}}v1(n,i,h,o,s,f,y,S,U)}function mN(n){for(var i=n;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var s=0;s<o.length;s++){var f=o[s],h=f.getSnapshot;f=f.value;try{if(!Mn(h(),f))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function mr(n,i,o,s){i&=~Vh,i&=~va,n.suspendedLanes|=i,n.pingedLanes&=~i,s&&(n.warmLanes|=i),s=n.expirationTimes;for(var f=i;0<f;){var h=31-kt(f),y=1<<h;s[h]=-1,f&=~y}o!==0&&Wi(n,o,i)}function hu(){return(ct&6)===0?(ls(0),!1):!0}function Xh(){if(Ye!==null){if(ft===0)var n=Ye.return;else n=Ye,Mi=ua=null,fh(n),bo=null,Fl=0,n=Ye;for(;n!==null;)qv(n.alternate,n),n=n.return;Ye=null}}function Ao(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,DN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Bi=0,Xh(),bt=n,Ye=o=Ai(n.current,null),Ze=i,ft=0,Dn=null,ur=!1,_o=Et(n,i),Ph=!1,jo=Ln=Vh=va=dr=Tt=0,En=as=null,Gh=!1,(i&8)!==0&&(i|=i&32);var s=n.entangledLanes;if(s!==0)for(n=n.entanglements,s&=i;0<s;){var f=31-kt(s),h=1<<f;i|=n[f],s&=~h}return Hi=i,Dc(),o}function f1(n,i){Fe=null,M.H=Zl,i===yo||i===qc?(i=A0(),ft=3):i===eh?(i=A0(),ft=4):ft=i===Ah?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Ye===null&&(Tt=1,nu(n,Kn(i,n.current)))}function h1(){var n=Rn.current;return n===null?!0:(Ze&4194048)===Ze?Zn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?n===Zn:!1}function m1(){var n=M.H;return M.H=Zl,n===null?Zl:n}function p1(){var n=M.A;return M.A=fN,n}function mu(){Tt=4,ur||(Ze&4194048)!==Ze&&Rn.current!==null||(_o=!0),(dr&134217727)===0&&(va&134217727)===0||bt===null||mr(bt,Ze,Ln,!1)}function Zh(n,i,o){var s=ct;ct|=2;var f=m1(),h=p1();(bt!==n||Ze!==i)&&(fu=null,Ao(n,i)),i=!1;var y=Tt;e:do try{if(ft!==0&&Ye!==null){var S=Ye,U=Dn;switch(ft){case 8:Xh(),y=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(i=!0);var W=ft;if(ft=0,Dn=null,No(n,S,U,W),o&&_o){y=0;break e}break;default:W=ft,ft=0,Dn=null,No(n,S,U,W)}}pN(),y=Tt;break}catch(se){f1(n,se)}while(!0);return i&&n.shellSuspendCounter++,Mi=ua=null,ct=s,M.H=f,M.A=h,Ye===null&&(bt=null,Ze=0,Dc()),y}function pN(){for(;Ye!==null;)g1(Ye)}function gN(n,i){var o=ct;ct|=2;var s=m1(),f=p1();bt!==n||Ze!==i?(fu=null,du=Ut()+500,Ao(n,i)):_o=Et(n,i);e:do try{if(ft!==0&&Ye!==null){i=Ye;var h=Dn;t:switch(ft){case 1:ft=0,Dn=null,No(n,i,h,1);break;case 2:case 9:if(j0(h)){ft=0,Dn=null,y1(i);break}i=function(){ft!==2&&ft!==9||bt!==n||(ft=7),mi(n)},h.then(i,i);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:j0(h)?(ft=0,Dn=null,y1(i)):(ft=0,Dn=null,No(n,i,h,7));break;case 5:var y=null;switch(Ye.tag){case 26:y=Ye.memoizedState;case 5:case 27:var S=Ye;if(y?nx(y):S.stateNode.complete){ft=0,Dn=null;var U=S.sibling;if(U!==null)Ye=U;else{var W=S.return;W!==null?(Ye=W,pu(W)):Ye=null}break t}}ft=0,Dn=null,No(n,i,h,5);break;case 6:ft=0,Dn=null,No(n,i,h,6);break;case 8:Xh(),Tt=6;break e;default:throw Error(a(462))}}yN();break}catch(se){f1(n,se)}while(!0);return Mi=ua=null,M.H=s,M.A=f,ct=o,Ye!==null?0:(bt=null,Ze=0,Dc(),Tt)}function yN(){for(;Ye!==null&&!ui();)g1(Ye)}function g1(n){var i=Hv(n.alternate,n,Hi);n.memoizedProps=n.pendingProps,i===null?pu(n):Ye=i}function y1(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Dv(o,i,i.pendingProps,i.type,void 0,Ze);break;case 11:i=Dv(o,i,i.pendingProps,i.type.render,i.ref,Ze);break;case 5:fh(i);default:qv(o,i),i=Ye=p0(i,Hi),i=Hv(o,i,Hi)}n.memoizedProps=n.pendingProps,i===null?pu(n):Ye=i}function No(n,i,o,s){Mi=ua=null,fh(i),bo=null,Fl=0;var f=i.return;try{if(aN(n,f,i,o,Ze)){Tt=1,nu(n,Kn(o,n.current)),Ye=null;return}}catch(h){if(f!==null)throw Ye=f,h;Tt=1,nu(n,Kn(o,n.current)),Ye=null;return}i.flags&32768?(Je||s===1?n=!0:_o||(Ze&536870912)!==0?n=!1:(ur=n=!0,(s===2||s===9||s===3||s===6)&&(s=Rn.current,s!==null&&s.tag===13&&(s.flags|=16384))),b1(i,n)):pu(i)}function pu(n){var i=n;do{if((i.flags&32768)!==0){b1(i,ur);return}n=i.return;var o=sN(i.alternate,i,Hi);if(o!==null){Ye=o;return}if(i=i.sibling,i!==null){Ye=i;return}Ye=i=n}while(i!==null);Tt===0&&(Tt=5)}function b1(n,i){do{var o=cN(n.alternate,n);if(o!==null){o.flags&=32767,Ye=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){Ye=n;return}Ye=n=o}while(n!==null);Tt=6,Ye=null}function v1(n,i,o,s,f,h,y,S,U){n.cancelPendingCommit=null;do gu();while(Pt!==0);if((ct&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(h=i.lanes|i.childLanes,h|=If,qn(n,o,h,y,S,U),n===bt&&(Ye=bt=null,Ze=0),Oo=i,hr=n,Bi=o,Kh=h,Yh=f,s1=s,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,wN(we,function(){return E1(),null})):(n.callbackNode=null,n.callbackPriority=0),s=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||s){s=M.T,M.T=null,f=V.p,V.p=2,y=ct,ct|=4;try{uN(n,i,o)}finally{ct=y,V.p=f,M.T=s}}Pt=1,x1(),w1(),k1()}}function x1(){if(Pt===1){Pt=0;var n=hr,i=Oo,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=ct;ct|=4;try{e1(i,n);var h=cm,y=o0(n.containerInfo),S=h.focusedElem,U=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&a0(S.ownerDocument.documentElement,S)){if(U!==null&&Df(S)){var W=U.start,se=U.end;if(se===void 0&&(se=W),"selectionStart"in S)S.selectionStart=W,S.selectionEnd=Math.min(se,S.value.length);else{var me=S.ownerDocument||document,J=me&&me.defaultView||window;if(J.getSelection){var re=J.getSelection(),Ne=S.textContent.length,Ue=Math.min(U.start,Ne),gt=U.end===void 0?Ue:Math.min(U.end,Ne);!re.extend&&Ue>gt&&(y=gt,gt=Ue,Ue=y);var G=r0(S,Ue),B=r0(S,gt);if(G&&B&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==B.node||re.focusOffset!==B.offset)){var Z=me.createRange();Z.setStart(G.node,G.offset),re.removeAllRanges(),Ue>gt?(re.addRange(Z),re.extend(B.node,B.offset)):(Z.setEnd(B.node,B.offset),re.addRange(Z))}}}}for(me=[],re=S;re=re.parentNode;)re.nodeType===1&&me.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<me.length;S++){var fe=me[S];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Au=!!sm,cm=sm=null}finally{ct=f,V.p=s,M.T=o}}n.current=i,Pt=2}}function w1(){if(Pt===2){Pt=0;var n=hr,i=Oo,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=ct;ct|=4;try{Qv(n,i.alternate,i)}finally{ct=f,V.p=s,M.T=o}}Pt=3}}function k1(){if(Pt===4||Pt===3){Pt=0,Si();var n=hr,i=Oo,o=Bi,s=s1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Pt=5:(Pt=0,Oo=hr=null,S1(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(fr=null),Pe(o),i=i.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(Xe,i,void 0,(i.current.flags&128)===128)}catch{}if(s!==null){i=M.T,f=V.p,V.p=2,M.T=null;try{for(var h=n.onRecoverableError,y=0;y<s.length;y++){var S=s[y];h(S.value,{componentStack:S.stack})}}finally{M.T=i,V.p=f}}(Bi&3)!==0&&gu(),mi(n),f=n.pendingLanes,(o&261930)!==0&&(f&42)!==0?n===Qh?os++:(os=0,Qh=n):os=0,ls(0)}}function S1(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Bl(i)))}function gu(){return x1(),w1(),k1(),E1()}function E1(){if(Pt!==5)return!1;var n=hr,i=Kh;Kh=0;var o=Pe(Bi),s=M.T,f=V.p;try{V.p=32>o?32:o,M.T=null,o=Yh,Yh=null;var h=hr,y=Bi;if(Pt=0,Oo=hr=null,Bi=0,(ct&6)!==0)throw Error(a(331));var S=ct;if(ct|=4,a1(h.current),n1(h,h.current,y,o),ct=S,ls(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(Xe,h)}catch{}return!0}finally{V.p=f,M.T=s,S1(n,i)}}function _1(n,i,o){i=Kn(o,i),i=Oh(n.stateNode,i,2),n=or(n,i,2),n!==null&&(At(n,2),mi(n))}function ht(n,i,o){if(n.tag===3)_1(n,n,o);else for(;i!==null;){if(i.tag===3){_1(i,n,o);break}else if(i.tag===1){var s=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(fr===null||!fr.has(s))){n=Kn(o,n),o=jv(2),s=or(i,o,2),s!==null&&(Ov(o,s,i,n),At(s,2),mi(s));break}}i=i.return}}function Wh(n,i,o){var s=n.pingCache;if(s===null){s=n.pingCache=new hN;var f=new Set;s.set(i,f)}else f=s.get(i),f===void 0&&(f=new Set,s.set(i,f));f.has(o)||(Ph=!0,f.add(o),n=bN.bind(null,n,i,o),i.then(n,n))}function bN(n,i,o){var s=n.pingCache;s!==null&&s.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,bt===n&&(Ze&o)===o&&(Tt===4||Tt===3&&(Ze&62914560)===Ze&&300>Ut()-uu?(ct&2)===0&&Ao(n,0):Vh|=o,jo===Ze&&(jo=0)),mi(n)}function j1(n,i){i===0&&(i=cn()),n=la(n,i),n!==null&&(At(n,i),mi(n))}function vN(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),j1(n,o)}function xN(n,i){var o=0;switch(n.tag){case 31:case 13:var s=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:s=n.stateNode;break;case 22:s=n.stateNode._retryCache;break;default:throw Error(a(314))}s!==null&&s.delete(i),j1(n,o)}function wN(n,i){return ut(n,i)}var yu=null,Mo=null,Jh=!1,bu=!1,em=!1,pr=0;function mi(n){n!==Mo&&n.next===null&&(Mo===null?yu=Mo=n:Mo=Mo.next=n),bu=!0,Jh||(Jh=!0,SN())}function ls(n,i){if(!em&&bu){em=!0;do for(var o=!1,s=yu;s!==null;){if(n!==0){var f=s.pendingLanes;if(f===0)var h=0;else{var y=s.suspendedLanes,S=s.pingedLanes;h=(1<<31-kt(42|n)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,M1(s,h))}else h=Ze,h=St(s,s===bt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Et(s,h)||(o=!0,M1(s,h));s=s.next}while(o);em=!1}}function kN(){O1()}function O1(){bu=Jh=!1;var n=0;pr!==0&&TN()&&(n=pr);for(var i=Ut(),o=null,s=yu;s!==null;){var f=s.next,h=A1(s,i);h===0?(s.next=null,o===null?yu=f:o.next=f,f===null&&(Mo=o)):(o=s,(n!==0||(h&3)!==0)&&(bu=!0)),s=f}Pt!==0&&Pt!==5||ls(n),pr!==0&&(pr=0)}function A1(n,i){for(var o=n.suspendedLanes,s=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var y=31-kt(h),S=1<<y,U=f[y];U===-1?((S&o)===0||(S&s)!==0)&&(f[y]=Kt(S,i)):U<=i&&(n.expiredLanes|=S),h&=~S}if(i=bt,o=Ze,o=St(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s=n.callbackNode,o===0||n===i&&(ft===2||ft===9)||n.cancelPendingCommit!==null)return s!==null&&s!==null&&ni(s),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Et(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(s!==null&&ni(s),Pe(o)){case 2:case 8:o=Jt;break;case 32:o=we;break;case 268435456:o=Ge;break;default:o=we}return s=N1.bind(null,n),o=ut(o,s),n.callbackPriority=i,n.callbackNode=o,i}return s!==null&&s!==null&&ni(s),n.callbackPriority=2,n.callbackNode=null,2}function N1(n,i){if(Pt!==0&&Pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(gu()&&n.callbackNode!==o)return null;var s=Ze;return s=St(n,n===bt?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s===0?null:(u1(n,s,i),A1(n,Ut()),n.callbackNode!=null&&n.callbackNode===o?N1.bind(null,n):null)}function M1(n,i){if(gu())return null;u1(n,i,!0)}function SN(){LN(function(){(ct&6)!==0?ut(sn,kN):O1()})}function tm(){if(pr===0){var n=po;n===0&&(n=je,je<<=1,(je&261888)===0&&(je=256)),pr=n}return pr}function C1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:jc(""+n)}function R1(n,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,n.id&&o.setAttribute("form",n.id),i.parentNode.insertBefore(o,i),n=new FormData(n),o.parentNode.removeChild(o),n}function EN(n,i,o,s,f){if(i==="submit"&&o&&o.stateNode===f){var h=C1((f[vn]||null).action),y=s.submitter;y&&(i=(i=y[vn]||null)?C1(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new Mc("action","action",null,s,f);n.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(pr!==0){var U=y?R1(f,y):new FormData(f);wh(o,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(S.preventDefault(),U=y?R1(f,y):new FormData(f),wh(o,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var nm=0;nm<Uf.length;nm++){var im=Uf[nm],_N=im.toLowerCase(),jN=im[0].toUpperCase()+im.slice(1);ri(_N,"on"+jN)}ri(c0,"onAnimationEnd"),ri(u0,"onAnimationIteration"),ri(d0,"onAnimationStart"),ri("dblclick","onDoubleClick"),ri("focusin","onFocus"),ri("focusout","onBlur"),ri(qA,"onTransitionRun"),ri(FA,"onTransitionStart"),ri(PA,"onTransitionCancel"),ri(f0,"onTransitionEnd"),eo("onMouseEnter",["mouseout","mouseover"]),eo("onMouseLeave",["mouseout","mouseover"]),eo("onPointerEnter",["pointerout","pointerover"]),eo("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ss="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ON=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ss));function T1(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var s=n[o],f=s.event;s=s.listeners;e:{var h=void 0;if(i)for(var y=s.length-1;0<=y;y--){var S=s[y],U=S.instance,W=S.currentTarget;if(S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(se){Tc(se)}f.currentTarget=null,h=U}else for(y=0;y<s.length;y++){if(S=s[y],U=S.instance,W=S.currentTarget,S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(se){Tc(se)}f.currentTarget=null,h=U}}}}function Qe(n,i){var o=i[gf];o===void 0&&(o=i[gf]=new Set);var s=n+"__bubble";o.has(s)||(D1(i,n,2,!1),o.add(s))}function rm(n,i,o){var s=0;i&&(s|=4),D1(o,n,s,i)}var vu="_reactListening"+Math.random().toString(36).slice(2);function am(n){if(!n[vu]){n[vu]=!0,Ob.forEach(function(o){o!=="selectionchange"&&(ON.has(o)||rm(o,!1,n),rm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[vu]||(i[vu]=!0,rm("selectionchange",!1,i))}}function D1(n,i,o,s){switch(cx(i)){case 2:var f=tM;break;case 8:f=nM;break;default:f=xm}o=f.bind(null,i,o,n),f=void 0,!_f||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),s?f!==void 0?n.addEventListener(i,o,{capture:!0,passive:f}):n.addEventListener(i,o,!0):f!==void 0?n.addEventListener(i,o,{passive:f}):n.addEventListener(i,o,!1)}function om(n,i,o,s,f){var h=s;if((i&1)===0&&(i&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var S=s.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=s.return;y!==null;){var U=y.tag;if((U===3||U===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=Za(S),y===null)return;if(U=y.tag,U===5||U===6||U===26||U===27){s=h=y;continue e}S=S.parentNode}}s=s.return}Ib(function(){var W=h,se=Sf(o),me=[];e:{var J=h0.get(n);if(J!==void 0){var re=Mc,Ne=n;switch(n){case"keypress":if(Ac(o)===0)break e;case"keydown":case"keyup":re=xA;break;case"focusin":Ne="focus",re=Nf;break;case"focusout":Ne="blur",re=Nf;break;case"beforeblur":case"afterblur":re=Nf;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=sA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=SA;break;case c0:case u0:case d0:re=dA;break;case f0:re=_A;break;case"scroll":case"scrollend":re=oA;break;case"wheel":re=OA;break;case"copy":case"cut":case"paste":re=hA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Pb;break;case"toggle":case"beforetoggle":re=NA}var Ue=(i&4)!==0,gt=!Ue&&(n==="scroll"||n==="scrollend"),G=Ue?J!==null?J+"Capture":null:J;Ue=[];for(var B=W,Z;B!==null;){var fe=B;if(Z=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||Z===null||G===null||(fe=Ml(B,G),fe!=null&&Ue.push(cs(B,fe,Z))),gt)break;B=B.return}0<Ue.length&&(J=new re(J,Ne,null,o,se),me.push({event:J,listeners:Ue}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",J&&o!==kf&&(Ne=o.relatedTarget||o.fromElement)&&(Za(Ne)||Ne[Xa]))break e;if((re||J)&&(J=se.window===se?se:(J=se.ownerDocument)?J.defaultView||J.parentWindow:window,re?(Ne=o.relatedTarget||o.toElement,re=W,Ne=Ne?Za(Ne):null,Ne!==null&&(gt=c(Ne),Ue=Ne.tag,Ne!==gt||Ue!==5&&Ue!==27&&Ue!==6)&&(Ne=null)):(re=null,Ne=W),re!==Ne)){if(Ue=qb,fe="onMouseLeave",G="onMouseEnter",B="mouse",(n==="pointerout"||n==="pointerover")&&(Ue=Pb,fe="onPointerLeave",G="onPointerEnter",B="pointer"),gt=re==null?J:Nl(re),Z=Ne==null?J:Nl(Ne),J=new Ue(fe,B+"leave",re,o,se),J.target=gt,J.relatedTarget=Z,fe=null,Za(se)===W&&(Ue=new Ue(G,B+"enter",Ne,o,se),Ue.target=Z,Ue.relatedTarget=gt,fe=Ue),gt=fe,re&&Ne)t:{for(Ue=AN,G=re,B=Ne,Z=0,fe=G;fe;fe=Ue(fe))Z++;fe=0;for(var Le=B;Le;Le=Ue(Le))fe++;for(;0<Z-fe;)G=Ue(G),Z--;for(;0<fe-Z;)B=Ue(B),fe--;for(;Z--;){if(G===B||B!==null&&G===B.alternate){Ue=G;break t}G=Ue(G),B=Ue(B)}Ue=null}else Ue=null;re!==null&&L1(me,J,re,Ue,!1),Ne!==null&>!==null&&L1(me,gt,Ne,Ue,!0)}}e:{if(J=W?Nl(W):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var lt=Wb;else if(Xb(J))if(Jb)lt=IA;else{lt=$A;var Ce=zA}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?W&&wf(W.elementType)&&(lt=Wb):lt=UA;if(lt&&(lt=lt(n,W))){Zb(me,lt,o,se);break e}Ce&&Ce(n,J,W),n==="focusout"&&W&&J.type==="number"&&W.memoizedProps.value!=null&&xf(J,"number",J.value)}switch(Ce=W?Nl(W):window,n){case"focusin":(Xb(Ce)||Ce.contentEditable==="true")&&(oo=Ce,Lf=W,Ul=null);break;case"focusout":Ul=Lf=oo=null;break;case"mousedown":zf=!0;break;case"contextmenu":case"mouseup":case"dragend":zf=!1,l0(me,o,se);break;case"selectionchange":if(BA)break;case"keydown":case"keyup":l0(me,o,se)}var Ve;if(Cf)e:{switch(n){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else ao?Yb(n,o)&&(We="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(We="onCompositionStart");We&&(Vb&&o.locale!=="ko"&&(ao||We!=="onCompositionStart"?We==="onCompositionEnd"&&ao&&(Ve=Hb()):(Ji=se,jf="value"in Ji?Ji.value:Ji.textContent,ao=!0)),Ce=xu(W,We),0<Ce.length&&(We=new Fb(We,n,null,o,se),me.push({event:We,listeners:Ce}),Ve?We.data=Ve:(Ve=Qb(o),Ve!==null&&(We.data=Ve)))),(Ve=CA?RA(n,o):TA(n,o))&&(We=xu(W,"onBeforeInput"),0<We.length&&(Ce=new Fb("onBeforeInput","beforeinput",null,o,se),me.push({event:Ce,listeners:We}),Ce.data=Ve)),EN(me,n,W,o,se)}T1(me,i)})}function cs(n,i,o){return{instance:n,listener:i,currentTarget:o}}function xu(n,i){for(var o=i+"Capture",s=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ml(n,o),f!=null&&s.unshift(cs(n,f,h)),f=Ml(n,i),f!=null&&s.push(cs(n,f,h))),n.tag===3)return s;n=n.return}return[]}function AN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function L1(n,i,o,s,f){for(var h=i._reactName,y=[];o!==null&&o!==s;){var S=o,U=S.alternate,W=S.stateNode;if(S=S.tag,U!==null&&U===s)break;S!==5&&S!==26&&S!==27||W===null||(U=W,f?(W=Ml(o,h),W!=null&&y.unshift(cs(o,W,U))):f||(W=Ml(o,h),W!=null&&y.push(cs(o,W,U)))),o=o.return}y.length!==0&&n.push({event:i,listeners:y})}var NN=/\r\n?/g,MN=/\u0000|\uFFFD/g;function z1(n){return(typeof n=="string"?n:""+n).replace(NN,`
|
|
49
|
+
`).replace(MN,"")}function $1(n,i){return i=z1(i),z1(n)===i}function pt(n,i,o,s,f,h){switch(o){case"children":typeof s=="string"?i==="body"||i==="textarea"&&s===""||no(n,s):(typeof s=="number"||typeof s=="bigint")&&i!=="body"&&no(n,""+s);break;case"className":Ec(n,"class",s);break;case"tabIndex":Ec(n,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ec(n,o,s);break;case"style":$b(n,s,h);break;case"data":if(i!=="object"){Ec(n,"data",s);break}case"src":case"href":if(s===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=jc(""+s),n.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(o==="formAction"?(i!=="input"&&pt(n,i,"name",f.name,f,null),pt(n,i,"formEncType",f.formEncType,f,null),pt(n,i,"formMethod",f.formMethod,f,null),pt(n,i,"formTarget",f.formTarget,f,null)):(pt(n,i,"encType",f.encType,f,null),pt(n,i,"method",f.method,f,null),pt(n,i,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=jc(""+s),n.setAttribute(o,s);break;case"onClick":s!=null&&(n.onclick=ji);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=o}}break;case"multiple":n.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":n.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){n.removeAttribute("xlink:href");break}o=jc(""+s),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""+s):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":s===!0?n.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,s):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?n.setAttribute(o,s):n.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?n.removeAttribute(o):n.setAttribute(o,s);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Sc(n,"popover",s);break;case"xlinkActuate":_i(n,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":_i(n,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":_i(n,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":_i(n,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":_i(n,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":_i(n,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":_i(n,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":_i(n,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":_i(n,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Sc(n,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=rA.get(o)||o,Sc(n,o,s))}}function lm(n,i,o,s,f,h){switch(o){case"style":$b(n,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(a(60));n.innerHTML=o}}break;case"children":typeof s=="string"?no(n,s):(typeof s=="number"||typeof s=="bigint")&&no(n,""+s);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"onClick":s!=null&&(n.onclick=ji);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ab.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),i=o.slice(2,f?o.length-7:void 0),h=n[vn]||null,h=h!=null?h[o]:null,typeof h=="function"&&n.removeEventListener(i,h,f),typeof s=="function")){typeof h!="function"&&h!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,s,f);break e}o in n?n[o]=s:s===!0?n.setAttribute(o,""):Sc(n,o,s)}}}function rn(n,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var s=!1,f=!1,h;for(h in o)if(o.hasOwnProperty(h)){var y=o[h];if(y!=null)switch(h){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:pt(n,i,h,y,o,null)}}f&&pt(n,i,"srcSet",o.srcSet,o,null),s&&pt(n,i,"src",o.src,o,null);return;case"input":Qe("invalid",n);var S=h=y=f=null,U=null,W=null;for(s in o)if(o.hasOwnProperty(s)){var se=o[s];if(se!=null)switch(s){case"name":f=se;break;case"type":y=se;break;case"checked":U=se;break;case"defaultChecked":W=se;break;case"value":h=se;break;case"defaultValue":S=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:pt(n,i,s,se,o,null)}}Tb(n,h,S,U,W,y,f,!1);return;case"select":Qe("invalid",n),s=y=h=null;for(f in o)if(o.hasOwnProperty(f)&&(S=o[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":s=S;default:pt(n,i,f,S,o,null)}i=h,o=y,n.multiple=!!s,i!=null?to(n,!!s,i,!1):o!=null&&to(n,!!s,o,!0);return;case"textarea":Qe("invalid",n),h=f=s=null;for(y in o)if(o.hasOwnProperty(y)&&(S=o[y],S!=null))switch(y){case"value":s=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:pt(n,i,y,S,o,null)}Lb(n,s,f,h);return;case"option":for(U in o)if(o.hasOwnProperty(U)&&(s=o[U],s!=null))switch(U){case"selected":n.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:pt(n,i,U,s,o,null)}return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(s=0;s<ss.length;s++)Qe(ss[s],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in o)if(o.hasOwnProperty(W)&&(s=o[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:pt(n,i,W,s,o,null)}return;default:if(wf(i)){for(se in o)o.hasOwnProperty(se)&&(s=o[se],s!==void 0&&lm(n,i,se,s,o,void 0));return}}for(S in o)o.hasOwnProperty(S)&&(s=o[S],s!=null&&pt(n,i,S,s,o,null))}function CN(n,i,o,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,y=null,S=null,U=null,W=null,se=null;for(re in o){var me=o[re];if(o.hasOwnProperty(re)&&me!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":U=me;default:s.hasOwnProperty(re)||pt(n,i,re,null,s,me)}}for(var J in s){var re=s[J];if(me=o[J],s.hasOwnProperty(J)&&(re!=null||me!=null))switch(J){case"type":h=re;break;case"name":f=re;break;case"checked":W=re;break;case"defaultChecked":se=re;break;case"value":y=re;break;case"defaultValue":S=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:re!==me&&pt(n,i,J,re,s,me)}}vf(n,y,S,U,W,se,h,f);return;case"select":re=y=S=J=null;for(h in o)if(U=o[h],o.hasOwnProperty(h)&&U!=null)switch(h){case"value":break;case"multiple":re=U;default:s.hasOwnProperty(h)||pt(n,i,h,null,s,U)}for(f in s)if(h=s[f],U=o[f],s.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==U&&pt(n,i,f,h,s,U)}i=S,o=y,s=re,J!=null?to(n,!!o,J,!1):!!s!=!!o&&(i!=null?to(n,!!o,i,!0):to(n,!!o,o?[]:"",!1));return;case"textarea":re=J=null;for(S in o)if(f=o[S],o.hasOwnProperty(S)&&f!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:pt(n,i,S,null,s,f)}for(y in s)if(f=s[y],h=o[y],s.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":J=f;break;case"defaultValue":re=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==h&&pt(n,i,y,f,s,h)}Db(n,J,re);return;case"option":for(var Ne in o)if(J=o[Ne],o.hasOwnProperty(Ne)&&J!=null&&!s.hasOwnProperty(Ne))switch(Ne){case"selected":n.selected=!1;break;default:pt(n,i,Ne,null,s,J)}for(U in s)if(J=s[U],re=o[U],s.hasOwnProperty(U)&&J!==re&&(J!=null||re!=null))switch(U){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:pt(n,i,U,J,s,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ue in o)J=o[Ue],o.hasOwnProperty(Ue)&&J!=null&&!s.hasOwnProperty(Ue)&&pt(n,i,Ue,null,s,J);for(W in s)if(J=s[W],re=o[W],s.hasOwnProperty(W)&&J!==re&&(J!=null||re!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,i));break;default:pt(n,i,W,J,s,re)}return;default:if(wf(i)){for(var gt in o)J=o[gt],o.hasOwnProperty(gt)&&J!==void 0&&!s.hasOwnProperty(gt)&&lm(n,i,gt,void 0,s,J);for(se in s)J=s[se],re=o[se],!s.hasOwnProperty(se)||J===re||J===void 0&&re===void 0||lm(n,i,se,J,s,re);return}}for(var G in o)J=o[G],o.hasOwnProperty(G)&&J!=null&&!s.hasOwnProperty(G)&&pt(n,i,G,null,s,J);for(me in s)J=s[me],re=o[me],!s.hasOwnProperty(me)||J===re||J==null&&re==null||pt(n,i,me,J,s,re)}function U1(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var f=o[s],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&U1(y)){for(y=0,S=f.responseEnd,s+=1;s<o.length;s++){var U=o[s],W=U.startTime;if(W>S)break;var se=U.transferSize,me=U.initiatorType;se&&U1(me)&&(U=U.responseEnd,y+=se*(U<S?1:(S-W)/(U-W)))}if(--s,i+=8*(h+y)/(f.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var sm=null,cm=null;function wu(n){return n.nodeType===9?n:n.ownerDocument}function I1(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H1(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function um(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var dm=null;function TN(){var n=window.event;return n&&n.type==="popstate"?n===dm?!1:(dm=n,!0):(dm=null,!1)}var B1=typeof setTimeout=="function"?setTimeout:void 0,DN=typeof clearTimeout=="function"?clearTimeout:void 0,q1=typeof Promise=="function"?Promise:void 0,LN=typeof queueMicrotask=="function"?queueMicrotask:typeof q1<"u"?function(n){return q1.resolve(null).then(n).catch(zN)}:B1;function zN(n){setTimeout(function(){throw n})}function gr(n){return n==="head"}function F1(n,i){var o=i,s=0;do{var f=o.nextSibling;if(n.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(s===0){n.removeChild(f),Do(i);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")us(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,us(o);for(var h=o.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Al]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=y}}else o==="body"&&us(n.ownerDocument.body);o=f}while(o);Do(i)}function P1(n,i){var o=n;n=0;do{var s=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=s}while(o)}function fm(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":fm(o),yf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function $N(n,i,o,s){for(;n.nodeType===1;){var f=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!s&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(s){if(!n[Al])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=Wn(n.nextSibling),n===null)break}return null}function UN(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Wn(n.nextSibling),n===null))return null;return n}function V1(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Wn(n.nextSibling),n===null))return null;return n}function hm(n){return n.data==="$?"||n.data==="$~"}function mm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function IN(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var s=function(){i(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),n._reactRetry=s}}function Wn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var pm=null;function G1(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Wn(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function K1(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return n;i--}else o!=="/$"&&o!=="/&"||i++}n=n.previousSibling}return null}function Y1(n,i,o){switch(i=wu(o),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function us(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);yf(n)}var Jn=new Map,Q1=new Set;function ku(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var qi=V.d;V.d={f:HN,r:BN,D:qN,C:FN,L:PN,m:VN,X:KN,S:GN,M:YN};function HN(){var n=qi.f(),i=hu();return n||i}function BN(n){var i=Wa(n);i!==null&&i.tag===5&&i.type==="form"?fv(i):qi.r(n)}var Co=typeof document>"u"?null:document;function X1(n,i,o){var s=Co;if(s&&typeof i=="string"&&i){var f=Vn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),Q1.has(f)||(Q1.add(f),n={rel:n,crossOrigin:o,href:i},s.querySelector(f)===null&&(i=s.createElement("link"),rn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function qN(n){qi.D(n),X1("dns-prefetch",n,null)}function FN(n,i){qi.C(n,i),X1("preconnect",n,i)}function PN(n,i,o){qi.L(n,i,o);var s=Co;if(s&&n&&i){var f='link[rel="preload"][as="'+Vn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Vn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Vn(o.imageSizes)+'"]')):f+='[href="'+Vn(n)+'"]';var h=f;switch(i){case"style":h=Ro(n);break;case"script":h=To(n)}Jn.has(h)||(n=v({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),Jn.set(h,n),s.querySelector(f)!==null||i==="style"&&s.querySelector(ds(h))||i==="script"&&s.querySelector(fs(h))||(i=s.createElement("link"),rn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function VN(n,i){qi.m(n,i);var o=Co;if(o&&n){var s=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Vn(s)+'"][href="'+Vn(n)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=To(n)}if(!Jn.has(h)&&(n=v({rel:"modulepreload",href:n},i),Jn.set(h,n),o.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(fs(h)))return}s=o.createElement("link"),rn(s,"link",n),Yt(s),o.head.appendChild(s)}}}function GN(n,i,o){qi.S(n,i,o);var s=Co;if(s&&n){var f=Ja(s).hoistableStyles,h=Ro(n);i=i||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=s.querySelector(ds(h)))S.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":i},o),(o=Jn.get(h))&&gm(n,o);var U=y=s.createElement("link");Yt(U),rn(U,"link",n),U._p=new Promise(function(W,se){U.onload=W,U.onerror=se}),U.addEventListener("load",function(){S.loading|=1}),U.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Su(y,i,s)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function KN(n,i){qi.X(n,i);var o=Co;if(o&&n){var s=Ja(o).hoistableScripts,f=To(n),h=s.get(f);h||(h=o.querySelector(fs(f)),h||(n=v({src:n,async:!0},i),(i=Jn.get(f))&&ym(n,i),h=o.createElement("script"),Yt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function YN(n,i){qi.M(n,i);var o=Co;if(o&&n){var s=Ja(o).hoistableScripts,f=To(n),h=s.get(f);h||(h=o.querySelector(fs(f)),h||(n=v({src:n,async:!0,type:"module"},i),(i=Jn.get(f))&&ym(n,i),h=o.createElement("script"),Yt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function Z1(n,i,o,s){var f=(f=ce.current)?ku(f):null;if(!f)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Ro(o.href),o=Ja(f).hoistableStyles,s=o.get(i),s||(s={type:"style",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Ro(o.href);var h=Ja(f).hoistableStyles,y=h.get(n);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,y),(h=f.querySelector(ds(n)))&&!h._p&&(y.instance=h,y.state.loading=5),Jn.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Jn.set(n,o),h||QN(f,n,o,y.state))),i&&s===null)throw Error(a(528,""));return y}if(i&&s!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=To(o),o=Ja(f).hoistableScripts,s=o.get(i),s||(s={type:"script",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Ro(n){return'href="'+Vn(n)+'"'}function ds(n){return'link[rel="stylesheet"]['+n+"]"}function W1(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function QN(n,i,o,s){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?s.loading=1:(i=n.createElement("link"),s.preload=i,i.addEventListener("load",function(){return s.loading|=1}),i.addEventListener("error",function(){return s.loading|=2}),rn(i,"link",o),Yt(i),n.head.appendChild(i))}function To(n){return'[src="'+Vn(n)+'"]'}function fs(n){return"script[async]"+n}function J1(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var s=n.querySelector('style[data-href~="'+Vn(o.href)+'"]');if(s)return i.instance=s,Yt(s),s;var f=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(n.ownerDocument||n).createElement("style"),Yt(s),rn(s,"style",f),Su(s,o.precedence,n),i.instance=s;case"stylesheet":f=Ro(o.href);var h=n.querySelector(ds(f));if(h)return i.state.loading|=4,i.instance=h,Yt(h),h;s=W1(o),(f=Jn.get(f))&&gm(s,f),h=(n.ownerDocument||n).createElement("link"),Yt(h);var y=h;return y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),rn(h,"link",s),i.state.loading|=4,Su(h,o.precedence,n),i.instance=h;case"script":return h=To(o.src),(f=n.querySelector(fs(h)))?(i.instance=f,Yt(f),f):(s=o,(f=Jn.get(h))&&(s=v({},o),ym(s,f)),n=n.ownerDocument||n,f=n.createElement("script"),Yt(f),rn(f,"link",s),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(s=i.instance,i.state.loading|=4,Su(s,o.precedence,n));return i.instance}function Su(n,i,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,h=f,y=0;y<s.length;y++){var S=s[y];if(S.dataset.precedence===i)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(n,h.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(n,i.firstChild))}function gm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function ym(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Eu=null;function ex(n,i,o){if(Eu===null){var s=new Map,f=Eu=new Map;f.set(o,s)}else f=Eu,s=f.get(o),s||(s=new Map,f.set(o,s));if(s.has(n))return s;for(s.set(n,null),o=o.getElementsByTagName(n),f=0;f<o.length;f++){var h=o[f];if(!(h[Al]||h[Nt]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=n+y;var S=s.get(y);S?S.push(h):s.set(y,[h])}}return s}function tx(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function XN(n,i,o){if(o===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function nx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function ZN(n,i,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=Ro(s.href),h=i.querySelector(ds(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=_u.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=h,Yt(h);return}h=i.ownerDocument||i,s=W1(s),(f=Jn.get(f))&&gm(s,f),h=h.createElement("link"),Yt(h);var y=h;y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),rn(h,"link",s),o.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=_u.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var bm=0;function WN(n,i){return n.stylesheets&&n.count===0&&Ou(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var s=setTimeout(function(){if(n.stylesheets&&Ou(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+i);0<n.imgBytes&&bm===0&&(bm=62500*RN());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ou(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>bm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function _u(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ou(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ju=null;function Ou(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ju=new Map,i.forEach(JN,n),ju=null,_u.call(n))}function JN(n,i){if(!(i.state.loading&4)){var o=ju.get(n);if(o)var s=o.get(null);else{o=new Map,ju.set(n,o);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(o.set(y.dataset.precedence,y),s=y)}s&&o.set(null,s)}f=i.instance,y=f.getAttribute("data-precedence"),h=o.get(y)||s,h===s&&o.set(null,f),o.set(y,f),this.count++,s=_u.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var hs={$$typeof:A,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function eM(n,i,o,s,f,h,y,S,U){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=un(0),this.hiddenUpdates=un(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function ix(n,i,o,s,f,h,y,S,U,W,se,me){return n=new eM(n,i,o,y,U,W,se,me,S),i=1,h===!0&&(i|=24),h=Cn(3,null,null,i),n.current=h,h.stateNode=n,i=Zf(),i.refCount++,n.pooledCache=i,i.refCount++,h.memoizedState={element:s,isDehydrated:o,cache:i},th(h),n}function rx(n){return n?(n=co,n):co}function ax(n,i,o,s,f,h){f=rx(f),s.context===null?s.context=f:s.pendingContext=f,s=ar(i),s.payload={element:o},h=h===void 0?null:h,h!==null&&(s.callback=h),o=or(n,s,i),o!==null&&(_n(o,n,i),Vl(o,n,i))}function ox(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function vm(n,i){ox(n,i),(n=n.alternate)&&ox(n,i)}function lx(n){if(n.tag===13||n.tag===31){var i=la(n,67108864);i!==null&&_n(i,n,67108864),vm(n,67108864)}}function sx(n){if(n.tag===13||n.tag===31){var i=zn();i=Se(i);var o=la(n,i);o!==null&&_n(o,n,i),vm(n,i)}}var Au=!0;function tM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=2,xm(n,i,o,s)}finally{V.p=h,M.T=f}}function nM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=8,xm(n,i,o,s)}finally{V.p=h,M.T=f}}function xm(n,i,o,s){if(Au){var f=wm(s);if(f===null)om(n,i,s,Nu,o),ux(n,s);else if(rM(f,n,i,o,s))s.stopPropagation();else if(ux(n,s),i&4&&-1<iM.indexOf(n)){for(;f!==null;){var h=Wa(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Ie(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var U=1<<31-kt(y);S.entanglements[1]|=U,y&=~U}mi(h),(ct&6)===0&&(du=Ut()+500,ls(0))}}break;case 31:case 13:S=la(h,2),S!==null&&_n(S,h,2),hu(),vm(h,2)}if(h=wm(s),h===null&&om(n,i,s,Nu,o),h===f)break;f=h}f!==null&&s.stopPropagation()}else om(n,i,s,null,o)}}function wm(n){return n=Sf(n),km(n)}var Nu=null;function km(n){if(Nu=null,n=Za(n),n!==null){var i=c(n);if(i===null)n=null;else{var o=i.tag;if(o===13){if(n=u(i),n!==null)return n;n=null}else if(o===31){if(n=m(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Nu=n,null}function cx(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ii()){case sn:return 2;case Jt:return 8;case we:case ze:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Sm=!1,yr=null,br=null,vr=null,ms=new Map,ps=new Map,xr=[],iM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ux(n,i){switch(n){case"focusin":case"focusout":yr=null;break;case"dragenter":case"dragleave":br=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ms.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ps.delete(i.pointerId)}}function gs(n,i,o,s,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:i,domEventName:o,eventSystemFlags:s,nativeEvent:h,targetContainers:[f]},i!==null&&(i=Wa(i),i!==null&&lx(i)),n):(n.eventSystemFlags|=s,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function rM(n,i,o,s,f){switch(i){case"focusin":return yr=gs(yr,n,i,o,s,f),!0;case"dragenter":return br=gs(br,n,i,o,s,f),!0;case"mouseover":return vr=gs(vr,n,i,o,s,f),!0;case"pointerover":var h=f.pointerId;return ms.set(h,gs(ms.get(h)||null,n,i,o,s,f)),!0;case"gotpointercapture":return h=f.pointerId,ps.set(h,gs(ps.get(h)||null,n,i,o,s,f)),!0}return!1}function dx(n){var i=Za(n.target);if(i!==null){var o=c(i);if(o!==null){if(i=o.tag,i===13){if(i=u(o),i!==null){n.blockedOn=i,nt(n.priority,function(){sx(o)});return}}else if(i===31){if(i=m(o),i!==null){n.blockedOn=i,nt(n.priority,function(){sx(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Mu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=wm(n.nativeEvent);if(o===null){o=n.nativeEvent;var s=new o.constructor(o.type,o);kf=s,o.target.dispatchEvent(s),kf=null}else return i=Wa(o),i!==null&&lx(i),n.blockedOn=o,!1;i.shift()}return!0}function fx(n,i,o){Mu(n)&&o.delete(i)}function aM(){Sm=!1,yr!==null&&Mu(yr)&&(yr=null),br!==null&&Mu(br)&&(br=null),vr!==null&&Mu(vr)&&(vr=null),ms.forEach(fx),ps.forEach(fx)}function Cu(n,i){n.blockedOn===i&&(n.blockedOn=null,Sm||(Sm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,aM)))}var Ru=null;function hx(n){Ru!==n&&(Ru=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ru===n&&(Ru=null);for(var i=0;i<n.length;i+=3){var o=n[i],s=n[i+1],f=n[i+2];if(typeof s!="function"){if(km(s||o)===null)continue;break}var h=Wa(o);h!==null&&(n.splice(i,3),i-=3,wh(h,{pending:!0,data:f,method:o.method,action:s},s,f))}}))}function Do(n){function i(U){return Cu(U,n)}yr!==null&&Cu(yr,n),br!==null&&Cu(br,n),vr!==null&&Cu(vr,n),ms.forEach(i),ps.forEach(i);for(var o=0;o<xr.length;o++){var s=xr[o];s.blockedOn===n&&(s.blockedOn=null)}for(;0<xr.length&&(o=xr[0],o.blockedOn===null);)dx(o),o.blockedOn===null&&xr.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var f=o[s],h=o[s+1],y=f[vn]||null;if(typeof h=="function")y||hx(o);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[vn]||null)S=y.formAction;else if(km(f)!==null)continue}else S=y.action;typeof S=="function"?o[s+1]=S:(o.splice(s,3),s-=3),hx(o)}}}function mx(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),s||setTimeout(o,20)}function o(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Em(n){this._internalRoot=n}Tu.prototype.render=Em.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,s=zn();ax(o,s,n,i,null,null)},Tu.prototype.unmount=Em.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;ax(n.current,2,null,n,null,null),hu(),i[Xa]=null}};function Tu(n){this._internalRoot=n}Tu.prototype.unstable_scheduleHydration=function(n){if(n){var i=Ct();n={blockedOn:null,target:n,priority:i};for(var o=0;o<xr.length&&i!==0&&i<xr[o].priority;o++);xr.splice(o,0,n),o===0&&dx(n)}};var px=t.version;if(px!=="19.2.6")throw Error(a(527,px,"19.2.6"));V.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=g(i),n=n!==null?b(n):null,n=n===null?null:n.stateNode,n};var oM={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{Xe=Du.inject(oM),ot=Du}catch{}}return bs.createRoot=function(n,i){if(!l(n))throw Error(a(299));var o=!1,s="",f=kv,h=Sv,y=Ev;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=ix(n,1,!1,null,null,o,s,null,f,h,y,mx),n[Xa]=i.current,am(n),new Em(i)},bs.hydrateRoot=function(n,i,o){if(!l(n))throw Error(a(299));var s=!1,f="",h=kv,y=Sv,S=Ev,U=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(y=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),i=ix(n,1,!0,i,o??null,s,f,U,h,y,S,mx),i.context=rx(null),o=i.current,s=zn(),s=Se(s),f=ar(s),f.callback=null,or(o,f,s),o=s,i.current.lanes=o,At(i,o),mi(i),n[Xa]=i.current,am(n),new Tu(i)},bs.version="19.2.6",bs}var jx;function gM(){if(jx)return Am.exports;jx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Am.exports=pM(),Am.exports}var yM=gM();function bM(e){if(!e)return null;const t=e.split("~"),r=t[0];if(!r)return null;if(t.length===1)return{kind:"section",instanceId:r};const a=t[1];if(!a)return null;const l=t[2],c=l!==void 0?Number(l):NaN;return{kind:"slot",instanceId:r,slotId:a,...Number.isInteger(c)?{itemIndex:c}:{}}}function vM(e){if(!e)return null;if(e.kind==="section")return e.instanceId;const t=`${e.instanceId}~${e.slotId}`;return e.itemIndex!==void 0?`${t}~${e.itemIndex}`:t}function xM(e,t){const r=new URL(t).pathname,a=r.endsWith("/")?r:`${r}/`;return`${e}/`===a?"":e.startsWith(a)?e.slice(a.length):null}function wM(e,t){const[r,a,l,c,...u]=e.split("/").filter(Boolean);if(r!=="fixtures"||!a||l!=="canvas"||u.length>0)return null;const m=new URLSearchParams(t);return{fixture:decodeURIComponent(a),canvasId:c?decodeURIComponent(c):null,format:m.get("format"),selection:bM(m.get("sel"))}}function kM(e){var r;const t=e.fixtures[0];return t===void 0?null:{fixture:t.id,canvasId:((r=e.template.canvases[0])==null?void 0:r.id)??null,format:null,selection:null}}function Ox(e){const t=e.canvasId===null?"canvas":`canvas/${encodeURIComponent(e.canvasId)}`,r=`fixtures/${encodeURIComponent(e.fixture)}/${t}`,a=new URLSearchParams;e.format!==null&&a.set("format",e.format);const l=vM(e.selection);l&&a.set("sel",l);const c=a.toString();return c?`${r}?${c}`:r}function E2(e,t){var r;return((r=e.parentElement)==null?void 0:r.closest(`[${t.slotId}],[${t.slotField}]`))??null}function Ki(e,t){return!e.hasAttribute(t.slotUnselectable)}function _2(e,t,r,a){const l=[];for(const c of Array.from(e.querySelectorAll(t)))E2(c,a)===r&&l.push(c);return l}function dg(e,t,r){return _2(e,`[${r.slotItem}="${String(t)}"]`,e,r)}function Ax(e,t,r,a){var c;let l=e.closest(`[${t}]`);for(;l&&r.contains(l);){if(Ki(l,a)&&E2(l,a)===r)return l;l=((c=l.parentElement)==null?void 0:c.closest(`[${t}]`))??null}return null}const Rm=1,SM=12;function EM(e,t){return{"--we-r-top":`${e.top}px`,"--we-r-left":`${e.left}px`,"--we-r-w":`${e.width}px`,"--we-r-h":`${e.height}px`,"--we-r-off":`${t}px`}}function _M(e){const t=Rd(e);return t.width<=0||t.height<=0?!1:!jM(e,t)}function Nx(e){return e==="hidden"||e==="scroll"||e==="auto"||e==="clip"}function jM(e,t){const r=e.ownerDocument.defaultView;if(!r)return!1;let a=-1/0,l=-1/0,c=1/0,u=1/0;for(let g=e.parentElement;g;g=g.parentElement){const b=r.getComputedStyle(g),v=Nx(b.overflowX||b.overflow),k=Nx(b.overflowY||b.overflow);if(!v&&!k)continue;const w=g.getBoundingClientRect();v&&(l=Math.max(l,w.left),c=Math.min(c,w.right)),k&&(a=Math.max(a,w.top),u=Math.min(u,w.bottom))}const m=t.left+t.width<=l||t.left>=c,p=t.top+t.height<=a||t.top>=u;return m||p}function Rd(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return t;let r=1/0,a=1/0,l=-1/0,c=-1/0,u=!1;for(const m of Array.from(e.children)){const p=Rd(m);p.width<=0||p.height<=0||(u=!0,r=Math.min(r,p.top),a=Math.min(a,p.left),l=Math.max(l,p.right),c=Math.max(c,p.bottom))}return u?new DOMRect(a,r,l-a,c-r):t}function j2(e,t,r,a){if(!e)return;if(!t){Qu(e);return}const l=EM(Rd(t),r);for(const[c,u]of Object.entries(l))e.style.setProperty(c,u);a&&e.setAttribute("data-kind",a),e.setAttribute("data-active","true")}function Qu(e){e&&(e.removeAttribute("data-active"),e.removeAttribute("data-kind"))}function Mx(e,t,r,a){if(!e)return[];const l=e.ownerDocument,c=Array.from(e.querySelectorAll(".we-chrome-ring--selection")),u=e.querySelector(":scope > .we-chrome-label");for(;c.length<t.length;){const m=l.createElement("div");m.className="we-chrome-ring we-chrome-ring--selection",e.insertBefore(m,u),c.push(m)}c.forEach((m,p)=>j2(m,t[p]??null,r,a));for(const m of c.slice(Math.max(t.length,1)))m.remove();return c.slice(0,t.length)}function OM(e,t,r){if(!e)return;if(!t||!r){rp(e);return}const a=Rd(t),l=e.getAttribute("data-active")==="true",c=e.textContent!==r;e.textContent=r,e.style.setProperty("--we-l-top",`${a.top}px`),e.style.setProperty("--we-l-left",`${a.left}px`),e.style.setProperty("--we-l-indent",`${SM}px`),l&&c&&(e.removeAttribute("data-active"),e.offsetWidth),e.setAttribute("data-active","true")}function rp(e){e&&(e.removeAttribute("data-active"),e.textContent="")}function Ha(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function fg(e){const t=e.filter(r=>_M(r));return t.length>0?t:e.slice(0,1)}function O2(e,t,r){const a=Array.from(e.querySelectorAll(`[${r.slotId}="${Ha(t)}"]`)).filter(l=>Ki(l,r));return fg(a)}function AM(e,t,r){if(!t||t.kind!=="slot"||t.item_index==null)return[];const a=[];for(const l of e)a.push(...dg(l,t.item_index,r).filter(c=>Ki(c,r)));return fg(a)}function A2(e,t,r){if(!t)return[];const a=e.querySelector(`[${r.sectionInstanceId}="${Ha(t.instance_id)}"]`);if(!a)return[];if(t.kind==="section")return[a];const l=O2(a,t.slot_id,r);if(l.length===0)return[];if(t.item_index!=null||t.field_name){const c=t.field_name?`[${r.slotField}="${Ha(t.field_name)}"]`:null,u=[];for(const m of l){let p=[m];if(!(t.item_index!=null&&(p=dg(m,t.item_index,r).filter(g=>Ki(g,r)),p.length===0)))for(const g of p)if(c){const b=_2(g,c,m,r).filter(v=>Ki(v,r));if(b.length>0){u.push(...b);continue}g!==m&&u.push(g)}else u.push(g)}if(u.length>0)return fg(u)}return l.map(c=>{const u=c.closest(`[${r.slotGroup}]`);return u&&Ki(u,r)?u:c})}function NM(e,t,r){return A2(e,t,r)[0]??null}const Cx="we-enh-shield",Rx="we-enh-shield--item",Ea="data-we-live";function MM(e,t,r){if(!t||t.kind!=="slot"||t.item_index==null)return[];const a=[];for(const l of N2(e,t,r))a.push(...dg(l,t.item_index,r).filter(c=>Ki(c,r)));return a}function N2(e,t,r){if(!t||t.kind!=="slot")return[];const a=e.querySelector(`[${r.sectionInstanceId}="${Ha(t.instance_id)}"]`);return a?Array.from(a.querySelectorAll(`[${r.slotId}="${Ha(t.slot_id)}"]`)):[]}function CM(e,t,r){if(e.querySelectorAll(`[${Ea}]`).forEach(l=>l.removeAttribute(Ea)),!t)return;const a=e.querySelector(`[${r.sectionInstanceId}="${Ha(t.instance_id)}"]`);if(a)if(t.kind==="section")a.setAttribute(Ea,"true");else{const l=MM(e,t,r),c=l.length>0?l:N2(e,t,r).filter(u=>Ki(u,r));for(const u of c)u.setAttribute(Ea,"true")}}const $a=1440,Tx=Math.round($a*9/16),M2=14,hg="we-frame-defaults";function RM(e){return`
|
|
50
|
+
/* Section wrapper -- structure only. No selection chrome here;
|
|
51
|
+
rings are painted by the host's overlay. Zero margin
|
|
52
|
+
+ padding means sections butt edge-to-edge, matching publisher. */
|
|
53
|
+
[${e}] {
|
|
54
|
+
position: relative;
|
|
55
|
+
margin: 0;
|
|
56
|
+
padding: 0;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-rows: 1fr;
|
|
60
|
+
/* Reveal transition — governs the hidden→visible direction because
|
|
61
|
+
CSS uses the destination state's transition property. Spring easing
|
|
62
|
+
gives a snappy entrance. */
|
|
63
|
+
transition:
|
|
64
|
+
grid-template-rows 200ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
65
|
+
opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Hidden state -- collapse the section out of the page so it reflows shut.
|
|
69
|
+
The 0-height wrapper stays in flow as the anchor for the section's
|
|
70
|
+
floating edge tab (built by the host in its own document). */
|
|
71
|
+
[${e}][data-hidden="true"] {
|
|
72
|
+
grid-template-rows: 0fr;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
/* Collapse transition — governs the visible→hidden direction.
|
|
76
|
+
Faster + accelerating so the hide feels decisive. */
|
|
77
|
+
transition:
|
|
78
|
+
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
79
|
+
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Per-section body holds the API HTML.
|
|
83
|
+
1. position:relative gives the body a positioning context for any
|
|
84
|
+
body-scoped chrome or future body-only effects.
|
|
85
|
+
2. isolation:isolate SEALS the section's z-index hierarchy
|
|
86
|
+
inside this stacking context. Without it, any positioned
|
|
87
|
+
descendant with z-index > 0 (the header's sticky+z-50, a
|
|
88
|
+
dropdown's z-40, a sticky CTA) creates a stacking context
|
|
89
|
+
that escapes upward. Sections never need to know the
|
|
90
|
+
editor chrome exists -- internal z-index is unconstrained. */
|
|
91
|
+
/* overflow:hidden clips section content as the grid row collapses;
|
|
92
|
+
min-height:0 lets the grid child shrink below its content size.
|
|
93
|
+
Constraint: overflow:hidden is permanent (not just during animation), so
|
|
94
|
+
section content must not overflow its section-body boundary — sticky
|
|
95
|
+
elements, absolutely-positioned dropdowns, or shadows that bleed outside
|
|
96
|
+
the section edge will be silently clipped. Template sections are
|
|
97
|
+
self-contained blocks; this is safe in practice. */
|
|
98
|
+
.we-section-body { position: relative; isolation: isolate; overflow: hidden; min-height: 0; }`}function TM(e){return`
|
|
99
|
+
[${e}] {
|
|
100
|
+
display: contents;
|
|
101
|
+
/* Computed even while boxless, so the collapse below has a 1fr start
|
|
102
|
+
value to animate from the instant the hidden box appears. */
|
|
103
|
+
grid-template-rows: 1fr;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
}
|
|
106
|
+
[${e}] > .we-section-body { display: contents; }
|
|
107
|
+
|
|
108
|
+
/* Hidden state -- the wrapper takes a real box again: a zero-height grid
|
|
109
|
+
item in the frame column, collapsing the section out of the page while
|
|
110
|
+
staying in flow as the anchor for its edge tab. display is not
|
|
111
|
+
transitioned, so the box appears at 1fr immediately and the collapse
|
|
112
|
+
animates its full run; the reveal returns to display:contents at once —
|
|
113
|
+
a boxless wrapper has nothing to animate, so re-entry is instant by
|
|
114
|
+
design. */
|
|
115
|
+
[${e}][data-hidden="true"] {
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-rows: 0fr;
|
|
118
|
+
opacity: 0;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
transition:
|
|
121
|
+
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
122
|
+
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
123
|
+
}
|
|
124
|
+
[${e}][data-hidden="true"] > .we-section-body {
|
|
125
|
+
display: block;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
min-height: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* The frame stylesheet imposes flex-shrink:0 on the column's items from
|
|
131
|
+
outside the section; with the wrapper boxless the section IS that item,
|
|
132
|
+
so the same imposition lands here. Layered so an author utility on the
|
|
133
|
+
section root still wins, exactly as it does against the stylesheet's own
|
|
134
|
+
copy of this rule. */
|
|
135
|
+
@layer ${hg} {
|
|
136
|
+
[${e}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
|
+
}`}function DM(e,t){const r=t?`#we-page {
|
|
138
|
+
padding: 0;
|
|
139
|
+
}`:`#we-page {
|
|
140
|
+
width: ${$a}px;
|
|
141
|
+
min-height: ${Tx}px;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
border-radius: ${M2}px;
|
|
144
|
+
background: #f5f3ee;
|
|
145
|
+
padding: 0;
|
|
146
|
+
}
|
|
147
|
+
/* The window this card stands for. The card's WIDTH is a real viewport, so
|
|
148
|
+
vw units and width queries need nothing from us; its HEIGHT is the page's
|
|
149
|
+
own measurement, which makes 100svh circular here — a section sized from it
|
|
150
|
+
asks for a window its own height is what produced, and climbs on every
|
|
151
|
+
pass. The window-height token is the seam that ends it: a section writes
|
|
152
|
+
the token instead of the unit, and here it is the screen this card is cut
|
|
153
|
+
from (the floor above), a constant that settles in one pass. Declared
|
|
154
|
+
UNLAYERED, unlike the document defaults: this is not a fallback a template
|
|
155
|
+
may better, it is what the window IS on this surface, and Concrete's own
|
|
156
|
+
declaration of the token is unlayered too. A page box takes none of this —
|
|
157
|
+
a frame document is given the window its format declares, so 100svh there
|
|
158
|
+
is already the truth. */
|
|
159
|
+
:root {
|
|
160
|
+
--concrete-window-h: ${Tx}px;
|
|
161
|
+
}`;return`
|
|
162
|
+
html, body {
|
|
163
|
+
margin: 0;
|
|
164
|
+
/* The host owns the scroll container; this document never scrolls —
|
|
165
|
+
not even programmatically (overflow: clip pins scrollTop to 0), so a
|
|
166
|
+
transient gap while the host syncs the iframe's height to the page
|
|
167
|
+
can never flash a scrollbar or shift a measured rect. */
|
|
168
|
+
overflow: clip;
|
|
169
|
+
}
|
|
170
|
+
/* Document defaults, NOT document truth: the theme's own body mapping is
|
|
171
|
+
what the published page renders with, so it must win here too — fonts and
|
|
172
|
+
wraps in the frame diverge from capture otherwise. The layer (pre-declared
|
|
173
|
+
by the srcdoc, see FRAME_DEFAULTS_LAYER) is what makes these lose to any
|
|
174
|
+
template declaration. */
|
|
175
|
+
@layer ${hg} {
|
|
176
|
+
html, body {
|
|
177
|
+
background: transparent;
|
|
178
|
+
}
|
|
179
|
+
body {
|
|
180
|
+
color: #14180F;
|
|
181
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
${r}
|
|
185
|
+
${t?TM(e.sectionInstanceId):RM(e.sectionInstanceId)}
|
|
186
|
+
|
|
187
|
+
/* Slot wrapper -- structure only. No outline here; the host's overlay
|
|
188
|
+
ring handles slot hover + selection too. */
|
|
189
|
+
[${e.slotId}] {
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Slot-group container -- the gaps between grouped members (dividers,
|
|
194
|
+
padding) carry no slot id, so give the group container itself
|
|
195
|
+
the pointer cursor: the whole group reads as one clickable unit, and
|
|
196
|
+
the overlay ring outlines this container. */
|
|
197
|
+
[${e.slotGroup}],
|
|
198
|
+
[${e.slotItem}] {
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Deliberately NO position default on the marker elements: published pages
|
|
203
|
+
and captured artifacts set no position on them, so an unpositioned slot
|
|
204
|
+
must compute static here too — a relative default (even layered, losing
|
|
205
|
+
to author utilities) re-anchored an author's absolutely positioned
|
|
206
|
+
descendant to the slot on this surface while the published page anchored
|
|
207
|
+
it farther up, and could shift stacking the same way. Nothing in the
|
|
208
|
+
chrome needs it: rings measure client rects from the host overlay, and
|
|
209
|
+
everything that mounts absolute chrome inside the frame (island shields,
|
|
210
|
+
the crop spinner) checks the surface's computed position and forces an
|
|
211
|
+
inline relative itself. */
|
|
212
|
+
|
|
213
|
+
@media (prefers-reduced-motion: reduce) {
|
|
214
|
+
[${e.sectionInstanceId}] {
|
|
215
|
+
transition: none !important;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Render-error placeholder ------------------------------------- */
|
|
220
|
+
.we-render-error {
|
|
221
|
+
margin: 8px 0;
|
|
222
|
+
padding: 24px 16px;
|
|
223
|
+
border-radius: 6px;
|
|
224
|
+
border: 1px dashed #ebebe6;
|
|
225
|
+
background: #ffffff;
|
|
226
|
+
color: #8a877e;
|
|
227
|
+
font-size: 12.5px;
|
|
228
|
+
}
|
|
229
|
+
.we-render-error__title {
|
|
230
|
+
margin: 0;
|
|
231
|
+
color: #4a4842;
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
}
|
|
234
|
+
.we-render-error__detail {
|
|
235
|
+
margin: 4px 0 0 0;
|
|
236
|
+
color: #b9b6ab;
|
|
237
|
+
font-size: 11.5px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Island interaction shield: a transparent click layer derived from a live
|
|
241
|
+
island's own markup (island-shields.ts) — a base shield per island root box,
|
|
242
|
+
an item shield per rendered list-item copy. Present until the shield's
|
|
243
|
+
owner carries the live-owner stamp; a click on a shield falls through to the
|
|
244
|
+
editor's resolver, which selects the nearest marked ancestor. Base z-index 1
|
|
245
|
+
sits on the island content's plane but below floating content that must stay
|
|
246
|
+
clickable at z-index 2 (e.g. the neighborhood card over the map canvas). Item
|
|
247
|
+
shields ride one plane above the base, so a click over an item copy hits the
|
|
248
|
+
ITEM's shield and one click selects that item. */
|
|
249
|
+
.${Cx} {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset: 0;
|
|
252
|
+
z-index: 1;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
background: transparent;
|
|
255
|
+
}
|
|
256
|
+
.${Rx} { z-index: 2; }
|
|
257
|
+
[${Ea}] .${Cx} { display: none; }
|
|
258
|
+
|
|
259
|
+
/* A selected item rises onto the item plane. Lifting its own shield is not
|
|
260
|
+
enough: the island's base shield covers the whole island, item included, so
|
|
261
|
+
the item's controls (a tab row, a toggle) would still sit under it. Only an
|
|
262
|
+
item rises — installShield already forced its position, so the z-index takes
|
|
263
|
+
without this sheet positioning any marker — and an unselected item's shield,
|
|
264
|
+
on the same plane and later in the DOM, still takes the first click. */
|
|
265
|
+
[${Ea}]:has(> .${Rx}) { z-index: 2; }
|
|
266
|
+
|
|
267
|
+
/* Image slider: until the slider's \`images\` slot is the live selection, its
|
|
268
|
+
z-index:2 nav arrows would paint above the z-index:1 shield and stay
|
|
269
|
+
clickable, escaping the select-first gate. Disable them so the shield
|
|
270
|
+
catches the first click; restored once .tr-slider carries data-we-live.
|
|
271
|
+
Editor-only — deliberately not in published tokens.css. */
|
|
272
|
+
.tr-slider:not([${Ea}]) .tr-slider__nav { pointer-events: none; }
|
|
273
|
+
`}function LM(e,t){const a=e/$a,l=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*a,.1926*a+.54,l))}const zM=420,Dx=.92;function $M(e,t,r){if(!r)return e;const a=Math.max(e,zM/r.width),l=Math.min(.9,e*$a/r.width,Dx*t.availableWidthPx/r.width,Dx*t.availableHeightPx/r.height);return Math.max(.05,Math.min(a,l))}const id="/section-assets/",C2="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",UM=new RegExp(`^${C2}$`),IM=new RegExp(`${id.replace(/\//g,"\\/")}(${C2})`,"g");function HM(e){switch(e.kind){case"canonical":return id;case"publishedDocument":return"/assets/";case"publishedStylesheet":return"";case"canvas":return`${e.basePath}runtime/section-asset/`}}function BM(e,t){const r=e.startsWith(id)?e.slice(id.length):"";if(!UM.test(r))throw new Error(`not a canonical section-asset ref: ${e}`);return`${HM(t)}${r}`}function qM(e,t){return e.replace(IM,r=>BM(r,t))}function Lx(e,t,r){var l;let a=e.closest(`[${t}]`);for(;a&&!Ki(a,r);)a=((l=a.parentElement)==null?void 0:l.closest(`[${t}]`))??null;return a}function FM(e,t,r){for(const a of Array.from(e.querySelectorAll(`[${r.markers.slotId}]`))){if(a.closest(`[${r.markers.slotGroup}]`)!==e)continue;const l=a.getAttribute(r.markers.slotId);if(l&&r.isSlotEditable(t,l))return l}return null}function PM(e,t,r){if(!e)return null;const a=e.closest(`[${r.markers.sectionInstanceId}]`),l=a==null?void 0:a.getAttribute(r.markers.sectionInstanceId);if(!a||!l)return null;const c=t.find(_=>_.instance_id===l),u={selection:{kind:"section",instance_id:l},element:a};if(!c)return u;const m=Lx(e,r.markers.slotGroup,r.markers);if(m&&a.contains(m)){const _=FM(m,l,r);return _?{selection:{kind:"slot",instance_id:l,slot_id:_},element:m}:u}const p=Lx(e,r.markers.slotId,r.markers),g=p==null?void 0:p.getAttribute(r.markers.slotId);if(!p||!g||!r.isSlotEditable(l,g))return u;const b=Ax(e,r.markers.slotItem,p,r.markers),v=b?Number(b.getAttribute(r.markers.slotItem)):NaN,k=Number.isInteger(v)?v:void 0,w=Ax(e,r.markers.slotField,p,r.markers),j=(w==null?void 0:w.getAttribute(r.markers.slotField))??null,E=j&&r.isSlotEditable(l,g,j)?j:null;return{selection:{kind:"slot",instance_id:l,slot_id:g,...k!==void 0?{item_index:k}:{},...E?{field_name:E}:{}},element:(E?w:null)??b??p}}function ap(e){return e.section_display_name?e.section_display_name:e.section_key.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function VM(e){if(!e)return"null";let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function R2(e,t){var c;const r=t.createElement("div");r.className="we-render-error";const a=t.createElement("p");a.className="we-render-error__title",a.textContent="Couldn’t render this section.";const l=t.createElement("p");return l.className="we-render-error__detail",l.textContent=((c=e.render_error)==null?void 0:c.message)??"Unknown render error.",r.appendChild(a),r.appendChild(l),r}function GM(e,t,r,a){const l=t.createElement("div");l.setAttribute(r.sectionInstanceId,e.instance_id),l.setAttribute("data-section-label",ap(e)),l.dataset.svId=e.section_version_id,l.dataset.htmlHash=VM(e.html);const c=t.createElement("div");return c.className="we-section-body",e.render_error||e.html===null?c.appendChild(R2(e,t)):c.innerHTML=a(e.html),l.appendChild(c),l}const KM=`(function () {
|
|
274
|
+
function CaptureIntersectionObserver(callback, options) {
|
|
275
|
+
var opts = options || {};
|
|
276
|
+
this.root = opts.root || null;
|
|
277
|
+
this.rootMargin = opts.rootMargin || "0px";
|
|
278
|
+
var threshold = opts.threshold;
|
|
279
|
+
this.thresholds = Object.freeze(
|
|
280
|
+
Array.isArray(threshold) ? threshold.slice() : [typeof threshold === "number" ? threshold : 0],
|
|
281
|
+
);
|
|
282
|
+
this._callback = callback;
|
|
283
|
+
this._queued = [];
|
|
284
|
+
this._scheduled = false;
|
|
285
|
+
}
|
|
286
|
+
CaptureIntersectionObserver.prototype._flush = function () {
|
|
287
|
+
this._scheduled = false;
|
|
288
|
+
var entries = this._queued;
|
|
289
|
+
this._queued = [];
|
|
290
|
+
if (entries.length === 0) return;
|
|
291
|
+
this._callback(entries, this);
|
|
292
|
+
};
|
|
293
|
+
CaptureIntersectionObserver.prototype.observe = function (target) {
|
|
294
|
+
var rect = target.getBoundingClientRect();
|
|
295
|
+
this._queued.push({
|
|
296
|
+
target: target,
|
|
297
|
+
isIntersecting: true,
|
|
298
|
+
intersectionRatio: 1,
|
|
299
|
+
boundingClientRect: rect,
|
|
300
|
+
intersectionRect: rect,
|
|
301
|
+
rootBounds: new DOMRectReadOnly(0, 0, window.innerWidth, window.innerHeight),
|
|
302
|
+
time: performance.now(),
|
|
303
|
+
});
|
|
304
|
+
if (this._scheduled) return;
|
|
305
|
+
this._scheduled = true;
|
|
306
|
+
var observer = this;
|
|
307
|
+
Promise.resolve().then(function () {
|
|
308
|
+
observer._flush();
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
CaptureIntersectionObserver.prototype.unobserve = function () {};
|
|
312
|
+
CaptureIntersectionObserver.prototype.disconnect = function () {
|
|
313
|
+
this._queued = [];
|
|
314
|
+
};
|
|
315
|
+
CaptureIntersectionObserver.prototype.takeRecords = function () {
|
|
316
|
+
var entries = this._queued;
|
|
317
|
+
this._queued = [];
|
|
318
|
+
return entries;
|
|
319
|
+
};
|
|
320
|
+
window.IntersectionObserver = CaptureIntersectionObserver;
|
|
321
|
+
})();`,Lo=96,vs=72,YM=25.4,QM=/^(\d+(?:\.\d+)?)(in|mm)$/;function Tm(e){const t=QM.exec(e),[,r,a]=t??[];if(r===void 0||a===void 0)throw new Error(`malformed physical length: "${e}"`);const l=Number.parseFloat(r);return a==="mm"?l/YM:l}function XM(e){if(typeof e.width=="number"&&typeof e.height=="number")return{frameWidth:e.width,frameHeight:e.height,bleed:0,viewportWidth:e.width,viewportHeight:e.height,deviceScaleFactor:1,pixelWidth:e.width,pixelHeight:e.height,pointWidth:e.width/Lo*vs,pointHeight:e.height/Lo*vs,bleedPoints:0};const t=e,r=Tm(t.width),a=Tm(t.height),l=t.bleed===void 0?0:Tm(t.bleed),c=r*Lo,u=a*Lo,m=l*Lo,p=c+2*m,g=u+2*m,b=t.dpi/Lo;return{frameWidth:c,frameHeight:u,bleed:m,viewportWidth:p,viewportHeight:g,deviceScaleFactor:b,pixelWidth:Math.round(p*b),pixelHeight:Math.round(g*b),pointWidth:(r+2*l)*vs,pointHeight:(a+2*l)*vs,bleedPoints:l*vs}}const op="concrete-frame";function ZM(e){const t=XM(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function it(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function tl(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function WM(e,t="column"){return T2(e.id,{...ZM(e)},t)}function T2(e,t,r="column"){const a=Object.entries(t).map(([l,c])=>`${l}:${c}`).join(";");return{class:op,dataFormat:e,style:a,...r==="row"?{dataDirection:"row"}:{}}}function zx(e,t,r="column"){const a=WM(e,r),l=a.dataDirection===void 0?"":`data-direction="${a.dataDirection}" `;return`<div class="${it(a.class)}" data-format="${it(a.dataFormat)}" ${l}style="${it(a.style)}">${t.join("")}</div>`}function JM(e){switch(e.destination){case"published":return eC(e);case"artifact":return tC(e);case"preview":return nC(e);case"canvas":return iC(e)}}function D2(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${KM}<\/script>`]}const L2="html, body { margin: 0; padding: 0; }";function z2(e){const t=[`rel="${e.rel}"`,`href="${it(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${it(e.sizes)}"`),e.type!==void 0&&t.push(`type="${it(e.type)}"`),`<link ${t.join(" ")} />`}function eC(e){const{meta:t}=e,r=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${it(t.title)}</title>`,`<meta name="description" content="${it(t.description)}" />`];t.canonical&&r.push(`<link rel="canonical" href="${it(t.canonical)}" />`);for(const l of t.icons??[])r.push(z2(l));r.push('<meta property="og:type" content="website" />'),t.siteName&&r.push(`<meta property="og:site_name" content="${it(t.siteName)}" />`),r.push(`<meta property="og:title" content="${it(t.title)}" />`),r.push(`<meta property="og:description" content="${it(t.description)}" />`),t.ogUrl&&r.push(`<meta property="og:url" content="${it(t.ogUrl)}" />`),t.ogImage&&(r.push(`<meta property="og:image" content="${it(t.ogImage)}" />`),t.ogImageWidth&&r.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&r.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&r.push(`<meta property="og:image:type" content="${it(t.ogImageType)}" />`),t.ogImageAlt&&r.push(`<meta property="og:image:alt" content="${it(t.ogImageAlt)}" />`),r.push('<meta name="twitter:card" content="summary_large_image" />'),r.push(`<meta name="twitter:title" content="${it(t.title)}" />`),r.push(`<meta name="twitter:description" content="${it(t.description)}" />`),r.push(`<meta name="twitter:image" content="${it(t.ogImage)}" />`)),r.push(...pg(e.stylesheets)),r.push(...gg(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&r.push(`<script type="speculationrules">${tl({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}<\/script>`);const a=e.siteConfig?`
|
|
322
|
+
<script type="application/json" id="concrete-site-config">${tl(e.siteConfig)}<\/script>`:"";return mg({lang:t.lang??"en",head:r,body:` <body class="concrete-root">
|
|
323
|
+
${e.root.bodyHtml}${a}${yg(e.islands,"viewport")}
|
|
324
|
+
<script type="module" src="${it(e.analyticsJs.url)}"><\/script>
|
|
325
|
+
</body>`})}function tC(e){const t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${it(e.title)}</title>`),t.push(...pg(e.stylesheets));const r=[L2,...lC(e.root)];return t.push($2(r)),t.push(...D2(e.islands)),t.push(...gg(e.islands)),mg({lang:"en",head:t,body:` <body>${oC(e.root)}${yg(e.islands,"eager")}</body>`})}function nC(e){const t=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${it(e.title)}</title>`,...e.icon===void 0?[]:[z2({rel:"icon",href:e.icon})],...pg(e.stylesheets),$2([L2,...e.extraCss??[]]),...e.capture===!0?D2(e.islands):[],...gg(e.islands)],r=(e.devScripts??[]).map(a=>`
|
|
326
|
+
${a}`).join("");return mg({lang:"en",head:t,body:` <body>
|
|
327
|
+
${e.root.bodyHtml}${yg(e.islands,e.capture===!0?"eager":"viewport")}${r}
|
|
328
|
+
</body>`})}function iC(e){const t=e.stylesheets.hrefs.map(r=>`<link rel="stylesheet" href="${it(r)}">`).join("");return`<!doctype html>
|
|
329
|
+
<html>
|
|
330
|
+
<head>
|
|
331
|
+
<meta charset="utf-8">
|
|
332
|
+
<base href="${it(e.base)}">
|
|
333
|
+
<!-- Cascade-layer order is fixed by FIRST declaration, document-wide. The
|
|
334
|
+
kernel's document defaults must lose to everything a template declares,
|
|
335
|
+
so their layer is pre-declared here, before any template stylesheet,
|
|
336
|
+
pinning it below every layer those go on to declare. -->
|
|
337
|
+
<style>@layer ${e.defaultsLayer};</style>
|
|
338
|
+
${t}${aC(e.islands)}
|
|
339
|
+
<style>${e.frameCss}</style>
|
|
340
|
+
</head>
|
|
341
|
+
<body>
|
|
342
|
+
<div id="${it(e.root.id)}"${rC(e.root)}></div>
|
|
343
|
+
</body>
|
|
344
|
+
</html>`}function rC(e){if(!e.pageBox)return"";const t=T2(e.pageBox.formatId,e.pageBox.tokens,e.pageBox.direction);return` class="${it(t.class)}" data-format="${it(t.dataFormat)}"`+(t.dataDirection===void 0?"":` data-direction="${t.dataDirection}"`)+` style="${it(t.style)}"`}function aC(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const t=e.hostScriptSrc?`
|
|
345
|
+
<script id="tr-island-host" type="module" src="${it(e.hostScriptSrc)}"><\/script>`:"";return`${Object.keys(e.importMap).length===0?"":`
|
|
346
|
+
<script type="importmap">${tl({imports:e.importMap})}<\/script>`}
|
|
347
|
+
<script>window.__TR_ISLAND_MAP=${tl(e.islandMap)};<\/script>
|
|
348
|
+
<!-- id is the contract the host's readiness gate keys off — it waits on THIS
|
|
349
|
+
element's load event, not a timeout, so a slow cold first load still
|
|
350
|
+
activates without a refresh. -->${t}`}function mg(e){const t=e.head.map(r=>` ${r}`).join(`
|
|
351
|
+
`);return`<!doctype html>
|
|
352
|
+
<html lang="${it(e.lang)}">
|
|
353
|
+
<head>
|
|
354
|
+
${t}
|
|
355
|
+
</head>
|
|
356
|
+
${e.body}
|
|
357
|
+
</html>
|
|
358
|
+
`}function oC(e){return e.kind==="frame"?zx(e.format,e.sectionHtml,e.direction):e.pages.map(t=>zx(e.format,t.sectionHtml,t.direction)).join(`
|
|
359
|
+
`)}function lC(e){return e.kind!=="frameStack"?[]:[`body > .${op} { break-after: page; }`,`body > .${op}:last-child { break-after: auto; }`]}function pg(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${it(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function $2(e){const[t,...r]=e;return t===void 0?"<style></style>":r.length===0?`<style>${t}</style>`:`<style>${t}
|
|
360
|
+
${r.join(`
|
|
361
|
+
`)}
|
|
362
|
+
</style>`}function gg(e){if(e.kind!=="bundles"||Object.keys(e.islandMap).length===0)return[];const t=[`<script type="importmap">${tl({imports:e.reactVendorMap})}<\/script>`];for(const r of[e.runtime.url,...Object.values(e.reactVendorMap),e.reactVendorCore.url])t.push(`<link rel="modulepreload" href="${it(r)}" />`);return t}function yg(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const r=tl(e.islandMap),a=t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':"";return e.kind==="bundles"?`
|
|
363
|
+
<script>window.__TR_ISLAND_MAP=${r};${a}<\/script>
|
|
364
|
+
<script type="module" src="${it(e.runtime.url)}"><\/script>`:`
|
|
365
|
+
${sC}
|
|
366
|
+
<script>window.__TR_ISLAND_MAP = ${r};${a}<\/script>
|
|
367
|
+
<script type="module" src="${it(e.bootstrapUrl)}"><\/script>`}const sC=`<script type="module">
|
|
368
|
+
import RefreshRuntime from "/@react-refresh";
|
|
369
|
+
RefreshRuntime.injectIntoGlobalHook(window);
|
|
370
|
+
window.$RefreshReg$ = () => {};
|
|
371
|
+
window.$RefreshSig$ = () => (type) => type;
|
|
372
|
+
window.__vite_plugin_react_preamble_installed__ = true;
|
|
373
|
+
<\/script>`;function cC(e){return Object.keys(e.islandMap).length===0?{kind:"none"}:{kind:"editorHost",islandMap:e.islandMap,importMap:e.importMap,hostScriptSrc:e.hostScriptSrc}}function uC(e,t,r){return JM({destination:"canvas",root:{kind:"canvas",id:"we-page",...r?{pageBox:{formatId:r.formatId,tokens:r.tokens,...r.direction===void 0?{}:{direction:r.direction}}}:{}},islands:cC(e),stylesheets:{kind:"links",hrefs:e.stylesheets},base:e.basePath,defaultsLayer:hg,frameCss:DM(t,r)})}function dC(e){return!!(e!=null&&e.getElementById("we-page"))}function $x(e){const t=r=>qM(r,{kind:"canvas",basePath:e.assets.basePath});return{srcdoc:(r=e.pageBox)=>uC(e.assets,e.markers,r),buildSectionWrapper:(r,a)=>GM(r,a,e.markers,t),buildErrorPlaceholder:R2,resolveTarget:(r,a)=>PM(r,a,e),localizeSectionAssets:t,resolveSelectionEl:(r,a)=>NM(r,a,e.markers),resolveSelectionEls:(r,a)=>A2(r,a,e.markers),resolveVisibleSlotEls:(r,a)=>O2(r,a,e.markers),resolveItemEls:(r,a)=>AM(r,a,e.markers),setLiveOwner:(r,a)=>CM(r,a,e.markers)}}const U2=(e,t)=>`<svg class="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${t}</svg>`;function fC(e){return U2(e,'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>')}function hC(e){return U2(e,'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>')}const mC=42,I2=16;function pC(e,t){const r=[];for(const l of e)for(r.push({sum:l.y,n:1,items:[l]});r.length>1;){const c=r[r.length-1],u=r[r.length-2];if(!c||!u)break;const m=c.sum/c.n-(c.n-1)/2*t,p=u.sum/u.n+(u.n-1)/2*t;if(m-p<t)r.splice(r.length-2,2,{sum:u.sum+c.sum,n:u.n+c.n,items:u.items.concat(c.items)});else break}const a={};for(const l of r){const c=l.sum/l.n-(l.n-1)/2*t;l.items.forEach((u,m)=>{a[u.idx]=c+m*t})}return a}const gC=fC("we-htab-eye-off"),yC=hC("we-htab-eye-on"),lp=new WeakMap;function bC(e,t,r,a){const l=e.createElement("button");l.type="button",l.className="we-htab",l.dataset.hiddenTab=t,l.title=`Show ${r}`,l.setAttribute("aria-label",`Show ${r}`),l.innerHTML=`<span class="we-htab-eye">${gC}${yC}</span><span class="we-htab-name"></span>`;const c=l.querySelector(".we-htab-name");return c&&(c.textContent=r),lp.set(l,a),l.addEventListener("click",u=>{var m;u.stopPropagation(),(m=lp.get(l))==null||m()}),l}function vC(e,t,r,a){const l=new Map;e.querySelectorAll(".we-htab").forEach(m=>{const p=m.dataset.hiddenTab;p&&l.set(p,m)});const c=new Set,u=[];for(const m of r){let p=l.get(m.instanceId);if(!p)p=bC(t,m.instanceId,m.label,()=>a(m.instanceId)),e.appendChild(p);else{const g=p.querySelector(".we-htab-name");g&&g.textContent!==m.label&&(g.textContent=m.label),p.title=`Show ${m.label}`,p.setAttribute("aria-label",`Show ${m.label}`),lp.set(p,()=>a(m.instanceId))}c.add(m.instanceId),u.push(p)}return l.forEach((m,p)=>{c.has(p)||m.remove()}),u}function xC(e,t,r){const a=e.map((c,u)=>{const m=t(c.dataset.hiddenTab??""),p=m?m.getBoundingClientRect().top*r:0;return{idx:u,y:p}}),l=pC(a,mC);e.forEach((c,u)=>{c.style.top=`${l[u]}px`,c.style.left=`${I2-c.offsetWidth}px`})}const wC=48,kC=30,SC=`
|
|
374
|
+
@property --we-scale {
|
|
375
|
+
syntax: "<number>";
|
|
376
|
+
inherits: true;
|
|
377
|
+
initial-value: 1;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* The scroll container + dotted canvas surface. The host lays this element
|
|
381
|
+
out — position and size are the host's (it must both bound the height and
|
|
382
|
+
be positioned, so the frame wrapper's offset parent is the stage);
|
|
383
|
+
everything inside is kernel-defined. Declaring position here would win
|
|
384
|
+
the cascade over a host's own positioning utility classes (this sheet
|
|
385
|
+
loads after theirs), which is how the app's absolutely-positioned stage
|
|
386
|
+
once silently became in-flow and unscrollable.
|
|
387
|
+
background-attachment: local makes the grid scroll together with
|
|
388
|
+
the page card so the canvas + website read as one scene being panned, not
|
|
389
|
+
a card sliding over a fixed grid. Padding aligns the page card with the
|
|
390
|
+
floating panel: top/bottom/left 20px; the right constant (40px) covers the
|
|
391
|
+
panel's right inset (20px) plus an equal 20px gap. Fallback 436px matches
|
|
392
|
+
the panel's base CSS width.
|
|
393
|
+
The top padding also carries the label lane: a page-title row is drawn
|
|
394
|
+
ABOVE its frame's box, so the topmost frame's row would otherwise sit in
|
|
395
|
+
the 20px margin. --we-frame-label-lane is set by the stage reconciler only
|
|
396
|
+
when some frame is labeled, so a canvas whose pages declare no label keeps
|
|
397
|
+
the original 20px exactly. */
|
|
398
|
+
.we-canvas-stage {
|
|
399
|
+
overflow: auto;
|
|
400
|
+
padding: calc(20px + var(--we-frame-label-lane, 0px))
|
|
401
|
+
calc(var(--we-panel-w, 436px) + 40px) 20px 20px;
|
|
402
|
+
transition: --we-scale 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
403
|
+
background-image: radial-gradient(rgba(20, 18, 13, 0.13) 1px, transparent 1.2px);
|
|
404
|
+
background-size: 20px 20px;
|
|
405
|
+
background-position: 10px 10px;
|
|
406
|
+
background-attachment: local;
|
|
407
|
+
scrollbar-width: none;
|
|
408
|
+
-ms-overflow-style: none;
|
|
409
|
+
}
|
|
410
|
+
.we-canvas-stage::-webkit-scrollbar { width: 0; height: 0; display: none; }
|
|
411
|
+
|
|
412
|
+
/* The scaled page card's layout box: exactly the iframe's visual footprint,
|
|
413
|
+
so the stage scrolls and centers the card correctly. Auto inline margins
|
|
414
|
+
rather than flex centering: they collapse to 0 when the card overflows the
|
|
415
|
+
stage, keeping the left edge reachable by scroll at high zoom.
|
|
416
|
+
|
|
417
|
+
isolation:isolate SEALS the canvas's own stacking hierarchy (tab layer,
|
|
418
|
+
page card, chrome overlay) into this element, so those z-indexes are
|
|
419
|
+
ordered only against each other and the whole card paints at the stage's
|
|
420
|
+
position in the HOST's DOM order. Without it the overlay competed
|
|
421
|
+
directly with the host's floating chrome -- a panel, a zoom toolbar, a
|
|
422
|
+
notice banner -- and a hover outline drew straight over the controls.
|
|
423
|
+
Same reasoning as the section wrappers' isolate in the frame document. */
|
|
424
|
+
.we-canvas-frame {
|
|
425
|
+
position: relative;
|
|
426
|
+
width: calc(var(--we-page-w, ${$a}px) * var(--we-scale, 1));
|
|
427
|
+
height: calc(var(--we-page-h, 0px) * var(--we-scale, 1));
|
|
428
|
+
margin-inline: auto;
|
|
429
|
+
isolation: isolate;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* The multi-frame stack: one frame per row, in the canvas's page order, each
|
|
433
|
+
centered on the same axis a lone page card already used (the auto inline
|
|
434
|
+
margins above), separated by a constant host-px gap plus whatever lane the
|
|
435
|
+
label chips need. Expressed as an adjacent-sibling rule so a single-frame
|
|
436
|
+
canvas matches no selector at all and lays out byte-identically to what it
|
|
437
|
+
did before frames could stack. The gap does NOT ride --we-scale: it is
|
|
438
|
+
chrome between two artifacts, not a part of either, so it stays the same
|
|
439
|
+
distance at any zoom. */
|
|
440
|
+
.we-canvas-frame + .we-canvas-frame {
|
|
441
|
+
margin-top: calc(${wC}px + var(--we-frame-label-lane, 0px));
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/* Page-title row -- "Front", "Back": which page of the canvas this frame
|
|
445
|
+
is, with the visibility toggle seated directly beside the name it acts
|
|
446
|
+
on (one group, never split across the page's corners). Drawn ABOVE the
|
|
447
|
+
frame's box (bottom: 100%, in the lane the stage padding and the
|
|
448
|
+
inter-frame gap reserve) so it never covers artwork, and sized in
|
|
449
|
+
--we-content like the edge tabs: constant visual size at any zoom,
|
|
450
|
+
because it names the page rather than belonging to it.
|
|
451
|
+
pointer-events:none at the row so the lane's empty run stays stage
|
|
452
|
+
surface (a deselect click must fall through); the toggle re-enables its
|
|
453
|
+
own. */
|
|
454
|
+
.we-frame-titlebar {
|
|
455
|
+
position: absolute;
|
|
456
|
+
bottom: 100%;
|
|
457
|
+
left: 0;
|
|
458
|
+
right: 0;
|
|
459
|
+
margin-bottom: calc(4 * var(--we-content, 1px));
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
gap: calc(6 * var(--we-content, 1px));
|
|
463
|
+
pointer-events: none;
|
|
464
|
+
}
|
|
465
|
+
/* Quiet by design: the row annotates the artwork below it, so it reads in
|
|
466
|
+
a light gray that cedes attention to the page — the ink weights are
|
|
467
|
+
reserved for the states that earn them (hover, the engaged toggle). */
|
|
468
|
+
.we-canvas-frame-label {
|
|
469
|
+
min-width: 0;
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
text-overflow: ellipsis;
|
|
472
|
+
white-space: nowrap;
|
|
473
|
+
color: #a09d94;
|
|
474
|
+
font-size: calc(13 * var(--we-content, 1px));
|
|
475
|
+
font-weight: 500;
|
|
476
|
+
letter-spacing: -0.01em;
|
|
477
|
+
line-height: 1;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* Page-visibility toggle -- the eye beside the page title, resting in the
|
|
481
|
+
title's own gray so the row reads as one quiet group. Rendered only
|
|
482
|
+
for pages the composition marks optional (frame-visibility.ts). */
|
|
483
|
+
.we-frame-toggle {
|
|
484
|
+
flex: 0 0 auto;
|
|
485
|
+
display: grid;
|
|
486
|
+
place-items: center;
|
|
487
|
+
width: calc(24 * var(--we-content, 1px));
|
|
488
|
+
height: calc(22 * var(--we-content, 1px));
|
|
489
|
+
padding: 0;
|
|
490
|
+
border: 0;
|
|
491
|
+
border-radius: calc(6 * var(--we-content, 1px));
|
|
492
|
+
background: transparent;
|
|
493
|
+
color: #a09d94;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
pointer-events: auto;
|
|
496
|
+
transition: background-color 0.15s, color 0.15s;
|
|
497
|
+
}
|
|
498
|
+
.we-frame-toggle svg {
|
|
499
|
+
width: calc(14 * var(--we-content, 1px));
|
|
500
|
+
height: calc(14 * var(--we-content, 1px));
|
|
501
|
+
}
|
|
502
|
+
.we-frame-toggle:hover {
|
|
503
|
+
background: rgba(20, 18, 13, 0.06);
|
|
504
|
+
color: #14180F;
|
|
505
|
+
}
|
|
506
|
+
.we-frame-toggle:focus-visible {
|
|
507
|
+
outline: none;
|
|
508
|
+
background: rgba(20, 18, 13, 0.06);
|
|
509
|
+
color: #14180F;
|
|
510
|
+
box-shadow: 0 0 0 2px rgba(15, 42, 34, 0.5);
|
|
511
|
+
}
|
|
512
|
+
/* Hidden state reads as an engaged control (the section eye's hidden
|
|
513
|
+
treatment): filled box, full-ink glyph. */
|
|
514
|
+
.we-frame-toggle[data-page-visibility="hidden"] {
|
|
515
|
+
background: rgba(20, 18, 13, 0.06);
|
|
516
|
+
color: #14180F;
|
|
517
|
+
box-shadow: inset 0 0 0 1px #ebebe6;
|
|
518
|
+
}
|
|
519
|
+
/* Hidden page -- tinted to a clear deactivated state, in place and at full
|
|
520
|
+
footprint (a page never collapses the way a hidden section does), still
|
|
521
|
+
fully interactive: the tint says "excluded from the artifact", not
|
|
522
|
+
"locked". The title strikes through and lightens, the same reading as a
|
|
523
|
+
fully-hidden canvas's bar tab. The stamp is written by
|
|
524
|
+
frame-visibility.ts. */
|
|
525
|
+
.we-canvas-frame[data-page-hidden="true"] > iframe {
|
|
526
|
+
filter: grayscale(1) opacity(0.55);
|
|
527
|
+
}
|
|
528
|
+
.we-canvas-frame[data-page-hidden="true"] > .we-frame-titlebar > .we-canvas-frame-label {
|
|
529
|
+
text-decoration: line-through;
|
|
530
|
+
color: #b6b3aa;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/* The frame document: unscaled ${$a}px layout, scaled here as an
|
|
534
|
+
element. The border-radius matches #we-page inside, so the card shadow
|
|
535
|
+
follows the content's silhouette; both radius and shadow ride the
|
|
536
|
+
transform, exactly as they rode the old in-document scaling. z-index 2
|
|
537
|
+
stacks the card above the edge tabs (z-index 1) so the shadow falls over a
|
|
538
|
+
tab's tucked-under inner edge, nestling it against the page. */
|
|
539
|
+
.we-canvas-frame > iframe {
|
|
540
|
+
display: block;
|
|
541
|
+
border: 0;
|
|
542
|
+
background: transparent;
|
|
543
|
+
width: var(--we-page-w, ${$a}px);
|
|
544
|
+
height: var(--we-page-h, 0px);
|
|
545
|
+
border-radius: var(--we-page-radius, ${M2}px);
|
|
546
|
+
box-shadow:
|
|
547
|
+
0 1px 0 rgba(20,18,13,0.06),
|
|
548
|
+
0 2px 6px -2px rgba(20,18,13,0.10),
|
|
549
|
+
0 12px 28px -8px rgba(20,18,13,0.18),
|
|
550
|
+
0 32px 64px -20px rgba(20,18,13,0.28);
|
|
551
|
+
transform: scale(var(--we-scale, 1));
|
|
552
|
+
transform-origin: 0 0;
|
|
553
|
+
position: relative;
|
|
554
|
+
z-index: 2;
|
|
555
|
+
transition: filter 0.2s ease;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* Chrome overlay -- sized to the frame wrapper, i.e. the scaled page card,
|
|
559
|
+
so x=0/y=0 is the page's top-left corner. overflow stays visible: a ring
|
|
560
|
+
at the page boundary or a label straddling the top border extends past
|
|
561
|
+
the card and must not clip. pointer-events:none so clicks pass through to
|
|
562
|
+
the iframe underneath.
|
|
563
|
+
|
|
564
|
+
Positioning contract: chrome.ts measures a target in the FRAME document
|
|
565
|
+
(layout truth — that document never scales or scrolls) and writes the
|
|
566
|
+
rect as custom properties on the ring/label; the formulas here scale it
|
|
567
|
+
into host space. Keeping the formula in the stylesheet and the data in
|
|
568
|
+
properties is what lets a transitioned --we-scale move every ring in
|
|
569
|
+
lockstep with the iframe's own animated transform. The ring's offset
|
|
570
|
+
(its inflation past the target's edge) stays OUTSIDE the multiplication:
|
|
571
|
+
constant host px at any zoom.
|
|
572
|
+
|
|
573
|
+
z-index 3 -- one step above the page card, and nothing more: the frame's
|
|
574
|
+
isolate is what keeps the chrome under the host's own UI, so a large
|
|
575
|
+
value here would buy nothing and read as an escape hatch.
|
|
576
|
+
|
|
577
|
+
A CLASS, not an id: every frame on the stage carries one of these, and the
|
|
578
|
+
chrome functions are handed the overlay rather than resolving it by
|
|
579
|
+
document-global id. */
|
|
580
|
+
.we-chrome-overlay {
|
|
581
|
+
position: absolute;
|
|
582
|
+
inset: 0;
|
|
583
|
+
pointer-events: none;
|
|
584
|
+
z-index: 3;
|
|
585
|
+
}
|
|
586
|
+
.we-chrome-ring {
|
|
587
|
+
position: absolute;
|
|
588
|
+
pointer-events: none;
|
|
589
|
+
border: 2px solid transparent;
|
|
590
|
+
border-radius: 6px;
|
|
591
|
+
opacity: 0;
|
|
592
|
+
box-sizing: border-box;
|
|
593
|
+
top: calc(var(--we-r-top, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
594
|
+
left: calc(var(--we-r-left, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
595
|
+
width: calc(var(--we-r-w, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
596
|
+
height: calc(var(--we-r-h, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
597
|
+
}
|
|
598
|
+
/* Hover ring -- instant on cursor arrival, fades out on leave.
|
|
599
|
+
Position updates instantly (no top/left transition) so dragging
|
|
600
|
+
across elements never flickers. Ink stroke + white drop-shadow
|
|
601
|
+
halo keeps the ring readable on both light sections and dark ones. */
|
|
602
|
+
.we-chrome-ring--hover {
|
|
603
|
+
border-color: rgba(15,42,34,0.85);
|
|
604
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
605
|
+
transition: opacity 70ms ease-in;
|
|
606
|
+
}
|
|
607
|
+
.we-chrome-ring--hover[data-active="true"] {
|
|
608
|
+
opacity: 1;
|
|
609
|
+
transition: opacity 100ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
610
|
+
}
|
|
611
|
+
/* Selection ring -- appears instantly (continuous with hover),
|
|
612
|
+
then morphs ink → gold. No position transition so resize
|
|
613
|
+
tracking stays tight. Same ink + white halo as hover. */
|
|
614
|
+
.we-chrome-ring--selection {
|
|
615
|
+
border-color: rgba(15,42,34,0.85);
|
|
616
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
617
|
+
transform: scale(1);
|
|
618
|
+
box-shadow: none;
|
|
619
|
+
transition:
|
|
620
|
+
opacity 50ms ease-in,
|
|
621
|
+
border-color 160ms cubic-bezier(0.2, 0, 0, 1),
|
|
622
|
+
box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
|
|
623
|
+
}
|
|
624
|
+
.we-chrome-ring--selection[data-active="true"] {
|
|
625
|
+
opacity: 1;
|
|
626
|
+
/* Instant show on select; only border + glow animate */
|
|
627
|
+
transition:
|
|
628
|
+
opacity 0ms,
|
|
629
|
+
border-color 180ms cubic-bezier(0.2, 0, 0, 1),
|
|
630
|
+
box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
|
|
631
|
+
}
|
|
632
|
+
.we-chrome-ring--selection[data-kind="section"],
|
|
633
|
+
.we-chrome-ring--selection[data-kind="slot"] {
|
|
634
|
+
border-color: #E5B832;
|
|
635
|
+
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
636
|
+
box-shadow: 0 0 0 1px rgba(229,184,50,0.25), 0 8px 24px -10px rgba(229,184,50,0.35);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/* Geometry guides -- the trim line and the bleed region for a rendered-class
|
|
640
|
+
page. The overlay is the page (bleed) box exactly, so insetting all four
|
|
641
|
+
sides by the declared bleed gives the trim box with no arithmetic: the
|
|
642
|
+
border draws the trim line and the shadow's spread fills the band between
|
|
643
|
+
trim and page edge. Data/formula split as for the rings — guides.ts writes
|
|
644
|
+
--we-g-bleed in frame space, the multiplication happens here, so a
|
|
645
|
+
transitioned zoom moves the guides with the card. The 1px line itself
|
|
646
|
+
stays OUTSIDE the multiplication: constant host px at any zoom, like the
|
|
647
|
+
ring's offset.
|
|
648
|
+
|
|
649
|
+
Magenta rather than the chrome's ink/gold: a guide is an instrument about
|
|
650
|
+
the artifact, never a selection, and the print convention reads instantly.
|
|
651
|
+
The inset white hairline keeps the line legible over dark artwork, the
|
|
652
|
+
role the rings' drop-shadow halo plays for them. First child of the
|
|
653
|
+
overlay, so rings and the title pill paint above it. */
|
|
654
|
+
.we-guide {
|
|
655
|
+
position: absolute;
|
|
656
|
+
box-sizing: border-box;
|
|
657
|
+
pointer-events: none;
|
|
658
|
+
opacity: 0;
|
|
659
|
+
top: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
660
|
+
right: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
661
|
+
bottom: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
662
|
+
left: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
663
|
+
border: 1px solid rgba(214,32,140,0.9);
|
|
664
|
+
box-shadow:
|
|
665
|
+
inset 0 0 0 1px rgba(255,255,255,0.55),
|
|
666
|
+
0 0 0 calc(var(--we-g-bleed, 0px) * var(--we-scale, 1)) rgba(214,32,140,0.16);
|
|
667
|
+
transition: opacity 90ms ease-in;
|
|
668
|
+
}
|
|
669
|
+
.we-guide[data-active="true"] { opacity: 1; }
|
|
670
|
+
|
|
671
|
+
/* Section title pill -- straddles the selection's top border; geometry set
|
|
672
|
+
by chrome.ts as custom properties, same contract as the rings. The left
|
|
673
|
+
indent is constant host px. Sections only; slots get the outline ring but
|
|
674
|
+
no on-canvas label. */
|
|
675
|
+
.we-chrome-label {
|
|
676
|
+
position: absolute;
|
|
677
|
+
top: calc(var(--we-l-top, 0px) * var(--we-scale, 1));
|
|
678
|
+
left: calc(var(--we-l-left, 0px) * var(--we-scale, 1) + var(--we-l-indent, 0px));
|
|
679
|
+
pointer-events: none;
|
|
680
|
+
z-index: 1;
|
|
681
|
+
background: rgba(229,184,50,0.95);
|
|
682
|
+
color: #282c32;
|
|
683
|
+
padding: 3px 8px;
|
|
684
|
+
border-radius: 4px;
|
|
685
|
+
font-size: 10.5px;
|
|
686
|
+
font-weight: 600;
|
|
687
|
+
line-height: 1;
|
|
688
|
+
white-space: nowrap;
|
|
689
|
+
opacity: 0;
|
|
690
|
+
transform: translateY(calc(-50% - 4px)) scale(0.96);
|
|
691
|
+
transition:
|
|
692
|
+
opacity 60ms ease-in,
|
|
693
|
+
transform 60ms ease-in;
|
|
694
|
+
}
|
|
695
|
+
.we-chrome-label[data-active="true"] {
|
|
696
|
+
opacity: 1;
|
|
697
|
+
transform: translateY(-50%) scale(1);
|
|
698
|
+
transition:
|
|
699
|
+
opacity 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms,
|
|
700
|
+
transform 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/* Hidden-section edge tabs -------------------------------------
|
|
704
|
+
One dim chip-tab per hidden section, pinned to the page card's left edge
|
|
705
|
+
at the collapsed wrapper's reflow seam. Built + positioned by the host
|
|
706
|
+
orchestrator; de-collided via placeTabs. Constant visual size at any zoom
|
|
707
|
+
— the layer sits outside the scaled iframe. --we-content is the host's
|
|
708
|
+
interior scaling unit (its large-screen chrome scale); a host without one
|
|
709
|
+
leaves the 1px fallback in force. A class for the same reason the overlay
|
|
710
|
+
is one: one tab layer per frame, addressed through that frame's handle. */
|
|
711
|
+
.we-htabs {
|
|
712
|
+
position: absolute;
|
|
713
|
+
inset: 0;
|
|
714
|
+
pointer-events: none;
|
|
715
|
+
z-index: 1;
|
|
716
|
+
}
|
|
717
|
+
.we-htab {
|
|
718
|
+
position: absolute;
|
|
719
|
+
transform: translateY(-50%);
|
|
720
|
+
display: flex;
|
|
721
|
+
align-items: center;
|
|
722
|
+
gap: calc(9 * var(--we-content, 1px));
|
|
723
|
+
height: calc(34 * var(--we-content, 1px));
|
|
724
|
+
padding: 0 calc(${12+I2} * var(--we-content, 1px)) 0 calc(13 * var(--we-content, 1px));
|
|
725
|
+
background: #ffffff;
|
|
726
|
+
border: 1px solid #ebebe6;
|
|
727
|
+
border-radius: calc(9 * var(--we-content, 1px)) 0 0 calc(9 * var(--we-content, 1px));
|
|
728
|
+
box-shadow: 0 10px 24px -12px rgba(20,18,13,0.34);
|
|
729
|
+
color: #4a4842;
|
|
730
|
+
font: inherit;
|
|
731
|
+
cursor: pointer;
|
|
732
|
+
opacity: 1;
|
|
733
|
+
pointer-events: auto;
|
|
734
|
+
transition: transform 0.2s cubic-bezier(0.2,0.7,0.3,1),
|
|
735
|
+
border-color 0.18s, box-shadow 0.18s;
|
|
736
|
+
}
|
|
737
|
+
.we-htab-eye {
|
|
738
|
+
display: grid;
|
|
739
|
+
place-items: center;
|
|
740
|
+
flex: 0 0 auto;
|
|
741
|
+
color: #8a877e;
|
|
742
|
+
transition: color 0.18s;
|
|
743
|
+
}
|
|
744
|
+
.we-htab-eye svg { width: calc(14 * var(--we-content, 1px)); height: calc(14 * var(--we-content, 1px)); }
|
|
745
|
+
.we-htab-name {
|
|
746
|
+
font-size: calc(13 * var(--we-content, 1px));
|
|
747
|
+
font-weight: 600;
|
|
748
|
+
letter-spacing: -0.01em;
|
|
749
|
+
color: #14180F;
|
|
750
|
+
white-space: nowrap;
|
|
751
|
+
}
|
|
752
|
+
.we-htab:hover {
|
|
753
|
+
transform: translateY(-50%) scale(1.07);
|
|
754
|
+
border-color: rgba(15,42,34,0.5);
|
|
755
|
+
box-shadow: 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
756
|
+
}
|
|
757
|
+
.we-htab:hover .we-htab-eye { color: #0F2A22; }
|
|
758
|
+
.we-htab:focus-visible {
|
|
759
|
+
outline: none;
|
|
760
|
+
transform: translateY(-50%) scale(1.07);
|
|
761
|
+
border-color: #0F2A22;
|
|
762
|
+
box-shadow: 0 0 0 3px #F3F6EF, 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
763
|
+
}
|
|
764
|
+
/* Hover/focus swaps the eye-off glyph to the eye glyph in place — no width
|
|
765
|
+
change, no sliding label. Only one glyph is in flow at a time, so the eye
|
|
766
|
+
slot's grid keeps the shown glyph centered. */
|
|
767
|
+
.we-htab-eye-on { display: none; }
|
|
768
|
+
.we-htab:hover .we-htab-eye-off,
|
|
769
|
+
.we-htab:focus-visible .we-htab-eye-off { display: none; }
|
|
770
|
+
.we-htab:hover .we-htab-eye-on,
|
|
771
|
+
.we-htab:focus-visible .we-htab-eye-on { display: block; }
|
|
772
|
+
|
|
773
|
+
@media (prefers-reduced-motion: reduce) {
|
|
774
|
+
.we-canvas-stage,
|
|
775
|
+
.we-canvas-frame > iframe,
|
|
776
|
+
.we-chrome-ring,
|
|
777
|
+
.we-chrome-label,
|
|
778
|
+
.we-guide,
|
|
779
|
+
.we-htab,
|
|
780
|
+
.we-frame-toggle {
|
|
781
|
+
transition: none !important;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
`,EC='<div class="we-guide"></div><div class="we-chrome-ring we-chrome-ring--hover"></div><div class="we-chrome-ring we-chrome-ring--selection"></div><div class="we-chrome-label"></div>',rd="we-canvas-frame",Ux="we-frame-titlebar",Ix="we-canvas-frame-label",Hx="we-htabs",Bx="we-chrome-overlay";function Dm(e,t,r){const a=e.querySelector(t);if(a)return a;const l=r();return e.appendChild(l),l}function _C(e,t){const r=e.querySelector(`:scope > .${Ux}`);if(r)return r;const a=t.createElement("div");return a.className=Ux,e.insertBefore(a,e.firstChild),a}function jC(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.classList.contains(rd))return t;return null}function OC(e,t){const r=e.ownerDocument,a=_C(e,r),l=t.label??"",c=a.querySelector(`:scope > .${Ix}`);if(l==="")c==null||c.remove();else{const b=c??a.insertBefore(r.createElement("div"),a.firstChild);b.className=Ix,b.textContent!==l&&(b.textContent=l)}const u=Dm(e,":scope > iframe",()=>r.createElement("iframe"));t.title!==void 0&&u.title!==t.title&&(u.title=t.title),t.sandbox!==void 0&&u.getAttribute("sandbox")!==t.sandbox&&u.setAttribute("sandbox",t.sandbox),u.getAttribute("srcdoc")!==t.srcdoc&&u.setAttribute("srcdoc",t.srcdoc);const m=Dm(e,`:scope > .${Hx}`,()=>{const b=r.createElement("div");return b.className=Hx,b}),p=Dm(e,`:scope > .${Bx}`,()=>{const b=r.createElement("div");return b.className=Bx,b.setAttribute("aria-hidden","true"),b});p.childElementCount===0&&(p.innerHTML=EC);const g=t.pageBox;return g?(e.style.setProperty("--we-page-w",`${g.width}px`),e.style.setProperty("--we-page-h",`${g.height}px`),e.style.setProperty("--we-page-radius","0px")):(e.style.removeProperty("--we-page-w"),e.style.removeProperty("--we-page-radius")),{iframe:u,overlay:p,tabLayer:m}}function AC(e,t,r){const{iframe:a}=r;return{key:t,wrapper:e,iframe:a,overlay:r.overlay,tabLayer:r.tabLayer,get doc(){return a.contentDocument},setPageHeight(l){e.style.setProperty("--we-page-h",`${l}px`)}}}function NC(e,t){const r=e.ownerDocument,a=new Map;for(const p of Array.from(e.querySelectorAll(`:scope > .${rd}`))){const g=p.dataset.frameKey;g!==void 0&&a.set(g,p)}const l=[],c=[],u=new Set;for(const p of t){let g=a.get(p.key);g||(g=r.createElement("div"),g.className=rd,g.dataset.frameKey=p.key);const b=OC(g,p);l.push(g),u.add(p.key),c.push(AC(g,p.key,b))}let m=null;for(let p=l.length-1;p>=0;p--){const g=l[p];g&&((g.parentNode!==e||jC(g)!==m)&&e.insertBefore(g,m),m=g)}return a.forEach((p,g)=>{u.has(g)||p.remove()}),t.some(p=>(p.label??"")!=="")?e.style.setProperty("--we-frame-label-lane",`${kC}px`):e.style.removeProperty("--we-frame-label-lane"),c}function MC(e,t,r){const a=[];for(const l of e){const c=l.doc;if(!c)continue;const u=t.resolveSelectionEls(c,r);u.length>0&&a.push({handle:l,els:u})}return a}function CC(e,t){const r=e==null?void 0:e.querySelector(":scope > .we-guide");if(r){if(t===null){r.removeAttribute("data-active");return}r.style.setProperty("--we-g-bleed",`${t}px`),r.setAttribute("data-active","true")}}const RC=24;function TC(e,t,r,a){if(e.height+2*a<=t)return e.top>=a&&e.bottom<=t-a?null:e.top<a?Math.max(0,r+e.top-a):Math.max(0,r+e.bottom-(t-a));const c=Math.max(0,r+e.top-a);return Math.abs(c-r)<1?null:c}function DC(e,t,r,a){const l=t+e.top*r-a,c=e.height*r;return{top:l,bottom:l+c,height:c}}const qx="__trEditorBridge",LC=1,H2=new WeakMap;function zC(e){return e?e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{},...e.field_name!==void 0?{fieldName:e.field_name}:{}}:null}function $C(e){const t=e[qx];if(t)return t;const r=new Set,a={protocol:LC,selection:null,subscribe(l){return r.add(l),()=>{r.delete(l)}}};return H2.set(a,r),e[qx]=a,a}function UC(e,t,r){if(!e||!t)return;const l=$C(e);l.selection=zC(r);for(const c of[...H2.get(l)??[]])c()}const IC=6,Sa=12,HC=288,BC='[aria-modal="true"]',qC=".hp-sb-scroll";function Ba(e){var u,m;const t=window.innerWidth,r=window.innerHeight,a=(u=e.closest(BC))==null?void 0:u.getBoundingClientRect(),l=a||(m=e.closest(qC))==null?void 0:m.getBoundingClientRect(),c=a?{top:Math.max(0,a.top),left:Math.max(0,a.left),right:Math.min(t,a.right),bottom:Math.min(r,a.bottom)}:l?{top:Math.max(0,l.top),left:0,right:t,bottom:Math.min(r,l.bottom)}:{top:0,left:0,right:t,bottom:r};return{rect:e.getBoundingClientRect(),bounds:c,viewportHeight:r,viewportWidth:t}}function hl({rect:e,bounds:t,viewportHeight:r},{maxHeight:a=HC,minWidth:l=0,gap:c=IC,height:u}={}){if(e.bottom<t.top||e.top>t.bottom||e.right<t.left||e.left>t.right)return null;const m=t.bottom-e.bottom-c-Sa,p=e.top-t.top-c-Sa,g=u??Math.min(a,220),b=m<g&&p>m,k=Math.max(0,Math.min(a,b?p:m)),w=Math.max(t.left+Sa,Math.min(e.left,t.right-Math.max(e.width,l)-Sa)),j={left:w,width:e.width,maxWidth:Math.max(e.width,l,t.right-w-Sa),maxHeight:k};return b?{...j,bottom:r-e.top+c}:{...j,top:e.bottom+c}}function FC(e,t,r){const[a,l]=x.useState(null);return x.useEffect(()=>{if(!e)return;const c=()=>{const m=t.current;m&&l(Ba(m))},u=requestAnimationFrame(c);return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{cancelAnimationFrame(u),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,t]),!e||!a?null:hl(a,r)}const B2=Symbol.for("@homepages/concrete:row:of"),q2=Symbol.for("@homepages/concrete:element:of");function bg(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&Bn(e.of)}function PC(e,t){return e===t||Zt(e)&&Zt(t)&&e.key===t.key}function F2(e,t){const r=[...e];for(const a of t??[])r.some(l=>PC(l,a))||r.push(a);return r}function ml(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function P2(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function rc(e){if(!P2(e))return;const t=e[B2];return typeof t=="object"&&t!==null?t:void 0}function $r(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function VC(e){if(!$r(e))return;const t=e[q2];return typeof t=="object"&&t!==null?t:void 0}function Zt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function GC(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&Bn(e.declaration)}function Bn(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function Lm(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};const r=t;if(e.requires===void 0)return{kind:"compute",fn:r,reads:[...e.reads]};if(!Array.isArray(e.requires)||e.requires.length===0)throw new Error("compute(): `requires` names at least one read — omit it when the value needs none.");return{kind:"compute",fn:r,reads:F2(e.reads,e.requires),requires:[...e.requires]}}function Ur(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function vg(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function KC(e){return vg(e.source)}const YC={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function xg(e,t){const r=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${r}: \`brief\` is required — it is the whole instruction the model is given.`);const a=YC[e],l={kind:"fill",verb:e};for(const[u,m]of Object.entries(t)){if(!a.has(u))throw new Error(`${r}: "${u}" is not an option — it takes ${[...a].map(p=>`\`${p}\``).join(", ")}, and everything the model should know goes in the brief.`);if(u==="none"&&m!==void 0&&m!==!0)throw new Error(`${r}: \`none\` is \`true\` or absent — it admits the empty answer, and the brief's last sentence says when nothing is right.`);if(u==="unique"&&m!==void 0&&typeof m!="boolean")throw new Error(`${r}: \`unique\` is a boolean — \`false\` lets a pick repeat an element.`);if(u==="requires"&&m!==void 0&&(!Array.isArray(m)||m.length===0))throw new Error(`${r}: \`requires\` names at least one read — omit it when the fill needs none.`);m!==void 0&&(l[u]=u==="reads"||u==="requires"?[...m]:m)}const c=l.requires;return c!==void 0&&(l.reads=F2(l.reads??[],c)),l}function QC(e){return xg("write",e)}function XC(e){return xg("pick",e)}function ZC(e){return xg("find",e)}const ki={write:QC,pick:XC,find:ZC};function Pr(e,t){if(qa(e))return[e];if(!Array.isArray(e)||!e.every(l=>typeof l=="object"&&l!==null))return;if(e.length===0)throw new Error(`${t} declares \`source: []\` — a list of fills names at least one fill, and a holder nothing fills declares no \`source\`.`);const r=e.filter(l=>!qa(l)).length;if(r===0)return e;const a=r<e.length?"a derivation beside a fill":r>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${a} — \`source\` takes one derivation (a fact, a slot, a row's member, the element, a \`compute()\`) or an ordered list of fills: a holder has one write path, and a derived value has no writer beside it.`)}function Td(e){return qa(e)||Array.isArray(e)&&e.length>0&&e.every(qa)}function qa(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="fill"&&"verb"in e&&(e.verb==="write"||e.verb==="pick"||e.verb==="find")&&"brief"in e&&typeof e.brief=="string"}const wg=Symbol.for("@homepages/concrete:fill:declaration");function WC(e){return Td(e)?{[wg]:qa(e)?[e]:[...e]}:{}}function Vr(e){if(!(typeof e!="object"||e===null))return e[wg]}const JC=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],Fx=["id","slot","index","def","value","present","enclosing"],Ya=["image","video","tour","document"];function bn(e){return Ya.includes(e)}function pl(e){return e==="media"||bn(e)}const Gr={cutout:{label:"Background removed",kinds:["image"],site:"holder",options:{enclosed:{required:!1,type:"string",values:["clear","keep"]}}},autocrop:{label:"Cropped to its subject",kinds:["image"],site:"holder",options:{brief:{required:!0,type:"string"}}},probe:{label:"Probed",kinds:["image","video","document"],site:"kind",options:{}},understand:{label:"Understood",kinds:["image","video","document","tour"],site:"kind",options:{}},preview:{label:"Preview",kinds:["image","video","document"],site:"kind",options:{}},ladder:{label:"Renditions",kinds:["image","video","document"],site:"kind",options:{}},transcode:{label:"Transcoded",kinds:["video"],site:"kind",options:{}},poster:{label:"Poster",kinds:["video","document"],site:"kind",options:{}},rasterize:{label:"Pages rasterized",kinds:["document"],site:"kind",options:{}},fetch:{label:"Link fetched",kinds:["video","tour"],site:"kind",options:{}},tour_details:{label:"Tour details",kinds:["tour"],site:"kind",options:{}},crop:{label:"Cut to its crop",kinds:["image"],site:"place",options:{}}},V2=Object.keys(Gr),e5=V2.filter(e=>Gr[e].site==="holder");V2.filter(e=>Gr[e].site==="kind");function t5(e){return typeof e=="string"&&Object.hasOwn(Gr,e)}function G2(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const{kind:t,verb:r}=e;return t==="process"&&t5(r)?e:null}function kg(e){const t=Gr[e.verb],r=Object.keys(t.options),a=r.length>0?`it takes ${r.map(l=>`\`${l}\``).join(", ")}`:"it takes none";for(const[l,c]of Object.entries(e)){if(l==="kind"||l==="verb"||c===void 0)continue;if(l==="reads")return`\`${e.verb}\` takes no \`reads\` — a process is about one media value, never the property`;const u=t.options[l];if(u===void 0){const m=l==="aspect"&&e.verb==="autocrop"?"; its aspect is the holder's `crop` — the aspect it locks, free form where it locks none":"";return`\`${e.verb}\` takes no option "${l}" — ${a}${m}`}if(u.values!==void 0){if(typeof c!="string"||!u.values.includes(c))return`\`${e.verb}\`'s \`${l}\` is one of ${u.values.map(m=>`"${m}"`).join(", ")}`;continue}if(typeof c!==u.type||typeof c=="string"&&c.trim()==="")return`\`${e.verb}\`'s \`${l}\` is a non-empty ${u.type}`}for(const[l,c]of Object.entries(t.options))if(c.required&&e[l]===void 0)return`\`${e.verb}\` requires \`${l}\``;return null}function Ir(e){const{type:t,kinds:r}=e;if(t==="media"){const a=Array.isArray(r)?r.filter(l=>typeof l=="string"&&bn(l)):[];return a.length>0?a:Ya}return typeof t=="string"&&bn(t)?[t]:[]}function K2(e){const{kinds:t,process:r}=e;if(t!==void 0){if(e.type!=="media")return"declares `kinds` — only `media()` leaves its kind open; a kind's own builder fixes it";if(!Array.isArray(t)||t.length===0||!t.every(c=>typeof c=="string"&&bn(c)))return`declares \`kinds\` ${JSON.stringify(t)} — a non-empty list of ${Ya.join(", ")}`}if(r===void 0)return null;const a=e5.map(c=>`process.${c}()`).join(", ");if(!Array.isArray(r)||r.length===0)return`declares \`process\` ${JSON.stringify(r)} — a non-empty list of processes (${a})`;const l=new Set;for(const c of r){const u=G2(c);if(u===null)return`processes ${JSON.stringify(c)}, which is no process (${a})`;const{verb:m}=u,p=Gr[m];if(p.site==="kind")return`processes "${m}", which every ${p.kinds.join(", ")} gets from birth on its kind's row — never a holder's to declare`;if(p.site==="place")return`processes "${m}", which every ${p.kinds.join(", ")} place gets wherever its value carries a crop — never a holder's to declare`;if(l.has(m))return`processes "${m}" twice — a holder declares each process once`;l.add(m);const g=kg(u);if(g!==null)return`processes "${m}" with options that do not fit: ${g}`;const b=Ir(e).filter(v=>!p.kinds.includes(v));if(b.length>0)return`processes "${m}", which applies to ${p.kinds.join(", ")} and not to ${b.join(", ")}`}return null}const n5=new Set(["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","text/csv"]);function Y2(e){const t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":n5.has(t)?"document":null}function Q2(e){const t=ac(e);if(t===null)return null;const r=Kr[t].kind;return r==="tour"||r==="video"?r:null}const i5=["tour","video","social","listing","file","map"],Kr={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},iguide:{kind:"tour",label:"iGUIDE",pattern:/(^|\.)youriguide\.com$/i,strategy:"opengraph"},kuula:{kind:"tour",label:"Kuula",pattern:/(^|\.)kuula\.co$/i,strategy:"opengraph"},momento360:{kind:"tour",label:"Momento360",pattern:/(^|\.)momento360\.com$/i,strategy:"opengraph"},cloudpano:{kind:"tour",label:"CloudPano",pattern:/(^|\.)cloudpano\.com$/i,strategy:"none"},asteroom:{kind:"tour",label:"Asteroom",pattern:/(^|\.)asteroom\.com$/i,strategy:"none"},zillow3d:{kind:"tour",label:"Zillow 3D Home",pattern:/(^|\.)zillow\.com$/i,path:/^\/view-3d-home\//i,strategy:"none"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function ac(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(const[r,a]of Object.entries(Kr))if(a.pattern.test(t.hostname)&&!(a.path&&!a.path.test(t.pathname)))return r;return null}function r5(e,t){const r=ac(t);return r===null?!1:r===e?!0:i5.includes(e)&&Kr[r].kind===e}const a5=new Set(Ya.filter(e=>Object.values(Kr).some(t=>t.kind===e)));function Sg(e){return e.filter(t=>a5.has(t))}function X2(e){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const t=new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function o5(e){return typeof e=="string"&&/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(e)}function l5(e){if(typeof e!="string"||!/^\+?[\d\s().-]+$/.test(e))return!1;const t=e.replace(/\D/g,"").length;return t>=7&&t<=15}function s5(e){try{return new URL(e)}catch{return null}}function Ns(e){const t=e.trim();return t&&(/^https?:\/\//i.test(t)?t:`https://${t}`)}function Eg(e){const t=s5(e);if(t===null||t.protocol!=="http:"&&t.protocol!=="https:"||t.username!==""||t.password!=="")return!1;const r=t.hostname;return r.includes(".")&&!r.startsWith(".")&&!r.endsWith(".")}function c5(e){const t=e.trim();if(!t)return null;const r=ac(t);if(r==="matterport"){const a=new URL(t).searchParams.get("m");return a!==null&&/^[A-Za-z0-9]+$/.test(a)?`https://my.matterport.com/show/?m=${a}&nt=1`:null}return r!==null&&u5.has(r)?t:null}const u5=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);function Z2(e,t){return[e,t].map(r=>(r??"").trim()).filter(r=>r!=="").join(", ")}const d5=["autocomplete","manual_pinned","resolved"],W2=["street","unit","city","state","postal"],_g=[...W2,"latitude","longitude"];function Dd(e){return _g.includes(e)}function xs(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function Px(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function xi(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,r=Px(t.latitude,90),a=Px(t.longitude,180),l=r!==null&&a!==null,c=t.source,u={street:xs(t.street),unit:xs(t.unit),city:xs(t.city),state:xs(t.state),postal:xs(t.postal),latitude:l?r:null,longitude:l?a:null,source:typeof c=="string"&&d5.includes(c)?c:null};return l||W2.some(m=>u[m]!==null)?u:null}function jg(e){var t;return((t=/^\s*(\d{5})-?\d{4}\s*$/.exec(e))==null?void 0:t[1])??e}function f5(e){const t=Z2(e.street,e.unit),r=[e.state,e.postal===null?null:jg(e.postal)].filter(l=>l!==null).join(" "),a=[t,e.city??"",r].filter(l=>l!=="").join(", ");return a===""?null:a}function h5(e,t){const r=xi(e);return r===null?null:r[t]}const J2=["crop","cutout","mask_white","mask_black"],m5=["master","crop","cutout","mask_white","mask_black","poster","encode"];function oc(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function p5(e,t=e){return{id:t,file:e,crop:null,name:null,renditions:{crop:null,cutout:null,mask_white:null,mask_black:null}}}function g5(e){var t;return e.url!==null?e.url.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):((t=e.key)==null?void 0:t.split("/").pop())??e.id}function y5(e,t){const{id:r,renditions:a,...l}=e,c=e.kind==="image";return{...l,id:t.id,file:t.file,crop:c?t.crop:null,name:t.name!==null&&t.name!==""?t.name:g5(e),renditions:{...a,crop:c?t.renditions.crop:null,cutout:c?t.renditions.cutout:null,mask_white:c?t.renditions.mask_white:null,mask_black:c?t.renditions.mask_black:null}}}function b5(e){const{id:t,file:r,crop:a,name:l,renditions:c,...u}=e,{crop:m,cutout:p,mask_white:g,mask_black:b,...v}=c;return{file:{...u,id:r,renditions:v},value:{id:t,file:r,crop:a,name:l,renditions:{crop:m,cutout:p,mask_white:g,mask_black:b}}}}function Og(e,t){return y5(e,t)}function v5(e){return e.url===null?"upload":"link"}function Yi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ld(e){if(!Yi(e))return!1;const{id:t,kind:r,renditions:a}=e;return typeof t=="string"&&typeof r=="string"&&bn(r)&&Yi(a)}function lc(e){return Yi(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Yi(e.renditions)&&!("kind"in e)&&!("picked"in e)}function eS(e){return Yi(e)&&typeof e.file=="string"&&e.file!==""&&!lc(e)&&!Ld(e)}function Yr(e){return Yi(e)&&typeof e.media=="string"&&e.media!==""}function Hr(e){if(Yi(e)){if(Yr(e))return e.media;if(lc(e)||Ld(e))return e.id;if(eS(e))return e.picked??e.file}}function x5(e){if(Yr(e))return e.media;if(eS(e))return e.file}function sp(e,t){if(Array.isArray(e))for(const r of e)sp(r,t);else if(lc(e))t.has(e.id)||t.set(e.id,e);else if(Yi(e)&&!Ld(e))for(const r of Object.values(e))sp(r,t)}function zd(e){const t=new Map;for(const[r,a]of Object.entries(e))r!=="files"&&sp(a,t);return t}function w5(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function k5(e,t){const r=Object.hasOwn(t,"crop"),a=t.renditions??{},l=r?null:e.renditions,c=Object.fromEntries(J2.map(u=>[u,Object.hasOwn(a,u)?a[u]??null:(l==null?void 0:l[u])??null]));return{crop:r?t.crop??null:e.crop,renditions:c}}function Ag(e,t){return w5(t)?{...e,...k5({crop:e.crop,renditions:e.renditions},t)}:e}function ad(e){if(Array.isArray(e))return e.map(ad);if(!Yi(e))return e;if(Ld(e)||lc(e))return{media:e.id};if(Yr(e)){const{crop:r,renditions:a,...l}=e;return l}const t={};for(const[r,a]of Object.entries(e))t[r]=ad(a);return t}const od="property.uploads";function sc(e){if(typeof e=="string"&&e!=="")return[e];if(!(!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")))return[...e]}function ld(e){const t=Ir(e);if(t.length===0)return null;const r=sc(e.from);return r===void 0?{kinds:t}:{kinds:t,from:r}}function Ls(e){return{kinds:e.kinds,from:sc(e.from)??[od]}}function tS(e){return Ls(e).from[0]}function cp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function S5(e){if(Hr(e)!==void 0||!cp(e))return e;for(const t of Object.values(e))if(Hr(t)!==void 0)return t}function nS(e,t){const[r,...a]=t.split(".");if(r!=="property"||a.length===0)return null;let l=e;for(const c of a)if(l=Array.isArray(l)?l.find(u=>cp(u)&&u.id===c):cp(l)&&Object.hasOwn(l,c)?l[c]:void 0,l===void 0)return null;return Array.isArray(l)?l.flatMap(c=>{const u=S5(c),m=Hr(u);return m===void 0?[]:[{id:m,value:u}]}):null}function E5(e,t){const r=zd(e),a=new Set,l=[];for(const c of sc(t.from)??[])for(const{id:u,value:m}of nS(e,c)??[]){if(a.has(u))continue;const p=r.get(u),g=p===void 0||!Object.hasOwn(e.files,p.file)?void 0:e.files[p.file];if(p===void 0||g===void 0||!t.kinds.includes(g.kind))continue;a.add(u);const b=Yr(m)?Ag(p,m):p;l.push({id:u,value:b,file:g,list:c})}return l}function _5(e,t){const r={uploads:(e[od]??t.map(a=>a.id)).map(a=>p5(a))};for(const[a,l]of Object.entries(e)){const[c,u,...m]=a.split(".");if(c!=="property"||u===void 0||m.length>0)throw new Error(`media candidates: "${a}" names no top-level property list`);a!==od&&(r[u]=l.map(p=>({media:p})))}return{...r,files:Object.fromEntries(t.map(a=>[a.id,a]))}}function j5(e,t){const r=new Map(t.map(c=>[c.id,b5(c)])),a=_5(e,[...r.values()].map(({file:c})=>c)),l=a.uploads.map(c=>{var u;return((u=r.get(c.id))==null?void 0:u.value)??c});return{...a,uploads:l}}function O5(e){if(e===null||typeof e!="object")return null;const t=e;return t.type!=="media"||t.kinds===void 0||K2({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&(!Array.isArray(t.from)||sc(t.from)===void 0)?null:ld(t)}function A5(e,t){const r=new Set(e),a=t.filter(u=>r.has(u)),l=new Set(a);let c=0;return e.map(u=>l.has(u)?a[c++]:u)}const $o=new Map;function iS(e){$o.set(e.home,e)}function rS(e){const t=$o.get(e);if(t===void 0)throw new Error(`fact registry: the ${e} registry is not declared yet — import @homepages/template-contracts/fact-registry (or ./fact-keys, ./table-members) before reading it.`);return t}const aS=new Set(["text","select","email","phone","url","date"]);function Ng(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return N5(e.element);default:return aS.has(e.type)?"text":null}}function N5(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":aS.has(e.type)?"text_list":null}function up(e){if(e.type==="list"){const r=e.element;if(r.type!=="object")return up(r);for(const a of Object.values(r.fields)){const l=up(a);if(l!==void 0)return l}return}const t=e.from===void 0?null:ld(e);return(t==null?void 0:t.from)===void 0?void 0:t}function M5(e){if(e.type!=="list")return!1;const t=e.element.type;return bn(t)||t==="media"}function C5(e){return Object.entries(e.pages).flatMap(([t,r])=>M5(r.declaration)?[`${e.home}.${t}`]:[])}function R5(e){return vg(e.source)}const Vx=new WeakMap;function oS(e){let t=Vx.get(e);return t===void 0&&(t=T5(e),Vx.set(e,t)),t}function T5(e){const t=new Map;for(const[r,a]of Object.entries(e.pages)){const l=a.declaration;if(l.type==="list")continue;const c=`${e.home}.${r}`;if(l.type==="address"){t.set(c,{declaration:l,value_type:"address"});for(const u of _g)t.set(`${c}.${u}`,{declaration:l,value_type:lS(u)});continue}t.set(c,{declaration:l,value_type:D5(c,l)})}return t}function D5(e,t){if(t.type==="image")return"image";if(bn(t.type)||t.type==="media")throw new Error(`fact registry: ${e} is a single ${t.type} — a top-level media fact is an image, the one media value a slot binds.`);return t.type==="number"?"number":"text"}function lS(e){return e==="latitude"||e==="longitude"?"number":"text"}function L5(e,t){if(t.type!=="list")return null;const r=t.element;return r.type==="object"?e:r.type==="row"?r.from.slice(r.from.indexOf(".")+1):null}let zm;function sS(){if(zm!==void 0)return zm;rS("library");const e=new Map;for(const t of $o.values())for(const[r,a]of Object.entries(t.pages)){const l=L5(r,a.declaration);l!==null&&e.set(`${t.home}.${r}`,l)}return $o.has("property")&&$o.has("library")&&(zm=e),e}function z5(){return[...new Set(sS().values())]}function ln(e){return typeof e=="string"?sS().get(e)??null:null}function Mg(e){return(e==null?void 0:e.kind)==="home"?ln(e.key):null}function Cg(e){for(const t of $o.values()){const r=Object.hasOwn(t.pages,e)?t.pages[e]:void 0;if((r==null?void 0:r.declaration.type)==="list"&&r.declaration.element.type==="object")return t.home}throw new Error(`fact registry: no linked registry declares a table "${e}"`)}function cS(e){return`property.${e}`}function uS(e,t){const r=e.pages[t],a=(r==null?void 0:r.declaration.type)==="list"?r.declaration.element:void 0;if((a==null?void 0:a.type)!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return a.fields}function dS(e){return uS(rS(Cg(e)),e)}function fS(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function cc(e,t){const r=fS(dS(e),t);return r===void 0?void 0:Ng(r)}function $5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const r=ln(e.slice(0,t));if(r===null)return null;const a=e.slice(t+1);return cc(r,a)==="row_list"?{table:r,member:a}:null}function U5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const r=e.slice(0,t),a=ln(r);if(a===null)return null;const l=e.slice(t+1);return cc(a,l)===void 0?null:{table:a,tableKey:r,member:l}}const Rg=["type","label","from","source","locked","when"],Gx=new Set(Rg),Tg=Symbol.for("@homepages/concrete:table-of");function hS(e,t){return Object.defineProperty(e,Tg,{value:t,enumerable:!1})}function Dg(e){if(typeof e!="object"||e===null)return null;const t=e[Tg];return typeof t=="string"?t:null}function I5(e){return Object.keys(dS(e))}function zs(e,t){return Object.freeze({kind:"row",field:t,[B2]:e})}function H5(e,t){return new Proxy(zs(e,t),{get(r,a,l){return typeof a=="string"&&!(a in r)&&Dd(a)?zs(e,`${t}.${a}`):Reflect.get(r,a,l)}})}const mS=Symbol.for("@homepages/concrete:row:definition");function wi(e){const t=e[mS];return typeof t=="object"&&t!==null?t:e}const B5=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function q5(e,t,r=[]){const a=t===null?null:new Set(I5(t)),l=new Proxy(e,{get(c,u,m){if(u===mS)return c;if(typeof u!="string")return Reflect.get(c,u,m);if(t!==null&&a!==null){const p=[t,...r],g=p.map(v=>v===t&&!a.has(u)?void 0:cc(v,u));if(g.every(v=>v===void 0))return Reflect.get(c,u,m);const b=g.findIndex(v=>v===void 0||v!==g[0]);if(b===-1)return g[0]==="address"?H5(l,u):zs(l,u);if(u in c||Gx.has(u))return Reflect.get(c,u,m);throw new Error(`row: "${String(c.label)}" reads the member "${u}", which its \`from\` table ${p[b]} ${g[b]===void 0?"lacks":"holds at another kind"} — every table a row names carries every member its readers read, at one kind.`)}return u in c||Gx.has(u)?Reflect.get(c,u,m):B5.has(u)?void 0:zs(l,u)}});return l}function F5(e){const t=new Proxy(e,{get(r,a,l){return typeof a=="string"&&!(a in r)&&Dd(a)?zs(t,a):Reflect.get(r,a,l)}});return t}function Kx(e,t){const r=e.map(t);return r.some((a,l)=>a!==e[l])?r:void 0}function Yx(e,t){const r=e.reads===void 0?void 0:Kx(e.reads,t),a=e.requires===void 0?void 0:Kx(e.requires,t);return r===void 0&&a===void 0?e:{...e,...r===void 0?{}:{reads:r},...a===void 0?{}:{requires:a}}}function nl(e,t){const r=wi(e);let a;const l=r.source;if(l!==void 0)if(Ur(l)){const u=Yx(l,t);u!==l&&(a={...r,source:u})}else{const u=t(l);u!==l&&(a={...r,source:u})}const c=Vr(r);if(c!==void 0){let u=!1;const m=c.map(p=>{const g=Yx(p,t);return g!==p&&(u=!0),g});u&&(a={...a??r,[wg]:m})}return a??r}function P5(e){return t=>{const r=rc(t);if(r===void 0)return t;const a=e.get(r);return a===void 0?t:{kind:"row",slot:a,field:t.field}}}const pS=new Set(["row","address"]);function V5(e){const t=new Map;for(const[r,a]of Object.entries(e))typeof a=="object"&&a!==null&&pS.has(a.type)&&t.set(a,r);return t}function G5(e,t,r){const a=[e.source];nl(e,l=>(a.push(l),l));for(const[l,c]of t)if(!(l===e||c===r))for(const u of Rg){const m=l[u];if(m!==void 0&&a.includes(m))return`${c}.${u}`}}function K5(e){const t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member — a row's ${Rg.map(r=>`\`${r}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function $s(e){return pS.has(e.type)?{...wi(e)}:e}function Lg(e,t){for(const r of Pr(t,e)??[])if(!(r.verb!=="pick"||r.of===void 0))throw new Error(`${e}'s \`fill.pick\` states \`of\` — a pick chooses from its holder's \`from\`; remove \`of\` and name the candidates in \`from\`.`)}function Y5(e){return ml(e)?{kind:"section",section:e.section,slot:e.slot}:Bn(e)?{kind:"sibling",of:e}:Zt(e)?{kind:"home",key:e.key}:e}function ci(e){return zg(e,Y5)}function Q5(e,t,r){if(!(t!==!0||r===void 0)){if(Ur(r)){if(r.requires!==void 0&&r.requires.length>0)return;throw new Error(`${e} is \`required\` and sourced by a \`compute()\` naming no \`requires\` — nothing to require. Name the reads the value cannot do without: \`compute({ reads, requires: [fact.property.address] }, …)\`.`)}if(ml(r)||Bn(r)||bg(r))throw new Error(`${e} is \`required\` and mirrors another slot — a mirror requires its upstream; mark that slot \`required\` instead.`)}}function zg(e,t){const r=e.source;Q5(e.label??"a slot",e.required,r);const a=r!==void 0&&Pr(r,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...a?{source:t(r)}:{},...WC(r),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function $m(e){return t=>({type:"text",size:e,...ci(t),...t.cap!==void 0?{cap:t.cap}:{}})}const yn={short:$m("short"),medium:$m("medium"),long:$m("long")};function on(e){return{type:"number",...ci(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function X5(e){return{type:"select",...ci(e),...e.creatable!==void 0?{creatable:e.creatable}:{}}}function Z5(e){if(Zt(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` — a select takes exactly one set of choices.`);return Lg(`select: "${e.label}"`,e.source),{type:"select",...ci(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function W5(e,t){if(qa(t.source)&&t.source.verb!=="pick")throw new Error(`select: a display entry is filled by \`fill.pick\` — the model picks one of its cases — never \`fill.${t.source.verb}\`.`);return Lg("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function J5(e){if(Array.isArray(e))throw new Error("select: takes one options object — write the choices as `from`: `select({ from: [...], … })`.");if(e.options!==void 0)throw new Error("select: declares `options` — a select names its choices in `from`: `select({ from: [...], … })`.");return e.label===void 0&&Array.isArray(e.from)?W5(e.from,e):e.from!==void 0?Z5(e):X5(e)}const sd=J5;function zo(e){return{type:"url",...ci(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function gS(e){return{type:"date",...ci(e)}}function e4(e){return{type:"email",...ci(e)}}function t4(e){return{type:"phone",...ci(e)}}function $g(e={}){return F5({type:"address",...ci(e)})}function yS(e,t){const r=`${e}: "${t.label??e}"`;Lg(r,t.source);const a=K2({type:e,kinds:t.kinds,process:t.process});if(a!==null)throw new Error(`${r} ${a}.`);const l=Pr(t.source,r),c=t.source!==void 0&&l===void 0&&!Ur(t.source);if(c&&t.from!==void 0)throw new Error(`${r} picks \`from\` a media list and declares a \`source\` — a slot bound to a fact holds what that fact holds.`);if((c||Ur(t.source))&&t.process!==void 0)throw new Error(`${r} declares \`process\` beside a \`source\` that derives its value — a derived slot holds what it derives from, processed where that is declared.`);if((l==null?void 0:l.some(p=>p.verb==="pick"))===!0&&t.from===void 0)throw new Error(`${r} is picked by a \`fill.pick\` and names no \`from\` — a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its media.`);const u=n4(r,e,t.kinds,t.from),m=u==null?void 0:u.map(p=>Zt(p)?p.key:p);return{...m!==void 0?{from:m.length===1?m[0]:m}:{},...t.process!==void 0?{process:t.process.map(p=>({...p}))}:{}}}function n4(e,t,r,a){if(a===void 0)return;const l=Array.isArray(a)?a:[a];if(l.length===0)throw new Error(`${e} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its media.`);const c=Ir({type:t,kinds:r}),u=new Set;for(const m of l){const p=typeof m=="object"&&m!==null&&!Zt(m),g=Zt(m)?m.key:p&&"declaration"in m?m.declaration:m;if(u.has(g))throw new Error(`${e} picks \`from\` one media list twice — each list is named once; a media value two lists hold is one candidate, attributed to the first.`);if(u.add(g),!p)continue;const b=Ir(g.element);if(b.length>0&&!c.some(v=>b.includes(v)))throw new Error(`${e} picks \`from\` a list of ${b.join(", ")}, whose items can never be ${c.join(" or ")} — each list it picks from holds items of its kinds.`)}return l}function Lr(e={}){return{type:"image",...ci(e),...e.crop!==void 0?{crop:e.crop}:{},...yS("image",e)}}function Ug(e={}){return{type:"media",...ci(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...yS("media",e)}}const Ig=Symbol.for("@homepages/concrete:object:declared-fields");function gl(e){return e[Ig]}function bS(e,t){const r=gl(t);return r!==void 0&&Object.defineProperty(e,Ig,{value:r,enumerable:!1}),e}const vS="a label is a source, as a text slot takes one",dp="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",i4=new Set(["type","size","cap","locked"]);function r4(e,t,r){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} — ${vS}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(Bn(t)){const a=Object.entries(r).find(([,l])=>l===t);if(a===void 0)return a4(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${a[0]}", a "${t.type}" — a label names a text or an address field.`);return{field:a[0]}}if(Td(t)){const a=qa(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${a} — the label is the fill's holder, so it states the kind the fill writes: ${dp}.`)}return yn.short({locked:!0,source:t})}function a4(e,t){const r=Vr(t);if(r===void 0||r.some(u=>u.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields — ${vS}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${dp}; a title the user edits is a field, which the label names by its const.`);const a=Object.keys(t).filter(u=>!i4.has(u));if(a.length>0)throw new Error(`${e} label is a written text slot declaring ${a.map(u=>`\`${u}\``).join(", ")} — a label states only its kind and cap: ${dp}; a title the user edits is a field, which the label names by its const.`);const{size:l,cap:c}=t;return yn[l]({locked:!0,source:r.length===1?r[0]:r,...c!==void 0?{cap:c}:{}})}function o4(e){const{type:t,element:r}=e;if(t==="object")return"an object — an object never holds another; flatten its fields into this one";if(t==="list"&&(r==null?void 0:r.type)==="object")return l4(e);if(t==="list"&&(r==null?void 0:r.type)==="row")return"a list of rows — declare the selection at the top level instead"}const Ms="declare the list at the top level instead";function l4(e){const t=Vr(e);if(t!==void 0&&t.some(l=>l.verb!=="pick")||t===void 0&&Td(e.source))return`a list of objects declaring a fill other than a pick — no fill but a pick writes a list inside an object; ${Ms}`;const r=e.source;if(Zt(r))return`a list of objects sourced by the fact "${r.key}" — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Ms}`;if(ml(r)||bg(r)||Bn(r))return`a list of objects sourced by another list slot — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${Ms}`;const a=e.element.fields;for(const[l,c]of Object.entries(a)){const u=s4(c,a);if(u!==void 0)return`a list of objects whose item field "${l}" is ${u}`}}function s4(e,t){var c,u;if(e.type==="list"&&((c=e.element)==null?void 0:c.type)==="object")return"a list of objects — a list of objects nests one level; flatten the inner list's fields into this item or declare it beside the outer list";if(Vr(e)!==void 0)return`filled — no fill writes into a list inside an object; ${Ms}`;const r=e.source;if(r===void 0)return;if(Ur(r))return`a \`compute()\` — an item of a list inside an object reads its element, or a row \`from\` its member; ${Ms}`;const{kind:a,slot:l}=r;if(a==="element"&&e.type==="row"&&ln(e.from)!==null)return"a table's row holding the element — the element of a list inside an object is a member's item: hold it in a row `from` that member (`row({ label, from: unit.floor_plans, source: entry })`)";if(a!=="element"&&!(e.type!=="row"&&a==="row"&&typeof l=="string"&&((u=t[l])==null?void 0:u.type)==="row"))return"bound to something outside its item — an item of a list inside an object reads its element, a row `from` its member, or a row beside it"}function uc(e){const t="object";if(e.source!==void 0)throw new Error(`${t} declares \`source\`, but an object is a pure container with no value of its own — declare it on the field that holds the value.`);if(Object.hasOwn(e.fields,"label")&&e.fields.label!==e.label)throw new Error(`${t} declares a field keyed "label" — the key is reserved for the object's label: write its source as \`label\`, beside \`fields\`.`);const r=Fx.find(b=>Object.hasOwn(e.fields,b));if(r!==void 0)throw new Error(`${t} field "${r}" is named like its binding's own \`${r}\` — a field is read straight off its object's binding, which owns ${Fx.map(b=>`\`${b}\``).join(", ")}. Rename the field.`);const a=e.label===void 0?void 0:r4(t,e.label,e.fields),l=a!==void 0&&!("type"in a)?a:void 0,c={...a===void 0||l!==void 0?{}:{label:a},...e.fields};if(Object.keys(c).length===0)throw new Error(`${t} declares no fields — an object groups at least one.`);for(const[b,v]of Object.entries(c)){const k=o4(v);if(k!==void 0)throw new Error(`${t} field "${b}" is ${k}.`);if(b!=="label"&&v.label===void 0)throw new Error(`${t} field "${b}" declares no \`label\` — every field of an object states the name the editor shows it by.`)}const u=V5(c);for(const[b,v]of Object.entries(c)){const k=G5(v,u);if(k!==void 0)throw new Error(`${t} field "${b}" ${K5(k)}`)}const m=P5(u),p={};for(const[b,v]of Object.entries(c))p[b]=$s(nl(v,m));const g={type:"object",...e.locked===!0?{locked:!0}:{},...l!==void 0?{label:l}:{},fields:p,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(g,Ig,{value:c,enumerable:!1}),g}function c4(e){if(e.type==="object")return null;const t=e.source;if(t===null||typeof t!="object")return null;const{kind:r,section:a,slot:l}=t;return r==="section"&&typeof a=="string"&&typeof l=="string"?{kind:"section",section:a,slot:l}:null}const dc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Hg(e,t){if(Object.hasOwn(e,t))return e[t];const r=t.indexOf(".");if(r<=0)return;const a=e[t.slice(0,r)];if((a==null?void 0:a.type)!=="object"||!dc(a.fields))return;const l=t.slice(r+1);return Object.hasOwn(a.fields,l)?a.fields[l]:void 0}function xS(e,t,r){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,r))return{path:t.container===void 0?r:`${t.container}.${r}`,def:t.siblings[r],sibling:!0};if(t.nested===!0)return;const a=Hg(e,r);return a===void 0?void 0:{path:r,def:a,sibling:!1}}function u4(e){return e==="row"||e==="address"}function d4(e,t,r){const a=xS(e,t,r);if(!(a===void 0||!u4(a.def.type)))return{...a,kind:a.def.type}}function f4(e){return ln(e.from)}function Us(e){if(!Array.isArray(e.from)){const t=f4(e);return t===null?[]:[t]}return e.from.flatMap(t=>ln(t)??[])}function h4(e,t){const r=new Set,a=[];for(const l of t){const c=e[l];for(const u of c){const m=cd(u.id);m===null||r.has(m)||(r.add(m),a.push({id:m,table:l}))}}return a}function m4(e,t,r){if(t.length>1&&r!==null){const a=h4(e,t).find(l=>l.id===r);if(a!==void 0)return a.table}return t[0]??null}function wS(e){if(e===void 0)return;if(Qx(e.source))return e;if(e.type!=="object"||!dc(e.fields))return;const t=Object.values(e.fields).filter(r=>Qx(r.source));return t.length===1?t[0]:void 0}function kS(e){const t=wS(e);return(t==null?void 0:t.type)==="row"?Us(t):[]}function Qx(e){return dc(e)&&e.kind==="element"}function p4(e,t){return SS(e,e.section,e.slots,t,new Set)}function Xx(e,t,r,a,l){const c=`${t??""}\0${a}`;if(l.has(c))return[];l.add(c);const u=Hg(r,a);return(u==null?void 0:u.type)==="row"?Us(u):(u==null?void 0:u.type)==="list"?SS(e,t,r,u,l):[]}function SS(e,t,r,a,l){var v;const c=dc(a.source)?a.source:void 0;if(c===void 0||c.kind==="authored"||c.kind==="derived")return kS(a.element);const u=Mg(c);if(u!==null)return[u];const{kind:m,section:p,slot:g}=c;if(m!=="section"||typeof p!="string"||typeof g!="string")return[];if(p===t)return Xx(e,t,r,g,l);const b=(v=e.sectionSlots)==null?void 0:v.call(e,p);return b===void 0?[]:Xx(e,p,b,g,l)}const cd=e=>typeof e=="string"&&e!==""?e:null;function g4(e,t=null){if(typeof e=="string")return t===null?null:cd(e);const r=y4(e);return r===null?null:cd(e[r])}function y4(e){return dc(e)?["id","media","file"].find(t=>cd(e[t])!==null)??null:null}function b4(e,t){if(Zt(e)){if(ln(e.key)===null)throw new Error(`list: "${t}" is sourced by the fact "${e.key}", which is no table — a list's source is a table, a list slot, a list-valued member, a \`compute()\` or a fill; a list of the property's media is picked (\`fill.pick\`) from its item's \`from\`, or computed over a media list (\`compute({ reads: [fact.property.property_media] }, …)\`).`);return{kind:"home",key:e.key}}if(ml(e))return{kind:"section",section:e.section,slot:e.slot};if(Bn(e))return{kind:"sibling",of:e};if(rc(e)!==void 0||Ur(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function ES(e){return Zt(e)?ln(e.key):Bn(e)&&e.type==="list"?Dg(e):null}const v4=new Set(["label","locked","placeholder","when","source"]);function x4(e){const t={};for(const[r,a]of Object.entries(e))v4.has(r)||(t[r]=a);return t}function w4(e,t){if(Zt(e)&&ln(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(const a of Pr(e,`list: "${t}"`)??[]){if(a.verb==="write")throw new Error(_S(t,"declares no `item`"));if(a.verb==="pick")throw new Error(fp(t,"declares no `item`"))}if(Td(e))return{type:"poi"};if(Bn(e)&&e.type==="list")return k4(e,t);const r=rc(e);if(r!==void 0){const a=Dg(r);if(a!==null&&cc(a,e.field)==="image_list")return{type:"image"}}throw new Error(`list: "${t}" declares no \`item\`, and its source does not say what its elements are — declare \`item\`: a plain slot (\`item: image()\`), or a function of the element (\`item: (el) => object({ … })\`).`)}function _S(e,t){return`list: "${e}" is written by a \`fill.write\` and ${t} — the item is the kind every written element is: a value slot (\`item: text.short({ cap: 80 })\`), an object exactly one field of which holds the element (\`question: text.medium({ label: "Question", cap: 48, source: el })\`), or an object declared plainly whose members the write answers (\`item: object({ label: text.short({ label: "Unit" }), fields: { … } })\`).`}function jS(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;const t=e.fields??{};return!Object.values(t).some(r=>$r(r.source))}function Zx(e,t){if(e.type!=="object")return;const r=Object.entries(e.fields).filter(([,a])=>{var l;return a.type!=="row"&&((l=a.source)==null?void 0:l.kind)==="element"});if(r.length!==1)throw new Error(_S(t,r.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(r.length)} fields (${r.map(([a])=>`"${a}"`).join(", ")}) — one field holds it`))}function k4(e,t){const r=e.element;if(r===void 0||r.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects — declare \`item\` to say what each item holds.`);return r.type==="row"?{type:"row",from:r.from,source:{kind:"element"}}:x4(r)}function fp(e,t){return`list: "${e}" is picked by a \`fill.pick\` and ${t} — the item holds the pick in the field holding its candidates: a candidate holder itself (\`item: image({ from: fact.property.property_media })\`, \`item: row({ label: "Agent", from: fact.property.contacts })\`), or an object exactly one field of which holds candidates and no source, which its siblings read by its const (\`const photo = image({ label: "Photo", from: fact.property.property_media }); object({ fields: { photo, caption: text.short({ label: "Caption", source: fill.write({ reads: [photo], brief }) }) } })\`).`}function hp(e){const t=wi(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(bn(t.type)||t.type==="media")&&t.from!==void 0}function mp(e){return wi(e).source===void 0&&Vr(e)===void 0}function OS(e,t){if(e.type!=="object")return hp(e)&&mp(e)?null:void 0;const r=gl(e)??e.fields??{},a=Object.entries(r).filter(([,u])=>typeof u=="object"&&u!==null&&hp(u)&&mp(u)),l=a.filter(([,u])=>wi(u).type!=="select"),c=l.length>0?l:a;if(c.length>1)throw new Error(`list: "${t}"'s item declares ${String(c.length)} fields with \`from\` and no source (${c.map(([u])=>`"${u}"`).join(", ")}) — a picked list's item holds its pick in exactly one; give the others a source of their own.`);return c.length===1?c[0][0]:void 0}function Wx(e){return{...$s(e),source:{kind:"element"}}}function Um(e,t){if(t===void 0)return null;const r=t===null?e:(gl(e)??e.fields)[t],a=wi(r);return a.type==="row"?ln(a.from):null}function S4(e,t){if(t===null)return Wx(e);const r=e,a=(gl(e)??r.fields)[t],l=u=>u===a||typeof u=="object"&&u!==null&&wi(u)===wi(a)?{kind:"element"}:u,c={};for(const[u,m]of Object.entries(r.fields))c[u]=u===t?Wx(m):nl(m,l);return bS({...r,fields:c},r)}function E4(e,t,r){const a=c=>{if(!$r(c))return c;if(VC(c)!==t)throw new Error(`list: "${r}"'s item reads the element of another list — an element is read only inside its own list's item.`);return{kind:"element"}};if(e.type==="object"){const c=e,u={};let m=!1;for(const[p,g]of Object.entries(c.fields))u[p]=$s(nl(g,a)),u[p]!==g&&(m=!0);return m?bS({...c,fields:u},c):c}return $s(nl(e,a))}function AS(e,t){const r=e.type==="object"?Object.entries(e.fields):[["",e]];for(const[a,l]of r){const c=l.source;if((c==null?void 0:c.kind)==="home")throw new Error(`list: "${t}"'s item${a===""?"":` field "${a}"`} is bound to the fact "${String(c.key)}", which is the same value in every item — read the element or a row's member instead; a property fact belongs in a fill's or a \`compute()\`'s \`reads\`.`)}}function _4(e,t){if(e.item===void 0)return w4(e.source,t);const r=new Set((Pr(e.source,`list: "${t}"`)??[]).map(p=>p.verb));if(r.has("pick")){const p=j4(e.item,t);return r.has("write")&&Zx(p,t),p}const a={},l=Object.freeze({kind:"element",[q2]:a,[Tg]:ES(e.source)}),c=typeof e.item=="function"?e.item(l):e.item;if(typeof c!="object"||c===null||typeof c.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);if(c.type==="list")throw new Error(`list: "${t}"'s item is a list — a list's item is a value slot, a row or an object; a list never holds lists.`);if(c.type!=="object"&&Vr(c)!==void 0)throw new Error(`list: "${t}"'s item declares a fill — one decision produces the whole list, so the fill belongs on the list's \`source:\`; a field of an object item may carry its own.`);AS(c,t);const u=E4(c,a,t);if(r.has("write")&&!jS(e.item)&&Zx(u,t),u.type==="object"||u.type==="row")return u;const m={...u};return delete m.locked,m}function j4(e,t){if(typeof e=="function")throw new Error(fp(t,"declares its item as a function"));if(typeof e!="object"||e===null||typeof e.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);const r=OS(e,t);if(r===void 0)throw new Error(fp(t,"its item declares no field with `from` and no source"));AS(e,t);const a=S4(e,r);if(a.type==="object"||a.type==="row")return a;const l={...a};return delete l.locked,l}function O4(e,t){const r=e.source;if(!(r===void 0||(Pr(r,"list")??[]).some(c=>c.verb==="pick"))||typeof e.item!="object"||e.item===null)return ES(r);const l=e.item;if(r===void 0){if(l.type!=="object")return Um(l,hp(l)?null:void 0);const c=Object.entries(gl(l)??{}).filter(([,u])=>wi(u).type==="row"&&mp(u));return c.length===1?Um(l,c[0][0]):null}return Um(l,OS(l,t))}function ti(e){const t=e.label??"list",r=e.source,a=Pr(r,`list: "${t}"`),l=jS(e.item),c=(a==null?void 0:a.every(g=>g.verb==="pick"||g.verb==="write"&&l))===!0;if(a!==void 0&&e.max===void 0&&!c)throw new Error(`list: "${t}" is filled but declares no \`max\` — a fill is an open supply, so the list bounds it.`);for(const g of a??[])if(g.verb==="pick"&&g.of!==void 0)throw new Error(`list: "${t}"'s \`fill.pick\` states \`of\` — a list's pick chooses from its item's \`from\`; remove \`of\`.`);const u={type:"list",...zg(e,g=>b4(g,t)),element:_4(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},m=Ur(r)?kS(u.element):void 0,p=m===void 0?O4(e,t):m.length===1?m[0]:null;return hS(u,p)}function $d(e,t){if(t!==void 0&&(typeof t!="object"||t===null||Array.isArray(t)))throw new Error(`process.${e}(): takes an options object, or nothing.`);const r={kind:"process",verb:e};for(const[l,c]of Object.entries(t??{}))c!==void 0&&(r[l]=c);const a=kg(r);if(a!==null)throw new Error(`process.${e}(): ${a}.`);return r}function A4(e){return $d("cutout",e)}function N4(e){return $d("autocrop",e)}function Qi(e,t){return $d(e,t)}function M4(e){return Qi("probe",e)}function C4(e){return Qi("understand",e)}function R4(e){return Qi("preview",e)}function T4(e){return Qi("ladder",e)}function D4(e){return Qi("transcode",e)}function L4(e){return Qi("poster",e)}function z4(e){return Qi("rasterize",e)}function $4(e){return Qi("fetch",e)}function U4(e){return Qi("tour_details",e)}function I4(e){return $d("crop",e)}const H4={cutout:A4,autocrop:N4},jt={...H4,probe:M4,understand:C4,preview:R4,ladder:T4,transcode:D4,poster:L4,rasterize:z4,fetch:$4,tour_details:U4,crop:I4};function B4(e,t="a list"){return`${e} is sourced by ${t} — a row's slot source names a row, which it mirrors. A list's first row is a \`compute()\` over the list: \`source: compute({ reads: [list] }, (rows) => rows[0] ?? null)\`.`}function q4(e,t){if(Zt(e))throw new Error(`row: "${t}" is sourced by the fact "${e.key}" — a table is a row's \`from\`, never its source: \`row({ label, from: fact.${e.key} })\` holds its first row, which the user may re-pick.`);if(ml(e))return{kind:"section",section:e.section,slot:e.slot};if(Bn(e))return{kind:"sibling",of:e};if($r(e)||Ur(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function F4(e,t){if(Array.isArray(e))return P4(e,t);const r=Zt(e)?ln(e.key):null;if(r!==null)return{key:e.key,tables:[r]};const a=rc(e);if(a!==void 0){const l=`${String(wi(a).from)}.${e.field}`;if($5(l)!==null)return{key:l,tables:[]}}throw new Error(e===void 0?`row: "${t}" declares no \`from\` — a row names its fact data: a table (\`row({ label, from: fact.property.contacts })\`) or a row's list-valued member (\`from: unit.floor_plans\`).`:`row: "${t}"'s \`from\` is ${Zt(e)?`the fact "${e.key}", which is not a table`:"no table or list-valued member"} — a row's \`from\` is a fact table (\`fact.property.contacts\`) or a table row's list-valued member (\`unit.floor_plans\`).`)}function P4(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` — a row names the table it is a row of.`);const r=[],a=[];for(const l of e){const c=Zt(l)?ln(l.key):null;if(c===null)throw new Error(`row: "${t}"'s \`from\` lists ${Zt(l)?`the fact "${l.key}", which is not a table`:"something that is no table"} — a row's list of \`from\` names tables (\`[fact.property.contacts, …]\`); a list-valued member is a row's only \`from\`.`);if(a.includes(c))throw new Error(`row: "${t}" names the ${c} table twice in \`from\` — each table is named once.`);r.push(l.key),a.push(c)}return{key:r.length===1?r[0]:r,tables:a}}function V4(e,t,r){const a=Dg(Bn(e)||$r(e)?e:void 0);if(!(a===null||t.includes(a)))throw new Error(`row: "${r}" is \`from\` the ${t.join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${a} — a row's source yields a row of its own \`from\`.`)}function G4(e){const{key:t,tables:r}=F4(e.from,e.label),a=r[0]??null;if(a===null&&!$r(e.source))throw new Error(`row: "${e.label}" is \`from\` the list-valued member "${t}" but its source is no element — a row from a member holds an item of it, the element of the list over that member: \`source: entry\`.`);if(Bn(e.source)&&e.source.type==="list")throw new Error(B4(`row: "${e.label}"`));const l=Pr(e.source,`row: "${e.label}"`);for(const m of l??[]){if(m.verb!=="pick")throw new Error(`row: "${e.label}" is filled by \`fill.${m.verb}\` — a row holds a row that exists, which only a \`fill.pick({ brief })\` out of its \`from\` yields.`);if(m.of!==void 0)throw new Error(`row: "${e.label}"'s \`fill.pick\` states \`of\` — a row's pick chooses from its \`from\`; remove \`of\`.`)}l===void 0&&e.source!==void 0&&a!==null&&V4(e.source,r,e.label);const c=zg(e,m=>q4(m,e.label)),u=hS({type:"row",from:t,...c},a);return q5(u,a,r.slice(1))}const NS=["property","library"];function Is(e){const t=e.indexOf("."),r=t===-1?"":e.slice(0,t);if(!NS.includes(r))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:r,key:e.slice(t+1)}}function K4(e){return e.type==="row"?e:null}function Y4(e){if(e.type!=="object")return null;for(const[t,r]of Object.entries(e.fields)){const a=r.source;if(bn(r.type)&&typeof a=="object"&&a!==null&&a.kind==="element")return t}return null}function Bg(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(r=>typeof r=="string")}function ud(e){const t=MS(e);return t===null?null:t.label??null}function MS(e){const t=Is(e),r=t.home==="library"?yl.pages:Xr.pages,[a,...l]=t.key.split(".");let c=a!==void 0&&Object.hasOwn(r,a)?r[a].declaration:void 0;for(const u of l)if((c==null?void 0:c.type)==="list")c=c.element;else if((c==null?void 0:c.type)==="object")c=Object.hasOwn(c.fields,u)?c.fields[u]:void 0;else return null;return(c==null?void 0:c.type)==="list"?c:null}function Fa(e){const t=[];let r=e;for(;r!==void 0&&!t.includes(r);){const a=MS(r);if(a===null)break;t.push(r),r=CS(a.element)}return t}function CS(e){const t=K4(e);if(t!==null)return Bg(t)[0];const r=e.type==="object"?Y4(e):null,a=e.type==="object"&&r!==null?e.fields[r]:e;if(!bn(a.type)&&a.type!=="media")return;const l=a.from,c=Array.isArray(l)?l[0]:l;return typeof c=="string"&&c!==""?c:void 0}function Q4(e){const t=typeof e=="string"?[e]:[...e],r=t[0];return r===void 0?[]:[...Fa(r).slice(1).filter(l=>!t.includes(l)).reverse().map(l=>[l]),t]}function X4(e){return e.head!==null}function Xi(e,t){if("label"in e)throw new Error("fact registry: a page head holds no `label` — the declaration states the fact's name");for(const r of["title","description"]){const a=e[r];if(typeof a=="string"&&a.trim()==="")throw new Error(`fact registry: a page declares an empty ${r}`)}return{head:e,declaration:t}}const Z4=new Set(["home","item"]);function pp(e,t,r){var c;const a=typeof t=="object"&&t!==null?r.pages.get(t):void 0;if(a!==void 0)return{kind:"home",key:`${r.home}.${a}`};if(GC(t)){const u=r.pages.get(t);if(u===void 0)throw new Error(`${e} reads a page that is not one of this registry's — a registry reads its own facts by their page's const.`);return{kind:"home",key:`${r.home}.${u}`}}const l=bg(t)?t.of:t;if(Bn(l)){const u=(c=r.fields)==null?void 0:c.get(l);if(u===void 0)throw new Error(`${e} reads the declaration "${l.label??l.type}", which is not a field of the same item — a field reads its siblings by their consts, and a top-level fact by its page's const.`);return{kind:"item",field:u}}if(Zt(t)&&[...r.pages.values()].some(u=>t.key===`${r.home}.${u}`))return{kind:"home",key:t.key};if(Zt(t))throw new Error(`${e} is bound to the fact "${t.key}" — a registry declares the facts; it reads a sibling page by its const and binds none.`);if(ml(t))throw new Error(`${e} reads a section's slot — a registry reads no section.`);if($r(t)&&r.picked===!0)return{kind:"element"};if($r(t))throw new Error(`${e} reads the element — a registry's list nothing picks is built by the user, so its item's fields read one another by const.`);if(rc(t)!==void 0)throw new Error(`${e} reads the member "${t.field}" of a row that is not a field of the same item.`);if(P2(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&Z4.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function W4(e,t,r){return Array.isArray(t)?t.length===1?Im(e,t[0],r):t.map(a=>Im(e,a,r)):Im(e,t,r)}function Im(e,t,r){const a=typeof t=="object"&&t!==null?r.pages.get(t):void 0,l=typeof t=="string"?t:a===void 0?void 0:`${r.home}.${a}`;if(l===void 0||!r.mediaLists.has(l))throw new Error(`${e} picks \`from\` something other than one of this registry's media lists — a media field picks from a list of media (the \`uploads\` page, a sorted list), by its const, or owns its media.`);return l}function gp(e,t,r){const a=t.reads.map(l=>pp(e,l,r));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:a}:{kind:"compute",fn:t.fn,reads:a,requires:t.requires.map(l=>pp(e,l,r))}}function J4(e,t){if(t.when!==void 0)throw new Error(`${e} declares \`when\` — a registry has no display variant; a page is drawn when a template reads it.`);if(t.required!==void 0)throw new Error(`${e} declares \`required\` — a fact requires nothing on its own account; what a property must answer is what its templates require.`);if(t.type==="poi")throw new Error(`${e} is a poi — a place the platform builds is no fact.`)}function e3(e,t,r){const a=Vr(r)??[];if(t==="library"&&a.length>0)throw new Error(`${e} declares a fill — a library's facts are the org's own, and nothing fills them.`);if(a.some(l=>l.verb==="find"))throw new Error(`${e} declares a \`find\` — a home's fact is answered, written or picked, never looked up.`)}function t3(e,t){const{type:r,fields:a}=t;if(r!=="object"||a===void 0)return;const l=Object.entries(a).filter(([,c])=>c.type==="row");if(l.length>0)throw new Error(`${e} holds a picked row in ${l.map(([c])=>`"${c}"`).join(", ")} — a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function n3(e){const t=new Map,r=e.fields;for(const a of[r,gl(e)??{}])for(const[l,c]of Object.entries(a))typeof c=="object"&&c!==null&&t.set(c,l);return t}function yp(e,t,r){var l;J4(e,t),e3(e,r.home,t);let a=$s(nl(t,c=>pp(e,c,r)));switch(a.from!==void 0&&(bn(String(a.type))||a.type==="media")&&(a={...a,from:W4(e,t.from,r)}),a.type){case"object":{const c={},u={...r,fields:n3(a)};for(const[m,p]of Object.entries(a.fields))c[m]=yp(`${e}.${m}`,p,u);a={...a,fields:c};break}case"list":{const c=a.max,u={home:r.home,pages:r.pages,mediaLists:r.mediaLists},m=((l=Vr(t))==null?void 0:l.some(g=>g.verb==="pick"))===!0,p=yp(`${e}[]`,a.element,m?{...u,picked:!0}:u);t3(`${e}[]`,p),a={...a,element:p,...vg(c)?{max:gp(`${e}.max`,c,u)}:{}};break}}return a}function i3(e,t,r,a){const l=`${e}.${t}`,c=yp(l,r.declaration,a);if(c.type==="object")throw new Error(`${l} is an object — a top-level fact is a value or a list; a group of fields is a list's item.`);if(c.label===void 0)throw new Error(`${l} declares no \`label\` — a top-level fact states the name its page and its Details section show it by.`);if(r.head===null)return{head:null,declaration:c};const{title:u,description:m}=r.head;return{head:{title:typeof u=="string"?u:gp(`${l}.title`,u,a),description:typeof m=="string"?m:gp(`${l}.description`,m,a)},declaration:c}}const r3=["home","pages"];function a3(e){return"head"in e&&"declaration"in e}function o3(e){const t=e.element;return e.type==="list"&&typeof(t==null?void 0:t.type)=="string"&&(bn(t.type)||t.type==="media")}function RS(e,t){if(!NS.includes(e))throw new Error(`fact registry: "${e}" is not a home`);const r=new Map,a=new Set,l={};for(const[p,g]of Object.entries(t)){if(r3.includes(p))throw new Error(`fact registry: ${e} declares a page keyed "${p}", a registry's own key`);r.set(g,p);const b=a3(g)?g:{head:null,declaration:g};l[p]=b,o3(b.declaration)&&a.add(`${e}.${p}`)}const c={home:e,pages:r,mediaLists:a},u={};for(const[p,g]of Object.entries(l))u[p]=i3(e,p,g,c);const m={home:e,pages:u};for(const p of Object.keys(t))m[p]={kind:"home",key:`${e}.${p}`};return m}function l3(e){const t=e.declaration.label;if(typeof t!="string")throw new Error("fact registry: a page's declaration states no label");return t}const s3=[{value:"for_sale",label:"For sale",icon:"tag",description:"List price, finance details, and a sold-ready layout."},{value:"for_rent",label:"For rent",icon:"key",description:"Monthly rent, lease terms, pets, and utilities."}],c3=["sold","active"],u3=["total","monthly"];function d3(e){return e==null?"active":"sold"}function f3(e){return e==="for_rent"?"monthly":"total"}const h3=6371e3;function m3(e,t,r,a){const l=p=>p*Math.PI/180,c=l(r-e),u=l(a-t),m=Math.sin(c/2)**2+Math.cos(l(e))*Math.cos(l(r))*Math.sin(u/2)**2;return 2*h3*Math.asin(Math.sqrt(m))}function p3(e,t){return(e==null?void 0:e.latitude)==null||e.longitude==null||(t==null?void 0:t.latitude)==null||t.longitude==null?null:Math.round(m3(t.latitude,t.longitude,e.latitude,e.longitude))}const g3=Xi({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ti({label:"Contacts",item:()=>{const e=yn.short({label:"Name",cap:256});return uc({label:e,fields:{headshot:Lr({label:"Headshot"}),name:e,title:yn.short({label:"Title",cap:128}),org_name:yn.short({label:"Organization",cap:256}),email:e4({label:"Email"}),phone:t4({label:"Phone"}),website:zo({label:"Website"}),address:$g({label:"Address"}),bio:yn.long({label:"Bio",cap:4e3}),logo_dark:Lr({label:"Logo for light backgrounds",process:[jt.cutout()]}),logo_light:Lr({label:"Logo for dark backgrounds",process:[jt.cutout()]}),instagram:zo({label:"Instagram"}),linkedin:zo({label:"LinkedIn"}),x:zo({label:"X"}),facebook:zo({label:"Facebook"})}})}})),yl=RS("library",{contacts:g3});iS(yl);const bp=Xi({title:"What’s the address?",description:"We’ll build your map and neighborhood details from this."},$g({label:"Address"})),TS=Xi({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},sd({label:"Listing intent",from:[...s3]})),Qr=Xi({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ti({label:"Uploads",item:Ug()})),qg=ti({label:"Media",item:Ug({kinds:["image","video","tour"],from:Qr}),source:ki.pick({brief:"Does this upload show the property? It belongs when its name or account says it is a photograph, a rendering, a video or a virtual tour of the property: its building, rooms, grounds, amenities, surroundings or views. It does not belong when its name or account says it is a floor plan or another diagram; a logo, wordmark or brand graphic; a headshot, portrait or other photograph of a person or people; a flyer, ad, business card, slide or other image that is mostly text; a screenshot; a map; or a scanned document page. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a walk through the property: aerial and street views first, then the approach and entry, then the interiors room by room (living spaces, kitchen and dining, bedrooms, bathrooms), then outdoor spaces, amenities, surroundings and views, with every shot of one space together. A video or tour sits with the space it shows, and one of the whole property comes first."})}),DS=ti({label:"Floor plans",item:Lr({label:"Floor plan",from:Qr,process:[jt.cutout({enclosed:"keep"})]}),source:ki.pick({brief:"Is this upload exactly one floor plan? A floor plan is a top-down view of one floor of a dwelling's rooms and walls — drawn or rendered, flat or in 3D, at any size. It belongs when its name or account says it shows one floor plan, whatever title, figures or text are printed around it. It does not belong when its name or account says it holds two or more plans, or says it is something else: a building key or locator diagram (the building's outline with one unit shaded), a site, plot, parking or driveway diagram, a standalone legend, scale bar or north arrow, a logo, a photograph, or plain text. When neither its name nor its account says what it is, or how many plans it holds, you cannot tell. Order what belongs from the lowest floor to the highest; plans of several units go in the order the units are numbered, each unit's floors together."})}),y3=ti({label:"Documents",item:Ug({kinds:["document","image","video"],from:Qr}),source:ki.pick({brief:"Does this upload set out the property's specifics? It belongs when its name or account says it records its figures, finances, terms, legal record, condition or plans: an offering memorandum, brochure, listing sheet, rent roll, financials, comparables, lease, survey, site plan, plan set, disclosure or report. It does not belong when its name or account says it is a photograph, rendering, video or tour showing the property; an image of floor plans or elevations; a logo; a photograph of people; an ad, sign or announcement; a map; or notes for whoever makes the marketing. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a buyer reads it: the offering memorandum, brochure or listing sheet first, then the financials, rent roll and comparables, then the leases, legal record and disclosures, then the reports, surveys and plans."})}),b3=Lr({label:"Hero",from:qg,source:ki.pick({brief:"Choose the single cover photo for the property's page. The cover is a wide banner above the property's address, so it must stand for the whole property at a glance. Only an image whose name or account says it is a photograph of the property can be chosen. Never choose a logo, wordmark or other brand graphic; an agent, team or company headshot; a flyer, ad, business card, slide or any image that is mostly text; a screenshot; a map; a scanned document or brochure page; or a floor plan or other diagram — nor an image whose name and account do not say what it is. Among the photographs of the property prefer, in order: a front exterior of the building; another exterior or aerial view; the widest, brightest shot of the main living space. Rank close-up details, bathrooms, utility spaces, empty rooms and anything that reads as a fragment rather than a place last: they are weaker covers, never excluded, so when they are the only photographs of the property, choose the best of them. If not one candidate is a photograph of the property, choose none: no banner beats a banner that is not the property."})}),v3=zo({label:"Website"}),x3=`Is this floor plan labelled for this unit? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A plan labelling several units, such as a shared floor printed "Unit 1/2/3", belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell. Order what belongs from the lowest floor to the highest.`,w3=`Is this photo labelled for this unit? Its label is read from its name, the text printed on it and a caption its account records, never from the rooms it shows, any figures, how much it looks like the unit or where it falls among the uploads. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A photo labelled for several units belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell.`,k3=[`List every dwelling the uploads present with its own specs printed — its beds, baths, square feet, asking price or rent written out for that dwelling: the home a listing describes, or each unit a building's documents name or number. A dwelling the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A plan or row printed for several units ("Unit 4/6") lists each of those units, each with what is printed for it. A dwelling named in several uploads, or on several pages, is one item carrying everything they print for it. A unit-mix row standing for several unnamed units is not a dwelling; neither is a commercial space, a whole building, a comparable property, a market average or a portfolio total.`,"Every member is what an upload prints as text for that dwelling, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows (the rooms, the doors, the spaces) is never a member's source. Never count rooms; never compute, round or convert a figure; never carry one across from another dwelling, a unit-mix average or the building's totals; never add what is usual for a dwelling of its kind. A figure printed for a neighbourhood, a development or the building is never a dwelling's, and a count or fee is 0 only where the uploads print none for that dwelling. A member no upload prints for that dwelling is null, and a null is always better than a guess.",`label: the unit's own name as printed — its unit number or name ("201", "Residence 201", "4B", "Penthouse 501"), without a word marking its status ("model", "available") — and never its street address. A dwelling presented alone, with no unit name, is always labelled "Home", whatever name the uploads print for the home itself.`,"beds, baths, sqft: exactly as printed for that dwelling; a studio has one bedroom.",'price: the asking price or monthly rent as written for that dwelling, or its status word ("Sold", "Leased", "Request for Info").','floor: the floor of its building the dwelling sits on, as printed ("3", "PH", "Ground", "3 to 4"); never read off its unit number.',"hoa_monthly: the HOA, condo or strata fee printed per month for that dwelling. A fee printed for another period, or for the building, is null.",'parking: the number of parking spaces printed for that dwelling ("1 deeded space" is 1, "two-car garage" is 2). Parking printed with no count, or for the building, is null.',"lot_sqft: the lot size printed in square feet for that dwelling: a home's own lot. A lot in another unit, or the lot of a building several dwellings share, is null.",`amenities: a feature this dwelling has that the other dwellings in its building do not, in a few words as an upload states it, such as "Private roof deck", "Corner unit", "Harbor views". Check each one against the other dwellings: a feature printed for two of them, or for the building, is the building's and goes on no dwelling, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most dwellings have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no dwelling with its own specs printed, return no items."].join(`
|
|
785
|
+
|
|
786
|
+
`),zu=yn.short({label:"Unit"}),S3=on({label:"Beds"}),E3=on({label:"Baths",decimals:!0}),LS=on({label:"Sq ft",thousandsSep:!0}),zS=yn.short({label:"Price",cap:40}),$S=yn.short({label:"Building floor(s)",cap:20}),US=on({label:"Parking spaces"}),IS=ti({label:"Amenities",max:12,item:yn.short({cap:40})});function HS(e,t){return ti({label:"Floor plans",source:ki.pick({reads:[e],brief:t}),item:uc({fields:{image:Lr({label:"Floor plan",from:DS}),floor:sd({label:"Floor",from:[...JC],creatable:!0})}})})}function BS(e,t){return ti({label:"Photos",source:ki.pick({reads:[e],brief:t}),item:Lr({label:"Photo",from:qg})})}const _3=Xi({title:"Tell us about the units",description:"Add each unit’s details and floor plans so they appear on your website."},ti({label:"Units",source:ki.write({reads:[Qr],brief:k3}),item:uc({label:zu,fields:{label:zu,beds:S3,baths:E3,sqft:LS,price:zS,floor:$S,hoa_monthly:on({label:"Monthly HOA fee"}),parking:US,lot_sqft:on({label:"Lot sq ft",thousandsSep:!0}),amenities:IS,floor_plans:HS(zu,x3),photos:BS(zu,w3)}})})),j3=`Is this floor plan labelled for this space? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A plan labelling several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell. Order what belongs from the lowest floor to the highest.`,O3=`Is this photo labelled for this space? Its label is read from its name, the text printed on it and a caption its account records, never from what it shows, any figures, how much it looks like the space or where it falls among the uploads. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A photo labelled for several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell.`,A3=["List every commercial space the uploads present with its own specs printed — its use, square feet, rent or price written out for that space: each shop, office suite, restaurant or other non-residential space a building's documents name or number. A space the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A space named in several uploads, or on several pages, is one item carrying everything they print for it. A dwelling is never a commercial space; neither is a whole building, a comparable property, a market average or a portfolio total.","Every member is what an upload prints as text for that space, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows is never a member's source. Never compute, round or convert a figure; never carry one across from another space or the building's totals; never add what is usual for a space of its kind. A member no upload prints for that space is null, and a null is always better than a guess.",`label: the space's own name as printed ("Retail A", "Suite 200", "Ground-floor restaurant"), without a word marking its status ("available", "leased"), and never its street address.`,'use: what the space is for, as printed ("Retail", "Office", "Restaurant").',"sqft: the square feet printed for that space.",'price: the rent or price as written for that space ("$45/SF/yr", "$8,500/mo"), or its status word ("Leased", "Call for pricing").','floor: the floor of its building the space sits on, as printed ("1", "Ground", "Mezzanine"); never read off its suite number.',"parking: the number of parking spaces printed for that space. Parking printed with no count, or for the building, is null.",`amenities: a feature this space has that the other spaces in its building do not, in a few words as an upload states it, such as "Corner frontage", "Drive-thru", "Grease trap". Check each one against the other spaces: a feature printed for two of them, or for the building, is the building's and goes on no space, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most spaces have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no commercial space with its own specs printed, return no items."].join(`
|
|
787
|
+
|
|
788
|
+
`),$u=yn.short({label:"Space"}),N3=Xi({title:"Tell us about the commercial spaces",description:"Add each space’s details and floor plans so they appear on your website."},ti({label:"Commercial spaces",source:ki.write({reads:[Qr],brief:A3}),item:uc({label:$u,fields:{label:$u,use:yn.short({label:"Use",cap:40}),sqft:LS,price:zS,floor:$S,parking:US,amenities:IS,floor_plans:HS($u,j3),photos:BS($u,O3)}})})),M3="List the comparable properties the uploads present: other properties an upload sets beside the property it markets, so that property's price and specs can be weighed against theirs. They appear as rows of a sales or rent comparables table, as panels with their own photo and figures, as numbered pins in a map legend, or as lines in a survey of recent trades. The property the uploads market is the one this request is for, whatever address they print for it; in a building, it is the building and every unit the uploads market in it. It is never a comparable, even where it appears in a comparables table or at the centre of a comparables map, and an upload presenting it or one of its units for itself, such as its listing sheet, brochure, price list or market history, presents no comparable. Another unit of its building is a comparable only where an upload sets it beside the property as one, such as a sister unit's earlier sale in a comps table. A market or area average, a portfolio total, or anything else that is not one property is not a comparable. Read every upload whole, including tables that continue onto the next page. Each figure is what an upload prints as text for that property, copied exactly, and a listing's remarks word for word: never counted off a floor plan, a photo or a map, never worked out from other figures (a price per unit times a unit count, a price over a size, the days between two dates, a yearly fee made monthly, an average of rows), and never carried over from a neighbouring row, a summary or the property itself. A studio has one bedroom. A property listed in several places is one item carrying every figure those places state. A figure no upload states for that property is null. When no upload sets another property beside the one it markets, return no items.",Hm=$g({label:"Address"}),Jx=gS({label:"Sale date"}),C3=Xi({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ti({label:"Comparables",max:50,source:ki.write({reads:[Qr,bp],brief:M3}),item:uc({label:Hm,fields:{address:Hm,price:on({label:"Price"}),sale_date:Jx,beds:on({label:"Beds"}),baths:on({label:"Baths",decimals:!0}),sqft:on({label:"Sq ft"}),photo:Lr({label:"Photo"}),year_built:on({label:"Year built"}),lot_sqft:on({label:"Lot sq ft"}),stories:on({label:"Stories",decimals:!0}),units:on({label:"Units"}),hoa_monthly:on({label:"HOA per month"}),list_price:on({label:"List price"}),listed_date:gS({label:"Listed date"}),mls_number:yn.short({label:"MLS number"}),description:yn.long({label:"Description"}),status:sd({label:"Status",from:[...c3],locked:!0,source:Lm({reads:[Jx]},e=>d3(e))}),distance_m:on({label:"Distance (m)",locked:!0,source:Lm({reads:[Hm,bp]},(e,t)=>p3(e,t))}),price_period:sd({label:"Price period",from:[...u3],locked:!0,source:Lm({reads:[TS]},e=>f3(e))})}})})),R3=Xi({title:"Who’s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ti({label:"Contacts",min:1,max:12,source:ki.pick({reads:[Qr],brief:"Choose this listing's contacts from the library's contacts, judging each one's name, title, organisation, email and phone against the read uploads' names and accounts. A contact may be chosen only when an upload's name or account says it prints their email or phone, or their full name, as a contact for this listing — an agent, broker, or sales or leasing contact. A contact the uploads leave out, where their accounts name the listing's contacts, is not chosen. A shared organisation, a matching first name, or a name printed in another role (an architect, a photographer, a seller) is not evidence. When no upload's account names any contact, choose none. Order those chosen as the uploads present them for this listing, the first or most prominent first."}),item:G4({label:"Contact",from:yl.contacts})})),Xr=RS("property",{address:bp,listing_intent:TS,description:Xi({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},yn.long({label:"Description"})),uploads:Qr,property_media:qg,floor_plans:DS,property_documents:y3,hero:b3,site_url:v3,units:_3,commercial_spaces:N3,contacts:R3,comparables:C3});iS(Xr);const T3=["text","number","select","url","email","phone","date"],D3=new Set(T3);function Fg(e){return D3.has(e)}function qS(e){return e.type===void 0||!Fg(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}const vp=new Set(["image","video","tour","document"]);function FS(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function Pg(e){const t=Object.values(e).filter(FS).map(l=>l!==null&&typeof l=="object"?l:{}),r=t.filter(l=>l.type!==void 0&&vp.has(l.type)),a=t.filter(l=>!(l.type!==void 0&&vp.has(l.type)));return r.length===1&&a.length<=2&&a.every(qS)}function L3(e){var r;if(((r=e.element)==null?void 0:r.type)!=="object")return null;const t=e.element.fields;return t!==null&&typeof t=="object"?t:{}}function PS(e,t){var l,c;const r=L3(e);if(r!==null)return Pg(r)?"annotated-media":"object";const a=(l=e.element)==null?void 0:l.type;return a!==void 0&&vp.has(a)?"media":a==="media"?((c=e.element)==null?void 0:c.from)===void 0&&t==="home"?"upload":"media":a==="row"?"row":a==="poi"?"poi":"scalar"}const z3={scalar:{expanded:"bullet-list",compact:"bullet-list"},media:{expanded:"gallery",compact:"gallery"},upload:{expanded:"media-manager",compact:"media-manager"},"annotated-media":{expanded:"annotated-gallery",compact:"annotated-gallery"},object:{expanded:"table",compact:"accordion"},row:{expanded:"row-bar",compact:"row-bar"},poi:{expanded:"poi-curation",compact:"poi-curation"}};function $3(e,t,r){const a=PS(e,r),l=a==="object"||a==="annotated-media"?"item":"unit";return{itemKind:a,view:z3[a][t],granularity:l}}function U3(e){return/[^aeiou]ies$/i.test(e)?e.slice(0,-3)+"y":/(?:ss|x|z|ch|sh)es$/i.test(e)?e.slice(0,-2):/[^s]s$/i.test(e)?e.slice(0,-1):e}function VS(e){return/^[A-Z][A-Z]/.test(e)?e:e.charAt(0).toLowerCase()+e.slice(1)}function Zr(e){const t=VS((e??"").trim());if(t==="")return{singular:"item",plural:"items"};const r=t.search(/\S+$/);return{singular:t.slice(0,r)+U3(t.slice(r)),plural:t}}function Vg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const I3=["verb","unique","brief","none","reads"];new Set(I3);function ew(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function H3(e){return!ew(e)||!Array.isArray(e.fills)?[]:e.fills.filter(ew).map(t=>({...t,kind:"fill"}))}function Gg(e){return e!==null&&typeof e=="object"?e:null}function fc(e){const t=Gg(e);if((t==null?void 0:t.kind)!=="row")return null;const{slot:r,field:a}=t;return typeof r!="string"||r===""||typeof a!="string"||a===""?null:{slot:r,field:a}}function GS(e){return Object.entries(e??{}).filter(([,t])=>{var r;return t.type==="row"&&((r=Gg(t.source))==null?void 0:r.kind)==="element"}).map(([t])=>t)}function B3(e){const t=new Set(GS(e)),r={};for(const[a,l]of Object.entries(e??{})){const c=fc(l.source);c!==null&&t.has(c.slot)&&(r[a]=c.field)}return r}function dd(e){var t;if(((t=e.element)==null?void 0:t.type)==="object")return e.element.fields}function q3(e){return dd(e)!==void 0}function F3(e){const t=Gg(e.source);if(t===null||t.kind==="authored")return{kind:"none"};const{kind:r,key:a,section:l,slot:c,transform:u}=t;if(r==="home"&&typeof a=="string"){const m=ln(a);if(m!==null)return{kind:"table",table:m}}return r==="section"&&typeof l=="string"&&typeof c=="string"?{kind:"section",section:l,slot:c}:r==="derived"&&typeof u=="string"?{kind:"derived",transform:u}:{kind:"other"}}function fd(e){return oS(Xr).has(e)}function KS(e){const t=oS(Xr).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function YS(e){return KS(e).value_type}function P3(){return C5(Xr)}function V3(e){return typeof e=="string"&&P3().includes(e)}function G3(e){if(!fd(e))return;const t=KS(e).declaration;return t.type==="select"?t.values:void 0}function K3(e){return typeof e=="string"?e:null}function Y3(e){const t=Hr(e);return t===void 0?null:{media:t}}function Q3(e,t){const[,r="",a]=e.split("."),l=t[r];switch(YS(`property.${r}`)){case"address":{const c=xi(l);return a===void 0?c:c===null?null:c[a]}case"image":return Y3(l);case"number":return typeof l=="number"?l:null;case"text":return K3(l)}}function Kg(e){return uS(Cg(e)==="library"?yl:Xr,e)}function QS(e,t){return fS(Kg(e),t)}function tw(e){return Object.keys(Kg(e))}function XS(e,t){if(t==="id")return{kind:"identity"};const r=t.indexOf("."),a=r===-1?t:t.slice(0,r),l=cc(e,a)??null;if(l===null)return{kind:"unknown",offers:tw(e)};if(r!==-1){const c=t.slice(r+1);return l!=="address"?{kind:"unknown",offers:tw(e)}:Dd(c)?{kind:"member",value_type:lS(c),storable:nw(e,t)}:{kind:"unknown",offers:_g.map(u=>`${a}.${u}`)}}return{kind:"member",value_type:l,storable:nw(e,t)}}function nw(e,t){if(t===void 0){if(ln(e)!==null)return!0;if(!fd(e))return!1;const a=e.slice(0,e.lastIndexOf("."));return!(fd(a)&&YS(a)==="address")}if(!z5().includes(e))return!1;const r=QS(e,t);return r!==void 0&&!R5(r)}function X3(e,t){const r=t.source;return(r==null?void 0:r.kind)!=="row"||typeof r.field!="string"||XS(e,r.field).kind==="unknown"?null:r.field}function Yg(e,t){if(t==null)return null;const r=X3(t,e);if(r===null)return null;const a=QS(t,r),l=a===void 0?null:Ng(a);if(a===void 0||l==null)return null;const c=up(a);return{table:t,member:r,value_type:l,...c!==void 0?{filter:c}:{}}}const Ud={kind:"owned"};function iw(e){return e===null?Ud:{kind:"picked",filter:e}}function il(e,t){if(e.from!==void 0)return iw(ld(e));const r=Yg(e,t);return r===null?null:r.filter===void 0?Ud:iw(ld({type:e.type,from:r.filter.from}))}function Id(e,t){return il(e,t)??Ud}function Z3(e,t,r){return il(t,r)??il({...t,source:e.source},r)}function W3(e,t,r){var l;const a=il(t,r.itemTable);return a!==null?a:r.picksBy!==null&&((l=t.source)==null?void 0:l.kind)==="element"?{kind:"picked",filter:r.picksBy}:il({...t,source:e.source},r.listTable)??Ud}const rw=1e-6;function J3(e,t){return e.w/e.h>t?{w:e.h*t,h:e.h}:{w:e.w,h:e.w/t}}function eR(e,t){const r=Math.max(e.w,e.h*t);return{w:r,h:r/t}}function tR(e,t){const r=Math.min(1,t.width/e.w,t.height/e.h);return{w:e.w*r,h:e.h*r}}function aw(e,t,r){const a=(l,c,u)=>Math.min(Math.max(l-c/2,0),u-c);return{x:a(t.x,e.w,r.width),y:a(t.y,e.h,r.height),w:e.w,h:e.h}}function nR(e,t,r,a){const l=eR(e,a);return l.w<=r.width+rw&&l.h<=r.height+rw?aw(tR(l,r),{x:e.x+e.w/2,y:e.y+e.h/2},r):aw(J3({w:r.width,h:r.height},a),t,r)}const ow=16/10;function lw(e){if(e===null||typeof e!="object")return null;const t=e,[r,a,l,c]=["x","y","width","height"].map(u=>t[u]);return![r,a,l,c].every(u=>typeof u=="number"&&Number.isFinite(u))||r===0&&a===0&&l===1&&c===1?null:{x:r,y:a,width:l,height:c}}function ZS(e){var c;if(e===null||typeof e!="object")return{mode:"free",aspect:ow};const t=e,r=typeof t.aspect=="number"&&t.aspect>0?t.aspect:ow,a=(c=t.mobile)==null?void 0:c.aspect,l=typeof a=="number"&&a>0&&Math.abs(a-r)>1e-4?a:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:r,...l===void 0?{}:{mobileAspect:l}}}function rl(e,t){if(e===null||t===null)return e===t;const r=a=>Math.round(a*1e4)/1e4;return r(e.x)===r(t.x)&&r(e.y)===r(t.y)&&r(e.width)===r(t.width)&&r(e.height)===r(t.height)}function iR(e,t,r){const{width:a,height:l}=t,c={x:e.x*a,y:e.y*l,w:e.width*a,h:e.height*l},u=nR(c,{x:c.x+c.w/2,y:c.y+c.h/2},t,r),m={x:u.x/a,y:u.y/l,width:u.w/a,height:u.h/l};return rl(m,{x:0,y:0,width:1,height:1})?null:m}function sw(e,t,r){return e===null||r===null?e:t===null?null:iR(e,t,r)}function WS(e,t){if(e===null||!(e>0)||!(t>0))return null;const r=Math.min(1,t/e),a=Math.min(1,e/t),l={x:(1-r)/2,y:0,width:r,height:a};return rl(l,{x:0,y:0,width:1,height:1})?null:l}function rR(e,t,r){var u,m;const a=zd(e).get(r);if(a===void 0)return;const l=sc(t)??[od],c=[...l,...Fa(l[0]).slice(1).filter(p=>!l.includes(p))];for(const p of c){const g=(m=(u=nS(e,p))==null?void 0:u.find(({id:b})=>b===r))==null?void 0:m.value;if(g!==void 0)return Yr(g)?Ag(a,g):a}return a}function aR(e,t,r){const a=t.width!==null&&t.height!==null&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null,l=sw(e.crop,a,r.mode==="free"?null:r.aspect),c=l===null||r.mobileAspect===void 0?null:sw(e.crop,a,r.mobileAspect),u=Object.values(e.renditions).some(m=>m!==null);return{file:e.file,picked:e.id,name:e.name,...l===null?{}:{crop:l},...a===null?{}:{ar:a.width/a.height},...c===null?{}:{mobile:{crop:c,derived:!0}},...u?{renditions:e.renditions}:{}}}function Qg(e){var l;const{mode:t,aspect:r,mobileAspect:a}=ZS(e.crop);return{mode:t,aspect:r,aspectLabel:(l=e.crop)==null?void 0:l.aspectLabel,mobileAspect:a}}function al(e){return e==null?null:{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function xp(e){return oR(e)?null:{x:e.nx,y:e.ny,width:e.nw,height:e.nh}}function hd(e,t,r){if(e==="free")return{nx:0,ny:0,nw:1,nh:1};const a=WS(t,r);return a===null?{nx:0,ny:0,nw:1,nh:1}:{nx:a.x,ny:a.y,nw:a.width,nh:a.height}}function cw(e,t,r){const a=e.nx+e.nw/2,l=e.ny+e.nh/2;if(!t||!r)return{...e};const c=t/r;let u=e.nw,m=u/c;return m>e.nh&&(m=e.nh,u=m*c),{nx:a-u/2,ny:l-m/2,nw:u,nh:m}}function oR(e){const t=r=>Math.round(r*1e4)/1e4;return t(e.nx)===0&&t(e.ny)===0&&t(e.nw)===1&&t(e.nh)===1}function lR(e,t,r,a){const l=e==null?void 0:e.rect;return l&&l.nw&&l.nh?{nx:l.nx,ny:l.ny,nw:l.nw,nh:l.nh}:hd(t,r,a)}const Er=52,sR=1,cR=6,uR=.94,an=(e,t,r)=>r<t?t:Math.max(t,Math.min(r,e));function Uu(e,t,r,a,l,c,u){e=Math.max(Er,e);const m=l>0?u.r-r:r-u.l;e=Math.min(e,m);let p=e/t;const g=c>0?u.b-a:a-u.t;return p>g&&(p=g,e=p*t),{w:Math.max(Er,e),h:Math.max(Er,e/t)}}function dR({src:e,mode:t,aspect:r,seed:a}){const l=x.useRef(null),[,c]=x.useReducer(K=>K+1,0),u=x.useRef(null),m=x.useRef({w:0,h:0}),p=x.useRef({z:1,icx:0,icy:0}),g=x.useRef({x:0,y:0,w:0,h:0}),b=x.useRef(!1),v=x.useRef(a??null),[k,w]=x.useState(null),j=()=>{const K=u.current,X=m.current;if(!K||!X.w)return{w:0,h:0};const le=Math.min(X.w/K.w,X.h/K.h)*uR;return{w:K.w*le,h:K.h*le}},E=()=>{const K=j(),X=p.current,le=K.w*X.z,M=K.h*X.z;return{l:X.icx-le/2,t:X.icy-M/2,r:X.icx+le/2,b:X.icy+M/2,w:le,h:M}},_=()=>{const K=E(),X=m.current;return{l:Math.max(K.l,0),t:Math.max(K.t,0),r:Math.min(K.r,X.w),b:Math.min(K.b,X.h)}},C=()=>{const K=E(),X=g.current,le=p.current,M=K.w/2,V=K.h/2;K.w>=X.w&&(le.icx=an(le.icx,X.x+X.w-M,X.x+M)),K.h>=X.h&&(le.icy=an(le.icy,X.y+X.h-V,X.y+V))},O=()=>{const K=g.current,X=_(),le=X.r-X.l,M=X.b-X.t;if(t==="locked"){let V=Math.min(K.w,le),te=V/r;te>M&&(te=M,V=te*r),K.w=V,K.h=te}else K.w=Math.min(K.w,le),K.h=Math.min(K.h,M);K.x=an(K.x,X.l,X.r-K.w),K.y=an(K.y,X.t,X.b-K.h)},A=()=>{O(),C(),O()},D=K=>{const X=m.current;if(!X.w||!u.current)return;p.current={z:1,icx:X.w/2,icy:X.h/2};const le=E(),M=u.current.w/u.current.h,V=K?lR(v.current,t,M,r):hd(t,M,r);g.current={x:le.l+V.nx*le.w,y:le.t+V.ny*le.h,w:V.nw*le.w,h:V.nh*le.h},A(),b.current=!0,c()};x.useEffect(()=>{b.current=!1,u.current=null,c();const K=new Image;K.onload=()=>{u.current={w:K.naturalWidth||1,h:K.naturalHeight||1},D(!0)},K.src=e},[e]),x.useEffect(()=>{v.current=a??null},[a]),x.useEffect(()=>{u.current&&D(!1)},[t,r]),x.useLayoutEffect(()=>{const K=l.current;if(!K)return;const X=()=>{const M=K.getBoundingClientRect(),V=m.current.w;m.current={w:M.width,h:M.height},!V&&u.current?D(!0):V&&(A(),c())};X();const le=new ResizeObserver(X);return le.observe(K),()=>le.disconnect()},[]);const R=K=>{const X=l.current.getBoundingClientRect();return{x:K.clientX-X.left,y:K.clientY-X.top}},P=K=>{var te,pe;if(K.button)return;K.stopPropagation(),(pe=(te=K.currentTarget).setPointerCapture)==null||pe.call(te,K.pointerId),w("move");const X=R(K),le={...g.current},M=Q=>{const N=R(Q),q=_(),I=g.current;I.x=an(le.x+(N.x-X.x),q.l,q.r-I.w),I.y=an(le.y+(N.y-X.y),q.t,q.b-I.h),c()},V=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),w(null)};window.addEventListener("pointermove",M),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},L=K=>X=>{var Q,N;if(X.button)return;X.stopPropagation(),(N=(Q=X.currentTarget).setPointerCapture)==null||N.call(Q,X.pointerId),w(K);const le=g.current,M={l:le.x,t:le.y,r:le.x+le.w,b:le.y+le.h},V=R(X),te=q=>{const I=R(q),F=_(),ae=I.x-V.x,ce=I.y-V.y;let he=M.l,be=M.t,$=M.r,de=M.b;if(t==="free")K.includes("w")&&(he=an(M.l+ae,F.l,$-Er)),K.includes("e")&&($=an(M.r+ae,he+Er,F.r)),K.includes("n")&&(be=an(M.t+ce,F.t,de-Er)),K.includes("s")&&(de=an(M.b+ce,be+Er,F.b));else{const ge=r;if(K==="se"){const _e=Uu(M.r+ae-M.l,ge,M.l,M.t,1,1,F);he=M.l,be=M.t,$=he+_e.w,de=be+_e.h}else if(K==="nw"){const _e=Uu(M.r-(M.l+ae),ge,M.r,M.b,-1,-1,F);$=M.r,de=M.b,he=$-_e.w,be=de-_e.h}else if(K==="ne"){const _e=Uu(M.r+ae-M.l,ge,M.l,M.b,1,-1,F);he=M.l,de=M.b,$=he+_e.w,be=de-_e.h}else if(K==="sw"){const _e=Uu(M.r-(M.l+ae),ge,M.r,M.t,-1,1,F);$=M.r,be=M.t,he=$-_e.w,de=be+_e.h}else{const _e=(M.l+M.r)/2,Re=(M.t+M.b)/2;let De=le.w,xe=le.h;K==="e"?De=(M.r+ae-_e)*2:K==="w"?De=(_e-(M.l+ae))*2:K==="s"?(xe=(M.b+ce-Re)*2,De=xe*ge):K==="n"&&(xe=(Re-(M.t+ce))*2,De=xe*ge),De=Math.max(Er,De),xe=De/ge,De=Math.min(De,F.r-F.l),xe=De/ge,xe>F.b-F.t&&(xe=F.b-F.t,De=xe*ge),he=an(_e-De/2,F.l,F.r-De),be=an(Re-xe/2,F.t,F.b-xe),$=he+De,de=be+xe}}g.current={x:he,y:be,w:$-he,h:de-be},c()},pe=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",pe),window.removeEventListener("pointercancel",pe),w(null)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)},T=(K,X,le)=>{const M=p.current;K=an(K,sR,cR);const V=K/M.z;M.icx=X+(M.icx-X)*V,M.icy=le+(M.icy-le)*V,M.z=K,A(),c()},H=K=>{const X=m.current;T(p.current.z*K,X.w/2,X.h/2)},ne=x.useRef(()=>{});ne.current=K=>{K.preventDefault();const X=m.current,le=Math.exp(-K.deltaY*.0015*(K.ctrlKey?2.6:1));T(p.current.z*le,X.w/2,X.h/2)},x.useEffect(()=>{const K=l.current;if(!K)return;const X=le=>ne.current(le);return K.addEventListener("wheel",X,{passive:!1}),()=>K.removeEventListener("wheel",X)},[]);const Y=()=>D(!1),oe=()=>{const K=E(),X=g.current;return K.w?{nx:an((X.x-K.l)/K.w,0,1),ny:an((X.y-K.t)/K.h,0,1),nw:an(X.w/K.w,0,1),nh:an(X.h/K.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:l,ready:b.current,activeHandle:k,imgRect:E,box:g.current,view:p.current,onBoxDown:P,onHandleDown:L,zoomBy:H,reset:Y,cropValue:oe,natAspect:u.current?u.current.w/u.current.h:null}}function fR({chrome:e,pct:t,onZoomOut:r,onZoomIn:a,resetSlot:l,children:c}){return d.jsxs("div",{className:e.foot,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[l,d.jsxs("div",{className:"flex h-9 items-center overflow-hidden rounded-[9px] border border-line",children:[d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:r,"aria-label":"Zoom out",children:d.jsx(e.ZoomOutIcon,{})}),d.jsx("span",{className:"grid h-9 min-w-[54px] place-items-center border-x border-line font-mono text-[12px] text-ink-2",children:t}),d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:a,"aria-label":"Zoom in",children:d.jsx(e.ZoomInIcon,{})})]})]}),d.jsx("div",{className:e.actions,children:c})]})}const hR=["n","s","e","w"],mR=["nw","ne","sw","se"];function pR({cr:e,mode:t,src:r,stageClassName:a}){const l=e.imgRect(),c=e.box,u=e.activeHandle!==null;return d.jsx("div",{className:`we-cs-stage ${a}`,ref:e.stageRef,children:e.ready&&d.jsxs(d.Fragment,{children:[d.jsx("img",{className:"we-cs-img",src:r,alt:"",draggable:!1,style:{left:l.l,top:l.t,width:l.w,height:l.h}}),d.jsxs("div",{className:`we-cs-box${u?" live":""}`,"data-mode":t,"data-crop-box":!0,style:{left:c.x,top:c.y,width:c.w,height:c.h},onPointerDown:e.onBoxDown,children:[d.jsx("div",{className:"we-cs-ring"}),d.jsxs("div",{className:"we-cs-thirds",children:[d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{})]}),hR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h edge ${m}`,onPointerDown:e.onHandleDown(m)},m)),mR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h corner ${m}`,onPointerDown:e.onHandleDown(m)},m))]})]})})}const gR=x.forwardRef(function({chrome:t,src:r,mode:a,aspect:l,seed:c,stageClassName:u="h-[412px]",footerActions:m,onUserEdit:p},g){const b=dR({src:r,mode:a,aspect:l,seed:c});x.useImperativeHandle(g,()=>({cropValue:()=>b.cropValue(),natAspect:()=>b.natAspect}),[b]);const v=Math.round(b.view.z*100)+"%",k=x.useRef(!1),w=x.useRef(!1),j=()=>{w.current=!0},E=()=>{w.current&&!k.current&&(k.current=!0,p==null||p())},_=()=>{w.current=!1};return d.jsxs(d.Fragment,{children:[d.jsx("div",{onPointerDownCapture:j,onPointerMoveCapture:E,onPointerUpCapture:_,children:d.jsx(pR,{cr:b,mode:a,src:r,stageClassName:u})}),d.jsx(fR,{chrome:t,pct:v,onZoomOut:()=>b.zoomBy(1/1.25),onZoomIn:()=>b.zoomBy(1.25),resetSlot:d.jsx("button",{type:"button",className:t.buttonLink,onClick:b.reset,children:"Reset"}),children:m})]})});function JS(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=JS(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function Xg(){for(var e,t,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=JS(e))&&(a&&(a+=" "),a+=t);return a}const yR=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},bR=(e,t)=>({classGroupId:e,validator:t}),eE=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),md="-",uw=[],vR="arbitrary..",xR=e=>{const t=kR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return wR(u);const m=u.split(md),p=m[0]===""&&m.length>1?1:0;return tE(m,p,t)},getConflictingClassGroupIds:(u,m)=>{if(m){const p=a[u],g=r[u];return p?g?yR(g,p):p:g||uw}return r[u]||uw}}},tE=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const l=e[t],c=r.nextPart.get(l);if(c){const g=tE(e,t+1,c);if(g)return g}const u=r.validators;if(u===null)return;const m=t===0?e.join(md):e.slice(t).join(md),p=u.length;for(let g=0;g<p;g++){const b=u[g];if(b.validator(m))return b.classGroupId}},wR=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?vR+a:void 0})(),kR=e=>{const{theme:t,classGroups:r}=e;return SR(r,t)},SR=(e,t)=>{const r=eE();for(const a in e){const l=e[a];Zg(l,r,a,t)}return r},Zg=(e,t,r,a)=>{const l=e.length;for(let c=0;c<l;c++){const u=e[c];ER(u,t,r,a)}},ER=(e,t,r,a)=>{if(typeof e=="string"){_R(e,t,r);return}if(typeof e=="function"){jR(e,t,r,a);return}OR(e,t,r,a)},_R=(e,t,r)=>{const a=e===""?t:nE(t,e);a.classGroupId=r},jR=(e,t,r,a)=>{if(AR(e)){Zg(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(bR(r,e))},OR=(e,t,r,a)=>{const l=Object.entries(e),c=l.length;for(let u=0;u<c;u++){const[m,p]=l[u];Zg(p,nE(t,m),r,a)}},nE=(e,t)=>{let r=e;const a=t.split(md),l=a.length;for(let c=0;c<l;c++){const u=a[c];let m=r.nextPart.get(u);m||(m=eE(),r.nextPart.set(u,m)),r=m}return r},AR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const l=(c,u)=>{r[c]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=a[c])!==void 0)return l(c,u),u},set(c,u){c in r?r[c]=u:l(c,u)}}},wp="!",dw=":",MR=[],fw=(e,t,r,a,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),CR=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=l=>{const c=[];let u=0,m=0,p=0,g;const b=l.length;for(let E=0;E<b;E++){const _=l[E];if(u===0&&m===0){if(_===dw){c.push(l.slice(p,E)),p=E+1;continue}if(_==="/"){g=E;continue}}_==="["?u++:_==="]"?u--:_==="("?m++:_===")"&&m--}const v=c.length===0?l:l.slice(p);let k=v,w=!1;v.endsWith(wp)?(k=v.slice(0,-1),w=!0):v.startsWith(wp)&&(k=v.slice(1),w=!0);const j=g&&g>p?g-p:void 0;return fw(c,w,k,j)};if(t){const l=t+dw,c=a;a=u=>u.startsWith(l)?c(u.slice(l.length)):fw(MR,!1,u,void 0,!0)}if(r){const l=a;a=c=>r({className:c,parseClassName:l})}return a},RR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let c=0;c<r.length;c++){const u=r[c],m=u[0]==="[",p=t.has(u);m||p?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(u)):l.push(u)}return l.length>0&&(l.sort(),a.push(...l)),a}},TR=e=>({cache:NR(e.cacheSize),parseClassName:CR(e),sortModifiers:RR(e),postfixLookupClassGroupIds:DR(e),...xR(e)}),DR=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)t[r[a]]=!0;return t},LR=/\s+/,zR=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:c,postfixLookupClassGroupIds:u}=t,m=[],p=e.trim().split(LR);let g="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:k,modifiers:w,hasImportantModifier:j,baseClassName:E,maybePostfixModifierPosition:_}=r(v);if(k){g=v+(g.length>0?" "+g:g);continue}let C=!!_,O;if(C){const L=E.substring(0,_);O=a(L);const T=O&&u[O]?a(E):void 0;T&&T!==O&&(O=T,C=!1)}else O=a(E);if(!O){if(!C){g=v+(g.length>0?" "+g:g);continue}if(O=a(E),!O){g=v+(g.length>0?" "+g:g);continue}C=!1}const A=w.length===0?"":w.length===1?w[0]:c(w).join(":"),D=j?A+wp:A,R=D+O;if(m.indexOf(R)>-1)continue;m.push(R);const P=l(O,C);for(let L=0;L<P.length;++L){const T=P[L];m.push(D+T)}g=v+(g.length>0?" "+g:g)}return g},$R=(...e)=>{let t=0,r,a,l="";for(;t<e.length;)(r=e[t++])&&(a=iE(r))&&(l&&(l+=" "),l+=a);return l},iE=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=iE(e[a]))&&(r&&(r+=" "),r+=t);return r},UR=(e,...t)=>{let r,a,l,c;const u=p=>{const g=t.reduce((b,v)=>v(b),e());return r=TR(g),a=r.cache.get,l=r.cache.set,c=m,m(p)},m=p=>{const g=a(p);if(g)return g;const b=zR(p,r);return l(p,b),b};return c=u,(...p)=>c($R(...p))},IR=[],Vt=e=>{const t=r=>r[e]||IR;return t.isThemeGetter=!0,t},rE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=e=>HR.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Fi=e=>BR.test(e),oE=()=>!0,GR=e=>qR.test(e)&&!FR.test(e),Wg=()=>!1,KR=e=>PR.test(e),YR=e=>VR.test(e),QR=e=>!Oe(e)&&!Ae(e),XR=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),ZR=e=>Wr(e,cE,Wg),Oe=e=>rE.test(e),xa=e=>Wr(e,uE,GR),hw=e=>Wr(e,aT,Ke),WR=e=>Wr(e,fE,oE),JR=e=>Wr(e,dE,Wg),mw=e=>Wr(e,lE,Wg),eT=e=>Wr(e,sE,YR),Iu=e=>Wr(e,hE,KR),Ae=e=>aE.test(e),ws=e=>Qa(e,uE),tT=e=>Qa(e,dE),pw=e=>Qa(e,lE),nT=e=>Qa(e,cE),iT=e=>Qa(e,sE),Hu=e=>Qa(e,hE,!0),rT=e=>Qa(e,fE,!0),Wr=(e,t,r)=>{const a=rE.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},Qa=(e,t,r=!1)=>{const a=aE.exec(e);return a?a[1]?t(a[1]):r:!1},lE=e=>e==="position"||e==="percentage",sE=e=>e==="image"||e==="url",cE=e=>e==="length"||e==="size"||e==="bg-size",uE=e=>e==="length",aT=e=>e==="number",dE=e=>e==="family-name",fE=e=>e==="number"||e==="weight",hE=e=>e==="shadow",oT=()=>{const e=Vt("color"),t=Vt("font"),r=Vt("text"),a=Vt("font-weight"),l=Vt("tracking"),c=Vt("leading"),u=Vt("breakpoint"),m=Vt("container"),p=Vt("spacing"),g=Vt("radius"),b=Vt("shadow"),v=Vt("inset-shadow"),k=Vt("text-shadow"),w=Vt("drop-shadow"),j=Vt("blur"),E=Vt("perspective"),_=Vt("aspect"),C=Vt("ease"),O=Vt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...D(),Ae,Oe],P=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],T=()=>[Ae,Oe,p],H=()=>[kr,"full","auto",...T()],ne=()=>[pi,"none","subgrid",Ae,Oe],Y=()=>["auto",{span:["full",pi,Ae,Oe]},pi,Ae,Oe],oe=()=>[pi,"auto",Ae,Oe],K=()=>["auto","min","max","fr",Ae,Oe],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...T()],V=()=>[kr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],te=()=>[kr,"screen","full","dvw","lvw","svw","min","max","fit",...T()],pe=()=>[kr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],Q=()=>[e,Ae,Oe],N=()=>[...D(),pw,mw,{position:[Ae,Oe]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",nT,ZR,{size:[Ae,Oe]}],F=()=>[Bm,ws,xa],ae=()=>["","none","full",g,Ae,Oe],ce=()=>["",Ke,ws,xa],he=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[Ke,Bm,pw,mw],de=()=>["","none",j,Ae,Oe],ge=()=>["none",Ke,Ae,Oe],_e=()=>["none",Ke,Ae,Oe],Re=()=>[Ke,Ae,Oe],De=()=>[kr,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fi],breakpoint:[Fi],color:[oE],container:[Fi],"drop-shadow":[Fi],ease:["in","out","in-out"],font:[QR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fi],shadow:[Fi],spacing:["px",Ke],text:[Fi],"text-shadow":[Fi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kr,Oe,Ae,_]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Oe]}],"container-named":[XR],columns:[{columns:[Ke,Oe,Ae,m]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",Ae,Oe]}],basis:[{basis:[kr,"full","auto",m,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,kr,"auto","initial","none",Oe]}],grow:[{grow:["",Ke,Ae,Oe]}],shrink:[{shrink:["",Ke,Ae,Oe]}],order:[{order:[pi,"first","last","none",Ae,Oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...pe()]}],"min-block-size":[{"min-block":["auto",...pe()]}],"max-block-size":[{"max-block":["none",...pe()]}],w:[{w:[m,"screen",...V()]}],"min-w":[{"min-w":[m,"screen","none",...V()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,ws,xa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,rT,WR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,Oe]}],"font-family":[{font:[tT,JR,t]}],"font-features":[{"font-features":[Oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Ae,Oe]}],"line-clamp":[{"line-clamp":[Ke,"none",Ae,hw]}],leading:[{leading:[c,...T()]}],"list-image":[{"list-image":["none",Ae,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",Ae,xa]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ke,"auto",Ae,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[pi,Ae,Oe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,Ae,Oe],radial:["",Ae,Oe],conic:[pi,Ae,Oe]},iT,eT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,Ae,Oe]}],"outline-w":[{outline:["",Ke,ws,xa]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",b,Hu,Iu]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",v,Hu,Iu]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ke,xa]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",k,Hu,Iu]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ke,Ae,Oe]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[Ae,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Oe]}],filter:[{filter:["","none",Ae,Oe]}],blur:[{blur:de()}],brightness:[{brightness:[Ke,Ae,Oe]}],contrast:[{contrast:[Ke,Ae,Oe]}],"drop-shadow":[{"drop-shadow":["","none",w,Hu,Iu]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ke,Ae,Oe]}],"hue-rotate":[{"hue-rotate":[Ke,Ae,Oe]}],invert:[{invert:["",Ke,Ae,Oe]}],saturate:[{saturate:[Ke,Ae,Oe]}],sepia:[{sepia:["",Ke,Ae,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Oe]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,Ae,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,Ae,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,Ae,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,Ae,Oe]}],"backdrop-invert":[{"backdrop-invert":["",Ke,Ae,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,Ae,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,Ae,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,Ae,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",Ae,Oe]}],ease:[{ease:["linear","initial",C,Ae,Oe]}],delay:[{delay:[Ke,Ae,Oe]}],animate:[{animate:["none",O,Ae,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ae,Oe]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":["scale-3d"],skew:[{skew:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[Ae,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],zoom:[{zoom:[pi,Ae,Oe]}],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Q()}],"scrollbar-track-color":[{"scrollbar-track":Q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae,Oe]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ke,ws,xa,hw]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jg=UR(oT);function gw(...e){return Jg(Xg(e))}function lT({view:e,onChange:t,className:r}){const a=(l,c,u)=>d.jsx("button",{type:"button","aria-label":c,"aria-pressed":e===l,onClick:()=>t(l),className:gw("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",e===l?"bg-white text-ink shadow-sm":"text-white/85 hover:text-white"),children:d.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:d.jsx("path",{d:u})})});return d.jsxs("div",{className:gw("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",r),children:[a("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),a("mobile","Mobile crop","M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2")]})}const sT=(e,t)=>{const r=a=>Math.round(a*1e4)/1e4;return r(e.nx)===r(t.nx)&&r(e.ny)===r(t.ny)&&r(e.nw)===r(t.nw)&&r(e.nh)===r(t.nh)};function ey({chrome:e,open:t=!0,src:r,mode:a,aspect:l,mobileAspect:c,seed:u,mobileSeed:m,onApply:p,onClose:g,title:b="Crop photo",subtitle:v,variant:k="crop",stageClassName:w="h-[412px]"}){const[j]=x.useState(r),E=c!=null&&Math.abs(c-l)>1e-4,[_,C]=x.useState("desktop"),[O,A]=x.useState({desktop:(u==null?void 0:u.rect)??null,mobile:(m==null?void 0:m.rect)??null}),D=x.useRef(!(m!=null&&m.rect)),R=x.useRef(null),P=X=>X==="mobile"?c??l:l,L=()=>{var X;return((X=R.current)==null?void 0:X.natAspect())??l},T=X=>!(u!=null&&u.rect)&&(X===null||sT(X,hd(a,L(),l))),H=X=>({rect:X==="desktop"?O.desktop:O.mobile}),ne=()=>{var X;return((X=R.current)==null?void 0:X.cropValue())??null},Y=X=>{if(X===_)return;const le=ne();A(M=>{const V={...M,[_]:le??M[_]};if(_==="desktop"&&D.current){const te=V.desktop??le;V.mobile=te&&!T(te)?cw(te,c??l,L()):null}return V}),C(X)},oe=()=>{_==="mobile"&&(D.current=!1)},K=()=>{const X=ne(),le=L(),M=(_==="desktop"?X:O.desktop)??X??{nx:0,ny:0,nw:1,nh:1};let V={rect:M,ar:le};if(E){let te=_==="mobile"?X:O.mobile;te||(te=T(M)?hd(a,le,c??l):cw(M,c??l,le)),V={...V,mobile:{rect:te,derived:D.current}}}p(V)};return d.jsxs(e.Shell,{open:t,variant:k,onClose:g,children:[d.jsxs("div",{className:e.head,children:[d.jsxs("div",{className:e.titles,children:[d.jsx("h2",{className:e.title,children:b}),v?d.jsx("span",{className:e.subtitle,children:v}):null]}),d.jsx("button",{className:e.close,onClick:g,"aria-label":"Close",children:d.jsx(e.CloseIcon,{})})]}),d.jsxs("div",{className:"relative",children:[E&&d.jsx(lT,{view:_,onChange:Y,className:"absolute right-3 top-3 z-10"}),d.jsx(gR,{ref:R,chrome:e,src:j,mode:a,aspect:P(_),seed:H(_),stageClassName:w,onUserEdit:oe,footerActions:d.jsxs(d.Fragment,{children:[d.jsx("button",{className:e.buttonGhost,onClick:g,children:"Cancel"}),d.jsx("button",{className:e.buttonPrimary,onClick:K,children:"Apply crop"})]})},_)]})]})}const yw=e=>{let t;const r=new Set,a=(g,b)=>{const v=typeof g=="function"?g(t):g;if(!Object.is(v,t)){const k=t;t=b??(typeof v!="object"||v===null)?v:Object.assign({},t,v),r.forEach(w=>w(t,k))}},l=()=>t,m={setState:a,getState:l,getInitialState:()=>p,subscribe:g=>(r.add(g),()=>r.delete(g))},p=t=e(a,l,m);return m},cT=(e=>e?yw(e):yw),uT=e=>e;function dT(e,t=uT){const r=Dr.useSyncExternalStore(e.subscribe,Dr.useCallback(()=>t(e.getState()),[e,t]),Dr.useCallback(()=>t(e.getInitialState()),[e,t]));return Dr.useDebugValue(r),r}const bw=e=>{const t=cT(e),r=a=>dT(t,a);return Object.assign(r,t),r},mE=(e=>e?bw(e):bw),ty=mE(e=>({noticeByKey:{},notice:(t,r)=>e(a=>a.noticeByKey[t]===r?a:{noticeByKey:{...a.noticeByKey,[t]:r}}),clearNotice:t=>e(r=>{if(!(t in r.noticeByKey))return r;const a={...r.noticeByKey};return delete a[t],{noticeByKey:a}})}));function fT(e){return ty(t=>t.noticeByKey[e])}const hT=12e4;function Pa(e){return`${e.holder}#${e.mediaId}`}const Os=mE((e,t)=>({byPlace:{},start:(r,a,l)=>{const c=Pa(r),u={propertyId:a,place:r,crop:l};e(m=>({byPlace:{...m.byPlace,[c]:u}})),setTimeout(()=>{t().byPlace[c]===u&&t().settle(r)},hT)},settle:r=>e(a=>{const l=Pa(r);if(!(l in a.byPlace))return a;const c={...a.byPlace};return delete c[l],{byPlace:c}})})),Xu={dimOpacity:.35,grayscale:.4,transitionMs:120,spinner:{diameter:28,stroke:3,trackColor:"rgba(20,18,13,.18)",headColor:"rgba(20,18,13,.6)",spinDurationMs:800}},pE={opacity:Xu.dimOpacity,filter:`grayscale(${Xu.grayscale})`,transition:`opacity ${Xu.transitionMs}ms`};function mT(){if(typeof document>"u"||document.getElementById("recrop-spin-kf"))return;const e=document.createElement("style");e.id="recrop-spin-kf",e.textContent="@keyframes recrop-spin{to{transform:rotate(360deg)}}",document.head.appendChild(e)}function ny({label:e="Re-cropping…"}={}){mT();const t=Xu.spinner;return d.jsx("div",{"data-recrop-loading":!0,role:"status","aria-label":e,className:"pointer-events-none absolute inset-0 z-[5] grid place-items-center",children:d.jsx("span",{"aria-hidden":!0,style:{width:t.diameter,height:t.diameter,border:`${t.stroke}px solid ${t.trackColor}`,borderTopColor:t.headColor,borderRadius:"50%",animation:`recrop-spin ${t.spinDurationMs}ms linear infinite`}})})}var bl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Oa,_r,Ho,f2,pT=(f2=class extends bl{constructor(){super();Me(this,Oa);Me(this,_r);Me(this,Ho);ve(this,Ho,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,_r)||this.setEventListener(z(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,_r))==null||t.call(this),ve(this,_r,void 0))}setEventListener(t){var r;ve(this,Ho,t),(r=z(this,_r))==null||r.call(this),ve(this,_r,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,Oa)!==t&&(ve(this,Oa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Oa)=="boolean"?z(this,Oa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Oa=new WeakMap,_r=new WeakMap,Ho=new WeakMap,f2),iy=new pT,gT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jr,cg,h2,yT=(h2=class{constructor(){Me(this,jr,gT);Me(this,cg,!1)}setTimeoutProvider(e){ve(this,jr,e)}setTimeout(e,t){return z(this,jr).setTimeout(e,t)}clearTimeout(e){z(this,jr).clearTimeout(e)}setInterval(e,t){return z(this,jr).setInterval(e,t)}clearInterval(e){z(this,jr).clearInterval(e)}},jr=new WeakMap,cg=new WeakMap,h2),_a=new yT;function bT(e){setTimeout(e,0)}var vT=typeof window>"u"||"Deno"in globalThis;function gn(){}function xT(e,t){return typeof e=="function"?e(t):e}function kp(e){return typeof e=="number"&&e>=0&&e!==1/0}function gE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zr(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function vw(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:c,queryKey:u,stale:m}=e;if(u){if(a){if(t.queryHash!==ry(u,t.options))return!1}else if(!ol(t.queryKey,u))return!1}if(r!=="all"){const p=t.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof m=="boolean"&&t.isStale()!==m||l&&l!==t.state.fetchStatus||c&&!c(t))}function xw(e,t){const{exact:r,status:a,predicate:l,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(Hs(t.options.mutationKey)!==Hs(c))return!1}else if(!ol(t.options.mutationKey,c))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function ry(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hs)(e)}function Hs(e){return JSON.stringify(e,(t,r)=>Sp(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function ol(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let a=0;a<t.length;a++)if(!ol(e[a],t[a]))return!1;return!0}const r=Object.keys(t);for(const a of r)if(!ol(e[a],t[a]))return!1;return!0}return!1}var wT=Object.prototype.hasOwnProperty;function ay(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=ww(e)&&ww(t);if(!a&&!(Sp(e)&&Sp(t)))return t;const c=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),m=u.length,p=a?new Array(m):{};let g=0;for(let b=0;b<m;b++){const v=a?b:u[b],k=e[v],w=t[v];if(k===w){p[v]=k,(a?b<c:wT.call(e,v))&&g++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){p[v]=w;continue}const j=ay(k,w,r+1);p[v]=j,j===k&&g++}return c===m&&g===c?e:p}function pd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ww(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sp(e){if(!kw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!kw(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kw(e){return Object.prototype.toString.call(e)==="[object Object]"}function kT(e){return new Promise(t=>{_a.setTimeout(t,e)})}function Ep(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?ay(e,t):t}function ST(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function ET(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var oy=Symbol();function yE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===oy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bE(e,t){return typeof e=="function"?e(...t):!!e}function _T(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var Bs=(()=>{let e=()=>vT;return{isServer(){return e()},setIsServer(t){e=t}}})();function _p(){let e,t;const r=new Promise((l,c)=>{e=l,t=c});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var jT=bT;function OT(){let e=[],t=0,r=m=>{m()},a=m=>{m()},l=jT;const c=m=>{t?e.push(m):l(()=>{r(m)})},u=()=>{const m=e;e=[],m.length&&l(()=>{a(()=>{m.forEach(p=>{r(p)})})})};return{batch:m=>{let p;t++;try{p=m()}finally{t--,t||u()}return p},batchCalls:m=>(...p)=>{c(()=>{m(...p)})},schedule:c,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{a=m},setScheduler:m=>{l=m}}}var Ft=OT(),Bo,Or,qo,m2,AT=(m2=class extends bl{constructor(){super();Me(this,Bo,!0);Me(this,Or);Me(this,qo);ve(this,qo,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,Or)||this.setEventListener(z(this,qo))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Or))==null||t.call(this),ve(this,Or,void 0))}setEventListener(t){var r;ve(this,qo,t),(r=z(this,Or))==null||r.call(this),ve(this,Or,t(this.setOnline.bind(this)))}setOnline(t){z(this,Bo)!==t&&(ve(this,Bo,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,Bo)}},Bo=new WeakMap,Or=new WeakMap,qo=new WeakMap,m2),gd=new AT;function NT(e){return Math.min(1e3*2**e,3e4)}function vE(e){return(e??"online")==="online"?gd.isOnline():!0}var jp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xE(e){let t=!1,r=0,a;const l=_p(),c=()=>l.status!=="pending",u=E=>{var _;if(!c()){const C=new jp(E);k(C),(_=e.onCancel)==null||_.call(e,C)}},m=()=>{t=!0},p=()=>{t=!1},g=()=>iy.isFocused()&&(e.networkMode==="always"||gd.isOnline())&&e.canRun(),b=()=>vE(e.networkMode)&&e.canRun(),v=E=>{c()||(a==null||a(),l.resolve(E))},k=E=>{c()||(a==null||a(),l.reject(E))},w=()=>new Promise(E=>{var _;a=C=>{(c()||g())&&E(C)},(_=e.onPause)==null||_.call(e)}).then(()=>{var E;a=void 0,c()||(E=e.onContinue)==null||E.call(e)}),j=()=>{if(c())return;let E;const _=r===0?e.initialPromise:void 0;try{E=_??e.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(v).catch(C=>{var P;if(c())return;const O=e.retry??(Bs.isServer()?0:3),A=e.retryDelay??NT,D=typeof A=="function"?A(r,C):A,R=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,C);if(t||!R){k(C);return}r++,(P=e.onFail)==null||P.call(e,r,C),kT(D).then(()=>g()?void 0:w()).then(()=>{t?k(C):j()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(a==null||a(),l),cancelRetry:m,continueRetry:p,canStart:b,start:()=>(b()?j():w().then(j),l)}}var Aa,p2,wE=(p2=class{constructor(){Me(this,Aa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kp(this.gcTime)&&ve(this,Aa,_a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bs.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,Aa)!==void 0&&(_a.clearTimeout(z(this,Aa)),ve(this,Aa,void 0))}},Aa=new WeakMap,p2);function MT(e){return{onFetch:(t,r)=>{var b,v,k,w,j;const a=t.options,l=(k=(v=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:k.direction,c=((w=t.state.data)==null?void 0:w.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const g=async()=>{let E=!1;const _=A=>{_T(A,()=>t.signal,()=>E=!0)},C=yE(t.options,t.fetchOptions),O=async(A,D,R)=>{if(E)return Promise.reject(t.signal.reason);if(D==null&&A.pages.length)return Promise.resolve(A);const L=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:D,direction:R?"backward":"forward",meta:t.options.meta};return _(Y),Y})(),T=await C(L),{maxPages:H}=t.options,ne=R?ET:ST;return{pages:ne(A.pages,T,H),pageParams:ne(A.pageParams,D,H)}};if(l&&c.length){const A=l==="backward",D=A?CT:Sw,R={pages:c,pageParams:u},P=D(a,R);m=await O(R,P,A)}else{const A=e??c.length;do{const D=p===0?u[0]??a.initialPageParam:Sw(a,m);if(p>0&&D==null)break;m=await O(m,D),p++}while(p<A)}return m};t.options.persister?t.fetchFn=()=>{var E,_;return(_=(E=t.options).persister)==null?void 0:_.call(E,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=g}}}function Sw(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function CT(e,{pages:t,pageParams:r}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,r[0],r):void 0}var Fo,Na,Po,ei,Ma,Xt,Qs,Ca,Un,kE,Pi,g2,RT=(g2=class extends wE{constructor(t){super();Me(this,Un);Me(this,Fo);Me(this,Na);Me(this,Po);Me(this,ei);Me(this,Ma);Me(this,Xt);Me(this,Qs);Me(this,Ca);ve(this,Ca,!1),ve(this,Qs,t.defaultOptions),this.setOptions(t.options),this.observers=[],ve(this,Ma,t.client),ve(this,ei,z(this,Ma).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ve(this,Na,_w(this.options)),this.state=t.state??z(this,Na),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,Fo)}get promise(){var t;return(t=z(this,Xt))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Qs),...t},t!=null&&t._type&&ve(this,Fo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=_w(this.options);r.data!==void 0&&(this.setState(Ew(r.data,r.dataUpdatedAt)),ve(this,Na,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,ei).remove(this)}setData(t,r){const a=Ep(this.state.data,t,this.options);return He(this,Un,Pi).call(this,{data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(t){He(this,Un,Pi).call(this,{type:"setState",state:t})}cancel(t){var a,l;const r=(a=z(this,Xt))==null?void 0:a.promise;return(l=z(this,Xt))==null||l.cancel(t),r?r.then(gn).catch(gn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,Na)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===oy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gE(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Xt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Xt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,ei).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Xt)&&(z(this,Ca)||He(this,Un,kE).call(this)?z(this,Xt).cancel({revert:!0}):z(this,Xt).cancelRetry()),this.scheduleGc()),z(this,ei).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,Un,Pi).call(this,{type:"invalidate"})}async fetch(t,r){var g,b,v,k,w,j,E,_,C,O,A;if(this.state.fetchStatus!=="idle"&&((g=z(this,Xt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Xt))return z(this,Xt).continueRetry(),z(this,Xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(R=>R.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,l=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(ve(this,Ca,!0),a.signal)})},c=()=>{const D=yE(this.options,r),P=(()=>{const L={client:z(this,Ma),queryKey:this.queryKey,meta:this.meta};return l(L),L})();return ve(this,Ca,!1),this.options.persister?this.options.persister(D,P,this):D(P)},m=(()=>{const D={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,Ma),state:this.state,fetchFn:c};return l(D),D})(),p=z(this,Fo)==="infinite"?MT(this.options.pages):this.options.behavior;p==null||p.onFetch(m,this),ve(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=m.fetchOptions)==null?void 0:b.meta))&&He(this,Un,Pi).call(this,{type:"fetch",meta:(v=m.fetchOptions)==null?void 0:v.meta}),ve(this,Xt,xE({initialPromise:r==null?void 0:r.initialPromise,fn:m.fetchFn,onCancel:D=>{D instanceof jp&&D.revert&&this.setState({...z(this,Po),fetchStatus:"idle"}),a.abort()},onFail:(D,R)=>{He(this,Un,Pi).call(this,{type:"failed",failureCount:D,error:R})},onPause:()=>{He(this,Un,Pi).call(this,{type:"pause"})},onContinue:()=>{He(this,Un,Pi).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const D=await z(this,Xt).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(w=(k=z(this,ei).config).onSuccess)==null||w.call(k,D,this),(E=(j=z(this,ei).config).onSettled)==null||E.call(j,D,this.state.error,this),D}catch(D){if(D instanceof jp){if(D.silent)return z(this,Xt).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw He(this,Un,Pi).call(this,{type:"error",error:D}),(C=(_=z(this,ei).config).onError)==null||C.call(_,D,this),(A=(O=z(this,ei).config).onSettled)==null||A.call(O,this.state.data,D,this),D}finally{this.scheduleGc()}}},Fo=new WeakMap,Na=new WeakMap,Po=new WeakMap,ei=new WeakMap,Ma=new WeakMap,Xt=new WeakMap,Qs=new WeakMap,Ca=new WeakMap,Un=new WeakSet,kE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Pi=function(t){const r=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...SE(a.data,this.options),fetchMeta:t.meta??null};case"success":const l={...a,...Ew(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ve(this,Po,t.manual?l:void 0),l;case"error":const c=t.error;return{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=r(this.state),Ft.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,ei).notify({query:this,type:"updated",action:t})})},g2);function SE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ew(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _w(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jn,et,Xs,pn,Ra,Vo,Vi,Ar,Zs,Go,Ko,Ta,Da,Nr,Yo,dt,As,Op,Ap,Np,Mp,Cp,Rp,Tp,EE,y2,ly=(y2=class extends bl{constructor(t,r){super();Me(this,dt);Me(this,jn);Me(this,et);Me(this,Xs);Me(this,pn);Me(this,Ra);Me(this,Vo);Me(this,Vi);Me(this,Ar);Me(this,Zs);Me(this,Go);Me(this,Ko);Me(this,Ta);Me(this,Da);Me(this,Nr);Me(this,Yo,new Set);this.options=r,ve(this,jn,t),ve(this,Ar,null),ve(this,Vi,_p()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,et).addObserver(this),jw(z(this,et),this.options)?He(this,dt,As).call(this):this.updateResult(),He(this,dt,Mp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dp(z(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dp(z(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,dt,Cp).call(this),He(this,dt,Rp).call(this),z(this,et).removeObserver(this)}setOptions(t){const r=this.options,a=z(this,et);if(this.options=z(this,jn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,z(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,dt,Tp).call(this),z(this,et).setOptions(this.options),r._defaulted&&!pd(this.options,r)&&z(this,jn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,et),observer:this});const l=this.hasListeners();l&&Ow(z(this,et),a,this.options,r)&&He(this,dt,As).call(this),this.updateResult(),l&&(z(this,et)!==a||In(this.options.enabled,z(this,et))!==In(r.enabled,z(this,et))||zr(this.options.staleTime,z(this,et))!==zr(r.staleTime,z(this,et)))&&He(this,dt,Op).call(this);const c=He(this,dt,Ap).call(this);l&&(z(this,et)!==a||In(this.options.enabled,z(this,et))!==In(r.enabled,z(this,et))||c!==z(this,Nr))&&He(this,dt,Np).call(this,c)}getOptimisticResult(t){const r=z(this,jn).getQueryCache().build(z(this,jn),t),a=this.createResult(r,t);return DT(this,a)&&(ve(this,pn,a),ve(this,Vo,this.options),ve(this,Ra,z(this,et).state)),a}getCurrentResult(){return z(this,pn)}trackResult(t,r){return new Proxy(t,{get:(a,l)=>(this.trackProp(l),r==null||r(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Vi).status==="pending"&&z(this,Vi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(t){z(this,Yo).add(t)}getCurrentQuery(){return z(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,jn).defaultQueryOptions(t),a=z(this,jn).getQueryCache().build(z(this,jn),r);return a.fetch().then(()=>this.createResult(a,r))}fetch(t){return He(this,dt,As).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,pn)))}createResult(t,r){var H;const a=z(this,et),l=this.options,c=z(this,pn),u=z(this,Ra),m=z(this,Vo),g=t!==a?t.state:z(this,Xs),{state:b}=t;let v={...b},k=!1,w;if(r._optimisticResults){const ne=this.hasListeners(),Y=!ne&&jw(t,r),oe=ne&&Ow(t,a,r,l);(Y||oe)&&(v={...v,...SE(b.data,t.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:E,status:_}=v;w=v.data;let C=!1;if(r.placeholderData!==void 0&&w===void 0&&_==="pending"){let ne;c!=null&&c.isPlaceholderData&&r.placeholderData===(m==null?void 0:m.placeholderData)?(ne=c.data,C=!0):ne=typeof r.placeholderData=="function"?r.placeholderData((H=z(this,Ko))==null?void 0:H.state.data,z(this,Ko)):r.placeholderData,ne!==void 0&&(_="success",w=Ep(c==null?void 0:c.data,ne,r),k=!0)}if(r.select&&w!==void 0&&!C)if(c&&w===(u==null?void 0:u.data)&&r.select===z(this,Zs))w=z(this,Go);else try{ve(this,Zs,r.select),w=r.select(w),w=Ep(c==null?void 0:c.data,w,r),ve(this,Go,w),ve(this,Ar,null)}catch(ne){ve(this,Ar,ne)}z(this,Ar)&&(j=z(this,Ar),w=z(this,Go),E=Date.now(),_="error");const O=v.fetchStatus==="fetching",A=_==="pending",D=_==="error",R=A&&O,P=w!==void 0,T={status:_,fetchStatus:v.fetchStatus,isPending:A,isSuccess:_==="success",isError:D,isInitialLoading:R,isLoading:R,data:w,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:D&&!P,isPaused:v.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:D&&P,isStale:sy(t,r),refetch:this.refetch,promise:z(this,Vi),isEnabled:In(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ne=T.data!==void 0,Y=T.status==="error"&&!ne,oe=le=>{Y?le.reject(T.error):ne&&le.resolve(T.data)},K=()=>{const le=ve(this,Vi,T.promise=_p());oe(le)},X=z(this,Vi);switch(X.status){case"pending":t.queryHash===a.queryHash&&oe(X);break;case"fulfilled":(Y||T.data!==X.value)&&K();break;case"rejected":(!Y||T.error!==X.reason)&&K();break}}return T}updateResult(){const t=z(this,pn),r=this.createResult(z(this,et),this.options);if(ve(this,Ra,z(this,et).state),ve(this,Vo,this.options),z(this,Ra).data!==void 0&&ve(this,Ko,z(this,et)),pd(r,t))return;ve(this,pn,r);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!z(this,Yo).size)return!0;const u=new Set(c??z(this,Yo));return this.options.throwOnError&&u.add("error"),Object.keys(z(this,pn)).some(m=>{const p=m;return z(this,pn)[p]!==t[p]&&u.has(p)})};He(this,dt,EE).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,dt,Mp).call(this)}},jn=new WeakMap,et=new WeakMap,Xs=new WeakMap,pn=new WeakMap,Ra=new WeakMap,Vo=new WeakMap,Vi=new WeakMap,Ar=new WeakMap,Zs=new WeakMap,Go=new WeakMap,Ko=new WeakMap,Ta=new WeakMap,Da=new WeakMap,Nr=new WeakMap,Yo=new WeakMap,dt=new WeakSet,As=function(t){He(this,dt,Tp).call(this);let r=z(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(gn)),r},Op=function(){He(this,dt,Cp).call(this);const t=zr(this.options.staleTime,z(this,et));if(Bs.isServer()||z(this,pn).isStale||!kp(t))return;const a=gE(z(this,pn).dataUpdatedAt,t)+1;ve(this,Ta,_a.setTimeout(()=>{z(this,pn).isStale||this.updateResult()},a))},Ap=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,et)):this.options.refetchInterval)??!1},Np=function(t){He(this,dt,Rp).call(this),ve(this,Nr,t),!(Bs.isServer()||In(this.options.enabled,z(this,et))===!1||!kp(z(this,Nr))||z(this,Nr)===0)&&ve(this,Da,_a.setInterval(()=>{(this.options.refetchIntervalInBackground||iy.isFocused())&&He(this,dt,As).call(this)},z(this,Nr)))},Mp=function(){He(this,dt,Op).call(this),He(this,dt,Np).call(this,He(this,dt,Ap).call(this))},Cp=function(){z(this,Ta)!==void 0&&(_a.clearTimeout(z(this,Ta)),ve(this,Ta,void 0))},Rp=function(){z(this,Da)!==void 0&&(_a.clearInterval(z(this,Da)),ve(this,Da,void 0))},Tp=function(){const t=z(this,jn).getQueryCache().build(z(this,jn),this.options);if(t===z(this,et))return;const r=z(this,et);ve(this,et,t),ve(this,Xs,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},EE=function(t){Ft.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,pn))}),z(this,jn).getQueryCache().notify({query:z(this,et),type:"observerResultsUpdated"})})},y2);function TT(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function jw(e,t){return TT(e,t)||e.state.data!==void 0&&Dp(e,t,t.refetchOnMount)}function Dp(e,t,r){if(In(t.enabled,e)!==!1&&zr(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&sy(e,t)}return!1}function Ow(e,t,r,a){return(e!==t||In(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&sy(e,r)}function sy(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(zr(t.staleTime,e))}function DT(e,t){return!pd(e.getCurrentResult(),t)}var Ws,yi,fn,La,bi,Sr,b2,LT=(b2=class extends wE{constructor(t){super();Me(this,bi);Me(this,Ws);Me(this,yi);Me(this,fn);Me(this,La);ve(this,Ws,t.client),this.mutationId=t.mutationId,ve(this,fn,t.mutationCache),ve(this,yi,[]),this.state=t.state||zT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,yi).includes(t)||(z(this,yi).push(t),this.clearGcTimeout(),z(this,fn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ve(this,yi,z(this,yi).filter(r=>r!==t)),this.scheduleGc(),z(this,fn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,yi).length||(this.state.status==="pending"?this.scheduleGc():z(this,fn).remove(this))}continue(){var t;return((t=z(this,La))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,m,p,g,b,v,k,w,j,E,_,C,O,A,D,R,P,L;const r=()=>{He(this,bi,Sr).call(this,{type:"continue"})},a={client:z(this,Ws),meta:this.options.meta,mutationKey:this.options.mutationKey};ve(this,La,xE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(T,H)=>{He(this,bi,Sr).call(this,{type:"failed",failureCount:T,error:H})},onPause:()=>{He(this,bi,Sr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,fn).canRun(this)}));const l=this.state.status==="pending",c=!z(this,La).canStart();try{if(l)r();else{He(this,bi,Sr).call(this,{type:"pending",variables:t,isPaused:c}),z(this,fn).config.onMutate&&await z(this,fn).config.onMutate(t,this,a);const H=await((m=(u=this.options).onMutate)==null?void 0:m.call(u,t,a));H!==this.state.context&&He(this,bi,Sr).call(this,{type:"pending",context:H,variables:t,isPaused:c})}const T=await z(this,La).start();return await((g=(p=z(this,fn).config).onSuccess)==null?void 0:g.call(p,T,t,this.state.context,this,a)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,T,t,this.state.context,a)),await((w=(k=z(this,fn).config).onSettled)==null?void 0:w.call(k,T,null,this.state.variables,this.state.context,this,a)),await((E=(j=this.options).onSettled)==null?void 0:E.call(j,T,null,t,this.state.context,a)),He(this,bi,Sr).call(this,{type:"success",data:T}),T}catch(T){try{await((C=(_=z(this,fn).config).onError)==null?void 0:C.call(_,T,t,this.state.context,this,a))}catch(H){Promise.reject(H)}try{await((A=(O=this.options).onError)==null?void 0:A.call(O,T,t,this.state.context,a))}catch(H){Promise.reject(H)}try{await((R=(D=z(this,fn).config).onSettled)==null?void 0:R.call(D,void 0,T,this.state.variables,this.state.context,this,a))}catch(H){Promise.reject(H)}try{await((L=(P=this.options).onSettled)==null?void 0:L.call(P,void 0,T,t,this.state.context,a))}catch(H){Promise.reject(H)}throw He(this,bi,Sr).call(this,{type:"error",error:T}),T}finally{z(this,fn).runNext(this)}}},Ws=new WeakMap,yi=new WeakMap,fn=new WeakMap,La=new WeakMap,bi=new WeakSet,Sr=function(t){const r=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ft.batch(()=>{z(this,yi).forEach(a=>{a.onMutationUpdate(t)}),z(this,fn).notify({mutation:this,type:"updated",action:t})})},b2);function zT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gi,li,Js,v2,$T=(v2=class extends bl{constructor(t={}){super();Me(this,Gi);Me(this,li);Me(this,Js);this.config=t,ve(this,Gi,new Set),ve(this,li,new Map),ve(this,Js,0)}build(t,r,a){const l=new LT({client:t,mutationCache:this,mutationId:++Lu(this,Js)._,options:t.defaultMutationOptions(r),state:a});return this.add(l),l}add(t){z(this,Gi).add(t);const r=Bu(t);if(typeof r=="string"){const a=z(this,li).get(r);a?a.push(t):z(this,li).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Gi).delete(t)){const r=Bu(t);if(typeof r=="string"){const a=z(this,li).get(r);if(a)if(a.length>1){const l=a.indexOf(t);l!==-1&&a.splice(l,1)}else a[0]===t&&z(this,li).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Bu(t);if(typeof r=="string"){const a=z(this,li).get(r),l=a==null?void 0:a.find(c=>c.state.status==="pending");return!l||l===t}else return!0}runNext(t){var a;const r=Bu(t);if(typeof r=="string"){const l=(a=z(this,li).get(r))==null?void 0:a.find(c=>c!==t&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ft.batch(()=>{z(this,Gi).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Gi).clear(),z(this,li).clear()})}getAll(){return Array.from(z(this,Gi))}find(t){const r={exact:!0,...t};return this.getAll().find(a=>xw(r,a))}findAll(t={}){return this.getAll().filter(r=>xw(t,r))}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ft.batch(()=>Promise.all(t.map(r=>r.continue().catch(gn))))}},Gi=new WeakMap,li=new WeakMap,Js=new WeakMap,v2);function Bu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Aw(e,t){const r=new Set(t);return e.filter(a=>!r.has(a))}function UT(e,t,r){const a=e.slice(0);return a[t]=r,a}var Qo,On,Xo,za,$n,Mr,ec,tc,nc,ic,Gt,Lp,zp,_E,$p,Up,Ip,x2,IT=(x2=class extends bl{constructor(t,r,a){super();Me(this,Gt);Me(this,Qo);Me(this,On);Me(this,Xo);Me(this,za);Me(this,$n);Me(this,Mr);Me(this,ec);Me(this,tc);Me(this,nc);Me(this,ic,[]);ve(this,Qo,t),ve(this,za,a),ve(this,Xo,[]),ve(this,$n,[]),ve(this,On,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&z(this,$n).forEach(t=>{t.subscribe(r=>{He(this,Gt,Up).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,z(this,$n).forEach(t=>{t.destroy()})}setQueries(t,r){ve(this,Xo,t),ve(this,za,r),Ft.batch(()=>{const a=z(this,$n),l=He(this,Gt,$p).call(this,z(this,Xo));l.forEach(v=>v.observer.setOptions(v.defaultedQueryOptions));const c=l.map(v=>v.observer),u=c.map(v=>v.getCurrentResult()),m=a.length!==c.length,p=c.some((v,k)=>v!==a[k]),g=m||p,b=g?!0:u.some((v,k)=>{const w=z(this,On)[k];return!w||!pd(v,w)});!g&&!b||(g&&(ve(this,ic,l),ve(this,$n,c)),ve(this,On,u),this.hasListeners()&&(g&&(Aw(a,c).forEach(v=>{v.destroy()}),Aw(c,a).forEach(v=>{v.subscribe(k=>{He(this,Gt,Up).call(this,v,k)})})),He(this,Gt,Ip).call(this)))})}getCurrentResult(){return z(this,On)}getQueries(){return z(this,$n).map(t=>t.getCurrentQuery())}getObservers(){return z(this,$n)}getOptimisticResult(t,r){const a=He(this,Gt,$p).call(this,t),l=a.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=a.map(u=>u.defaultedQueryOptions.queryHash);return[l,u=>He(this,Gt,zp).call(this,u??l,r,c),()=>He(this,Gt,Lp).call(this,l,a)]}},Qo=new WeakMap,On=new WeakMap,Xo=new WeakMap,za=new WeakMap,$n=new WeakMap,Mr=new WeakMap,ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,ic=new WeakMap,Gt=new WeakSet,Lp=function(t,r){return r.map((a,l)=>{const c=t[l];return a.defaultedQueryOptions.notifyOnChangeProps?c:a.observer.trackResult(c,u=>{r.forEach(m=>{m.observer.trackProp(u)})})})},zp=function(t,r,a){if(r){const l=z(this,nc),c=a!==void 0&&l!==void 0&&(l.length!==a.length||a.some((u,m)=>u!==l[m]));return(!z(this,Mr)||z(this,On)!==z(this,tc)||c||r!==z(this,ec))&&(ve(this,ec,r),ve(this,tc,z(this,On)),a!==void 0&&ve(this,nc,a),ve(this,Mr,ay(z(this,Mr),r(t)))),z(this,Mr)}return t},_E=function(){var t;return((t=z(this,za))==null?void 0:t.combine)!==void 0&&z(this,$n).some((r,a)=>{var l;return r.options.suspense&&((l=z(this,On)[a])==null?void 0:l.data)===void 0})},$p=function(t){const r=new Map;z(this,$n).forEach(l=>{const c=l.options.queryHash;if(!c)return;const u=r.get(c);u?u.push(l):r.set(c,[l])});const a=[];return t.forEach(l=>{var p;const c=z(this,Qo).defaultQueryOptions(l),m=((p=r.get(c.queryHash))==null?void 0:p.shift())??new ly(z(this,Qo),c);a.push({defaultedQueryOptions:c,observer:m})}),a},Up=function(t,r){const a=z(this,$n).indexOf(t);a!==-1&&(ve(this,On,UT(z(this,On),a,r)),He(this,Gt,Ip).call(this))},Ip=function(){var t;if(this.hasListeners()){const r=He(this,Gt,Lp).call(this,z(this,On),z(this,ic)),a=He(this,Gt,_E).call(this),l=z(this,Mr),c=a?l:He(this,Gt,zp).call(this,r,(t=z(this,za))==null?void 0:t.combine);(a||l!==c)&&Ft.batch(()=>{this.listeners.forEach(u=>{u(z(this,On))})})}},x2),vi,w2,HT=(w2=class extends bl{constructor(t={}){super();Me(this,vi);this.config=t,ve(this,vi,new Map)}build(t,r,a){const l=r.queryKey,c=r.queryHash??ry(l,r);let u=this.get(c);return u||(u=new RT({client:t,queryKey:l,queryHash:c,options:t.defaultQueryOptions(r),state:a,defaultOptions:t.getQueryDefaults(l)}),this.add(u)),u}add(t){z(this,vi).has(t.queryHash)||(z(this,vi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,vi).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,vi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,vi).get(t)}getAll(){return[...z(this,vi).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(a=>vw(r,a))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(a=>vw(t,a)):r}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vi=new WeakMap,w2),Dt,Cr,Rr,Zo,Wo,Tr,Jo,el,k2,BT=(k2=class{constructor(e={}){Me(this,Dt);Me(this,Cr);Me(this,Rr);Me(this,Zo);Me(this,Wo);Me(this,Tr);Me(this,Jo);Me(this,el);ve(this,Dt,e.queryCache||new HT),ve(this,Cr,e.mutationCache||new $T),ve(this,Rr,e.defaultOptions||{}),ve(this,Zo,new Map),ve(this,Wo,new Map),ve(this,Tr,0)}mount(){Lu(this,Tr)._++,z(this,Tr)===1&&(ve(this,Jo,iy.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Dt).onFocus())})),ve(this,el,gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Dt).onOnline())})))}unmount(){var e,t;Lu(this,Tr)._--,z(this,Tr)===0&&((e=z(this,Jo))==null||e.call(this),ve(this,Jo,void 0),(t=z(this,el))==null||t.call(this),ve(this,el,void 0))}isFetching(e){return z(this,Dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,Dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,Dt).build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,Dt).findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),l=z(this,Dt).get(a.queryHash),c=l==null?void 0:l.state.data,u=xT(t,c);if(u!==void 0)return z(this,Dt).build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Ft.batch(()=>z(this,Dt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,Dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,Dt);Ft.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,Dt);return Ft.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Ft.batch(()=>z(this,Dt).findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(gn).catch(gn)}invalidateQueries(e,t={}){return Ft.batch(()=>(z(this,Dt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Ft.batch(()=>z(this,Dt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(gn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(a).then(gn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,Dt).build(this,t);return r.isStaleByTime(zr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gn).catch(gn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gn).catch(gn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return gd.isOnline()?z(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Dt)}getMutationCache(){return z(this,Cr)}getDefaultOptions(){return z(this,Rr)}setDefaultOptions(e){ve(this,Rr,e)}setQueryDefaults(e,t){z(this,Zo).set(Hs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Zo).values()],r={};return t.forEach(a=>{ol(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){z(this,Wo).set(Hs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Wo).values()],r={};return t.forEach(a=>{ol(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Rr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ry(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===oy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Rr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,Dt).clear(),z(this,Cr).clear()}},Dt=new WeakMap,Cr=new WeakMap,Rr=new WeakMap,Zo=new WeakMap,Wo=new WeakMap,Tr=new WeakMap,Jo=new WeakMap,el=new WeakMap,k2),jE=x.createContext(void 0),Hd=e=>{const t=x.useContext(jE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qT=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(jE.Provider,{value:e,children:t})),OE=x.createContext(!1),AE=()=>x.useContext(OE);OE.Provider;function FT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var PT=x.createContext(FT()),NE=()=>x.useContext(PT),ME=(e,t,r)=>{const a=r!=null&&r.state.error&&typeof e.throwOnError=="function"?bE(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},CE=e=>{x.useEffect(()=>{e.clearReset()},[e])},RE=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||bE(r,[e.error,a])),TE=e=>{if(e.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...l)=>r(a(...l)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},VT=(e,t)=>e.isLoading&&e.isFetching&&!t,Hp=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bp=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function GT({queries:e,...t},r){const a=Hd(),l=AE(),c=NE(),u=x.useMemo(()=>e.map(E=>{const _=a.defaultQueryOptions(E);return _._optimisticResults=l?"isRestoring":"optimistic",_}),[e,a,l]);u.forEach(E=>{TE(E);const _=a.getQueryCache().get(E.queryHash);ME(E,c,_)}),CE(c);const[m]=x.useState(()=>new IT(a,u,t)),[p,g,b]=m.getOptimisticResult(u,t.combine),v=!l&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(E=>v?m.subscribe(Ft.batchCalls(E)):gn,[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setQueries(u,t)},[u,t,m]);const w=p.some((E,_)=>Hp(u[_],E))?p.flatMap((E,_)=>{const C=u[_];if(C&&Hp(C,E)){const O=new ly(a,C);return Bp(C,O,c)}return[]}):[];if(w.length>0)throw Promise.all(w);const j=p.find((E,_)=>{const C=u[_];return C&&RE({result:E,errorResetBoundary:c,throwOnError:C.throwOnError,query:a.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(j!=null&&j.error)throw j.error;return g(b())}function KT(e,t,r){var w,j,E,_;const a=AE(),l=NE(),c=Hd(),u=c.defaultQueryOptions(e);(j=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||j.call(w,u);const m=c.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=a?"isRestoring":p?"optimistic":void 0,TE(u),ME(u,l,m),CE(l);const g=!c.getQueryCache().get(u.queryHash),[b]=x.useState(()=>new t(c,u)),v=b.getOptimisticResult(u),k=!a&&p;if(x.useSyncExternalStore(x.useCallback(C=>{const O=k?b.subscribe(Ft.batchCalls(C)):gn;return b.updateResult(),O},[b,k]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),x.useEffect(()=>{b.setOptions(u)},[u,b]),Hp(u,v))throw Bp(u,b,l);if(RE({result:v,errorResetBoundary:l,throwOnError:u.throwOnError,query:m,suspense:u.suspense}))throw v.error;if((_=(E=c.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||_.call(E,u,v),u.experimental_prefetchInRender&&!Bs.isServer()&&VT(v,a)){const C=g?Bp(u,b,l):m==null?void 0:m.promise;C==null||C.catch(gn).finally(()=>{b.updateResult()})}return u.notifyOnChangeProps?v:b.trackResult(v)}function Bd(e,t){return KT(e,ly)}const YT=600*1e3,QT=(e,t,r)=>({queryKey:["crop-url",e,t],queryFn:()=>r(e,t),staleTime:YT});function DE(e,t,r){const a=x.useMemo(()=>[...new Set(t.filter(c=>!!c))],[t]),l=GT({queries:a.map(c=>({...QT(e,c,r),enabled:!!e}))});return x.useMemo(()=>{const c=new Map;return a.forEach((u,m)=>{var g;const p=(g=l[m])==null?void 0:g.data;typeof p=="string"&&c.set(u,p)}),c},[a,l])}/**
|
|
789
|
+
* @license lucide-react v1.28.0 - ISC
|
|
790
|
+
*
|
|
791
|
+
* This source code is licensed under the ISC license.
|
|
792
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
793
|
+
*/const LE=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
|
|
794
|
+
* @license lucide-react v1.28.0 - ISC
|
|
795
|
+
*
|
|
796
|
+
* This source code is licensed under the ISC license.
|
|
797
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
798
|
+
*/const XT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
799
|
+
* @license lucide-react v1.28.0 - ISC
|
|
800
|
+
*
|
|
801
|
+
* This source code is licensed under the ISC license.
|
|
802
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
803
|
+
*/const ZT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
|
|
804
|
+
* @license lucide-react v1.28.0 - ISC
|
|
805
|
+
*
|
|
806
|
+
* This source code is licensed under the ISC license.
|
|
807
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
808
|
+
*/const Nw=e=>{const t=ZT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
809
|
+
* @license lucide-react v1.28.0 - ISC
|
|
810
|
+
*
|
|
811
|
+
* This source code is licensed under the ISC license.
|
|
812
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
813
|
+
*/var qm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
814
|
+
* @license lucide-react v1.28.0 - ISC
|
|
815
|
+
*
|
|
816
|
+
* This source code is licensed under the ISC license.
|
|
817
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
818
|
+
*/const WT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},JT=x.createContext({}),eD=()=>x.useContext(JT),tD=x.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:a,className:l="",children:c,iconNode:u,...m},p)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:v=!1,color:k="currentColor",className:w=""}=eD()??{},j=a??v?Number(r??b)*24/Number(t??g):r??b;return x.createElement("svg",{ref:p,...qm,width:t??g??qm.width,height:t??g??qm.height,stroke:e??k,strokeWidth:j,className:LE("lucide",w,l),...!c&&!WT(m)&&{"aria-hidden":"true"},...m},[...u.map(([E,_])=>x.createElement(E,_)),...Array.isArray(c)?c:[c]])});/**
|
|
819
|
+
* @license lucide-react v1.28.0 - ISC
|
|
820
|
+
*
|
|
821
|
+
* This source code is licensed under the ISC license.
|
|
822
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
823
|
+
*/const ye=(e,t)=>{const r=x.forwardRef(({className:a,...l},c)=>x.createElement(tD,{ref:c,iconNode:t,className:LE(`lucide-${XT(Nw(e))}`,`lucide-${e}`,a),...l}));return r.displayName=Nw(e),r};/**
|
|
824
|
+
* @license lucide-react v1.28.0 - ISC
|
|
825
|
+
*
|
|
826
|
+
* This source code is licensed under the ISC license.
|
|
827
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
828
|
+
*/const nD=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],iD=ye("activity",nD);/**
|
|
829
|
+
* @license lucide-react v1.28.0 - ISC
|
|
830
|
+
*
|
|
831
|
+
* This source code is licensed under the ISC license.
|
|
832
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
833
|
+
*/const rD=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],aD=ye("archive",rD);/**
|
|
834
|
+
* @license lucide-react v1.28.0 - ISC
|
|
835
|
+
*
|
|
836
|
+
* This source code is licensed under the ISC license.
|
|
837
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
838
|
+
*/const oD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],lD=ye("arrow-down",oD);/**
|
|
839
|
+
* @license lucide-react v1.28.0 - ISC
|
|
840
|
+
*
|
|
841
|
+
* This source code is licensed under the ISC license.
|
|
842
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
843
|
+
*/const sD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],cD=ye("arrow-left",sD);/**
|
|
844
|
+
* @license lucide-react v1.28.0 - ISC
|
|
845
|
+
*
|
|
846
|
+
* This source code is licensed under the ISC license.
|
|
847
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
848
|
+
*/const uD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],dD=ye("arrow-right",uD);/**
|
|
849
|
+
* @license lucide-react v1.28.0 - ISC
|
|
850
|
+
*
|
|
851
|
+
* This source code is licensed under the ISC license.
|
|
852
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
853
|
+
*/const fD=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],zE=ye("arrow-up-right",fD);/**
|
|
854
|
+
* @license lucide-react v1.28.0 - ISC
|
|
855
|
+
*
|
|
856
|
+
* This source code is licensed under the ISC license.
|
|
857
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
858
|
+
*/const hD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],mD=ye("arrow-up",hD);/**
|
|
859
|
+
* @license lucide-react v1.28.0 - ISC
|
|
860
|
+
*
|
|
861
|
+
* This source code is licensed under the ISC license.
|
|
862
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
863
|
+
*/const pD=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],gD=ye("book-open",pD);/**
|
|
864
|
+
* @license lucide-react v1.28.0 - ISC
|
|
865
|
+
*
|
|
866
|
+
* This source code is licensed under the ISC license.
|
|
867
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
868
|
+
*/const yD=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],cy=ye("box",yD);/**
|
|
869
|
+
* @license lucide-react v1.28.0 - ISC
|
|
870
|
+
*
|
|
871
|
+
* This source code is licensed under the ISC license.
|
|
872
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
873
|
+
*/const bD=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],vD=ye("building-2",bD);/**
|
|
874
|
+
* @license lucide-react v1.28.0 - ISC
|
|
875
|
+
*
|
|
876
|
+
* This source code is licensed under the ISC license.
|
|
877
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
878
|
+
*/const xD=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],wD=ye("building",xD);/**
|
|
879
|
+
* @license lucide-react v1.28.0 - ISC
|
|
880
|
+
*
|
|
881
|
+
* This source code is licensed under the ISC license.
|
|
882
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
883
|
+
*/const kD=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]],SD=ye("calendar-days",kD);/**
|
|
884
|
+
* @license lucide-react v1.28.0 - ISC
|
|
885
|
+
*
|
|
886
|
+
* This source code is licensed under the ISC license.
|
|
887
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
888
|
+
*/const ED=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]],_D=ye("calendar",ED);/**
|
|
889
|
+
* @license lucide-react v1.28.0 - ISC
|
|
890
|
+
*
|
|
891
|
+
* This source code is licensed under the ISC license.
|
|
892
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
893
|
+
*/const jD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],OD=ye("chart-line",jD);/**
|
|
894
|
+
* @license lucide-react v1.28.0 - ISC
|
|
895
|
+
*
|
|
896
|
+
* This source code is licensed under the ISC license.
|
|
897
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
898
|
+
*/const AD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qd=ye("check",AD);/**
|
|
899
|
+
* @license lucide-react v1.28.0 - ISC
|
|
900
|
+
*
|
|
901
|
+
* This source code is licensed under the ISC license.
|
|
902
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
903
|
+
*/const ND=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uy=ye("chevron-down",ND);/**
|
|
904
|
+
* @license lucide-react v1.28.0 - ISC
|
|
905
|
+
*
|
|
906
|
+
* This source code is licensed under the ISC license.
|
|
907
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
908
|
+
*/const MD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],$E=ye("chevron-left",MD);/**
|
|
909
|
+
* @license lucide-react v1.28.0 - ISC
|
|
910
|
+
*
|
|
911
|
+
* This source code is licensed under the ISC license.
|
|
912
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
913
|
+
*/const CD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dy=ye("chevron-right",CD);/**
|
|
914
|
+
* @license lucide-react v1.28.0 - ISC
|
|
915
|
+
*
|
|
916
|
+
* This source code is licensed under the ISC license.
|
|
917
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
918
|
+
*/const RD=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],TD=ye("chevrons-up-down",RD);/**
|
|
919
|
+
* @license lucide-react v1.28.0 - ISC
|
|
920
|
+
*
|
|
921
|
+
* This source code is licensed under the ISC license.
|
|
922
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
923
|
+
*/const DD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],LD=ye("circle-question-mark",DD);/**
|
|
924
|
+
* @license lucide-react v1.28.0 - ISC
|
|
925
|
+
*
|
|
926
|
+
* This source code is licensed under the ISC license.
|
|
927
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
928
|
+
*/const zD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],$D=ye("clock",zD);/**
|
|
929
|
+
* @license lucide-react v1.28.0 - ISC
|
|
930
|
+
*
|
|
931
|
+
* This source code is licensed under the ISC license.
|
|
932
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
933
|
+
*/const UD=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],fy=ye("cloud-upload",UD);/**
|
|
934
|
+
* @license lucide-react v1.28.0 - ISC
|
|
935
|
+
*
|
|
936
|
+
* This source code is licensed under the ISC license.
|
|
937
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
938
|
+
*/const ID=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],HD=ye("copy",ID);/**
|
|
939
|
+
* @license lucide-react v1.28.0 - ISC
|
|
940
|
+
*
|
|
941
|
+
* This source code is licensed under the ISC license.
|
|
942
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
943
|
+
*/const BD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],qD=ye("credit-card",BD);/**
|
|
944
|
+
* @license lucide-react v1.28.0 - ISC
|
|
945
|
+
*
|
|
946
|
+
* This source code is licensed under the ISC license.
|
|
947
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
948
|
+
*/const FD=[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]],PD=ye("crop",FD);/**
|
|
949
|
+
* @license lucide-react v1.28.0 - ISC
|
|
950
|
+
*
|
|
951
|
+
* This source code is licensed under the ISC license.
|
|
952
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
953
|
+
*/const VD=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],GD=ye("database",VD);/**
|
|
954
|
+
* @license lucide-react v1.28.0 - ISC
|
|
955
|
+
*
|
|
956
|
+
* This source code is licensed under the ISC license.
|
|
957
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
958
|
+
*/const KD=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],UE=ye("download",KD);/**
|
|
959
|
+
* @license lucide-react v1.28.0 - ISC
|
|
960
|
+
*
|
|
961
|
+
* This source code is licensed under the ISC license.
|
|
962
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
963
|
+
*/const YD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],QD=ye("ellipsis-vertical",YD);/**
|
|
964
|
+
* @license lucide-react v1.28.0 - ISC
|
|
965
|
+
*
|
|
966
|
+
* This source code is licensed under the ISC license.
|
|
967
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
968
|
+
*/const XD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ZD=ye("ellipsis",XD);/**
|
|
969
|
+
* @license lucide-react v1.28.0 - ISC
|
|
970
|
+
*
|
|
971
|
+
* This source code is licensed under the ISC license.
|
|
972
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
973
|
+
*/const WD=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],IE=ye("external-link",WD);/**
|
|
974
|
+
* @license lucide-react v1.28.0 - ISC
|
|
975
|
+
*
|
|
976
|
+
* This source code is licensed under the ISC license.
|
|
977
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
978
|
+
*/const JD=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],e6=ye("eye-off",JD);/**
|
|
979
|
+
* @license lucide-react v1.28.0 - ISC
|
|
980
|
+
*
|
|
981
|
+
* This source code is licensed under the ISC license.
|
|
982
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
983
|
+
*/const t6=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],HE=ye("eye",t6);/**
|
|
984
|
+
* @license lucide-react v1.28.0 - ISC
|
|
985
|
+
*
|
|
986
|
+
* This source code is licensed under the ISC license.
|
|
987
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
988
|
+
*/const n6=[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],i6=ye("file-pen-line",n6);/**
|
|
989
|
+
* @license lucide-react v1.28.0 - ISC
|
|
990
|
+
*
|
|
991
|
+
* This source code is licensed under the ISC license.
|
|
992
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
993
|
+
*/const r6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],BE=ye("file-spreadsheet",r6);/**
|
|
994
|
+
* @license lucide-react v1.28.0 - ISC
|
|
995
|
+
*
|
|
996
|
+
* This source code is licensed under the ISC license.
|
|
997
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
998
|
+
*/const a6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Fd=ye("file-text",a6);/**
|
|
999
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1000
|
+
*
|
|
1001
|
+
* This source code is licensed under the ISC license.
|
|
1002
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1003
|
+
*/const o6=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],Fm=ye("files",o6);/**
|
|
1004
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1005
|
+
*
|
|
1006
|
+
* This source code is licensed under the ISC license.
|
|
1007
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1008
|
+
*/const l6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],s6=ye("file",l6);/**
|
|
1009
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1010
|
+
*
|
|
1011
|
+
* This source code is licensed under the ISC license.
|
|
1012
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1013
|
+
*/const c6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],u6=ye("film",c6);/**
|
|
1014
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1015
|
+
*
|
|
1016
|
+
* This source code is licensed under the ISC license.
|
|
1017
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1018
|
+
*/const d6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],f6=ye("globe",d6);/**
|
|
1019
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1020
|
+
*
|
|
1021
|
+
* This source code is licensed under the ISC license.
|
|
1022
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1023
|
+
*/const h6=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],hy=ye("grip-vertical",h6);/**
|
|
1024
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1025
|
+
*
|
|
1026
|
+
* This source code is licensed under the ISC license.
|
|
1027
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1028
|
+
*/const m6=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],p6=ye("house",m6);/**
|
|
1029
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1030
|
+
*
|
|
1031
|
+
* This source code is licensed under the ISC license.
|
|
1032
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1033
|
+
*/const g6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Pd=ye("image",g6);/**
|
|
1034
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1035
|
+
*
|
|
1036
|
+
* This source code is licensed under the ISC license.
|
|
1037
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1038
|
+
*/const y6=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]],qp=ye("images",y6);/**
|
|
1039
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1040
|
+
*
|
|
1041
|
+
* This source code is licensed under the ISC license.
|
|
1042
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1043
|
+
*/const b6=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],v6=ye("key-round",b6);/**
|
|
1044
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1045
|
+
*
|
|
1046
|
+
* This source code is licensed under the ISC license.
|
|
1047
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1048
|
+
*/const x6=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],qE=ye("layout-grid",x6);/**
|
|
1049
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1050
|
+
*
|
|
1051
|
+
* This source code is licensed under the ISC license.
|
|
1052
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1053
|
+
*/const w6=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],k6=ye("layout-template",w6);/**
|
|
1054
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1055
|
+
*
|
|
1056
|
+
* This source code is licensed under the ISC license.
|
|
1057
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1058
|
+
*/const S6=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],E6=ye("library-big",S6);/**
|
|
1059
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1060
|
+
*
|
|
1061
|
+
* This source code is licensed under the ISC license.
|
|
1062
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1063
|
+
*/const _6=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],my=ye("link-2",_6);/**
|
|
1064
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1065
|
+
*
|
|
1066
|
+
* This source code is licensed under the ISC license.
|
|
1067
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1068
|
+
*/const j6=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],O6=ye("link",j6);/**
|
|
1069
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1070
|
+
*
|
|
1071
|
+
* This source code is licensed under the ISC license.
|
|
1072
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1073
|
+
*/const A6=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],FE=ye("list",A6);/**
|
|
1074
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1075
|
+
*
|
|
1076
|
+
* This source code is licensed under the ISC license.
|
|
1077
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1078
|
+
*/const N6=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],M6=ye("lock",N6);/**
|
|
1079
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1080
|
+
*
|
|
1081
|
+
* This source code is licensed under the ISC license.
|
|
1082
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1083
|
+
*/const C6=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],R6=ye("log-out",C6);/**
|
|
1084
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1085
|
+
*
|
|
1086
|
+
* This source code is licensed under the ISC license.
|
|
1087
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1088
|
+
*/const T6=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],D6=ye("mail",T6);/**
|
|
1089
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1090
|
+
*
|
|
1091
|
+
* This source code is licensed under the ISC license.
|
|
1092
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1093
|
+
*/const L6=[["path",{d:"M15 22a1 1 0 0 1-1-1v-4a1 1 0 0 1 .445-.832l3-2a1 1 0 0 1 1.11 0l3 2A1 1 0 0 1 22 17v4a1 1 0 0 1-1 1z",key:"1p1rcz"}],["path",{d:"M18 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 .601.2",key:"mcbcs9"}],["path",{d:"M18 22v-3",key:"1t1ugv"}],["circle",{cx:"10",cy:"10",r:"3",key:"1ns7v1"}]],z6=ye("map-pin-house",L6);/**
|
|
1094
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1095
|
+
*
|
|
1096
|
+
* This source code is licensed under the ISC license.
|
|
1097
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1098
|
+
*/const $6=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],PE=ye("map-pin",$6);/**
|
|
1099
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1100
|
+
*
|
|
1101
|
+
* This source code is licensed under the ISC license.
|
|
1102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1103
|
+
*/const U6=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],I6=ye("map-pinned",U6);/**
|
|
1104
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1105
|
+
*
|
|
1106
|
+
* This source code is licensed under the ISC license.
|
|
1107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1108
|
+
*/const H6=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],B6=ye("maximize-2",H6);/**
|
|
1109
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1110
|
+
*
|
|
1111
|
+
* This source code is licensed under the ISC license.
|
|
1112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1113
|
+
*/const q6=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],F6=ye("mic",q6);/**
|
|
1114
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1115
|
+
*
|
|
1116
|
+
* This source code is licensed under the ISC license.
|
|
1117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1118
|
+
*/const P6=[["path",{d:"M5 12h14",key:"1ays0h"}]],V6=ye("minus",P6);/**
|
|
1119
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1120
|
+
*
|
|
1121
|
+
* This source code is licensed under the ISC license.
|
|
1122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1123
|
+
*/const G6=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],K6=ye("mouse-pointer-click",G6);/**
|
|
1124
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1125
|
+
*
|
|
1126
|
+
* This source code is licensed under the ISC license.
|
|
1127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1128
|
+
*/const Y6=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],Q6=ye("newspaper",Y6);/**
|
|
1129
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1130
|
+
*
|
|
1131
|
+
* This source code is licensed under the ISC license.
|
|
1132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1133
|
+
*/const X6=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Z6=ye("palette",X6);/**
|
|
1134
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1135
|
+
*
|
|
1136
|
+
* This source code is licensed under the ISC license.
|
|
1137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1138
|
+
*/const W6=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],py=ye("pencil",W6);/**
|
|
1139
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1140
|
+
*
|
|
1141
|
+
* This source code is licensed under the ISC license.
|
|
1142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1143
|
+
*/const J6=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],eL=ye("phone",J6);/**
|
|
1144
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1145
|
+
*
|
|
1146
|
+
* This source code is licensed under the ISC license.
|
|
1147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1148
|
+
*/const tL=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],VE=ye("play",tL);/**
|
|
1149
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1150
|
+
*
|
|
1151
|
+
* This source code is licensed under the ISC license.
|
|
1152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1153
|
+
*/const nL=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],iL=ye("plug",nL);/**
|
|
1154
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1155
|
+
*
|
|
1156
|
+
* This source code is licensed under the ISC license.
|
|
1157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1158
|
+
*/const rL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vd=ye("plus",rL);/**
|
|
1159
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1160
|
+
*
|
|
1161
|
+
* This source code is licensed under the ISC license.
|
|
1162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1163
|
+
*/const aL=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],oL=ye("power",aL);/**
|
|
1164
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1165
|
+
*
|
|
1166
|
+
* This source code is licensed under the ISC license.
|
|
1167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1168
|
+
*/const lL=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],gy=ye("presentation",lL);/**
|
|
1169
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1170
|
+
*
|
|
1171
|
+
* This source code is licensed under the ISC license.
|
|
1172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1173
|
+
*/const sL=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],cL=ye("redo-2",sL);/**
|
|
1174
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1175
|
+
*
|
|
1176
|
+
* This source code is licensed under the ISC license.
|
|
1177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1178
|
+
*/const uL=[["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M16.47214 7.52786 A 5 10 0 1 0 13 21.79796",key:"1245p8"}],["path",{d:"M21.79796 11 A 10 5 0 1 0 19 15.57071",key:"1i40ks"}]],yy=ye("rotate-3d",uL);/**
|
|
1179
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1180
|
+
*
|
|
1181
|
+
* This source code is licensed under the ISC license.
|
|
1182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1183
|
+
*/const dL=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],fL=ye("rotate-cw",dL);/**
|
|
1184
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1185
|
+
*
|
|
1186
|
+
* This source code is licensed under the ISC license.
|
|
1187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1188
|
+
*/const hL=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],by=ye("search",hL);/**
|
|
1189
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1190
|
+
*
|
|
1191
|
+
* This source code is licensed under the ISC license.
|
|
1192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1193
|
+
*/const mL=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pL=ye("settings",mL);/**
|
|
1194
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1195
|
+
*
|
|
1196
|
+
* This source code is licensed under the ISC license.
|
|
1197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1198
|
+
*/const gL=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],yL=ye("share",gL);/**
|
|
1199
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1200
|
+
*
|
|
1201
|
+
* This source code is licensed under the ISC license.
|
|
1202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1203
|
+
*/const bL=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],vL=ye("sparkles",bL);/**
|
|
1204
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1205
|
+
*
|
|
1206
|
+
* This source code is licensed under the ISC license.
|
|
1207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1208
|
+
*/const xL=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],wL=ye("tag",xL);/**
|
|
1209
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1210
|
+
*
|
|
1211
|
+
* This source code is licensed under the ISC license.
|
|
1212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1213
|
+
*/const kL=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],vl=ye("trash-2",kL);/**
|
|
1214
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1215
|
+
*
|
|
1216
|
+
* This source code is licensed under the ISC license.
|
|
1217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1218
|
+
*/const SL=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],EL=ye("trending-up",SL);/**
|
|
1219
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1220
|
+
*
|
|
1221
|
+
* This source code is licensed under the ISC license.
|
|
1222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1223
|
+
*/const _L=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jL=ye("triangle-alert",_L);/**
|
|
1224
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1225
|
+
*
|
|
1226
|
+
* This source code is licensed under the ISC license.
|
|
1227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1228
|
+
*/const OL=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],AL=ye("type",OL);/**
|
|
1229
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1230
|
+
*
|
|
1231
|
+
* This source code is licensed under the ISC license.
|
|
1232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1233
|
+
*/const NL=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],ML=ye("undo-2",NL);/**
|
|
1234
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1235
|
+
*
|
|
1236
|
+
* This source code is licensed under the ISC license.
|
|
1237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1238
|
+
*/const CL=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Gd=ye("upload",CL);/**
|
|
1239
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1240
|
+
*
|
|
1241
|
+
* This source code is licensed under the ISC license.
|
|
1242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1243
|
+
*/const RL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],TL=ye("user-plus",RL);/**
|
|
1244
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1245
|
+
*
|
|
1246
|
+
* This source code is licensed under the ISC license.
|
|
1247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1248
|
+
*/const DL=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],LL=ye("user",DL);/**
|
|
1249
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1250
|
+
*
|
|
1251
|
+
* This source code is licensed under the ISC license.
|
|
1252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1253
|
+
*/const zL=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],$L=ye("users",zL);/**
|
|
1254
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1255
|
+
*
|
|
1256
|
+
* This source code is licensed under the ISC license.
|
|
1257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1258
|
+
*/const UL=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],vy=ye("video",UL);/**
|
|
1259
|
+
* @license lucide-react v1.28.0 - ISC
|
|
1260
|
+
*
|
|
1261
|
+
* This source code is licensed under the ISC license.
|
|
1262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1263
|
+
*/const IL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xy=ye("x",IL);function ie(...e){return Jg(Xg(e))}const HL="flex flex-col gap-3.5 pt-1",Va="flex flex-col gap-1",GE="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",xl="m-0 text-caption leading-[1.4] text-danger",KE="bg-[repeating-linear-gradient(135deg,rgba(20,18,13,0.05)_0_1px,transparent_1px_9px)]",vt="appearance-none cursor-pointer border-0 bg-transparent p-0 m-0 outline-none",BL="flex w-full items-stretch rounded-[calc(8*var(--content))] border border-line bg-white transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",qL="min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.75 py-2.25 text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4",wl=ie("data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft");function kl(e,t){return e===null||e==="required"&&!t?{}:{"data-attention":e}}const YE="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",FL=ie(vt,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4"),PL="py-2.25",VL="text-[length:calc(13.5*var(--content))]",QE=ie(PL,VL),XE="font-mono text-[length:calc(10.5*var(--content))] [font-feature-settings:'tnum'] shrink-0",ZE="text-[#7a5a14]";function GL(e,t){const r=ie(XE,"text-ink-4");return t==null?r:e>t?ie(r,"text-danger"):e>=t*.9?ie(r,ZE):r}function KL({children:e}){return d.jsx("span",{className:GE,children:e})}function YL({value:e,onChange:t,placeholder:r,inputMode:a,maxLength:l,spellCheck:c,className:u,ariaLabel:m,id:p}){return d.jsx("input",{id:p,className:ie(FL,u),value:e,placeholder:r,inputMode:a,maxLength:l,spellCheck:c,"aria-label":m,onChange:g=>t(g.target.value)})}function mn(e,t,r=1.5){const a=e;return function({size:c=t}={}){return d.jsx(a,{size:c,strokeWidth:r,style:{width:`calc(${c} * var(--content))`,height:`calc(${c} * var(--content))`}})}}const Lt={trash:mn(vl,11),plus:mn(Vd,14),up:mn(Gd,15),link:mn(O6,13),play:({size:e=20}={})=>d.jsx(VE,{size:e,strokeWidth:0,fill:"currentColor",style:{width:`calc(${e} * var(--content))`,height:`calc(${e} * var(--content))`}}),tour:mn(yy,18),search:mn(by,14),x:mn(xy,15),check:mn(qd,13),minus:mn(V6,16),external:mn(IE,11),grip:mn(hy,13,1.8),calendar:mn(SD,14),chevL:mn($E,15),chevR:mn(dy,15),chevD:mn(uy,13)},Kd=x.createContext(null);function QL({ports:e,children:t}){return d.jsx(Kd.Provider,{value:e,children:t})}function Wt(){const e=x.useContext(Kd);if(!e)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return e}function XL(){var e;return(e=x.useContext(Kd))==null?void 0:e.fillMark}function ZL(){var e;return(e=x.useContext(Kd))==null?void 0:e.isMediaProcessing}function Uo(e){return Wt().useEditorStore(e)}const WL="size-[calc(6*var(--content))] shrink-0 rounded-full bg-honey-ink";function qs(e,t){const r=g4(t);return e===void 0||r===null?void 0:`${e}.${r}`}function Fs(e,t){return e===void 0?void 0:`${e}.${t}`}function WE(e){return e==="list"||e==="media"||bn(e)}function JL(e){const t=XL();return t===void 0||e===void 0?null:t(e)}function e8({mark:e}){return e===null?null:d.jsxs("span",{"data-fill-mark":"line",className:"inline-flex items-center gap-[calc(6*var(--content))] text-[length:calc(11.5*var(--content))] text-ink-3",children:[d.jsx("span",{className:WL,"aria-hidden":"true"}),e]})}var Zi=S2();function t8(...e){return Jg(Xg(e))}const Yd=1e3,Br=Yd+200,n8=Yd+500;let i8=0;const qr=[];let JE="",e_="";function r8(){if(qr.length!==1||typeof document>"u")return;const e=document.body;JE=e.style.overflow,e_=e.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",t>0&&(e.style.paddingRight=`${t}px`)}function a8(){qr.length===0&&(typeof document>"u"||(document.body.style.overflow=JE,document.body.style.paddingRight=e_))}function t_(){const e=++i8;return qr.push(e),r8(),e}function Fp(e){const t=qr.indexOf(e);t!==-1&&qr.splice(t,1),a8()}function n_(e){const t=qr.indexOf(e);return Yd+(t===-1?0:t)*10}function Mw(e){return qr[qr.length-1]===e}const o8="(prefers-reduced-motion: reduce)";function l8(){const[e,t]=x.useState(!1);return x.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(o8);t(r.matches);const a=l=>t(l.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}const s8={sm:"max-w-[calc(420*var(--frame))]",md:"max-w-[calc(520*var(--frame))]",lg:"max-w-[calc(800*var(--frame))]",xl:"max-w-[calc(1240*var(--frame))]",full:"max-w-[calc(100vw-80px)]"},c8='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function wy({open:e,onClose:t,className:r,size:a,closeOnBackdrop:l=!0,closeOnEsc:c=!0,labelledBy:u,ariaLabel:m,children:p}){const[g,b]=x.useState("closed"),v=x.useRef(null),k=x.useRef(null),w=x.useRef(null),[j,E]=x.useState(1e3),_=l8(),[C,O]=x.useState(p);e&&C!==p&&O(p),x.useEffect(()=>{e&&g==="closed"?b("open"):!e&&g==="open"&&b(_?"closed":"closing")},[e,g,_]),x.useEffect(()=>{var R;if(g==="open"&&v.current===null){w.current=document.activeElement??null;const P=t_();v.current=P,E(n_(P)),(R=k.current)==null||R.focus()}},[g]),x.useEffect(()=>{var R,P;g==="closed"&&v.current!==null&&(Fp(v.current),v.current=null,(P=(R=w.current)==null?void 0:R.focus)==null||P.call(R),w.current=null)},[g]),x.useEffect(()=>()=>{v.current!==null&&(Fp(v.current),v.current=null)},[]),x.useEffect(()=>{if(g!=="closing")return;const R=setTimeout(()=>b("closed"),400);return()=>clearTimeout(R)},[g]),x.useEffect(()=>{if(g!=="open"||!c)return;const R=P=>{P.key==="Escape"&&(v.current===null||!Mw(v.current)||(P.stopPropagation(),t()))};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g,c,t]),x.useEffect(()=>{if(g!=="open")return;const R=P=>{if(P.key!=="Tab"||v.current===null||!Mw(v.current))return;const L=k.current;if(!L)return;const T=L.querySelectorAll(c8);if(T.length===0){P.preventDefault();return}const H=T[0],ne=T[T.length-1];P.shiftKey&&document.activeElement===H?(P.preventDefault(),ne==null||ne.focus()):!P.shiftKey&&document.activeElement===ne&&(P.preventDefault(),H==null||H.focus())};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g]);const A=x.useCallback(R=>{R.target===R.currentTarget&&g==="closing"&&b("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const D=g==="closing"?"closing":"open";return Zi.createPortal(d.jsx("div",{className:"hp-modal-backdrop","data-state":D,inert:D==="closing",style:{zIndex:j},onMouseDown:l?t:void 0,children:d.jsx("div",{ref:k,className:t8("hp-modal-panel",a?s8[a]:void 0,r),"data-state":D,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":m,tabIndex:-1,onMouseDown:R=>R.stopPropagation(),onAnimationEnd:A,children:e?p:C})}),document.body)}function i_(){const[e,t]=x.useState(Yd);return x.useEffect(()=>{const r=t_();return t(n_(r)),()=>Fp(r)},[]),e}const u8={youtube:"video",vimeo:"video"};function r_(e){const t=ac(e.startsWith("http")?e:`https://${e}`);if(t!==null){const r=Kr[t],a=r.kind==="tour"||r.kind==="video"?r.kind:void 0;return{key:t,name:r.label,kind:u8[t]??"link",...a?{media:a}:{}}}try{return{key:"web",name:new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,""),kind:"link"}}catch{return{key:"web",name:"Link",kind:"link"}}}const ky="bg-[#f7f6f2]",An="bg-[#eceae3]",d8="[mask-image:var(--fade-down)]",f8="[background-image:var(--wash-soft)]";function hc({className:e,children:t}){return d.jsx("div",{"aria-hidden":"true",className:ie("pointer-events-none absolute inset-0 select-none overflow-hidden",d8,e),children:t})}function yd({icon:e,headline:t,line:r,lifted:a=!1}){return d.jsx("div",{className:ie("absolute inset-0 flex items-center justify-center-safe overflow-y-auto px-6 py-8",f8),children:d.jsxs("div",{className:"flex max-w-full flex-col items-center text-center",children:[d.jsx("span",{"data-lifted":a||void 0,className:"grid h-14 w-14 place-items-center rounded-full bg-[#f3f2ed] text-ink-2 transition-[translate] duration-200 ease-settle data-lifted:-translate-y-0.5 motion-reduce:transition-none","aria-hidden":"true",children:e}),d.jsx("div",{className:"mt-4 text-[length:calc(17*var(--content))] font-semibold tracking-[-0.01em] text-ink",children:t}),r?d.jsx("div",{className:"mt-1.5 text-[length:calc(14*var(--content))] text-ink-3",children:r}):null]})})}const Sy="inline-flex h-9 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border px-3 text-[length:calc(12.5*var(--content))] font-medium transition-colors duration-150",Ey="border-line bg-canvas text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Qd="hp-anim-menu absolute z-[80] rounded-xl border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_12px_32px_-8px_rgba(20,18,13,0.16)]",a_="flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-left text-[length:calc(12.5*var(--content))] text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Cw=ie(Sy,Ey,"font-semibold text-ink focus-visible:bg-[#f6f5f1] aria-expanded:bg-[#f6f5f1]"),h8={large:Cw,compact:ie(Cw,"h-8")},m8="size-[calc(15*var(--content))] shrink-0";function bd({add:e,size:t,onClick:r,buttonRef:a,expanded:l}){return d.jsxs("button",{ref:a,type:"button",...l!==void 0?{"aria-haspopup":"dialog","aria-expanded":l}:{},"data-list-verb":e.verb,className:h8[t],onClick:r,children:[d.jsx(e.icon,{"aria-hidden":"true",strokeWidth:2.4,className:m8}),e.label]})}function mc({size:e,add:t,onAdd:r,newChip:a,choose:l}){const c=l!==void 0?d.jsx(bd,{add:l.choose,size:e,onClick:l.onChoose}):a??(r!==null?d.jsx(bd,{add:t,size:e,onClick:r}):null);return c===null?null:d.jsx("div",{"data-list-verbs":"",className:"flex flex-wrap items-center gap-2",children:c})}const o_=x.createContext(null);function p8({api:e,children:t}){return d.jsx(o_.Provider,{value:e,children:t})}function _y(){const e=x.useContext(o_);if(!e)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return e}async function g8(e,t,r){let a=0;const l=Math.max(1,Math.min(t,e.length)),c=Array.from({length:l},async()=>{for(;a<e.length;){const u=a++;try{await r(e[u],u)}catch{}}});await Promise.all(c)}const Rw=500*1024*1024,vd=[{extension:".pdf",mimeTypes:["application/pdf"],family:"pdf"},{extension:".csv",mimeTypes:["text/csv","application/vnd.ms-excel"],family:"spreadsheet"},{extension:".xlsx",mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],family:"spreadsheet"},{extension:".docx",mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],family:"text-document"},{extension:".doc",mimeTypes:["application/msword"],family:"text-document"},{extension:".txt",mimeTypes:["text/plain"],family:"text-document"},{extension:".pptx",mimeTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],family:"presentation"}],l_=new Set(vd.map(e=>e.extension)),s_=new Set(vd.flatMap(e=>e.mimeTypes));function Xd(e){const t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function jy(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),r=e.slice(t+1),a=r.lastIndexOf(".");return a<=0?"":r.slice(a).toLowerCase()}function y8(e){return Xd(e).startsWith("image/")}function b8(e){return Xd(e).startsWith("video/")}function v8(e,t){return l_.has(jy(e))&&s_.has(Xd(t))}function x8(e,t){return y8(t)||b8(t)||v8(e,t)}function w8(e,t){const r=jy(e),a=vd.find(u=>u.extension===r);if(a)return a.family;const l=Xd(t),c=vd.find(u=>u.mimeTypes.includes(l));return c?c.family:null}const k8=[...s_,...l_].join(","),S8="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function E8(e){return e.replace(/^https?:\/\//i,"").replace(/\/$/,"")}function _8(e){switch(e){case"pdf":return{glyph:"doc",typeNoun:"PDF"};case"spreadsheet":return{glyph:"spreadsheet",typeNoun:"Spreadsheet"};case"text-document":return{glyph:"doc",typeNoun:"Document"};case"presentation":return{glyph:"presentation",typeNoun:"Presentation"}}}function c_(e,t){const r=w8(e,t),{glyph:a,typeNoun:l}=r===null?{glyph:"doc",typeNoun:"File"}:_8(r);return{glyph:a,typeNoun:l,extension:jy(e).replace(".","").toUpperCase()}}function j8(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}function xd(e){var t;return((t=e.renditions.poster)==null?void 0:t.url)??(e.kind==="image"?e.file_url:null)}function O8(e){var t;return e.kind!=="image"?xd(e):(oc(e.crop)?(t=e.renditions.crop)==null?void 0:t.url:void 0)??xd(e)}function u_(e){if(e.kind!=="image"||e.state==="failed")return!1;const{crop:t,cutout:r}=e.renditions;return t!==null&&oc(e.crop)&&!rl(t.over.crop,e.crop)?!0:r!==null&&!rl(r.over.crop,e.crop)}function A8(e){return e.url!==null||e.renditions.encode!==null}function d_(e){return e.url!==null&&c5(e.url)!==null}function Zd({renditions:e={},...t}){const r=new Set(J2),a=l=>{const c=e[l];if(c===void 0)return null;const u={key:c,mime:null,width:null,height:null,bytes:null,url:c};return r.has(l)?{...u,over:{crop:t.crop??null,options:{}}}:u};return{crop:null,key:t.file_url??null,mime:null,bytes:null,url:null,provider:null,added_at:"1970-01-01T00:00:00.000Z",account:null,page_count:null,duration_ms:null,width:null,height:null,captured_at:null,scan_count:null,poster_at_ms:null,state:"ready",file_url:null,file:t.id,...t,renditions:Object.fromEntries(m5.map(l=>[l,a(l)]))}}function f_(e){var t,r,a,l;switch(e.kind){case"image":return{id:e.id,kind:"photo",name:e.name,size:"",src:((t=e.renditions.cutout)==null?void 0:t.url)??xd(e)??""};case"video":return{id:e.id,kind:"video",name:e.name,size:"",src:((r=e.renditions.poster)==null?void 0:r.url)??"",ready:A8(e),durationMs:e.renditions.encode===null?null:e.duration_ms,videoSource:v5(e),...e.provider!==null?{provider:e.provider}:{}};case"tour":return{id:e.id,kind:"tour",name:e.name,size:"",src:((a=e.renditions.poster)==null?void 0:a.url)??"",ready:d_(e),provider:e.provider??""};case"document":return{id:e.id,kind:"document",name:e.name,size:e.bytes!==null&&e.bytes>0?j8(e.bytes):"",src:((l=e.renditions.poster)==null?void 0:l.url)??"",mime:e.mime??""}}}function N8(e){if(e==null||!Number.isFinite(e)||e<0)return"";const t=Math.round(e/1e3),r=Math.floor(t/60),a=t%60;return`${r}:${String(a).padStart(2,"0")}`}const M8=5;function Tw(e){return`${Math.round(e/(1024*1024))} MB`}function C8(e){return e.size>Rw?{ok:!1,message:`This file is ${Tw(e.size)}. The maximum upload size is ${Tw(Rw)}.`}:x8(e.name,e.type)?{ok:!0}:{ok:!1,message:`This file type (${e.type||"unknown"}) isn't supported. Upload ${S8}.`}}function R8(e){return e.attempt?{kind:"resume",attempt:e.attempt}:{kind:"fresh"}}function Wd(e){const{mediaFactsQuery:t}=_y(),r=t(e??"");return Bd({...r,select:a=>a.facts,enabled:!!e}).data}async function Pp(e,t,r){await e.invalidateQueries({queryKey:t.mediaFactsQuery(r).queryKey})}const T8=new Map;function D8(e){if(e===void 0)return T8;const t=new Map;for(const[r,a]of zd(e)){if(!Object.hasOwn(e.files,a.file))continue;const l=e.files[a.file];"renditions"in l&&t.set(r,Og(l,a))}return t}function Sl(e){const t=Wd(e===""?null:e);return x.useMemo(()=>D8(t),[t])}const L8={search:by,chevd:uy,chevr:dy,chevl:$E,grid:qE,list:FE,plus:Vd,choose:zE,cloud:fy,dots:QD,trash:vl,down:UE,x:xy,check:qd,warn:jL,recheck:fL,play:VE,eye:HE,pencil:py,crop:PD,image:Pd,doc:Fd,spreadsheet:BE,presentation:gy,file:s6,video:vy,tour:cy,upload:Gd};function at({name:e,size:t=14,stroke:r=1.8}){const a=L8[e];if(!a)return null;const l={width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`};return e==="play"?d.jsx(a,{size:t,strokeWidth:r,fill:"currentColor",style:l}):d.jsx(a,{size:t,strokeWidth:r,style:l})}const Oy={image:{process:[jt.probe(),jt.understand(),jt.preview(),jt.ladder()],gates:["probe","understand"],publishes:["preview","ladder"]},video:{process:[jt.probe(),jt.transcode(),jt.poster(),jt.understand(),jt.preview(),jt.ladder(),jt.fetch()],gates:["probe","understand"],publishes:["transcode","poster","preview","ladder"]},document:{process:[jt.probe(),jt.understand(),jt.poster(),jt.rasterize(),jt.preview(),jt.ladder()],gates:["probe","understand"],publishes:["poster","preview","ladder"]},tour:{process:[jt.fetch(),jt.tour_details(),jt.understand()],gates:["understand"],publishes:[]}};function z8(e){for(const t of Ya){const r=e[t];if(r===void 0)return`has no row for ${t} — every media kind has one`;const a=new Set;for(const l of r.process){const c=G2(l);if(c===null||typeof l!="object")return`${t}'s row lists ${JSON.stringify(l)}, which is no process binding`;const u=Gr[c.verb];if(u.site!=="kind")return`${t}'s row lists "${c.verb}", a holder's process — a row lists kind-site processes only`;if(!u.kinds.includes(t))return`${t}'s row lists "${c.verb}", which applies to ${u.kinds.join(", ")} and not to ${t}`;const m=kg(c);if(m!==null)return`${t}'s row lists "${c.verb}" with options that do not fit: ${m}`;if(a.has(c.verb))return`${t}'s row lists "${c.verb}" twice — a row runs each process once`;a.add(c.verb)}for(const l of r.gates)if(!a.has(l))return`${t}'s row gates on "${l}", which is not on its row`;for(const l of r.publishes)if(!a.has(l))return`${t}'s row publishes on "${l}", which is not on its row`}return null}const Dw=z8(Oy);if(Dw!==null)throw new Error(`KIND_TABLE ${Dw}.`);const $8={original:e=>e.key!==null,"pageable original":e=>e.key!==null&&e.mime==="application/pdf",master:e=>e.key!==null,poster:e=>e.renditions.poster!==null,link:e=>e.url!==null&&e.provider!==null,"any original":e=>e.key!==null||e.url!==null&&e.provider!==null},U8={probe:"original",understand:"any original",transcode:"original",poster:{video:"original",document:"pageable original"},rasterize:"pageable original",preview:{image:"master",video:"poster",document:"poster"},ladder:{image:"master",video:"poster",document:"poster"},fetch:"link",tour_details:"link"};function I8(e,t){const r=U8[e];if(typeof r=="string")return r;const a=r[t];if(a===void 0)throw new Error(`kindRow(${t}): "${e}" names no input for ${t}.`);return a}const h_={image:[],video:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"},{before:"fetch",after:"understand"}],document:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"}],tour:[{before:"fetch",after:"tour_details"},{before:"fetch",after:"understand"}]};for(const e of Ya){const t=Oy[e].process.map(r=>r.verb);for(const{before:r,after:a}of h_[e])if(!t.includes(r)||!t.includes(a))throw new Error(`KIND_TABLE: ${e}'s edge ${r} → ${a} names a verb not on its row.`)}const Lw=new Map,H8={image:[jt.crop()],video:[],document:[],tour:[]};for(const e of Ya)for(const t of H8[e]){const r=Gr[t.verb];if(r.site!=="place"||!r.kinds.includes(e))throw new Error(`PLACE_TABLE: ${e}'s row lists "${t.verb}", which is no place process of ${e}.`)}function B8(e){const t=Lw.get(e);if(t!==void 0)return t;const r=Oy[e],a=r.process.map(c=>{const u=I8(c.verb,e);return{verb:c.verb,binding:c,input:u,present:$8[u],gates:r.gates.includes(c.verb),publishes:r.publishes.includes(c.verb)}}),l={kind:e,entries:a,edges:h_[e],gates:r.gates};return Lw.set(e,l),l}const pc={image:{label:"Image",plural:"Images",icon:"image",solid:"bg-[#2F8A5B]",soft:"bg-[#E6F2EA] text-[#1F6440]"},video:{label:"Video",plural:"Videos",icon:"video",solid:"bg-[#D2463A]",soft:"bg-[#FBE8E5] text-[#9A2C20]"},document:{label:"Document",plural:"Documents",icon:"doc",solid:"bg-[#3F73D3]",soft:"bg-[#E7EEFB] text-[#2A55A5]"},tour:{label:"Tour",plural:"Tours",icon:"tour",solid:"bg-[#7C5BC9]",soft:"bg-[#EFEAFA] text-[#5A3EA0]"}},wd=Object.keys(pc);function Nn(e){return"send"in e}function m_(e){return Nn(e)?e.id:e.record.id}function q8(e){return e.renditions.poster!==null||e.state==="failed"?!1:e.url!==null?e.state==="processing":B8(e.kind).entries.some(t=>t.verb==="poster"&&t.present(e))}function F8(e){return e.url!==null&&e.state==="failed"}function Cs(e){return e.url!==null}function p_(e){return Q2(/^https?:\/\//i.test(e)?e:`https://${e}`)}const P8=()=>0;function V8({record:e,list:t,tier:r},a){const l=a(t);return{id:e.id,kind:e.kind,state:e.state==="processing"?"processing":"ready",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:O8(e),addedAt:Date.parse(e.added_at),previewPending:q8(e),linkUnreachable:F8(e),inFlight:!1,error:null,list:t,tier:r??l,upstream:l>0}}function G8(e){const{send:t}=e;return{id:e.id,kind:e.kind,state:t.state==="uploading"?"uploading":t.state==="saving"?"processing":"failed",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:e.preview,addedAt:e.addedAt,previewPending:!1,linkUnreachable:!1,inFlight:!0,...t.state==="uploading"?{progress:t.progress}:{},error:t.state==="failed"?t.error:null,list:e.list,tier:0,upstream:!1}}function K8(e,t=P8){return Nn(e)?G8(e):V8(e,t)}function zw(e){return e.kind===null?wd.length:wd.indexOf(e.kind)}const Y8={name:(e,t)=>e.name.localeCompare(t.name),kind:(e,t)=>zw(e)-zw(t)||t.addedAt-e.addedAt,size:(e,t)=>(t.bytes??0)-(e.bytes??0),date:(e,t)=>t.addedAt-e.addedAt,custom:(e,t)=>Number(t.inFlight)-Number(e.inFlight)};function Q8(e,t,r){const a=t==="all"?[...e]:e.filter(c=>c.kind===t),l=Y8[r];return a.sort((c,u)=>c.tier-u.tier||l(c,u))}function X8(e){const t={all:e.length};for(const r of wd)t[r]=0;for(const r of e)r.kind&&(t[r.kind]+=1);return t}function g_(e){return e===null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}function y_(e,t=Date.now()){const r=new Date(e),a=new Date(t),l=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),c=Math.round((l(a)-l(r))/864e5);return c<=0?"Today":c===1?"Yesterday":r.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Z8(e){const[t,r]=x.useState(e);return(e===null||t===null)&&t!==e&&r(e),x.useEffect(()=>{if(e===null||t===null||e===t)return;let a=!0;const l=new Image,c=()=>{a&&r(e)};return l.onload=c,l.onerror=c,l.src=e,()=>{a=!1,l.onload=null,l.onerror=null}},[e,t]),e===null?null:t}const W8="inline-flex items-center gap-1 whitespace-nowrap rounded-full px-2 py-0.75 text-[length:calc(10.5*var(--content))] font-semibold tracking-[0.01em]",J8={dot:{box:"h-4 w-4 rounded-[calc(4*var(--content))]",glyph:10},mark:{box:"h-5 w-5 rounded-md",glyph:12},lead:{box:"h-6 w-6 rounded-md",glyph:14},thumb:{box:"h-5.5 w-5.5 rounded-md",glyph:13},logo:{box:"h-14 w-14 rounded-2xl",glyph:28},hero:{box:"h-20 w-20 rounded-[calc(22*var(--content))]",glyph:40}};function Ga({kind:e,size:t="mark",glyph:r,decorative:a=!1}){const l=pc[e],c=J8[t];return d.jsx("span",{className:ie("inline-grid shrink-0 place-items-center text-white",c.box,l.solid),...a?{"aria-hidden":!0}:{role:"img","aria-label":l.label},children:d.jsx(at,{name:r??l.icon,size:c.glyph,stroke:2})})}function b_({file:e}){if(e.kind===null)return null;const t=pc[e.kind];return d.jsxs("span",{className:ie(W8,t.soft),children:[d.jsx(at,{name:t.icon,size:10,stroke:2.2}),t.label]})}function ez(e){const t=e.url!==null?r_(e.url).name:e.bytes!==null?g_(e.bytes):"",r=y_(e.addedAt);return t?`${t} · ${r}`:r}function tz(e){return c_(e.name,e.mime??"").glyph}function nz(e){return`flex items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px] ${e?"h-13 w-13":"h-9 w-9"}`}const iz={row:"thumb",card:"logo",lightbox:"hero"};function Ay({file:e,face:t="card"}){const r=Z8(e.thumbnailUrl);if(r)return d.jsx("div",{"data-preview":"image",className:"relative h-full w-full bg-cover bg-top",style:{backgroundImage:`url("${r}")`},children:e.kind==="video"?d.jsx("span",{className:`absolute inset-0 m-auto ${nz(t==="lightbox")}`,children:d.jsx(at,{name:"play",size:t==="lightbox"?20:14})}):null});if(e.previewPending)return d.jsx("div",{"data-preview":"skeleton",className:"h-full w-full animate-pulse bg-line-soft/40"});const a=e.kind==="document"?tz(e):void 0;return d.jsxs("div",{"data-preview":"fallback",className:"flex h-full w-full flex-col items-center justify-center gap-4 bg-canvas px-4 text-center",children:[e.kind===null?d.jsx("span",{className:"text-ink-4",children:d.jsx(at,{name:"file",size:t==="row"?16:32,stroke:1.6})}):d.jsx(Ga,{kind:e.kind,size:iz[t],decorative:!0,...a===void 0?{}:{glyph:a}}),t==="lightbox"?d.jsx("span",{className:"line-clamp-2 max-w-[80%] text-body text-ink-3",children:e.name}):null]})}const qu="absolute inset-0 z-[2] flex flex-col items-center justify-center gap-2 bg-[rgba(252,252,250,0.82)] p-2 text-center backdrop-blur-[2px]",v_="Can’t be reached",Vp="We couldn’t load this link. It may be private, unpublished, or mistyped. Fix it at the provider, then re-check.",Fu="absolute inset-0 z-[2] flex items-center justify-center bg-[rgba(252,252,250,0.82)] px-1";function x_({file:e,compact:t=!1,onRetry:r,onRecheck:a}){if(e.state==="uploading"){const l=e.progress??0;return d.jsx("div",{className:t?Fu:qu,children:d.jsx("span",{role:"progressbar","aria-label":"Uploading","aria-valuenow":Math.round(l),className:`h-1 overflow-hidden rounded-full bg-[#e3e0d2] ${t?"w-full":"w-[62%]"}`,children:d.jsx("span",{className:"block h-full rounded-full bg-accent transition-[width] duration-[180ms]",style:{width:`${l}%`}})})})}return e.state==="processing"?d.jsx("div",{className:t?Fu:qu,children:d.jsx("span",{role:"progressbar","aria-label":"Loading",className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-[#d9d5c6] border-t-accent [animation-duration:0.7s]"})}):e.state==="failed"&&t?d.jsx("div",{className:`${Fu} text-danger`,title:e.error??void 0,children:d.jsx(at,{name:"warn",size:13})}):e.state==="failed"?d.jsxs("div",{className:`${qu} text-[length:calc(11.5*var(--content))] font-semibold text-danger`,children:[d.jsx(at,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[85%] truncate",children:e.error}),r?d.jsx("button",{type:"button",className:"rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:l=>{l.stopPropagation(),r()},children:"Retry"}):null]}):e.linkUnreachable&&t?d.jsx("div",{className:`${Fu} text-warn`,title:Vp,children:d.jsx(at,{name:"warn",size:13})}):e.linkUnreachable?d.jsxs("div",{className:`${qu} text-[length:calc(11.5*var(--content))] font-semibold text-warn`,title:Vp,children:[d.jsx(at,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[90%]",children:v_}),a?d.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:l=>{l.stopPropagation(),a()},children:[d.jsx(at,{name:"recheck",size:11}),"Re-check"]}):null]}):null}function gc(e,t,r,a){x.useEffect(()=>{if(!t)return;const l=u=>{var p,g;const m=u.target;!((p=e.current)!=null&&p.contains(m))&&!((g=a==null?void 0:a.current)!=null&&g.contains(m))&&r()},c=u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),r())};return document.addEventListener("pointerdown",l,!0),document.addEventListener("keydown",c),window.addEventListener("blur",r),()=>{document.removeEventListener("pointerdown",l,!0),document.removeEventListener("keydown",c),window.removeEventListener("blur",r)}},[e,t,r,a])}function w_({inputRef:e,accept:t,onFiles:r,disabled:a,multiple:l=!0}){return d.jsx("input",{ref:e,type:"file",multiple:l,hidden:!0,accept:t,onChange:c=>{!a&&c.target.files&&c.target.files.length>0&&r(Array.from(c.target.files)),c.target.value=""}})}function kd(e,t="or"){return e.length<2?e[0]??"":`${e.slice(0,-1).join(", ")} ${t} ${e.at(-1)}`}const k_=["tour","video"],rz={tour:"3D tour",video:"video"};function Ny(e){return k_.filter(t=>e.includes(t)).flatMap(t=>rz[t]??[])}function az(e,t){const r=l=>e.includes(l);if(t.accept!==null){const l=[...r("image")?["photos"]:[],...r("image")&&r("document")?["floor plans"]:[],...r("document")?["documents"]:[],...r("video")?["video"]:[]];return l.length===0?null:`Drop ${kd(l)} anywhere here`}if(!t.onLink)return null;const a=Ny(e);return a.length===0?null:`Paste a link to a ${kd(a)}`}function oz(e,t){const r=e.trim();if(!r)return{state:"empty"};const a=p_(r);return a===null||!t.includes(a)?{state:"refused"}:{state:"ok",kind:a,provider:r_(r).name}}function lz(e,t,r){const[a,l]=x.useState(""),c=oz(a,r),u=!t&&c.state==="ok";return{value:a,setValue:l,verdict:c,canAdd:u,submit:p=>{p.preventDefault(),p.stopPropagation(),u&&(e(a.trim()),l(""))},kinds:r}}function sz({verdict:e,kinds:t,className:r}){return d.jsx("div",{className:ie("flex items-center gap-2 text-[length:calc(11.5*var(--content))]",r),"aria-live":"polite",children:e.state==="ok"?d.jsxs(d.Fragment,{children:[d.jsx(Ga,{kind:e.kind,decorative:!0}),d.jsxs("span",{className:"font-medium text-ink-2",children:[e.provider," ",pc[e.kind].label.toLowerCase()]})]}):e.state==="refused"?d.jsxs("span",{className:"text-warn",children:["Only ",kd(Ny(t),"and")," links can be added."]}):null})}const cz="shrink-0 cursor-pointer border border-honey-2 bg-honey font-semibold text-honey-ink transition-colors duration-150 hover:bg-honey-2 disabled:cursor-default disabled:border-line disabled:bg-[#f0efe9] disabled:text-ink-4";function uz({draft:e}){return d.jsxs("div",{className:"flex h-10 items-center rounded-lg border border-line bg-canvas py-1 pl-3 pr-1 transition-[border-color,box-shadow] duration-150 hover:border-ink-4 focus-within:border-ink-3 focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",children:[d.jsx("span",{className:"grid shrink-0 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(my,{size:15})}),d.jsx("input",{className:"h-full min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.5 py-0 text-body text-ink placeholder:text-ink-4",type:"url",inputMode:"url",placeholder:`Paste a ${kd(Ny(e.kinds))} link`,"aria-label":"Link URL",autoFocus:!0,value:e.value,onChange:t=>e.setValue(t.target.value),onKeyDown:t=>{t.key==="Enter"&&e.submit(t)}}),d.jsx("button",{type:"button",disabled:!e.canAdd,onClick:e.submit,className:ie(cz,"h-8 rounded-md px-3 text-[length:calc(12.5*var(--content))]"),children:"New link"})]})}function dz({add:e,kinds:t,dragging:r}){if(e===null)return d.jsx(yd,{icon:d.jsx(qp,{size:25,strokeWidth:1.8}),headline:"Nothing here yet"});const a=az(t,e);return d.jsx(yd,{icon:e.accept!==null?d.jsx(fy,{size:25,strokeWidth:1.8}):d.jsx(my,{size:24,strokeWidth:1.8}),headline:r?"Drop to upload":"Nothing uploaded yet",...a!==null?{line:a}:{},lifted:r})}function fz({onChoose:e,detail:t}){return d.jsxs("button",{type:"button",onClick:e,className:"group flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-2.5 py-2.5 text-left hover:bg-[#f6f5f1] focus-visible:bg-[#f6f5f1]",children:[d.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-[#f3f2ed] text-ink-2 transition-colors duration-150 group-hover:bg-canvas group-hover:text-ink group-focus-visible:bg-canvas group-focus-visible:text-ink","aria-hidden":"true",children:d.jsx(fy,{size:18,strokeWidth:1.9})}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"text-body font-semibold text-ink",children:"Upload files"}),t!==void 0?d.jsx("span",{className:"text-[length:calc(11.5*var(--content))] text-ink-3",children:t}):null]})]})}function hz({onAdd:e,disabled:t,kinds:r}){const a=lz(e,t,r);return d.jsxs("div",{className:"flex flex-col gap-2 px-1 pb-1",children:[d.jsx(uz,{draft:a}),d.jsx(sz,{verdict:a.verdict,kinds:r,className:"px-0.5 empty:hidden"})]})}function S_({add:e,onBrowse:t,onLinked:r,uploadDetail:a}){return d.jsxs(d.Fragment,{children:[e.accept!==null?d.jsx(fz,{onChoose:t,...a!==void 0?{detail:a}:{}}):d.jsx("div",{className:"px-1.5 pb-0.5 pt-1 text-body font-semibold text-ink",children:"New link"}),d.jsx(hz,{onAdd:l=>{e.onLink(l),r()},disabled:e.disabled,kinds:e.linkKinds??k_})]})}function mz({add:e,verb:t}){const{accept:r,onFiles:a,onLink:l,disabled:c}=e,[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useCallback(()=>m(!1),[]);gc(p,u,b);const v=()=>{var w;b(),(w=g.current)==null||w.click()},k=()=>{u?b():l?m(!0):v()};return d.jsxs("div",{className:"relative",ref:p,onClick:w=>w.stopPropagation(),children:[r!==null?d.jsx(w_,{inputRef:g,accept:r,onFiles:a,disabled:c}):null,d.jsx(bd,{add:t,size:"large",onClick:k,...l?{expanded:u}:{}}),u&&l?d.jsx("div",{className:`${Qd} left-0 top-[calc(100%+6*var(--content))] flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,role:"dialog","aria-label":t.verb,children:d.jsx(S_,{add:{...e,onLink:l},onBrowse:v,onLinked:b,uploadDetail:"Photos, floor plans, documents or video"})}):null]})}function E_(e,t,r,a=!0){const{accept:l,onFiles:c,onLink:u,disabled:m}=e,[p,g]=x.useState(!1),[b,v]=x.useState(null),k=x.useRef(null),w=x.useRef(null),j=x.useCallback(()=>{g(!1),v(null)},[]);gc(r,p,j,k),x.useLayoutEffect(()=>{if(!p)return;const C=()=>{const O=r.current,A=k.current;if(!O||!A)return;const D=A.offsetHeight,R=hl(Ba(O),{height:D,maxHeight:D,minWidth:A.offsetWidth});v(R?{left:R.left,top:R.top,bottom:R.bottom}:null)};return C(),window.addEventListener("scroll",C,!0),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)}},[p,r]);const E=()=>{var C;j(),(C=w.current)==null||C.click()},_=d.jsxs(d.Fragment,{children:[l!==null?d.jsx(w_,{inputRef:w,accept:l,onFiles:c,disabled:m,multiple:a}):null,p&&u?Zi.createPortal(d.jsx("div",{ref:k,className:`we-no-drag ${Qd} flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,style:b?{position:"fixed",...b,zIndex:Br}:{position:"fixed",top:0,left:0,zIndex:Br,opacity:0,pointerEvents:"none"},role:"dialog","aria-label":t,onClick:C=>C.stopPropagation(),children:d.jsx(S_,{add:{...e,onLink:u},onBrowse:E,onLinked:j})}),document.body):null]});return{start:()=>{u?p?j():g(!0):E()},...u?{expanded:p}:{},node:_}}function pz({add:e,intake:t,trigger:r}){const a=x.useRef(null),l=E_(t,e.label,a);return d.jsxs(d.Fragment,{children:[l.node,r({buttonRef:a,...l.expanded!==void 0?{expanded:l.expanded}:{},onClick:l.start})]})}const gz="relative cursor-grab touch-none select-none",yz="relative grid grid-cols-[repeat(auto-fill,minmax(calc(150*var(--frame)),1fr))] gap-2.5",bz={compact:"flex flex-col gap-2.5",large:"flex flex-col gap-3"},$w=new Set;function My(e,t,r){const a=r!==null?{kind:"take",intake:r}:t!==null?{kind:"choose",open:t}:null;return{add:e.add,onAdd:a,choose:e.choose!==null&&t!==null?{choose:e.choose,onChoose:t}:void 0}}function El(e,t,r,a,l){const c=new Set(t.map(g=>g.id)),u=e.filter(g=>{const b=r(g.value);return b===null||c.has(b)}),m=new Set(u.map(g=>r(g.value)));return[...t.filter(g=>!m.has(g.id)).map(g=>l(a(g))),...u]}function Cy({engine:e,label:t,noun:r,size:a,onAdd:l,add:c,choose:u,renderTile:m,tileActions:p,onRemove:g,children:b}){const{rows:v,canAdd:k,canRemove:w}=e,{containerRef:j,getItemProps:E}=e.drag,[_,C]=x.useState($w),O=v.filter(H=>_.has(H.key)),A=O.map(H=>H.key),D=H=>C(ne=>{const Y=new Set(ne);return Y.has(H)?Y.delete(H):Y.add(H),Y}),R=()=>C($w),P=H=>{g?g(H):e.removeMany(H.map(ne=>ne.key)),R()},L=H=>{if(!w)return null;const ne=_.has(H.key)&&O.length>1?O:null;return ne?{label:`Remove ${ne.length} ${r}s`,glyph:"trash",danger:!0,onSelect:()=>P(ne)}:{label:"Remove",glyph:"trash",danger:!0,onSelect:()=>P([H])}},T=k?d.jsx(mc,{size:a,add:c,onAdd:(l==null?void 0:l.kind)==="choose"?l.open:null,...(l==null?void 0:l.kind)==="take"?{newChip:d.jsx(pz,{add:c,intake:l.intake,trigger:H=>d.jsx(bd,{add:c,size:a,...H})})}:{},choose:u}):null;return d.jsxs("div",{className:Va,children:[d.jsxs("div",{className:bz[a],children:[T,v.length===0?a==="large"&&d.jsx("div",{className:"py-4.5 text-center text-small text-ink-3",children:c.empty}):d.jsx("div",{className:yz,ref:j,onClick:H=>{H.target===H.currentTarget&&R()},children:d.jsx("div",{className:"contents",role:"listbox","aria-multiselectable":!0,"aria-label":t,onKeyDown:H=>{H.key!=="Escape"||A.length===0||(H.stopPropagation(),R())},children:v.map((H,ne)=>{const Y=L(H),oe={selected:_.has(H.key),onToggleSelect:()=>D(H.key),actions:[...(p==null?void 0:p(H))??[],...Y?[Y]:[]]},K=_.has(H.key)&&A.length>1?A:void 0;return d.jsx("div",{...E(H.key,K),className:gz,children:m(H,ne,oe)},H.key)})})})]}),b]})}const vz="data-drag-clone",Uw="0 16px 38px -8px rgba(20,18,13,0.5)",xz=["id","for","name","data-dragid","data-drag-scope"];function Zu(e){if(!e||e==="transparent")return!1;const t=/^rgba\([^,]+,[^,]+,[^,]+,\s*([\d.]+)\s*\)$/.exec(e);if(t)return Number(t[1])>=1;const r=/\/\s*([\d.]+)(%?)\s*\)$/.exec(e);return r?Number(r[1])>=(r[2]?100:1):!0}function wz(e){for(let t=e;t;t=t.parentElement){const r=getComputedStyle(t).backgroundColor;if(Zu(r))return r}return"#fff"}function Iw(e){for(let t=e;t;){const r=getComputedStyle(t).borderRadius;if(kz(r))return r;const a=t.children.length===1?t.children[0]:null;t=a&&a.offsetWidth===e.offsetWidth&&a.offsetHeight===e.offsetHeight?a:null}return null}function kz(e){return e!==""&&!/^(0(px)?\s*)+$/.test(e)}function Sz(e){const t=e.cloneNode(!0),r=[e,...e.querySelectorAll("*")],a=[t,...t.querySelectorAll("*")];r.forEach((l,c)=>{const u=a[c];if(!(!u||u.tagName!==l.tagName))switch(l.tagName){case"INPUT":u.value=l.value,u.checked=l.checked;break;case"TEXTAREA":case"SELECT":u.value=l.value;break;case"VIDEO":u.muted=!0,u.autoplay=!1;break}});for(const l of a)for(const c of xz)l.removeAttribute(c);return t.setAttribute(vz,""),t.setAttribute("aria-hidden","true"),t.inert=!0,t}function Ez(e,t,r){if(t===r||t<0||r<0)return e;const a=e.slice(),[l]=a.splice(t,1);return a.splice(r,0,l),a}const __="data-drag-scope";function Pm(e){return Array.from(e.querySelectorAll("[data-dragid]")).filter(t=>t.closest(`[${__}]`)===e)}function _z(e){const t=/^matrix(3d)?\(([^)]+)\)$/.exec(e.trim());if(!(t!=null&&t[2]))return{x:0,y:0};const r=t[2].split(",").map(Number),[a,l]=t[1]?[r[12],r[13]]:[r[4],r[5]];return{x:a||0,y:l||0}}const Hw=190,Bw=220,Vm="cubic-bezier(.2,.7,.3,1)",jz="0.4",Oz="0",Az="1",Nz="2",Mz="60",Sd="data-drag-active",qw="hp-drag-reorder-active",Cz=`html[${Sd}], html[${Sd}] * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }`;function Gm(e){const t=document.documentElement;if(!e){t.removeAttribute(Sd);return}if(!document.getElementById(qw)){const r=document.createElement("style");r.id=qw,r.textContent=Cz,document.head.appendChild(r)}t.setAttribute(Sd,"")}function Fw(e){return!e||typeof e.animate!="function"?!1:!(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}function Rz(e){if(!e)return;const t=r=>{r.target!==null&&e.contains(r.target)&&(r.stopPropagation(),r.preventDefault()),window.removeEventListener("click",t,!0)};window.addEventListener("click",t,!0),setTimeout(()=>window.removeEventListener("click",t,!0),0)}const Tz="pointer-events-none absolute -right-1.5 -top-1.5 z-[5] grid h-6 min-w-6 place-items-center rounded-full bg-accent px-1.5 text-[length:calc(11.5*var(--content))] font-bold tabular-nums text-white shadow-[0_1px_3px_rgba(20,18,13,0.3)]";function Dz(e,t,r){const a=e.filter(c=>r.has(t(c))),l=a[0];return{collapsed:e.filter(c=>c===l||!r.has(t(c))),members:a}}function Lz(e,t){const r=t[0]===void 0?-1:e.indexOf(t[0]);return r<0?e:[...e.slice(0,r),...t,...e.slice(r+1)]}function j_({items:e,getKey:t,onReorder:r,onDrop:a,axis:l="xy",threshold:c=4,ignoreSelector:u=".we-no-drag"}){const[m,p]=x.useState(null),g=x.useRef(null),b=x.useRef({}),v=x.useRef({grabX:0,grabY:0,scale:1,originLeft:0}),k=x.useRef({x:0,y:0}),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef("#fff"),O=x.useRef(new Set),A=x.useRef(new Map),D=x.useRef(new WeakMap),R=x.useRef(null),P=x.useRef(null),L=x.useRef(e),T=x.useRef(t),H=x.useRef({onReorder:r,onDrop:a});x.useLayoutEffect(()=>{H.current={onReorder:r,onDrop:a}}),x.useEffect(()=>()=>{var ae;const I=R.current;R.current=null,I&&H.current.onDrop(I);const F=P.current;F&&(window.removeEventListener("pointermove",F.move),window.removeEventListener("pointerup",F.end),window.removeEventListener("pointercancel",F.end)),(ae=_.current)==null||ae.remove(),E.current&&Gm(!1)},[]);function ne(I){const F=I.getBoundingClientRect(),ae=v.current.scale||1;return{x:(k.current.x-F.left)/ae-I.clientLeft,y:(k.current.y-F.top)/ae-I.clientTop}}function Y(){const I=_.current,F=g.current;if(!I||!F)return;const ae=ne(F);I.style.left=`${l==="y"?v.current.originLeft:ae.x-v.current.grabX}px`,I.style.top=`${ae.y-v.current.grabY}px`}function oe(){const I=g.current,{x:F,y:ae}=ne(I),ce=L.current;let he=0,be=1/0;return Pm(I).forEach($=>{const de=ce.findIndex(De=>T.current(De)===$.dataset.dragid);if(de<0)return;const ge=$.offsetLeft+$.offsetWidth/2,_e=$.offsetTop+$.offsetHeight/2,Re=(F-ge)**2+(ae-_e)**2;Re<be&&(be=Re,he=de)}),Math.max(0,Math.min(ce.length-1,he))}function K(I,F,ae){const ce=!A.current.has(I),he=A.current.get(I)??{position:I.style.position,zIndex:I.style.zIndex,opacity:I.style.opacity,borderRadius:I.style.borderRadius};A.current.set(I,he),getComputedStyle(I).position==="static"&&(I.style.position="relative"),ce&&(I.style.borderRadius=Iw(I)??he.borderRadius),I.style.zIndex=F,I.style.opacity=ae?jz:he.opacity,ae?I.setAttribute("data-ghost",""):I.removeAttribute("data-ghost")}function X(I){const F=A.current.get(I);F&&(I.style.position=F.position,I.style.zIndex=F.zIndex,I.style.opacity=F.opacity,I.style.borderRadius=F.borderRadius,I.removeAttribute("data-ghost"),A.current.delete(I))}function le(I,F){var $;C.current=wz(I);const ae=getComputedStyle(F).backgroundColor,ce=Iw(F),he=Sz(F);ce&&(he.style.borderRadius=ce),Object.assign(he.style,{position:"absolute",left:"0px",top:"0px",width:`${F.offsetWidth}px`,margin:"0",zIndex:Mz,pointerEvents:"none",transform:"none",opacity:"1",transition:"none",animation:"none",boxShadow:Uw,backgroundColor:Zu(ae)?ae:C.current}),v.current.originLeft=F.offsetLeft;const be=(($=j.current)==null?void 0:$.length)??1;if(be>1){const de=document.createElement("span");de.className=Tz,de.textContent=String(be),he.appendChild(de)}I.appendChild(he),_.current=he}function M(I,F,ae,ce){if(F.left===ae.left&&F.top===ae.top)return;const he=D.current.get(I),be=(he==null?void 0:he.playState)==="running"?_z(getComputedStyle(I).transform):{x:0,y:0};he==null||he.cancel();const $=F.left+be.x-ae.left,de=F.top+be.y-ae.top;if(!$&&!de)return;D.current.set(I,I.animate([{transform:`translate(${$}px,${de}px)`},{transform:"none"}],{duration:Hw,easing:Vm}));const ge=C.current;ce&&!Zu(getComputedStyle(I).backgroundColor)&&I.animate([{backgroundColor:ge},{backgroundColor:ge}],{duration:Hw})}function V(I,F,ae){var _e;(_e=D.current.get(I))==null||_e.cancel();const ce=F.left-ae.left,he=F.top-ae.top;if(!ce&&!he)return;const be=getComputedStyle(I),$=Zu(be.backgroundColor)?be.backgroundColor:C.current;K(I,Nz,!1);const de=I.animate([{transform:`translate(${ce}px,${he}px)`},{transform:"none"}],{duration:Bw,easing:Vm});I.animate([{boxShadow:Uw,backgroundColor:$},{boxShadow:be.boxShadow,backgroundColor:$}],{duration:Bw,easing:Vm}),D.current.set(I,de);const ge=()=>{E.current||X(I)};de.onfinish=ge,de.oncancel=ge}x.useLayoutEffect(()=>{const I=g.current;if(!I)return;I.setAttribute(__,"");const F=E.current,ae=O.current;O.current=new Set;const ce=Pm(I);if(F&&!_.current){const de=ce.find(ge=>ge.dataset.dragid===F);de&&le(I,de)}if(!F)for(const de of[...A.current.keys()])X(de);const he=Fw(I),be=b.current,$={};ce.forEach(de=>{const ge=de.dataset.dragid,_e={left:de.offsetLeft,top:de.offsetTop};$[ge]=_e,F&&K(de,ge===F?Oz:Az,ge===F);const Re=be[ge];!Re||!he||(ae.has(ge)?V(de,Re,_e):M(de,Re,_e,F!==null&&ge!==F))}),b.current=$,F&&Y()});function te(){const I=R.current;R.current=null,I&&H.current.onDrop(I)}function pe(I,F,ae){var ge,_e,Re,De,xe;te();const ce=g.current,he=Pm(ce).find($e=>$e.dataset.dragid===I)??null;if(!he)return;const be=he.getBoundingClientRect(),$=ce.getBoundingClientRect().width/ce.offsetWidth||1;v.current={grabX:(ae.clientX-be.left)/$,grabY:(ae.clientY-be.top)/$,scale:$,originLeft:he.offsetLeft},(_e=(ge=document.activeElement)==null?void 0:ge.blur)==null||_e.call(ge),(xe=(De=(Re=window.getSelection)==null?void 0:Re.call(window))==null?void 0:De.removeAllRanges)==null||xe.call(De),Gm(!0),k.current={x:ae.clientX,y:ae.clientY},L.current=e,T.current=t,j.current=null;let de=I;if(F&&F.length>1&&F.includes(I)){const{collapsed:$e,members:yt}=Dz(e,t,new Set(F)),Ee=yt[0];yt.length>1&&Ee!==void 0&&(j.current=yt,de=t(Ee),L.current=$e,H.current.onReorder($e))}E.current=de,p(de)}function Q(I,F,ae){I.button===0&&(I.target.closest(u)||(w.current={key:F,x:I.clientX,y:I.clientY,group:ae},P.current={move:N,end:q},window.addEventListener("pointermove",N),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q)))}function N(I){const F=w.current;if(!F)return;if(!E.current){if(Math.hypot(I.clientX-F.x,I.clientY-F.y)<c)return;pe(F.key,F.group,I)}k.current={x:I.clientX,y:I.clientY},Y();const ae=oe(),ce=L.current,he=ce.findIndex($=>T.current($)===E.current);if(he<0||he===ae)return;const be=Ez(ce,he,ae);L.current=be,H.current.onReorder(be)}function q(){window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q),P.current=null,w.current=null;const I=E.current;if(!I)return;const F=j.current;j.current=null;const ae=F?F.map(he=>T.current(he)):[I];if(F){const he=Lz(L.current,F);L.current=he,H.current.onReorder(he)}const ce=_.current;if(ce){for(const he of ae)b.current[he]={left:ce.offsetLeft,top:ce.offsetTop};O.current=new Set(ae),ce.remove(),_.current=null}Rz(g.current),E.current=null,Gm(!1),p(null),R.current=L.current,Fw(g.current)?requestAnimationFrame(()=>setTimeout(te,0)):te()}return{containerRef:g,getItemProps:(I,F)=>({"data-dragid":I,onPointerDown:ae=>Q(ae,I,F)}),draggingKey:m}}let zz=0;function $z(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(zz++).toString(36)}`}function Ed(e,t){return{key:(t==null?void 0:t(e))??$z(),value:e}}function Uz(e,t){return e.map(r=>Ed(r,t))}function Iz(e,t,r){return t.map((a,l)=>{const c=e[l];return c!==void 0&&JSON.stringify(c.value)===JSON.stringify(a)?{key:c.key,value:a}:Ed(a,r)})}function Km(e){return JSON.stringify(e)}function Jr({items:e,identityOf:t,fixed:r=!1,axis:a="y",commit:l,onCommitted:c}){const[u,m]=x.useState(()=>Uz(e,t)),[p,g]=x.useState(()=>Km(e)),b=x.useRef(u);x.useEffect(()=>{b.current=u},[u]);function v(_){b.current=_,m(_)}function k(_,C){v(_),g(Km(_.map(O=>O.value))),l(_,C),c==null||c(_,C)}const w=j_({items:u,getKey:_=>_.key,onReorder:v,onDrop:_=>k(_,"reorder"),axis:a,threshold:5});if(!w.draggingKey){const _=Km(e);_!==p&&(g(_),m(Iz(u,e,t)))}function j(_,C){const O=b.current;O.some(A=>A.key===_)&&k(O.map(A=>A.key===_?{...A,value:C(A.value)}:A),"edit")}function E(_,C=0){if(r)return;const O=b.current,A=Math.min(Math.max(C,0),O.length);k([...O.slice(0,A),_,...O.slice(A)],"add")}return{rows:u,drag:w,canAdd:!r,canRemove:!r,add:(_,C)=>E(Ed(_,t),C),insert:E,remove:_=>{r||k(b.current.filter(C=>C.key!==_),"remove")},removeMany:_=>{const C=b.current,O=C.filter(A=>!_.includes(A.key));r||O.length===C.length||k(O,"remove")},setValue:(_,C)=>j(_,()=>C),updateValue:j,replace:_=>k(_,"replace"),mint:_=>Ed(_,t),indexOf:_=>u.findIndex(C=>C.key===_),keyAt:_=>{var C;return((C=u[_])==null?void 0:C.key)??null},latestRows:()=>b.current}}function ea(e,t,r,a){return e.isEmpty(r)?a?"required":null:e.isInvalid(r,t)?"invalid":null}const Hz={failed:"Crop failed. The image is unchanged. Try cropping again."};function Bz({storeKey:e}){const t=fT(e),r=ty(a=>a.clearNotice);return t?d.jsxs("p",{role:"alert","data-crop-notice":t,className:ie(xl,"flex items-center justify-between gap-2"),children:[d.jsx("span",{children:Hz[t]}),d.jsx("button",{type:"button",className:ie(vt,"shrink-0 underline"),onClick:()=>r(e),children:"Dismiss"})]}):null}function Ps(e){if(typeof e!="object"||e===null)return null;const t=x5(e)??Hr(e);return t===void 0||t===""?null:t}function yc(e){const t=Ps(e);if(t!==null||typeof e!="object"||e===null)return t;const r=e.id;return typeof r=="string"&&r.length>0?r:null}function ll(e){if(typeof e!="object"||e===null)return;const t=e.picked;return typeof t=="string"||t===null?t:Yr(e)?e.media:void 0}function qz(e){if(typeof e!="object"||e===null)return!1;const t=e;return["file","media"].some(r=>typeof t[r]=="string")||Hr(e)!==void 0}function O_(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const t=yc(e),r=ll(e);if(t!==null)return{file:t,...r===void 0?{}:{picked:r}}}return{file:""}}function Fz(e){return e.map(O_).filter(t=>t.file!=="")}function A_(e){switch(e.kind){case"document":return c_(e.name,e.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function Pz(e){return[A_(e).typeNoun,e.size].filter(Boolean).join(" · ")}function Vz(e){const t=Sl(e);return r=>{const a=t.get(r);return a===void 0?void 0:f_(a)}}const Gz={page:"expanded",panel:"compact",cell:"compact"};function Kz(e){return Gz[e]}const N_=x.createContext(null);function Jd({place:e,children:t}){return d.jsx(N_.Provider,{value:e,children:t})}function Ry(){const e=x.useContext(N_);if(e===null)throw new Error("[slot-editors] a slot editor was drawn outside a place: its container mounts <SlotPlaceProvider>.");return e}const Yz=x.createContext(!1);function _l(){return x.useContext(Yz)}const Qz=ie("flex w-full items-stretch rounded-[calc(10*var(--content))] border-[1.5px] border-line bg-canvas","transition-[border-color,box-shadow,background-color] duration-[120ms]","focus-within:border-ink focus-within:shadow-[0_0_0_4px_rgba(20,18,13,0.05)]",wl),Xz="min-w-0 flex-1 appearance-none border-0 bg-transparent px-3.5 py-2.75 text-[length:calc(15*var(--content))] text-ink outline-none placeholder:text-ink-4",Zz=ie("flex w-full min-w-0 flex-1 items-stretch rounded-[calc(6*var(--content))] border border-transparent bg-transparent","in-data-[card-fields]:bg-white","transition-[border-color,box-shadow,background-color] duration-100","group-hover/row:border-line group-hover/row:bg-white group-focus-within/row:border-line group-focus-within/row:bg-white","focus-within:border-ink focus-within:bg-white focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",wl),M_={"data-card-fields":""},Wz="min-w-0 flex-1 appearance-none truncate border-0 bg-transparent px-2.5 py-2 text-[length:calc(13.5*var(--content))] leading-[1.2] text-ink outline-none placeholder:text-ink-4",Jz={page:{frame:ie(Va,"gap-1.5"),shell:Qz,inner:Xz,adornEnd:"pr-3.5",multiline:"resize-none leading-[1.5]",inline:!1},panel:{frame:Va,shell:ie(BL,wl),inner:qL,adornEnd:"pr-2.75",multiline:"min-h-[calc(76*var(--content))] resize-none leading-[1.5]",inline:!1},cell:{frame:"flex w-full min-w-0 flex-col",shell:Zz,inner:Wz,adornEnd:"pr-2.5",multiline:"resize-none overflow-hidden whitespace-nowrap",inline:!0}};function ta(){return C_(Ry())}function C_(e){return{place:e,...Jz[e]}}function e$({count:e,max:t}){const r=t-e;return r>Math.ceil(t/5)?null:r<=0?{left:0,tone:"text-danger"}:{left:r,tone:r<=Math.ceil(t/10)?ZE:"text-ink-4"}}const t$=ie("relative","[&>input]:transition-[padding] [&>input]:duration-200 [&>input]:ease-out motion-reduce:[&>input]:transition-none","[&[data-count-open]>input]:pr-10","[&[data-count-room=band]]:flex-wrap"),n$="pointer-events-none absolute inset-y-0 right-0 flex items-center",i$=ie("flex h-0 basis-full items-end justify-end overflow-hidden","transition-[height] duration-200 ease-out motion-reduce:transition-none"),r$={page:"data-[open]:h-[calc(22*var(--content))] data-[open]:pb-2.75",panel:"data-[open]:h-[calc(20*var(--content))] data-[open]:pb-2.25",cell:""};function Ka({attention:e,count:t,className:r,ref:a,children:l}){const c=ta(),u=_l(),[m,p]=x.useState(!1),g=t!==void 0&&!c.inline,b=g&&m?e$(t):null,v=g&&t.multiline,k=b!==null&&d.jsxs("span",{"data-field-count":"",className:ie(XE,b.tone,"leading-none transition-[opacity,transform] duration-200 ease-out starting:translate-y-1 starting:opacity-0 motion-reduce:transition-none"),children:[b.left,d.jsx("span",{className:"sr-only",children:" characters left"})]});return d.jsxs("div",{ref:a,className:ie(c.shell,g&&t$,r),...kl(e,u),"data-count-room":g?v?"band":"end":void 0,"data-count-open":b!==null?"":void 0,onFocus:g?()=>p(!0):void 0,onBlur:g?()=>p(!1):void 0,children:[l,v?d.jsx("div",{className:ie(i$,r$[c.place],c.adornEnd),"data-open":b!==null?"":void 0,children:k}):b!==null&&d.jsx("div",{className:ie(n$,c.adornEnd),children:k})]})}function R_({attention:e,message:t}){const r=ta();return e!=="invalid"||r.inline?null:d.jsx("p",{className:xl,children:t})}const T_="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(560*var(--frame))))]",a$="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(480*var(--frame))))]",Ty="data-upstream:opacity-55 data-upstream:hover:opacity-100 data-upstream:focus-within:opacity-100",o$="hp-anim-menu rounded border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_8px_24px_-8px_rgba(20,18,13,0.08)]",D_="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-1.75 text-left text-[length:calc(12.5*var(--content))]",l$=`${D_} text-ink-2 hover:bg-accent-soft hover:text-ink`,L_="truncate rounded-full bg-white/90 px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold text-ink-2 shadow-[0_1px_3px_rgba(0,0,0,0.18)]",z_="select-none";function s$(e,t){const r=[{label:"Preview",glyph:"eye",onSelect:t.onPreview}];return t.onRenameStart&&r.push({label:"Rename",glyph:"pencil",onSelect:t.onRenameStart}),t.onCrop&&r.push({label:"Crop",glyph:"crop",onSelect:t.onCrop}),Cs(e)||r.push({label:"Download",glyph:"down",onSelect:t.onDownload}),t.onDelete&&r.push({label:t.deleteLabel??"Delete",glyph:"trash",onSelect:t.onDelete,danger:!0}),r}function $_({file:e,handlers:t,shown:r=!1}){return d.jsx(I_,{name:e.name,actions:s$(e,t),shown:r})}function U_(e){return{plain:e.filter(t=>!t.foot&&!t.danger),foot:[...e.filter(t=>t.foot&&!t.danger),...e.filter(t=>t.danger)]}}const Pw=4;function I_({name:e,actions:t,shown:r=!1,scale:a="card"}){const[l,c]=x.useState(!1),u=x.useRef(null),m=x.useRef(null),p=x.useRef(null),[g,b]=x.useState(null),v=x.useCallback(()=>{c(!1),b(null)},[]);gc(u,l,v,p),x.useLayoutEffect(()=>{if(!l)return;const E=()=>{const _=m.current,C=p.current;if(!_||!C)return;const O=Ba(_),A=C.offsetHeight,D=hl(O,{height:A,maxHeight:A,gap:Pw});if(!D){b(null);return}const R=document.documentElement.clientWidth-O.rect.right;if(D.maxHeight>=A){b({top:D.top,bottom:D.bottom,right:R});return}const{rect:P,bounds:L}=O,T=L.bottom-Sa-A,H=Math.max(L.top+Sa,Math.min(P.bottom+Pw,T));b({top:H,right:R})};return E(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[l]);const{plain:k,foot:w}=U_(t),j=E=>d.jsxs("button",{type:"button",role:"menuitem",className:E.danger?`${D_} text-danger hover:bg-accent-soft`:l$,onClick:()=>{v(),E.onSelect()},children:[d.jsx(at,{name:E.glyph,size:13}),E.label]},E.label);return d.jsxs("span",{className:"we-no-drag relative inline-flex",ref:u,children:[d.jsx("button",{ref:m,type:"button",className:`grid shrink-0 cursor-pointer place-items-center rounded-full text-ink-3 transition-opacity duration-[120ms] hover:bg-[rgba(20,18,13,0.07)] hover:text-ink focus-visible:opacity-100 group-hover:opacity-100 group-aria-selected:opacity-100 ${r?a==="compact"?"h-6 w-6":"h-8 w-8":"h-5.5 w-5.5"} ${l||r?"opacity-100":"opacity-0"}`,"aria-label":`Actions for ${e}`,"aria-haspopup":"menu","aria-expanded":l,onClick:E=>{E.stopPropagation(),c(_=>!_)},onDoubleClick:E=>E.stopPropagation(),children:d.jsx(at,{name:"dots",size:a==="compact"?13:14})}),l?Zi.createPortal(d.jsxs("div",{ref:p,className:`we-no-drag ${o$} w-[calc(188*var(--frame))] p-1.25`,style:g?{position:"fixed",...g,zIndex:Br}:{position:"fixed",top:0,right:0,zIndex:Br,visibility:"hidden"},role:"menu",onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),children:[k.map(j),w.length>0?d.jsxs(d.Fragment,{children:[k.length>0?d.jsx("div",{className:"mx-0 my-1 h-px bg-line-soft"}):null,w.map(j)]}):null]}),document.body):null]})}function H_({name:e,onCommit:t}){const[r,a]=x.useState(e);return d.jsx("input",{className:"we-no-drag min-w-0 flex-1 rounded-md border border-accent bg-canvas px-1.5 py-0.5 text-[length:calc(12.5*var(--content))] font-medium text-ink",value:r,autoFocus:!0,"aria-label":`Rename ${e}`,onFocus:l=>l.target.select(),onClick:l=>l.stopPropagation(),onDoubleClick:l=>l.stopPropagation(),onChange:l=>a(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t(r.trim()),l.key==="Escape"&&t(null),l.stopPropagation()},onBlur:()=>t(r.trim())})}function B_(e,t="card"){return`group/card relative flex cursor-pointer flex-col aria-disabled:cursor-not-allowed ${t==="compact"?"rounded-xl":"rounded-2xl"} outline-none transition-[background-color,box-shadow,opacity] duration-[140ms] ${e?"bg-accent-tint ring-2 ring-accent":"bg-[#f3f2ed] hover:bg-[#ebe9e2] focus-visible:ring-2 focus-visible:ring-accent"}`}const Ua={card:{bar:"flex h-12 min-w-0 items-center gap-2.5 pl-3.5 pr-2",name:"min-w-0 flex-1 truncate text-[length:calc(13*var(--content))] font-medium text-ink",thumb:"relative mx-2 aspect-[16/11] overflow-hidden rounded-xl bg-canvas"},compact:{bar:"flex h-8.5 min-w-0 items-center gap-1.5 pl-2.5 pr-1",name:"min-w-0 flex-1 truncate text-[length:calc(12*var(--content))] font-medium text-ink",thumb:"relative mx-1.5 aspect-[16/11] overflow-hidden rounded-lg bg-canvas"}},c$="we-no-drag flex cursor-auto flex-col gap-2 px-2 pt-2";function q_({kind:e,name:t,selected:r,select:a,onToggleSelect:l,scale:c="card"}){const u=c==="compact";return d.jsxs("span",{className:`relative grid shrink-0 place-items-center ${u?"h-4 w-4":"h-5 w-5"}`,children:[d.jsx("span",{className:`grid place-items-center transition-opacity duration-[120ms] ${r?"opacity-0":a.disabled?"":"group-hover/card:opacity-0"}`,children:e===null?d.jsx("span",{className:"text-ink-3",children:d.jsx(at,{name:"file",size:u?13:16})}):d.jsx(Ga,{kind:e,size:u?"dot":"mark"})}),d.jsx("button",{type:"button",role:a.control,"aria-checked":r,disabled:a.disabled,className:`we-no-drag absolute inset-0 grid cursor-pointer place-items-center border-[1.5px] transition-opacity duration-[120ms] disabled:cursor-not-allowed disabled:opacity-0 ${a.control==="radio"?"rounded-full":u?"rounded-[calc(4*var(--content))]":"rounded-md"} ${r?"border-accent bg-accent text-white opacity-100":"border-[rgba(20,18,13,0.45)] bg-canvas text-transparent opacity-0 group-hover/card:opacity-100 focus-visible:opacity-100"}`,"aria-label":r?`Deselect ${t}`:`Select ${t}`,onClick:m=>{m.stopPropagation(),l()},onDoubleClick:m=>m.stopPropagation(),children:d.jsx(at,{name:"check",size:u?10:12,stroke:2.6})})]})}function u$({file:e,selected:t,renaming:r,onClick:a,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k,beneath:w}){return d.jsxs("div",{...k,role:"option","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,tabIndex:0,className:`${B_(t)} ${Ty} ${k?z_:""}`,onClick:a,onDoubleClick:l,onKeyDown:j=>{j.target===j.currentTarget&&j.key==="Enter"&&(j.stopPropagation(),v.onPreview())},children:[d.jsxs("div",{className:Ua.card.bar,children:[d.jsx(q_,{kind:e.kind,name:e.name,selected:t,select:u,onToggleSelect:c}),r?d.jsx(H_,{name:e.name,onCommit:b}):d.jsx("span",{className:Ua.card.name,title:e.name,children:e.name}),d.jsx($_,{file:e,handlers:v,shown:!0})]}),d.jsxs("div",{className:Ua.card.thumb,children:[d.jsx(Ay,{file:e}),d.jsx(x_,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`absolute right-2 top-2 z-[3] max-w-[calc(100%-16px)] ${L_}`,"data-list-chip":"",children:m}):null]}),w?d.jsx("div",{className:c$,...M_,onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),children:w}):null,d.jsx("div",{className:"flex h-11 min-w-0 items-center px-3.5",children:d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3",children:ez(e)})})]})}function d$(){return d.jsxs("div",{className:`flex flex-col rounded-2xl ${ky}`,children:[d.jsxs("div",{className:Ua.card.bar,children:[d.jsx("span",{className:`h-4.5 w-4.5 shrink-0 rounded-md ${An}`}),d.jsx("span",{className:"min-w-0 flex-1",children:d.jsx("span",{className:`block h-2.5 w-3/5 rounded-full ${An}`})}),d.jsx("span",{className:`mr-1.5 h-1.5 w-4 shrink-0 rounded-full ${An}`})]}),d.jsx("div",{className:ie(Ua.card.thumb,An)}),d.jsx("div",{className:"flex h-11 items-center px-3.5",children:d.jsx("span",{className:`h-2 w-2/5 rounded-full ${An}`})})]})}const F_="grid grid-cols-[calc(28*var(--frame))_calc(44*var(--frame))_1fr_calc(110*var(--frame))_calc(80*var(--frame))_calc(90*var(--frame))_calc(36*var(--frame))] items-center gap-2.5 px-3",Vw="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[length:calc(11.5*var(--content))] font-medium";function f$(){return d.jsxs("div",{role:"row",className:`${F_} h-9.5 text-[length:calc(11*var(--content))] font-semibold tracking-[0.02em] text-ink-3`,children:[d.jsx("span",{}),d.jsx("span",{}),d.jsx("span",{children:"Name"}),d.jsx("span",{children:"Kind"}),d.jsx("span",{children:"Size"}),d.jsx("span",{children:"Added"}),d.jsx("span",{})]})}function h$({file:e,onRetry:t,onRecheck:r}){return e.state==="failed"?d.jsxs("span",{className:`${Vw} text-danger`,children:[e.error,t?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:a=>{a.stopPropagation(),t()},children:"Retry"}):null]}):e.linkUnreachable?d.jsxs("span",{className:`${Vw} text-warn`,title:Vp,children:[v_,r?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:a=>{a.stopPropagation(),r()},children:"Re-check"}):null]}):null}function m$({file:e,selected:t,renaming:r,onClick:a,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k}){return d.jsxs("div",{...k,role:"row","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,className:`group ${F_} ${Ty} h-12 cursor-pointer border-t border-line-soft transition-opacity duration-[140ms] aria-disabled:cursor-not-allowed last:rounded-b-[calc(11*var(--content))] ${t?"bg-accent-soft":"hover:bg-[#fbfaf7]"} ${k?z_:""}`,onClick:a,onDoubleClick:l,children:[d.jsx("button",{type:"button",role:u.control,"aria-checked":t,disabled:u.disabled,className:`grid h-4 w-4 cursor-pointer place-items-center border-[1.5px] disabled:cursor-not-allowed disabled:opacity-40 ${u.control==="radio"?"rounded-full":"rounded-[calc(5*var(--content))]"} ${t?"border-accent bg-accent text-white":"border-[#cfccc0] bg-canvas text-transparent group-hover:border-[#b3b0a3]"}`,"aria-label":t?`Deselect ${e.name}`:`Select ${e.name}`,onClick:w=>{w.stopPropagation(),c()},onDoubleClick:w=>w.stopPropagation(),children:t?d.jsx(at,{name:"check",size:10,stroke:3}):null}),d.jsxs("span",{className:"relative block h-7.5 w-11 overflow-hidden rounded-md border border-line-soft bg-[#f4f3ee]",children:[d.jsx(Ay,{file:e,face:"row"}),d.jsx(x_,{file:e,compact:!0})]}),d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[r?d.jsx(H_,{name:e.name,onCommit:b}):d.jsx("span",{className:"min-w-0 truncate text-[length:calc(12.5*var(--content))] font-medium text-ink",title:e.name,children:e.name}),d.jsx(h$,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`shrink-0 ${L_}`,"data-list-chip":"",children:m}):null]}),d.jsx("span",{className:"inline-flex",children:d.jsx(b_,{file:e})}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:g_(e.bytes)}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:y_(e.addedAt)}),d.jsx($_,{file:e,handlers:v})]})}const p$={control:"checkbox",disabled:!1},{bar:g$,name:y$,thumb:b$}=Ua.compact,v$="we-no-drag flex cursor-auto flex-col gap-1.5 px-1.5 pt-1.5";function x$({kind:e,name:t,chrome:r,thumb:a,below:l,beneath:c}){const{selected:u,onToggleSelect:m,actions:p}=r;return d.jsxs("div",{role:"option","aria-selected":u,tabIndex:0,"data-gallery-card":"",className:B_(u,"compact"),onClick:m,onKeyDown:g=>{g.target===g.currentTarget&&(g.key===" "||g.key==="Enter")&&(g.preventDefault(),m())},children:[d.jsxs("div",{className:g$,children:[d.jsx(q_,{kind:e,name:t,selected:u,select:p$,onToggleSelect:m,scale:"compact"}),d.jsx("span",{className:y$,title:t,children:t}),p.length>0&&d.jsx(I_,{name:t,actions:p,shown:!0,scale:"compact"})]}),d.jsx("div",{className:b$,"data-thumb":!0,"data-media-tile":e,children:a}),l,c?d.jsx("div",{className:v$,...M_,onClick:g=>g.stopPropagation(),children:c}):null,d.jsx("div",{className:"h-1.5"})]})}function Dy(e,t){const r=e!=null&&e.cut?e.derivativeUrl:t,[a,l]=x.useState(r);return r!==void 0&&r!==a&&l(r),r??a??t}const Ly="flex max-h-full w-full flex-col overflow-hidden rounded-[14px] bg-canvas shadow-[0_24px_70px_-24px_rgba(20,18,13,0.5),0_2px_0_rgba(20,18,13,0.04)]",w$="h-[min(88vh,max(560px,calc(min(80vw,1440px)*0.625)))] max-h-full w-[min(80vw,1440px)] max-md:h-full max-md:w-full",k$=ie(Ly,w$),S$="max-h-[min(calc(100vh-120px),max(680px,72vh))] w-[clamp(560px,38vw,960px)] max-w-full max-md:w-full",P_="px-[clamp(18px,1.4vw,40px)]",zy="px-[clamp(20px,1.75vw,36px)]",E$=ie("flex flex-shrink-0 items-center gap-[14px] pb-3 pt-[clamp(18px,1.6vw,30px)]",zy),_$=ie("flex min-h-0 flex-1 flex-col overflow-y-auto pb-[clamp(20px,1.75vw,36px)] pt-3 [container-type:size] [--list-display-h:100cqh] [&>*]:shrink-0",zy),$y="mr-auto flex min-w-0 flex-col gap-0.5",Uy="m-0 text-[16px] font-semibold tracking-[-0.01em]",j$="text-[12px] text-ink-3",Iy=ie(vt,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),V_="px-[18px] py-[13px]",O$=ie("flex flex-shrink-0 items-center gap-[14px]",V_),A$=ie("flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft",V_),N$="ml-auto flex gap-2",G_=ie(vt,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),M$=ie(G_,"border-line bg-white text-ink hover:bg-[#faf9f6]"),C$=ie(G_,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),R$=ie(vt,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),T$={page:"max-w-[920px]",crop:"max-w-[680px]"};function D$({open:e=!0,variant:t,onClose:r,children:a}){return d.jsx(wy,{open:e,onClose:r,className:ie(Ly,T$[t]),children:a})}const Hy={Shell:D$,head:O$,titles:$y,title:Uy,subtitle:j$,close:Iy,CloseIcon:Lt.x,foot:A$,actions:N$,buttonGhost:M$,buttonPrimary:C$,buttonLink:R$,ZoomOutIcon:Lt.minus,ZoomInIcon:Lt.plus},Gw=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function L$(e,t){let r=e;for(const a of t.holder.split("."))Array.isArray(r)?r=r.find(l=>Gw(l)&&l.id===a):r=Gw(r)?r[a]:void 0;return Array.isArray(r)?r.find(a=>Hr(a)===t.mediaId):Hr(r)===t.mediaId?r:void 0}function z$(e,t,r){if(e===void 0)return;const a=L$(e,r),l=a===void 0?void 0:t.get(r.mediaId),c=l===void 0||!Object.hasOwn(e.files,l.file)?void 0:e.files[l.file];if(l===void 0||c===void 0)return;const u=Yr(a)?Ag(l,a):l;return Og(c,u)}const $$=16/10;function Kw(e){return e.slice(e.indexOf(".")+1)}function Yw(e,t){return e.state==="failed"?!0:!rl(e.crop,t)||u_(e)?!1:!oc(t)||e.renditions.crop!==null}function K_({propertyId:e,recordAt:t,write:r,onFailed:a,onArrived:l}){const c=Os(k=>k.byPlace),[u,m]=x.useState(null),p=k=>{const w=t(k),j=c[Pa(k)];return j!==void 0?w===void 0||!Yw(w,j.crop):w!==void 0&&u_(w)};x.useEffect(()=>{const k=Object.values(c).filter(w=>{const j=w.propertyId===e?t(w.place):void 0;return j!==void 0&&Yw(j,w.crop)});if(k.length!==0){for(const w of k)Os.getState().settle(w.place);l==null||l()}},[c,t,e,l]);const g=async(k,w,j)=>{if(m(null),r===void 0)return;const E=xp(j);if(!rl(E,w.crop)){Os.getState().start(k,e,E);try{await r(k,al(E))}catch(_){Os.getState().settle(k),a==null||a(k),console.error("[media] home crop failed",{place:k,err:_})}}},b=u===null?void 0:t(u),v=(b==null?void 0:b.file_url)??null;return{offers:k=>{const w=t(k);return e!==""&&r!==void 0&&(w==null?void 0:w.kind)==="image"&&w.url===null&&w.file_url!==null},open:m,isOpen:b!==void 0&&v!==null,recropping:p,modal:u!==null&&b!==void 0&&v!==null?d.jsx(ey,{chrome:Hy,src:v,mode:"free",aspect:$$,seed:{rect:al(b.crop)},onClose:()=>m(null),onApply:k=>void g(u,b,k.rect)}):null}}const U$=1500;function I$(e){const t=Wd(e===""?null:e);return x.useMemo(()=>{const r=t===void 0?new Map:zd(t);return a=>z$(t,r,a)},[t])}function Y_(e,t){const r=_y(),a=Hd(),l=I$(e),{cropMedia:c}=r,u=x.useMemo(()=>c===void 0?void 0:async(v,k)=>{await c(e,v.mediaId,k,v.holder),await Pp(a,r,e)},[c,e,a,r]),m=x.useMemo(()=>()=>void Pp(a,r,e),[a,r,e]),p=K_({propertyId:e,recordAt:l,write:u,onFailed:t,onArrived:m}),g=Os(v=>v.byPlace),b=Object.values(g).some(v=>v.propertyId===e&&p.recropping(v.place));return Bd({...r.mediaFactsQuery(e),enabled:e!==""&&b,refetchInterval:b?U$:!1}),p}function H$(e){const{width:t,height:r}=e!==null&&typeof e=="object"?e:{};return{width:typeof t=="number"?t:null,height:typeof r=="number"?r:null}}function sl(e){var t;return((t=e.renditions.cutout)==null?void 0:t.url)??xd(e)??""}function By(e,t,r,a,l){const c=sl(e);if(e.file===t.file)return{...t,url:c};const u=r===void 0?void 0:rR(r,l,e.id);return u===void 0||r===void 0?{file:e.file,url:c,alt:t.alt,picked:e.id}:{...aR(u,H$(r.files[u.file]),a),url:c,alt:t.alt}}const Q_={New:Vd,Choose:zE,Upload:Gd};function Vs(e,t){return`${e} ${t}`}function qy(e,t,r){const a=Zr(t),l=r&&e==="New"?a.singular:a.plural;return{verb:e,icon:Q_[e],label:Vs(e,l),empty:`No ${a.plural} yet`}}function B$(e,t,r,a){const l=r.flatMap(u=>{const m=X_(u,a);return m===null?[]:[Zr(m)[t?"plural":"singular"]]}),c=qy("Choose",e,t);return l.length===0?c:{...c,label:Vs("Choose",[...new Set(l)].join(" or "))}}const q$={property:"Property",library:"Library"};function X_(e,t){if(!/^(?:property|library)\./.test(e))return null;const r=ud(e);if(r===null)return null;const{home:a}=Is(e);return a===t?r:`${q$[a]} ${r.charAt(0).toLowerCase()}${r.slice(1)}`}function ef(e,t={}){return e.locked===!0||!F$(e)?null:Fy(e,t)}function F$(e){const t=e.type;return t==="list"||t==="row"||pl(e.type)}function Fy(e,t={}){const r=e.type==="list",a=V$(e,t);return{add:qy(!r&&pl(e.type)?"Upload":"New",e.label,r),choose:a===null?null:B$(e.label,r,a.lists,a.home)}}function P$(e){const[t]=e,r=e.length===1&&t!==void 0?ud(t)??void 0:void 0;return qy("New",r,!0)}function Z_(e){return e.choose??e.add}function V$(e,t){const r=K$(e,t.table);if(r!==null&&Fa(r).length>0){const c=Fa(r)[1];return c===void 0?null:{lists:[c],home:Is(r).home}}const a=G$(e,t),l=t.membership;if((l==null?void 0:l.kind)==="pick-row"||(l==null?void 0:l.kind)==="pick-media"){const c=l.kind==="pick-row"?l.tables.map(u=>cS(u)):ja(l.filter.from);return{lists:a!==null&&a.length>0?a:c,home:"property"}}return a===null?null:{lists:a,home:"property"}}function G$(e,t){if(e.type==="list")return e.element===void 0?null:Q$(e.element);if(e.type==="row")return ja(e.from);if(!pl(e.type))return null;const r=il(e,t.table);return(r==null?void 0:r.kind)==="picked"?ja(r.filter.from):null}function ja(e){return Bg({from:e}).filter(t=>/^(?:property|library)\./.test(t))}function K$(e,t){const r=e.source;if((r==null?void 0:r.kind)==="home"&&typeof r.key=="string")return/^(?:property|library)\./.test(r.key)?r.key:null;const a=(r==null?void 0:r.kind)==="row"?r.field:void 0;return typeof a!="string"||a===""||t==null?null:`${cS(t)}.${Y$}.${a}`}const Y$="_";function Q$(e){const t=e.fields??{};if(CS(e)!==void 0)return e.from!==void 0?ja(e.from):Object.values(t).flatMap(l=>ja(l.from));if(e.type!=="object")return null;const r=wS(e);if((r==null?void 0:r.type)==="row"&&r.from!==void 0)return ja(r.from);if(!Pg(t))return null;const a=Object.values(t).filter(l=>pl(l.type)&&l.locked!==!0&&l.from!==void 0);return a.length===0?null:a.flatMap(l=>ja(l.from))}const Py={image:"image/*",video:"video/*",tour:null,document:k8};function Vy(e){const t=e.flatMap(r=>Py[r]??[]);return t.length===0?null:t.join(",")}function bc(e){return[...Vy(e)!==null?["file"]:[],...Sg(e).length>0?["link"]:[]]}const X$=ye("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"ig-frame"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"ig-lens"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"ig-flash"}]]),Z$=ye("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),W$=ye("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"li-arm"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"li-stem"}],["circle",{cx:"4",cy:"4",r:"2",key:"li-dot"}]]),J$=ye("XLogo",[["path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z",transform:"translate(2 2) scale(0.8333)",fill:"currentColor",stroke:"none",key:"x-mark"}]]),e7={home:p6,building:vD,apartments:wD,trendUp:EL,tag:wL,key:v6,template:k6,palette:Z6,filePen:i6,library:E6,plug:iL,helpCircle:LD,lock:M6,creditCard:qD,settings:pL,power:oL,user:LL,plus:Vd,globe:f6,image:Pd,fileText:Fd,users:$L,eye:HE,eyeOff:e6,pulse:iD,search:by,chart:OD,layout:qE,chevDown:uy,chevRight:dy,chevSelector:TD,pencil:py,dots:ZD,grip:hy,external:IE,copy:HD,trash:vl,archive:aD,sparkle:vL,arrowUp:mD,arrowDown:lD,arrowLeft:cD,arrowRight:dD,undo:ML,redo:cL,logout:R6,check:qd,x:xy,clock:$D,calendar:_D,mapPin:PE,userPlus:TL,mail:D6,phone:eL,share:yL,upload:Gd,bookOpen:gD,newspaper:Q6,presentation:gy,instagram:X$,facebook:Z$,linkedin:W$,xLogo:J$};function si({name:e,size:t=18,stroke:r=2,fill:a,color:l,className:c,style:u}){const m=e7[e];return d.jsx(m,{size:t,strokeWidth:r,fill:a??"none",color:l,className:c,style:{flexShrink:0,width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`,color:l??"currentColor",...u},"aria-hidden":"true"})}function t7(e,t=Date.now()){const r=Math.floor((t-e)/1e3);return r<5?"just now":r<60?`${r}s ago`:r<3600?`${Math.floor(r/60)}m ago`:`${Math.floor(r/3600)}h ago`}const Ym="inline-flex flex-shrink-0 items-center gap-1.5 whitespace-nowrap p-1 text-[length:calc(12.5*var(--content))] font-medium";function n7({status:e}){const[,t]=x.useReducer(r=>r+1,0);return x.useEffect(()=>{const r=setInterval(t,15e3);return()=>clearInterval(r)},[]),e.state==="saving"?d.jsxs("div",{className:ie(Ym,"text-ink-2"),children:[d.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.6px] border-ink-4 border-t-accent [animation-duration:0.8s]","aria-hidden":"true"}),d.jsx("span",{children:"Saving…"})]}):e.state==="error"?d.jsxs("div",{role:"status",className:ie(Ym,"text-ink-2"),children:[d.jsx(si,{name:"x",size:13,stroke:2.4,className:"text-danger"}),d.jsx("span",{children:"Not saved"})]}):d.jsxs("div",{className:ie(Ym,"text-ink-3"),children:[d.jsx(si,{name:"check",size:13,stroke:2.4,className:"text-good"}),d.jsxs("span",{children:["Saved"," ",d.jsx("span",{className:"ml-0.5 font-normal text-ink-4 [font-variant-numeric:tabular-nums]",children:t7(e.savedAt)})]})]})}const i7=x.createContext(null);function W_(){const e=x.useContext(i7);return e===null?null:d.jsx(n7,{status:e})}function r7({open:e=!0,onClose:t,title:r,notice:a,children:l}){return d.jsxs(wy,{open:e,onClose:t,ariaLabel:r,className:k$,children:[d.jsxs("div",{className:E$,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ie(Uy,"truncate"),children:r})}),d.jsx(W_,{}),d.jsx("button",{type:"button",className:Iy,onClick:t,"aria-label":"Close",children:d.jsx(Lt.x,{})})]}),a,d.jsx("div",{className:_$,children:l})]})}function a7(e){const[t]=e.ids,{removeFrom:r}=e,a=r===void 0&&e.ids.length===1&&t!==void 0&&!e.inFlightIds.has(t)?t:null,c=Bd({queryKey:["media-holders",e.scope,a],queryFn:()=>{if(a===null)throw new Error("holder read disabled without a single listed id");return e.holders(a)},enabled:a!==null}).data??[],u=i_(),m=e.ids.length;return Zi.createPortal(d.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/40",style:{zIndex:u},onClick:e.onCancel,children:d.jsxs("div",{className:"w-[calc(400*var(--frame))] rounded-lg border border-line bg-canvas p-5 shadow-xl",role:"alertdialog","aria-modal":"true",onClick:p=>p.stopPropagation(),children:[d.jsxs("div",{className:"text-[length:calc(15*var(--content))] font-semibold text-ink",children:[r===void 0?"Delete":"Remove"," ",m===1?"this object":`${m} objects`,r===void 0?"":` from ${r}`,"?"]}),r!==void 0?d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"It stays in your uploads.":"They stay in your uploads."}):c.length>0?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:"Deleting it also removes it from:"}),d.jsx("ul",{className:"mt-1.5 max-h-[calc(160*var(--content))] overflow-y-auto text-body leading-[1.5] text-ink","aria-label":"Where this object is used",children:c.map(p=>d.jsx("li",{className:"truncate before:mr-1.5 before:text-ink-2 before:content-['•']",children:p.name},p.id))})]}):d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"This permanently removes the file.":`This permanently removes ${m} objects.`}),d.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] border border-line px-3 py-1.5 text-body font-medium text-ink hover:bg-accent-soft",onClick:e.onCancel,children:"Cancel"}),d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] bg-danger px-3 py-1.5 text-body font-medium text-white hover:opacity-90",onClick:e.onConfirm,children:r===void 0?"Delete":"Remove"})]})]})}),document.body)}const Pu="grid h-8 w-8 place-items-center rounded-full text-white/85 hover:bg-white/[0.12] hover:text-white",Qw="absolute top-1/2 z-[2] grid h-10 w-10 -translate-y-1/2 place-items-center rounded-full bg-white/10 text-white hover:bg-white/[0.22]";function o7({file:e,index:t,total:r,onClose:a,onPrev:l,onNext:c,onDownload:u,onDelete:m,onCrop:p}){const g=e.thumbnailUrl!==null,b=i_();return Zi.createPortal(d.jsxs("div",{className:"fixed inset-0 flex flex-col bg-black/80",style:{zIndex:b},role:"dialog","aria-modal":"true","aria-label":`Preview: ${e.name}`,onClick:a,children:[d.jsxs("div",{className:"flex shrink-0 items-center gap-2.5 px-4.5 py-3.25",onClick:v=>v.stopPropagation(),children:[d.jsx("span",{className:"max-w-[44vw] truncate text-[length:calc(13.5*var(--content))] font-semibold text-white",title:e.name,children:e.name}),d.jsx(b_,{file:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[p?d.jsx("button",{type:"button",className:Pu,title:"Crop","aria-label":`Crop ${e.name}`,onClick:v=>{v.stopPropagation(),p()},children:d.jsx(at,{name:"crop",size:15})}):null,u&&!Cs(e)?d.jsx("button",{type:"button",className:Pu,title:"Download",onClick:v=>{v.stopPropagation(),u()},children:d.jsx(at,{name:"down",size:15})}):null,m?d.jsx("button",{type:"button",className:Pu,title:"Delete",onClick:v=>{v.stopPropagation(),m()},children:d.jsx(at,{name:"trash",size:14})}):null,d.jsx("span",{className:"mx-2 h-4.5 w-px bg-white/[0.18]"}),d.jsx("button",{type:"button",className:Pu,title:"Close","aria-label":"Close preview",onClick:a,children:d.jsx(at,{name:"x",size:15})})]})]}),d.jsxs("div",{className:"relative grid min-h-0 flex-1 place-items-center px-19",children:[r>1?d.jsx("button",{type:"button",className:`${Qw} left-5`,"aria-label":"Previous",onClick:v=>{v.stopPropagation(),l()},children:d.jsx(at,{name:"chevl",size:16})}):null,g?d.jsx("div",{className:"relative h-[min(560px,100%)] w-[min(880px,100%)] rounded bg-contain bg-center bg-no-repeat shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",style:{backgroundImage:`url("${e.thumbnailUrl??""}")`},onClick:v=>v.stopPropagation(),children:e.kind==="video"?d.jsx("span",{className:"absolute inset-0 m-auto flex h-13 w-13 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]",children:d.jsx(at,{name:"play",size:20})}):null}):d.jsx("div",{className:"relative h-[min(420px,100%)] w-[min(560px,100%)] overflow-hidden rounded shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",onClick:v=>v.stopPropagation(),children:d.jsx(Ay,{file:e,face:"lightbox"})}),r>1?d.jsx("button",{type:"button",className:`${Qw} right-5`,"aria-label":"Next",onClick:v=>{v.stopPropagation(),c()},children:d.jsx(at,{name:"chevr",size:16})}):null]}),d.jsxs("div",{className:"shrink-0 p-3.25 text-center text-xs font-medium text-white/55",children:[t+1," of ",r]})]}),document.body)}function l7(e){return[{id:"all",label:"All"},...wd.filter(t=>e.includes(t)).map(t=>({id:t,label:pc[t].plural}))]}const Xw=[{id:"custom",label:"Custom"},{id:"date",label:"Date added"},{id:"name",label:"Name"},{id:"kind",label:"Kind"},{id:"size",label:"Size"}],s7="ml-auto inline-flex text-ink-3";function c7({filter:e,setFilter:t,counts:r,kinds:a}){const l=l7(a),[c,u]=x.useState(!1),m=x.useRef(null),p=x.useCallback(()=>u(!1),[]);gc(m,c,p);const g=e!=="all",b=l.find(v=>v.id===e)??{label:"All"};return d.jsxs("div",{className:"relative",ref:m,children:[d.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>u(v=>!v),className:`${Sy} ${g?"border-accent bg-accent-soft text-accent-ink":Ey}`,children:[e==="all"?null:d.jsx(Ga,{kind:e,decorative:!0}),d.jsx("span",{className:g?"text-accent-ink opacity-70":"text-ink-3",children:"Kind:"}),d.jsx("span",{className:"font-semibold",children:b.label}),d.jsx("span",{className:`inline-flex ${g?"text-accent-ink":"text-ink-3"}`,children:d.jsx(at,{name:"chevd",size:13})})]}),c?d.jsx("div",{className:`${Qd} right-0 top-[calc(100%+6*var(--content))] min-w-[calc(210*var(--frame))] p-1.5`,role:"menu",children:l.map(v=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===v.id,className:a_,onClick:()=>{t(v.id),u(!1)},children:[v.id==="all"?d.jsx("span",{className:"grid h-5 w-5 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(at,{name:"grid",size:13})}):d.jsx(Ga,{kind:v.id,decorative:!0}),d.jsx("span",{children:v.label}),d.jsx("span",{className:"ml-auto text-[length:calc(11.5*var(--content))] font-medium text-ink-4",children:r[v.id]}),d.jsx("span",{className:`inline-flex w-3 text-ink-3 ${e===v.id?"":"invisible"}`,children:d.jsx(at,{name:"check",size:12,stroke:2.4})})]},v.id))}):null]})}function u7({sort:e,setSort:t}){var m;const[r,a]=x.useState(!1),l=x.useRef(null),c=x.useCallback(()=>a(!1),[]);gc(l,r,c);const u=((m=Xw.find(p=>p.id===e))==null?void 0:m.label)??"Custom";return d.jsxs("span",{className:"relative inline-flex",ref:l,children:[d.jsxs("button",{type:"button",className:`${Sy} ${Ey}`,"aria-expanded":r,onClick:()=>a(p=>!p),children:[d.jsx("span",{className:"text-ink-3",children:"Sort:"}),d.jsx("span",{className:"font-semibold",children:u}),d.jsx("span",{className:"inline-flex text-ink-3",children:d.jsx(at,{name:"chevd",size:13})})]}),r?d.jsx("div",{className:`${Qd} right-0 top-[calc(100%+6*var(--content))] w-[calc(170*var(--frame))] p-1.5`,role:"menu",children:Xw.map(p=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===p.id,className:a_,onClick:()=>{t(p.id),a(!1)},children:[p.label,e===p.id?d.jsx("span",{className:s7,children:d.jsx(at,{name:"check",size:12,stroke:2.4})}):null]},p.id))}):null]})}function d7({view:e,setView:t}){const r=(a,l)=>{const c=e===a;return d.jsxs("button",{type:"button","aria-label":l,"aria-pressed":c,title:l,onClick:()=>t(a),className:`flex h-full cursor-pointer items-center gap-1 px-3 transition-colors duration-150 ${c?"bg-accent-soft text-accent-ink":"text-ink-3 hover:bg-[#f6f5f1] hover:text-ink"} ${a==="list"?"border-l border-line":""}`,children:[c?d.jsx(at,{name:"check",size:13,stroke:2.4}):null,d.jsx(at,{name:a,size:15})]})};return d.jsxs("div",{className:"flex h-9 shrink-0 overflow-hidden rounded-lg border border-line bg-canvas",role:"group","aria-label":"View",children:[r("list","List view"),r("grid","Grid view")]})}function f7({lead:e,selectionPill:t,filter:r,setFilter:a,counts:l,kinds:c,sort:u,setSort:m,view:p,setView:g}){return d.jsxs("div",{className:"flex min-h-9 shrink-0 flex-wrap items-center gap-2",onClick:b=>b.stopPropagation(),children:[e,t,d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(c7,{filter:r,setFilter:a,counts:l,kinds:c}),d.jsx(u7,{sort:u,setSort:m}),d.jsx(d7,{view:p,setView:g})]})]})}function h7({count:e,onClear:t,onDownload:r,onDelete:a}){const l="inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-[length:calc(12.5*var(--content))] font-semibold hover:bg-[rgba(15,42,34,0.08)]";return d.jsxs("div",{role:"toolbar","aria-label":"Selection",className:"flex h-9 max-w-[calc(420*var(--frame))] items-center gap-0.5 overflow-hidden whitespace-nowrap rounded-lg border border-[#d5e0cf] bg-accent-soft pl-1 pr-1 opacity-100 transition-[max-width,opacity] duration-300 ease-out starting:max-w-0 starting:opacity-0",onClick:c=>c.stopPropagation(),children:[d.jsx("button",{type:"button",className:"grid h-7 w-7 shrink-0 cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-[rgba(15,42,34,0.08)]","aria-label":"Clear selection",onClick:t,children:d.jsx(at,{name:"x",size:14})}),d.jsxs("span",{className:"ml-0.5 mr-1.5 text-[length:calc(12.5*var(--content))] font-semibold text-ink",children:[e," selected"]}),d.jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-[rgba(15,42,34,0.16)]"}),d.jsxs("button",{type:"button",className:`${l} text-accent`,onClick:r,children:[d.jsx(at,{name:"down",size:13}),"Download"]}),a?d.jsxs("button",{type:"button",className:`${l} text-danger`,onClick:a,children:[d.jsx(at,{name:"trash",size:13}),"Delete"]}):null]})}function Gy(e,t,r=new Set){const a=e.includes(t);return{checked:a,disabled:!a&&r.has(t)}}function J_(e,t,r,a){const{checked:l,disabled:c}=Gy(e,t,a);return r==="radio"?l||c?e:[t]:l?e.filter(u=>u!==t):c?e:[t,...e]}const Zw="hp-uploads-view",m7=new Set;function p7({onReset:e}){return d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center-safe gap-3 overflow-y-auto px-6 py-12 text-center",children:[d.jsx("span",{className:"text-base font-semibold tracking-[-0.01em] text-ink",children:"Nothing matches this filter"}),d.jsx("button",{type:"button",className:"inline-flex h-8 items-center justify-center rounded-lg border border-line bg-canvas px-3 text-[length:calc(12.5*var(--content))] font-medium text-ink hover:bg-[#f6f5f1]",onClick:e,children:"Show everything"})]})}const g7=ie(T_,"flex flex-col gap-3"),y7="flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-line bg-canvas transition-[box-shadow,background-color] duration-150 data-dragging:bg-accent-soft/40 data-dragging:ring-2 data-dragging:ring-accent",b7=ie(T_,"flex flex-col rounded-2xl border border-line bg-canvas items-center justify-center text-center text-body text-ink-3"),Ww="grid grid-cols-[repeat(auto-fill,minmax(calc(200*var(--frame)),1fr))] gap-4 p-4",v7=8;function x7({filter:e,selection:t,host:r,beneathOf:a,tiers:l}){const{capabilities:c,preparing:u}=r,{kinds:m,from:p}=Ls(e),g=x.useMemo(()=>{const ee=new Map((l??[]).flatMap((Se,Pe)=>Se.map(Ct=>[Ct,Pe])));return Se=>ee.get(Se)??0},[l]),b=(l==null?void 0:l.flat())??p,v=c.upload?Vy(m):null,k=c.upload&&Sg(m).length>0,w=x.useRef(null),j=x.useRef(new Set),E=ee=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),r.addFiles(ee)},_=ee=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),r.addLink(ee)},C=P$(p),O=v!==null||k?{accept:v,onFiles:E,...k?{onLink:_}:{},disabled:u}:null,[A,D]=x.useState(()=>new Set),[R,P]=x.useState(()=>t.mode==="multi"?t.selectedIds:[]),[L,T]=x.useState("all"),[H,ne]=x.useState("custom"),[Y,oe]=x.useState(null),[K,X]=x.useState(null),[le,M]=x.useState(()=>{if(typeof window>"u")return"grid";try{return window.localStorage.getItem(Zw)==="list"?"list":"grid"}catch{return"grid"}}),[V,te]=x.useState(null),[pe,Q]=x.useState(null),[N,q]=x.useState(!1),[I,F]=x.useState(null),[ae,ce]=x.useState(null),he=x.useRef(0),be=x.useRef(null);x.useEffect(()=>{try{window.localStorage.setItem(Zw,le)}catch{}},[le]),x.useEffect(()=>()=>{be.current&&clearTimeout(be.current)},[]);const $=x.useCallback(ee=>{F(ee),be.current&&clearTimeout(be.current),be.current=setTimeout(()=>F(null),2400)},[]),de=x.useMemo(()=>new Map(r.items.flatMap(ee=>Nn(ee)?[]:[[ee.record.id,ee.record]])),[r.items]),ge=x.useMemo(()=>new Map(r.items.flatMap(ee=>Nn(ee)?[]:[[Pa({holder:Kw(ee.list),mediaId:ee.record.id}),ee.record]])),[r.items]),_e=x.useCallback(ee=>ge.get(Pa(ee)),[ge]),Re=K_({propertyId:t.mode==="all"?r.scope:"",recordAt:_e,write:r.crop,onFailed:()=>$("Couldn't crop")}),De=ee=>({holder:Kw(ee.list),mediaId:ee.id}),xe=ee=>t.mode==="all"&&c.manage&&ee.kind==="image"&&!ee.inFlight&&Re.offers(De(ee))?{onCrop:()=>Re.open(De(ee))}:{},$e=r.items.filter(ee=>{const Se=Nn(ee)?ee.kind:ee.record.kind;return b.includes(ee.list)&&(Se===null||m.includes(Se))}).map(ee=>K8(ee,g)).map(ee=>ee.state==="ready"&&Re.recropping(De(ee))?{...ee,state:"processing"}:ee),yt=x.useMemo(()=>new Set(r.items.filter(Nn).map(m_)),[r.items]),Ee=X8($e),Mt=Y===null?$e:[...$e].sort((ee,Se)=>Y.indexOf(ee.id)-Y.indexOf(Se.id)),ut=Q8(Mt,L,H),[ni]=p,ui=r.reorder,Si=t.mode==="all"&&c.manage&&ui!==void 0&&H==="custom"&&p.length===1&&V===null,Ut=Si?ut.filter(ee=>!ee.inFlight):[],ii=ee=>{X(null);const Se=ee.map(nt=>nt.id),Pe=Mt.filter(nt=>!nt.inFlight).map(nt=>nt.id),Ct=A5(Pe,Se);ui===void 0||ni===void 0||Ct.every((nt,Fn)=>nt===Pe[Fn])||(oe(Ct),ui(ni,Se).then(()=>oe(null),()=>{oe(null),$("Couldn't reorder")}))},{containerRef:sn,getItemProps:Jt}=j_({items:Ut,getKey:ee=>ee.id,onReorder:X,onDrop:ii,axis:le==="list"?"y":"xy",threshold:5}),we=K===null?ut:[...ut.filter(ee=>ee.inFlight),...K],ze=x.useCallback(()=>D(new Set),[]),Ge=x.useMemo(()=>t.mode==="all"?m7:new Set([...t.disabledIds??[],...yt]),[t,yt]),rt=t.mode==="single"?t.selectedId===null?[]:[t.selectedId]:R,tt=ee=>{if(t.mode==="all")return;if(t.mode==="single"){const Pe=Ge.has(ee)?void 0:de.get(ee);Pe&&t.onPick(Pe);return}const Se=J_(rt,ee,"checkbox",Ge);Se!==rt&&(P(Se),t.onChange(Se.flatMap(Pe=>de.get(Pe)??[])))};x.useEffect(()=>{const ee=w.current;if(ee===null||t.mode==="all")return;for(const nt of r.items)Nn(nt)&&nt.addedAt>=ee&&j.current.add(nt.id);const Se=[...j.current].filter(nt=>de.has(nt)&&!Ge.has(nt)),[Pe]=Se;if(Pe===void 0)return;for(const nt of Se)j.current.delete(nt);if(t.mode==="single"){tt(Pe);return}const Ct=[...Se.filter(nt=>!rt.includes(nt)),...rt];Ct.length!==rt.length&&(P(Ct),t.onChange(Ct.flatMap(nt=>de.get(nt)??[])))},[r.items]);const Xe=ee=>{if(t.mode==="all")return{selected:A.has(ee),control:"checkbox",disabled:!1};const{checked:Se,disabled:Pe}=Gy(rt,ee,Ge);return{selected:Se,control:t.mode==="single"?"radio":"checkbox",disabled:Pe}},ot=ee=>{if(t.mode!=="all"){tt(ee);return}D(Se=>{const Pe=new Set(Se);return Pe.has(ee)?Pe.delete(ee):Pe.add(ee),Pe})},Ot=ut.findIndex(ee=>ee.id===pe),kt=Ot>=0?ut[Ot]:void 0,Ei=ee=>{var Pe;if(ut.length===0)return;const Se=(Math.max(Ot,0)+ee+ut.length)%ut.length;Q(((Pe=ut[Se])==null?void 0:Pe.id)??null)},ue=ee=>{if(!pe||!ee.includes(pe))return;const Se=ut.findIndex(nt=>nt.id===pe),Ct=[...ut.slice(Se+1),...ut.slice(0,Math.max(Se,0))].find(nt=>!ee.includes(nt.id));Q(Ct?Ct.id:null)};x.useEffect(()=>{const ee=Se=>{if(Re.isOpen)return;const Pe=Se.target instanceof HTMLElement?Se.target.tagName:"";if(!(Pe==="INPUT"||Pe==="TEXTAREA")){if(ae){Se.key==="Escape"&&ce(null),(Se.key==="Escape"||Se.key==="Enter")&&Se.preventDefault();return}if(Se.key==="Escape"){if(pe)Q(null);else if(A.size>0)ze();else return;Se.preventDefault()}else pe&&Se.key==="ArrowRight"?Ei(1):pe&&Se.key==="ArrowLeft"?Ei(-1):pe&&Se.key==="Enter"&&Se.preventDefault()}};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)});const ke=ee=>{ue(ee),D(Se=>{const Pe=new Set(Se);return ee.forEach(Ct=>Pe.delete(Ct)),Pe}),r.remove(ee).then(Se=>{Se>0?$(`Couldn't delete ${Se}`):$(`Deleted ${ee.length} object${ee.length===1?"":"s"}`)})},je=()=>{ae&&(ce(null),ke(ae))},Te=ee=>{Cs(ee)||ee.inFlight||($("Preparing download…"),r.download(ee.id).catch(()=>$("Couldn't download")))},qe=()=>{const ee=$e.filter(Se=>A.has(Se.id)&&!Cs(Se)&&!Se.inFlight);ee.length!==0&&($("Preparing download…"),ee.forEach(Se=>void r.download(Se.id).catch(()=>$("Couldn't download"))))},Ie=(ee,Se)=>{te(null),!(Se===null||!Se||Se===ee.name)&&r.rename(ee.id,Se).catch(()=>$("Couldn't rename"))},St=v!==null&&!u,Et=ee=>{ee.preventDefault(),!(!St||!Array.from(ee.dataTransfer.types).includes("Files"))&&(he.current+=1,q(!0))},Kt=ee=>{ee.preventDefault(),he.current-=1,he.current<=0&&(he.current=0,q(!1))},cn=ee=>{ee.preventDefault(),he.current=0,q(!1),St&&ee.dataTransfer.files.length>0&&E(Array.from(ee.dataTransfer.files))},un=ee=>t.mode==="all"&&A.has(ee)&&A.size>1?ut.filter(Se=>A.has(Se.id)).map(Se=>Se.id):null,At=ee=>{const{selected:Se,control:Pe,disabled:Ct}=Xe(ee.id),nt=un(ee.id),Fn=nt==null?void 0:nt.filter(Nt=>!yt.has(Nt));return{file:ee,selected:Se,select:{control:Pe,disabled:Ct},listChip:p.length<2||ee.upstream?null:ud(ee.list)??ee.list,renaming:V===ee.id,onClick:Nt=>{Nt.stopPropagation(),ot(ee.id)},onDoubleClick:()=>t.mode==="single"?tt(ee.id):Q(ee.id),onToggleSelect:()=>ot(ee.id),...ee.state==="failed"&&r.canRetry(ee.id)?{onRetry:()=>r.retry(ee.id)}:{},...ee.linkUnreachable?{onRecheck:()=>void r.recheck(ee.id)}:{},onRenameCommit:Nt=>Ie(ee,Nt),handlers:{onPreview:()=>Q(ee.id),onDownload:()=>Te(ee),...xe(ee),...c.manage?{onRenameStart:()=>te(ee.id),onDelete:()=>ce(nt??[ee.id]),...nt!==null?{deleteLabel:`Delete ${nt.length} objects`}:{}}:{}},...Si&&!ee.inFlight?{drag:Jt(ee.id,Fn)}:{}}},qn=ee=>{const Se=new Set($e.filter(Ct=>ee.includes(Ct.id)).map(Ct=>Ct.list)),[Pe]=Se;return Se.size!==1||Pe===void 0||Fa(Pe).at(-1)===Pe?{}:{removeFrom:ud(Pe)??Pe}},Wi=[...A],na=$e.length===0;return d.jsxs("div",{className:"flex flex-col",onClick:ze,onDragEnter:Et,onDragOver:ee=>ee.preventDefault(),onDragLeave:Kt,onDrop:cn,children:[r.loading?d.jsx("div",{className:b7,children:"Loading…"}):d.jsxs("div",{className:g7,children:[d.jsx(f7,{lead:d.jsx(mc,{size:"large",add:C,onAdd:null,...O!==null?{newChip:d.jsx(mz,{add:O,verb:C})}:{}}),selectionPill:A.size>0?d.jsx(h7,{count:A.size,onClear:ze,onDownload:qe,...c.manage?{onDelete:()=>ce(Wi)}:{}}):null,filter:L,setFilter:T,counts:Ee,kinds:m,sort:H,setSort:ne,view:le,setView:M}),d.jsx("div",{className:y7,"data-dragging":N||void 0,children:na?d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(hc,{children:d.jsx("div",{className:Ww,children:Array.from({length:v7},(ee,Se)=>d.jsx(d$,{},Se))})}),d.jsx(dz,{add:O,kinds:m,dragging:N})]}):ut.length===0?d.jsx(p7,{onReset:()=>T("all")}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:le==="grid"?d.jsx("div",{ref:sn,className:ie("relative",Ww),role:"listbox","aria-multiselectable":t.mode!=="single","aria-label":"Uploaded objects",children:we.map(ee=>d.jsx(u$,{...At(ee),beneath:a==null?void 0:a(ee)},ee.id))}):d.jsxs("div",{ref:sn,className:"relative pt-1",role:"table","aria-label":"Uploaded objects",children:[d.jsx(f$,{}),we.map(ee=>d.jsx(m$,{...At(ee)},ee.id))]})})})]}),kt?d.jsx(o7,{file:kt,index:Ot,total:ut.length,onClose:()=>Q(null),onPrev:()=>Ei(-1),onNext:()=>Ei(1),...!Cs(kt)&&!kt.inFlight?{onDownload:()=>Te(kt)}:{},...c.manage?{onDelete:()=>ce([kt.id])}:{},...xe(kt)}):null,Re.modal,ae&&!u?d.jsx(a7,{scope:r.scope,ids:ae,inFlightIds:yt,holders:r.holders,...qn(ae),onCancel:()=>ce(null),onConfirm:je}):null,I?d.jsx("div",{role:"status",style:{zIndex:n8},className:"fixed bottom-6 left-1/2 -translate-x-1/2 rounded-full bg-ink px-4 py-2 text-body font-semibold text-canvas shadow-[0_14px_34px_-10px_rgba(10,12,10,0.5)]",children:I}):null]})}function Ky(){return Wt()}function w7(e){const t=Is(e[0]).home;return Q4(e).flatMap(r=>{const[a,...l]=r;return a===void 0?[]:[{lists:[a,...l],label:r.map(c=>X_(c,t)??Is(c).key).join(" + ")}]}).reverse()}const Gp=new Map,Wu=new Map,Kp=new Set,Yp=[],Ju=new Map,Jw=new Set,cl=new Map;function k7(e,t){var r;(r=cl.get(e))==null||r.onStored(t),cl.delete(e)}function Qm(e,t){var r;(r=cl.get(e))==null||r.onFailed(t),cl.delete(e)}function ej(){for(const e of Kp)e()}function tj(e){return Kp.add(e),()=>{Kp.delete(e)}}function Yy(e,t){t.length===0?Gp.delete(e):Gp.set(e,t),ej()}function Ia(e){return Gp.get(e)??Yp}function ek(e,t){t.length!==0&&Yy(e,[...t,...Ia(e)])}function Qp(e,t,r){const a=Ia(e);a.some(l=>l.inFlight.id===t)&&Yy(e,a.map(l=>l.inFlight.id===t?r(l):l))}function tk(e,t){var c;const r=new Set(t),a=Ia(e),l=a.filter(u=>r.has(u.inFlight.id));if(l.length!==0){for(const u of l)(c=u.inFlight.preview)!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(u.inFlight.preview);Yy(e,a.filter(u=>!r.has(u.inFlight.id)))}}function nk(e,t,r,a){const l=Wu.get(e)??Ju,c=l.get(t)??[];if(c.includes(r)===a)return;const u=new Map(l),m=a?[...c,r]:c.filter(p=>p!==r);m.length===0?u.delete(t):u.set(t,m),u.size===0?Wu.delete(e):Wu.set(e,u),ej()}function S7(e){return x.useSyncExternalStore(tj,()=>e===null?Yp:Ia(e),()=>Yp)}function E7(e){return x.useSyncExternalStore(tj,()=>e===null?Ju:Wu.get(e)??Ju,()=>Ju)}function _7(e,t,r){const a=e.get(t);if(a===void 0)return!1;const l=Fa(r).at(-1)??r;return a.includes(r)||a.includes(l)}function j7(e,t,r){return e.flatMap(({inFlight:a})=>{if(r.has(a.id))return[];const l=Fa(a.list),c=t.find(u=>l.includes(u));return c===void 0?[]:[{...a,list:c}]})}const nj="local-",ij=()=>`${nj}${Math.random().toString(36).slice(2,10)}`,O7=e=>e.startsWith(nj);function ik(e,t){return e instanceof Error&&"problem"in e&&e.message!==""?e.message:t}function A7(e,t){const r=C8(t);return{inFlight:{id:ij(),list:e,kind:Y2(t.type),name:t.name,bytes:t.size,mime:t.type,url:null,addedAt:Date.now(),preview:r.ok&&t.type.startsWith("image/")?URL.createObjectURL(t):null,send:r.ok?{state:"uploading",progress:0}:{state:"failed",error:r.message}},baggage:{file:t}}}function ks(e,t,r){Qp(e,t,a=>({...a,inFlight:{...a.inFlight,send:r}}))}function N7(e,t,r){const{postListUploadWithProgress:a,postListLink:l,withdrawListItem:c,holdListItem:u}=e,m=O=>Pp(t,e,O),p=async(O,A,D)=>{nk(O,D,A,!0);try{await c(O,A,D)}catch(R){throw nk(O,D,A,!1),m(O),R}m(O)},g=async(O,A,D,R)=>{if(Jw.delete(A)){Qm(A,"Removed while sending"),p(O,R,D).catch(()=>{});return}Qp(O,A,P=>({...P,inFlight:{...P.inFlight,id:D,send:{state:"saving"}}})),await m(O),tk(O,[D]),k7(A,D)},b=async(O,A,D,R,P)=>{let L;try{L=(await a(O,D,R,H=>ks(O,A,{state:"uploading",progress:H}),{attempt:P,onAttempt:H=>Qp(O,A,ne=>({...ne,baggage:{...ne.baggage,attempt:H??void 0}}))})).id}catch(T){console.error("media.upload.failed",{itemId:A,propertyId:O,into:D,name:R.name,size:R.size,mime:R.type,error:T});const H=ik(T,"Upload failed");ks(O,A,{state:"failed",error:H}),Qm(A,H);return}await g(O,A,L,D)},v=async(O,A,D,R,P)=>{let L;try{L=(await l(O,D,R,P)).id}catch(T){console.error("media.link.create_failed",{itemId:A,propertyId:O,into:D,url:R,error:T});const H=ik(T,"Couldn’t add link");ks(O,A,{state:"failed",error:H}),Qm(A,H);return}await g(O,A,L,D)},k=(O,A,D)=>{if(r===null)return;const R=O.filter(Boolean).map(L=>A7(A,L));ek(r,R);for(const L of R){if(D===void 0)continue;const{send:T}=L.inFlight;T.state==="failed"?D.onFailed(T.error):cl.set(L.inFlight.id,D)}const P=R.filter(L=>L.inFlight.send.state==="uploading");g8(P,M8,async L=>{L.baggage.file&&await b(r,L.inFlight.id,A,L.baggage.file)})},w=(O,A,D)=>{if(r===null)return;const R=/^https?:\/\//i.test(O)?O:`https://${O}`,P=crypto.randomUUID(),L={inFlight:{id:ij(),list:A,kind:p_(R),name:E8(R),bytes:null,mime:null,url:R,addedAt:Date.now(),preview:null,send:{state:"saving"}},baggage:{link:{url:R,idempotencyKey:P}}};ek(r,[L]),D!==void 0&&cl.set(L.inFlight.id,D),v(r,L.inFlight.id,A,R,P)},j=O=>{if(r===null)return!1;const A=Ia(r).find(D=>D.inFlight.id===O);return A!==void 0&&A.inFlight.send.state==="failed"&&(A.baggage.file!==void 0||A.baggage.link!==void 0)},E=O=>{if(r===null)return;const A=Ia(r).find(R=>R.inFlight.id===O);if(A===void 0)return;const D=A.inFlight.list;if(A.baggage.link){const{url:R,idempotencyKey:P}=A.baggage.link;ks(r,O,{state:"saving"}),v(r,O,D,R,P);return}if(A.baggage.file){const R=R8({attempt:A.baggage.attempt});ks(r,O,{state:"uploading",progress:0}),b(r,O,D,A.baggage.file,R.kind==="resume"?R.attempt:void 0)}},_=async(O,A)=>{if(r===null)return 0;const D=new Set(O);for(const L of Ia(r))D.has(L.inFlight.id)&&L.inFlight.send.state==="uploading"&&Jw.add(L.inFlight.id);tk(r,O);const R=O.filter(L=>!O7(L));return(await Promise.allSettled(R.map(L=>p(r,A,L)))).filter(L=>L.status==="rejected").length},C=u===void 0||r===null?void 0:async(O,A)=>{await u(r,A,O),await m(r)};return{addFiles:k,addLink:w,canRetry:j,retry:E,remove:_,...C!==void 0?{hold:C}:{}}}function M7(e){const t=_y(),r=Hd();return x.useMemo(()=>N7(t,r,e),[t,r,e])}function C7(e,t,r,a){const l=Ls(t),c=e===void 0?[]:E5(e,l).filter(({id:p,list:g})=>!_7(a,p,g)),u=c.map(({value:p,file:g,list:b})=>({record:Og(g,p),list:b}));return[...j7(r,l.from,new Set(c.map(({id:p})=>p))),...u]}function R7(e,t,r,a){const l=S7(e),c=E7(e),u=M7(e),m=x.useMemo(()=>C7(r,t,l,c),[r,t,l,c]),p=a??tS(t),g=x.useCallback(j=>u.addFiles(j,p),[u,p]),b=x.useCallback(j=>u.addLink(j,p),[u,p]),v=x.useCallback(async j=>{const E=new Map;for(const C of m){const O=m_(C);j.includes(O)&&E.set(C.list,[...E.get(C.list)??[],O])}return(await Promise.all([...E].map(([C,O])=>u.remove(O,C)))).reduce((C,O)=>C+O,0)},[m,u]),{hold:k}=u,w=x.useMemo(()=>k===void 0||a===void 0?void 0:j=>k(j,a),[k,a]);return{items:m,sent:l,deleting:c,addFiles:g,addLink:b,remove:v,canRetry:u.canRetry,retry:u.retry,...w!==void 0?{land:w}:{}}}function vc(e){const{MediaPicker:t}=Ky();return d.jsx(t,{...e})}function T7(e){return new Set(e.flatMap(t=>{if(Nn(t))return[];const{record:r}=t;return r.state!=="ready"||r.kind==="tour"&&!d_(r)?[r.id]:[]}))}const rk=ie("m-0 py-1 text-caption text-ink-3",zy);function D7({useHost:e,filter:t,propertyId:r,...a}){var K;const{onClose:l}=a,c=x.useMemo(()=>w7(Ls(t).from),[t]),u=x.useMemo(()=>c.map(({lists:X})=>X),[c]),m=x.useMemo(()=>({kinds:t.kinds,from:[...Ls(t).from,...u.slice(1).flat()]}),[t,u]),p=e(r,m,tS(t)),{land:g}=p,b=x.useMemo(()=>new Map(u.flatMap((X,le)=>X.map(M=>[M,le]))),[u]),[v,k]=x.useState(()=>new Set),w=x.useRef(null),j=x.useMemo(()=>{if(p.loading)return p.items;const X=new Map;for(const te of p.items){if(Nn(te)||v.has(te.record.id))continue;const pe=X.get(te.record.id);(pe===void 0||(b.get(te.list)??0)<(b.get(pe.list)??0))&&X.set(te.record.id,te)}const le=[...X.values()],M=w.current??(w.current=new Map(le.map((te,pe)=>[te.record.id,{tier:b.get(te.list)??0,rank:pe}])));for(const te of le)M.has(te.record.id)||M.set(te.record.id,{tier:b.get(te.list)??0,rank:-M.size});const V=te=>M.get(te.record.id)??{tier:0,rank:0};return[...p.items.filter(Nn),...le.map(te=>({...te,tier:V(te).tier})).sort((te,pe)=>V(te).rank-V(pe).rank)]},[p.items,p.loading,b,v]),{remove:E}=p,_=x.useMemo(()=>({...p,items:j,remove:async le=>{const M=le.filter(te=>j.some(pe=>!Nn(pe)&&pe.record.id===te&&(b.get(pe.list)??0)===0)),V=await E(le);return V===0&&M.length>0&&k(te=>new Set([...te,...M])),V}}),[p,j,E,b]),C=x.useMemo(()=>T7(j),[j]),O=x.useMemo(()=>new Set(j.flatMap(X=>!Nn(X)&&(b.get(X.list)??0)>0?[X.record.id]:[])),[j,b]),[A,D]=x.useState("idle"),[R,P]=x.useState(0),L=x.useRef(Promise.resolve()),T=x.useRef(0),H=x.useRef(new Set);if(t.kinds.length===0)return null;const ne=(X,le)=>{const M=g===void 0?[]:X.filter(V=>O.has(V)&&!H.current.has(V));if(M.length===0&&T.current===0){le();return}T.current+=1,L.current=L.current.then(async()=>{try{if(g===void 0||M.length===0){le();return}D("landing");try{for(const V of M)await g(V),H.current.add(V)}catch{D("failed"),P(V=>V+1);return}D("idle"),le()}finally{T.current-=1}})},Y=a.mode==="single"?{mode:"single",selectedId:a.currentId??null,disabledIds:C,onPick:X=>ne([X.id],()=>a.onPick(X))}:{mode:"multi",selectedIds:a.selectedIds.filter(Boolean),disabledIds:C,onChange:X=>{const le=a.selectedIds;ne(X.filter(({id:M})=>!le.includes(M)).map(({id:M})=>M),()=>a.onChange(X))}},oe=((K=c[0])==null?void 0:K.label)??"";return d.jsx(r7,{onClose:l,title:oe,notice:A==="landing"?d.jsxs("p",{role:"status",className:rk,children:["Adding to ",oe,"…"]}):A==="failed"?d.jsxs("p",{role:"alert",className:ie(rk,"text-danger"),children:["Couldn't add it to ",oe,". Try again."]}):null,children:d.jsx(x7,{filter:t,selection:Y,host:_,...g!==void 0?{tiers:u}:{}},R)})}function L7(e){return function(r,a,l){const c=Wd(r),u=R7(r,a,c,l),{items:m}=u,p=x.useCallback(g=>{const b=m.find(k=>!Nn(k)&&k.record.id===g),v=b===void 0||Nn(b)?null:b.record.file_url;return v&&window.open(v,"_blank","noopener"),Promise.resolve()},[m]);return{items:m,loading:c===void 0,capabilities:e,preparing:!1,scope:r,addFiles:u.addFiles,addLink:u.addLink,remove:u.remove,rename:()=>Promise.resolve(),canRetry:u.canRetry,retry:u.retry,recheck:()=>Promise.resolve(),download:p,holders:()=>Promise.resolve([]),...u.land!==void 0?{land:u.land}:{}}}}function z7({capabilities:e,...t}){const{upload:r,manage:a}=e,l=x.useMemo(()=>L7({upload:r,manage:a}),[r,a]);return d.jsx(D7,{...t,useHost:l})}function Qy(e,t){const r=ZL();return e!==void 0&&t!==""&&r!==void 0&&r(e,t)}const tf=ie(vt,"grid h-full w-[calc(36*var(--content))] cursor-pointer place-items-center rounded-[calc(6*var(--content))] text-ink-4","transition-[color,background-color] duration-[120ms] group-hover/row:text-ink-3 hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink"),Xy="hover:bg-[#fbe6e2] hover:text-danger",$7="size-[calc(13*var(--content))]",U7="we-no-drag h-[calc(36*var(--content))] shrink-0",rj="flex shrink-0 items-center";function nf({icon:e,label:t,title:r,tone:a="neutral",onClick:l}){return d.jsx("button",{type:"button",className:ie(tf,U7,a==="remove"&&Xy),"aria-label":t,title:r,onClick:l,children:Dr.createElement(e,{className:$7})})}const I7={card:"rounded-2xl",compact:"rounded-xl"},H7={card:{bar:"flex h-14 min-w-0 items-center gap-3 pl-4 pr-2.5",name:"min-w-0 flex-1 truncate text-[length:calc(15*var(--content))] font-medium text-ink",mark:"h-6 w-6",button:"h-9 w-9",glyph:16},compact:{bar:"flex h-10 min-w-0 items-center gap-2 pl-3 pr-1.5",name:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",mark:"h-5 w-5",button:"h-8 w-8",glyph:15}},B7="text-ink-3",q7={card:"mx-2 rounded-xl",compact:"mx-1.5 rounded-lg"},F7=ie("flex aspect-[16/11] flex-col items-center justify-center gap-2 border-[1.5px] border-dashed border-line bg-canvas px-3 py-4 text-center","transition-[border-color,background-color] duration-[120ms]",KE),P7="border-honey-2 bg-honey-soft";function ak({kind:e,name:t,empty:r,scale:a,actions:l,attention:c,drop:u,children:m}){const p=_l(),g=Ua[a],b=H7[a],{plain:v,foot:k}=U_(l),w=(u==null?void 0:u.over)??!1;return d.jsxs("div",{"data-media-slot-card":"",className:ie("relative flex flex-col border border-transparent bg-[#f3f2ed] transition-[background-color,box-shadow] duration-[140ms]",I7[a],wl,w&&!r&&"ring-2 ring-honey-2"),...kl(c,p),...u==null?void 0:u.handlers,"data-media-drop":u?"":void 0,children:[d.jsxs("div",{className:b.bar,children:[d.jsx("span",{className:ie("grid shrink-0 place-items-center",b.mark),children:d.jsx(Ga,{kind:e,size:a==="compact"?"mark":"lead"})}),d.jsx("span",{className:ie(b.name,r&&"font-normal text-ink-4"),title:t,children:t}),l.length>0&&d.jsx("span",{className:"we-no-drag flex shrink-0 items-center gap-0.5",children:[...v,...k].map(j=>d.jsx("button",{type:"button",className:ie(tf,B7,b.button,j.danger&&Xy),"aria-label":j.label,title:j.label,onClick:j.onSelect,children:d.jsx(at,{name:j.glyph,size:b.glyph})},j.label))})]}),r?d.jsx("div",{className:ie(F7,q7[a],w&&P7),"data-thumb":"",children:m}):d.jsx("div",{className:g.thumb,"data-thumb":"","data-media-tile":e,children:m}),d.jsx("div",{className:a==="compact"?"h-1.5":"h-2"})]})}function Xp(e){var t;return e===void 0?"Link":((t=Kr[e])==null?void 0:t.label)??"Link"}function V7(e){return e.kind==="tour"?Xp(e.provider):e.kind!=="video"?"":e.videoSource==="link"?Xp(e.provider):e.ready===!1?"Processing…":N8(e.durationMs)||"Video"}function G7({kind:e,size:t}){return e==="tour"?d.jsx(Lt.tour,{size:t}):d.jsx(Lt.play,{size:t})}const K7="absolute bottom-0 inset-x-0 truncate bg-[rgba(15,18,9,0.55)] px-0.5 text-center text-[length:calc(7.5*var(--content))] font-bold leading-[1.5] tracking-[0.02em] text-white",Y7={doc:Fd,spreadsheet:BE,presentation:gy,image:Pd,video:vy};function Q7({glyph:e,extension:t,size:r=16,className:a}){const l=Y7[e];return d.jsxs(d.Fragment,{children:[d.jsx(l,{size:r,strokeWidth:1.5,className:a,style:{width:`calc(${r} * var(--content))`,height:`calc(${r} * var(--content))`}}),t&&d.jsx("span",{className:K7,children:t})]})}const X7=new Set(["image","video","tour","document","media"]);function Z7(e){return Ir(e).length>0}function aj(e,t){const r=Yg(e,t);return r!==null?!X7.has(r.value_type)||r.filter!==void 0?null:{holder:"home",table:r.table,field:r.member}:!Z7(e)||typeof e.from=="string"||e.source!==void 0&&e.source.kind!=="authored"?null:{holder:"section"}}function oj(){return`tmp_${globalThis.crypto.randomUUID()}`}function rf(e){return typeof e=="string"&&e.startsWith("tmp_")}function W7(e,t,r,a){const l=Cg(r.table)==="library"?{home:"library"}:{home:"property",propertyId:t},c=`${r.table}.${a}.${r.field}`;return{place:`${l.home}:${c}`,take:u=>e.stageOwnedMedia(l,c,u),presign:u=>e.ownedMediaUrl(l,c,u),discard:u=>e.discardStagedMedia(l,c,u)}}function lj(e,t,r){return{place:`content:${r.deliverableId}:${r.instanceId}:${r.slotId}`,take:a=>e.uploadContentMedia(t,r,a),presign:a=>e.contentMediaUrl(t,r,a),discard:null}}function J7(e,t){return e?e.itemId??null:t??null}function sj({props:e,table:t,ownerSlot:r,mediaId:a,inLibrary:l}){const{slot:c,propertyId:u,instanceId:m,recordContext:p,boundRowId:g,onUpload:b}=e,{api:v,useEditorStore:k}=Wt(),w=k(L=>L.session.deliverable_id),j=b===void 0?aj(r??c,t):null,E=(j==null?void 0:j.holder)==="home"?j:null,_=E===null?null:J7(p,g),C=rf(_),O=E===null||C?null:_;let A=null;E!==null&&O!==null&&(A=W7(v,u,E,O)),((j==null?void 0:j.holder)==="section"||C)&&w!==void 0&&(A=lj(v,u,{deliverableId:w,instanceId:m,slotId:cj(e)}));const D=Bd({queryKey:["owned-media-url",A==null?void 0:A.place,a],queryFn:()=>A.presign(a),enabled:A!==null&&a!==""&&!l,retry:!1}),R=x.useRef(null);return{upload:A===null?null:async L=>{const T=await A.take(L),H=R.current;return R.current=T.media_id,A.discard!==null&&H!==null&&H!==T.media_id&&A.discard(H).catch(()=>{}),uj(T,L)},previewUrl:D.data}}function cj(e){var r;const t=(r=e.recordContext)==null?void 0:r.fieldKey;return t?`${e.slotId}.${t}`:e.slotId}function uj(e,t){const r=e.provider??("link"in t?ac(e.url)??void 0:void 0);return r===void 0?e:{...e,provider:r}}function Zy(e,t){var u;const{api:r,useEditorStore:a}=Wt(),l=a(m=>m.session.deliverable_id);if(l===void 0||((u=aj(e))==null?void 0:u.holder)!=="section")return null;const c=lj(r,t.propertyId,{deliverableId:l,instanceId:t.instanceId,slotId:t.slotId});return async m=>uj(await c.take(m),m)}function Rs(e,t){return e===void 0||e===""||t===""?null:{holder:e,mediaId:t}}function dj(e,t){const{capabilities:r}=Ky(),a=r.framingCrop!==!1,l=!a&&t==="image",c=x.useRef(new Map),u=Y_(l?e:"",m=>{const p=c.current.get(Pa(m));p!==void 0&&ty.getState().notice(p,"failed")});return{framing:a&&t==="image",offers:m=>a?t==="image":l&&m!==null&&u.offers(m),recrop:(m,p)=>{c.current.set(Pa(m),p),u.open(m)},recropping:m=>l&&m!==null&&u.recropping(m),modal:u.modal}}function fj(e,t,r,a){const l=t.file===""?void 0:e.get(t.file),u=((l==null?void 0:l.kind)==="image"?l.file_url??"":"")||a||t.url;if(t.crop)return{src:u,seed:al(t.crop),inherited:!1};const m=(l==null?void 0:l.kind)==="image"&&r!=="locked"?l.crop:null;return m===null||!oc(m)?{src:u,seed:null,inherited:!1}:{src:u,seed:al(m),inherited:!0}}function hj(e,t){if(!e.inherited||e.seed===null)return!1;const r=l=>Math.round(l*1e4)/1e4,{seed:a}=e;return r(t.nx)===r(a.nx)&&r(t.ny)===r(a.ny)&&r(t.nw)===r(a.nw)&&r(t.nh)===r(a.nh)}function mj(e,t){var l;const r=xp(t.rect);if(r===null){if(!e.crop&&!e.mobile)return null;const c=e.renditions?{renditions:{...e.renditions,crop:null}}:{};return{...e,crop:null,ar:null,mobile:null,...c}}const a=(l=e.mobile)!=null&&l.renditions?{renditions:e.mobile.renditions}:{};return{...e,crop:r,ar:t.ar,mobile:t.mobile?{crop:xp(t.mobile.rect),derived:t.mobile.derived,...a}:e.mobile??null}}function eU(e,t){return e.crop?oc(e.crop):(t==null?void 0:t.mode)!=="locked"?!1:typeof e.ar!="number"||WS(e.ar,t.aspect)!==null}function Zp(e,t){var l,c,u,m;if(!eU(e,t))return null;const r=(c=(l=e.renditions)==null?void 0:l.cutout)==null?void 0:c.key;if(typeof r=="string"&&r.startsWith(`processed/cutout/${e.file}/`))return r;const a=(m=(u=e.renditions)==null?void 0:u.crop)==null?void 0:m.key;return typeof a=="string"&&a.startsWith(`processed/crops/${e.file}/`)?a:null}function tU({value:e,onChange:t,propertyId:r,cropCfg:a}){const{api:l}=Wt(),c=Sl(r),[u,m]=x.useState(!1),p=Zp(e,a),g=DE(r,[p],l.getCropDerivativeUrl),b=p?g.get(p):void 0,v=k=>{var j;if(!u)return null;const w=fj(c,e,a.mode,k);return w.src?d.jsx(ey,{chrome:Hy,src:w.src,mode:a.mode,aspect:a.aspect,aspectLabel:a.aspectLabel,mobileAspect:a.mobileAspect,seed:{rect:w.seed},mobileSeed:{rect:al((j=e.mobile)==null?void 0:j.crop)},onClose:()=>m(!1),onApply:E=>{if(m(!1),!e.file||!E.mobile&&hj(w,E.rect))return;const _=mj(e,E);_!==null&&t(_)}}):null};return{cropCfg:a,ar:e.ar??null,cut:p,derivativeUrl:b,open:()=>m(!0),modal:v}}function Wy({propertyId:e,children:t}){return d.jsx(d.Fragment,{children:t(Wd(e))})}function Jy(e,t){const r=Sl(t).get(e);return r===void 0?void 0:f_(r)}function nU(e){return e==null||e===""?void 0:e}function ok(e){return{file:e.file,url:e.url,alt:e.alt}}const iU={noun:"image",takes:bc(["image"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>e.file===t.file?{...t,url:sl(e)}:{...ok(t),file:e.file,url:sl(e),alt:t.alt,picked:e.id},fromUploaded:(e,t)=>({...ok(t),file:e.media_id,url:e.url,picked:null}),cleared:{file:"",url:"",alt:""},usePreview:function(t,r){const a=Jy(t.file,r);return{src:(a==null?void 0:a.src)||t.url,name:nU(t.name)??(a==null?void 0:a.name)}}},rU={noun:"video",takes:bc(["video"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:sl(e),source:e.url!==null?"link":void 0,provider:e.url!==null?e.provider??void 0:void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,file:e.media_id,url:"",poster:e.poster??"",source:e.provider!==void 0?"link":void 0,provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,r){const a=Jy(t.file,r);return{src:(a==null?void 0:a.src)||t.poster,name:a==null?void 0:a.name,detail:a?V7(a):void 0}}},aU={noun:"tour",takes:bc(["tour"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:sl(e),provider:e.provider??void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,file:e.media_id,url:"",poster:e.poster??"",provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,r){const a=Jy(t.file,r);return{src:(a==null?void 0:a.src)||t.poster,name:a==null?void 0:a.name,detail:t.file?Xp((a==null?void 0:a.provider)??t.provider):void 0}}},oU={noun:"document",takes:bc(["document"]),fileIdOf:e=>(e==null?void 0:e.file)??"",fromPicked:e=>({file:e.file,picked:e.id}),fromUploaded:e=>({file:e.media_id,picked:null}),cleared:null,usePreview:function(t,r){const a=Vz(r),l=(t==null?void 0:t.file)??"";if(!l)return{src:""};const c=a(l);return c?{src:c.src,name:c.name,detail:Pz(c),attachment:A_(c)}:{src:"",name:"Document unavailable"}}},lU={image:iU,video:rU,tour:aU,document:oU};function Hn(e){return lU[e]}function ul(e){return e.recordContext?e.recordContext.table??null:e.boundRowTable??null}const sU="text-[length:calc(11.5*var(--content))] text-ink-3",cU=ie(vt,"inline-flex items-center gap-1.5 rounded-full bg-accent px-3 py-1.5 text-[length:calc(12*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),uU="flex w-full max-w-90 items-center gap-1.5",dU="min-w-0 flex-1 rounded-lg border border-line bg-white px-2.5 py-1.75 text-[length:calc(12.5*var(--content))] text-ink outline-none placeholder:text-ink-4 focus:border-ink",fU=ie(vt,"relative ml-[calc(10*var(--content))] grid aspect-square h-full shrink-0 cursor-pointer place-items-center overflow-hidden rounded-[calc(6*var(--content))] border border-line bg-[#e6e3da] text-ink-3","transition-[border-color,color] duration-[120ms] hover:border-ink-4 disabled:cursor-default disabled:hover:border-line","data-[empty]:border-dashed data-[empty]:not-data-[attention]:bg-transparent hover:data-[empty]:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink",wl);function lk(e){return e.kind==="image"?d.jsx(hU,{...e}):d.jsx(pj,{...e})}function pj(e){const t=Hn(e.kind),r=sj({props:e.props,table:ul(e.props),mediaId:t.fileIdOf(e.props.value),inLibrary:!0});return d.jsx(vj,{...e,extras:{crop:null,pick:null,ownerUpload:r.upload,ownerPreview:void 0}})}function gj(e){const{slot:t,value:r,onChange:a,propertyId:l,factPath:c}=e,u=tU({value:r,onChange:a,propertyId:l,cropCfg:Qg(t)}),m=Ky().capabilities.framingCrop===!1,p=Y_(m?l:"");if(!m)return{...u,offered:!0,recropping:!1};const g=Rs(c,r.file);return{...u,cut:null,derivativeUrl:void 0,open:()=>{g!==null&&p.open(g)},modal:()=>p.modal,offered:g!==null&&p.offers(g),recropping:g!==null&&p.recropping(g)}}function hU(e){const t=gj(e.props),r=Sl(e.props.propertyId),a=e.props.value.file,l=(u,m,p)=>{e.props.onChange(By(u,e.props.value,m,t.cropCfg,p))},c=sj({props:e.props,table:ul(e.props),mediaId:a,inLibrary:a!==""&&r.has(a)});return d.jsx(vj,{...e,extras:{crop:t,pick:l,ownerUpload:c.upload,ownerPreview:c.previewUrl}})}function yj(e){return e.kind==="image"?d.jsx(mU,{...e}):d.jsx(bj,{...e,crop:null})}function mU(e){return d.jsx(bj,{...e,crop:gj(e.props)})}function bj({kind:e,model:t,props:r,onOpen:a,crop:l}){const{slot:c,value:u,propertyId:m,required:p}=r,g=Hn(e),b=g.usePreview(u,m),v=Id(c,ul(r)),k=ef(c,{table:ul(r)}),w=Qy(r.factPath,g.fileIdOf(u));return d.jsx(yU,{kind:e,offer:v.kind,noun:g.noun,label:c.label,emptyName:k===null?c.label:Z_(k).label,preview:b,empty:t.isEmpty(u),crop:l,processing:w,attention:ea(t,c,u,p??!1),onOpen:a})}function vj({kind:e,face:t,model:r,props:a,extras:l,open:c}){var he,be;const{slot:u,value:m,onChange:p,propertyId:g,onUpload:b,required:v}=a,{crop:k,pick:w,ownerUpload:j,ownerPreview:E}=l,_=Hn(e),C=_.usePreview(m,g),O=E?{...C,src:E}:C,A=b!==void 0?{kind:"owned"}:Id(u,ul(a)),D=r.isEmpty(m),R=ea(r,u,m,v??!1),P=Qy(a.factPath,_.fileIdOf(m))||((k==null?void 0:k.recropping)??!1),[L,T]=x.useState(!1),H=b??j??void 0,ne=pU(H,($,de)=>c?c.onUploaded($,de):p(_.fromUploaded($,m))),Y=x.useRef(null),oe=c?c.accept:Py[e]??void 0,K=c&&D?c.noun:_.noun,X=((be=(he=ef(u,{table:ul(a)}))==null?void 0:he.choose)==null?void 0:be.label)??Vs("Choose",K),le=(c==null?void 0:c.takes)??_.takes,M=A.kind==="owned"&&H!==void 0,V=($,de)=>{c?c.onPicked($):w?w($,de,A.kind==="picked"?A.filter.from:void 0):p(_.fromPicked($,m))},te=ne,pe=M&&le.includes("file"),Q=M&&le.includes("link"),N=Vs("Upload",K),q=E_({accept:pe?oe??"":null,onFiles:([$])=>{$&&te.takeFile($)},...Q?{onLink:te.takeLink,...c?{}:{linkKinds:[e]}}:{},disabled:te.busy},N,Y,!1),I=pe||Q,F=A.kind==="picked"?[{label:X,glyph:"choose",run:()=>T(!0)}]:I?[{label:N,glyph:"upload",run:q.start}]:[],ae=k!=null&&k.offered&&!D&&O.src?k.open:null,ce=D?null:()=>p(_.cleared);return d.jsxs("div",{ref:Y,className:"flex min-w-0 flex-col gap-1",role:"group","aria-label":u.label,"data-media-face":t,"data-media-kind":e,"data-media-offer":A.kind,children:[d.jsx(gU,{scale:t==="expanded"?"card":"compact",kind:e,noun:K,label:u.label,preview:O,empty:D,crop:k,sources:F,onCrop:ae,onRemove:ce,drop:pe?te.takeFile:null,link:Q?te.takeLink:null,busy:te.busy,processing:P,attention:R}),te.error&&d.jsx("p",{className:xl,children:te.error}),q.node,L&&A.kind==="picked"&&d.jsx(Wy,{propertyId:g,children:$=>d.jsx(vc,{mode:"single",propertyId:g,filter:A.filter,currentId:_.fileIdOf(m)||void 0,onClose:()=>T(!1),onPick:de=>V(de,$)})}),k==null?void 0:k.modal(E)]})}function pU(e,t){const[r,a]=x.useState(!1),[l,c]=x.useState(null),u=m=>{e&&(a(!0),c(null),e(m).then(p=>t(p,m)).catch(p=>{console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}).finally(()=>a(!1)))};return{busy:r,error:l,takeFile:m=>u({file:m}),takeLink:m=>u({link:m})}}function xj({kind:e,preview:t,size:r}){var a,l;return e==="document"?d.jsx(Q7,{glyph:((a=t.attachment)==null?void 0:a.glyph)??"doc",extension:((l=t.attachment)==null?void 0:l.extension)??"",size:r}):e==="video"||e==="tour"?d.jsx(G7,{kind:e,size:r}):d.jsx(Lt.up,{})}function gU({scale:e,kind:t,noun:r,label:a,preview:l,empty:c,crop:u,sources:m,onCrop:p,onRemove:g,drop:b,link:v,busy:k,processing:w,attention:j}){const[E,_]=x.useState(!1),[C,O]=x.useState(""),A=Dy(u,l.src),D=b?{over:E,handlers:{onDragOver:P=>{P.preventDefault(),_(!0)},onDragLeave:P=>{P.currentTarget.contains(P.relatedTarget)||_(!1)},onDrop:P=>{var T;P.preventDefault(),_(!1);const L=(T=P.dataTransfer.files)==null?void 0:T[0];L&&b(L)}}}:null,R=[];if(p&&R.push({label:"Crop",glyph:"crop",onSelect:p}),!k)for(const P of m)R.push({label:P.label,glyph:P.glyph,onSelect:P.run,foot:!0});return g&&R.push({label:"Remove",glyph:"trash",onSelect:g,danger:!0}),c?d.jsxs(ak,{kind:t,name:`No ${r}`,empty:!0,scale:e,actions:R,attention:j,drop:D,children:[d.jsx("span",{className:"text-ink-4",children:d.jsx(xj,{kind:t,preview:l,size:24})}),(k||b)&&d.jsx("span",{className:sU,children:k?"Uploading…":E?`Drop to add this ${r}`:"Drop a file here"}),v&&d.jsxs("form",{className:uU,onSubmit:P=>{P.preventDefault(),C.trim()&&v(C.trim()),O("")},children:[d.jsx("input",{className:dU,value:C,onChange:P=>O(P.target.value),placeholder:`Paste a ${r} link`,"aria-label":`${a} link`}),d.jsxs("button",{type:"submit",className:cU,disabled:k||!C.trim(),children:[d.jsx(Lt.link,{})," Add"]})]})]}):d.jsx(ak,{kind:t,name:l.name??`Untitled ${r}`,empty:!1,scale:e,actions:R,attention:j,drop:D,children:d.jsx(wj,{kind:t,src:A,preview:l,dimmed:k||w,children:k?d.jsx(ny,{label:"Uploading…"}):w&&d.jsx(eb,{})})})}function eb(){return d.jsx(ny,{label:"Processing…"})}function yU({kind:e,offer:t,noun:r,label:a,emptyName:l,preview:c,empty:u,crop:m,processing:p,attention:g,onOpen:b}){const v=_l(),k=Dy(m,c.src),w=e==="image"?null:c.name??(u?null:`Untitled ${r}`),j=k?d.jsx("img",{className:"absolute inset-0 size-full object-cover object-top",src:k,alt:"",draggable:!1,style:p?pE:void 0}):u?d.jsx(Lt.plus,{}):d.jsx(xj,{kind:e,preview:c,size:16});return d.jsxs("button",{type:"button",className:fU,"data-media-summary":"","data-media-kind":e,"data-media-offer":t,"data-empty":u?"":void 0,...kl(g,v),"aria-label":u?l:`${a}: ${w??r}`,disabled:b===void 0,onClick:b,children:[j,p&&d.jsx(eb,{})]})}const bU="block size-full object-cover object-top",vU="flex size-full items-center justify-center bg-canvas",xU="pointer-events-none absolute bottom-1.5 left-1.5 z-[3] max-w-[80%] truncate rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold tabular-nums text-white",wU="pointer-events-none absolute inset-0 m-auto flex h-9 w-9 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]";function wj({kind:e,src:t,preview:r,dimmed:a,children:l}){return d.jsxs(d.Fragment,{children:[t?d.jsx("img",{className:bU,src:t,alt:"",draggable:!1,style:a?pE:void 0}):d.jsx("span",{className:vU,children:d.jsx(Ga,{kind:e,size:"logo",decorative:!0,...e==="document"&&r.attachment?{glyph:r.attachment.glyph}:{}})}),e==="video"&&t&&d.jsx("span",{className:wU,children:d.jsx(at,{name:"play",size:14})}),l,r.detail&&d.jsx("span",{className:xU,children:r.detail})]})}function tb({kind:e,value:t,propertyId:r,frame:a,holderPath:l}){const c=Hn(e),u=c.usePreview(t,r),m=Qy(l,c.fileIdOf(t)),{chrome:p,crop:g,beneath:b}=a,v=Dy(g,u.src),k=(g==null?void 0:g.cropping)??!1,w=u.name??(c.fileIdOf(t)?`Untitled ${c.noun}`:`No ${c.noun}`);return d.jsx(x$,{kind:e,name:w,chrome:p,thumb:d.jsx(wj,{kind:e,src:v,preview:u,dimmed:k||m,children:k?d.jsx(ny,{}):m&&d.jsx(eb,{})}),below:g&&d.jsx(Bz,{storeKey:g.storeKey}),beneath:b})}function af(e,t){function r(l){return d.jsx(lk,{kind:e,face:"expanded",model:t.model,props:l})}r.displayName=`MediaExpandedFace(${e})`;function a(l){return d.jsx(lk,{kind:e,face:"compact",model:t.model,props:l})}return a.displayName=`MediaCompactFace(${e})`,{model:t.model,faces:{expanded:r,compact:a},applyOptimistic:t.applyOptimistic}}function kU(e,t){const r=Sl(t).get(e);return r===void 0?null:r.kind}function nb(e,t,r){const a=kU((e==null?void 0:e.kind)===void 0?(e==null?void 0:e.file)??"":"",r);return(e==null?void 0:e.kind)??a??t[0]??"image"}function of(e,t){return t===null||Hn(e).fileIdOf(t)===""?null:{...t,kind:e}}function sk(e,t,r,a){const l=Hn(e),c=t===e?r:l.cleared;return of(e,a(l,c))}function SU(e){const t=e.map(r=>Py[r]).filter(r=>r!==null);return{takes:bc(e),accept:t.length>0?t.join(","):void 0}}function ed(e){return"file"in e?Y2(e.file.type):Q2(e.link)}function EU(e){const{kind:t}=e;return of(t,Hn(t).fromPicked(e,Hn(t).cleared))}function _U(e,t,r,a){return{noun:e.length===1?Hn(t).noun:"media",...SU(e),onPicked:l=>a(sk(l.kind,t,r,(c,u)=>c.fromPicked(l,u))),onUploaded:(l,c)=>{const u=ed(c);if(u===null||!e.includes(u))throw new Error(`a ${u??"file of no media kind"} is not among this field's ${e.join(", ")}`);a(sk(u,t,r,(m,p)=>m.fromUploaded(l,p)))}}}function ck({face:e,models:t,props:r}){const a=Ir(r.slot),l=nb(r.value,a,r.propertyId);return d.jsx(jU,{kind:l,kinds:a,face:e,models:t,props:r},l)}function kj(e,t,r){const a=r.value===null?Hn(e).cleared:t.coerce(r.value);return{...r,value:a,onChange:l=>r.onChange(of(e,l))}}function jU({kind:e,kinds:t,face:r,models:a,props:l}){const c=a[e],u=kj(e,c,l);return d.jsx(pj,{kind:e,face:r,model:c,props:u,open:_U(t,e,u.value,l.onChange)})}function OU({models:e,props:t,onOpen:r}){const a=nb(t.value,Ir(t.slot),t.propertyId);return d.jsx(AU,{kind:a,models:e,props:t,onOpen:r},a)}function AU({kind:e,models:t,props:r,onOpen:a}){const l=t[e];return d.jsx(yj,{kind:e,model:l,onOpen:a,props:kj(e,l,r)})}function NU(e){function t(a){return d.jsx(ck,{face:"expanded",models:e.models(),props:a})}function r(a){return d.jsx(ck,{face:"compact",models:e.models(),props:a})}return{model:e.model,faces:{expanded:t,compact:r},applyOptimistic:null}}function MU(e,t){const r=e.querySelector("img");if(r){t.url&&r.setAttribute("src",t.url),r.setAttribute("alt",t.alt??""),r.style.transform="",r.style.transformOrigin="",r.style.objectPosition="";return}const a=e.querySelector("video");a&&(t.url?a.setAttribute("poster",t.url):a.removeAttribute("poster"))}function Sj(e){if(e&&typeof e=="object"){const t=e,r=lw(t.crop),a=ll(e);return{file:yc(t)??"",url:typeof t.url=="string"?t.url:"",alt:typeof t.alt=="string"?t.alt:"",crop:r??void 0,ar:typeof t.ar=="number"?t.ar:void 0,mobile:t.mobile&&typeof t.mobile=="object"&&lw(t.mobile.crop)!==null?t.mobile:void 0,...t.renditions&&typeof t.renditions=="object"?{renditions:t.renditions}:{},...a===void 0?{}:{picked:a},...typeof t.name=="string"||t.name===null?{name:t.name}:{}}}return{file:"",url:"",alt:""}}const Ej=af("image",{model:{defaultValue:{file:"",url:"",alt:""},coerce:Sj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:MU});function CU(e,t){const r=e.matches("img")?e:e.querySelector("img");r&&t.poster&&r.setAttribute("src",t.poster)}function _j(e){if(e&&typeof e=="object"){const t=e;return{file:yc(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...ll(e)===void 0?{}:{picked:ll(e)}}}return{file:"",url:"",poster:"",alt:""}}const jj=af("tour",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:_j,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:CU});function Oj({engine:e,lens:t,propertyId:r,instanceId:a,slotId:l,cropCfg:c}){const{api:u}=Wt(),m=Sl(r),{rows:p}=e,[g,b]=x.useState(null),v=C=>`${r}:${a}:${l}:${C}`,k=C=>t.get(C.value),w=DE(r,p.map(C=>{const O=k(C);return O===null?null:Zp(O,c)}),u.getCropDerivativeUrl),j=(C,O)=>{const A=g;b(null),A&&(!O.mobile&&hj(C,O.rect)||e.updateValue(A,D=>{const R=t.get(D);if(R===null||!R.file)return D;const P=mj(R,O);return P===null?D:t.set(D,P)}))},E=()=>{var D;const C=g?p.find(R=>R.key===g):null,O=C?k(C):null;if(!C||!O)return null;const A=fj(m,O,c.mode);return A.src?d.jsx(ey,{chrome:Hy,src:A.src,mode:c.mode,aspect:c.aspect,aspectLabel:c.aspectLabel,mobileAspect:c.mobileAspect,seed:{rect:A.seed},mobileSeed:{rect:al((D=O.mobile)==null?void 0:D.crop)},onApply:R=>j(A,R),onClose:()=>b(null)}):null},_=C=>{const O=k(C);return O===null?null:Zp(O,c)};return{keyOf:v,cutOf:_,derivativeOf:C=>{const O=_(C);return O?w.get(O):void 0},open:b,modal:E}}function uk(e,t){return e.matches(t)?e:e.querySelector(t)}function RU(e,t){const r=uk(e,"video");if(r){t.poster&&r.setAttribute("poster",t.poster),t.url&&r.setAttribute("src",t.url),t.alt&&r.setAttribute("aria-label",t.alt);return}const a=uk(e,"img");a&&t.poster&&a.setAttribute("src",t.poster)}function Aj(e){if(e&&typeof e=="object"){const t=e;return{file:yc(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",width:typeof t.width=="number"?t.width:void 0,height:typeof t.height=="number"?t.height:void 0,...t.source==="link"?{source:"link"}:{},...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...ll(e)===void 0?{}:{picked:ll(e)}}}return{file:"",url:"",poster:"",alt:""}}const Nj=af("video",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:Aj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:RU});function TU(e,t){switch(e){case"image":return t.map(Sj);case"video":return t.map(Aj);case"tour":return t.map(_j);case"document":return Fz(t)}}function DU(e){return{get:t=>e==="image"?t:null,set:(t,r)=>r}}function LU({kind:e,label:t,itemSlot:r,offer:a,verbs:l,fixed:c,instanceId:u,slotId:m,ownerSlotId:p=m,value:g,propertyId:b,commit:v,onUpload:k,factPath:w,size:j}){const E=Hn(e),_=Qg(r),C=x.useMemo(()=>TU(e,g),[e,g]),[O,A]=x.useState(!1),D=Jr({items:C,fixed:c,axis:"xy",commit:v}),{rows:R}=D,P=x.useMemo(()=>DU(e),[e]),L=Oj({engine:D,lens:P,propertyId:b,instanceId:u,slotId:m,cropCfg:_}),T=dj(b,e),H=Zy(r,{propertyId:b,instanceId:u,slotId:p}),ne=k??H??void 0,Y=Mj(ne,pe=>D.add(E.fromUploaded(pe,E.cleared))),oe=a.kind==="owned"&&ne!==void 0,K=(pe,Q)=>e==="image"?By(pe,E.cleared,Q,_,a.kind==="picked"?a.filter.from:void 0):E.fromPicked(pe,E.cleared),X=(pe,Q)=>{D.replace(El(R,pe,E.fileIdOf,N=>K(N,Q),D.mint))},{add:le,onAdd:M,choose:V}=My(l,a.kind==="picked"?()=>A(!0):null,a.kind==="owned"&&oe?ib([e],Y):null),te=Y.error;return d.jsxs(Cy,{engine:D,label:t,noun:E.noun,size:j,onAdd:M,add:le,choose:V,renderTile:(pe,Q,N)=>d.jsx(tb,{kind:e,value:pe.value,propertyId:b,holderPath:w,frame:{chrome:N,crop:e==="image"?{cfg:_,cut:L.cutOf(pe),derivativeUrl:L.derivativeOf(pe),cropping:T.recropping(Rs(w,E.fileIdOf(pe.value))),storeKey:L.keyOf(pe.key)}:null}}),tileActions:pe=>e==="image"&&T.offers(Rs(w,E.fileIdOf(pe.value)))?[{label:"Crop",glyph:"crop",onSelect:()=>T.framing?L.open(pe.key):T.recrop(Rs(w,E.fileIdOf(pe.value)),L.keyOf(pe.key))}]:[],children:[te&&d.jsx("p",{className:xl,children:te}),O&&a.kind==="picked"&&d.jsx(Wy,{propertyId:b,children:pe=>d.jsx(vc,{mode:"multi",propertyId:b,filter:a.filter,selectedIds:R.map(Q=>E.fileIdOf(Q.value)),onChange:Q=>X(Q,pe),onClose:()=>A(!1)})}),T.framing&&L.modal(),T.modal]})}function Mj(e,t){const[r,a]=x.useState(!1),[l,c]=x.useState(null);return{busy:r,error:l,take:m=>{!e||m.length===0||(a(!0),c(null),(async()=>{try{for(const p of m)t(await e(p),p)}catch(p){console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}finally{a(!1)}})())}}}function ib(e,t){const r=Sg(e);return{accept:Vy(e),onFiles:a=>t.take(a.map(l=>({file:l}))),...r.length>0?{onLink:a=>t.take([{link:a}]),linkKinds:r}:{},disabled:t.busy}}const dk="label";function td(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function lf(e){var c;const t=td(e);if((t==null?void 0:t.type)!=="object")return null;const r=td(t.fields);if(r===null)return null;const a=(c=td(t.label))==null?void 0:c.field,l=t.item_order;return{...typeof a=="string"?{labelField:a}:{},fields:r,...Array.isArray(l)?{item_order:l.filter(u=>typeof u=="string")}:{}}}function Fr(e){return lf(e.element)}function jl(e){const{fields:t}=e,r=e.item_order;if(!r||r.length===0)return Object.entries(t);const a=new Set,l=[];for(const c of r)c in t&&!a.has(c)&&(a.add(c),l.push([c,t[c]]));for(const[c,u]of Object.entries(t))a.has(c)||l.push([c,u]);return l}function dl(e,t){return e.labelField!==void 0&&e.fields[e.labelField]?{kind:"field",field:e.labelField}:e.fields[dk]?{kind:"field",field:dk}:{kind:"text",text:t}}function sf(e,t,r){var u;if(e.kind==="text")return e.text;const a=(u=td(r))==null?void 0:u[e.field],l=t.fields[e.field];if((l==null?void 0:l.type)==="address"){const m=xi(a);return(m===null?null:f5(m))??"Untitled"}const c=typeof a=="string"?a.trim():typeof a=="number"?String(a):"";if(!c)return"Untitled";if((l==null?void 0:l.type)!=="select")return c;for(const m of l.values??[])if(typeof m!="string"&&m.value===c)return m.label;return c}function zU(e){const t=Fr(e);return t?jl(t):[]}function $U(e){switch(e.type){case"text":case"select":case"url":case"email":case"phone":return"";case"number":case"date":case"image":case"video":case"tour":case"poi":case"document":case"address":case"media":return null;case"list":return[]}}function Io(e){const t={};for(const[r,a]of e)t[r]=$U(a);return t}const UU=["street","unit","city","state","postal"],Cj={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function IU(e,t){const r=e??Cj,a=xi({...r,...t}),l=UU.filter(c=>((a==null?void 0:a[c])??null)!==r[c]);return l.length===0?e:l.every(c=>c==="unit")?a:a===null?null:xi({...a,latitude:null,longitude:null,source:null})}function fk(e,t,r){return IU(e,{[t]:r})}function HU(e){return xi({...e,source:"autocomplete"})}function BU(e,t){return xi({...e??Cj,...t,source:"manual_pinned"})}function Rj(e){return e!==null&&e.latitude!==null&&e.longitude!==null}function Tj(e){return e!==null&&!Rj(e)}function qU(e,t,r){const a=r===void 0||r.size===0?t!=="unit":r.has(t);return e!==null&&a&&e[t]===null}function FU(e){return Tj(e)||(e==null?void 0:e.source)==="manual_pinned"}const Dj={defaultValue:null,coerce:xi,isEmpty:e=>e===null,isInvalid:()=>!1},Wp=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"},{code:"AS",name:"American Samoa"},{code:"GU",name:"Guam"},{code:"MP",name:"Northern Mariana Islands"},{code:"PR",name:"Puerto Rico"},{code:"VI",name:"U.S. Virgin Islands"}];function Vu(e){const t=e.trim().toLowerCase();if(t==="")return[...Wp];const r=a=>{const l=a.name.toLowerCase();return a.code.toLowerCase()===t||l===t?0:l.startsWith(t)?1:l.includes(` ${t}`)?2:l.includes(t)?3:-1};return Wp.map(a=>({state:a,rank:r(a)})).filter(({rank:a})=>a>=0).sort((a,l)=>a.rank-l.rank).map(({state:a})=>a)}function PU(e){const t=e.trim().toLowerCase();return t===""?null:Wp.find(r=>r.code.toLowerCase()===t||r.name.toLowerCase()===t)??null}const VU="fixed overflow-y-auto rounded-[calc(10*var(--content))] border border-line bg-white p-1.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",GU=ie(vt,"flex w-full items-center gap-3 rounded-[calc(7*var(--content))] px-2.5 py-2 text-left text-body text-ink data-[active=true]:bg-accent-soft"),KU="ml-auto text-caption font-medium text-ink-4",YU=4,QU=280,hk=220;function XU({value:e,onCommit:t,ariaLabel:r,placeholder:a,shellClassName:l,attention:c,inputClassName:u}){const m=e??"",[p,g]=x.useState(null),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useId(),E=x.useRef(null),_=x.useRef(null),C=p!==null,O=C&&p!==m,A=Vu(O?p:""),D=x.useCallback(()=>{E.current&&w(Ba(E.current))},[]);x.useEffect(()=>{if(C)return window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[C,D]),x.useEffect(()=>{var Y,oe;(oe=(Y=_.current)==null?void 0:Y.querySelector('[data-active="true"]'))==null||oe.scrollIntoView({block:"nearest"})},[b,C]);function R(){D(),g(m);const Y=Vu("").findIndex(oe=>oe.code===m);v(Math.max(0,Y))}function P(){g(null),w(null)}function L(Y){P(),Y!==e&&t(Y)}function T(Y){if(Y===m)return P();if(Y.trim()==="")return L(null);const oe=PU(Y);if(oe)return L(oe.code);const K=Vu(Y);if(K.length===1)return L(K[0].code);P()}function H(Y){if(!C){(Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Y.preventDefault(),R());return}switch(Y.key){case"ArrowDown":Y.preventDefault(),v(oe=>Math.min(A.length-1,oe+1));return;case"ArrowUp":Y.preventDefault(),v(oe=>Math.max(0,oe-1));return;case"Enter":{Y.preventDefault(),Y.stopPropagation();const oe=A[b];oe?L(oe.code):T(p);return}case"Tab":{const oe=O?A[b]:void 0;oe?L(oe.code):T(p);return}case"Escape":Y.preventDefault(),P();return}}const ne=k?hl(k,{maxHeight:QU,minWidth:hk,gap:YU}):null;return d.jsxs("div",{className:l,ref:E,...c,children:[d.jsx("input",{className:u,type:"text",role:"combobox","aria-label":r,"aria-expanded":C,"aria-controls":j,"aria-autocomplete":"list",autoComplete:"address-level1",placeholder:a,value:C?p:m,onFocus:Y=>{R(),Y.currentTarget.select()},onChange:Y=>{C||D(),g(Y.target.value),v(0)},onKeyDown:H,onBlur:()=>{C&&T(p)}}),C&&ne&&A.length>0&&typeof document<"u"&&Zi.createPortal(d.jsx("div",{ref:_,id:j,role:"listbox","aria-label":`${r} options`,className:VU,style:{left:ne.left,top:ne.top,bottom:ne.bottom,maxHeight:ne.maxHeight,minWidth:Math.max(ne.width,hk),zIndex:Br},children:A.map((Y,oe)=>d.jsxs("button",{type:"button",role:"option",tabIndex:-1,"aria-selected":Y.code===m,"data-active":oe===b,"data-state-option":Y.code,className:GU,onMouseEnter:()=>v(oe),onMouseDown:K=>{K.preventDefault(),L(Y.code)},children:[d.jsx("span",{className:"truncate",children:Y.name}),d.jsx("span",{className:KU,children:Y.code})]},Y.code))}),document.body)]})}const ZU=x.createContext(null);function Lj(e){const t=x.useContext(ZU);return t!==null&&e!==void 0&&t.factPath===e?t.fields:void 0}const WU={street:{label:"Street address",placeholder:"123 Main St",panelPlaceholder:"Street address"},unit:{label:"Address 2",placeholder:"Unit 4B",panelPlaceholder:"Unit"},city:{label:"City",placeholder:"Boulder",panelPlaceholder:"City"},state:{label:"State",placeholder:"CO",panelPlaceholder:"State"},postal:{label:"ZIP",placeholder:"80301",panelPlaceholder:"ZIP"}},JU={page:{grid:"grid grid-cols-12 gap-x-3 gap-y-4",span:{street:"col-span-8",unit:"col-span-4",city:"col-span-6",state:"col-span-2",postal:"col-span-4"},labelled:!0},panel:{grid:"grid grid-cols-[1fr_3rem_1.5rem_5.5rem] gap-1.5",span:{street:"col-span-2",unit:"col-span-2",city:"",state:"col-span-2",postal:""},labelled:!1}},e9=250,t9=2e3;function n9(e){const t=FU(e),[r,a]=x.useState(!1),[l,c]=x.useState(t);!r&&l!==t&&c(t);const u=x.useRef(null),m=x.useCallback(()=>{u.current!==null&&clearTimeout(u.current),u.current=null},[]);x.useEffect(()=>m,[m]);const p=x.useCallback(()=>{m(),a(!1)},[m]),g=x.useCallback(()=>{m(),a(!0),u.current=setTimeout(()=>{u.current=null,a(!1)},t9)},[m]);return{show:r?l:t,hold:g,settle:p}}function i9(){const[e,t]=x.useState({});return{shown:(r,a)=>e[r]??a,type:(r,a)=>t(l=>({...l,[r]:a})),settle:r=>t(({[r]:a,...l})=>l),settleAll:()=>t({})}}function r9(e){const t=Wt().address;return t?d.jsx(t.Input,{...e}):d.jsx("input",{className:e.className,type:"text",value:e.value,placeholder:e.placeholder,"aria-label":e.ariaLabel,autoComplete:"off",onChange:r=>e.onChange(r.target.value),onBlur:e.onBlur})}function a9({value:e,onPin:t,place:r}){const a=Wt().address;if(!a)return null;const l=Rj(e)?{latitude:e.latitude,longitude:e.longitude}:null;return d.jsx(a.PinMap,{pin:l,postal:(e==null?void 0:e.postal)??null,place:r,onPin:t})}function o9({value:e,show:t,onChange:r,place:a}){const[l,c]=x.useState(t);return t&&!l&&c(!0),x.useEffect(()=>{if(t)return;const u=setTimeout(()=>c(!1),e9);return()=>clearTimeout(u)},[t]),l?d.jsx("div",{"data-pin-map-reveal":!0,"data-open":t,"aria-hidden":!t,className:"grid grid-rows-[1fr] opacity-100 transition-[grid-template-rows,opacity] duration-250 ease-out starting:grid-rows-[0fr] starting:opacity-0 data-[open=false]:grid-rows-[0fr] data-[open=false]:opacity-0 motion-reduce:transition-none",children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{className:a==="page"?"pt-4":"pt-1.5",children:d.jsx(a9,{value:e,onPin:u=>r(BU(e,u)),place:a})})})}):null}function l9({value:e,onChange:t,place:r,fields:a,hold:l}){const c=i9(),u=_l(),m=C_(r),p=JU[r],g=ie(m.inner,"w-full"),b=v=>{const k=WU[v],w=kl(qU(e,v,a==null?void 0:a.required)?"required":null,u),j=p.labelled?k.placeholder:k.panelPlaceholder,E=(e==null?void 0:e[v])??"",_=v==="postal"?jg(E):E,C=A=>{c.type(v,A),l.hold(),t(fk(e,v,A))};let O;return v==="street"?O=d.jsx("div",{className:m.shell,...w,children:d.jsx(r9,{className:g,value:c.shown(v,_),placeholder:j,ariaLabel:k.label,onChange:C,onPick:A=>{c.settleAll(),l.settle(),t(HU(A))},onBlur:()=>c.settle(v)})}):v==="state"?O=d.jsx(XU,{value:(e==null?void 0:e.state)??null,onCommit:A=>{l.hold(),t(fk(e,"state",A??""))},ariaLabel:k.label,placeholder:j,shellClassName:m.shell,attention:w,inputClassName:g}):O=d.jsx("div",{className:m.shell,...w,children:d.jsx("input",{className:g,type:"text",value:c.shown(v,_),placeholder:j,"aria-label":k.label,autoComplete:"off",inputMode:v==="postal"?"numeric":void 0,maxLength:v==="postal"?10:void 0,onChange:A=>C(A.target.value),onBlur:()=>c.settle(v)})}),d.jsxs("label",{className:ie(m.frame,"min-w-0",p.span[v]),children:[p.labelled&&d.jsx("span",{className:GE,children:k.label}),O]},v)};return d.jsx("div",{className:p.grid,children:s9.filter(v=>a===void 0||a.used.has(v)).map(b)})}const s9=["street","unit","city","state","postal"];function c9(e){return e===void 0||e.used.has("latitude")||e.used.has("longitude")}function zj({slot:e,value:t,onChange:r,factPath:a,place:l}){const c=Lj(a)??void 0,u=n9(t),m=g=>{g.relatedTarget instanceof Node&&g.currentTarget.contains(g.relatedTarget)||u.settle()},p=g=>{u.settle(),r(g)};return d.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e.label,onBlur:m,children:[d.jsx(l9,{value:t,onChange:r,place:l,fields:c,hold:u}),c9(c)&&d.jsx(o9,{value:t,show:u.show,onChange:p,place:l})]})}function u9(e){return d.jsx(zj,{...e,place:"page"})}function d9(e){return d.jsx(zj,{...e,place:"panel"})}const f9={model:Dj,faces:{expanded:u9,compact:d9},applyOptimistic:null},mk=["January","February","March","April","May","June","July","August","September","October","November","December"],h9=["Su","Mo","Tu","We","Th","Fr","Sa"],pk=e=>String(e).padStart(2,"0");function $j(e,t,r){return`${String(e).padStart(4,"0")}-${pk(t+1)}-${pk(r)}`}function m9(e=new Date){return $j(e.getFullYear(),e.getMonth(),e.getDate())}function gk(e){return{year:Number(e.slice(0,4)),month:Number(e.slice(5,7))-1}}function p9(e,t){const r=e.year*12+e.month+t;return{year:Math.floor(r/12),month:(r%12+12)%12}}function g9(e){const t=new Date(Date.UTC(e.year,e.month,1)).getUTCDay();return Array.from({length:42},(r,a)=>{const l=new Date(Date.UTC(e.year,e.month,1+a-t));return{iso:$j(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),inMonth:l.getUTCMonth()===e.month,day:l.getUTCDate()}})}const y9="fixed w-[calc(260*var(--content))] rounded-[calc(10*var(--content))] border border-line bg-white p-2.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",yk=ie(vt,"grid size-[calc(28*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-ink-3 hover:bg-accent-soft hover:text-ink"),b9=ie(vt,"flex items-center gap-1 rounded-[calc(7*var(--content))] px-2 py-1 text-[length:calc(13.5*var(--content))] font-semibold text-ink hover:bg-accent-soft data-[open=true]:bg-accent-soft"),Uj=ie(vt,"grid h-[calc(32*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-[length:calc(13*var(--content))] [font-variant-numeric:tabular-nums]","text-ink hover:bg-accent-soft data-[outside=true]:text-ink-4","data-[selected=true]:bg-accent data-[selected=true]:font-semibold data-[selected=true]:text-white data-[selected=true]:hover:bg-accent"),bk=ie(Uj,"h-[calc(40*var(--content))]"),vk=12,v9=4,x9=4;function w9({anchorRef:e,ownerRef:t,value:r,label:a,onPick:l,onClose:c}){const[u,m]=x.useState(()=>gk(r??m9())),[p,g]=x.useState("days"),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useRef(null),[E,_]=x.useState(r);r!==E&&(_(r),r!==null&&m(gk(r))),x.useLayoutEffect(()=>{const R=()=>{const P=e.current,L=j.current;!P||!L||w(hl(Ba(P),{height:L.offsetHeight,minWidth:L.offsetWidth,gap:x9}))};return R(),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[e,p]),x.useEffect(()=>{const R=T=>{var ne,Y;const H=T.target;(ne=j.current)!=null&&ne.contains(H)||(Y=t.current)!=null&&Y.contains(H)||c()},P=()=>c(),L=T=>{T.key!=="Escape"||T.defaultPrevented||(T.preventDefault(),c())};return document.addEventListener("pointerdown",R,!0),document.addEventListener("keydown",L),window.addEventListener("blur",P),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("keydown",L),window.removeEventListener("blur",P)}},[t,c]);const C=R=>{R==="years"&&v(u.year-v9),g(p===R?"days":R)},O=R=>{p==="years"?v(b+R*vk):m(p9(u,R))},A=p==="years"?"years":"month",D=(R,P,L)=>d.jsxs("button",{type:"button",className:b9,"aria-label":L,"aria-expanded":p===R,"data-open":p===R,onClick:()=>C(R),children:[P,d.jsx("span",{className:ie("text-ink-4 transition-transform",p===R&&"rotate-180"),children:d.jsx(Lt.chevD,{})})]});return Zi.createPortal(d.jsxs("div",{ref:j,role:"dialog","aria-label":`${a} calendar`,className:y9,style:{left:(k==null?void 0:k.left)??0,top:k?k.top:0,bottom:k==null?void 0:k.bottom,visibility:k?void 0:"hidden",zIndex:Br},onMouseDown:R=>R.preventDefault(),children:[d.jsxs("div",{className:"mb-1.5 flex h-[calc(28*var(--content))] items-center justify-between",children:[d.jsxs("div",{className:"flex items-center",children:[D("months",mk[u.month]??"","Choose month"),D("years",String(u.year),"Choose year")]}),p!=="months"&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",className:yk,"aria-label":`Previous ${A}`,onClick:()=>O(-1),children:d.jsx(Lt.chevL,{})}),d.jsx("button",{type:"button",className:yk,"aria-label":`Next ${A}`,onClick:()=>O(1),children:d.jsx(Lt.chevR,{})})]})]}),p==="days"?d.jsxs("div",{className:"grid grid-cols-7 gap-0.5",children:[h9.map(R=>d.jsx("span",{className:"grid h-[calc(24*var(--content))] place-items-center text-[length:calc(11*var(--content))] font-medium text-ink-4",children:R},R)),g9(u).map(R=>d.jsx("button",{type:"button",className:Uj,"aria-label":R.iso,"aria-pressed":R.iso===r,"data-outside":!R.inMonth,"data-selected":R.iso===r,onClick:()=>l(R.iso),children:R.day},R.iso))]}):p==="months"?d.jsx("div",{className:"grid grid-cols-3 gap-1",children:mk.map((R,P)=>d.jsx("button",{type:"button",className:bk,"aria-pressed":P===u.month,"data-selected":P===u.month,onClick:()=>{m({year:u.year,month:P}),g("days")},children:R.slice(0,3)},R))}):d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Array.from({length:vk},(R,P)=>b+P).map(R=>d.jsx("button",{type:"button",className:bk,"aria-pressed":R===u.year,"data-selected":R===u.year,onClick:()=>{m({year:R,month:u.month}),g("days")},children:R},R))})]}),document.body)}const Ij={defaultValue:null,coerce:e=>typeof e=="string"&&e!==""?e:null,isEmpty:e=>e===null,isInvalid:e=>!X2(e)};function xk({slot:e,value:t,onChange:r,required:a=!1}){const[l,c]=x.useState(!1),[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useRef(null),v=l||t!==null,k=ea(Ij,e,t,a),w=ta(),j=t!==null&&X2(t)?t:null;x.useEffect(()=>{var C;l&&((C=p.current)==null||C.focus())},[l]);const E=x.useCallback(()=>{var C;m(!1),document.activeElement!==p.current&&((C=p.current)==null?void 0:C.value)===""&&c(!1)},[]),_=v?d.jsxs(Ka,{attention:k,className:u?"border-accent":void 0,ref:b,children:[d.jsx("input",{ref:p,className:ie(w.inner,"[font-variant-numeric:tabular-nums] [&::-webkit-calendar-picker-indicator]:hidden"),type:"date","aria-label":e.label,"aria-invalid":k==="invalid"||void 0,value:j??"",onFocus:()=>c(!0),onChange:C=>r(C.target.value===""?null:C.target.value),onBlur:C=>{m(!1),C.target.value===""&&c(!1)}}),d.jsx("span",{className:ie(YE,w.adornEnd),children:d.jsx("button",{type:"button",className:ie(vt,"flex items-center text-ink-4 hover:text-ink-2 data-[open=true]:text-accent"),"aria-label":`Choose ${e.label}`,"aria-haspopup":"dialog","aria-expanded":u,"data-open":u,onMouseDown:C=>C.preventDefault(),onClick:()=>u?E():m(!0),children:d.jsx(Lt.calendar,{})})})]}):d.jsx(Ka,{attention:k,children:d.jsx("button",{type:"button",className:ie(vt,w.inner,"cursor-pointer text-left text-ink-4"),"aria-label":e.label,onClick:()=>{c(!0),m(!0)},children:"None"})});return d.jsxs("div",{className:w.frame,ref:g,children:[_,v&&u&&d.jsx(w9,{anchorRef:b,ownerRef:g,value:j,label:e.label,onPick:C=>{var O;r(C),m(!1),(O=p.current)==null||O.focus()},onClose:E}),d.jsx(R_,{attention:k,message:"Not a real date. Pick one"})]})}const k9={model:Ij,faces:{expanded:xk,compact:xk},applyOptimistic:null},Hj=af("document",{model:{defaultValue:{file:""},coerce:O_,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},applyOptimistic:null}),S9="data-slot-id",wk="data-slot-text-leaf",E9="data-slot-group",_9="data-slot-item",j9="data-slot-field",O9="data-slot-unselectable",cf="data-section-instance-id";function Bj(e,t){const r=[];e.hasAttribute(wk)&&r.push(e),r.push(...Array.from(e.querySelectorAll(`[${wk}]`))),r.length!==0&&r.forEach(a=>{A9(a,t)})}function A9(e,t){const r=e.ownerDocument,a=[];t.split(`
|
|
1264
|
+
`).forEach((l,c)=>{c>0&&a.push(r.createElement("br")),a.push(r.createTextNode(l))}),e.replaceChildren(...a)}function xc(e){return typeof e=="string"?e:e==null?"":typeof e=="number"||typeof e=="boolean"?String(e):""}function N9(e){const[t,r]=x.useState(e),[a,l]=x.useState(e);return e!==a&&(l(e),r(e)),[t,r]}function rb({kind:e,slot:t,value:r,onChange:a,required:l=!1}){var k;const c=r??"",[u,m]=N9(c),p=ea(e.model,t,u,l),g=e.invalidMessage(u,t),b=w=>{if(!e.model.isEmpty(w)&&e.model.isInvalid(w,t))return;const E=e.model.isEmpty(w)?"":e.normalize(w);m(E),E!==c&&a(E)},v=ta();return d.jsxs("div",{className:v.frame,children:[d.jsxs(Ka,{attention:p,children:[d.jsx("input",{className:v.inner,type:e.inputType,inputMode:e.inputMode,autoComplete:e.autoComplete,value:u,placeholder:t.placeholder??e.placeholder,spellCheck:!1,"aria-label":t.label,"aria-invalid":p==="invalid"||void 0,"aria-description":v.inline&&p==="invalid"?g:void 0,onChange:w=>m(w.target.value),onBlur:w=>b(w.target.value)}),!v.inline&&((k=e.adornment)==null?void 0:k.call(e,u))]}),d.jsx(R_,{attention:p,message:g})]})}const qj={model:{defaultValue:"",coerce:xc,isEmpty:e=>e.trim()==="",isInvalid:e=>!o5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid email address",inputType:"email",inputMode:"email",autoComplete:"email",placeholder:"name@example.com"};function kk(e){return d.jsx(rb,{kind:qj,...e})}const M9={model:qj.model,faces:{expanded:kk,compact:kk},applyOptimistic:null},Fj="section";function Pj(e,t){const{itemKind:r,view:a,granularity:l}=$3(e,t,Fj),c=r==="object"||r==="annotated-media"?{kind:"record",entries:zU(e)}:{kind:"single",slot:e.element??{type:"text",label:e.label}};return{itemKind:r,view:a,granularity:l,itemContent:c,axis:a==="gallery"||a==="annotated-gallery"?"xy":"y"}}function Jp(e,t){const r=Ps(e),a=Ps(t);if(r!=null||a!=null)return r===a;if(e===t||e==null&&t==null)return!0;if(e==null||t==null)return!1;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((l,c)=>Jp(l,t[c]));if(typeof e=="object"||typeof t=="object"){if(typeof e!="object"||typeof t!="object")return!1;const l=e,c=t;return[...new Set([...Object.keys(l),...Object.keys(c)])].every(m=>Jp(l[m],c[m]))}return Sk(e)===Sk(t)}function Sk(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):null}function C9(e,t,r,a,l){const c=Uo(m=>m.markSlotOverridden),u=!l&&!q3(e);return function(p,g){u&&c(t,r,{kind:"scalar"}),a(p.map(b=>b.value))}}function Gs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function R9(e){var t;return((t=Gs(e.element))==null?void 0:t.type)==="row"}function T9(e,t){var a;const r=(a=Gs(e))==null?void 0:a.decisions;if(Array.isArray(r))return r.find(l=>{var u;const c=(u=Gs(l))==null?void 0:u.produces;return Array.isArray(c)&&c[0]===t})}function Vj(e,t,r){const a=Gs(t),l=H3(a).some(b=>b.verb==="pick")||R9(e),c=p4({slots:{},...r===void 0?{}:{sectionSlots:r}},e);switch(F3(e).kind){case"table":{const b=Mg(e.source);return b===null?{kind:"owned"}:{kind:"table",table:b}}case"section":case"derived":return c.length===0?{kind:"follows"}:{kind:"follows",tables:c}}if(!l)return{kind:"owned"};const[m,...p]=c;if(m!==void 0)return{kind:"pick-row",tables:[m,...p]};const g=O5(a==null?void 0:a.of);return g===null?{kind:"owned"}:{kind:"pick-media",filter:g}}function ab(e){switch(e.kind){case"table":return[e.table];case"pick-row":return e.tables;case"follows":return e.tables??[];case"pick-media":case"owned":return[]}}function Gj(e){const t=ab(e);return t.length===1?t[0]:null}const ob="id";function Kj(e){const[t,...r]=[...new Set(e)];return t===void 0?null:[t,...r]}function lb(e){return Kj(ab(e))}const D9=()=>null;function uf(e){const t=Kj(Us(e));return t===null?{kind:"none"}:e.source===void 0?{kind:"table",tables:t}:{kind:"table",tables:t,inert:!0}}function Ek(e,t,r){const a=lb(t);if(a!==null)return{kind:"table",tables:a};const l=Gs(e.source);return t.kind==="follows"&&(l==null?void 0:l.kind)==="section"?L9(l,r):{kind:"none"}}function L9(e,t){const r=e.section,a=e.slot;return typeof r!="string"||typeof a!="string"?{kind:"none"}:{kind:"content",labelOf:(t==null?void 0:t({section:r,slot:a}))??D9}}function _d(e,t){const r=e[t];return typeof r=="string"&&r!==""?r:null}function Yj({instanceId:e,slotId:t,membership:r,itemBaseline:a,insideRecord:l}){const c=Uo(k=>k.markSlotOverridden),u=Uo(k=>k.relinkSlot),m=ob,p=Gj(r)===null&&r.kind!=="follows",g=r.kind==="table"||r.kind==="follows",b=k=>_d(k,m),v=k=>b(k.value)??(p?k.key:null);return{identityKey:m,identityOf:b,stamp:k=>p?k.map(w=>b(w.value)===null?{key:w.key,value:{...w.value,[m]:w.key}}:w):k,markerIdentity:v,markFields:(k,w)=>{if(l)return;const j=v(k);if(j===null)return;const E=a==null?void 0:a.find(_=>_[m]===j);for(const _ of Object.keys(w))_!==m&&(E!=null&&Jp(w[_],E[_])?u(e,t,{kind:"item",item_id:j,field:_}):c(e,t,{kind:"item",item_id:j,field:_}))},markRemoved:k=>{if(l||r.kind!=="table")return;const w=b(k.value);w!==null&&!rf(w)&&c(e,t,{kind:"item_removed",item_id:w})},markOrder:k=>{if(l||!g||a===void 0)return;const w=k.map(O=>b(O.value)).filter(O=>O!==null),j=new Set(w),E=a.map(O=>_d(O,m)).filter(O=>O!==null&&j.has(O)),_=new Set(E);w.filter(O=>_.has(O)).every((O,A)=>O===E[A])?u(e,t,{kind:"order"}):c(e,t,{kind:"order"})}}}async function z9(e,t,r){const a=await e(`/properties/${t}/poi/search`,{method:"POST",json:{query:r}});return Array.isArray(a==null?void 0:a.results)?a.results:[]}async function Qj(e,t,r){return e(`/properties/${t}/poi/${encodeURIComponent(r)}`)}async function $9(e,t,r){if(r.length===0)return{};const a=await e(`/properties/${t}/poi/photo-urls`,{method:"POST",json:{place_ids:r}});return(a==null?void 0:a.urls)??{}}function Xj(e){if(e==null||!Number.isFinite(e))return null;const t=e/1609.344;return t<.1?"< 0.1 mi":`${t.toFixed(1)} mi`}const jd=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ss=e=>typeof e=="string"&&e!==""?e:void 0;function U9(e){const t={},r=jd(e.rating);r!==void 0&&(t.rating=r);const a=jd(e.review_count);a!==void 0&&(t.review_count=a);const l=Ss(e.type_label);l!==void 0&&(t.type_label=l);const c=Ss(e.price_level);c!==void 0&&(t.price_level=c);const u=Ss(e.website_uri);u!==void 0&&(t.website_uri=u);const m=Ss(e.google_maps_uri);m!==void 0&&(t.google_maps_uri=m);const p=Ss(e.summary);p!==void 0&&(t.summary=p);const g=I9(e.photo);return g!==void 0&&(t.photo=g),t}function I9(e){if(!e||typeof e!="object")return;const t=e,r=jd(t.width),a=jd(t.height),l=t.attribution;if(!(r===void 0||a===void 0||typeof l!="string"))return{width:r,height:a,attribution:l}}function sb(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||typeof t.place_id!="string"||typeof t.name!="string"||typeof t.lat!="number"||typeof t.lng!="number"?null:{id:t.id,place_id:t.place_id,name:t.name,address:typeof t.address=="string"?t.address:null,lat:t.lat,lng:t.lng,distance_m:typeof t.distance_m=="number"?t.distance_m:null,...U9(t)}}function H9(e){return e.map(sb).filter(t=>t!==null)}function B9(e){return[e.rating===void 0?null:`★ ${e.rating.toFixed(1)}${e.review_count===void 0?"":` (${e.review_count.toLocaleString()})`}`,e.type_label,Xj(e.distance_m),e.address].filter(Boolean).join(" · ")}const cb="group/row relative flex min-h-10.5 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-1.75 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",ub="grid w-5 flex-shrink-0 place-items-center text-ink-4",db="flex min-w-0 flex-1 flex-col gap-px",fb="truncate text-[length:calc(13.5*var(--content))] text-ink",hb="truncate text-caption text-ink-3",q9="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",Zj="text-caption text-danger",Wj="opacity-70",Jj="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",F9="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",P9="we-no-drag flex flex-shrink-0 items-center gap-0.75",V9="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",G9="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",K9=()=>d.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",className:"w-[calc(14*var(--content))] h-[calc(14*var(--content))]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14Z"}),d.jsx("circle",{cx:"8",cy:"6.4",r:"1.7"})]});function eO(e,t){const{apiFetch:r}=Wt().api,[a,l]=x.useState({}),c=t.filter(m=>m.photo).map(m=>m.place_id).sort().join(","),u=x.useRef(new Set);return x.useEffect(()=>{const p=(c===""?[]:c.split(",")).filter(g=>!u.current.has(g));p.length!==0&&(p.forEach(g=>u.current.add(g)),$9(r,e,p).then(g=>{l(b=>({...b,...g}))}).catch(()=>{p.forEach(g=>u.current.delete(g))}))},[c,e,r]),{urls:a,dropUrl:m=>l(p=>{if(!(m in p))return p;const g={...p};return delete g[m],g})}}function tO({row:e,photoUrl:t,onPhotoError:r,onRemove:a,dragProps:l,flashNew:c}){const u=B9(e);return d.jsxs("div",{...l,className:ie(cb,l&&"cursor-grab hover:border-[#d9d5c9]",c&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[t?d.jsx("img",{className:F9,src:t,alt:"",draggable:!1,onError:r}):d.jsx("span",{className:ub,children:d.jsx(K9,{})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:e.name}),u&&d.jsx("span",{className:hb,children:u})]}),a&&d.jsx("div",{className:P9,children:d.jsx("span",{className:V9,children:d.jsx("button",{type:"button",className:ie(G9,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:a,children:d.jsx(Lt.trash,{})})})})]})}const Y9="relative flex flex-col",Q9="flex min-w-0 items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",X9="grid flex-shrink-0 place-items-center text-ink-4",Z9="min-w-0 flex-1 appearance-none border-0 bg-transparent py-2.25 text-[length:calc(13.5*var(--content))] text-ink placeholder:text-ink-4",W9="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",J9="fixed flex flex-col overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",eI="m-0 min-h-0 list-none overflow-y-auto p-1",tI={maxHeight:264,gap:4},nI=ie(vt,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),iI="bg-accent-soft",rI="cursor-default opacity-55",aI="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",oI="truncate text-caption text-ink-3",Xm="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",lI="inline-flex flex-shrink-0 items-center gap-1 text-good",sI=2,cI=300;function nO({propertyId:e,placeholder:t,addedIds:r,disabled:a=!1,disabledHint:l,onSelect:c}){const{apiFetch:u}=Wt().api,[m,p]=x.useState(""),[g,b]=x.useState([]),[v,k]=x.useState("idle"),[w,j]=x.useState(0),[E,_]=x.useState(0),C=x.useRef(0),O=x.useId(),A=x.useRef(null),D=x.useRef(null);x.useEffect(()=>{const H=m.trim();if(H.length<sI){++C.current,k("idle"),b([]);return}const ne=++C.current;k("loading");const Y=setTimeout(()=>{z9(u,e,H).then(oe=>{ne===C.current&&(b(oe),j(0),k(oe.length?"results":"empty"))}).catch(()=>{ne===C.current&&k("error")})},cI);return()=>clearTimeout(Y)},[m,e,E,u]);function R(H){r.has(H.place_id)||(c(H),p(""),b([]),k("idle"))}function P(H){if(H.key==="Escape"){k("idle"),b([]);return}if(v==="results"){if(H.key==="ArrowDown")H.preventDefault(),j(ne=>Math.min(g.length-1,ne+1));else if(H.key==="ArrowUp")H.preventDefault(),j(ne=>Math.max(0,ne-1));else if(H.key==="Enter"){H.preventDefault();const ne=g[w];ne&&R(ne)}}}const L=v!=="idle",T=FC(L,A,tI);return d.jsxs("div",{className:Y9,onBlur:H=>{var Y;const ne=H.relatedTarget;!H.currentTarget.contains(ne)&&!((Y=D.current)!=null&&Y.contains(ne))&&k("idle")},children:[d.jsxs("div",{ref:A,className:ie(Q9,a&&"opacity-55"),role:"combobox","aria-expanded":L,"aria-haspopup":"listbox","aria-controls":O,children:[d.jsx("span",{className:X9,children:d.jsx(Lt.search,{})}),d.jsx("input",{className:Z9,value:m,placeholder:t,disabled:a,title:a?l:void 0,onChange:H=>p(H.target.value),onKeyDown:P,"aria-label":t,"aria-autocomplete":"list","aria-activedescendant":v==="results"?`${O}-${w}`:void 0}),v==="loading"&&d.jsx("span",{className:W9})]}),L&&T&&Zi.createPortal(d.jsxs("div",{ref:D,className:J9,style:{left:T.left,top:T.top,bottom:T.bottom,width:T.width,maxHeight:T.maxHeight,zIndex:Br},onMouseDown:H=>H.preventDefault(),children:[v==="loading"&&d.jsx("div",{className:Xm,children:"Searching…"}),v==="empty"&&d.jsxs("div",{className:Xm,children:["No places found for “",m.trim(),"”."]}),v==="error"&&d.jsxs("div",{className:Xm,children:["Couldn't reach search."," ",d.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>_(H=>H+1),children:"Retry"})]}),v==="results"&&d.jsx("ul",{className:eI,role:"listbox",id:O,children:g.map((H,ne)=>{const Y=r.has(H.place_id),oe=[Xj(H.distance_m),H.address].filter(Boolean).join(" · ");return d.jsx("li",{id:`${O}-${ne}`,role:"option","aria-selected":ne===w,children:d.jsxs("button",{type:"button",disabled:Y,className:ie(nI,ne===w&&!Y&&iI,Y&&rI),onMouseEnter:()=>j(ne),onClick:()=>R(H),children:[d.jsxs("span",{className:aI,children:[Y&&d.jsxs("span",{className:lI,children:[d.jsx(Lt.check,{size:12})," Added ·"]}),d.jsx("span",{className:"truncate",children:H.name})]}),oe&&d.jsx("span",{className:oI,children:oe})]})},H.place_id)})})]}),document.body)]})}const uI="flex flex-col gap-2.75",dI="relative flex flex-col gap-1.75",fI=400;function hI({slot:e,fixed:t,value:r,propertyId:a,commit:l}){const{apiFetch:c}=Wt().api,u=x.useMemo(()=>H9(r),[r]),[m,p]=x.useState(null),[g,b]=x.useState(null),[v,k]=x.useState({}),w=x.useRef({});x.useEffect(()=>()=>{Object.values(w.current).forEach(clearTimeout)},[]);const j=Jr({items:u,identityOf:L=>L.id,fixed:t,axis:"y",commit:l}),{rows:E}=j,{urls:_,dropUrl:C}=eO(a,u);function O(L){k(T=>({...T,[L]:!0})),clearTimeout(w.current[L]),w.current[L]=setTimeout(()=>k(T=>{const H={...T};return delete H[L],H}),fI)}async function A(L){if(p(null),!!j.canAdd&&!j.latestRows().some(T=>T.value.place_id===L.place_id)){b(L);try{let T;try{T=await Qj(c,a,L.place_id)}catch{p("Couldn't add that place. Try again.");return}if(j.latestRows().some(H=>H.value.place_id===T.place_id))return;j.add(T),O(T.id)}finally{b(null)}}}const{containerRef:D,getItemProps:R}=j.drag,P=new Set(E.map(L=>L.value.place_id));return d.jsxs("div",{className:uI,role:"group","aria-label":e.label,children:[d.jsx(nO,{propertyId:a,placeholder:e.placeholder??"Search nearby…",addedIds:P,disabled:!j.canAdd,disabledHint:"Set by its source",onSelect:L=>void A(L)}),m&&d.jsx("span",{className:Zj,children:m}),(E.length>0||g)&&d.jsxs("div",{className:dI,ref:D,children:[g&&d.jsxs("div",{className:ie(cb,Wj),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:Jj})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:g.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}),E.map(L=>d.jsx(tO,{row:L.value,photoUrl:_[L.value.place_id],onPhotoError:()=>C(L.value.place_id),onRemove:j.canRemove?()=>j.remove(L.key):void 0,dragProps:R(L.key),flashNew:v[L.value.id]===!0},L.key))]})]})}const mI={property:"this property's",library:"your"},pI={property:Xr.pages,library:yl.pages};function Es(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function _k(e){return Bg({from:e.from??[]}).filter(t=>t!=="")}function gI(e){var a;const t=Es(e.source);if(Mg(t)!==null)return[String(t==null?void 0:t.key)];const r=Es(e.element);if(r===null)return[];if(r.type==="row"||r.type==="media"||typeof r.type=="string"&&pl(r.type))return _k(r);for(const l of Object.values(Es(r.fields)??{})){const c=Es(l);if(c!==null&&((a=Es(c.source))==null?void 0:a.kind)==="element")return _k(c)}return[]}function yI(e){const t=e.indexOf("."),r=e.slice(0,t);if(r!=="property"&&r!=="library")return null;const a=pI[r],l=e.slice(t+1),c=Object.hasOwn(a,l)?a[l]:null;return c!==null&&X4(c)&&c.declaration.type==="list"?{home:r,label:l3(c)}:null}function iO(e){const t=[...new Set(gI(e))],r=t.length===1?yI(t[0]):null;return r===null?null:`From ${mI[r.home]} ${Zr(r.label).plural}`}function rO(e,t){return`${e}.${t}`}function wc(e){const t=e.indexOf(".");return t<=0||t===e.length-1||e.includes(".",t+1)?null:{object:e.slice(0,t),field:e.slice(t+1)}}function nd(e,t){const r=wc(t);if(r===null)return e[t];const a=e[r.object];return a!==null&&typeof a=="object"&&!Array.isArray(a)?a[r.field]:void 0}function bI(e,t,r){const a=wc(t);if(a===null)return{...e,[t]:r};const l=e[a.object],c=l!==null&&typeof l=="object"&&!Array.isArray(l)?l:{};return{...e,[a.object]:{...c,[a.field]:r}}}function vI(e,t,r,a){var l,c,u;return((u=(c=(l=e==null?void 0:e.items)==null?void 0:l[t])==null?void 0:c[r])==null?void 0:u[a])===!0}function xI(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}const aO=e=>{var t;return(t=xI(e))==null?void 0:t.source};function wI(e,t){return Object.entries(e).flatMap(([r,a])=>{const l=fc(aO(a));return l!==null&&l.slot===t?[{key:r,member:l.field}]:[]})}function kI(e,t){var l;const r=fc(aO(e));if(r===null)return!1;const a=t.fields===void 0?{}:{siblings:t.fields};return((l=xS(t.slots??{},a,r.slot))==null?void 0:l.def.type)==="address"}function fl(e){var t;return((t=e.source)==null?void 0:t.kind)==="element"}function oO(e){return e.type==="row"}function lO(e,t,r){const a={};for(const l of wI(Object.fromEntries(e),t))Object.hasOwn(r,l.member)&&(a[l.key]=r[l.member]);return a}function mb(e,t,r,a){const l=Io(e);for(const[c,u]of e)fl(u)&&(l[c]=r,a&&Object.assign(l,lO(e,c,a)));return l[t]=r,l}function sO(e,t,r){var c;const a=(c=t.find(([,u])=>oO(u)&&fl(u)))==null?void 0:c[0],l=a!==void 0?e[a]:void 0;return typeof l=="string"&&l!==""?l:_d(e,r)}function Od(e,t,r){return e.flatMap(a=>sO(a,t,r)??[])}function SI(e,t){return e.map(r=>{const a=t.get(r);return a===void 0?{id:r}:{id:r,members:a}})}function cO(e,t,r,a,l,c){return El(e,SI(a,l),u=>sO(u,t,r),u=>mb(t,r,u.id,u.members),c)}function EI(e,t,r,a,l){const c=e.map((m,p)=>({key:String(p),value:m}));return cO(c,t,r,a,l,m=>({key:"",value:m})).map(m=>m.value)}function _I(e){const t=e.split(/\s+/).filter(a=>/[\p{L}\p{N}]/u.test(a));return(t.length>1?[t[0][0],t[t.length-1][0]]:[...(t[0]??"").slice(0,2)]).join("").toUpperCase()}const jI="flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))]",OI={bar:"size-[calc(32*var(--content))] rounded-[calc(7*var(--content))] text-[length:calc(12*var(--content))]",cell:"size-[calc(22*var(--content))] rounded-[calc(5*var(--content))] text-[length:calc(9.5*var(--content))]"},uO={bar:"text-[length:calc(15*var(--content))]",cell:"text-[length:calc(12.5*var(--content))]"},AI={bar:"text-[length:calc(13.5*var(--content))]",cell:"text-[length:calc(12*var(--content))]"};function Zm({face:e,imageUrl:t,size:r="bar"}){return d.jsxs("span",{className:jI,"data-row-face":"",children:[e.image!==null&&d.jsx("span",{className:ie("relative grid shrink-0 place-items-center overflow-hidden bg-line-soft font-semibold text-ink-3",OI[r]),"data-row-face-thumb":"",children:t?d.jsx("img",{src:t,alt:"",className:"absolute inset-0 size-full object-cover object-top"}):_I(e.title)}),d.jsxs("span",{className:"flex min-w-0 items-baseline gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:ie("min-w-0 shrink truncate font-medium text-ink",uO[r]),children:e.title}),e.supporting!==null&&d.jsx("span",{className:ie("min-w-0 shrink-[2] truncate text-ink-3",AI[r]),children:e.supporting})]})]})}function Wm({children:e,size:t="bar"}){return d.jsx("span",{className:ie("min-w-0 flex-1 truncate text-ink-4",uO[t]),children:e})}const NI="flex w-full items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white py-[calc(7*var(--content))] pl-[calc(10*var(--content))] pr-[calc(7*var(--content))] text-ink",jk={contacts:"Contact",units:"Unit",comparables:"Comparable",commercial_spaces:"Commercial space"};function Ks(e){return typeof e=="string"&&e!==""?e:null}function MI(e){const t=e==null?void 0:e.fieldKey;return e===void 0||t===void 0?[]:(e.siblingRecords??[]).flatMap((r,a)=>{if(a===e.itemIndex)return[];const l=Ks(r[t]);return l===null?[]:[l]})}function CI({slot:e,value:t,onChange:r,onRowPick:a,recordContext:l,...c}){var j;const{TablePicker:u}=Wt(),[m,p]=x.useState(null),g=c.rowTable??uf(e),b=g.kind==="table"&&g.inert!==!0?g.tables:null,v=!fl(e),k=(E,_)=>{E!==t&&(a?a(E,_):r(E))},w=VS(e.label);return d.jsxs("div",{className:Va,role:"group","aria-label":e.label,children:[d.jsxs("div",{className:NI,children:[d.jsx(pb,{rowTable:g,value:t}),b!==null&&u!==void 0&&d.jsxs("span",{className:rj,children:[t!==null&&!rf(t)&&d.jsx(dO,{label:`Edit ${w}`,onClick:()=>p("record")}),v&&d.jsx(RI,{label:((j=Fy(e).choose)==null?void 0:j.label)??Vs("Choose",w),onClick:()=>p("pick")}),v&&t!==null&&d.jsx(nf,{icon:vl,label:`Remove ${w}`,title:"Remove",tone:"remove",onClick:()=>k(null,{})})]})]}),m==="record"&&t!==null&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"record",tables:b,rowId:t,onClose:()=>p(null)}),m==="pick"&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"single",tables:b,selectedId:t,disabledIds:MI(l),onPick:k,onClose:()=>p(null)})]})}function dO({label:e,onClick:t}){return d.jsx(nf,{icon:py,label:e,title:"Edit",onClick:t})}function RI({label:e,onClick:t}){return d.jsx(nf,{icon:Q_.Choose,label:e,title:"Choose",onClick:t})}function pb({rowTable:e,value:t,size:r="bar"}){const{TableRowSummary:a}=Wt();switch(e.kind){case"table":{if(rf(t))return d.jsx(Zm,{face:{title:`New ${jk[e.tables[0]].toLowerCase()}`,supporting:null,image:null},size:r});if(a)return d.jsx("span",{className:"flex min-w-0 flex-1",children:d.jsx(a,{tables:e.tables,rowId:t,size:r})});const l=jk[e.tables[0]];return t===null?d.jsxs(Wm,{size:r,children:["No ",l.toLowerCase()," chosen"]}):d.jsx(Zm,{face:{title:l,supporting:null,image:null},size:r})}case"content":return t===null?d.jsx(Wm,{size:r,children:"None"}):d.jsx(Zm,{face:{title:e.labelOf(t)??"Untitled",supporting:null,image:null},size:r});case"none":return d.jsx(Wm,{size:r,children:"Set automatically"})}}const TI={model:{defaultValue:null,coerce:Ks,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:CI},applyOptimistic:null};function DI(e){var t,r,a,l;switch(PS(e,Fj)){case"media":return((t=e.element)==null?void 0:t.type)==="media"?Fm:((r=e.element)==null?void 0:r.type)==="video"?u6:((a=e.element)==null?void 0:a.type)==="tour"?yy:((l=e.element)==null?void 0:l.type)==="document"?Fm:qp;case"upload":return Fm;case"poi":return I6;case"annotated-media":return qp;case"object":case"row":return GD;case"scalar":return FE}}function df(e){switch(e.type){case"text":return AL;case"url":return my;case"image":case"media":return Pd;case"video":return vy;case"tour":return yy;case"poi":return PE;case"address":return z6;case"document":return Fd;case"select":return K6;case"list":return DI(e);default:return cy}}function fO(e){const t=new Set(e.map(df));return t.size===1?[...t][0]:cy}const LI="relative flex flex-col gap-2",zI={large:"gap-3",compact:"gap-2"},$I="group/li flex touch-none items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.75 transition-[border-color,box-shadow] duration-[120ms] hover:border-line-strong focus-within:border-accent",UI={field:"cursor-text",bar:"cursor-grab pr-2"},II=ie(vt,"we-no-drag grid size-5.5 flex-shrink-0 place-items-center rounded-[calc(5*var(--content))] text-ink-3 transition-[background,color] duration-[120ms] hover:bg-[#FBE6E2] hover:text-[#8E2C1E]");function HI(e){const t=e.currentTarget.control;if(!t||e.target===t||e.target.closest("button")||(e.preventDefault(),t.focus(),!(t instanceof HTMLInputElement)))return;const a=e.clientX<t.getBoundingClientRect().left?0:t.value.length;t.setSelectionRange(a,a)}function gb({engine:e,itemKind:t="field",label:r,add:a,choose:l,size:c,renderControl:u,renderActions:m,onAdd:p,renderAdd:g,addUnbound:b=!1,empty:v}){const{rows:k,drag:w}=e,{containerRef:j,getItemProps:E}=w,_=g==null?void 0:g(e.add),C=k.length===0&&v!==void 0&&_==null;return d.jsx("div",{className:Va,role:"group","aria-label":r,children:d.jsxs("div",{className:ie("flex flex-col",zI[c]),children:[e.canAdd&&d.jsx(mc,{size:c,add:a,onAdd:b?null:()=>p(e.add),choose:l}),C&&v,_,k.length>0&&d.jsx("div",{className:LI,ref:j,children:k.map(O=>d.jsxs("label",{htmlFor:O.key,onClick:HI,...E(O.key),className:ie($I,UI[t]),children:[d.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2",children:d.jsx(Lt.grip,{})}),u({id:O.key,value:O.value,onChange:A=>e.setValue(O.key,A)}),t==="bar"&&d.jsxs("span",{className:rj,children:[m==null?void 0:m({id:O.key,value:O.value}),e.canRemove&&d.jsx(nf,{icon:vl,label:`Remove ${Zr(r).singular}`,title:"Remove",tone:"remove",onClick:()=>e.remove(O.key)})]}),e.canRemove&&t==="field"&&d.jsx("button",{type:"button",className:II,title:"Remove",onClick:()=>e.remove(O.key),children:d.jsx(Lt.trash,{})})]},O.key))})]})})}function BI({engine:e,label:t,add:r,placeholder:a="List item",maxLength:l,size:c}){return d.jsx(gb,{engine:e,label:t,add:r,size:c,renderControl:({id:u,value:m,onChange:p})=>d.jsx(YL,{id:u,value:m,onChange:p,placeholder:a,ariaLabel:a,maxLength:l,className:ie("cursor-[inherit]",QE)}),onAdd:u=>u("")})}const qI="flex min-w-0 flex-1 cursor-[inherit] items-center gap-2.5 py-[calc(7*var(--content))] pl-[calc(2*var(--content))] text-ink",FI="relative h-[calc(280*var(--frame))]",PI=5,VI=ie("flex items-center gap-2 rounded-[calc(8*var(--content))] px-2.75 py-[calc(7*var(--content))] pr-2",ky),GI=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",An),Ok=["w-[28%]","w-[22%]","w-[34%]"];function KI({position:e}){return d.jsxs("div",{className:VI,children:[d.jsx("span",{className:"grid w-3.5 shrink-0 place-items-center",children:d.jsx("span",{className:ie("block h-[calc(14*var(--content))] w-[calc(6*var(--content))] rounded-full",An)})}),d.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))] pl-[calc(2*var(--content))]",children:[d.jsx("span",{className:ie("block size-[calc(32*var(--content))] shrink-0 rounded-[calc(7*var(--content))]",An)}),d.jsx("span",{className:ie("block h-[calc(10*var(--content))] rounded-full",An,Ok[e%Ok.length])}),d.jsx("span",{className:ie("block h-[calc(8*var(--content))] w-[16%] rounded-full",An)})]}),[0,1].map(t=>d.jsx("span",{className:"grid h-[calc(36*var(--content))] w-[calc(36*var(--content))] shrink-0 place-items-center",children:d.jsx("span",{className:GI})},t))]})}function YI(e){return Ks(typeof e=="object"&&e!==null?e.id:e)}function QI({slot:e,face:t,rowTable:r,verbs:a,fixed:l,value:c,commit:u}){const{TablePicker:m,TableCreate:p}=Wt(),g=Jr({items:c.map(YI),fixed:l,axis:"y",commit:u}),[b,v]=x.useState(!1),[k,w]=x.useState(!1),[j,E]=x.useState(null),_=r.kind==="table"&&r.inert!==!0?r.tables:null,C=_!==null?m:void 0,O=_!==null?p:void 0,A=Zr(e.label).singular,D=()=>v(!0),R=C!==void 0&&a.choose!==null?{choose:a.choose,onChoose:D}:void 0,P=a.add,L=()=>w(!0),T=O!==void 0,H=g.rows.flatMap(Y=>Y.value!==null?[Y.value]:[]),ne=t==="expanded"&&g.rows.length===0?iO(e):null;return d.jsxs(d.Fragment,{children:[d.jsx(gb,{engine:g,itemKind:"bar",label:e.label,add:P,...R!==void 0?{choose:R}:{},size:t==="expanded"?"large":"compact",addUnbound:!T,onAdd:L,...t==="expanded"?{empty:d.jsxs("div",{className:FI,children:[d.jsx(hc,{className:"flex flex-col gap-2",children:Array.from({length:PI},(Y,oe)=>d.jsx(KI,{position:oe},oe))}),d.jsx(yd,{icon:Dr.createElement(df(e),{size:25,strokeWidth:1.8}),headline:P.empty,...ne!==null?{line:ne}:{}})]})}:{},renderControl:({id:Y,value:oe})=>d.jsx("div",{id:Y,className:qI,children:d.jsx(pb,{rowTable:r,value:oe})}),renderActions:({value:Y})=>C!==void 0&&Y!==null&&d.jsx(dO,{label:`Edit ${A}`,onClick:()=>E(Y)})}),j!==null&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"record",tables:_,rowId:j,onClose:()=>E(null)}),k&&O!==void 0&&_!==null&&d.jsx(O,{tables:_,onCreated:Y=>{w(!1),g.rows.some(oe=>oe.value===Y)||g.add(Y)},onClose:()=>w(!1)}),b&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"multi",tables:_,selectedIds:H,onChange:Y=>g.replace(El(g.rows,Y.map(oe=>({id:oe})),oe=>oe,oe=>oe.id,g.mint)),onClose:()=>v(!1)})]})}const XI=12;function ZI(e,t,r,a){if(e.top>=a&&e.bottom<=t-a)return null;const c=Math.max(0,r+e.top-a);return Math.abs(c-r)<1?null:c}function WI({icon:e,title:t,subtitle:r,showGrip:a=!1,open:l}){return d.jsxs(d.Fragment,{children:[a?d.jsx("span",{"aria-hidden":"true",className:"-mr-1 flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 active:cursor-grabbing",children:d.jsx(si,{name:"grip",size:14,stroke:1.8})}):null,d.jsx("span",{className:"grid size-6.5 flex-shrink-0 place-items-center rounded-md bg-accent-soft text-accent-ink","aria-hidden":"true",children:e}),r?d.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-px",children:[d.jsx("span",{className:"truncate text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3 [font-variant-numeric:tabular-nums]",children:r})]}):d.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx(JI,{open:l})]})}function JI({open:e}){return d.jsx("span",{"data-acc-open":e,className:"grid flex-shrink-0 place-items-center text-ink-3 transition-transform duration-150 ease-[ease] data-[acc-open=true]:rotate-180","aria-hidden":"true",children:d.jsx(si,{name:"chevDown",size:14,stroke:1.8})})}const _s=new WeakSet;function hO({open:e,onToggle:t,icon:r,title:a,subtitle:l,scrollKey:c,dragId:u,dragHandleProps:m,children:p}){const g=x.useRef(null);return x.useEffect(()=>{if(!e)return;const b=g.current,v=b==null?void 0:b.closest(".hp-sb-scroll");if(!b||!v||Array.from(b.querySelectorAll(".we-acc")).some(C=>_s.has(C)))return;_s.add(b);const k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=()=>{_s.delete(b);const C=b.getBoundingClientRect(),O=v.getBoundingClientRect(),A=ZI({top:C.top-O.top,bottom:C.bottom-O.top,height:C.height},v.clientHeight,v.scrollTop,XI);A!=null&&v.scrollTo({top:A,behavior:k?"auto":"smooth"})};if(k){const C=requestAnimationFrame(w);return()=>{cancelAnimationFrame(C),_s.delete(b)}}const j=new AbortController,E=()=>{j.abort(),window.clearTimeout(_),w()};b.addEventListener("transitionend",C=>{C.propertyName==="grid-template-rows"&&C.target instanceof Node&&C.target.parentNode===b&&E()},{signal:j.signal});const _=window.setTimeout(E,280);return()=>{j.abort(),window.clearTimeout(_),_s.delete(b)}},[e,c]),d.jsxs("div",{ref:g,"data-open":e,"data-dragid":u,className:ie("we-acc flex-shrink-0 overflow-hidden rounded border border-line bg-canvas","origin-center [transform:scale(var(--gx,1),var(--gy,1))] [will-change:transform]","[transition:transform_.18s_cubic-bezier(.34,1.56,.64,1),box-shadow_.18s_ease,border-color_.16s_ease]","has-[>.we-acc-head:hover]:shadow-[0_4px_14px_-6px_rgba(20,24,15,0.18)]","has-[>.we-acc-head:active]:[transition-duration:.08s]","motion-reduce:[transform:none] motion-reduce:[transition:box-shadow_.18s_ease,border-color_.16s_ease]"),children:[d.jsx("button",{type:"button",className:ie("we-acc-head flex w-full cursor-pointer appearance-none items-center gap-2.5 border-0 bg-transparent pr-3.5 py-3 text-left outline-none",m?"pl-2":"pl-3.5",m&&"touch-none"),onClick:t,onPointerDown:m==null?void 0:m.onPointerDown,"aria-expanded":e,children:d.jsx(WI,{icon:r,title:a,subtitle:l,showGrip:m!=null,open:e})}),d.jsx("div",{"data-acc-open":e,className:"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out data-[acc-open=true]:grid-rows-[1fr] motion-reduce:transition-none",inert:!e,children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{"data-acc-open":e,className:"bg-white px-3.5 pb-4 pt-2 opacity-0 transition-opacity duration-200 ease-out data-[acc-open=true]:opacity-100 motion-reduce:transition-none",children:p})})})]})}function Ak(e){return qS(e)}function eH(e){const t=[];for(let r=0;r<e.length;r++){const a=e[r+1];Ak(e[r])&&a!==void 0&&Ak(a)?(t.push({kind:"pair",indices:[r,r+1]}),r++):t.push({kind:"single",index:r})}return t}function tH({items:e,rows:t}){const r=a=>a&&d.jsxs("div",{className:`${Va} min-w-0`,...a.attrs,children:[a.label!==null?d.jsx(KL,{children:a.label}):null,a.node]},a.key);return d.jsx("div",{className:HL,children:t.map(a=>a.kind==="pair"?d.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[r(e[a.indices[0]]),r(e[a.indices[1]])]},`p${a.indices[0]}`):d.jsx("div",{children:r(e[a.index])},`s${a.index}`))})}const nH='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Ad="data-field-name",yb="data-field-scope";function iH(e,t){var a;const r=(a=e.parentElement)==null?void 0:a.closest(`[${yb}]`);return r==null||r===t||!t.contains(r)}function mO(e,t){var a;const r=Array.from(e.querySelectorAll(`[${Ad}]`)).find(l=>l.getAttribute(Ad)===t&&iH(l,e));r&&(r.scrollIntoView({block:"nearest"}),(a=r.querySelector(nH))==null||a.focus({preventScroll:!0}))}function rH(e){const t={fields:Object.fromEntries(e)};return e.filter(([,r])=>Md(r,t)&&!KC(r))}const aH="data-object-fields";function bb({fields:e,lone:t=!1,reveal:r,renderField:a}){const l=Ry(),c=rH(e),u=x.useRef(null);return x.useEffect(()=>{if(!r)return;const m=requestAnimationFrame(()=>{u.current&&mO(u.current,r)});return()=>cancelAnimationFrame(m)},[r]),d.jsx("div",{ref:u,[aH]:l,[yb]:"",children:d.jsx(tH,{rows:eH(c.map(([,m])=>m)),items:c.map(([m,p])=>({key:m,label:t?null:p.label||m,attrs:{[Ad]:m},node:a(m,p)}))})})}function kc({slot:e,instanceId:t,slotId:r,value:a,propertyId:l,onChange:c,required:u,overridden:m,selectedItemIndex:p,selectedFieldName:g,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O}){const A=Ry(),D=JL(e.type==="list"?void 0:O),R=Ol(e.type);if(!R)return null;const P=Kz(A),L=R.faces[P];if(!L)return null;const T=R.model.coerce(a),H=d.jsx(L,{slot:e,instanceId:t,slotId:r,value:T,onChange:c,required:u,propertyId:l,selectedItemIndex:p,selectedFieldName:g,overridden:m,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O});return D===null?H:d.jsxs("div",{className:"flex flex-col gap-[calc(6*var(--content))]",children:[H,d.jsx(e8,{mark:D})]})}const oH=ie(vt,"inline-flex items-center gap-1.75 self-start h-9 px-3 rounded-lg text-body font-medium text-danger transition-[background,color] duration-[120ms] hover:bg-danger/15 focus-visible:bg-danger/15 focus-visible:ring-2 focus-visible:ring-danger/25"),lH="relative flex flex-col gap-3";function sH(e,t){return fl(e)?t:uf(e)}function cH({slot:e,entries:t,fixed:r,instanceId:a,slotId:l,value:c,commit:u,membership:m,verbs:p,selectedItemIndex:g,selectedFieldName:b,itemBaseline:v,rowTable:k,insideRecord:w=!1,factPath:j}){var Jt;const{TablePicker:E,TableCreate:_}=Wt(),C=fO(t.map(([,we])=>we)),O=Uo(we=>we.session.property_id),A=Uo(we=>we.select),D=Uo(we=>{var ze,Ge;return(Ge=(ze=we.content_doc)==null?void 0:ze.instances.find(rt=>rt.instance_id===a))==null?void 0:Ge.slot_overrides}),R=m.kind==="table"?m.table:null,P=Yj({instanceId:a,slotId:l,membership:m,itemBaseline:v,insideRecord:w}),{identityKey:L}=P,T=Fr(e)??{fields:Object.fromEntries(t)},H=Vg(Zr(e.label).singular),{add:ne}=p,Y=(we,ze)=>sf(dl(T,`${H} ${ze+1}`),T,we),oe=dl(T,""),K=oe.kind==="field"?oe.field:void 0,[X,le]=x.useState(!1),[M,V]=x.useState(!1),[te,pe]=x.useState(null);function Q(we){A({kind:"slot",instance_id:a,slot_id:l,item_index:we})}const N=x.useRef(null),q=Jr({items:c,identityOf:P.identityOf,fixed:r,axis:"y",commit:(we,ze)=>{P.markOrder(we),u(P.stamp(we),ze)},onCommitted:(we,ze)=>{const Ge=N.current;if(w||ze!=="reorder"&&ze!=="replace"||Ge==null)return;const rt=we.findIndex(tt=>tt.key===Ge);rt<0?A({kind:"slot",instance_id:a,slot_id:l}):(ze==="reorder"||rt!==q.indexOf(Ge))&&Q(rt)}}),{rows:I}=q,F=w?te:g!=null?q.keyAt(g):null,ae=F!=null?q.indexOf(F):-1;x.useEffect(()=>{N.current=F},[F]);function ce(we){if(w){pe(we);return}const ze=q.indexOf(we);ze<0||Q(ze)}function he(){w?pe(null):A({kind:"slot",instance_id:a,slot_id:l})}function be(we){F===we?he():ce(we)}const $=m.kind==="pick-row"||m.kind==="table"?lb(m):null,de=q.canAdd&&(m.kind!=="pick-row"||_!==void 0),ge=p.choose!==null&&q.canAdd&&($!==null&&E!==void 0||m.kind==="pick-media"),_e=(Jt=t.find(([,we])=>fl(we)))==null?void 0:Jt[0];function Re(we){const ze=q.mint(we);q.insert(ze),w?pe(ze.key):Q(0)}function De(){ge&&le(!0)}function xe(){if(de){if(m.kind==="pick-row"){V(!0);return}if(m.kind==="pick-media"){le(!0);return}Re(R?{...Io(t),[L]:oj()}:Io(t))}}function $e(we,ze){q.replace(cO(I,t,L,we,ze,q.mint))}function yt(we,ze){const Ge=Io(t);for(const[rt,tt]of t)fl(tt)&&(Ge[rt]=tt.type==="image"?By(we,{file:"",url:"",alt:""},ze,ZS(tt.crop),m.kind==="pick-media"?m.filter.from:void 0):{file:we.file,url:sl(we),alt:""});return Ge}function Ee(we){var Ge;const ze=_e===void 0||(Ge=we[_e])==null?void 0:Ge.file;return typeof ze=="string"&&ze!==""?ze:null}function Mt(we,ze){const Ge=El(I,we,Ee,tt=>yt(tt,ze),q.mint),rt=new Set(Ge.map(tt=>tt.key));for(const tt of I)rt.has(tt.key)||P.markRemoved(tt);q.replace(Ge)}function ut(we){if(!q.canRemove)return;const ze=I.find(rt=>rt.key===we);ze&&P.markRemoved(ze);const Ge=q.indexOf(we);q.remove(we),F===we?he():!w&&ae>=0&&Ge>=0&&Ge<ae&&Q(ae-1)}function ni(we,ze,Ge={}){const rt=I.find(tt=>tt.key===we);rt!=null&&(P.markFields(rt,ze),q.setValue(we,{...rt.value,...Ge,...ze}))}function ui(we,ze,Ge,rt){const tt=I.find(Ot=>Ot.key===we);if(tt==null)return;const Xe=P.markerIdentity(tt),ot=Ge===null?{}:lO(t,ze,rt);if(Xe!==null)for(const Ot of Object.keys(ot))vI(D,l,Xe,Ot)&&delete ot[Ot];ni(we,{[ze]:Ge},ot)}const{containerRef:Si,getItemProps:Ut,draggingKey:ii}=q.drag,sn=ge&&p.choose!==null?{choose:p.choose,onChoose:De}:void 0;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(mc,{size:"compact",add:ne,onAdd:de?xe:null,choose:sn}),I.length>0&&d.jsx("div",{ref:Si,className:lH,children:I.map((we,ze)=>{const Ge=Y(we.value,ze),rt=F===we.key;return d.jsx("div",{children:d.jsx(hO,{open:ii==null&&rt,onToggle:()=>be(we.key),icon:d.jsx(C,{size:14}),title:Ge,scrollKey:we.key,dragId:we.key,dragHandleProps:{onPointerDown:Ut(we.key).onPointerDown},children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(bb,{fields:t,reveal:!w&&rt?b:void 0,renderField:(tt,Xe)=>d.jsx(kc,{slot:Xe,instanceId:a,slotId:l,value:we.value[tt],propertyId:O,onChange:ot=>ni(we.key,{[tt]:ot}),...WE(Xe.type)?{factPath:Fs(qs(j,we.value),tt)}:{},...oO(Xe)?{rowTable:sH(Xe,k),onRowPick:(ot,Ot)=>ui(we.key,tt,ot,Ot)}:{},recordContext:{...R?{itemId:_d(we.value,L)??void 0}:{},itemIndex:ze,siblingRecords:I.map(ot=>ot.value),fieldKey:tt,table:R,...K?{titleKey:K}:{},membership:m}})}),rt&&q.canRemove&&d.jsxs("button",{type:"button",className:ie(oH,"max-w-full"),onClick:()=>ut(we.key),children:[d.jsx("span",{className:"inline-flex shrink-0",children:d.jsx(Lt.trash,{size:13})}),d.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",Ge]})]})]})})},we.key)})}),M&&$!==null&&_!==void 0&&d.jsx(_,{tables:$,onCreated:(we,ze)=>{V(!1),Od(I.map(Ge=>Ge.value),t,L).includes(we)||Re(mb(t,L,we,ze))},onClose:()=>V(!1)}),X&&$!==null&&E&&d.jsx(E,{open:!0,mode:"multi",tables:$,selectedIds:Od(I.map(we=>we.value),t,L),onChange:$e,onClose:()=>le(!1)}),X&&m.kind==="pick-media"&&d.jsx(Wy,{propertyId:O,children:we=>d.jsx(vc,{mode:"multi",propertyId:O,filter:m.filter,selectedIds:I.flatMap(ze=>Ee(ze.value)??[]),onChange:ze=>Mt(ze,we),onClose:()=>le(!1)})})]})}function Nk(e){return typeof e=="string"?{value:e,label:e}:{value:e.value,label:e.label,...e.icon!==void 0?{icon:e.icon}:{},...e.description!==void 0?{description:e.description}:{}}}function pO(e){var r;if(e.values)return e.values.map(Nk);const t=((r=e.source)==null?void 0:r.kind)==="home"?e.source.key:void 0;return t===void 0?[]:(G3(t)??[]).map(Nk)}function Ts(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}const uH=["home","building","apartments","trendUp","tag","key","template","palette","filePen","library","plug","helpCircle","lock","creditCard","settings","power","user","plus","globe","image","fileText","users","eye","eyeOff","pulse","search","chart","layout","chevDown","chevRight","chevSelector","pencil","dots","grip","external","copy","trash","archive","sparkle","arrowUp","arrowDown","arrowLeft","arrowRight","undo","redo","logout","check","x","clock","calendar","mapPin","userPlus","mail","phone","share","upload","bookOpen","newspaper","presentation","instagram","facebook","linkedin","xLogo"],dH=new Set(uH);function gO(e){return typeof e=="string"&&dH.has(e)}const fH="fixed overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",yO=ie(vt,"flex w-full items-center justify-between gap-2 rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),hH=ie(yO,"text-accent"),mH=4,Mk=160,Ck=240,pH=ie(vt,QE,"min-w-0 flex-1 cursor-text bg-transparent text-left text-ink outline-none placeholder:text-ink-4");function Rk({open:e,className:t,onMouseDown:r}){return d.jsx("span",{className:ie("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",e&&"rotate-180",t),onMouseDown:r,"aria-hidden":"true",children:d.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("path",{d:"m6 9 6 6 6-6"})})})}function gH(){return d.jsx("svg",{className:"flex-shrink-0 text-ink-2",width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function yH({option:e}){const t=gO(e.icon)?e.icon:null;return t===null&&e.description===void 0?d.jsx("span",{className:"truncate",children:e.label}):d.jsxs("span",{className:"flex min-w-0 items-start gap-2",children:[t!==null&&d.jsx(si,{name:t,size:15,stroke:1.7,className:"mt-[calc(2*var(--content))] text-ink-3"}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"truncate",children:e.label}),e.description!==void 0&&d.jsx("span",{className:"text-caption leading-[1.35] text-ink-3",children:e.description})]})]})}function bH(e,t){const r=t.toLowerCase().trim();return r?e.filter(a=>a.label.toLowerCase().includes(r)):e}function vH(e,t){const r=Ts(t);if(r.length!==0)return e.find(a=>Ts(a.value)===r||Ts(a.label)===r)}function eg({label:e,value:t,options:r,onChange:a,placeholder:l,bare:c=!1,autoOpen:u=!1,onDismiss:m,id:p,creatable:g=!1,canCreate:b,attention:v=null}){const k=ta(),[w,j]=x.useState(u),[E,_]=x.useState(0),[C,O]=x.useState(null),[A,D]=x.useState(""),R=x.useId(),P=x.useRef(null),L=x.useRef(null),T=x.useRef(null),H=r.findIndex($=>$.value===t),ne=H>=0?r[H]:void 0,Y=bH(r,w?A:""),oe=A.trim(),K=w?vH(r,A):void 0,X=K&&!Y.some($=>$.value===K.value)?[...Y,K]:Y,le=g&&oe.length>0&&!K&&((b==null?void 0:b(oe))??!0),M=X.length+(le?1:0);function V(){T.current&&O(Ba(T.current)),_(Math.max(0,H)),j(!0)}const te=x.useCallback(()=>{j(!1),D(""),m==null||m()},[m]);function pe($){var de;$.value!==t&&a($.value),j(!1),D(""),(de=L.current)==null||de.focus()}function Q($){var de;a($),j(!1),D(""),(de=L.current)==null||de.focus()}function N($){var de;if(!w){($.key==="ArrowDown"||$.key==="Enter"||$.key===" ")&&($.preventDefault(),V());return}if($.key==="Escape")$.preventDefault(),(de=L.current)==null||de.focus(),te();else if($.key==="ArrowDown")$.preventDefault(),_(ge=>Math.min(M-1,ge+1));else if($.key==="ArrowUp")$.preventDefault(),_(ge=>Math.max(0,ge-1));else if($.key==="Enter")if($.preventDefault(),E<X.length){const ge=X[E];ge&&pe(ge)}else le&&Q(oe)}const q=x.useCallback($=>{var _e,Re;const de=(_e=P.current)==null?void 0:_e.contains($),ge=(Re=document.getElementById(R))==null?void 0:Re.contains($);return!de&&!ge},[R]);function I($){w&&q($.relatedTarget)&&te()}x.useEffect(()=>{var $;u&&(($=L.current)==null||$.focus())},[u]),x.useEffect(()=>{if(!w)return;const $=()=>{T.current&&O(Ba(T.current))};return $(),window.addEventListener("scroll",$,!0),window.addEventListener("resize",$),()=>{window.removeEventListener("scroll",$,!0),window.removeEventListener("resize",$)}},[w]),x.useEffect(()=>{if(!w)return;const $=de=>{q(de.target)&&te()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[w,q,te]);const F=$=>{$.preventDefault(),w||V()},ae=d.jsx("input",{ref:L,id:p,className:c?pH:ie(k.inner,"cursor-text"),value:w?A:(ne==null?void 0:ne.label)??t,placeholder:l??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":w,"aria-controls":R,"aria-label":e,onFocus:V,onClick:()=>{w||V()},onChange:$=>{D($.target.value),w||V(),_(0)},onKeyDown:N}),ce=c?d.jsxs(d.Fragment,{children:[ae,d.jsx(Rk,{open:w,className:"pl-2",onMouseDown:F})]}):d.jsxs(d.Fragment,{children:[ae,d.jsx(Rk,{open:w,className:"pl-1 pr-2.75",onMouseDown:F})]}),he=w&&C?hl(C,{maxHeight:Ck*2,minWidth:Mk,gap:mH}):null,be=w&&he&&M>0?Zi.createPortal(d.jsxs("div",{className:fH,id:R,role:"listbox",style:{left:he.left,top:he.top,bottom:he.bottom,minWidth:Math.max(he.width,Mk),maxHeight:`min(${he.maxHeight}px, calc(${Ck}*var(--content)))`,zIndex:Br},children:[X.map(($,de)=>d.jsxs("button",{type:"button",role:"option","aria-selected":$.value===t,"data-active":de===E,className:yO,onMouseEnter:()=>_(de),onMouseDown:ge=>ge.preventDefault(),onClick:()=>pe($),children:[d.jsx(yH,{option:$}),$.value===t&&d.jsx(gH,{})]},$.value)),le&&d.jsx("button",{type:"button",role:"option","aria-selected":E===X.length,"data-active":E===X.length,className:hH,onMouseEnter:()=>_(X.length),onMouseDown:$=>$.preventDefault(),onClick:()=>Q(oe),children:d.jsxs("span",{className:"truncate",children:["Create “",oe,"”"]})})]}),document.body):null;return c?d.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:$=>{P.current=$,T.current=$},onBlurCapture:I,children:[ce,be]}):d.jsxs("div",{className:k.frame,ref:P,onBlurCapture:I,children:[d.jsx(Ka,{attention:v,className:w?"border-accent":void 0,ref:T,children:ce}),be]})}function xH({engine:e,label:t,add:r,options:a,unique:l=!1,creatable:c=!1,size:u}){const[m,p]=x.useState(!1),g=e.rows.map(j=>j.value),b=j=>l?a.filter(E=>E.value===j||!g.includes(E.value)):a,v=b(null),k=j=>!l||!g.some(E=>Ts(E)===Ts(j)),w=v.length>0?v:a;return d.jsx(gb,{engine:e,label:t,add:r,size:u,renderControl:({id:j,value:E,onChange:_})=>d.jsx(eg,{bare:!0,id:j,label:t,value:E,options:b(E),onChange:_,creatable:c,canCreate:k}),onAdd:()=>p(!0),renderAdd:j=>m?d.jsx(eg,{bare:!0,autoOpen:!0,label:r.label,value:"",placeholder:"Choose one",options:w,onDismiss:()=>p(!1),onChange:E=>{p(!1),k(E)&&j(E)},creatable:c,canCreate:k}):null})}function wH({slot:e,itemSlot:t,add:r,fixed:a,value:l,commit:c,size:u}){const m=Jr({items:l,fixed:a,axis:"y",commit:c});return t.type==="select"?d.jsx(xH,{engine:m,label:e.label,add:r,options:pO(t),creatable:t.creatable===!0,unique:e.unique===!0,size:u}):d.jsx(BI,{engine:m,label:e.label,add:r,maxLength:t.cap,size:u})}const Tk="grid size-[calc(18*var(--content))] shrink-0 place-items-center border-[1.5px] bg-canvas transition-[border-color,background-color] duration-[120ms]";function kH({control:e,state:t,label:r,onToggle:a}){return d.jsx("button",{type:"button",role:e,"aria-checked":t.checked,"aria-label":r,disabled:t.disabled,className:ie(vt,"flex w-full items-center justify-center",t.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:l=>{l.stopPropagation(),a()},children:e==="radio"?d.jsx("span",{"aria-hidden":"true",className:ie(Tk,"rounded-full",t.checked?"border-ink":"border-ink-4"),children:t.checked&&d.jsx("span",{className:"size-[calc(8*var(--content))] rounded-full bg-ink"})}):d.jsx("span",{"aria-hidden":"true",className:ie(Tk,"rounded-[calc(5*var(--content))]",t.checked?"border-ink bg-ink text-canvas":"border-ink-4 text-transparent"),children:d.jsx(qd,{className:"size-[calc(11*var(--content))]",strokeWidth:3})})})}function SH(e){return e.derived!==void 0}const EH=new Set(["image","video","tour","document","media"]);function _H(e){switch(e.type){case"number":return 96;case"date":case"select":return 140;case"phone":return 150;case"url":case"email":return 200;case"address":return 260;case"image":case"video":case"tour":case"document":case"media":return 88;case"text":return e.size==="medium"||e.size==="long"?220:160;case"list":case"poi":return 140}}function jH(e){const t=_H(e),r=EH.has(e.type),a=`calc(${t}*var(--content))`;return{track:r?a:`minmax(${a},${t/100}fr)`,minPx:t}}function OH(e){const t=Object.entries(e.fields);return{used:new Set(t.map(([r])=>r)),required:new Set(t.filter(([,r])=>r.required===!0).map(([r])=>r))}}function bO(e){return e.reduce((t,r)=>t+r.minPx,0)}function AH(e,t,r=Number.POSITIVE_INFINITY){const a=Fr(e);if(a===null)return[];const l=dl(a,""),c=l.kind==="field"?l.field:null,u=[];for(const[b,v]of jl(a)){if(SH(v)||v.locked===!0||!t.used.has(b))continue;const k=b===c,w=t.required.has(b),j={key:b,slot:v,header:v.label||b,required:w,title:k,...jH(v)};u.push({column:j,pinned:k||w})}let m=r-bO(u.filter(b=>b.pinned).map(b=>b.column)),p=!1;const g=[];for(const{column:b,pinned:v}of u)v?g.push(b):!p&&b.minPx<=m?(m-=b.minPx,g.push(b)):p=!0;return g}function vO(e){if(e===null||typeof e!="object")return null;const t=yc(e);if(t===null||t==="")return null;if(lc(e)||Yr(e))return{file:t,picked:t};const{kind:r,id:a,...l}=e;return{...l,file:t,...typeof r=="string"&&bn(r)?{kind:r}:{}}}function vb(){return{image:Ej.model,video:Nj.model,tour:jj.model,document:Hj.model}}const NH=NU({model:{defaultValue:null,coerce:vO,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},models:vb}),MH=ie(vt,"inline-flex self-stretch w-auto max-w-full min-w-0 cursor-pointer items-center gap-[calc(10*var(--content))] rounded-[calc(7*var(--content))] border px-[calc(11*var(--content))]","text-[length:calc(12.5*var(--content))] font-medium transition-[background,border-color,color] duration-[120ms]","data-[empty]:border-dashed data-[empty]:text-ink-3 hover:data-[empty]:border-ink-4 hover:data-[empty]:text-ink-2","border-line text-ink-2 hover:border-ink-4 disabled:cursor-default",wl),CH="inline-flex size-[calc(16*var(--content))] shrink-0 items-center justify-center opacity-80",RH="min-w-0 truncate";function ff({slot:e,reading:t,readingText:r,attention:a,scope:l,onOpen:c}){const u=_l(),m=t===null,p=m?ef(e,l):null,g=p!==null?Z_(p):null,b=g!==null?g.label:r!==void 0?`${e.label}: ${r}`:`Open ${e.label}`;return d.jsxs("button",{type:"button",className:MH,"data-summary-pill":e.type,"data-empty":m?"":void 0,...kl(a,u),"aria-label":b,disabled:c===void 0,onClick:c,children:[d.jsx("span",{className:CH,children:Dr.createElement(g!==null?g.icon:df(e),{size:14})}),d.jsx("span",{className:RH,children:m?e.label:t})]})}function hf({slot:e,value:t,required:r}){const a=Ol(e.type);return a===null?null:ea(a.model,e,a.model.coerce(t),r??!1)}function TH(e){var r;const t=Array.isArray(e.value)?e.value.length:0;return d.jsx(ff,{slot:e.slot,reading:t===0?null:`${t} ${e.slot.label}`,readingText:String(t),attention:hf(e),scope:{table:((r=e.recordContext)==null?void 0:r.table)??null},onOpen:e.onOpen})}function DH(e){const t=Dj.coerce(e.value),r=Z2((t==null?void 0:t.street)??null,(t==null?void 0:t.unit)??null),a=[t==null?void 0:t.city,t==null?void 0:t.state,(t==null?void 0:t.postal)==null?null:jg(t.postal)].filter(Boolean).join(", "),l=r!==""?r:a!==""?a:null;return d.jsx(ff,{slot:e.slot,reading:l,readingText:l??void 0,attention:hf(e)??(Tj(t)?"required":null),onOpen:e.onOpen})}function LH(e){const t=sb(e.value);return d.jsx(ff,{slot:e.slot,reading:(t==null?void 0:t.name)??null,readingText:t==null?void 0:t.name,attention:hf(e),onOpen:e.onOpen})}function zH(e){const t=Ks(e.value);return d.jsx(ff,{slot:e.slot,reading:t===null?null:d.jsx(pb,{rowTable:uf(e.slot),value:t,size:"cell"}),attention:hf(e),onOpen:e.onOpen})}function Gu(e){const t=e.slot.type,r=Ol(t).model;return d.jsx(yj,{kind:t,model:r,onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:r.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}function $H(e){const t=Ol("media").model;return d.jsx(OU,{models:vb(),onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:t.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}const UH={list:TH,image:Gu,video:Gu,tour:Gu,document:Gu,media:$H,address:DH,poi:LH,row:zH};function IH(e){const r=UH[e.slot.type];return r?d.jsx(r,{...e}):null}const xb=24,xO=36,HH=36,BH=8,Jm=e=>`calc(${e}*var(--content))`,wO=ie(a$,"flex flex-col gap-3"),kO="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[calc(12*var(--content))] border border-line bg-canvas",qH="-mb-px min-h-0 flex-1 overflow-auto",FH="transition-[background-color,opacity] duration-100 hover:bg-[#fbfaf6] focus-within:bg-[#faf8f1]",wb="h-[calc(44*var(--content))]",wa="flex min-w-0 items-stretch p-[calc(4*var(--content))]",PH=ie(tf,Xy),VH="[data-table-cell] > *, input, textarea, select, button, a, [contenteditable], [role='button'], [role='checkbox'], [role='radio'], [tabindex]:not([tabindex='-1'])",kb="[:where(&)_:where([data-table-cell]>*,input,textarea,select,button,a,[contenteditable],[role=button],[role=checkbox],[role=radio],[tabindex]:not([tabindex='-1']))]:cursor-auto",GH=ie("cursor-grab",kb),KH=ie("cursor-pointer",kb),Dk=e=>e.closest(VH)!==null,SO=11,Nd=["w-3/5","w-2/5","w-1/2","w-[70%]"],EO=ie("block h-[calc(9*var(--content))] rounded-full",An),YH=ie("block h-[calc(22*var(--content))] w-[calc(76*var(--content))] rounded-full",An),QH=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",An);function _O(e){return BH+HH*(e?2:1)}function jO(e,t){return xb+(e?xO:0)+_O(t)}function XH(e,t,r){const a=_O(r),l=[Jm(xb),...t?[Jm(xO)]:[],...e.map(u=>u.track),Jm(a)],c=jO(t,r)+bO(e);return{style:{gridTemplateColumns:l.join(" "),minWidth:c},selection:t,actionsPx:a}}function ZH({columns:e,layout:t,position:r,marks:a}){return d.jsxs("div",{className:ie("grid items-center border-b border-line-soft",wb),style:t.style,children:[d.jsx("span",{}),t.selection&&d.jsx("span",{}),e.map((l,c)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:Fg(l.slot.type)?ie(EO,Nd[(r+c)%Nd.length]):YH})},l.key)),d.jsx("span",{className:"flex justify-end pr-[calc(4*var(--content))]",children:Array.from({length:a},(l,c)=>d.jsx("span",{className:"grid w-[calc(36*var(--content))] place-items-center",children:d.jsx("span",{className:QH})},c))})]})}const WH=3,JH=ie("grid items-center border-b border-line-soft","grid-cols-[calc(24*var(--content))_repeat(3,minmax(0,1fr))_calc(44*var(--content))]",wb);function eB(){return d.jsx("div",{className:wO,"data-table-pending":"",children:d.jsx("div",{className:kO,children:d.jsx("div",{className:"relative min-h-0 flex-1",children:d.jsx(hc,{children:Array.from({length:SO},(e,t)=>d.jsxs("div",{className:JH,children:[d.jsx("span",{}),Array.from({length:WH},(r,a)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:ie(EO,Nd[(t+a)%Nd.length])})},a)),d.jsx("span",{})]},t))})})})})}function tB(){const e=x.useRef(null),t=x.useRef(null),[r,a]=x.useState(Number.POSITIVE_INFINITY);return x.useLayoutEffect(()=>{const l=e.current;if(l===null||typeof ResizeObserver>"u")return;const c=()=>{var g;const m=((g=t.current)==null?void 0:g.getBoundingClientRect().width)??0,p=l.clientWidth;m<=0||p<=0||a(p/(m/xb))};c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},[]),{box:e,grip:t,widthPx:r}}const Lk=new Set;function nB(e,t){const r=e[t];return typeof r=="string"&&r!==""?r:null}function ep(e,t,r){return e.rowId?e.rowId(t,r):nB(t,e.idKey)}function iB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}const rB="input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";function OO(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!["button","checkbox","radio","submit","reset","file","image","color","range"].includes(e.type):!1}function zk(e){return e instanceof HTMLSelectElement||e.getAttribute("aria-expanded")==="true"?!0:e instanceof HTMLInputElement&&["date","datetime-local","month","time","week","number","range"].includes(e.type)}function aB(e,t){if(!OO(e))return!0;let r,a;try{r=e.selectionStart,a=e.selectionEnd}catch{return!0}return r===null||a===null?!0:t==="start"?r===0&&a===0:r===e.value.length&&a===e.value.length}function oB(e){const{fields:t}=e;return t===null?d.jsx(eB,{}):d.jsx(lB,{...e,fields:t})}function lB({declaration:e,value:t,onChange:r,propertyId:a,instanceId:l="",slotId:c="",selection:u,onOpenRecord:m,onAdd:p,newRowStamp:g,fixed:b=!1,orderable:v=!0,add:k=Fy(e).add,choose:w,factPath:j,fields:E}){const _=e,{itemContent:C}=Pj(_,"expanded"),O=C.kind==="record"?C.entries:[],{box:A,grip:D,widthPx:R}=tB(),P=AH(_,E,R-jO(u!==void 0,m!==void 0)),L=Fr(_),T=L?dl(L,""):null,H=(T==null?void 0:T.kind)==="field"?T.field:void 0,ne=XH(P,u!==void 0,m!==void 0),Y=Array.isArray(t)?t.map(iB):[],oe=Jr({items:Y,fixed:b,axis:"y",commit:($,de)=>r($.map(ge=>ge.value),de)}),{drag:K}=oe,X=oe.rows,le=p!==null&&oe.canAdd,M=X.map($=>({key:$.key,index:oe.indexOf($.key),value:$.value})),V=M.length===0,te=V?iO(_):null,pe=x.useRef(null);x.useLayoutEffect(()=>{const $=pe.current;$&&(pe.current=null,Q($.row,$.col))});function Q($,de){var Re;const ge=K.containerRef.current,_e=ge==null?void 0:ge.querySelector(`[data-table-cell][data-row="${$}"][data-col="${de}"]`);(Re=_e==null?void 0:_e.querySelector(rB))==null||Re.focus()}function N($,de="top"){if(p){p();return}const ge=de==="top"?0:oe.rows.length;pe.current={row:ge,col:$},oe.add({...Io(O),...g==null?void 0:g()},ge)}function q($,de,ge){oe.updateValue($,_e=>({..._e,[de]:ge}))}function I($){if($.defaultPrevented||$.altKey||$.ctrlKey||$.metaKey||$.nativeEvent.isComposing)return;const de=$.target,ge=de.closest("[data-table-cell]");if(!ge)return;const _e=Number(ge.dataset.row),Re=Number(ge.dataset.col),De=M.length-1;switch($.key){case"Enter":{if($.shiftKey||!OO(de))return;$.preventDefault(),_e<De?Q(_e+1,Re):le&&N(Re,"below");return}case"ArrowDown":case"ArrowUp":{if(zk(de))return;const xe=$.key==="ArrowDown"?_e+1:_e-1;if(xe<0||xe>De)return;$.preventDefault(),Q(xe,Re);return}case"ArrowLeft":case"ArrowRight":{if(zk(de))return;const xe=$.key==="ArrowLeft",$e=xe?Re-1:Re+1;if($e<0||$e>=P.length||!aB(de,xe?"start":"end"))return;$.preventDefault(),Q(_e,$e);return}}}function F($){const de=`${Vg(Zr(e.label).singular)} ${$.index+1}`;if(!L||(T==null?void 0:T.kind)!=="field")return de;const ge=sf(T,L,$.value);return ge==="Untitled"?de:ge}const ae=u?u.control:null;function ce($){if(!u)return null;const de=ep(u,$.value,$.index);return de===null?{checked:!1,disabled:!0}:Gy(u.ids,de,u.held??Lk)}function he($){const de=u?ep(u,$.value,$.index):null;if(!u||de===null)return;const ge=J_(u.ids,de,u.control,u.held??Lk);ge!==u.ids&&u.onChange(ge)}function be($,de){var yt;const ge=ce($),_e=K.getItemProps($.key),Re=F($),De=qs(j,$.value),xe=ge!==null&&!ge.disabled,$e=u?ep(u,$.value,$.index):null;return d.jsxs("div",{role:"row","data-dragid":_e["data-dragid"],"data-disabled":(ge==null?void 0:ge.disabled)||void 0,"data-upstream":$e!==null&&((yt=u==null?void 0:u.upstream)==null?void 0:yt.has($e))||void 0,onPointerDown:v?Ee=>{Dk(Ee.target)||_e.onPointerDown(Ee)}:void 0,onClick:xe?Ee=>{Dk(Ee.target)||he($)}:void 0,className:ie("group/row grid items-stretch border-b border-line-soft data-[disabled=true]:opacity-50 data-[disabled=true]:focus-within:opacity-100",Ty,wb,FH,xe?KH:v?GH:kb),style:ne.style,children:[d.jsx("div",{role:"cell",className:ie(wa,"items-center justify-center"),children:v&&d.jsx("span",{"aria-hidden":"true",className:ie("flex w-full touch-none items-center justify-center","text-ink-4 opacity-0 transition-[opacity,color] duration-[120ms] group-hover/row:opacity-100 hover:text-ink-2","group-data-[drag-clone]/row:text-ink-2 group-data-[drag-clone]/row:opacity-100"),children:d.jsx(hy,{className:"size-[calc(14*var(--content))]",strokeWidth:1.8})})}),ae&&d.jsx("div",{role:"cell",className:wa,children:ge&&d.jsx(kH,{control:ae,state:ge,label:`Select ${Re}`,onToggle:()=>he($)})}),P.map((Ee,Mt)=>d.jsx("div",{role:"cell","data-table-cell":"","data-row":de,"data-col":Mt,"data-field":Ee.key,className:wa,children:Fg(Ee.slot.type)?d.jsx(kc,{slot:Ee.slot,instanceId:l,slotId:c,propertyId:a,value:$.value[Ee.key],required:Ee.required,onChange:ut=>q($.key,Ee.key,ut),recordContext:{itemIndex:$.index,fieldKey:Ee.key,...H?{titleKey:H}:{}}}):d.jsx(IH,{slot:Ee.slot,instanceId:l,slotId:c,propertyId:a,value:$.value[Ee.key],required:Ee.required,onChange:ut=>q($.key,Ee.key,ut),recordContext:{itemIndex:$.index,fieldKey:Ee.key,...H?{titleKey:H}:{}},factPath:Fs(De,Ee.key),onOpen:m?()=>m($.index,Ee.key):void 0})},Ee.key)),d.jsxs("div",{role:"cell",className:ie(wa,"justify-end"),children:[m&&d.jsx("button",{type:"button",className:tf,"aria-label":`Open ${Re}`,onClick:()=>m($.index),children:d.jsx(B6,{className:"size-[calc(13*var(--content))]"})}),oe.canRemove&&d.jsx("button",{type:"button",className:PH,"aria-label":`Remove ${Re}`,onClick:()=>oe.remove($.key),children:d.jsx(vl,{className:"size-[calc(13*var(--content))]"})})]})]},$.key)}return d.jsxs("div",{className:wO,children:[oe.canAdd&&d.jsx(mc,{size:"large",add:k,onAdd:le?()=>N(0):null,choose:w}),d.jsx("div",{className:kO,children:d.jsxs("div",{ref:A,className:ie(qH,V&&"flex flex-col"),role:"table","aria-rowcount":M.length+1,children:[d.jsxs("div",{role:"row",className:"sticky top-0 z-[1] grid items-stretch border-b border-line bg-canvas text-[length:calc(12*var(--content))] font-medium text-ink-3",style:ne.style,children:[d.jsx("div",{ref:D,role:"columnheader",className:wa}),ne.selection&&d.jsx("div",{role:"columnheader",className:wa}),P.map($=>d.jsx("div",{role:"columnheader","data-field":$.key,className:"min-w-0 px-[calc(14*var(--content))] py-[calc(10*var(--content))]",children:d.jsx("span",{className:"block truncate",children:$.header})},$.key)),d.jsx("div",{role:"columnheader",className:wa})]}),d.jsx("div",{ref:K.containerRef,className:"relative",onKeyDown:I,children:d.jsx(Jd,{place:"cell",children:M.map(($,de)=>be($,de))})}),V&&d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(hc,{children:Array.from({length:SO},($,de)=>d.jsx(ZH,{columns:P,layout:ne,position:de,marks:(m?1:0)+(oe.canRemove?1:0)},de))}),d.jsx(yd,{icon:Dr.createElement(df(_),{size:25,strokeWidth:1.8}),headline:k.empty,...te!==null?{line:te}:{}})]})]})})]})}function sB({object:e,row:t,reveal:r,withRecordContext:a=!1,onField:l,host:c,fieldProps:u}){const{fields:m}=c;return m===null?d.jsx(fB,{}):d.jsx(bb,{fields:jl(e).filter(([p])=>m.used.has(p)),reveal:r,renderField:(p,g)=>d.jsx(kc,{slot:g,instanceId:c.instanceId,slotId:`${c.slotId}.${p}`,propertyId:c.propertyId,value:t[p],required:m.required.has(p),onChange:b=>l(p,b),...WE(g.type)?{factPath:Fs(c.factPath,p)}:{},...a?{recordContext:{fieldKey:p}}:{},...u==null?void 0:u(p,g)})})}const cB=5,uB=ie("block h-[calc(9*var(--content))] w-1/4 rounded-full",An),dB=ie("block h-[calc(40*var(--content))] w-full rounded-[calc(10*var(--content))]",ky);function fB(){return d.jsx("div",{className:"relative h-[calc(360*var(--content))]","data-record-pending":"",children:d.jsx(hc,{className:"flex flex-col gap-[calc(20*var(--content))]",children:Array.from({length:cB},(e,t)=>d.jsxs("span",{className:"flex flex-col gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:uB}),d.jsx("span",{className:dB})]},t))})})}const hB=ie("relative z-[1] flex flex-shrink-0 items-center gap-[14px] py-3",P_);function mB(e){const{open:t,onClose:r}=e;return d.jsx(wy,{open:t,onClose:r,ariaLabel:e.fallbackTitle,className:ie(Ly,S$),children:t?d.jsx(pB,{...e}):null})}function pB({object:e,row:t,fallbackTitle:r,onChange:a,onClose:l,propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g,revealFieldName:b,fieldProps:v}){const k=dl(e,r),w=sf(k,e,t),j=w==="Untitled"?r:w,E=x.useRef(t);x.useEffect(()=>{E.current=t},[t]);const _=(C,O)=>{E.current={...E.current,[C]:O},a(E.current)};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:hB,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ie(Uy,"truncate"),children:j})}),d.jsx(W_,{}),d.jsx("button",{type:"button",className:Iy,"aria-label":"Close",onClick:l,children:d.jsx(Lt.x,{size:14})})]}),d.jsx("div",{className:ie("min-h-0 flex-1 overflow-y-auto py-[clamp(16px,1.2vw,28px)]",P_),children:d.jsx(Jd,{place:"panel",children:d.jsx(sB,{object:e,row:t,reveal:b,withRecordContext:!0,onField:_,host:{propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g},fieldProps:v})})})]})}const gB=new Set(["image","video","tour","document"]);function yB(e){var t;return((t=e.source)==null?void 0:t.kind)==="row"}function AO(e){return gB.has(e.type)&&Id(e).kind==="owned"}function bB(e,t){return jl(e).some(([r,a])=>AO(a)&&!yB(a)&&t.required.has(r))}function vB({slot:e,value:t,onChange:r,propertyId:a,instanceId:l,slotId:c,selection:u,onRecordAdded:m,onAdd:p,newRowStamp:g,fixed:b,orderable:v,add:k,choose:w,factPath:j,record:E,fields:_}){const[C,O]=x.useState(null),A=E!==void 0?{index:E.index,added:E.added===!0}:C,{ownedUpload:D}=Wt(),R=Fr(e),P=t,L=A===null?void 0:P[A.index]??{},T=R!==null&&_!==null&&bB(R,_),H=x.useRef({open:A,rows:P});x.useEffect(()=>{H.current={open:A,rows:P}});const ne=()=>{const M=H.current.rows,V=[(g==null?void 0:g())??{},...M],te={index:0,added:!0};H.current={open:te,rows:V},r(V,"add"),O(te)},Y=M=>{const{open:V,rows:te}=H.current;if(V===null)return;const pe=te.map((Q,N)=>N===V.index?M:Q);H.current={open:V,rows:pe},r(pe,"edit")},oe=()=>{if(E!==void 0){E.onClose();return}(A==null?void 0:A.added)===!0&&(m==null||m(A.index)),O(null)},K=(M,V)=>{const te=H.current.open;return!D||te===null?Promise.reject(new Error("list-table-view: no record is open")):D({slotId:c,itemIndex:te.index,field:M},V)},X=D&&A!==null?(M,V)=>AO(V)?{onUpload:te=>K(M,te)}:{}:void 0,le=Zr(e.label).singular;return d.jsxs(d.Fragment,{children:[E===void 0&&d.jsx(oB,{declaration:e,value:t,onChange:(M,V)=>r(M,V),propertyId:a,instanceId:l,slotId:c,selection:u,...k!==void 0?{add:k}:{},...w!==void 0?{choose:w}:{},...b!==void 0?{fixed:b}:{},...v!==void 0?{orderable:v}:{},onOpenRecord:R?(M,V)=>O({index:M,added:!1,field:V}):void 0,onAdd:p!==void 0?p:T?ne:void 0,...g!==void 0?{newRowStamp:g}:{},factPath:j,fields:_}),R&&d.jsx(mB,{open:L!==void 0,object:R,row:L??{},fallbackTitle:(A==null?void 0:A.added)===!0?`New ${le}`:`${Vg(le)} ${((A==null?void 0:A.index)??0)+1}`,propertyId:a,instanceId:l,slotId:c,fieldProps:X,factPath:qs(j,L),fields:_,revealFieldName:A==null?void 0:A.field,onChange:Y,onClose:oe})]})}function xB(e){return e.map(vO).filter(t=>t!==null)}function wB({label:e,itemSlot:t,offer:r,verbs:a,fixed:l,instanceId:c,slotId:u,ownerSlotId:m=u,value:p,propertyId:g,commit:b,onUpload:v,factPath:k,size:w}){const j=Ir(t),E=x.useMemo(()=>xB(p),[p]),[_,C]=x.useState(!1),O=Jr({items:E,fixed:l,axis:"xy",commit:b}),{rows:A}=O,D=Zy(t,{propertyId:g,instanceId:c,slotId:m}),R=r.kind==="owned"?v??D??void 0:void 0,P=SB(R,j,O.add),{add:L,onAdd:T,choose:H}=My(a,r.kind==="picked"?()=>C(!0):null,R!==void 0?ib(j,P):null),ne=P.error;return d.jsxs(Cy,{engine:O,label:e,noun:"item",size:w,onAdd:T,add:L,choose:H,renderTile:(Y,oe,K)=>d.jsx(EB,{value:Y.value,kinds:j,propertyId:g,holderPath:k,frame:{chrome:K,crop:null}}),children:[ne&&d.jsx("p",{className:xl,children:ne}),_&&r.kind==="picked"&&d.jsx(vc,{mode:"multi",propertyId:g,filter:r.filter,selectedIds:A.map(Y=>Y.value.file),onChange:Y=>O.replace(El(A,Y,oe=>oe.file,kB,O.mint)),onClose:()=>C(!1)})]})}function kB(e){return EU(e)??{file:e.file}}function SB(e,t,r){const[a,l]=x.useState(!1),[c,u]=x.useState(null);return{busy:a,error:c,take:p=>{if(!e||p.length===0)return;const g=p.filter(v=>!$k(t,ed(v)));u(g.length>0?`Only ${t.join(", ")} can be added here.`:null);const b=p.filter(v=>$k(t,ed(v)));b.length!==0&&(l(!0),(async()=>{try{for(const v of b){const k=ed(v),w=Hn(k),j=of(k,w.fromUploaded(await e(v),w.cleared));j!==null&&r(j)}}catch(v){console.error("[editor] media upload failed",v),u("Upload failed. Try again.")}finally{l(!1)}})())}}}function $k(e,t){return t!==null&&e.includes(t)}function EB({value:e,kinds:t,propertyId:r,frame:a,holderPath:l}){const c=nb(e,t,r);return d.jsx(tb,{kind:c,value:_B(c,e),propertyId:r,frame:a,holderPath:l},c)}function _B(e,t){return vb()[e].coerce(t)}function NO({face:e,...t}){const{slot:r,instanceId:a,slotId:l,value:c,onChange:u,recordContext:m}=t,p=Pj(r,e),g=C9(r,a,l,u,m!=null),b=t.membership??Vj(r,void 0),v=Array.isArray(c)?c:[],k=cj({slotId:l,recordContext:m}),w=m?m.table??null:fc(r.source)!==null?t.boundRowTable??null:null,j=x.useMemo(()=>p.view==="gallery"?mq(r,w):null,[p.view,r,w]),E=b.kind==="follows",{itemContent:_}=p,C=e==="compact"?"compact":"large",O=ef(r,{table:w,membership:b});if(O===null)return null;switch(p.view){case"table":return d.jsx(OB,{slot:r,items:v,onChange:u,membership:b,verbs:O,entries:_.kind==="record"?_.entries:null,fixed:E,propertyId:t.propertyId,instanceId:a,slotId:l,factPath:t.factPath});case"annotated-gallery":{const A=_.kind==="record"?BO(_.entries):null;return A===null?null:d.jsx(AB,{list:r,label:r.label,face:e,annotated:A,listTable:w,membership:b,verbs:O,itemBaseline:t.itemBaseline,insideRecord:m!=null,fixed:E,instanceId:a,slotId:l,mediaSlotId:`${k}.${A.mediaKey}`,value:v,propertyId:t.propertyId,table:(m==null?void 0:m.table)??Gj(b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C})}case"accordion":return _.kind!=="record"?null:d.jsx(cH,{slot:r,entries:_.entries,fixed:E,instanceId:a,slotId:l,value:c,commit:g,membership:b,verbs:O,rowTable:t.rowTable??Ek(r,b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,itemBaseline:t.itemBaseline,insideRecord:m!=null,factPath:t.factPath});case"gallery":{if(_.kind!=="single"||!pl(_.slot.type))return null;if(j!==null)return d.jsx(NB,{label:r.label,member:j,verbs:O,fixed:E,instanceId:a,slotId:l,mediaSlotId:k,value:c,propertyId:t.propertyId,selectedItemIndex:t.selectedItemIndex,commit:g,onUpload:t.onUpload,size:C});const A=_.slot,D=_.slot.type,R=Z3(r,A,w)??{kind:"owned"};if(D==="media")return d.jsx(wB,{label:r.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:a,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C});const P=D;return d.jsx(LU,{kind:P,label:r.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:a,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C},P)}case"media-manager":return null;case"poi-curation":return d.jsx(hI,{slot:r,fixed:E,value:c,propertyId:t.propertyId,commit:g});case"bullet-list":return _.kind!=="single"?null:d.jsx(wH,{slot:r,itemSlot:_.slot,add:O.add,fixed:E,value:c,commit:g,size:C});case"row-bar":{const A=Ek(r,b),D=_.kind==="single"?uf(_.slot):jB,R=t.rowTable??(A.kind!=="none"?A:D);return d.jsx(QI,{slot:r,face:e,rowTable:b.kind==="follows"&&R.kind==="table"?{...R,inert:!0}:R,verbs:O,fixed:E,value:v,commit:g})}}}const jB={kind:"none"};function OB({slot:e,items:t,onChange:r,membership:a,verbs:l,entries:c,fixed:u,propertyId:m,instanceId:p,slotId:g,factPath:b}){const{TablePicker:v,TableCreate:k}=Wt(),w=Lj(b),j=w!==void 0?w:OH(Fr(e)??{fields:{}}),[E,_]=x.useState(!1),[C,O]=x.useState(!1),A=a.kind==="pick-row"&&c!==null?lb(a):null,D=ob,R=t,P=x.useRef(R);x.useEffect(()=>{P.current=R});const L=v===void 0?null:()=>_(!0),T=A!==null&&L!==null&&l.choose!==null?{choose:l.choose,onChoose:L}:void 0,H=A===null?void 0:k===void 0?null:()=>O(!0),ne=a.kind==="table"?()=>({[D]:oj()}):void 0;return d.jsxs(d.Fragment,{children:[d.jsx(vB,{slot:e,value:t,onChange:Y=>r(Y),propertyId:m,instanceId:p,slotId:g,factPath:b,fields:j,fixed:u,...H!==void 0?{onAdd:H}:{},...ne!==void 0?{newRowStamp:ne}:{},add:l.add,...T!==void 0?{choose:T}:{}}),C&&A!==null&&c!==null&&k!==void 0&&d.jsx(k,{tables:A,onCreated:(Y,oe)=>{if(O(!1),Od(P.current,c,D).includes(Y))return;const K=[mb(c,D,Y,oe),...P.current];P.current=K,r(K)},onClose:()=>O(!1)}),E&&A!==null&&c!==null&&v!==void 0&&d.jsx(v,{open:!0,mode:"multi",tables:A,selectedIds:Od(R,c,D),onChange:(Y,oe)=>{const K=EI(P.current,c,D,Y,oe);P.current=K,r(K)},onClose:()=>_(!1)})]})}function AB({list:e,face:t,annotated:r,listTable:a,membership:l,itemBaseline:c,insideRecord:u,table:m,...p}){const g=Yj({instanceId:p.instanceId,slotId:p.slotId,membership:l,itemBaseline:c,insideRecord:u});return d.jsx(qO,{...p,annotated:r,offer:W3(e,r.mediaSlot,{itemTable:m,listTable:a,picksBy:l.kind==="pick-media"?l.filter:null}),markers:t==="compact"?g:null,table:m})}function NB({member:e,value:t,commit:r,...a}){const l=x.useMemo(()=>Array.isArray(t)?t.map(e.toItem):[],[t,e]),c=(u,m)=>r(u.map(p=>({key:p.key,value:e.toStored(p.value)})),m);return d.jsx(qO,{...a,annotated:e.annotated,offer:Id(e.annotated.mediaSlot,null),markers:null,value:l,table:null,commit:c})}function MB(e){return d.jsx(NO,{face:"expanded",...e})}function CB(e){return d.jsx(NO,{face:"compact",...e})}const RB={model:{defaultValue:[],coerce:e=>Array.isArray(e)?e:[],isEmpty:e=>e.length===0,isInvalid:()=>!1},faces:{expanded:MB,compact:CB},applyOptimistic:null};function TB(e,t){return e.toLocaleString("en-US",{useGrouping:t.thousandsSep===!0,maximumFractionDigits:t.decimals===!0?20:0})}function DB(e,t){const r=String(e??"").replace(/[^\d.]/g,"");if(r==="")return"";const[a,l]=r.split("."),c=(a??"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return l!=null?`${c}.${l}`:c}function LB(e,t){if(t<=0)return 0;let r=0;for(let a=0;a<e.length;a++)if(e[a]!==","&&r++,r===t)return a+1;return e.length}function Uk(e,t,r){e.value=t,e.setSelectionRange(r,r)}function Ik(e,t){let r=e.replace(t!=null&&t.decimals?/[^\d.]/g:/[^\d]/g,"");if(t!=null&&t.decimals){const l=r.indexOf(".");l>=0&&(r=r.slice(0,l+1)+r.slice(l+1).replace(/\./g,""))}const a=r.replace(/[^\d]/g,"");return(t==null?void 0:t.maxDigits)!=null&&a.length>t.maxDigits?null:r}function zB({label:e,value:t,onChange:r,group:a,decimals:l,maxDigits:c,placeholder:u,onBlur:m,attention:p=null}){const g=k=>a?DB(k):k,b=g(t),v=ta();return d.jsx("div",{className:v.frame,children:d.jsx(Ka,{attention:p,children:d.jsx("input",{className:ie(v.inner,"[font-variant-numeric:tabular-nums]"),"aria-label":e,inputMode:l?"decimal":"numeric",value:b,placeholder:u??"0",onBlur:m,onChange:k=>{var A;const w=k.currentTarget,j=w.value,E=w.selectionStart??j.length,_=Ik(j,{decimals:l,maxDigits:c});if(_==null){const D=E-(j.length-b.length);Uk(w,b,Math.min(Math.max(D,0),b.length));return}const C=g(_),O=((A=Ik(j.slice(0,E),{decimals:l}))==null?void 0:A.length)??0;Uk(w,C,LB(C,O)),r(_)}})})})}function tp(e){return e==null?"":String(e)}function tg(e){const t=e.trim();if(t==="")return null;const r=Number(t);return Number.isFinite(r)?r:null}const MO={defaultValue:null,coerce:e=>typeof e=="number"?e:tg(typeof e=="string"?e:""),isEmpty:e=>e===null,isInvalid:()=>!1};function Hk({slot:e,value:t,onChange:r,required:a=!1}){const[l,c]=x.useState(()=>tp(t)),u=tg(l)===t?l:tp(t);return d.jsx(zB,{attention:ea(MO,e,t,a),label:e.label,value:u,onChange:m=>{c(m);const p=tg(m);p!==t&&r(p)},onBlur:()=>c(tp(t)),group:e.thousandsSep,decimals:e.decimals,maxDigits:e.maxDigits,placeholder:e.placeholder})}const $B={model:MO,faces:{expanded:Hk,compact:Hk},applyOptimistic:(e,t,r)=>Bj(e,t==null?"":TB(t,r))},CO={model:{defaultValue:"",coerce:xc,isEmpty:e=>e.trim()==="",isInvalid:e=>!l5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid phone number",inputType:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 555-0100"};function Bk(e){return d.jsx(rb,{kind:CO,...e})}const UB={model:CO.model,faces:{expanded:Bk,compact:Bk},applyOptimistic:null},IB="flex flex-col gap-2";function HB({slot:e,value:t,onChange:r,propertyId:a}){const{apiFetch:l}=Wt().api,[c,u]=x.useState(null),[m,p]=x.useState(null),g=x.useMemo(()=>t?[t]:[],[t]),{urls:b,dropUrl:v}=eO(a,g);async function k(w){if(u(null),(t==null?void 0:t.place_id)!==w.place_id){p(w);try{const j=await Qj(l,a,w.place_id);r(j)}catch{u("Couldn't add that place. Try again.")}finally{p(null)}}}return d.jsxs("div",{className:IB,children:[d.jsx(nO,{propertyId:a,placeholder:e.placeholder??"Search nearby…",addedIds:t?new Set([t.place_id]):new Set,onSelect:w=>void k(w)}),c&&d.jsx("span",{className:Zj,children:c}),m?d.jsxs("div",{className:ie(cb,Wj),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:Jj})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:m.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}):t?d.jsx(tO,{row:t,photoUrl:b[t.place_id],onPhotoError:()=>v(t.place_id),onRemove:()=>r(null)}):d.jsx("div",{className:q9,children:"No place yet. Search above to choose one."})]})}const BB={model:{defaultValue:null,coerce:sb,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:HB},applyOptimistic:null},qB=ie(vt,"group box-border flex flex-col items-start gap-2.5 rounded-[calc(12*var(--content))] border-[1.5px] p-4.5 text-left","transition-[background-color,border-color] duration-[120ms]","border-line bg-canvas hover:border-ink-4","aria-checked:border-honey-2 aria-checked:bg-honey-soft","data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft"),FB=ie("grid size-9.5 place-items-center rounded-[calc(10*var(--content))] bg-line-soft text-ink-2","transition-[background-color,color] duration-[120ms]","group-aria-checked:bg-honey group-aria-checked:text-honey-ink");function PB(e){return e.length>0&&e.every(t=>t.description!==void 0)}function VB({label:e,value:t,options:r,onChange:a,attention:l}){const c=_l();return d.jsx("div",{className:ie(Va,"gap-1.5"),children:d.jsx("div",{className:"grid grid-cols-2 gap-2.5",role:"radiogroup","aria-label":e,children:r.map(u=>{const m=gO(u.icon)?u.icon:null;return d.jsxs("button",{type:"button",role:"radio","aria-checked":u.value===t,className:qB,...kl(l,c),onClick:()=>{u.value!==t&&a(u.value)},children:[m!==null&&d.jsx("span",{className:FB,children:d.jsx(si,{name:m,size:18,stroke:1.7})}),d.jsx("span",{className:"text-[length:calc(15.5*var(--content))] font-semibold text-ink",children:u.label}),d.jsx("span",{className:"text-caption leading-[1.4] text-ink-3",children:u.description})]},u.value)})})})}const RO={defaultValue:null,coerce:e=>typeof e=="string"?e:null,isEmpty:e=>e===null||e==="",isInvalid:()=>!1};function TO({cards:e,slot:t,value:r,onChange:a,required:l=!1}){const c=pO(t),u=t.creatable??!1,m=ea(RO,t,r,l);return e&&!u&&PB(c)?d.jsx(VB,{label:t.label,value:r,options:c,onChange:a,attention:m}):d.jsx(eg,{attention:m,label:t.label,value:r??"",options:c,creatable:u,placeholder:"Choose one",onChange:a})}function GB(e){return d.jsx(TO,{cards:!0,...e})}function KB(e){return d.jsx(TO,{cards:!1,...e})}const YB={model:RO,faces:{expanded:GB,compact:KB},applyOptimistic:null};function DO(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function QB(){return x.useSyncExternalStore(()=>()=>{},()=>DO()!==null,()=>!1)}function XB({value:e,onChange:t,recording:r,onRecordingChange:a,onEnd:l}){const c=QB(),[u,m]=x.useState(0),p=x.useRef(null),g=x.useRef(""),b=x.useRef(""),v=x.useRef(t),k=x.useRef(l);x.useEffect(()=>{v.current=t,k.current=l},[t,l]),x.useEffect(()=>{if(!r)return;const E=setInterval(()=>m(_=>_+1),1e3);return()=>clearInterval(E)},[r]),x.useEffect(()=>()=>{var E;(E=p.current)==null||E.abort(),p.current=null},[]);const w=x.useCallback(()=>{const E=DO();if(!E||p.current)return;const _=new E;_.continuous=!0,_.interimResults=!0,_.lang=typeof navigator<"u"&&navigator.language||"en-US",g.current=e,b.current="",_.onresult=C=>{let O="",A="";for(let L=C.resultIndex;L<C.results.length;L++){const T=C.results[L];if(T===void 0)continue;const H=T[0].transcript;T.isFinal?O+=H:A+=H}O&&(b.current+=O);const D=b.current+A,R=g.current,P=!R||/\s$/.test(R)||/^\s/.test(D)?"":" ";v.current(R+P+D)},_.onerror=()=>{},_.onend=()=>{var C;p.current=null,a(!1),m(0),(C=k.current)==null||C.call(k)},p.current=_,m(0),a(!0);try{_.start()}catch{p.current=null,a(!1)}},[a,e]),j=x.useCallback(()=>{var E;(E=p.current)==null||E.stop()},[]);return{canDictate:c,seconds:u,start:w,stop:j}}function ZB(e){return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(Math.floor(e%60)).padStart(2,"0")}`}const WB={short:120,medium:240,long:2e3};function JB(e){return WB[e]}const LO={defaultValue:"",coerce:xc,isEmpty:e=>e.trim()==="",isInvalid:()=>!1};function zO(e){const t=e.slot.size??"short";return{size:t,cap:typeof e.slot.cap=="number"?e.slot.cap:JB(t)}}function $O({slot:e}){if(e.placeholder!==void 0||e.size!=="long")return e.placeholder;const t=typeof e.label=="string"?e.label.trim().toLowerCase():"";return t===""?"Start typing…":`Write the ${t} here…`}function UO({slot:e,value:t,required:r=!1}){return ea(LO,e,t,r)}const eq={medium:2,long:5};function IO(e){const{slot:t,value:r,onChange:a}=e,{size:l,cap:c}=zO(e),u=ta(),m={value:r,maxLength:c,placeholder:$O(e),"aria-label":t.label};return d.jsx("div",{className:u.frame,children:d.jsx(Ka,{attention:UO(e),count:{count:r.length,max:c,multiline:l!=="short"},children:l==="short"?d.jsx("input",{className:u.inner,...m,onChange:p=>a(p.target.value)}):d.jsx("textarea",{className:ie(u.inner,u.multiline),rows:u.inline?1:eq[l],...m,onChange:p=>a(p.target.value)})})})}function tq(e){return zO(e).size==="long"?d.jsx(nq,{...e,cap:typeof e.slot.cap=="number"?e.slot.cap:null}):d.jsx(IO,{...e})}function nq(e){const{slot:t,value:r,onChange:a,cap:l}=e,c=ta(),u=x.useRef(null),[m,p]=x.useState(!1),g=x.useCallback(()=>requestAnimationFrame(()=>{var w;return(w=u.current)==null?void 0:w.focus()}),[]),b=x.useCallback(w=>a(l===null?w:w.slice(0,l)),[a,l]),v=XB({value:r,onChange:b,recording:m,onRecordingChange:p,onEnd:g}),k=m?null:r.length>0?l===null?`${r.length.toLocaleString()} character${r.length===1?"":"s"}`:`${r.length.toLocaleString()} / ${l.toLocaleString()}`:v.canDictate?"Type, or tap the mic to dictate":"Type to fill this in";return d.jsx("div",{className:c.frame,children:d.jsxs(Ka,{attention:UO(e),className:"flex-col overflow-hidden",children:[d.jsx("textarea",{ref:u,className:ie(c.inner,"min-h-[calc(160*var(--content))] resize-none whitespace-pre-wrap pt-3.5 leading-[1.55]"),value:r,maxLength:l??void 0,placeholder:$O(e),"aria-label":t.label,onChange:w=>a(w.target.value)}),d.jsxs("div",{className:"flex items-center justify-between gap-3 py-2 pr-2.5 pl-3.5",children:[m?d.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2.5 text-caption text-ink-2",role:"status",children:[d.jsx("span",{className:"size-2 shrink-0 animate-pulse rounded-full bg-danger","aria-hidden":"true"}),d.jsx("span",{className:"font-mono font-semibold text-ink [font-feature-settings:'tnum']",children:ZB(v.seconds)}),"Listening…"]}):d.jsx("span",{className:ie(GL(r.length,l??void 0),"font-sans text-caption"),children:k}),v.canDictate&&d.jsx("button",{type:"button",className:ie(vt,"grid size-9 shrink-0 place-items-center rounded-full bg-ink text-canvas transition-[background-color,transform] duration-[120ms] hover:scale-[1.04] hover:bg-ink-2"),"aria-label":m?"Stop dictation":"Dictate with your voice",onClick:m?v.stop:v.start,children:m?d.jsx("span",{className:"block size-2.75 rounded-[2px] bg-white","aria-hidden":"true"}):d.jsx(F6,{size:16})})]})]})})}const iq={model:LO,faces:{expanded:tq,compact:IO},applyOptimistic:(e,t)=>Bj(e,xc(t))};function rq(e){if(e===void 0)return"Not a valid URL";const t=Object.entries(Kr).find(([a])=>a===e);if(t)return`Needs a ${t[1].label} link`;const r=aq(e);return r.length>0?`Needs a ${e} link (${r.join(", ")})`:`Needs a ${e} link`}function aq(e){return Object.values(Kr).filter(t=>t.kind===e).map(t=>t.label)}function oq(e,t){const r=Ns(e);return r===""?!1:Eg(r)?t.accepts!==void 0&&!r5(t.accepts,r):!0}const HO={model:{defaultValue:"",coerce:xc,isEmpty:e=>Ns(e)==="",isInvalid:oq},normalize:Ns,invalidMessage:(e,t)=>Eg(Ns(e))?rq(t.accepts):"Not a valid URL",inputType:"text",inputMode:"url",autoComplete:"url",placeholder:"https://",adornment:e=>d.jsx(lq,{draft:e})};function lq({draft:e}){const t=Ns(e);return d.jsx("span",{className:ie(YE,"pr-2.75"),children:Eg(t)?d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:ie(vt,"flex items-center text-ink-4 hover:text-accent transition-colors duration-[120ms]"),"aria-label":"Open URL in new tab",children:d.jsx(Lt.external,{})}):d.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:d.jsx(Lt.external,{})})})}function qk(e){return d.jsx(rb,{kind:HO,...e})}const sq={model:HO.model,faces:{expanded:qk,compact:qk},applyOptimistic:null};let Fk=null;function cq(){return Fk??(Fk={text:iq,number:$B,select:YB,url:sq,email:M9,phone:UB,date:k9,image:Ej,list:RB,poi:BB,video:Nj,tour:jj,document:Hj,media:NH,address:f9}),Fk}function uq(){return TI}function Ol(e){if(e==="row")return uq();const r=cq()[e];return r===void 0?null:r}function Md(e,t={}){const r=lf(e);if(r!==null){const l={...t,fields:r.fields};return e.locked!==!0&&Object.values(r.fields).some(c=>Md(c,l))}if(kI(e,t))return!1;const a=Ol(e.type);return a?a.isEditable?a.isEditable(e):e.locked!==!0:!1}function BO(e){const t=e.filter(([,a])=>FS(a)),r=t.find(([,a])=>bn(a.type));return r?{mediaKey:r[0],mediaSlot:r[1],fields:t.filter(([a])=>a!==r[0])}:null}const dq="flex flex-col gap-1.5",fq="flex flex-col";function qO({label:e,annotated:t,offer:r,verbs:a,markers:l,fixed:c,instanceId:u,slotId:m,mediaSlotId:p,value:g,propertyId:b,table:v,selectedItemIndex:k,selectedFieldName:w,commit:j,onUpload:E,factPath:_,size:C}){const{mediaKey:O,mediaSlot:A,fields:D}=t,R=p??`${m}.${O}`,P=A.type,L=Hn(P),T=Qg(A),H=x.useMemo(()=>[[O,A],...D],[O,A,D]),ne=x.useMemo(()=>g.map(xe=>xe!==null&&typeof xe=="object"?{...xe}:{}),[g]),Y=Jr({items:ne,...l?{identityOf:l.identityOf}:{},fixed:c,axis:"xy",commit:(xe,$e)=>{l==null||l.markOrder(xe),j(l?l.stamp(xe):xe,$e)}}),{rows:oe}=Y,K=xe=>{var $e;return(($e=Ol(P))==null?void 0:$e.model.coerce(xe[O]))??L.cleared},X=(xe,$e)=>({...xe,[O]:$e}),le=(xe,$e,yt)=>{const Ee=oe.find(Mt=>Mt.key===xe);Ee&&(l==null||l.markFields(Ee,{[$e]:yt(Ee.value)}),Y.updateValue(xe,Mt=>({...Mt,[$e]:yt(Mt)})))},M=xe=>{for(const $e of xe)l==null||l.markRemoved($e);Y.removeMany(xe.map($e=>$e.key))},V=xe=>X(Io(H),xe),te=x.useMemo(()=>({get:xe=>P==="image"?K(xe):null,set:(xe,$e)=>X(xe,$e)}),[P,O]),pe=w!==void 0&&w!==O,Q=Oj({engine:Y,lens:te,propertyId:b,instanceId:u,slotId:m,cropCfg:T}),N=dj(b,P),q=xe=>Rs(Fs(qs(_,xe),O),L.fileIdOf(K(xe))),I=x.useRef(null);x.useEffect(()=>{pe&&I.current&&mO(I.current,w)},[pe,w,k]);const[F,ae]=x.useState(!1),ce=Zy(A,{propertyId:b,instanceId:u,slotId:R}),he=E??ce??void 0,be=r.kind==="owned"&&he!==void 0,$=Mj(he,xe=>Y.add(V(L.fromUploaded(xe,L.cleared)))),de=xe=>{const $e=El(oe,xe,Ee=>L.fileIdOf(K(Ee)),Ee=>V(L.fromPicked(Ee,L.cleared)),Y.mint),yt=new Set($e.map(Ee=>Ee.key));for(const Ee of oe)yt.has(Ee.key)||l==null||l.markRemoved(Ee);Y.replace($e)},{add:ge,onAdd:_e,choose:Re}=My(a,r.kind==="picked"?()=>ae(!0):null,r.kind==="owned"&&be?ib([P],$):null),De=$.error;return d.jsxs(Cy,{engine:Y,label:e,noun:L.noun,size:C,onAdd:_e,add:ge,choose:Re,renderTile:(xe,$e,yt)=>d.jsx("div",{className:fq,"data-annotated-item":$e,children:d.jsx(tb,{kind:P,value:K(xe.value),propertyId:b,holderPath:Fs(qs(_,xe.value),O),frame:{chrome:yt,beneath:D.length>0&&d.jsx("div",{className:dq,ref:$e===k?I:void 0,[yb]:"",children:d.jsx(Jd,{place:"cell",children:D.map(([Ee,Mt])=>d.jsx("div",{[Ad]:Ee,children:d.jsx(kc,{slot:Mt,instanceId:u,slotId:m,value:xe.value[Ee],propertyId:b,onChange:ut=>le(xe.key,Ee,()=>ut),recordContext:{itemIndex:$e,fieldKey:Ee,table:v}})},Ee))})}),crop:P==="image"?{cfg:T,cut:Q.cutOf(xe),derivativeUrl:Q.derivativeOf(xe),cropping:N.recropping(q(xe.value)),storeKey:Q.keyOf(xe.key)}:null}})}),onRemove:M,tileActions:xe=>{const $e=q(xe.value),yt=[];return N.offers($e)&&yt.push({label:"Crop",glyph:"crop",onSelect:()=>N.framing?Q.open(xe.key):N.recrop($e,Q.keyOf(xe.key))}),yt},children:[De&&d.jsx("p",{className:xl,children:De}),F&&r.kind==="picked"&&d.jsx(vc,{mode:"multi",propertyId:b,filter:r.filter,selectedIds:oe.map(xe=>L.fileIdOf(K(xe.value))),onChange:de,onClose:()=>ae(!1)}),N.framing&&Q.modal(),N.modal]})}function hq(e){const r={...yl.pages,...Xr.pages}[e];return r?r.declaration:null}function mq(e,t){const r=Yg(e,t);if(r===null)return null;const a=hq(r.table),l=a?Fr(a):null,c=l==null?void 0:l.fields[r.member],u=c?Fr(c):null;if(!u||!Pg(u.fields))return null;const m=BO(jl(u));if(m===null)return null;const{mediaKey:p,fields:g}=m,b=new Set(g.map(([v])=>v));return{annotated:m,toItem:v=>{const k=v!==null&&typeof v=="object"?v:{},w={};for(const[E,_]of Object.entries(k))b.has(E)||(w[E]=_);const j={[p]:w};for(const[E]of g)j[E]=k[E]??null;return j},toStored:v=>{const k=v[p],w=k!==null&&typeof k=="object"?{...k}:{};for(const[j]of g){const E=v[j];w[j]=typeof E=="string"&&E.trim()===""?null:E??null}return w}}}const pq=ie(vt,"flex w-full items-center rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft");ie(pq,"text-accent");ie("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",KE);ie(vt,"we-no-drag grid size-5 place-items-center rounded-[4px] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink");function ng(e,t){const r=e.variant;return!r||t==null?!0:r.cases.includes(t)}const Pk=new WeakMap;function ig(e,t){const r=e.element;if((r==null?void 0:r.fields)===void 0)return e;const a=Pk.get(e)??new Map;Pk.set(e,a);const l=a.get(t);if(l!==void 0)return l;const c=gq(r.fields,t),u=c===r.fields?e:{...e,element:{...r,fields:c}};return a.set(t,u),u}function gq(e,t){let r=!1;const a={};for(const[l,c]of Object.entries(e)){if(!ng(c,t)){r=!0;continue}const u=ig(c,t);u!==c&&(r=!0),a[l]=u}return r?a:e}function Vk(e,t,r,a,l=!1){return{kind:"object",key:e,header:t,Icon:fO(r.map(c=>c.slot)),fields:r,selectSlotId:a,lone:l}}function FO(e,t){const r=[];for(const a of e.slot_order){const l=e.slots[a];if(!ng(l,t)||!Md(l,{slots:e.slots}))continue;const c=lf(l);if(c!==null){const u={slots:e.slots,fields:c.fields},m=jl(c).filter(([,p])=>Md(p,u)&&ng(p,t)).map(([p,g])=>({slotId:rO(a,p),slot:ig(g,t)}));if(m.length===0)continue;r.push(Vk(a,dl(c,a),m,a));continue}r.push(Vk(a,{kind:"text",text:l.label},[{slotId:a,slot:ig(l,t)}],a,!0))}return r}function yq(e,t,r){if(e.header.kind==="text")return e.header.text;const a=lf(t.slots[e.key]);return a===null?e.key:sf(e.header,a,r(e.key))}function Gk(e){var t;return((t=wc(e.slotId))==null?void 0:t.field)??e.slotId}function Kk(e,t){return e.key===t||e.fields.some(r=>r.slotId===t)}function bq(e){return e.fields.map(t=>t.slotId)}function vq(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function xq(e,t,r){const a=[];for(const l of FO(e,t))for(const{slotId:c,slot:u}of l.fields)u.variant&&vq(r(c))&&a.push(c);return a}function Cd(e,t){const r=Object.entries(Kg(e)).filter(([,l])=>Ng(l)==="address").map(([l])=>l);return t[e].map(l=>{const c={...l};for(const u of r)c[u]=xi(l[u]);return c})}function rg(e,t,r){const a=XS(e,r);if(a.kind==="identity")return t.id??null;if(a.kind==="unknown")return null;const l=r.indexOf(".");if(l===-1)return t[r]??null;const c=r.slice(l+1);return Dd(c)?h5(t[r.slice(0,l)],c):null}function PO(e,t,r){return Cd(e,r).find(a=>a.id===t)}function wq(e,t,r,a){const l=PO(e,t,a);return l===void 0?null:rg(e,l,r)}function ag(e,t,r,a={},l){const c=GS(r);return kq(e,t,B3(r),c,a,l)}function kq(e,t,r,a,l,c){return(c===void 0?Cd(e,t):c.flatMap(m=>{const p=PO(e,m,t);return p===void 0?[]:[p]})).map(m=>{const p={id:m.id};for(const g of a)p[g]=m.id;for(const[g,b]of Object.entries(r))p[g]=rg(e,m,b);for(const[g,b]of Object.entries(l))p[g]=b(v=>rg(e,m,v),m.id);return p})}function Sq(e,t){if(fd(t))return Q3(t,e);if(V3(t))return e[t.slice(9)];const r=ln(t);if(r!==null)return Cd(r,e);const a=U5(t);if(a!==null)return Cd(a.table,e).map(l=>l[a.member]??null)}function Eq(e,t,r,a){const l=ln(e);return ad(l!==null?ag(l,t,r,a):Sq(t,e)??null)}function _q(e,t,r,a,l){if(r.kind==="computed")return Object.hasOwn(a.computed,t)?a.computed[t]:void 0;const{facts:c}=a;if(c!==null){if(r.kind==="fact")return Eq(r.key,c,dd(e));if(r.kind==="member"){const u=l(r.holder);if(typeof u!="string"||u==="")return;const m=m4(c,r.tables,u);return m===null?void 0:wq(m,u,r.member,c)}}}function jq(e,t,r,a){if(r.kind==="computed"){const c=Object.hasOwn(a.computed,t)?a.computed[t]:void 0;return Array.isArray(c)?c.filter(Oq):void 0}const{facts:l}=a;if(l!==null){if(r.kind==="fact")return r.table===null?void 0:ag(r.table,l,dd(e));if(r.kind==="rows")return r.tables.flatMap(c=>ag(c,l,dd(e)))}}function Oq(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Aq(){return d.jsxs("div",{className:"hp-rest-in flex min-h-0 flex-1 flex-col items-center justify-center px-8 pb-10 text-center",children:[d.jsx("span",{className:"text-ink-4","aria-hidden":"true",children:d.jsx(si,{name:"pencil",size:22,stroke:1.6})}),d.jsx("p",{className:"m-0 mt-3 text-body-lg font-medium text-ink-2",children:"Nothing selected"}),d.jsx("p",{className:"m-0 mt-1 max-w-[calc(220*var(--content))] text-body leading-[1.45] text-ink-4",children:"Click anything on the canvas to edit it"})]})}function Nq(e){const t=e.source;return t==null?void 0:t.kind}function Yk(e,t,r,a,l){const c=a.type;if(c==="row")return{kind:"row",tables:Us(a)};const u=fc(a.source);if(u!==null){const p=d4(e,t,u.slot);return(p==null?void 0:p.kind)==="row"?{kind:"member",holder:p.path,tables:Us(p.def),member:u.field}:null}if(c==="list"){const p=T9(l.fillSpec,r),g=Vj(a,p,l.sectionSlots),[b,...v]=g.kind==="table"?[]:ab(g);if(b!==void 0)return{kind:"rows",tables:[b,...v]}}if(c4(a)!==null)return{kind:"slot"};const m=Nq(a);if(m==="home"){const p=a.source.key;return typeof p=="string"&&p!==""?{kind:"fact",key:p,table:ln(p)}:null}return m==="derived"?{kind:"computed"}:null}function Mq(e,t={}){const r=[];for(const[a,l]of Object.entries(e)){if(l.type==="object"){const u=l.fields??{},m={container:a,siblings:u};for(const[p,g]of Object.entries(u)){const b=rO(a,p),v=Yk(e,m,b,g,t);v!==null&&r.push([b,v])}continue}const c=Yk(e,{},a,l,t);c!==null&&r.push([a,c])}return r}function Cq(e){return e.kind==="member"||e.kind==="fact"||e.kind==="rows"}function VO(e,t){const r=e==null||e==="",a=t==null||t==="";return r||a?r&&a:e===t?!0:typeof e=="object"||typeof t=="object"?Xk(e)===Xk(t):Qk(e)===Qk(t)}function Qk(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e)??""}function Xk(e){const t=xi(e);if(t!==null){const{source:r,...a}=t;return JSON.stringify(a)}return JSON.stringify(e,(r,a)=>a!==null&&typeof a=="object"&&!Array.isArray(a)?Object.fromEntries(Object.entries(a).sort(([l],[c])=>l.localeCompare(c))):a)}const np=2.5,Rq=1;function Ku(e){return e?e.closest(".we-acc-head"):null}function js(e){return e.closest(".we-acc")}function Zk(e,t){const r=e.offsetWidth,a=e.offsetHeight;!r||!a||(e.style.setProperty("--gx",((r+t*2)/r).toFixed(5)),e.style.setProperty("--gy",((a+t*2)/a).toFixed(5)))}function Tq(e){e.style.removeProperty("--gx"),e.style.removeProperty("--gy")}function Dq(){x.useEffect(()=>{var g;if(typeof window>"u"||(g=window.matchMedia)!=null&&g.call(window,"(prefers-reduced-motion: reduce)").matches)return;let e=null,t=np;const r=typeof ResizeObserver<"u"?new ResizeObserver(()=>{e&&Zk(e,t)}):null,a=(b,v)=>{b&&(e&&e!==b&&l(e),e=b,t=v,Zk(b,v),r==null||r.observe(b))},l=b=>{b&&(r==null||r.unobserve(b),Tq(b),e===b&&(e=null))},c=b=>{const v=Ku(b.target);v&&a(js(v),np)},u=b=>{const v=Ku(b.target);if(!v)return;const k=b.relatedTarget;k&&v.contains(k)||l(js(v))},m=b=>{const v=Ku(b.target);v&&a(js(v),Rq)},p=b=>{const v=Ku(b.target);v&&(v.matches(":hover")?a(js(v),np):l(js(v)))};return document.addEventListener("pointerover",c),document.addEventListener("pointerout",u),document.addEventListener("pointerdown",m),document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerover",c),document.removeEventListener("pointerout",u),document.removeEventListener("pointerdown",m),document.removeEventListener("pointerup",p),r==null||r.disconnect()}},[])}const Wk=2;function Jk(e){const t=new URLSearchParams;for(const[a,l]of Object.entries(e))l!=null&&l!==""&&t.set(a,l);const r=t.toString();return r===""?"":`?${r}`}const ka={catalog:"api/catalog",render:"api/render",media:e=>`api/media${Jk({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${Jk({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"},Lq={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function e2(e,t){const r=(await t.text().catch(()=>"")).trim();return new Error(r===""?`${e}: HTTP ${t.status}`:r)}function zq(e,t=(r,a)=>fetch(r,a)){const r=l=>new URL(l,e).href,a=async l=>{const c=await t(r(l));if(!c.ok)throw await e2(l,c);return await c.json()};return{base:e,async catalog(){const l=await a(ka.catalog);if(l.wire!==Wk)throw new Error(`This playground speaks wire ${Wk}, and its host answered with wire ${String(l.wire)}.`);return l},async render(l){const c=await t(r(ka.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!c.ok)throw await e2(ka.render,c);return await c.json()},media:l=>a(ka.media(l)),captureHref:(l,c)=>r(ka.capture(l,c)),liveHref:(l,c)=>r(ka.live(l,c)),subscribe(l){let c;try{c=new EventSource(r(ka.hmr))}catch{return()=>{}}const u=Object.entries(l).map(([m,p])=>{const g=Lq[m],b=()=>p();return c.addEventListener(g,b),()=>c.removeEventListener(g,b)});return()=>{for(const m of u)m();c.close()}}}}let og=null;function $q(e){og=e}function Uq(){if(og===null)throw new Error("The playground's host is not installed yet.");return og}let GO=null;function Iq(e){GO=e}function Hq(){return GO}function t2(e,t){return`${e} ${t}${e===1?"":"s"}`}function Bq(e){const t=[e.listingIntent].filter(a=>a!==null).map(a=>a.replaceAll("_"," "));t.push(t2(e.units,"unit"),t2(e.photos,"photo"));const r=t.join(", ");return r.charAt(0).toUpperCase()+r.slice(1)}function qq(e){return`${e.label} (${Bq(e.summary)})`}const Fq={sectionInstanceId:cf,slotId:S9,slotGroup:E9,slotItem:_9,slotField:j9,slotUnselectable:O9};function Pq(e,t){return`${e}${e.includes("?")?"&":"?"}v=${encodeURIComponent(t)}`}function Vq(e){return{basePath:e.basePath,stylesheets:e.stylesheets.map(t=>Pq(t,e.cssRev)),importMap:e.importMap,islandMap:e.islands,hostScriptSrc:e.hostScript}}function n2(e){const t=e.sectionSchemaByInstance??{};return{markers:Fq,assets:Vq(e),...e.pageBox===void 0?{}:{pageBox:e.pageBox},isSlotEditable:(r,a,l)=>{var u,m,p,g;const c=(u=t[r])==null?void 0:u.slots[a];return c===void 0||c.locked===!0?!1:l===void 0||((g=(p=c.fields??((m=c.element)==null?void 0:m.fields))==null?void 0:p[l])==null?void 0:g.locked)!==!0}}}const Gq=/^\/properties\/[^/]+\/poi\/search$/,Kq=/^\/properties\/[^/]+\/poi\/([^/]+)$/,lg=[{place_id:"pg-coffee",name:"Bluebird Coffee",address:"88 Market St",lat:40.798,lng:-73.972,distance_m:210,rating:4.6,review_count:312,type_label:"Coffee shop",price_level:"PRICE_LEVEL_INEXPENSIVE"},{place_id:"pg-park",name:"Riverside Park",address:"500 Riverside Dr",lat:40.8,lng:-73.97,distance_m:320,type_label:"Park"},{place_id:"pg-grocer",name:"Corner Grocery",address:"45 Vine Ave",lat:40.796,lng:-73.968,distance_m:480,rating:4.1,review_count:88,type_label:"Grocery store"},{place_id:"pg-school",name:"Lincoln Elementary School",address:"12 School St",lat:40.803,lng:-73.965,distance_m:640,type_label:"Elementary school"},{place_id:"pg-transit",name:"Metro Station — 5th & Main",address:null,lat:40.799,lng:-73.975,distance_m:750,type_label:"Transit station"},{place_id:"pg-gym",name:"Eastside Fitness",address:"300 Water St",lat:40.805,lng:-73.961,distance_m:1100,rating:3.9,review_count:174,type_label:"Gym",summary:"A neighborhood gym with a lap pool and early hours."}];function Yq(e){const t=typeof e=="object"&&e!==null?e.query:void 0,r=typeof t=="string"?t.trim().toLowerCase():"";return r?{results:lg.filter(a=>{var l;return a.name.toLowerCase().includes(r)||(((l=a.address)==null?void 0:l.toLowerCase().includes(r))??!1)})}:{results:lg}}let Qq=0;function Xq(e,t={}){const r=(t.method??"GET").toUpperCase();if(r==="POST"&&Gq.test(e))return Promise.resolve(Yq(t.json));const a=r==="GET"?Kq.exec(e):null;if(a){const l=decodeURIComponent(a[1]),c=lg.find(u=>u.place_id===l);if(c)return Promise.resolve({...c,id:`pg-row-${++Qq}`})}return Promise.reject(new Error(`No API backend in the playground: ${t.method??"GET"} ${e}. This capability is served by the host application; supply a provider to use it here.`))}function Zq(e,t,r){const a=Math.min(Math.max(Math.round(e.nx*t),0),Math.max(t-1,0)),l=Math.min(Math.max(Math.round(e.ny*r),0),Math.max(r-1,0)),c=Math.max(Math.min(Math.round(e.nw*t),t-a),1),u=Math.max(Math.min(Math.round(e.nh*r),r-l),1);return{sx:a,sy:l,sw:c,sh:u}}function Wq(e,t){return new Promise((r,a)=>{const l=t.createElement("img");l.onload=()=>r(l),l.onerror=()=>a(new Error(`Could not load ${e} to crop it.`)),l.src=e})}async function Jq(e,t,r=document){const a=await Wq(e,r),{sx:l,sy:c,sw:u,sh:m}=Zq(t,a.naturalWidth,a.naturalHeight),p=r.createElement("canvas");p.width=u,p.height=m;const g=p.getContext("2d");if(!g)throw new Error("No 2d canvas context; cannot crop.");g.drawImage(a,l,c,u,m,0,0,u,m);const b=await new Promise(v=>p.toBlob(v));if(!b)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(b)}const mf="2026-01-01T00:00:00.000Z",i2=new Map;function Sb(e){let t=i2.get(e);return t===void 0&&(t=Uq().media(e).catch(()=>({items:[],contacts:[],lists:{}})),i2.set(e,t)),t}async function eF(e){const{items:t,lists:r}=await Sb(e);return j5(r,tF(t))}function tF(e){return[...rF(e),...aF(e),...oF(e),...lF(e)]}async function nF(e){return(await Sb(e)).contacts}async function iF(e,t){var c;const{items:r,contacts:a}=await Sb(e);return((c=r.find(u=>u.id===t))==null?void 0:c.src)||a.map(u=>u.images[t]).find(u=>u!==void 0)}function rF(e){return e.filter(t=>t.kind==="photo").map(t=>Zd({id:t.id,kind:"image",name:t.name,added_at:mf,file_url:t.src}))}function aF(e){return e.filter(t=>t.kind==="video").map(t=>{const r=t.provider!==void 0,a=t.src===""?{}:{poster:t.src},l=!r&&(t.ready??!0)?{encode:t.src}:{};return Zd({id:t.id,kind:"video",name:t.name,added_at:mf,duration_ms:t.durationMs??null,url:r?"":null,provider:t.provider??null,renditions:{...a,...l}})})}function oF(e){return e.filter(t=>t.kind==="tour").map(t=>Zd({id:t.id,kind:"tour",name:t.name,added_at:mf,url:t.url??"",provider:t.provider??null,renditions:t.src===""?{}:{poster:t.src}}))}function lF(e){return e.filter(t=>t.kind==="document").map(t=>Zd({id:t.id,kind:"document",name:t.name,added_at:mf,mime:t.mime??null,bytes:t.sizeBytes??null,renditions:t.src===""?{}:{poster:t.src}}))}function sF(e){return Promise.reject(new Error(`${e} is served by the host application and has no playground equivalent. A fixture's media is read-only.`))}function cF(e){return eF(e)}function uF(e,t,r){return sF("Pasting a link")}const dF=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/,r2=new Map;function fF(e,t){const r=dF.exec(t);if(r===null)return Promise.reject(new Error(`Unknown crop ${t}.`));const[,a,l,c,u,m]=r,p={nx:Number(l),ny:Number(c),nw:Number(u),nh:Number(m)};let g=r2.get(t);return g||(g=iF(e,a).then(b=>{if(!b)throw new Error(`The fixture's property has no media ${a} to crop.`);return Jq(b,p)}),r2.set(t,g)),g}async function hF(e,t,r){var p;const[a,l]=t.split(".");if(e.home!=="library"||a!=="contacts")throw new Error(`The fixture holds no owned media at '${t}'.`);const c=Hq(),m=(p=(c===null?[]:await nF(c)).find(g=>g.id===l))==null?void 0:p.images[r];if(m===void 0)throw new Error(`The fixture's contact ${l} has no image ${r}.`);return m}function pf(){return Promise.reject(new Error("Uploads are served by the host application. The dev media pack is read-only."))}function mF(e,t,r){return pf()}function pF(e,t,r){return pf()}function gF(e,t,r){return pf()}function yF(e,t,r){return pf()}const Eb="Uploading is served by the host application; the playground has no upload backend.";function bF(e,t,r,a){return Promise.reject(new Error(Eb))}function vF(e,t,r,a){return Promise.reject(new Error(Eb))}function xF(e,t,r){return Promise.reject(new Error(Eb))}const wF={postListUploadWithProgress:bF,postListLink:vF,withdrawListItem:xF,mediaFactsQuery:e=>({queryKey:["media-facts",e],queryFn:async()=>({facts:await cF(e)})})};function sg(e){return e===null||typeof e!="object"?JSON.stringify(e)??"undefined":Array.isArray(e)?`[${e.map(sg).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${sg(e[t])}`).join(",")}}`}function kF(e){return Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[]}function SF(e,t,r){const a=new Map(t.map(l=>[l[r],l]));return kF(e).some(l=>{const c=a.get(l[r]);return c!==void 0&&Object.keys(c).some(u=>u in l&&!VO(l[u],c[u]))})}function EF(e,t,r,a,l,c){if(r.kind==="rows"){const m=jq(e,t,r,l);return m!==void 0&&SF(a,m,ob)}const u=_q(e,t,r,l,c);return u===void 0?!1:qz(a)?Ps(a)!==Ps(u):!VO(a,u)}function _F(e,t,r){if(t===null)return[];const a={facts:t.facts,computed:t.computed},l=u=>nd(e.slots,u)??nd(t.resolvedProps.slots,u),c=[];for(const[u,m]of Mq(r.slots)){if(!Cq(m))continue;const p=nd(e.slots,u),g=Hg(r.slots,u);p===void 0||g===void 0||!EF(g,u,m,p,a,l)||c.push({id:`${u}:scalar::@${sg(p)}`,kind:"scalar",label:g.label,slotId:u})}return c}const jF={fact:"border-accent/40 text-accent",computed:"border-accent/40 text-accent",authored:"border-line text-ink-2",empty:"border-dashed border-line text-ink-4",edited:"border-honey-2 bg-honey/20 text-honey-ink"};function OF(e){return d.jsx("span",{className:"inline-flex flex-shrink-0 items-center gap-1","data-testid":"provenance-chips",children:e.chips.map(t=>d.jsx("span",{"data-testid":"provenance-chip","data-provenance":t.kind,"data-slots":t.slots.map(r=>r.id).join(" "),title:`${t.kind}: ${t.slots.map(r=>r.ref===null?r.id:`${r.id} ← ${r.ref}`).join(", ")}`,className:`pointer-events-auto inline-flex h-[18px] cursor-help items-center rounded-full border bg-canvas px-1.5 font-mono text-[10px] font-normal normal-case leading-none tracking-[0.02em] ${jF[t.kind]}`,children:t.kind},t.kind))})}function AF(e){return d.jsxs("div",{className:"relative",children:[e.children,d.jsx("div",{className:"pointer-events-none absolute right-10 top-[15px]",children:d.jsx(OF,{chips:e.chips})})]})}function NF(e,t){const r=!t,a=e.required&&!r;return{hidden:r,locked:a,title:a?"Required section — cannot hide":r?"Hidden from live page":"Visible on live page"}}function KO(e){const{variant:t}=e;return t===null||t.locked||t.cases.length<2?null:t.cases}function MF(e,t){return t||(e==null?void 0:e.kind)==="session"?{kind:"edited",ref:null}:e===void 0?{kind:"empty",ref:null}:e.kind==="fact"||e.kind==="computed"?{kind:e.kind,ref:e.ref}:{kind:e.kind,ref:null}}function CF(e,t,r){const a=new Map;for(const l of e){const{kind:c,ref:u}=MF(t==null?void 0:t[l],r(l));a.set(c,[...a.get(c)??[],{id:l,ref:u}])}return[...a].map(([l,c])=>({kind:l,slots:c}))}const a2="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function RF(e){const t=NF(e.display,e.enabled);return d.jsxs("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4","data-testid":"section-header",children:[d.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:d.jsx("h2",{className:"m-0 truncate text-body-lg font-semibold tracking-[-0.005em] text-ink",children:e.label})}),d.jsxs("div",{className:"inline-flex flex-shrink-0 items-center gap-0.5",children:[d.jsx("button",{type:"button","data-testid":"section-eye","aria-pressed":t.hidden,"aria-label":t.title,onClick:()=>!t.locked&&e.onSetEnabled(t.hidden),disabled:t.locked,title:t.title,className:`${a2} disabled:cursor-not-allowed disabled:text-ink-4 disabled:opacity-100 ${t.hidden?"bg-[rgba(20,18,13,0.06)] text-ink [box-shadow:inset_0_0_0_1px_var(--color-line)]":"bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink disabled:hover:bg-transparent disabled:hover:text-ink-4"}`,children:d.jsx(si,{name:t.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),KO(e.display)?d.jsx("button",{type:"button","data-testid":"section-gear",onClick:e.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${a2} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:d.jsx(si,{name:"settings",size:15,stroke:1.8})}):null]})]})}const TF=ie("group/case flex cursor-pointer items-center gap-2.5 rounded border border-line bg-canvas px-3 py-2.5","transition-[border-color,background-color] hover:border-[var(--color-ink-4)]","has-[:focus-visible]:border-accent","data-[selected=true]:border-accent data-[selected=true]:bg-accent-soft");function DF(e){const t=KO(e.display),r=xq(e.sectionSchema,e.variant,e.slotValue).length;return d.jsxs(d.Fragment,{children:[d.jsx("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4",children:d.jsxs("nav",{className:"inline-flex min-w-0 items-center gap-1.5 text-body-lg tracking-[-0.005em]","aria-label":"Breadcrumbs",children:[d.jsx("button",{type:"button","data-testid":"settings-back",onClick:e.onBack,className:"max-w-[calc(220*var(--content))] cursor-pointer truncate border-0 bg-transparent p-0 font-medium text-ink-3 hover:bg-transparent transition-colors hover:text-ink hover:underline hover:underline-offset-[3px]",children:e.label}),d.jsx("span",{className:"inline-grid place-items-center leading-none text-ink-4","aria-hidden":"true",children:d.jsx(si,{name:"chevRight",size:12,stroke:1.8})}),d.jsx("span",{className:"max-w-[calc(220*var(--content))] truncate font-semibold text-ink",children:"Settings"})]})}),d.jsx("div",{className:"hp-sb-scroll min-h-0 flex-1 overflow-y-auto px-4 pb-6 pt-2","data-testid":"section-settings",children:t?d.jsxs("section",{"aria-label":"Variation",className:"flex flex-col gap-2.5",children:[d.jsx("h3",{className:"px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:"Variation"}),d.jsx("div",{className:"flex flex-col gap-2",children:t.map(a=>d.jsxs("label",{"data-selected":a.value===e.variant,className:TF,children:[d.jsx("input",{type:"radio",className:"sr-only",name:`variation-${e.instanceId}`,value:a.value,checked:a.value===e.variant,onChange:()=>e.onSetVariant(a.value)}),d.jsx("span",{"aria-hidden":"true",className:"grid size-4 flex-shrink-0 place-items-center rounded-full border-[1.5px] border-ink-4 transition-colors group-data-[selected=true]/case:border-accent",children:d.jsx("span",{className:"size-2 rounded-full bg-accent opacity-0 transition-opacity group-data-[selected=true]/case:opacity-100"})}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",children:a.label})]},a.value))}),r>0?d.jsx("p",{"aria-live":"polite",className:"rounded border border-line bg-accent-soft px-3 py-2 text-[length:calc(12.5*var(--content))] leading-[1.45] text-ink-2",children:r===1?"1 empty field in this variation":`${r} empty fields in this variation`}):null]}):d.jsx("p",{className:"px-1 py-3 text-[length:calc(12.5*var(--content))] text-ink-3",children:"Nothing to configure in this section."})})]})}function LF(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function o2(e){return d.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M2.5 7h9M8 3.5 11.5 7 8 10.5"})})}function zF(e){return d.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function l2(e){return d.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7"})})}function $F({items:e,onApply:t}){const r=e??[],a=r.length,l=r.map(ne=>ne.id).join("|"),[c,u]=x.useState(!1),[m,p]=x.useState("idle"),[g,b]=x.useState(!1),[v,k]=x.useState(0),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef(r),O=x.useRef(!0);x.useLayoutEffect(()=>{C.current=r});const A=x.useRef(LF()).current,D=x.useCallback(ne=>{const Y=w.current;if(A||document.hidden||Y==null||typeof Y.animate!="function"){b(!1),u(!1),p("idle"),ne==null||ne();return}b(!0);const oe=Y.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});oe.onfinish=()=>{b(!1),u(!1),p("idle"),ne==null||ne()}},[A]);x.useEffect(()=>(j.current!=null&&clearTimeout(j.current),a>0&&m==="idle"?l!==_.current&&!c&&(j.current=setTimeout(()=>{u(!0)},550)):a===0&&c&&!g&&m==="idle"&&D(),()=>{j.current!=null&&clearTimeout(j.current)}),[a,l,c,m,g,D]),x.useLayoutEffect(()=>{if(!c||m!=="idle"||A||g)return;const ne=w.current;ne!=null&&typeof ne.animate=="function"&&!document.hidden&&ne.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[c,m,A,g]),x.useEffect(()=>{if(m!=="applying")return;const ne=Y=>{Y.preventDefault(),Y.returnValue=""};return window.addEventListener("beforeunload",ne),()=>window.removeEventListener("beforeunload",ne)},[m]),x.useEffect(()=>(O.current=!0,()=>{O.current=!1,j.current!=null&&clearTimeout(j.current),E.current!=null&&clearTimeout(E.current)}),[]);const R=()=>{const ne=C.current;k(ne.length),p("applying"),(async()=>{try{if(await t(ne),!O.current)return;u(!1),p("success"),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{D(()=>{_.current=null})},1200)}catch{if(!O.current)return;p("error")}})()},P=()=>{_.current=l,D()};if(!c&&m!=="success"&&!g)return null;const L=m==="applying",T=L?v:a,H=T===1?d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:"1"})," change to your property details"]}):d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:T})," changes to your property details"]});return d.jsx("div",{className:"pointer-events-none absolute bottom-[10px] left-0 right-0 z-[6]","aria-live":"polite",children:d.jsx("div",{className:"pointer-events-none",ref:w,children:d.jsx("div",{className:"pointer-events-auto relative mx-3 rounded-[calc(11*var(--content))] border border-line bg-canvas px-[calc(13*var(--content))] pb-[calc(12*var(--content))] pt-[calc(11*var(--content))] shadow-[0_8px_22px_-8px_rgba(20,18,13,.26),0_2px_6px_rgba(20,18,13,.08)] data-[done]:border-[#cfe6d4] data-[done]:bg-[#eef6ef]","data-done":m==="success"?"":void 0,children:m==="success"?d.jsxs("div",{className:"flex items-center gap-2 text-body font-semibold text-good",children:[d.jsx("span",{className:"grid flex-shrink-0 place-items-center [animation:we-ub-pop_.34s_cubic-bezier(.2,1.3,.4,1)_both]",children:d.jsx(zF,{})}),"Updated everywhere"]}):m==="error"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4]",children:[d.jsx("div",{className:"font-semibold text-danger",children:"Couldn't update"}),d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Something went wrong. Please try again."})]}),d.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2",onClick:P,"aria-label":"Dismiss",children:d.jsx(l2,{})})]}),d.jsxs("button",{type:"button","data-action":"retry",className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px]",onClick:R,children:["Retry ",d.jsx(o2,{})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4] text-ink-2",children:[H,d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Update them everywhere these details are used."})]}),d.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2 disabled:cursor-default disabled:opacity-50",onClick:P,disabled:L,"aria-label":"Dismiss",children:d.jsx(l2,{})})]}),d.jsx("button",{type:"button","data-action":"apply",disabled:L,className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px] disabled:cursor-default disabled:hover:bg-accent disabled:active:translate-y-0",onClick:R,children:L?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"inline-block size-[calc(14*var(--content))] animate-spin rounded-full border-2 border-white/40 border-t-white",role:"status","aria-label":"Updating"}),"Updating…"]}):d.jsxs(d.Fragment,{children:["Update everywhere ",d.jsx(o2,{})]})})]})})})})}const UF="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",IF="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function HF({items:e}){const[t,r]=x.useState([]),a=e.filter(u=>!t.includes(u.id)),l=t.length>0&&a.length===0,c=x.useCallback(u=>{r(m=>[...m,...u.map(p=>p.id)])},[]);return d.jsxs("div",{className:"instance-panel__we",children:[d.jsx("div",{className:"instance-panel__we-anchor",children:d.jsx($F,{items:a,onApply:c})}),a.length>0||l?d.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":l?"applied":"preview",children:l?IF:UF}):null]})}const BF={apiFetch:Xq,getCropDerivativeUrl:fF,postLink:uF,stageOwnedMedia:mF,ownedMediaUrl:hF,discardStagedMedia:pF,uploadContentMedia:gF,contentMediaUrl:yF};function qF(e,t,r){return x.useMemo(()=>{const a={session:{property_id:e,listing_intent:null},select:l=>{if(l===null){r(null);return}if(l.kind==="section"){r({kind:"section",instanceId:l.instance_id});return}r({kind:"slot",instanceId:l.instance_id,slotId:l.slot_id,...l.item_index!==void 0?{itemIndex:l.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:l=>l(a),capabilities:{},api:BF,MediaPicker:FF}},[e,t,r])}function FF(e){return d.jsx(z7,{...e,capabilities:{upload:!1,manage:!1}})}function PF(e,t){const{selection:r}=e;if((r==null?void 0:r.kind)==="slot"&&!(r.instanceId!==e.instanceId||r.slotId!==t))return r.itemIndex}function VF(e,t){var r;return CF(t,(r=e.payload)==null?void 0:r.provenance,a=>e.override.slots[a]!==void 0)}function Ds(e,t){var l;const r=wc(t);if(r!==null)return nd({[r.object]:Ds(e,r.object)},t);const a=e.override.slots[t];return a!==void 0?a:(l=e.payload)==null?void 0:l.resolvedProps.slots[t]}function GF(e,t,r){const a=wc(t);if(a===null)return e.onApplySlot(t,r);const l=bI({[a.object]:Ds(e,a.object)},t,r)[a.object];e.onApplySlot(a.object,l)}function KF(e){var m;const t=qF(e.fixture,e.selection,e.onSelect);Dq();const r=x.useMemo(()=>new BT,[]),a=e.displayState.variant,l=x.useMemo(()=>FO(e.sectionSchema,a),[e.sectionSchema,a]),c=x.useMemo(()=>_F(e.override,e.payload,e.sectionSchema),[e.override,e.payload,e.sectionSchema]),u=((m=e.selection)==null?void 0:m.kind)==="slot"&&e.selection.instanceId===e.instanceId?e.selection.slotId:null;return d.jsxs("aside",{className:"instance-panel","data-testid":"instance-panel","data-instance-id":e.instanceId,children:[e.settingsOpen?d.jsx(DF,{instanceId:e.instanceId,label:e.label,display:e.display,sectionSchema:e.sectionSchema,variant:a,slotValue:p=>Ds(e,p),onSetVariant:e.onSetVariant,onBack:e.onCloseSettings}):d.jsx(RF,{label:e.label,display:e.display,enabled:e.displayState.enabled,onSetEnabled:e.onSetEnabled,onOpenSettings:e.onOpenSettings}),e.settingsOpen?null:e.renderError?d.jsx("p",{className:"instance-panel__error","data-testid":"render-error",children:e.renderError}):null,e.settingsOpen?null:e.payload===null?d.jsx("p",{className:"instance-panel__empty","data-testid":"panel-loading",children:"Loading…"}):d.jsx(qT,{client:r,children:d.jsx(p8,{api:wF,children:d.jsx(QL,{ports:t,children:d.jsx(Jd,{place:"panel",children:d.jsxs("div",{className:"instance-panel__dock",children:[d.jsxs("div",{className:"hp-sb-scroll instance-panel__cards","data-testid":"slot-cards","data-dirty":c.length>0?"":void 0,children:[l.map(p=>d.jsx(AF,{chips:VF(e,bq(p)),children:d.jsx(hO,{open:u!=null&&Kk(p,u),onToggle:()=>u!=null&&Kk(p,u)?e.onSelect({kind:"section",instanceId:e.instanceId}):e.onSelect({kind:"slot",instanceId:e.instanceId,slotId:p.selectSlotId}),icon:p.Icon?d.jsx(p.Icon,{size:14}):null,title:yq(p,e.sectionSchema,g=>Ds(e,g)),scrollKey:p.key,children:d.jsx(bb,{fields:p.fields.map(g=>[Gk(g),g.slot]),lone:p.lone,renderField:(g,b)=>{const v=p.fields.find(k=>Gk(k)===g).slotId;return d.jsx(kc,{slot:b,instanceId:e.instanceId,slotId:v,value:Ds(e,v),propertyId:e.fixture,onChange:k=>GF(e,v,k),selectedItemIndex:PF(e,v)})}})})},p.key)),l.length===0?d.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),d.jsx(HF,{items:c})]})})})})})]})}function YF(e,t){return e.find(r=>r.pages.includes(t))??null}function QF(e,t,r,a){const l=t.endsWith("/")?t:`${t}/`;if(!e.startsWith(l))return null;const c=e.indexOf("#"),u=c===-1?null:e.slice(c+1),m=(c===-1?e:e.slice(0,c)).slice(l.length).split("/").filter(Boolean),[p,g,b,v,...k]=m;if(p!=="fixtures"||g===void 0||b!=="live"||k.length>0)return null;const w=v===void 0?"/":`/${decodeURIComponent(v)}`,j=r.find(_=>_.path===w);if(!j)return null;const E=YF(a,j.id);return E?{pageId:j.id,canvasId:E.id,anchor:u||null}:null}const ip="box-border inline-flex h-10 w-full items-center justify-center gap-1.75 rounded-lg border text-center text-[length:calc(13.5*var(--content))] font-semibold tracking-[-0.005em]",XF="group cursor-pointer border-line bg-canvas text-ink transition-[background-color,border-color,box-shadow,color,transform] hover:border-[var(--color-ink-4)] hover:bg-[#fafaf8] active:translate-y-[0.5px]",ZF="cursor-pointer border-honey-2 bg-honey text-honey-ink transition-[background-color,border-color,box-shadow,color,transform] hover:bg-honey-2 hover:shadow-[0_2px_6px_rgba(40,44,50,0.12)] active:translate-y-[0.5px]",WF="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function JF({host:e,templateName:t,fixture:r,output:a,format:l,canvas:c,pagePath:u}){const m=a==="website"?{href:e.liveHref(r,u??"/"),title:`Open this page as it would publish — ${t}`}:null,p=a==="image"?{href:e.captureHref("bundle",{fixture:r,format:l,canvas:c}),title:`Download every page of this canvas as a zip — ${t}`}:a==="document"?{href:e.captureHref("print",{fixture:r,format:l}),title:`Download the PDF — ${t}`}:null;return d.jsx("footer",{className:"flex-shrink-0 border-t border-line-soft bg-canvas p-3","data-testid":"panel-footer",children:d.jsxs("div",{className:p&&!m?"w-full":"grid w-full grid-cols-2 gap-2",children:[m?d.jsxs("a",{href:m.href,target:"_blank",rel:"noopener noreferrer","data-testid":"view-live",title:m.title,className:`${ip} ${XF}`,children:[d.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:d.jsx(si,{name:"external",size:12,stroke:1.6})}),d.jsx("span",{"data-testid":"view-live-label",children:"View live"})]}):null,p?d.jsxs("a",{href:p.href,"data-testid":"download",title:p.title,className:`${ip} ${ZF}`,children:[d.jsx(UE,{size:14,className:"h-[calc(14*var(--content))] w-[calc(14*var(--content))]"}),d.jsx("span",{"data-testid":"download-label",children:"Download"})]}):d.jsx("button",{type:"button",disabled:!0,"data-testid":"publish",title:"Publishing needs a property and a deliverable — preview publish states in the application",className:`${ip} ${WF}`,children:d.jsx("span",{children:"Publish"})})]})})}function eP(e,t,r,a){const l=e.ownerDocument,c=[],u=new Map;for(const m of Array.from(e.children)){const p=m,g=p.getAttribute(cf);g&&u.set(g,p)}for(const m of t){const p=u.get(m.instance_id),g=(p==null?void 0:p.dataset.svId)!==m.section_version_id;p&&g&&(a==null||a(p),p.remove());const b=p&&!g,v=b?p:r(m,l);b||c.push(v),e.appendChild(v),u.delete(m.instance_id)}return u.forEach(m=>{a==null||a(m),m.remove()}),c}function YO(e){return e==null?void 0:e.__trCanvasIslands}function tP(e,t,r,a){const l=e==null?void 0:e.querySelector(`[${cf}="${r}"]`);if(!l)return!1;const c=l.querySelector(":scope > .we-section-body")??l,u=YO(t);return u==null||u.unmountRoot(l),c.innerHTML=a,u==null||u.hydrateRoot(l),!0}function nP(){return{slots:{}}}function Ys(e,t,r){var a;return((a=e[t])==null?void 0:a[r])??nP()}function _b(e,t,r,a){return{...e,[t]:{...e[t],[r]:a}}}function iP(e,t,r,a,l){const c=Ys(e,t,r);return _b(e,t,r,{...c,slots:{...c.slots,[a]:l}})}function rP(e,t,r,a){return _b(e,t,r,{...Ys(e,t,r),enabled:a})}function aP(e,t,r,a){return _b(e,t,r,{...Ys(e,t,r),variant:a})}function oP(e,t){const r=e.enabled??(t==null?void 0:t.enabled)??!0,a=e.variant??(t==null?void 0:t.variant);return a===void 0?{enabled:r}:{enabled:r,variant:a}}function lP(e,t){const r={};for(const[a,l]of Object.entries(e[t]??{}))Object.keys(l.slots).length>0&&(r[a]={slots:l.slots});return r}function sP(e,t){const r={};for(const[a,l]of Object.entries(e[t]??{}))l.enabled===void 0&&l.variant===void 0||(r[a]={...l.enabled===void 0?{}:{enabled:l.enabled},...l.variant===void 0?{}:{variant:l.variant}});return r}function cP(e,t){return Object.keys(e).filter(r=>t[r]!==e[r])}function uP(e,t){if(!t.some(a=>a in e))return e;const r={...e};for(const a of t)delete r[a];return r}function s2(e,t,r,a){return{...e,[t]:{...e[t],[r]:a}}}function dP(e,t,r){const a=e[t];if(!a||!(r in a))return e;const l={...a};return delete l[r],{...e,[t]:l}}function fP(e){const{host:t,fixture:r,doc:a,resolvedDisplay:l,sessions:c,pages:u,frameFor:m}=e,{edits:p,setEdits:g}=c,[b,v]=x.useState({}),[k,w]=x.useState({}),j=[r,a??"",...u.map(Q=>Q.id)].join("\0"),[E,_]=x.useState(j);E!==j&&(_(j),v({}),w({}));const C=x.useRef(b);C.current=b;const O=x.useRef(m);O.current=m;const A=x.useRef(u);A.current=u;const D=x.useRef(p);D.current=p;const R=x.useRef(r);R.current=r;const P=x.useRef(a);P.current=a;const L=x.useRef(new Map),T=x.useCallback(Q=>Ys(p,r,Q),[p,r]),H=x.useCallback((Q,N)=>{var q;return((q=k[Q])==null?void 0:q[N])??null},[k]),ne=x.useCallback(Q=>{var N;for(const q of u){const I=(N=k[q.id])==null?void 0:N[Q];if(I!==void 0)return I}return null},[k,u]),Y=x.useCallback(Q=>{var N;for(const q of u){const I=(N=b[q.id])==null?void 0:N[Q];if(I)return I}return null},[b,u]),oe=x.useCallback(Q=>{var N;return oP(Ys(p,r,Q),((N=Y(Q))==null?void 0:N.display)??(l==null?void 0:l[Q]))},[p,r,Y,l]),K=x.useCallback(async(Q,N,q)=>{var $;const I=Q.id,F=R.current,ae=P.current,ce=`${I}\0${N}`,he=(L.current.get(ce)??0)+1;L.current.set(ce,he);const be=()=>F!==R.current||ae!==P.current||L.current.get(ce)!==he;try{const de=await t.render({page:I,instance:N,fixture:F,session:lP(D.current,F),display:sP(D.current,F)});if(be())return;const ge=($=C.current[I])==null?void 0:$[N];if(v(De=>s2(De,I,N,de)),w(De=>dP(De,I,N)),!q||(ge==null?void 0:ge.html)===de.html)return;const{doc:_e,win:Re}=O.current(I);tP(_e,Re,N,de.html)}catch(de){if(be())return;const ge=de instanceof Error?de.message:String(de);w(_e=>s2(_e,I,N,ge))}},[t]),X=x.useCallback((Q,N)=>{var I;if((I=C.current[Q])!=null&&I[N])return;const q=A.current.find(F=>F.id===Q);q&&K(q,N,!1)},[K]),le=x.useCallback(Q=>{var N;for(const q of A.current)((N=C.current[q.id])==null?void 0:N[Q])!==void 0&&K(q,Q,!0)},[K]),M=x.useCallback(Q=>{D.current=Q,g(Q);for(const N of A.current)for(const q of Object.keys(C.current[N.id]??{}))K(N,q,!0)},[K,g]),V=x.useCallback((Q,N,q)=>{M(iP(D.current,R.current,Q,N,q))},[M]),te=x.useCallback((Q,N)=>{M(rP(D.current,R.current,Q,N))},[M]),pe=x.useCallback((Q,N)=>{M(aP(D.current,R.current,Q,N))},[M]);return x.useMemo(()=>({overrideFor:T,displayFor:oe,payloads:b,errorOn:H,errorFor:ne,payloadFor:Y,ensureLoaded:X,reload:le,applySlot:V,setEnabled:te,setVariant:pe}),[T,oe,b,H,ne,Y,X,le,V,te,pe])}const hP={slots:{},slot_order:[]},mP={required:!1,variant:null},pP=[];function c2(e){return e?e.kind==="section"?{kind:"section",instance_id:e.instanceId}:{kind:"slot",instance_id:e.instanceId,slot_id:e.slotId,...e.itemIndex!==void 0?{item_index:e.itemIndex}:{}}:null}function gP(e){return e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{}}}function yP(e,t){if(!e)return[];const r=[];for(const a of e.pages){const l=t.find(c=>c.id===a);l&&r.push(l)}return r}function Yu(e,t,r,a){var p;const l=((p=t.doc)==null?void 0:p.getElementById(e))??null;if(!l||!r)return;const c=l.getBoundingClientRect(),u=DC({top:c.top,height:c.height},t.wrapper.offsetTop,a,r.scrollTop),m=TC(u,r.clientHeight,r.scrollTop,RC);m!==null&&r.scrollTo({top:m,behavior:"smooth"})}function u2(e,t){return e.querySelector(`[${cf}="${Ha(t)}"]`)}function gi(e){const t=JSON.stringify(e);return x.useMemo(()=>e,[t])}function bP(e){var Ot,kt,Ei;const{host:t,catalog:r,view:a,onViewChange:l,sessions:c}=e,u=x.useRef(null),m=x.useRef([]),[p,g]=x.useState({}),[b,v]=x.useState(1),[k,w]=x.useState(0),[j,E]=x.useState(!1),[_,C]=x.useState(null),O=a.fixture,A=r.fixtures.find(ue=>ue.id===O),D=A==null?void 0:A.doc,R=A==null?void 0:A.display,[P,L]=x.useState(null),T=x.useCallback(ue=>{L(null),l(ue)},[l]);x.useEffect(()=>{Iq(O)},[O]);const H=x.useMemo(()=>new URL(t.base).pathname,[t.base]),ne=gi(r.template.pages),Y=gi(r.template.canvases),oe=gi(r.islands.map),K=gi(r.stylesheets),X=r.islands.hostScript,le=gi(r.islands.importMap),M=gi(Object.fromEntries(r.template.instances.map(ue=>[ue.instanceId,ue.sectionSchema]))),V=gi(Object.fromEntries(r.template.instances.map(ue=>[ue.instanceId,ue.section]))),te=gi(r.template.instances),pe=r.template.output,Q=pe!=="website",N=Q?r.template.formats:[],q=gi(Q?N.find(ue=>ue.id===a.format)??N[0]??null:null),I=q!==null&&q.bleed>0?q.bleed:null,F=x.useMemo(()=>q?{formatId:q.id,width:q.cssWidth,height:q.cssHeight,tokens:q.tokens}:void 0,[q]),ae=x.useMemo(()=>F?{...F,direction:"row"}:void 0,[F]),ce=Y.find(ue=>ue.id===a.canvasId)??(a.canvasId===null?Y[0]??null:null),he=Y.length>0&&ce===null,be=x.useMemo(()=>ce?yP(ce,ne):pP,[ce,ne]),$=x.useMemo(()=>be.map(ue=>({id:ue.id})),[be]),de={basePath:H,stylesheets:K,cssRev:String(k),islands:oe,hostScript:X,importMap:le},ge=x.useMemo(()=>$x(n2({...de,sectionSchemaByInstance:M,...F?{pageBox:F}:{}})),[H,K,k,oe,X,le,M,F]),_e=x.useMemo(()=>$x(n2({...de,...F?{pageBox:F}:{}})),[H,K,k,oe,X,le,F]),Re=x.useMemo(()=>_e.srcdoc(),[_e]),De=x.useMemo(()=>ae?_e.srcdoc(ae):Re,[_e,ae,Re]),[xe,$e]=x.useState(Re);xe!==Re&&($e(Re),g({}));const yt=x.useCallback(ue=>{const ke=m.current.find(je=>je.key===ue);return{doc:(ke==null?void 0:ke.doc)??null,win:(ke==null?void 0:ke.iframe.contentWindow)??null}},[]),Ee=fP({host:t,fixture:O,doc:D,resolvedDisplay:R,sessions:c,pages:$,frameFor:yt}),Mt=gi(te.map(ue=>ue.instanceId).filter(ue=>!Ee.displayFor(ue).enabled)),[ut,ni]=x.useState(null),ui=x.useRef(a.selection);ui.current=a.selection;const Si=x.useRef(Ee);Si.current=Ee;const Ut=x.useRef(be);Ut.current=be;const ii=x.useRef(b);ii.current=b;const sn=x.useMemo(()=>be.map(ue=>{const ke=ue.direction==="row",je=ke?ae:F;return{key:ue.id,srcdoc:ke?De:Re,label:ue.label,title:`Canvas preview — ${ue.label}`,...je?{pageBox:je}:{}}}),[be,Re,De,F,ae]);x.useEffect(()=>{const ue=u.current;if(!ue)return;const ke=NC(ue,sn);m.current=ke;const je=ke.map(Te=>{const qe=()=>{dC(Te.doc)&&g(Ie=>({...Ie,[Te.key]:!0}))};return Te.iframe.addEventListener("load",qe),()=>Te.iframe.removeEventListener("load",qe)});return()=>{for(const Te of je)Te()}},[sn]),x.useEffect(()=>{for(const ue of m.current)CC(ue.overlay,j?I:null)},[j,I,sn]),x.useEffect(()=>{const ue=u.current;if(!ue||typeof ResizeObserver>"u")return;const ke=new ResizeObserver(je=>{var Ie;const Te=(Ie=je[0])==null?void 0:Ie.contentRect;if(!(Te!=null&&Te.width))return;const qe=LM(Te.width);v($M(qe,{availableWidthPx:Te.width,availableHeightPx:Te.height},F?{width:F.width,height:F.height}:void 0))});return ke.observe(ue),()=>ke.disconnect()},[F]),x.useEffect(()=>{var ue;(ue=u.current)==null||ue.style.setProperty("--we-scale",String(b))},[b]),x.useEffect(()=>{var ke;if(F)return;const ue=[];for(const je of m.current){if(!p[je.key])continue;const Te=(ke=je.doc)==null?void 0:ke.getElementById("we-page");if(!Te)continue;const qe=()=>je.setPageHeight(Te.getBoundingClientRect().height);if(qe(),typeof ResizeObserver>"u")continue;const Ie=new ResizeObserver(qe);Ie.observe(Te),ue.push(()=>Ie.disconnect())}return()=>{for(const je of ue)je()}},[p,sn,F]),x.useEffect(()=>{const ue=ut;if(!ue)return;const ke=()=>{document.documentElement.style.setProperty("--we-panel-w",`${ue.offsetWidth}px`)};ke();const je=typeof ResizeObserver<"u"?new ResizeObserver(ke):null;return je==null||je.observe(ue),()=>{je==null||je.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[ut]),x.useEffect(()=>{for(const ue of be)for(const ke of ue.instanceIds)Ee.ensureLoaded(ue.id,ke)},[be,Ee.ensureLoaded,O,D]);const Jt=x.useMemo(()=>{const ue={};for(const ke of be){const je=Ee.payloads[ke.id]??{};ue[ke.id]=ke.instanceIds.filter(Te=>je[Te]??Ee.errorOn(ke.id,Te)).map(Te=>{var Ie,St;const qe=Ee.errorOn(ke.id,Te);return{instance_id:Te,section_version_id:O,section_key:V[Te]??Te,section_display_name:((Ie=te.find(Et=>Et.instanceId===Te))==null?void 0:Ie.label)??null,html:((St=je[Te])==null?void 0:St.html)??null,render_error:qe?{code:"render_failed",message:qe}:null}})}return ue},[be,Ee.payloads,Ee.errorOn,V,te,O]);x.useEffect(()=>{let ue=!1;for(const ke of m.current){if(!p[ke.key])continue;const je=ke.doc,Te=ke.iframe.contentWindow,qe=je==null?void 0:je.getElementById("we-page");if(!qe)continue;const Ie=YO(Te),St=eP(qe,Jt[ke.key]??[],(Et,Kt)=>ge.buildSectionWrapper(Et,Kt),Et=>Ie==null?void 0:Ie.unmountRoot(Et));St.length>0&&!Ie&&!ue&&Object.keys(oe).length>0&&(ue=!0,console.warn("playground: no island host on a canvas frame, so nothing will hydrate and sections stay static. Expected window.__trCanvasIslands from the canvas island host script."));for(const Et of St)Ie==null||Ie.hydrateRoot(Et).catch(Kt=>{console.error("playground: canvas hydration pass failed:",Kt)})}},[p,sn,Jt,ge,oe]);const we=x.useRef(()=>{});we.current=ue=>{Ee.setEnabled(ue,!0),T({...a,selection:{kind:"section",instanceId:ue}})},x.useEffect(()=>{var je;const ue=new Set(Mt),ke=[];for(const Te of m.current){if(!p[Te.key])continue;const qe=Te.doc;if(!qe)continue;const Ie=Jt[Te.key]??[];for(const At of Ie)(je=u2(qe,At.instance_id))==null||je.setAttribute("data-hidden",ue.has(At.instance_id)?"true":"false");const St=Ie.filter(At=>ue.has(At.instance_id)).map(At=>({instanceId:At.instance_id,label:ap(At)})),Et=vC(Te.tabLayer,document,St,At=>we.current(At)),Kt=()=>xC(Et,At=>u2(qe,At),b);Kt();const cn=qe.getElementById("we-page");if(!cn||typeof ResizeObserver>"u")continue;const un=new ResizeObserver(Kt);un.observe(cn),ke.push(()=>un.disconnect())}return()=>{for(const Te of ke)Te()}},[p,sn,Jt,Mt,b]);const ze=x.useCallback(()=>{const ue=m.current,ke=ui.current,je=c2(ke);for(const Ie of ue)Ie.doc&&ge.setLiveOwner(Ie.doc,je);const Te=MC(ue,ge,je),qe=ke!==null&&Mt.includes(ke.instanceId);for(const Ie of ue){const St=Ie.overlay.querySelector(".we-chrome-label"),Et=ke&&!qe?Te.find(Kt=>Kt.handle.key===Ie.key):void 0;if(!Et||!ke){Mx(Ie.overlay,[],Rm),rp(St);continue}if(Mx(Ie.overlay,Et.els,Rm,ke.kind),ke.kind==="section"){const Kt=(Jt[Ie.key]??[]).find(cn=>cn.instance_id===ke.instanceId);OM(St,Et.els[0]??null,Kt?ap(Kt):"")}else rp(St)}},[ge,Jt,Mt]);x.useEffect(()=>{ze();for(const ue of m.current){if(!p[ue.key])continue;const ke=ue.doc,je=ue.iframe.contentWindow;ke&&je&&UC(je,ke,c2(a.selection))}},[p,sn,a.selection,ze]);const Ge=x.useCallback((ue,ke)=>{const je=ue.getAttribute("href")??"";if(!je||je==="#")return;const Te=u.current;if(je.startsWith("#")){Yu(je.slice(1),ke,Te,ii.current);return}const qe=QF(je,H,ne,Y);if(!qe){window.open(je,"_blank","noopener,noreferrer");return}if(ce!==null&&qe.canvasId===ce.id){const Ie=m.current.find(St=>St.key===qe.pageId);if(!Ie)return;qe.anchor?Yu(qe.anchor,Ie,Te,ii.current):Ie!==ke&&Yu("we-page",Ie,Te,ii.current);return}T({...a,canvasId:qe.canvasId,selection:null}),qe.anchor&&C({pageId:qe.pageId,anchor:qe.anchor})},[a,T,H,ne,Y,ce]);x.useEffect(()=>{var ke;if(!_||!p[_.pageId])return;const ue=m.current.find(je=>je.key===_.pageId);(ke=ue==null?void 0:ue.doc)!=null&&ke.getElementById(_.anchor)&&(Yu(_.anchor,ue,u.current,ii.current),C(null))},[_,p,Jt]),x.useEffect(()=>{const ue=[];for(const ke of m.current){if(!p[ke.key])continue;const je=ke.doc;if(!je)continue;const Te=Jt[ke.key]??[],qe=ke.overlay.querySelector(".we-chrome-ring--hover"),Ie=cn=>{var na;const un=cn.target,At=ge.resolveTarget(un,Te);Qu(qe);const qn=At?gP(At.selection):null,Wi=((na=un.closest)==null?void 0:na.call(un,"a"))??null;if(Wi){if(cn.preventDefault(),(qn==null?void 0:qn.kind)==="slot"){const ee=a.selection,Se=(ee==null?void 0:ee.kind)==="slot"&&ee.instanceId===qn.instanceId&&ee.slotId===qn.slotId&&ee.itemIndex===qn.itemIndex;T({...a,selection:qn}),Se&&Ge(Wi,ke);return}Ge(Wi,ke);return}T({...a,selection:qn})},St=cn=>{const un=ge.resolveTarget(cn.target,Te);un?j2(qe,un.element,Rm):Qu(qe)},Et=()=>Qu(qe),Kt=cn=>{cn.key==="Escape"&&T({...a,selection:null})};je.body.addEventListener("click",Ie),je.body.addEventListener("mouseover",St),je.body.addEventListener("mouseleave",Et),je.body.addEventListener("keydown",Kt),ue.push(()=>{je.body.removeEventListener("click",Ie),je.body.removeEventListener("mouseover",St),je.body.removeEventListener("mouseleave",Et),je.body.removeEventListener("keydown",Kt)})}return()=>{for(const ke of ue)ke()}},[p,sn,ge,Jt,a,T,Ge]);const rt=r.capabilities.hmr;x.useEffect(()=>{if(!rt)return;const ue=()=>{const ke=new Set;for(const je of Ut.current)for(const Te of je.instanceIds)ke.has(Te)||(ke.add(Te),Si.current.reload(Te))};return t.subscribe({source:ue,stylesheet:()=>w(ke=>ke+1)})},[t,rt]);const tt=a.selection,Xe=(tt==null?void 0:tt.instanceId)??null,ot=be.find(ue=>Xe!==null&&ue.instanceIds.includes(Xe))??be[0]??null;return x.useEffect(()=>{Xe&&ot&&Ee.ensureLoaded(ot.id,Xe)},[Xe,ot==null?void 0:ot.id,Ee.ensureLoaded]),he?d.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',a.canvasId,'".',`
|
|
1265
|
+
`,"Declared canvases: ",Y.map(ue=>ue.id).join(", ")]}):d.jsxs("div",{className:"canvas-mirror",children:[d.jsx("style",{children:SC}),Y.length>1?d.jsx("div",{className:"canvas-bar",children:d.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:Y.map(ue=>d.jsx("button",{type:"button",className:ue.id===(ce==null?void 0:ce.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":ue.id===(ce==null?void 0:ce.id)?"page":void 0,onClick:()=>T({...a,canvasId:ue.id,selection:null}),children:ue.label},ue.id))})}):null,d.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:u,onClick:ue=>{var je;const ke=ue.target;(ke===u.current||(je=ke.classList)!=null&&je.contains(rd))&&T({...a,selection:null})}}),d.jsxs("div",{className:"canvas-mirror__sidebar",ref:ni,children:[d.jsxs("div",{className:"sidebar-template",children:[d.jsxs("label",{className:"sidebar-template__field",children:["Fixture",d.jsx("select",{"data-testid":"fixture-picker",value:O,onChange:ue=>T({...a,fixture:ue.target.value,selection:null}),children:r.fixtures.map(ue=>d.jsx("option",{value:ue.id,children:qq(ue)},ue.id))})]}),Q&&q&&N.length>1?d.jsxs("label",{className:"sidebar-template__field",children:["Format",d.jsx("select",{"data-testid":"format-switcher",value:q.id,onChange:ue=>l({...a,format:ue.target.value}),children:N.map(ue=>d.jsx("option",{value:ue.id,children:`${ue.id} — ${ue.pixelWidth}×${ue.pixelHeight}px${ue.physical?` (${ue.physical})`:""}`},ue.id))})]}):null,I!==null?d.jsxs("label",{className:"sidebar-template__toggle",children:[d.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:j,onChange:ue=>E(ue.target.checked)}),"Trim & bleed guides"]}):null]}),Xe?d.jsx(KF,{instanceId:Xe,label:((Ot=te.find(ue=>ue.instanceId===Xe))==null?void 0:Ot.label)??Xe,display:((kt=te.find(ue=>ue.instanceId===Xe))==null?void 0:kt.display)??mP,displayState:Ee.displayFor(Xe),settingsOpen:P===Xe,onSetEnabled:ue=>Ee.setEnabled(Xe,ue),onSetVariant:ue=>Ee.setVariant(Xe,ue),onOpenSettings:()=>L(Xe),onCloseSettings:()=>L(null),fixture:O,sectionSchema:M[Xe]??hP,override:Ee.overrideFor(Xe),payload:Ee.payloadFor(Xe),renderError:Ee.errorFor(Xe),selection:tt,onSelect:ue=>T({...a,selection:ue}),onApplySlot:(ue,ke)=>Ee.applySlot(Xe,ue,ke)}):d.jsx(Aq,{}),r.capabilities.capture||pe==="website"?d.jsx(JF,{host:t,templateName:r.template.name,fixture:O,output:pe,format:(q==null?void 0:q.id)??null,canvas:(ce==null?void 0:ce.id)??null,pagePath:((Ei=be[0])==null?void 0:Ei.path)??null}):null]})]})}function vP(e){const[t,r]=x.useState({}),[a,l]=x.useState(e);if(e!==null&&e!==a){const u=a===null?[]:cP(a,e);l(e),u.length>0&&r(m=>uP(m,u))}const c=x.useCallback(u=>r(u),[]);return x.useMemo(()=>({edits:t,setEdits:c}),[t,c])}function d2(e){const t=xM(window.location.pathname,e.base);return t===null?null:wM(t,window.location.search)}function xP({host:e}){const[t,r]=x.useState(null),[a,l]=x.useState(null),[c,u]=x.useState(0),[m,p]=x.useState(()=>d2(e)),g=x.useMemo(()=>t===null||t.error!==void 0?null:Object.fromEntries(t.fixtures.map(j=>[j.id,j.doc])),[t]),b=vP(g);x.useEffect(()=>{let j=!0;return e.catalog().then(E=>{j&&(r(E),l(null))},E=>{j&&l(E instanceof Error?E.message:String(E))}),()=>{j=!1}},[e,c]);const v=t==null?void 0:t.template.name;x.useEffect(()=>{v&&(document.title=`${v} - Playground`)},[v]);const k=(t==null?void 0:t.capabilities.hmr)===!0;x.useEffect(()=>{if(!k)return;const j=()=>u(E=>E+1);return e.subscribe({source:j,fixtures:j})},[e,k]),x.useEffect(()=>{const j=()=>p(d2(e));return window.addEventListener("popstate",j),()=>window.removeEventListener("popstate",j)},[e]),x.useEffect(()=>{if(m!==null||t===null)return;const j=kM(t);j!==null&&(window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j))},[m,t,e]);const w=x.useCallback(j=>{window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j)},[e]);return a?d.jsxs("div",{className:"boot-error",children:["The playground could not load its catalog — ",a,`
|
|
1266
|
+
`,"Is the server still starting? Try refreshing."]}):t?t.error!==void 0?d.jsx("div",{className:"boot-error","data-testid":"catalog-error",children:t.error}):t.fixtures.length===0?d.jsx("div",{className:"empty","data-testid":"no-fixtures",children:"No fixtures to render under. Export a defineFixture() value from a module under fixtures/."}):m?t.fixtures.some(j=>j.id===m.fixture)?d.jsx(bP,{host:e,catalog:t,view:m,onViewChange:w,sessions:b}):d.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',m.fixture,'" (have: ',t.fixtures.map(j=>j.id).join(", "),")."]}):d.jsx("div",{className:"empty",children:"loading canvas…"}):d.jsx("div",{className:"empty",children:"loading…"})}const QO=document.getElementById("root");if(!QO)throw new Error("playground: #root missing from index.html");const XO=zq(document.baseURI);$q(XO);yM.createRoot(QO).render(d.jsx(x.StrictMode,{children:d.jsx(xP,{host:XO})}));
|