@homepages/concrete 9.1.0 → 11.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 +81 -0
- package/README.md +1 -1
- package/codemods/manifest.json +5 -148
- package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
- package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +42 -42
- package/dist/base.css +1 -8
- package/dist/cli/build/artifact.js +3 -2
- package/dist/cli/build/fixtures.js +2 -0
- package/dist/cli/check/render/inputs.js +3 -3
- package/dist/cli/check/stages/sections.js +6 -7
- package/dist/cli/dev/workspace-reader.js +10 -2
- package/dist/css/compile.js +3 -6
- package/dist/css/rules.js +1 -51
- package/dist/design-system/format-variants.js +1 -1
- package/dist/fixtures/media-store.js +3 -3
- package/dist/fixtures/resolve.js +28 -16
- package/dist/fixtures/rows.js +2 -2
- package/dist/fixtures/synthesize-empties.js +3 -1
- package/dist/fixtures.d.ts +1 -1
- package/dist/index.d.ts +7 -8
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -6
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +8 -4
- package/dist/packages/internal/fill-bake/dist/index.js +1 -1
- package/dist/packages/internal/fill-bake/dist/item-merge.js +32 -6
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +5 -5
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +4 -26
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +1 -1
- package/dist/packages/internal/media-resolution/dist/document.js +17 -16
- package/dist/packages/internal/media-resolution/dist/image.js +41 -95
- package/dist/packages/internal/media-resolution/dist/index.js +1 -1
- package/dist/packages/internal/media-resolution/dist/list.js +11 -11
- package/dist/packages/internal/media-resolution/dist/media.js +17 -16
- package/dist/packages/internal/media-resolution/dist/records.js +4 -2
- package/dist/packages/internal/media-resolution/dist/slot.js +5 -5
- package/dist/packages/internal/media-resolution/dist/tour.js +17 -16
- package/dist/packages/internal/media-resolution/dist/video.js +24 -24
- package/dist/packages/internal/property-facts/dist/registry-facts.js +8 -1
- package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +2 -3
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +6 -3
- package/dist/packages/internal/section-contracts/dist/index.js +0 -1
- package/dist/packages/internal/section-contracts/dist/object-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +1 -1
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +4 -2
- package/dist/packages/internal/section-contracts/dist/row-source-contract.js +7 -8
- package/dist/packages/internal/section-contracts/dist/runners.js +2 -11
- package/dist/packages/internal/section-contracts/dist/select-contract.js +7 -1
- package/dist/packages/internal/section-contracts/dist/source-contract.js +14 -10
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
- package/dist/packages/internal/section-contracts/dist/table-member.js +5 -8
- package/dist/packages/internal/source-resolution/dist/index.js +21 -188
- package/dist/packages/internal/template-artifact/dist/index.js +1 -1
- package/dist/packages/internal/template-artifact/dist/layout.js +12 -10
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +26 -14
- package/dist/packages/internal/template-contracts/dist/content-pick.js +24 -1
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +4 -6
- package/dist/packages/internal/template-contracts/dist/fact-keys.d.ts +3 -2
- package/dist/packages/internal/template-contracts/dist/fact-keys.js +19 -43
- package/dist/packages/internal/template-contracts/dist/fact-registry.d.ts +24 -3
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +10 -3
- package/dist/packages/internal/template-contracts/dist/fill-builders.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
- package/dist/packages/internal/template-contracts/dist/fill-spec.js +7 -6
- package/dist/packages/internal/template-contracts/dist/list.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/list.js +7 -29
- package/dist/packages/internal/template-contracts/dist/mirror-kind.js +2 -2
- package/dist/packages/internal/template-contracts/dist/object.js +3 -2
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
- package/dist/packages/internal/template-contracts/dist/process-builders.d.ts +2 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +5 -32
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +10 -6
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/registry-facts.js +13 -24
- package/dist/packages/internal/template-contracts/dist/registry-shape.d.ts +20 -4
- package/dist/packages/internal/template-contracts/dist/registry-shape.js +69 -11
- package/dist/packages/internal/template-contracts/dist/row-planners.js +1 -1
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +4 -7
- package/dist/packages/internal/template-contracts/dist/row-ref.js +7 -23
- package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -3
- package/dist/packages/internal/template-contracts/dist/row.d.ts +1 -1
- package/dist/packages/internal/template-contracts/dist/row.js +6 -7
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +11 -27
- package/dist/packages/internal/template-contracts/dist/section-schema-types.d.ts +1 -0
- package/dist/packages/internal/template-contracts/dist/slot-builders.d.ts +29 -37
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +3 -8
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +2 -702
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +2 -498
- package/dist/packages/internal/template-contracts/dist/slot-overrides.js +4 -1
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +10 -5
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +2 -1
- package/dist/packages/internal/template-contracts/dist/table-members.d.ts +5 -12
- package/dist/packages/internal/template-contracts/dist/table-members.js +7 -37
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +4 -6
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
- package/dist/primitives/Image.d.ts +4 -4
- package/dist/primitives/Tour.d.ts +2 -2
- package/dist/primitives/Video.d.ts +2 -2
- package/dist/primitives/slot-bindings.js +6 -13
- package/dist/primitives/slot-document.d.ts +1 -1
- package/dist/primitives/slot-download.d.ts +4 -2
- package/dist/primitives/slot-media.d.ts +6 -3
- package/dist/primitives/slot-media.js +1 -1
- package/dist/rules/registry.js +0 -6
- package/dist/schema/fact.d.ts +19 -52
- package/dist/schema/fact.js +6 -25
- package/dist/schema/facts-view.d.ts +1 -2
- package/dist/schema/format-presets.d.ts +1 -1
- package/dist/schema/property-facts.d.ts +1 -62
- package/dist/schema/section-schema.d.ts +6 -6
- package/dist/schema/section-schema.js +1 -1
- package/dist/styles.css +4 -4
- package/dist/template/define-template.js +0 -1
- 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 -4
- package/package.json +2 -2
- package/codemods/fill-is-a-source.mjs +0 -533
- package/codemods/framework-namespace.mjs +0 -107
- package/codemods/list-grammar.mjs +0 -923
- package/codemods/object-form-only.mjs +0 -39
- package/codemods/platform-namespace.mjs +0 -83
- package/codemods/process-builders.mjs +0 -198
- package/codemods/reads-replace-reconcile.mjs +0 -285
- package/codemods/slot-object.mjs +0 -1097
- package/codemods/steps/content-object-fields.mjs +0 -324
- package/codemods/steps/list-object-form.mjs +0 -687
- package/codemods/steps/select-object-form.mjs +0 -210
- package/codemods/table-rows.mjs +0 -568
- package/codemods/theme-collapse.mjs +0 -396
- package/codemods/unlayer-author-css.mjs +0 -194
- package/codemods/unwrap-object-fields.mjs +0 -310
- package/codemods/viewer-slot-document.mjs +0 -131
- package/codemods/write-property-as-facts-document.mjs +0 -716
- package/codemods/write-the-address-line.mjs +0 -255
- package/codemods/write-the-registry-members.mjs +0 -653
- package/codemods/write-the-select-from.mjs +0 -141
- package/codemods/write-the-sole-from.mjs +0 -369
- package/codemods/write-the-table-from.mjs +0 -267
- package/codemods/write-the-whole-item.mjs +0 -512
- package/codemods/writeback-drop.mjs +0 -168
- package/codemods/written-contact-address.mjs +0 -162
- package/codemods/written-media-category.mjs +0 -227
- package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
- package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
- package/codemods/written-uploads-sort-into-lists.mjs +0 -405
- package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
- package/codemods/written-video-sources-drop.mjs +0 -144
- package/codemods/written-without-pick-none.mjs +0 -146
- package/codemods/written-without-retired-knowledge.mjs +0 -223
- package/codemods/written-without-the-media-key.mjs +0 -202
- package/codemods/written-without-the-property-type.mjs +0 -249
- package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +0 -1259
- package/dist/artifact/playground/client/assets/index-DDOcM0zA.css +0 -1
- package/dist/packages/internal/section-contracts/dist/option-source-contract.js +0 -22
- package/dist/packages/internal/template-contracts/dist/comparable-address.js +0 -19
- package/dist/packages/internal/template-contracts/dist/facts-view.d.ts +0 -62
- package/dist/packages/internal/template-contracts/dist/legacy-facts.js +0 -167
- package/dist/packages/internal/template-contracts/dist/registry-aliases.js +0 -77
|
@@ -1,1259 +0,0 @@
|
|
|
1
|
-
var Nx=e=>{throw TypeError(e)};var Nm=(e,t,a)=>t.has(e)||Nx("Cannot "+a);var $=(e,t,a)=>(Nm(e,t,"read from private field"),a?a.call(e):t.get(e)),Ne=(e,t,a)=>t.has(e)?Nx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),xe=(e,t,a,r)=>(Nm(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),Be=(e,t,a)=>(Nm(e,t,"access private method"),a);var Hu=(e,t,a,r)=>({set _(s){xe(e,t,s,a)},get _(){return $(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();function RM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mm={exports:{}},El={};/**
|
|
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 Mx;function TM(){if(Mx)return El;Mx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(r,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:e,type:r,key:u,ref:s!==void 0?s:null,props:c}}return El.Fragment=t,El.jsx=a,El.jsxs=a,El}var Cx;function DM(){return Cx||(Cx=1,Mm.exports=TM()),Mm.exports}var d=DM(),Cm={exports:{}},qe={};/**
|
|
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 Rx;function LM(){if(Rx)return qe;Rx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=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"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),w=Symbol.iterator;function _(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,j={};function C(M,H,I){this.props=M,this.context=H,this.refs=j,this.updater=I||E}C.prototype.isReactComponent={},C.prototype.setState=function(M,H){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,H,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(M,H,I){this.props=M,this.context=H,this.refs=j,this.updater=I||E}var T=O.prototype=new A;T.constructor=O,S(T,C.prototype),T.isPureReactComponent=!0;var R=Array.isArray;function B(){}var D={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function P(M,H,I){var F=I.ref;return{$$typeof:e,type:M,key:H,ref:F!==void 0?F:null,props:I}}function le(M,H){return P(M.type,H,M.props)}function ee(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function de(M){var H={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return H[I]})}var K=/\/+/g;function Q(M,H){return typeof M=="object"&&M!==null&&M.key!=null?de(""+M.key):H.toString(36)}function se(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(B,B):(M.status="pending",M.then(function(H){M.status==="pending"&&(M.status="fulfilled",M.value=H)},function(H){M.status==="pending"&&(M.status="rejected",M.reason=H)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function N(M,H,I,F,W){var pe=typeof M;(pe==="undefined"||pe==="boolean")&&(M=null);var oe=!1;if(M===null)oe=!0;else switch(pe){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(M.$$typeof){case e:case t:oe=!0;break;case v:return oe=M._init,N(oe(M._payload),H,I,F,W)}}if(oe)return W=W(M),oe=F===""?"."+Q(M,0):F,R(W)?(I="",oe!=null&&(I=oe.replace(K,"$&/")+"/"),N(W,H,I,"",function(ce){return ce})):W!=null&&(ee(W)&&(W=le(W,I+(W.key==null||M&&M.key===W.key?"":(""+W.key).replace(K,"$&/")+"/")+oe)),H.push(W)),1;oe=0;var ke=F===""?".":F+":";if(R(M))for(var z=0;z<M.length;z++)F=M[z],pe=ke+Q(F,z),oe+=N(F,H,I,pe,W);else if(z=_(M),typeof z=="function")for(M=z.call(M),z=0;!(F=M.next()).done;)F=F.value,pe=ke+Q(F,z++),oe+=N(F,H,I,pe,W);else if(pe==="object"){if(typeof M.then=="function")return N(se(M),H,I,F,W);throw H=String(M),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return oe}function V(M,H,I){if(M==null)return M;var F=[],W=0;return N(M,F,"","",function(pe){return H.call(I,pe,W++)}),F}function te(M){if(M._status===-1){var H=M._result;H=H(),H.then(function(I){(M._status===0||M._status===-1)&&(M._status=1,M._result=I)},function(I){(M._status===0||M._status===-1)&&(M._status=2,M._result=I)}),M._status===-1&&(M._status=0,M._result=H)}if(M._status===1)return M._result.default;throw M._result}var me=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Y={map:V,forEach:function(M,H,I){V(M,function(){H.apply(this,arguments)},I)},count:function(M){var H=0;return V(M,function(){H++}),H},toArray:function(M){return V(M,function(H){return H})||[]},only:function(M){if(!ee(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return qe.Activity=b,qe.Children=Y,qe.Component=C,qe.Fragment=a,qe.Profiler=s,qe.PureComponent=O,qe.StrictMode=r,qe.Suspense=p,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,qe.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},qe.cache=function(M){return function(){return M.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(M,H,I){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var F=S({},M.props),W=M.key;if(H!=null)for(pe in H.key!==void 0&&(W=""+H.key),H)!L.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(F[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)F.children=I;else if(1<pe){for(var oe=Array(pe),ke=0;ke<pe;ke++)oe[ke]=arguments[ke+2];F.children=oe}return P(M.type,W,F)},qe.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},qe.createElement=function(M,H,I){var F,W={},pe=null;if(H!=null)for(F in H.key!==void 0&&(pe=""+H.key),H)L.call(H,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(W[F]=H[F]);var oe=arguments.length-2;if(oe===1)W.children=I;else if(1<oe){for(var ke=Array(oe),z=0;z<oe;z++)ke[z]=arguments[z+2];W.children=ke}if(M&&M.defaultProps)for(F in oe=M.defaultProps,oe)W[F]===void 0&&(W[F]=oe[F]);return P(M,pe,W)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(M){return{$$typeof:m,render:M}},qe.isValidElement=ee,qe.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:te}},qe.memo=function(M,H){return{$$typeof:g,type:M,compare:H===void 0?null:H}},qe.startTransition=function(M){var H=D.T,I={};D.T=I;try{var F=M(),W=D.S;W!==null&&W(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(B,me)}catch(pe){me(pe)}finally{H!==null&&I.types!==null&&(H.types=I.types),D.T=H}},qe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},qe.use=function(M){return D.H.use(M)},qe.useActionState=function(M,H,I){return D.H.useActionState(M,H,I)},qe.useCallback=function(M,H){return D.H.useCallback(M,H)},qe.useContext=function(M){return D.H.useContext(M)},qe.useDebugValue=function(){},qe.useDeferredValue=function(M,H){return D.H.useDeferredValue(M,H)},qe.useEffect=function(M,H){return D.H.useEffect(M,H)},qe.useEffectEvent=function(M){return D.H.useEffectEvent(M)},qe.useId=function(){return D.H.useId()},qe.useImperativeHandle=function(M,H,I){return D.H.useImperativeHandle(M,H,I)},qe.useInsertionEffect=function(M,H){return D.H.useInsertionEffect(M,H)},qe.useLayoutEffect=function(M,H){return D.H.useLayoutEffect(M,H)},qe.useMemo=function(M,H){return D.H.useMemo(M,H)},qe.useOptimistic=function(M,H){return D.H.useOptimistic(M,H)},qe.useReducer=function(M,H,I){return D.H.useReducer(M,H,I)},qe.useRef=function(M){return D.H.useRef(M)},qe.useState=function(M){return D.H.useState(M)},qe.useSyncExternalStore=function(M,H,I){return D.H.useSyncExternalStore(M,H,I)},qe.useTransition=function(){return D.H.useTransition()},qe.version="19.2.6",qe}var Tx;function bg(){return Tx||(Tx=1,Cm.exports=LM()),Cm.exports}var x=bg();const Ba=RM(x);var Rm={exports:{}},jl={},Tm={exports:{}},Dm={};/**
|
|
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 Dx;function zM(){return Dx||(Dx=1,(function(e){function t(N,V){var te=N.length;N.push(V);e:for(;0<te;){var me=te-1>>>1,Y=N[me];if(0<s(Y,V))N[me]=V,N[te]=Y,te=me;else break e}}function a(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var V=N[0],te=N.pop();if(te!==V){N[0]=te;e:for(var me=0,Y=N.length,M=Y>>>1;me<M;){var H=2*(me+1)-1,I=N[H],F=H+1,W=N[F];if(0>s(I,te))F<Y&&0>s(W,I)?(N[me]=W,N[F]=te,me=F):(N[me]=I,N[H]=te,me=H);else if(F<Y&&0>s(W,te))N[me]=W,N[F]=te,me=F;else break e}}return V}function s(N,V){var te=N.sortIndex-V.sortIndex;return te!==0?te:N.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=[],v=1,b=null,w=3,_=!1,E=!1,S=!1,j=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function T(N){for(var V=a(g);V!==null;){if(V.callback===null)r(g);else if(V.startTime<=N)r(g),V.sortIndex=V.expirationTime,t(p,V);else break;V=a(g)}}function R(N){if(S=!1,T(N),!E)if(a(p)!==null)E=!0,B||(B=!0,de());else{var V=a(g);V!==null&&se(R,V.startTime-N)}}var B=!1,D=-1,L=5,P=-1;function le(){return j?!0:!(e.unstable_now()-P<L)}function ee(){if(j=!1,B){var N=e.unstable_now();P=N;var V=!0;try{e:{E=!1,S&&(S=!1,A(D),D=-1),_=!0;var te=w;try{t:{for(T(N),b=a(p);b!==null&&!(b.expirationTime>N&&le());){var me=b.callback;if(typeof me=="function"){b.callback=null,w=b.priorityLevel;var Y=me(b.expirationTime<=N);if(N=e.unstable_now(),typeof Y=="function"){b.callback=Y,T(N),V=!0;break t}b===a(p)&&r(p),T(N)}else r(p);b=a(p)}if(b!==null)V=!0;else{var M=a(g);M!==null&&se(R,M.startTime-N),V=!1}}break e}finally{b=null,w=te,_=!1}V=void 0}}finally{V?de():B=!1}}}var de;if(typeof O=="function")de=function(){O(ee)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,Q=K.port2;K.port1.onmessage=ee,de=function(){Q.postMessage(null)}}else de=function(){C(ee,0)};function se(N,V){D=C(function(){N(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(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(N){switch(w){case 1:case 2:case 3:var V=3;break;default:V=w}var te=w;w=V;try{return N()}finally{w=te}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(N,V){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var te=w;w=N;try{return V()}finally{w=te}},e.unstable_scheduleCallback=function(N,V,te){var me=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,N){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=te+Y,N={id:v++,callback:V,priorityLevel:N,startTime:te,expirationTime:Y,sortIndex:-1},te>me?(N.sortIndex=te,t(g,N),a(p)===null&&N===a(g)&&(S?(A(D),D=-1):S=!0,se(R,te-me))):(N.sortIndex=Y,t(p,N),E||_||(E=!0,B||(B=!0,de()))),N},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(N){var V=w;return function(){var te=w;w=V;try{return N.apply(this,arguments)}finally{w=te}}}})(Dm)),Dm}var Lx;function $M(){return Lx||(Lx=1,Tm.exports=zM()),Tm.exports}var Lm={exports:{}},ln={};/**
|
|
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 zx;function UM(){if(zx)return ln;zx=1;var e=bg();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}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 a(){}var r={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,g,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:p,containerInfo:g,implementation:v}}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 ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ln.createPortal=function(p,g){var v=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,v)},ln.flushSync=function(p){var g=u.T,v=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=g,r.p=v,r.d.f()}},ln.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(p,g))},ln.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ln.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var v=g.as,b=m(v,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,_=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?r.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:_}):v==="script"&&r.d.X(p,{crossOrigin:b,integrity:w,fetchPriority:_,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ln.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=m(g.as,g.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(p)},ln.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,b=m(v,g.crossOrigin);r.d.L(p,v,{crossOrigin:b,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})}},ln.preloadModule=function(p,g){if(typeof p=="string")if(g){var v=m(g.as,g.crossOrigin);r.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(p)},ln.requestFormReset=function(p){r.d.r(p)},ln.unstable_batchedUpdates=function(p,g){return p(g)},ln.useFormState=function(p,g,v){return u.H.useFormState(p,g,v)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.6",ln}var $x;function B2(){if($x)return Lm.exports;$x=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(),Lm.exports=UM(),Lm.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 Ux;function IM(){if(Ux)return jl;Ux=1;var e=$M(),t=bg(),a=B2();function r(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 s(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(r(188))}function g(n){var i=n.alternate;if(!i){if(i=c(n),i===null)throw Error(r(188));return i!==n?null:n}for(var o=n,l=i;;){var f=o.return;if(f===null)break;var h=f.alternate;if(h===null){if(l=f.return,l!==null){o=l;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===o)return p(f),n;if(h===l)return p(f),i;h=h.sibling}throw Error(r(188))}if(o.return!==l.return)o=f,l=h;else{for(var y=!1,k=f.child;k;){if(k===o){y=!0,o=f,l=h;break}if(k===l){y=!0,l=f,o=h;break}k=k.sibling}if(!y){for(k=h.child;k;){if(k===o){y=!0,o=h,l=f;break}if(k===l){y=!0,l=h,o=f;break}k=k.sibling}if(!y)throw Error(r(189))}}if(o.alternate!==l)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function v(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=v(n),i!==null)return i;n=n.sibling}return null}var b=Object.assign,w=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function de(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function Q(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 S:return"Fragment";case C:return"Profiler";case j:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList";case P:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case O:return n.displayName||"Context";case A:return(n._context.displayName||"Context")+".Consumer";case T:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return i=n.displayName||null,i!==null?i:Q(n.type)||"Memo";case L:i=n._payload,n=n._init;try{return Q(n(i))}catch{}}return null}var se=Array.isArray,N=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],Y=-1;function M(n){return{current:n}}function H(n){0>Y||(n.current=me[Y],me[Y]=null,Y--)}function I(n,i){Y++,me[Y]=n.current,n.current=i}var F=M(null),W=M(null),pe=M(null),oe=M(null);function ke(n,i){switch(I(pe,i),I(W,n),I(F,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?W1(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=W1(i),n=J1(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(F),I(F,n)}function z(){H(F),H(W),H(pe)}function ce(n){n.memoizedState!==null&&I(oe,n);var i=F.current,o=J1(i,n.type);i!==o&&(I(W,n),I(F,o))}function ye(n){W.current===n&&(H(F),H(W)),oe.current===n&&(H(oe),wl._currentValue=te)}var Se,Le;function Ie(n){if(Se===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Se=i&&i[1]||"",Le=-1<o.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Se+n+Le}var ge=!1;function Re(n,i){if(!n||ge)return"";ge=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(re){var J=re}Reflect.construct(n,[],he)}else{try{he.call()}catch(re){J=re}n.call(he.prototype)}}else{try{throw Error()}catch(re){J=re}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),y=h[0],k=h[1];if(y&&k){var U=y.split(`
|
|
44
|
-
`),Z=k.split(`
|
|
45
|
-
`);for(f=l=0;l<U.length&&!U[l].includes("DetermineComponentFrameRoot");)l++;for(;f<Z.length&&!Z[f].includes("DetermineComponentFrameRoot");)f++;if(l===U.length||f===Z.length)for(l=U.length-1,f=Z.length-1;1<=l&&0<=f&&U[l]!==Z[f];)f--;for(;1<=l&&0<=f;l--,f--)if(U[l]!==Z[f]){if(l!==1||f!==1)do if(l--,f--,0>f||U[l]!==Z[f]){var ue=`
|
|
46
|
-
`+U[l].replace(" at new "," at ");return n.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",n.displayName)),ue}while(1<=l&&0<=f);break}}}finally{ge=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?Ie(o):""}function ht(n,i){switch(n.tag){case 26:case 27:case 5:return Ie(n.type);case 16:return Ie("Lazy");case 13:return n.child!==i&&i!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return Re(n.type,!1);case 11:return Re(n.type.render,!1);case 1:return Re(n.type,!0);case 31:return Ie("Activity");default:return""}}function $e(n){try{var i="",o=null;do i+=ht(n,o),o=n,n=n.return;while(n);return i}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Lt=Object.prototype.hasOwnProperty,lt=e.unstable_scheduleCallback,Fn=e.unstable_cancelCallback,An=e.unstable_shouldYield,un=e.unstable_requestPaint,yt=e.unstable_now,ia=e.unstable_getCurrentPriorityLevel,di=e.unstable_ImmediatePriority,ii=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Xe=e.log,at=e.unstable_setDisableYieldValue,Qt=null,ut=null;function ne(n){if(typeof Xe=="function"&&at(n),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Qt,n)}catch{}}var be=Math.clz32?Math.clz32:Ge,Oe=Math.log,ze=Math.LN2;function Ge(n){return n>>>=0,n===0?32:31-(Oe(n)/ze|0)|0}var He=256,kt=262144,jt=4194304;function _t(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 Ft(n,i,o){var l=n.pendingLanes;if(l===0)return 0;var f=0,h=n.suspendedLanes,y=n.pingedLanes;n=n.warmLanes;var k=l&134217727;return k!==0?(l=k&~h,l!==0?f=_t(l):(y&=k,y!==0?f=_t(y):o||(o=k&~n,o!==0&&(f=_t(o))))):(k=l&~h,k!==0?f=_t(k):y!==0?f=_t(y):o||(o=l&~n,o!==0&&(f=_t(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 Xt(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Zt(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 Nn(){var n=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),n}function Oi(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function ai(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fi(n,i,o,l,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 k=n.entanglements,U=n.expirationTimes,Z=n.hiddenUpdates;for(o=y&~o;0<o;){var ue=31-be(o),he=1<<ue;k[ue]=0,U[ue]=-1;var J=Z[ue];if(J!==null)for(Z[ue]=null,ue=0;ue<J.length;ue++){var re=J[ue];re!==null&&(re.lane&=-536870913)}o&=~he}l!==0&&io(n,l,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(y&~i))}function io(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var l=31-be(i);n.entangledLanes|=i,n.entanglements[l]=n.entanglements[l]|1073741824|o&261930}function Ac(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var l=31-be(o),f=1<<l;f&i|n[l]&i&&(n[l]|=i),o&=~f}}function ae(n,i){var o=i&-i;return o=(o&42)!==0?1:_e(o),(o&(n.suspendedLanes|i))!==0?0:o}function _e(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 At(){var n=V.p;return n!==0?n:(n=window.event,n===void 0?32:kx(n.type))}function nt(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var Pn=Math.random().toString(36).slice(2),Ot="__reactFiber$"+Pn,yn="__reactProps$"+Pn,ao="__reactContainer$"+Pn,xf="__reactEvents$"+Pn,wA="__reactListeners$"+Pn,kA="__reactHandles$"+Pn,Ib="__reactResources$"+Pn,zs="__reactMarker$"+Pn;function wf(n){delete n[Ot],delete n[yn],delete n[xf],delete n[wA],delete n[kA]}function ro(n){var i=n[Ot];if(i)return i;for(var o=n.parentNode;o;){if(i=o[ao]||o[Ot]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=ox(n);n!==null;){if(o=n[Ot])return o;n=ox(n)}return i}n=o,o=n.parentNode}return null}function oo(n){if(n=n[Ot]||n[ao]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function $s(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(r(33))}function so(n){var i=n[Ib];return i||(i=n[Ib]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Wt(n){n[zs]=!0}var Bb=new Set,Hb={};function or(n,i){lo(n,i),lo(n+"Capture",i)}function lo(n,i){for(Hb[n]=i,n=0;n<i.length;n++)Bb.add(i[n])}var _A=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]*$"),qb={},Fb={};function SA(n){return Lt.call(Fb,n)?!0:Lt.call(qb,n)?!1:_A.test(n)?Fb[n]=!0:(qb[n]=!0,!1)}function Nc(n,i,o){if(SA(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var l=i.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Mc(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 Ai(n,i,o,l){if(l===null)n.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+l)}}function Vn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Pb(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function EA(n,i,o){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,h=l.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:l.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function kf(n){if(!n._valueTracker){var i=Pb(n)?"checked":"value";n._valueTracker=EA(n,i,""+n[i])}}function Vb(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),l="";return n&&(l=Pb(n)?n.checked?"true":"false":n.value),n=l,n!==o?(i.setValue(n),!0):!1}function Cc(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 jA=/[\n"\\]/g;function Gn(n){return n.replace(jA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function _f(n,i,o,l,f,h,y,k){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=""+Vn(i)):n.value!==""+Vn(i)&&(n.value=""+Vn(i)):y!=="submit"&&y!=="reset"||n.removeAttribute("value"),i!=null?Sf(n,y,Vn(i)):o!=null?Sf(n,y,Vn(o)):l!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.name=""+Vn(k):n.removeAttribute("name")}function Gb(n,i,o,l,f,h,y,k){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)){kf(n);return}o=o!=null?""+Vn(o):"",i=i!=null?""+Vn(i):o,k||i===n.value||(n.value=i),n.defaultValue=i}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=k?n.checked:!!l,n.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.name=y),kf(n)}function Sf(n,i,o){i==="number"&&Cc(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function co(n,i,o,l){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&&l&&(n[o].defaultSelected=!0)}else{for(o=""+Vn(o),i=null,f=0;f<n.length;f++){if(n[f].value===o){n[f].selected=!0,l&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Kb(n,i,o){if(i!=null&&(i=""+Vn(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Vn(o):""}function Yb(n,i,o,l){if(i==null){if(l!=null){if(o!=null)throw Error(r(92));if(se(l)){if(1<l.length)throw Error(r(93));l=l[0]}o=l}o==null&&(o=""),i=o}o=Vn(i),n.defaultValue=o,l=n.textContent,l===o&&l!==""&&l!==null&&(n.value=l),kf(n)}function uo(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var OA=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 Qb(n,i,o){var l=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":l?n.setProperty(i,o):typeof o!="number"||o===0||OA.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}function Xb(n,i,o){if(i!=null&&typeof i!="object")throw Error(r(62));if(n=n.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||i!=null&&i.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var f in i)l=i[f],i.hasOwnProperty(f)&&o[f]!==l&&Qb(n,f,l)}else for(var h in i)i.hasOwnProperty(h)&&Qb(n,h,i[h])}function Ef(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 AA=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"]]),NA=/^[\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 Rc(n){return NA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ni(){}var jf=null;function Of(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var fo=null,ho=null;function Zb(n){var i=oo(n);if(i&&(n=i.stateNode)){var o=n[yn]||null;e:switch(n=i.stateNode,i.type){case"input":if(_f(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="'+Gn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var l=o[i];if(l!==n&&l.form===n.form){var f=l[yn]||null;if(!f)throw Error(r(90));_f(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)l=o[i],l.form===n.form&&Vb(l)}break e;case"textarea":Kb(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&co(n,!!o.multiple,i,!1)}}}var Af=!1;function Wb(n,i,o){if(Af)return n(i,o);Af=!0;try{var l=n(i);return l}finally{if(Af=!1,(fo!==null||ho!==null)&&(vu(),fo&&(i=fo,n=ho,ho=fo=null,Zb(i),n)))for(i=0;i<n.length;i++)Zb(n[i])}}function Us(n,i){var o=n.stateNode;if(o===null)return null;var l=o[yn]||null;if(l===null)return null;o=l[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":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var Mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nf=!1;if(Mi)try{var Is={};Object.defineProperty(Is,"passive",{get:function(){Nf=!0}}),window.addEventListener("test",Is,Is),window.removeEventListener("test",Is,Is)}catch{Nf=!1}var aa=null,Mf=null,Tc=null;function Jb(){if(Tc)return Tc;var n,i=Mf,o=i.length,l,f="value"in aa?aa.value:aa.textContent,h=f.length;for(n=0;n<o&&i[n]===f[n];n++);var y=o-n;for(l=1;l<=y&&i[o-l]===f[h-l];l++);return Tc=f.slice(n,1<l?1-l:void 0)}function Dc(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 Lc(){return!0}function e0(){return!1}function bn(n){function i(o,l,f,h,y){this._reactName=o,this._targetInst=f,this.type=l,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var k in n)n.hasOwnProperty(k)&&(o=n[k],this[k]=o?o(h):h[k]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Lc:e0,this.isPropagationStopped=e0,this}return b(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=Lc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Lc)},persist:function(){},isPersistent:Lc}),i}var sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=bn(sr),Bs=b({},sr,{view:0,detail:0}),MA=bn(Bs),Cf,Rf,Hs,$c=b({},Bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,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!==Hs&&(Hs&&n.type==="mousemove"?(Cf=n.screenX-Hs.screenX,Rf=n.screenY-Hs.screenY):Rf=Cf=0,Hs=n),Cf)},movementY:function(n){return"movementY"in n?n.movementY:Rf}}),t0=bn($c),CA=b({},$c,{dataTransfer:0}),RA=bn(CA),TA=b({},Bs,{relatedTarget:0}),Tf=bn(TA),DA=b({},sr,{animationName:0,elapsedTime:0,pseudoElement:0}),LA=bn(DA),zA=b({},sr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),$A=bn(zA),UA=b({},sr,{data:0}),n0=bn(UA),IA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BA={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"},HA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qA(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=HA[n])?!!i[n]:!1}function Df(){return qA}var FA=b({},Bs,{key:function(n){if(n.key){var i=IA[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Dc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?BA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(n){return n.type==="keypress"?Dc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Dc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),PA=bn(FA),VA=b({},$c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i0=bn(VA),GA=b({},Bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),KA=bn(GA),YA=b({},sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),QA=bn(YA),XA=b({},$c,{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}),ZA=bn(XA),WA=b({},sr,{newState:0,oldState:0}),JA=bn(WA),eN=[9,13,27,32],Lf=Mi&&"CompositionEvent"in window,qs=null;Mi&&"documentMode"in document&&(qs=document.documentMode);var tN=Mi&&"TextEvent"in window&&!qs,a0=Mi&&(!Lf||qs&&8<qs&&11>=qs),r0=" ",o0=!1;function s0(n,i){switch(n){case"keyup":return eN.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var mo=!1;function nN(n,i){switch(n){case"compositionend":return l0(i);case"keypress":return i.which!==32?null:(o0=!0,r0);case"textInput":return n=i.data,n===r0&&o0?null:n;default:return null}}function iN(n,i){if(mo)return n==="compositionend"||!Lf&&s0(n,i)?(n=Jb(),Tc=Mf=aa=null,mo=!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 a0&&i.locale!=="ko"?null:i.data;default:return null}}var aN={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 c0(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!aN[n.type]:i==="textarea"}function u0(n,i,o,l){fo?ho?ho.push(l):ho=[l]:fo=l,i=ju(i,"onChange"),0<i.length&&(o=new zc("onChange","change",null,o,l),n.push({event:o,listeners:i}))}var Fs=null,Ps=null;function rN(n){G1(n,0)}function Uc(n){var i=$s(n);if(Vb(i))return n}function d0(n,i){if(n==="change")return i}var f0=!1;if(Mi){var zf;if(Mi){var $f="oninput"in document;if(!$f){var h0=document.createElement("div");h0.setAttribute("oninput","return;"),$f=typeof h0.oninput=="function"}zf=$f}else zf=!1;f0=zf&&(!document.documentMode||9<document.documentMode)}function m0(){Fs&&(Fs.detachEvent("onpropertychange",p0),Ps=Fs=null)}function p0(n){if(n.propertyName==="value"&&Uc(Ps)){var i=[];u0(i,Ps,n,Of(n)),Wb(rN,i)}}function oN(n,i,o){n==="focusin"?(m0(),Fs=i,Ps=o,Fs.attachEvent("onpropertychange",p0)):n==="focusout"&&m0()}function sN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Uc(Ps)}function lN(n,i){if(n==="click")return Uc(i)}function cN(n,i){if(n==="input"||n==="change")return Uc(i)}function uN(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Mn=typeof Object.is=="function"?Object.is:uN;function Vs(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),l=Object.keys(i);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var f=o[l];if(!Lt.call(i,f)||!Mn(n[f],i[f]))return!1}return!0}function g0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function y0(n,i){var o=g0(n);n=0;for(var l;o;){if(o.nodeType===3){if(l=n+o.textContent.length,n<=i&&l>=i)return{node:o,offset:i-n};n=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=g0(o)}}function b0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?b0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function v0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Cc(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=Cc(n.document)}return i}function Uf(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 dN=Mi&&"documentMode"in document&&11>=document.documentMode,po=null,If=null,Gs=null,Bf=!1;function x0(n,i,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Bf||po==null||po!==Cc(l)||(l=po,"selectionStart"in l&&Uf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Gs&&Vs(Gs,l)||(Gs=l,l=ju(If,"onSelect"),0<l.length&&(i=new zc("onSelect","select",null,i,o),n.push({event:i,listeners:l}),i.target=po)))}function lr(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var go={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},Hf={},w0={};Mi&&(w0=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function cr(n){if(Hf[n])return Hf[n];if(!go[n])return n;var i=go[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in w0)return Hf[n]=i[o];return n}var k0=cr("animationend"),_0=cr("animationiteration"),S0=cr("animationstart"),fN=cr("transitionrun"),hN=cr("transitionstart"),mN=cr("transitioncancel"),E0=cr("transitionend"),j0=new Map,qf="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(" ");qf.push("scrollEnd");function ri(n,i){j0.set(n,i),or(i,[n])}var Ic=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)},Kn=[],yo=0,Ff=0;function Bc(){for(var n=yo,i=Ff=yo=0;i<n;){var o=Kn[i];Kn[i++]=null;var l=Kn[i];Kn[i++]=null;var f=Kn[i];Kn[i++]=null;var h=Kn[i];if(Kn[i++]=null,l!==null&&f!==null){var y=l.pending;y===null?f.next=f:(f.next=y.next,y.next=f),l.pending=f}h!==0&&O0(o,f,h)}}function Hc(n,i,o,l){Kn[yo++]=n,Kn[yo++]=i,Kn[yo++]=o,Kn[yo++]=l,Ff|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Pf(n,i,o,l){return Hc(n,i,o,l),qc(n)}function ur(n,i){return Hc(n,null,null,i),qc(n)}function O0(n,i,o){n.lanes|=o;var l=n.alternate;l!==null&&(l.lanes|=o);for(var f=!1,h=n.return;h!==null;)h.childLanes|=o,l=h.alternate,l!==null&&(l.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-be(o),n=h.hiddenUpdates,l=n[f],l===null?n[f]=[i]:l.push(i),i.lane=o|536870912),h):null}function qc(n){if(50<ml)throw ml=0,Jh=null,Error(r(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var bo={};function pN(n,i,o,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(n,i,o,l){return new pN(n,i,o,l)}function Vf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ci(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 A0(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 Fc(n,i,o,l,f,h){var y=0;if(l=n,typeof n=="function")Vf(n)&&(y=1);else if(typeof n=="string")y=xM(n,o,F.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case P:return n=Cn(31,o,i,f),n.elementType=P,n.lanes=h,n;case S:return dr(o.children,f,h,i);case j: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 B:return n=Cn(19,o,i,f),n.elementType=B,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:y=10;break e;case A:y=9;break e;case T:y=11;break e;case D:y=14;break e;case L:y=16,l=null;break e}y=29,o=Error(r(130,n===null?"null":typeof n,"")),l=null}return i=Cn(y,o,i,f),i.elementType=n,i.type=l,i.lanes=h,i}function dr(n,i,o,l){return n=Cn(7,n,l,i),n.lanes=o,n}function Gf(n,i,o){return n=Cn(6,n,null,i),n.lanes=o,n}function N0(n){var i=Cn(18,null,null,0);return i.stateNode=n,i}function Kf(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 M0=new WeakMap;function Yn(n,i){if(typeof n=="object"&&n!==null){var o=M0.get(n);return o!==void 0?o:(i={value:n,source:i,stack:$e(i)},M0.set(n,i),i)}return{value:n,source:i,stack:$e(i)}}var vo=[],xo=0,Pc=null,Ks=0,Qn=[],Xn=0,ra=null,hi=1,mi="";function Ri(n,i){vo[xo++]=Ks,vo[xo++]=Pc,Pc=n,Ks=i}function C0(n,i,o){Qn[Xn++]=hi,Qn[Xn++]=mi,Qn[Xn++]=ra,ra=n;var l=hi;n=mi;var f=32-be(l)-1;l&=~(1<<f),o+=1;var h=32-be(i)+f;if(30<h){var y=f-f%5;h=(l&(1<<y)-1).toString(32),l>>=y,f-=y,hi=1<<32-be(i)+f|o<<f|l,mi=h+n}else hi=1<<h|o<<f|l,mi=n}function Yf(n){n.return!==null&&(Ri(n,1),C0(n,1,0))}function Qf(n){for(;n===Pc;)Pc=vo[--xo],vo[xo]=null,Ks=vo[--xo],vo[xo]=null;for(;n===ra;)ra=Qn[--Xn],Qn[Xn]=null,mi=Qn[--Xn],Qn[Xn]=null,hi=Qn[--Xn],Qn[Xn]=null}function R0(n,i){Qn[Xn++]=hi,Qn[Xn++]=mi,Qn[Xn++]=ra,hi=i.id,mi=i.overflow,ra=n}var tn=null,xt=null,et=!1,oa=null,Zn=!1,Xf=Error(r(519));function sa(n){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ys(Yn(i,n)),Xf}function T0(n){var i=n.stateNode,o=n.type,l=n.memoizedProps;switch(i[Ot]=n,i[yn]=l,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<gl.length;o++)Qe(gl[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),Gb(i,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Qe("invalid",i);break;case"textarea":Qe("invalid",i),Yb(i,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||l.suppressHydrationWarning===!0||X1(i.textContent,o)?(l.popover!=null&&(Qe("beforetoggle",i),Qe("toggle",i)),l.onScroll!=null&&Qe("scroll",i),l.onScrollEnd!=null&&Qe("scrollend",i),l.onClick!=null&&(i.onclick=Ni),i=!0):i=!1,i||sa(n,!0)}function D0(n){for(tn=n.return;tn;)switch(tn.tag){case 5:case 31:case 13:Zn=!1;return;case 27:case 3:Zn=!0;return;default:tn=tn.return}}function wo(n){if(n!==tn)return!1;if(!et)return D0(n),et=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||mm(n.type,n.memoizedProps)),o=!o),o&&xt&&sa(n),D0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=rx(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=rx(n)}else i===27?(i=xt,wa(n.type)?(n=vm,vm=null,xt=n):xt=i):xt=tn?Jn(n.stateNode.nextSibling):null;return!0}function fr(){xt=tn=null,et=!1}function Zf(){var n=oa;return n!==null&&(kn===null?kn=n:kn.push.apply(kn,n),oa=null),n}function Ys(n){oa===null?oa=[n]:oa.push(n)}var Wf=M(null),hr=null,Ti=null;function la(n,i,o){I(Wf,i._currentValue),i._currentValue=o}function Di(n){n._currentValue=Wf.current,H(Wf)}function Jf(n,i,o){for(;n!==null;){var l=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),n===o)break;n=n.return}}function eh(n,i,o,l){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 k=h;h=f;for(var U=0;U<i.length;U++)if(k.context===i[U]){h.lanes|=o,k=h.alternate,k!==null&&(k.lanes|=o),Jf(h.return,o,n),l||(y=null);break e}h=k.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(r(341));y.lanes|=o,h=y.alternate,h!==null&&(h.lanes|=o),Jf(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 ko(n,i,o,l){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(r(387));if(y=y.memoizedProps,y!==null){var k=f.type;Mn(f.pendingProps.value,y.value)||(n!==null?n.push(k):n=[k])}}else if(f===oe.current){if(y=f.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(wl):n=[wl])}f=f.return}n!==null&&eh(i,n,o,l),i.flags|=262144}function Vc(n){for(n=n.firstContext;n!==null;){if(!Mn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function mr(n){hr=n,Ti=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function nn(n){return L0(hr,n)}function Gc(n,i){return hr===null&&mr(n),L0(n,i)}function L0(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Ti===null){if(n===null)throw Error(r(308));Ti=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ti=Ti.next=i;return o}var gN=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,l){n.push(l)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},yN=e.unstable_scheduleCallback,bN=e.unstable_NormalPriority,zt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function th(){return{controller:new gN,data:new Map,refCount:0}}function Qs(n){n.refCount--,n.refCount===0&&yN(bN,function(){n.controller.abort()})}var Xs=null,nh=0,_o=0,So=null;function vN(n,i){if(Xs===null){var o=Xs=[];nh=0,_o=rm(),So={status:"pending",value:void 0,then:function(l){o.push(l)}}}return nh++,i.then(z0,z0),i}function z0(){if(--nh===0&&Xs!==null){So!==null&&(So.status="fulfilled");var n=Xs;Xs=null,_o=0,So=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function xN(n,i){var o=[],l={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return n.then(function(){l.status="fulfilled",l.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(l.status="rejected",l.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),l}var $0=N.S;N.S=function(n,i){x1=yt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&vN(n,i),$0!==null&&$0(n,i)};var pr=M(null);function ih(){var n=pr.current;return n!==null?n:bt.pooledCache}function Kc(n,i){i===null?I(pr,pr.current):I(pr,i.pool)}function U0(){var n=ih();return n===null?null:{parent:zt._currentValue,pool:n}}var Eo=Error(r(460)),ah=Error(r(474)),Yc=Error(r(542)),Qc={then:function(){}};function I0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function B0(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(Ni,Ni),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,q0(n),n;default:if(typeof i.status=="string")i.then(Ni,Ni);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=i,n.status="pending",n.then(function(l){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=l}},function(l){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=l}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,q0(n),n}throw yr=i,Eo}}function gr(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(yr=o,Eo):o}}var yr=null;function H0(){if(yr===null)throw Error(r(459));var n=yr;return yr=null,n}function q0(n){if(n===Eo||n===Yc)throw Error(r(483))}var jo=null,Zs=0;function Xc(n){var i=Zs;return Zs+=1,jo===null&&(jo=[]),B0(jo,n,i)}function Ws(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Zc(n,i){throw i.$$typeof===w?Error(r(525)):(n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function F0(n){function i(G,q){if(n){var X=G.deletions;X===null?(G.deletions=[q],G.flags|=16):X.push(q)}}function o(G,q){if(!n)return null;for(;q!==null;)i(G,q),q=q.sibling;return null}function l(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function f(G,q){return G=Ci(G,q),G.index=0,G.sibling=null,G}function h(G,q,X){return G.index=X,n?(X=G.alternate,X!==null?(X=X.index,X<q?(G.flags|=67108866,q):X):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function y(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function k(G,q,X,fe){return q===null||q.tag!==6?(q=Gf(X,G.mode,fe),q.return=G,q):(q=f(q,X),q.return=G,q)}function U(G,q,X,fe){var De=X.type;return De===S?ue(G,q,X.props.children,fe,X.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&gr(De)===q.type)?(q=f(q,X.props),Ws(q,X),q.return=G,q):(q=Fc(X.type,X.key,X.props,null,G.mode,fe),Ws(q,X),q.return=G,q)}function Z(G,q,X,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=Kf(X,G.mode,fe),q.return=G,q):(q=f(q,X.children||[]),q.return=G,q)}function ue(G,q,X,fe,De){return q===null||q.tag!==7?(q=dr(X,G.mode,fe,De),q.return=G,q):(q=f(q,X),q.return=G,q)}function he(G,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Gf(""+q,G.mode,X),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return X=Fc(q.type,q.key,q.props,null,G.mode,X),Ws(X,q),X.return=G,X;case E:return q=Kf(q,G.mode,X),q.return=G,q;case L:return q=gr(q),he(G,q,X)}if(se(q)||de(q))return q=dr(q,G.mode,X,null),q.return=G,q;if(typeof q.then=="function")return he(G,Xc(q),X);if(q.$$typeof===O)return he(G,Gc(G,q),X);Zc(G,q)}return null}function J(G,q,X,fe){var De=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return De!==null?null:k(G,q,""+X,fe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case _:return X.key===De?U(G,q,X,fe):null;case E:return X.key===De?Z(G,q,X,fe):null;case L:return X=gr(X),J(G,q,X,fe)}if(se(X)||de(X))return De!==null?null:ue(G,q,X,fe,null);if(typeof X.then=="function")return J(G,q,Xc(X),fe);if(X.$$typeof===O)return J(G,q,Gc(G,X),fe);Zc(G,X)}return null}function re(G,q,X,fe,De){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return G=G.get(X)||null,k(q,G,""+fe,De);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case _:return G=G.get(fe.key===null?X:fe.key)||null,U(q,G,fe,De);case E:return G=G.get(fe.key===null?X:fe.key)||null,Z(q,G,fe,De);case L:return fe=gr(fe),re(G,q,X,fe,De)}if(se(fe)||de(fe))return G=G.get(X)||null,ue(q,G,fe,De,null);if(typeof fe.then=="function")return re(G,q,X,Xc(fe),De);if(fe.$$typeof===O)return re(G,q,X,Gc(q,fe),De);Zc(q,fe)}return null}function Ae(G,q,X,fe){for(var De=null,rt=null,Me=q,Ve=q=0,We=null;Me!==null&&Ve<X.length;Ve++){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ot=J(G,Me,X[Ve],fe);if(ot===null){Me===null&&(Me=We);break}n&&Me&&ot.alternate===null&&i(G,Me),q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot,Me=We}if(Ve===X.length)return o(G,Me),et&&Ri(G,Ve),De;if(Me===null){for(;Ve<X.length;Ve++)Me=he(G,X[Ve],fe),Me!==null&&(q=h(Me,q,Ve),rt===null?De=Me:rt.sibling=Me,rt=Me);return et&&Ri(G,Ve),De}for(Me=l(Me);Ve<X.length;Ve++)We=re(Me,G,Ve,X[Ve],fe),We!==null&&(n&&We.alternate!==null&&Me.delete(We.key===null?Ve:We.key),q=h(We,q,Ve),rt===null?De=We:rt.sibling=We,rt=We);return n&&Me.forEach(function(ja){return i(G,ja)}),et&&Ri(G,Ve),De}function Ue(G,q,X,fe){if(X==null)throw Error(r(151));for(var De=null,rt=null,Me=q,Ve=q=0,We=null,ot=X.next();Me!==null&&!ot.done;Ve++,ot=X.next()){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ja=J(G,Me,ot.value,fe);if(ja===null){Me===null&&(Me=We);break}n&&Me&&ja.alternate===null&&i(G,Me),q=h(ja,q,Ve),rt===null?De=ja:rt.sibling=ja,rt=ja,Me=We}if(ot.done)return o(G,Me),et&&Ri(G,Ve),De;if(Me===null){for(;!ot.done;Ve++,ot=X.next())ot=he(G,ot.value,fe),ot!==null&&(q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return et&&Ri(G,Ve),De}for(Me=l(Me);!ot.done;Ve++,ot=X.next())ot=re(Me,G,Ve,ot.value,fe),ot!==null&&(n&&ot.alternate!==null&&Me.delete(ot.key===null?Ve:ot.key),q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return n&&Me.forEach(function(CM){return i(G,CM)}),et&&Ri(G,Ve),De}function gt(G,q,X,fe){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case _:e:{for(var De=X.key;q!==null;){if(q.key===De){if(De=X.type,De===S){if(q.tag===7){o(G,q.sibling),fe=f(q,X.props.children),fe.return=G,G=fe;break e}}else if(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&gr(De)===q.type){o(G,q.sibling),fe=f(q,X.props),Ws(fe,X),fe.return=G,G=fe;break e}o(G,q);break}else i(G,q);q=q.sibling}X.type===S?(fe=dr(X.props.children,G.mode,fe,X.key),fe.return=G,G=fe):(fe=Fc(X.type,X.key,X.props,null,G.mode,fe),Ws(fe,X),fe.return=G,G=fe)}return y(G);case E:e:{for(De=X.key;q!==null;){if(q.key===De)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){o(G,q.sibling),fe=f(q,X.children||[]),fe.return=G,G=fe;break e}else{o(G,q);break}else i(G,q);q=q.sibling}fe=Kf(X,G.mode,fe),fe.return=G,G=fe}return y(G);case L:return X=gr(X),gt(G,q,X,fe)}if(se(X))return Ae(G,q,X,fe);if(de(X)){if(De=de(X),typeof De!="function")throw Error(r(150));return X=De.call(X),Ue(G,q,X,fe)}if(typeof X.then=="function")return gt(G,q,Xc(X),fe);if(X.$$typeof===O)return gt(G,q,Gc(G,X),fe);Zc(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(o(G,q.sibling),fe=f(q,X),fe.return=G,G=fe):(o(G,q),fe=Gf(X,G.mode,fe),fe.return=G,G=fe),y(G)):o(G,q)}return function(G,q,X,fe){try{Zs=0;var De=gt(G,q,X,fe);return jo=null,De}catch(Me){if(Me===Eo||Me===Yc)throw Me;var rt=Cn(29,Me,null,G.mode);return rt.lanes=fe,rt.return=G,rt}finally{}}}var br=F0(!0),P0=F0(!1),ca=!1;function rh(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oh(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 ua(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function da(n,i,o){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(st&2)!==0){var f=l.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i,i=qc(n),O0(n,null,o),i}return Hc(n,l,i,o),qc(n)}function Js(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var l=i.lanes;l&=n.pendingLanes,o|=l,i.lanes=o,Ac(n,o)}}function sh(n,i){var o=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,o===l)){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:l.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var lh=!1;function el(){if(lh){var n=So;if(n!==null)throw n}}function tl(n,i,o,l){lh=!1;var f=n.updateQueue;ca=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var U=k,Z=U.next;U.next=null,y===null?h=Z:y.next=Z,y=U;var ue=n.alternate;ue!==null&&(ue=ue.updateQueue,k=ue.lastBaseUpdate,k!==y&&(k===null?ue.firstBaseUpdate=Z:k.next=Z,ue.lastBaseUpdate=U))}if(h!==null){var he=f.baseState;y=0,ue=Z=U=null,k=h;do{var J=k.lane&-536870913,re=J!==k.lane;if(re?(Ze&J)===J:(l&J)===J){J!==0&&J===_o&&(lh=!0),ue!==null&&(ue=ue.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ae=n,Ue=k;J=i;var gt=o;switch(Ue.tag){case 1:if(Ae=Ue.payload,typeof Ae=="function"){he=Ae.call(gt,he,J);break e}he=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ue.payload,J=typeof Ae=="function"?Ae.call(gt,he,J):Ae,J==null)break e;he=b({},he,J);break e;case 2:ca=!0}}J=k.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:k.tag,payload:k.payload,callback:k.callback,next:null},ue===null?(Z=ue=re,U=he):ue=ue.next=re,y|=J;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;re=k,k=re.next,re.next=null,f.lastBaseUpdate=re,f.shared.pending=null}}while(!0);ue===null&&(U=he),f.baseState=U,f.firstBaseUpdate=Z,f.lastBaseUpdate=ue,h===null&&(f.shared.lanes=0),ga|=y,n.lanes=y,n.memoizedState=he}}function V0(n,i){if(typeof n!="function")throw Error(r(191,n));n.call(i)}function G0(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)V0(o[n],i)}var Oo=M(null),Wc=M(0);function K0(n,i){n=Fi,I(Wc,n),I(Oo,i),Fi=n|i.baseLanes}function ch(){I(Wc,Fi),I(Oo,Oo.current)}function uh(){Fi=Wc.current,H(Oo),H(Wc)}var Rn=M(null),Wn=null;function fa(n){var i=n.alternate;I(Tt,Tt.current&1),I(Rn,n),Wn===null&&(i===null||Oo.current!==null||i.memoizedState!==null)&&(Wn=n)}function dh(n){I(Tt,Tt.current),I(Rn,n),Wn===null&&(Wn=n)}function Y0(n){n.tag===22?(I(Tt,Tt.current),I(Rn,n),Wn===null&&(Wn=n)):ha()}function ha(){I(Tt,Tt.current),I(Rn,Rn.current)}function Tn(n){H(Rn),Wn===n&&(Wn=null),H(Tt)}var Tt=M(0);function Jc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||ym(o)||bm(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 Li=0,Fe=null,mt=null,$t=null,eu=!1,Ao=!1,vr=!1,tu=0,nl=0,No=null,wN=0;function Nt(){throw Error(r(321))}function fh(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 hh(n,i,o,l,f,h){return Li=h,Fe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,N.H=n===null||n.memoizedState===null?Cv:Ah,vr=!1,h=o(l,f),vr=!1,Ao&&(h=X0(i,o,l,f)),Q0(n),h}function Q0(n){N.H=rl;var i=mt!==null&&mt.next!==null;if(Li=0,$t=mt=Fe=null,eu=!1,nl=0,No=null,i)throw Error(r(300));n===null||Ut||(n=n.dependencies,n!==null&&Vc(n)&&(Ut=!0))}function X0(n,i,o,l){Fe=n;var f=0;do{if(Ao&&(No=null),nl=0,Ao=!1,25<=f)throw Error(r(301));if(f+=1,$t=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)}N.H=Rv,h=i(o,l)}while(Ao);return h}function kN(){var n=N.H,i=n.useState()[0];return i=typeof i.then=="function"?il(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Fe.flags|=1024),i}function mh(){var n=tu!==0;return tu=0,n}function ph(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function gh(n){if(eu){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}eu=!1}Li=0,$t=mt=Fe=null,Ao=!1,nl=tu=0,No=null}function dn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?Fe.memoizedState=$t=n:$t=$t.next=n,$t}function Dt(){if(mt===null){var n=Fe.alternate;n=n!==null?n.memoizedState:null}else n=mt.next;var i=$t===null?Fe.memoizedState:$t.next;if(i!==null)$t=i,mt=n;else{if(n===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));mt=n,n={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},$t===null?Fe.memoizedState=$t=n:$t=$t.next=n}return $t}function nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function il(n){var i=nl;return nl+=1,No===null&&(No=[]),n=B0(No,n,i),i=Fe,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,N.H=i===null||i.memoizedState===null?Cv:Ah),n}function iu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return il(n);if(n.$$typeof===O)return nn(n)}throw Error(r(438,String(n)))}function yh(n){var i=null,o=Fe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var l=Fe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(i={data:l.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=nu(),Fe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),l=0;l<n;l++)o[l]=le;return i.index++,o}function zi(n,i){return typeof i=="function"?i(n):i}function au(n){var i=Dt();return bh(i,mt,n)}function bh(n,i,o){var l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var f=n.baseQueue,h=l.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,l.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{i=f.next;var k=y=null,U=null,Z=i,ue=!1;do{var he=Z.lane&-536870913;if(he!==Z.lane?(Ze&he)===he:(Li&he)===he){var J=Z.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),he===_o&&(ue=!0);else if((Li&J)===J){Z=Z.next,J===_o&&(ue=!0);continue}else he={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(k=U=he,y=h):U=U.next=he,Fe.lanes|=J,ga|=J;he=Z.action,vr&&o(h,he),h=Z.hasEagerState?Z.eagerState:o(h,he)}else J={lane:he,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(k=U=J,y=h):U=U.next=J,Fe.lanes|=he,ga|=he;Z=Z.next}while(Z!==null&&Z!==i);if(U===null?y=h:U.next=k,!Mn(h,n.memoizedState)&&(Ut=!0,ue&&(o=So,o!==null)))throw o;n.memoizedState=h,n.baseState=y,n.baseQueue=U,l.lastRenderedState=h}return f===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function vh(n){var i=Dt(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var l=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)||(Ut=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,l]}function Z0(n,i,o){var l=Fe,f=Dt(),h=et;if(h){if(o===void 0)throw Error(r(407));o=o()}else o=i();var y=!Mn((mt||f).memoizedState,o);if(y&&(f.memoizedState=o,Ut=!0),f=f.queue,kh(ev.bind(null,l,f,n),[n]),f.getSnapshot!==i||y||$t!==null&&$t.memoizedState.tag&1){if(l.flags|=2048,Mo(9,{destroy:void 0},J0.bind(null,l,f,o,i),null),bt===null)throw Error(r(349));h||(Li&127)!==0||W0(l,i,o)}return o}function W0(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Fe.updateQueue,i===null?(i=nu(),Fe.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function J0(n,i,o,l){i.value=o,i.getSnapshot=l,tv(i)&&nv(n)}function ev(n,i,o){return o(function(){tv(i)&&nv(n)})}function tv(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Mn(n,o)}catch{return!0}}function nv(n){var i=ur(n,2);i!==null&&_n(i,n,2)}function xh(n){var i=dn();if(typeof n=="function"){var o=n;if(n=o(),vr){ne(!0);try{o()}finally{ne(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:n},i}function iv(n,i,o,l){return n.baseState=o,bh(n,mt,typeof l=="function"?l:zi)}function _N(n,i,o,l,f){if(su(n))throw Error(r(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)}};N.T!==null?o(!0):h.isTransition=!1,l(h),o=i.pending,o===null?(h.next=i.pending=h,av(i,h)):(h.next=o.next,i.pending=o.next=h)}}function av(n,i){var o=i.action,l=i.payload,f=n.state;if(i.isTransition){var h=N.T,y={};N.T=y;try{var k=o(f,l),U=N.S;U!==null&&U(y,k),rv(n,i,k)}catch(Z){wh(n,i,Z)}finally{h!==null&&y.types!==null&&(h.types=y.types),N.T=h}}else try{h=o(f,l),rv(n,i,h)}catch(Z){wh(n,i,Z)}}function rv(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){ov(n,i,l)},function(l){return wh(n,i,l)}):ov(n,i,o)}function ov(n,i,o){i.status="fulfilled",i.value=o,sv(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,av(n,o)))}function wh(n,i,o){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do i.status="rejected",i.reason=o,sv(i),i=i.next;while(i!==l)}n.action=null}function sv(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function lv(n,i){return i}function cv(n,i){if(et){var o=bt.formState;if(o!==null){e:{var l=Fe;if(et){if(xt){t:{for(var f=xt,h=Zn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Jn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){xt=Jn(f.nextSibling),l=f.data==="F!";break e}}sa(l)}l=!1}l&&(i=o[0])}}return o=dn(),o.memoizedState=o.baseState=i,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lv,lastRenderedState:i},o.queue=l,o=Av.bind(null,Fe,l),l.dispatch=o,l=xh(!1),h=Oh.bind(null,Fe,!1,l.queue),l=dn(),f={state:i,dispatch:null,action:n,pending:null},l.queue=f,o=_N.bind(null,Fe,f,h,o),f.dispatch=o,l.memoizedState=n,[i,o,!1]}function uv(n){var i=Dt();return dv(i,mt,n)}function dv(n,i,o){if(i=bh(n,i,lv)[0],n=au(zi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var l=il(i)}catch(y){throw y===Eo?Yc:y}else l=i;i=Dt();var f=i.queue,h=f.dispatch;return o!==i.memoizedState&&(Fe.flags|=2048,Mo(9,{destroy:void 0},SN.bind(null,f,o),null)),[l,h,n]}function SN(n,i){n.action=i}function fv(n){var i=Dt(),o=mt;if(o!==null)return dv(i,o,n);Dt(),i=i.memoizedState,o=Dt();var l=o.queue.dispatch;return o.memoizedState=n,[i,l,!1]}function Mo(n,i,o,l){return n={tag:n,create:o,deps:l,inst:i,next:null},i=Fe.updateQueue,i===null&&(i=nu(),Fe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(l=o.next,o.next=n,n.next=l,i.lastEffect=n),n}function hv(){return Dt().memoizedState}function ru(n,i,o,l){var f=dn();Fe.flags|=n,f.memoizedState=Mo(1|i,{destroy:void 0},o,l===void 0?null:l)}function ou(n,i,o,l){var f=Dt();l=l===void 0?null:l;var h=f.memoizedState.inst;mt!==null&&l!==null&&fh(l,mt.memoizedState.deps)?f.memoizedState=Mo(i,h,o,l):(Fe.flags|=n,f.memoizedState=Mo(1|i,h,o,l))}function mv(n,i){ru(8390656,8,n,i)}function kh(n,i){ou(2048,8,n,i)}function EN(n){Fe.flags|=4;var i=Fe.updateQueue;if(i===null)i=nu(),Fe.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function pv(n){var i=Dt().memoizedState;return EN({ref:i,nextImpl:n}),function(){if((st&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function gv(n,i){return ou(4,2,n,i)}function yv(n,i){return ou(4,4,n,i)}function bv(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 vv(n,i,o){o=o!=null?o.concat([n]):null,ou(4,4,bv.bind(null,i,n),o)}function _h(){}function xv(n,i){var o=Dt();i=i===void 0?null:i;var l=o.memoizedState;return i!==null&&fh(i,l[1])?l[0]:(o.memoizedState=[n,i],n)}function wv(n,i){var o=Dt();i=i===void 0?null:i;var l=o.memoizedState;if(i!==null&&fh(i,l[1]))return l[0];if(l=n(),vr){ne(!0);try{n()}finally{ne(!1)}}return o.memoizedState=[l,i],l}function Sh(n,i,o){return o===void 0||(Li&1073741824)!==0&&(Ze&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=k1(),Fe.lanes|=n,ga|=n,o)}function kv(n,i,o,l){return Mn(o,i)?o:Oo.current!==null?(n=Sh(n,o,l),Mn(n,i)||(Ut=!0),n):(Li&42)===0||(Li&1073741824)!==0&&(Ze&261930)===0?(Ut=!0,n.memoizedState=o):(n=k1(),Fe.lanes|=n,ga|=n,i)}function _v(n,i,o,l,f){var h=V.p;V.p=h!==0&&8>h?h:8;var y=N.T,k={};N.T=k,Oh(n,!1,i,o);try{var U=f(),Z=N.S;if(Z!==null&&Z(k,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ue=xN(U,l);al(n,i,ue,zn(n))}else al(n,i,l,zn(n))}catch(he){al(n,i,{then:function(){},status:"rejected",reason:he},zn())}finally{V.p=h,y!==null&&k.types!==null&&(y.types=k.types),N.T=y}}function jN(){}function Eh(n,i,o,l){if(n.tag!==5)throw Error(r(476));var f=Sv(n).queue;_v(n,f,i,te,o===null?jN:function(){return Ev(n),o(l)})}function Sv(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:zi,lastRenderedState:te},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Ev(n){var i=Sv(n);i.next===null&&(i=n.alternate.memoizedState),al(n,i.next.queue,{},zn())}function jh(){return nn(wl)}function jv(){return Dt().memoizedState}function Ov(){return Dt().memoizedState}function ON(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=zn();n=ua(o);var l=da(i,n,o);l!==null&&(_n(l,i,o),Js(l,i,o)),i={cache:th()},n.payload=i;return}i=i.return}}function AN(n,i,o){var l=zn();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},su(n)?Nv(i,o):(o=Pf(n,i,o,l),o!==null&&(_n(o,n,l),Mv(o,i,l)))}function Av(n,i,o){var l=zn();al(n,i,o,l)}function al(n,i,o,l){var f={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(su(n))Nv(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,k=h(y,o);if(f.hasEagerState=!0,f.eagerState=k,Mn(k,y))return Hc(n,i,f,0),bt===null&&Bc(),!1}catch{}finally{}if(o=Pf(n,i,f,l),o!==null)return _n(o,n,l),Mv(o,i,l),!0}return!1}function Oh(n,i,o,l){if(l={lane:2,revertLane:rm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},su(n)){if(i)throw Error(r(479))}else i=Pf(n,o,l,2),i!==null&&_n(i,n,2)}function su(n){var i=n.alternate;return n===Fe||i!==null&&i===Fe}function Nv(n,i){Ao=eu=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function Mv(n,i,o){if((o&4194048)!==0){var l=i.lanes;l&=n.pendingLanes,o|=l,i.lanes=o,Ac(n,o)}}var rl={readContext:nn,use:iu,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};rl.useEffectEvent=Nt;var Cv={readContext:nn,use:iu,useCallback:function(n,i){return dn().memoizedState=[n,i===void 0?null:i],n},useContext:nn,useEffect:mv,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,ru(4194308,4,bv.bind(null,i,n),o)},useLayoutEffect:function(n,i){return ru(4194308,4,n,i)},useInsertionEffect:function(n,i){ru(4,2,n,i)},useMemo:function(n,i){var o=dn();i=i===void 0?null:i;var l=n();if(vr){ne(!0);try{n()}finally{ne(!1)}}return o.memoizedState=[l,i],l},useReducer:function(n,i,o){var l=dn();if(o!==void 0){var f=o(i);if(vr){ne(!0);try{o(i)}finally{ne(!1)}}}else f=i;return l.memoizedState=l.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},l.queue=n,n=n.dispatch=AN.bind(null,Fe,n),[l.memoizedState,n]},useRef:function(n){var i=dn();return n={current:n},i.memoizedState=n},useState:function(n){n=xh(n);var i=n.queue,o=Av.bind(null,Fe,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:_h,useDeferredValue:function(n,i){var o=dn();return Sh(o,n,i)},useTransition:function(){var n=xh(!1);return n=_v.bind(null,Fe,n.queue,!0,!1),dn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var l=Fe,f=dn();if(et){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),bt===null)throw Error(r(349));(Ze&127)!==0||W0(l,i,o)}f.memoizedState=o;var h={value:o,getSnapshot:i};return f.queue=h,mv(ev.bind(null,l,h,n),[n]),l.flags|=2048,Mo(9,{destroy:void 0},J0.bind(null,l,h,o,i),null),o},useId:function(){var n=dn(),i=bt.identifierPrefix;if(et){var o=mi,l=hi;o=(l&~(1<<32-be(l)-1)).toString(32)+o,i="_"+i+"R_"+o,o=tu++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=wN++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:jh,useFormState:cv,useActionState:cv,useOptimistic:function(n){var i=dn();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Oh.bind(null,Fe,!0,o),o.dispatch=i,[n,i]},useMemoCache:yh,useCacheRefresh:function(){return dn().memoizedState=ON.bind(null,Fe)},useEffectEvent:function(n){var i=dn(),o={impl:n};return i.memoizedState=o,function(){if((st&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},Ah={readContext:nn,use:iu,useCallback:xv,useContext:nn,useEffect:kh,useImperativeHandle:vv,useInsertionEffect:gv,useLayoutEffect:yv,useMemo:wv,useReducer:au,useRef:hv,useState:function(){return au(zi)},useDebugValue:_h,useDeferredValue:function(n,i){var o=Dt();return kv(o,mt.memoizedState,n,i)},useTransition:function(){var n=au(zi)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:il(n),i]},useSyncExternalStore:Z0,useId:jv,useHostTransitionStatus:jh,useFormState:uv,useActionState:uv,useOptimistic:function(n,i){var o=Dt();return iv(o,mt,n,i)},useMemoCache:yh,useCacheRefresh:Ov};Ah.useEffectEvent=pv;var Rv={readContext:nn,use:iu,useCallback:xv,useContext:nn,useEffect:kh,useImperativeHandle:vv,useInsertionEffect:gv,useLayoutEffect:yv,useMemo:wv,useReducer:vh,useRef:hv,useState:function(){return vh(zi)},useDebugValue:_h,useDeferredValue:function(n,i){var o=Dt();return mt===null?Sh(o,n,i):kv(o,mt.memoizedState,n,i)},useTransition:function(){var n=vh(zi)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:il(n),i]},useSyncExternalStore:Z0,useId:jv,useHostTransitionStatus:jh,useFormState:fv,useActionState:fv,useOptimistic:function(n,i){var o=Dt();return mt!==null?iv(o,mt,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:yh,useCacheRefresh:Ov};Rv.useEffectEvent=pv;function Nh(n,i,o,l){i=n.memoizedState,o=o(l,i),o=o==null?i:b({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Mh={enqueueSetState:function(n,i,o){n=n._reactInternals;var l=zn(),f=ua(l);f.payload=i,o!=null&&(f.callback=o),i=da(n,f,l),i!==null&&(_n(i,n,l),Js(i,n,l))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var l=zn(),f=ua(l);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=da(n,f,l),i!==null&&(_n(i,n,l),Js(i,n,l))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=zn(),l=ua(o);l.tag=2,i!=null&&(l.callback=i),i=da(n,l,o),i!==null&&(_n(i,n,o),Js(i,n,o))}};function Tv(n,i,o,l,f,h,y){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,y):i.prototype&&i.prototype.isPureReactComponent?!Vs(o,l)||!Vs(f,h):!0}function Dv(n,i,o,l){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,l),i.state!==n&&Mh.enqueueReplaceState(i,i.state,null)}function xr(n,i){var o=i;if("ref"in i){o={};for(var l in i)l!=="ref"&&(o[l]=i[l])}if(n=n.defaultProps){o===i&&(o=b({},o));for(var f in n)o[f]===void 0&&(o[f]=n[f])}return o}function Lv(n){Ic(n)}function zv(n){console.error(n)}function $v(n){Ic(n)}function lu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(l){setTimeout(function(){throw l})}}function Uv(n,i,o){try{var l=n.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ch(n,i,o){return o=ua(o),o.tag=3,o.payload={element:null},o.callback=function(){lu(n,i)},o}function Iv(n){return n=ua(n),n.tag=3,n}function Bv(n,i,o,l){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var h=l.value;n.payload=function(){return f(h)},n.callback=function(){Uv(i,o,l)}}var y=o.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){Uv(i,o,l),typeof f!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var k=l.stack;this.componentDidCatch(l.value,{componentStack:k!==null?k:""})})}function NN(n,i,o,l,f){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(i=o.alternate,i!==null&&ko(i,o,f,!0),o=Rn.current,o!==null){switch(o.tag){case 31:case 13:return Wn===null?xu():o.alternate===null&&Mt===0&&(Mt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,l===Qc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([l]):i.add(l),nm(n,l,f)),!1;case 22:return o.flags|=65536,l===Qc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([l]):o.add(l)),nm(n,l,f)),!1}throw Error(r(435,o.tag))}return nm(n,l,f),xu(),!1}if(et)return i=Rn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,l!==Xf&&(n=Error(r(422),{cause:l}),Ys(Yn(n,o)))):(l!==Xf&&(i=Error(r(423),{cause:l}),Ys(Yn(i,o))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,l=Yn(l,o),f=Ch(n.stateNode,l,f),sh(n,f),Mt!==4&&(Mt=2)),!1;var h=Error(r(520),{cause:l});if(h=Yn(h,o),hl===null?hl=[h]:hl.push(h),Mt!==4&&(Mt=2),i===null)return!0;l=Yn(l,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=f&-f,o.lanes|=n,n=Ch(o.stateNode,l,n),sh(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"&&(ya===null||!ya.has(h))))return o.flags|=65536,f&=-f,o.lanes|=f,f=Iv(f),Bv(f,n,o,l),sh(o,f),!1}o=o.return}while(o!==null);return!1}var Rh=Error(r(461)),Ut=!1;function an(n,i,o,l){i.child=n===null?P0(i,null,o,l):br(i,n.child,o,l)}function Hv(n,i,o,l,f){o=o.render;var h=i.ref;if("ref"in l){var y={};for(var k in l)k!=="ref"&&(y[k]=l[k])}else y=l;return mr(i),l=hh(n,i,o,y,h,f),k=mh(),n!==null&&!Ut?(ph(n,i,f),$i(n,i,f)):(et&&k&&Yf(i),i.flags|=1,an(n,i,l,f),i.child)}function qv(n,i,o,l,f){if(n===null){var h=o.type;return typeof h=="function"&&!Vf(h)&&h.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=h,Fv(n,i,h,l,f)):(n=Fc(o.type,null,l,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(h=n.child,!Bh(n,f)){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:Vs,o(y,l)&&n.ref===i.ref)return $i(n,i,f)}return i.flags|=1,n=Ci(h,l),n.ref=i.ref,n.return=i,i.child=n}function Fv(n,i,o,l,f){if(n!==null){var h=n.memoizedProps;if(Vs(h,l)&&n.ref===i.ref)if(Ut=!1,i.pendingProps=l=h,Bh(n,f))(n.flags&131072)!==0&&(Ut=!0);else return i.lanes=n.lanes,$i(n,i,f)}return Th(n,i,o,l,f)}function Pv(n,i,o,l){var f=l.children,h=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,n!==null){for(l=i.child=n.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~h}else l=0,i.child=null;return Vv(n,i,h,o,l)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Kc(i,h!==null?h.cachePool:null),h!==null?K0(i,h):ch(),Y0(i);else return l=i.lanes=536870912,Vv(n,i,h!==null?h.baseLanes|o:o,o,l)}else h!==null?(Kc(i,h.cachePool),K0(i,h),ha(),i.memoizedState=null):(n!==null&&Kc(i,null),ch(),ha());return an(n,i,f,o),i.child}function ol(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Vv(n,i,o,l,f){var h=ih();return h=h===null?null:{parent:zt._currentValue,pool:h},i.memoizedState={baseLanes:o,cachePool:h},n!==null&&Kc(i,null),ch(),Y0(i),n!==null&&ko(n,i,l,!0),i.childLanes=f,null}function cu(n,i){return i=du({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Gv(n,i,o){return br(i,n.child,null,o),n=cu(i,i.pendingProps),n.flags|=2,Tn(i),i.memoizedState=null,n}function MN(n,i,o){var l=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(et){if(l.mode==="hidden")return n=cu(i,l),i.lanes=536870912,ol(null,n);if(dh(i),(n=xt)?(n=ax(n,Zn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ra!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},o=N0(n),o.return=i,i.child=o,tn=i,xt=null)):n=null,n===null)throw sa(i);return i.lanes=536870912,null}return cu(i,l)}var h=n.memoizedState;if(h!==null){var y=h.dehydrated;if(dh(i),f)if(i.flags&256)i.flags&=-257,i=Gv(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(r(558));else if(Ut||ko(n,i,o,!1),f=(o&n.childLanes)!==0,Ut||f){if(l=bt,l!==null&&(y=ae(l,o),y!==0&&y!==h.retryLane))throw h.retryLane=y,ur(n,y),_n(l,n,y),Rh;xu(),i=Gv(n,i,o)}else n=h.treeContext,xt=Jn(y.nextSibling),tn=i,et=!0,oa=null,Zn=!1,n!==null&&R0(i,n),i=cu(i,l),i.flags|=4096;return i}return n=Ci(n.child,{mode:l.mode,children:l.children}),n.ref=i.ref,i.child=n,n.return=i,n}function uu(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(r(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function Th(n,i,o,l,f){return mr(i),o=hh(n,i,o,l,void 0,f),l=mh(),n!==null&&!Ut?(ph(n,i,f),$i(n,i,f)):(et&&l&&Yf(i),i.flags|=1,an(n,i,o,f),i.child)}function Kv(n,i,o,l,f,h){return mr(i),i.updateQueue=null,o=X0(i,l,o,f),Q0(n),l=mh(),n!==null&&!Ut?(ph(n,i,h),$i(n,i,h)):(et&&l&&Yf(i),i.flags|=1,an(n,i,o,h),i.child)}function Yv(n,i,o,l,f){if(mr(i),i.stateNode===null){var h=bo,y=o.contextType;typeof y=="object"&&y!==null&&(h=nn(y)),h=new o(l,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Mh,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=l,h.state=i.memoizedState,h.refs={},rh(i),y=o.contextType,h.context=typeof y=="object"&&y!==null?nn(y):bo,h.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Nh(i,o,y,l),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&&Mh.enqueueReplaceState(h,h.state,null),tl(i,l,h,f),el(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),l=!0}else if(n===null){h=i.stateNode;var k=i.memoizedProps,U=xr(o,k);h.props=U;var Z=h.context,ue=o.contextType;y=bo,typeof ue=="object"&&ue!==null&&(y=nn(ue));var he=o.getDerivedStateFromProps;ue=typeof he=="function"||typeof h.getSnapshotBeforeUpdate=="function",k=i.pendingProps!==k,ue||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(k||Z!==y)&&Dv(i,h,l,y),ca=!1;var J=i.memoizedState;h.state=J,tl(i,l,h,f),el(),Z=i.memoizedState,k||J!==Z||ca?(typeof he=="function"&&(Nh(i,o,he,l),Z=i.memoizedState),(U=ca||Tv(i,o,U,l,J,Z,y))?(ue||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=l,i.memoizedState=Z),h.props=l,h.state=Z,h.context=y,l=U):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{h=i.stateNode,oh(n,i),y=i.memoizedProps,ue=xr(o,y),h.props=ue,he=i.pendingProps,J=h.context,Z=o.contextType,U=bo,typeof Z=="object"&&Z!==null&&(U=nn(Z)),k=o.getDerivedStateFromProps,(Z=typeof k=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==he||J!==U)&&Dv(i,h,l,U),ca=!1,J=i.memoizedState,h.state=J,tl(i,l,h,f),el();var re=i.memoizedState;y!==he||J!==re||ca||n!==null&&n.dependencies!==null&&Vc(n.dependencies)?(typeof k=="function"&&(Nh(i,o,k,l),re=i.memoizedState),(ue=ca||Tv(i,o,ue,l,J,re,U)||n!==null&&n.dependencies!==null&&Vc(n.dependencies))?(Z||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,re,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,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=l,i.memoizedState=re),h.props=l,h.state=re,h.context=U,l=ue):(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),l=!1)}return h=l,uu(n,i),l=(i.flags&128)!==0,h||l?(h=i.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,n!==null&&l?(i.child=br(i,n.child,null,f),i.child=br(i,null,o,f)):an(n,i,o,f),i.memoizedState=h.state,n=i.child):n=$i(n,i,f),n}function Qv(n,i,o,l){return fr(),i.flags|=256,an(n,i,o,l),i.child}var Dh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lh(n){return{baseLanes:n,cachePool:U0()}}function zh(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=Ln),n}function Xv(n,i,o){var l=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=n!==null&&n.memoizedState===null?!1:(Tt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,n===null){if(et){if(f?fa(i):ha(),(n=xt)?(n=ax(n,Zn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ra!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},o=N0(n),o.return=i,i.child=o,tn=i,xt=null)):n=null,n===null)throw sa(i);return bm(n)?i.lanes=32:i.lanes=536870912,null}var k=l.children;return l=l.fallback,f?(ha(),f=i.mode,k=du({mode:"hidden",children:k},f),l=dr(l,f,o,null),k.return=i,l.return=i,k.sibling=l,i.child=k,l=i.child,l.memoizedState=Lh(o),l.childLanes=zh(n,y,o),i.memoizedState=Dh,ol(null,l)):(fa(i),$h(i,k))}var U=n.memoizedState;if(U!==null&&(k=U.dehydrated,k!==null)){if(h)i.flags&256?(fa(i),i.flags&=-257,i=Uh(n,i,o)):i.memoizedState!==null?(ha(),i.child=n.child,i.flags|=128,i=null):(ha(),k=l.fallback,f=i.mode,l=du({mode:"visible",children:l.children},f),k=dr(k,f,o,null),k.flags|=2,l.return=i,k.return=i,l.sibling=k,i.child=l,br(i,n.child,null,o),l=i.child,l.memoizedState=Lh(o),l.childLanes=zh(n,y,o),i.memoizedState=Dh,i=ol(null,l));else if(fa(i),bm(k)){if(y=k.nextSibling&&k.nextSibling.dataset,y)var Z=y.dgst;y=Z,l=Error(r(419)),l.stack="",l.digest=y,Ys({value:l,source:null,stack:null}),i=Uh(n,i,o)}else if(Ut||ko(n,i,o,!1),y=(o&n.childLanes)!==0,Ut||y){if(y=bt,y!==null&&(l=ae(y,o),l!==0&&l!==U.retryLane))throw U.retryLane=l,ur(n,l),_n(y,n,l),Rh;ym(k)||xu(),i=Uh(n,i,o)}else ym(k)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,xt=Jn(k.nextSibling),tn=i,et=!0,oa=null,Zn=!1,n!==null&&R0(i,n),i=$h(i,l.children),i.flags|=4096);return i}return f?(ha(),k=l.fallback,f=i.mode,U=n.child,Z=U.sibling,l=Ci(U,{mode:"hidden",children:l.children}),l.subtreeFlags=U.subtreeFlags&65011712,Z!==null?k=Ci(Z,k):(k=dr(k,f,o,null),k.flags|=2),k.return=i,l.return=i,l.sibling=k,i.child=l,ol(null,l),l=i.child,k=n.child.memoizedState,k===null?k=Lh(o):(f=k.cachePool,f!==null?(U=zt._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=U0(),k={baseLanes:k.baseLanes|o,cachePool:f}),l.memoizedState=k,l.childLanes=zh(n,y,o),i.memoizedState=Dh,ol(n.child,l)):(fa(i),o=n.child,n=o.sibling,o=Ci(o,{mode:"visible",children:l.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 $h(n,i){return i=du({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function du(n,i){return n=Cn(22,n,null,i),n.lanes=0,n}function Uh(n,i,o){return br(i,n.child,null,o),n=$h(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Zv(n,i,o){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i),Jf(n.return,i,o)}function Ih(n,i,o,l,f,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=o,y.tailMode=f,y.treeForkCount=h)}function Wv(n,i,o){var l=i.pendingProps,f=l.revealOrder,h=l.tail;l=l.children;var y=Tt.current,k=(y&2)!==0;if(k?(y=y&1|2,i.flags|=128):y&=1,I(Tt,y),an(n,i,l,o),l=et?Ks:0,!k&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Zv(n,o,i);else if(n.tag===19)Zv(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&&Jc(n)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),Ih(i,!1,f,o,h,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Jc(n)===null){i.child=f;break}n=f.sibling,f.sibling=o,o=f,f=n}Ih(i,!0,o,null,h,l);break;case"together":Ih(i,!1,null,null,void 0,l);break;default:i.memoizedState=null}return i.child}function $i(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),ga|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(ko(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,o=Ci(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Ci(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function Bh(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Vc(n)))}function CN(n,i,o){switch(i.tag){case 3:ke(i,i.stateNode.containerInfo),la(i,zt,n.memoizedState.cache),fr();break;case 27:case 5:ce(i);break;case 4:ke(i,i.stateNode.containerInfo);break;case 10:la(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,dh(i),null;break;case 13:var l=i.memoizedState;if(l!==null)return l.dehydrated!==null?(fa(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Xv(n,i,o):(fa(i),n=$i(n,i,o),n!==null?n.sibling:null);fa(i);break;case 19:var f=(n.flags&128)!==0;if(l=(o&i.childLanes)!==0,l||(ko(n,i,o,!1),l=(o&i.childLanes)!==0),f){if(l)return Wv(n,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),I(Tt,Tt.current),l)break;return null;case 22:return i.lanes=0,Pv(n,i,o,i.pendingProps);case 24:la(i,zt,n.memoizedState.cache)}return $i(n,i,o)}function Jv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Ut=!0;else{if(!Bh(n,o)&&(i.flags&128)===0)return Ut=!1,CN(n,i,o);Ut=(n.flags&131072)!==0}else Ut=!1,et&&(i.flags&1048576)!==0&&C0(i,Ks,i.index);switch(i.lanes=0,i.tag){case 16:e:{var l=i.pendingProps;if(n=gr(i.elementType),i.type=n,typeof n=="function")Vf(n)?(l=xr(n,l),i.tag=1,i=Yv(null,i,n,l,o)):(i.tag=0,i=Th(null,i,n,l,o));else{if(n!=null){var f=n.$$typeof;if(f===T){i.tag=11,i=Hv(null,i,n,l,o);break e}else if(f===D){i.tag=14,i=qv(null,i,n,l,o);break e}}throw i=Q(n)||n,Error(r(306,i,""))}}return i;case 0:return Th(n,i,i.type,i.pendingProps,o);case 1:return l=i.type,f=xr(l,i.pendingProps),Yv(n,i,l,f,o);case 3:e:{if(ke(i,i.stateNode.containerInfo),n===null)throw Error(r(387));l=i.pendingProps;var h=i.memoizedState;f=h.element,oh(n,i),tl(i,l,null,o);var y=i.memoizedState;if(l=y.cache,la(i,zt,l),l!==h.cache&&eh(i,[zt],o,!0),el(),l=y.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=Qv(n,i,l,o);break e}else if(l!==f){f=Yn(Error(r(424)),i),Ys(f),i=Qv(n,i,l,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=Jn(n.firstChild),tn=i,et=!0,oa=null,Zn=!0,o=P0(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(fr(),l===f){i=$i(n,i,o);break e}an(n,i,l,o)}i=i.child}return i;case 26:return uu(n,i),n===null?(o=ux(i.type,null,i.pendingProps,null))?i.memoizedState=o:et||(o=i.type,n=i.pendingProps,l=Ou(pe.current).createElement(o),l[Ot]=i,l[yn]=n,rn(l,o,n),Wt(l),i.stateNode=l):i.memoizedState=ux(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ce(i),n===null&&et&&(l=i.stateNode=sx(i.type,i.pendingProps,pe.current),tn=i,Zn=!0,f=xt,wa(i.type)?(vm=f,xt=Jn(l.firstChild)):xt=f),an(n,i,i.pendingProps.children,o),uu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&et&&((f=l=xt)&&(l=sM(l,i.type,i.pendingProps,Zn),l!==null?(i.stateNode=l,tn=i,xt=Jn(l.firstChild),Zn=!1,f=!0):f=!1),f||sa(i)),ce(i),f=i.type,h=i.pendingProps,y=n!==null?n.memoizedProps:null,l=h.children,mm(f,h)?l=null:y!==null&&mm(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=hh(n,i,kN,null,null,o),wl._currentValue=f),uu(n,i),an(n,i,l,o),i.child;case 6:return n===null&&et&&((n=o=xt)&&(o=lM(o,i.pendingProps,Zn),o!==null?(i.stateNode=o,tn=i,xt=null,n=!0):n=!1),n||sa(i)),null;case 13:return Xv(n,i,o);case 4:return ke(i,i.stateNode.containerInfo),l=i.pendingProps,n===null?i.child=br(i,null,l,o):an(n,i,l,o),i.child;case 11:return Hv(n,i,i.type,i.pendingProps,o);case 7:return an(n,i,i.pendingProps,o),i.child;case 8:return an(n,i,i.pendingProps.children,o),i.child;case 12:return an(n,i,i.pendingProps.children,o),i.child;case 10:return l=i.pendingProps,la(i,i.type,l.value),an(n,i,l.children,o),i.child;case 9:return f=i.type._context,l=i.pendingProps.children,mr(i),f=nn(f),l=l(f),i.flags|=1,an(n,i,l,o),i.child;case 14:return qv(n,i,i.type,i.pendingProps,o);case 15:return Fv(n,i,i.type,i.pendingProps,o);case 19:return Wv(n,i,o);case 31:return MN(n,i,o);case 22:return Pv(n,i,o,i.pendingProps);case 24:return mr(i),l=nn(zt),n===null?(f=ih(),f===null&&(f=bt,h=th(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=o),f=h),i.memoizedState={parent:l,cache:f},rh(i),la(i,zt,f)):((n.lanes&o)!==0&&(oh(n,i),tl(i,null,null,o),el()),f=n.memoizedState,h=i.memoizedState,f.parent!==l?(f={parent:l,cache:l},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),la(i,zt,l)):(l=h.cache,la(i,zt,l),l!==f.cache&&eh(i,[zt],o,!0))),an(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Ui(n){n.flags|=4}function Hh(n,i,o,l,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(j1())n.flags|=8192;else throw yr=Qc,ah}else n.flags&=-16777217}function e1(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!px(i))if(j1())n.flags|=8192;else throw yr=Qc,ah}function fu(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Nn():536870912,n.lanes|=i,Do|=i)}function sl(n,i){if(!et)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 l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function wt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,l=0;if(i)for(var f=n.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=l,n.childLanes=o,i}function RN(n,i,o){var l=i.pendingProps;switch(Qf(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,l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Di(zt),z(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wo(i)?Ui(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Zf())),wt(i),null;case 26:var f=i.type,h=i.memoizedState;return n===null?(Ui(i),h!==null?(wt(i),e1(i,h)):(wt(i),Hh(i,f,null,l,o))):h?h!==n.memoizedState?(Ui(i),wt(i),e1(i,h)):(wt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==l&&Ui(i),wt(i),Hh(i,f,n,l,o)),null;case 27:if(ye(i),o=pe.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(!l){if(i.stateNode===null)throw Error(r(166));return wt(i),null}n=F.current,wo(i)?T0(i):(n=sx(f,l,o),i.stateNode=n,Ui(i))}return wt(i),null;case 5:if(ye(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(!l){if(i.stateNode===null)throw Error(r(166));return wt(i),null}if(h=F.current,wo(i))T0(i);else{var y=Ou(pe.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 l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?y.createElement(f,{is:l.is}):y.createElement(f)}}h[Ot]=i,h[yn]=l;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,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ui(i)}}return wt(i),Hh(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(typeof l!="string"&&i.stateNode===null)throw Error(r(166));if(n=pe.current,wo(i)){if(n=i.stateNode,o=i.memoizedProps,l=null,f=tn,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}n[Ot]=i,n=!!(n.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||X1(n.nodeValue,o)),n||sa(i,!0)}else n=Ou(n).createTextNode(l),n[Ot]=i,i.stateNode=n}return wt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(l=wo(i),o!==null){if(n===null){if(!l)throw Error(r(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ot]=i}else fr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),n=!1}else o=Zf(),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(r(558))}return wt(i),null;case 13:if(l=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=wo(i),l!==null&&l.dehydrated!==null){if(n===null){if(!f)throw Error(r(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ot]=i}else fr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),f=!1}else f=Zf(),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=l!==null,n=n!==null&&n.memoizedState!==null,o&&(l=i.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==f&&(l.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),fu(i,i.updateQueue),wt(i),null);case 4:return z(),n===null&&cm(i.stateNode.containerInfo),wt(i),null;case 10:return Di(i.type),wt(i),null;case 19:if(H(Tt),l=i.memoizedState,l===null)return wt(i),null;if(f=(i.flags&128)!==0,h=l.rendering,h===null)if(f)sl(l,!1);else{if(Mt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(h=Jc(n),h!==null){for(i.flags|=128,sl(l,!1),n=h.updateQueue,i.updateQueue=n,fu(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)A0(o,n),o=o.sibling;return I(Tt,Tt.current&1|2),et&&Ri(i,l.treeForkCount),i.child}n=n.sibling}l.tail!==null&&yt()>yu&&(i.flags|=128,f=!0,sl(l,!1),i.lanes=4194304)}else{if(!f)if(n=Jc(h),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,fu(i,n),sl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!et)return wt(i),null}else 2*yt()-l.renderingStartTime>yu&&o!==536870912&&(i.flags|=128,f=!0,sl(l,!1),i.lanes=4194304);l.isBackwards?(h.sibling=i.child,i.child=h):(n=l.last,n!==null?n.sibling=h:i.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=yt(),n.sibling=null,o=Tt.current,I(Tt,f?o&1|2:o&1),et&&Ri(i,l.treeForkCount),n):(wt(i),null);case 22:case 23:return Tn(i),uh(),l=i.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(i.flags|=8192):l&&(i.flags|=8192),l?(o&536870912)!==0&&(i.flags&128)===0&&(wt(i),i.subtreeFlags&6&&(i.flags|=8192)):wt(i),o=i.updateQueue,o!==null&&fu(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==o&&(i.flags|=2048),n!==null&&H(pr),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Di(zt),wt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function TN(n,i){switch(Qf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Di(zt),z(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return ye(i),null;case 31:if(i.memoizedState!==null){if(Tn(i),i.alternate===null)throw Error(r(340));fr()}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(r(340));fr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return H(Tt),null;case 4:return z(),null;case 10:return Di(i.type),null;case 22:case 23:return Tn(i),uh(),n!==null&&H(pr),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Di(zt),null;case 25:return null;default:return null}}function t1(n,i){switch(Qf(i),i.tag){case 3:Di(zt),z();break;case 26:case 27:case 5:ye(i);break;case 4:z();break;case 31:i.memoizedState!==null&&Tn(i);break;case 13:Tn(i);break;case 19:H(Tt);break;case 10:Di(i.type);break;case 22:case 23:Tn(i),uh(),n!==null&&H(pr);break;case 24:Di(zt)}}function ll(n,i){try{var o=i.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var f=l.next;o=f;do{if((o.tag&n)===n){l=void 0;var h=o.create,y=o.inst;l=h(),y.destroy=l}o=o.next}while(o!==f)}}catch(k){ft(i,i.return,k)}}function ma(n,i,o){try{var l=i.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var h=f.next;l=h;do{if((l.tag&n)===n){var y=l.inst,k=y.destroy;if(k!==void 0){y.destroy=void 0,f=i;var U=o,Z=k;try{Z()}catch(ue){ft(f,U,ue)}}}l=l.next}while(l!==h)}}catch(ue){ft(i,i.return,ue)}}function n1(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{G0(i,o)}catch(l){ft(n,n.return,l)}}}function i1(n,i,o){o.props=xr(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(l){ft(n,i,l)}}function cl(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof o=="function"?n.refCleanup=o(l):o.current=l}}catch(f){ft(n,i,f)}}function pi(n,i){var o=n.ref,l=n.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(f){ft(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){ft(n,i,f)}else o.current=null}function a1(n){var i=n.type,o=n.memoizedProps,l=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(f){ft(n,n.return,f)}}function qh(n,i,o){try{var l=n.stateNode;tM(l,n.type,o,i),l[yn]=i}catch(f){ft(n,n.return,f)}}function r1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&wa(n.type)||n.tag===4}function Fh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||r1(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&&wa(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 Ph(n,i,o){var l=n.tag;if(l===5||l===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=Ni));else if(l!==4&&(l===27&&wa(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(Ph(n,i,o),n=n.sibling;n!==null;)Ph(n,i,o),n=n.sibling}function hu(n,i,o){var l=n.tag;if(l===5||l===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(l!==4&&(l===27&&wa(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(hu(n,i,o),n=n.sibling;n!==null;)hu(n,i,o),n=n.sibling}function o1(n){var i=n.stateNode,o=n.memoizedProps;try{for(var l=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);rn(i,l,o),i[Ot]=n,i[yn]=o}catch(h){ft(n,n.return,h)}}var Ii=!1,It=!1,Vh=!1,s1=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function DN(n,i){if(n=n.containerInfo,fm=Du,n=v0(n),Uf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var f=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,k=-1,U=-1,Z=0,ue=0,he=n,J=null;t:for(;;){for(var re;he!==o||f!==0&&he.nodeType!==3||(k=y+f),he!==h||l!==0&&he.nodeType!==3||(U=y+l),he.nodeType===3&&(y+=he.nodeValue.length),(re=he.firstChild)!==null;)J=he,he=re;for(;;){if(he===n)break t;if(J===o&&++Z===f&&(k=y),J===h&&++ue===l&&(U=y),(re=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=re}o=k===-1||U===-1?null:{start:k,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(hm={focusedElem:n,selectionRange:o},Du=!1,Jt=i;Jt!==null;)if(i=Jt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Jt=n;else for(;Jt!==null;){switch(i=Jt,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,l=o.stateNode;try{var Ae=xr(o.type,f);n=l.getSnapshotBeforeUpdate(Ae,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(Ue){ft(o,o.return,Ue)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)gm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":gm(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(r(163))}if(n=i.sibling,n!==null){n.return=i.return,Jt=n;break}Jt=i.return}}function l1(n,i,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:Hi(n,o),l&4&&ll(5,o);break;case 1:if(Hi(n,o),l&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(y){ft(o,o.return,y)}else{var f=xr(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(y){ft(o,o.return,y)}}l&64&&n1(o),l&512&&cl(o,o.return);break;case 3:if(Hi(n,o),l&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{G0(n,i)}catch(y){ft(o,o.return,y)}}break;case 27:i===null&&l&4&&o1(o);case 26:case 5:Hi(n,o),i===null&&l&4&&a1(o),l&512&&cl(o,o.return);break;case 12:Hi(n,o);break;case 31:Hi(n,o),l&4&&d1(n,o);break;case 13:Hi(n,o),l&4&&f1(n,o),l&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=FN.bind(null,o),cM(n,o))));break;case 22:if(l=o.memoizedState!==null||Ii,!l){i=i!==null&&i.memoizedState!==null||It,f=Ii;var h=It;Ii=l,(It=i)&&!h?qi(n,o,(o.subtreeFlags&8772)!==0):Hi(n,o),Ii=f,It=h}break;case 30:break;default:Hi(n,o)}}function c1(n){var i=n.alternate;i!==null&&(n.alternate=null,c1(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&wf(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 St=null,vn=!1;function Bi(n,i,o){for(o=o.child;o!==null;)u1(n,i,o),o=o.sibling}function u1(n,i,o){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Qt,o)}catch{}switch(o.tag){case 26:It||pi(o,i),Bi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:It||pi(o,i);var l=St,f=vn;wa(o.type)&&(St=o.stateNode,vn=!1),Bi(n,i,o),bl(o.stateNode),St=l,vn=f;break;case 5:It||pi(o,i);case 6:if(l=St,f=vn,St=null,Bi(n,i,o),St=l,vn=f,St!==null)if(vn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(o.stateNode)}catch(h){ft(o,i,h)}else try{St.removeChild(o.stateNode)}catch(h){ft(o,i,h)}break;case 18:St!==null&&(vn?(n=St,nx(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),qo(n)):nx(St,o.stateNode));break;case 4:l=St,f=vn,St=o.stateNode.containerInfo,vn=!0,Bi(n,i,o),St=l,vn=f;break;case 0:case 11:case 14:case 15:ma(2,o,i),It||ma(4,o,i),Bi(n,i,o);break;case 1:It||(pi(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"&&i1(o,i,l)),Bi(n,i,o);break;case 21:Bi(n,i,o);break;case 22:It=(l=It)||o.memoizedState!==null,Bi(n,i,o),It=l;break;default:Bi(n,i,o)}}function d1(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{qo(n)}catch(o){ft(i,i.return,o)}}}function f1(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{qo(n)}catch(o){ft(i,i.return,o)}}function LN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new s1),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new s1),i;default:throw Error(r(435,n.tag))}}function mu(n,i){var o=LN(n);i.forEach(function(l){if(!o.has(l)){o.add(l);var f=PN.bind(null,n,l);l.then(f,f)}})}function xn(n,i){var o=i.deletions;if(o!==null)for(var l=0;l<o.length;l++){var f=o[l],h=n,y=i,k=y;e:for(;k!==null;){switch(k.tag){case 27:if(wa(k.type)){St=k.stateNode,vn=!1;break e}break;case 5:St=k.stateNode,vn=!1;break e;case 3:case 4:St=k.stateNode.containerInfo,vn=!0;break e}k=k.return}if(St===null)throw Error(r(160));u1(h,y,f),St=null,vn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)h1(i,n),i=i.sibling}var oi=null;function h1(n,i){var o=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:xn(i,n),wn(n),l&4&&(ma(3,n,n.return),ll(3,n),ma(5,n,n.return));break;case 1:xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),l&64&&Ii&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var f=oi;if(xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),l&4){var h=o!==null?o.memoizedState:null;if(l=n.memoizedState,o===null)if(l===null)if(n.stateNode===null){e:{l=n.type,o=n.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":h=f.getElementsByTagName("title")[0],(!h||h[zs]||h[Ot]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(l),f.head.insertBefore(h,f.querySelector("head > title"))),rn(h,l,o),h[Ot]=n,Wt(h),l=h;break e;case"link":var y=hx("link","href",f).get(l+(o.href||""));if(y){for(var k=0;k<y.length;k++)if(h=y[k],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(k,1);break t}}h=f.createElement(l),rn(h,l,o),f.head.appendChild(h);break;case"meta":if(y=hx("meta","content",f).get(l+(o.content||""))){for(k=0;k<y.length;k++)if(h=y[k],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(k,1);break t}}h=f.createElement(l),rn(h,l,o),f.head.appendChild(h);break;default:throw Error(r(468,l))}h[Ot]=n,Wt(h),l=h}n.stateNode=l}else mx(f,n.type,n.stateNode);else n.stateNode=fx(f,l,n.memoizedProps);else h!==l?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,l===null?mx(f,n.type,n.stateNode):fx(f,l,n.memoizedProps)):l===null&&n.stateNode!==null&&qh(n,n.memoizedProps,o.memoizedProps)}break;case 27:xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),o!==null&&l&4&&qh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),n.flags&32){f=n.stateNode;try{uo(f,"")}catch(Ae){ft(n,n.return,Ae)}}l&4&&n.stateNode!=null&&(f=n.memoizedProps,qh(n,f,o!==null?o.memoizedProps:f)),l&1024&&(Vh=!0);break;case 6:if(xn(i,n),wn(n),l&4){if(n.stateNode===null)throw Error(r(162));l=n.memoizedProps,o=n.stateNode;try{o.nodeValue=l}catch(Ae){ft(n,n.return,Ae)}}break;case 3:if(Mu=null,f=oi,oi=Au(i.containerInfo),xn(i,n),oi=f,wn(n),l&4&&o!==null&&o.memoizedState.isDehydrated)try{qo(i.containerInfo)}catch(Ae){ft(n,n.return,Ae)}Vh&&(Vh=!1,m1(n));break;case 4:l=oi,oi=Au(n.stateNode.containerInfo),xn(i,n),wn(n),oi=l;break;case 12:xn(i,n),wn(n);break;case 31:xn(i,n),wn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 13:xn(i,n),wn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(gu=yt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 22:f=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,Z=Ii,ue=It;if(Ii=Z||f,It=ue||U,xn(i,n),It=ue,Ii=Z,wn(n),l&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||U||Ii||It||wr(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{k=U.stateNode;var he=U.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;k.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===6){if(o===null){U=i;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===18){if(o===null){U=i;try{var re=U.stateNode;f?ix(re,!0):ix(U.stateNode,!1)}catch(Ae){ft(U,U.return,Ae)}}}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}l&4&&(l=n.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,mu(n,o))));break;case 19:xn(i,n),wn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 30:break;case 21:break;default:xn(i,n),wn(n)}}function wn(n){var i=n.flags;if(i&2){try{for(var o,l=n.return;l!==null;){if(r1(l)){o=l;break}l=l.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var f=o.stateNode,h=Fh(n);hu(n,h,f);break;case 5:var y=o.stateNode;o.flags&32&&(uo(y,""),o.flags&=-33);var k=Fh(n);hu(n,k,y);break;case 3:case 4:var U=o.stateNode.containerInfo,Z=Fh(n);Ph(n,Z,U);break;default:throw Error(r(161))}}catch(ue){ft(n,n.return,ue)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function m1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;m1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Hi(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)l1(n,i.alternate,i),i=i.sibling}function wr(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:ma(4,i,i.return),wr(i);break;case 1:pi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&i1(i,i.return,o),wr(i);break;case 27:bl(i.stateNode);case 26:case 5:pi(i,i.return),wr(i);break;case 22:i.memoizedState===null&&wr(i);break;case 30:wr(i);break;default:wr(i)}n=n.sibling}}function qi(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var l=i.alternate,f=n,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:qi(f,h,o),ll(4,h);break;case 1:if(qi(f,h,o),l=h,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Z){ft(l,l.return,Z)}if(l=h,f=l.updateQueue,f!==null){var k=l.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)V0(U[f],k)}catch(Z){ft(l,l.return,Z)}}o&&y&64&&n1(h),cl(h,h.return);break;case 27:o1(h);case 26:case 5:qi(f,h,o),o&&l===null&&y&4&&a1(h),cl(h,h.return);break;case 12:qi(f,h,o);break;case 31:qi(f,h,o),o&&y&4&&d1(f,h);break;case 13:qi(f,h,o),o&&y&4&&f1(f,h);break;case 22:h.memoizedState===null&&qi(f,h,o),cl(h,h.return);break;case 30:break;default:qi(f,h,o)}i=i.sibling}}function Gh(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&&Qs(o))}function Kh(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Qs(n))}function si(n,i,o,l){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)p1(n,i,o,l),i=i.sibling}function p1(n,i,o,l){var f=i.flags;switch(i.tag){case 0:case 11:case 15:si(n,i,o,l),f&2048&&ll(9,i);break;case 1:si(n,i,o,l);break;case 3:si(n,i,o,l),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Qs(n)));break;case 12:if(f&2048){si(n,i,o,l),n=i.stateNode;try{var h=i.memoizedProps,y=h.id,k=h.onPostCommit;typeof k=="function"&&k(y,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ft(i,i.return,U)}}else si(n,i,o,l);break;case 31:si(n,i,o,l);break;case 13:si(n,i,o,l);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?si(n,i,o,l):ul(n,i):h._visibility&2?si(n,i,o,l):(h._visibility|=2,Co(n,i,o,l,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Gh(y,i);break;case 24:si(n,i,o,l),f&2048&&Kh(i.alternate,i);break;default:si(n,i,o,l)}}function Co(n,i,o,l,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=n,y=i,k=o,U=l,Z=y.flags;switch(y.tag){case 0:case 11:case 15:Co(h,y,k,U,f),ll(8,y);break;case 23:break;case 22:var ue=y.stateNode;y.memoizedState!==null?ue._visibility&2?Co(h,y,k,U,f):ul(h,y):(ue._visibility|=2,Co(h,y,k,U,f)),f&&Z&2048&&Gh(y.alternate,y);break;case 24:Co(h,y,k,U,f),f&&Z&2048&&Kh(y.alternate,y);break;default:Co(h,y,k,U,f)}i=i.sibling}}function ul(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,l=i,f=l.flags;switch(l.tag){case 22:ul(o,l),f&2048&&Gh(l.alternate,l);break;case 24:ul(o,l),f&2048&&Kh(l.alternate,l);break;default:ul(o,l)}i=i.sibling}}var dl=8192;function Ro(n,i,o){if(n.subtreeFlags&dl)for(n=n.child;n!==null;)g1(n,i,o),n=n.sibling}function g1(n,i,o){switch(n.tag){case 26:Ro(n,i,o),n.flags&dl&&n.memoizedState!==null&&wM(o,oi,n.memoizedState,n.memoizedProps);break;case 5:Ro(n,i,o);break;case 3:case 4:var l=oi;oi=Au(n.stateNode.containerInfo),Ro(n,i,o),oi=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=dl,dl=16777216,Ro(n,i,o),dl=l):Ro(n,i,o));break;default:Ro(n,i,o)}}function y1(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 fl(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Jt=l,v1(l,n)}y1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)b1(n),n=n.sibling}function b1(n){switch(n.tag){case 0:case 11:case 15:fl(n),n.flags&2048&&ma(9,n,n.return);break;case 3:fl(n);break;case 12:fl(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,pu(n)):fl(n);break;default:fl(n)}}function pu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Jt=l,v1(l,n)}y1(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:ma(8,i,i.return),pu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,pu(i));break;default:pu(i)}n=n.sibling}}function v1(n,i){for(;Jt!==null;){var o=Jt;switch(o.tag){case 0:case 11:case 15:ma(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qs(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Jt=l;else e:for(o=n;Jt!==null;){l=Jt;var f=l.sibling,h=l.return;if(c1(l),l===o){Jt=null;break e}if(f!==null){f.return=h,Jt=f;break e}Jt=h}}}var zN={getCacheForType:function(n){var i=nn(zt),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return nn(zt).controller.signal}},$N=typeof WeakMap=="function"?WeakMap:Map,st=0,bt=null,Ye=null,Ze=0,dt=0,Dn=null,pa=!1,To=!1,Yh=!1,Fi=0,Mt=0,ga=0,kr=0,Qh=0,Ln=0,Do=0,hl=null,kn=null,Xh=!1,gu=0,x1=0,yu=1/0,bu=null,ya=null,Pt=0,ba=null,Lo=null,Pi=0,Zh=0,Wh=null,w1=null,ml=0,Jh=null;function zn(){return(st&2)!==0&&Ze!==0?Ze&-Ze:N.T!==null?rm():At()}function k1(){if(Ln===0)if((Ze&536870912)===0||et){var n=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),Ln=n}else Ln=536870912;return n=Rn.current,n!==null&&(n.flags|=32),Ln}function _n(n,i,o){(n===bt&&(dt===2||dt===9)||n.cancelPendingCommit!==null)&&(zo(n,0),va(n,Ze,Ln,!1)),ai(n,o),((st&2)===0||n!==bt)&&(n===bt&&((st&2)===0&&(kr|=o),Mt===4&&va(n,Ze,Ln,!1)),gi(n))}function _1(n,i,o){if((st&6)!==0)throw Error(r(327));var l=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Xt(n,i),f=l?BN(n,i):tm(n,i,!0),h=l;do{if(f===0){To&&!l&&va(n,i,0,!1);break}else{if(o=n.current.alternate,h&&!UN(o)){f=tm(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 k=n;f=hl;var U=k.current.memoizedState.isDehydrated;if(U&&(zo(k,y).flags|=256),y=tm(k,y,!1),y!==2){if(Yh&&!U){k.errorRecoveryDisabledLanes|=h,kr|=h,f=4;break e}h=kn,kn=f,h!==null&&(kn===null?kn=h:kn.push.apply(kn,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){zo(n,0),va(n,i,0,!0);break}e:{switch(l=n,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:va(l,i,Ln,!pa);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=gu+300-yt(),10<f)){if(va(l,i,Ln,!pa),Ft(l,0,!0)!==0)break e;Pi=i,l.timeoutHandle=ex(S1.bind(null,l,o,kn,bu,Xh,i,Ln,kr,Do,pa,h,"Throttled",-0,0),f);break e}S1(l,o,kn,bu,Xh,i,Ln,kr,Do,pa,h,null,-0,0)}}break}while(!0);gi(n)}function S1(n,i,o,l,f,h,y,k,U,Z,ue,he,J,re){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ni},g1(i,h,he);var Ae=(h&62914560)===h?gu-yt():(h&4194048)===h?x1-yt():0;if(Ae=kM(he,Ae),Ae!==null){Pi=h,n.cancelPendingCommit=Ae(R1.bind(null,n,i,h,o,l,f,y,k,U,ue,he,null,J,re)),va(n,h,y,!Z);return}}R1(n,i,h,o,l,f,y,k,U)}function UN(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 l=0;l<o.length;l++){var f=o[l],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 va(n,i,o,l){i&=~Qh,i&=~kr,n.suspendedLanes|=i,n.pingedLanes&=~i,l&&(n.warmLanes|=i),l=n.expirationTimes;for(var f=i;0<f;){var h=31-be(f),y=1<<h;l[h]=-1,f&=~y}o!==0&&io(n,o,i)}function vu(){return(st&6)===0?(pl(0),!1):!0}function em(){if(Ye!==null){if(dt===0)var n=Ye.return;else n=Ye,Ti=hr=null,gh(n),jo=null,Zs=0,n=Ye;for(;n!==null;)t1(n.alternate,n),n=n.return;Ye=null}}function zo(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,aM(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Pi=0,em(),bt=n,Ye=o=Ci(n.current,null),Ze=i,dt=0,Dn=null,pa=!1,To=Xt(n,i),Yh=!1,Do=Ln=Qh=kr=ga=Mt=0,kn=hl=null,Xh=!1,(i&8)!==0&&(i|=i&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=i;0<l;){var f=31-be(l),h=1<<f;i|=n[f],l&=~h}return Fi=i,Bc(),o}function E1(n,i){Fe=null,N.H=rl,i===Eo||i===Yc?(i=H0(),dt=3):i===ah?(i=H0(),dt=4):dt=i===Rh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Ye===null&&(Mt=1,lu(n,Yn(i,n.current)))}function j1(){var n=Rn.current;return n===null?!0:(Ze&4194048)===Ze?Wn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?n===Wn:!1}function O1(){var n=N.H;return N.H=rl,n===null?rl:n}function A1(){var n=N.A;return N.A=zN,n}function xu(){Mt=4,pa||(Ze&4194048)!==Ze&&Rn.current!==null||(To=!0),(ga&134217727)===0&&(kr&134217727)===0||bt===null||va(bt,Ze,Ln,!1)}function tm(n,i,o){var l=st;st|=2;var f=O1(),h=A1();(bt!==n||Ze!==i)&&(bu=null,zo(n,i)),i=!1;var y=Mt;e:do try{if(dt!==0&&Ye!==null){var k=Ye,U=Dn;switch(dt){case 8:em(),y=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(i=!0);var Z=dt;if(dt=0,Dn=null,$o(n,k,U,Z),o&&To){y=0;break e}break;default:Z=dt,dt=0,Dn=null,$o(n,k,U,Z)}}IN(),y=Mt;break}catch(ue){E1(n,ue)}while(!0);return i&&n.shellSuspendCounter++,Ti=hr=null,st=l,N.H=f,N.A=h,Ye===null&&(bt=null,Ze=0,Bc()),y}function IN(){for(;Ye!==null;)N1(Ye)}function BN(n,i){var o=st;st|=2;var l=O1(),f=A1();bt!==n||Ze!==i?(bu=null,yu=yt()+500,zo(n,i)):To=Xt(n,i);e:do try{if(dt!==0&&Ye!==null){i=Ye;var h=Dn;t:switch(dt){case 1:dt=0,Dn=null,$o(n,i,h,1);break;case 2:case 9:if(I0(h)){dt=0,Dn=null,M1(i);break}i=function(){dt!==2&&dt!==9||bt!==n||(dt=7),gi(n)},h.then(i,i);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:I0(h)?(dt=0,Dn=null,M1(i)):(dt=0,Dn=null,$o(n,i,h,7));break;case 5:var y=null;switch(Ye.tag){case 26:y=Ye.memoizedState;case 5:case 27:var k=Ye;if(y?px(y):k.stateNode.complete){dt=0,Dn=null;var U=k.sibling;if(U!==null)Ye=U;else{var Z=k.return;Z!==null?(Ye=Z,wu(Z)):Ye=null}break t}}dt=0,Dn=null,$o(n,i,h,5);break;case 6:dt=0,Dn=null,$o(n,i,h,6);break;case 8:em(),Mt=6;break e;default:throw Error(r(462))}}HN();break}catch(ue){E1(n,ue)}while(!0);return Ti=hr=null,N.H=l,N.A=f,st=o,Ye!==null?0:(bt=null,Ze=0,Bc(),Mt)}function HN(){for(;Ye!==null&&!An();)N1(Ye)}function N1(n){var i=Jv(n.alternate,n,Fi);n.memoizedProps=n.pendingProps,i===null?wu(n):Ye=i}function M1(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Kv(o,i,i.pendingProps,i.type,void 0,Ze);break;case 11:i=Kv(o,i,i.pendingProps,i.type.render,i.ref,Ze);break;case 5:gh(i);default:t1(o,i),i=Ye=A0(i,Fi),i=Jv(o,i,Fi)}n.memoizedProps=n.pendingProps,i===null?wu(n):Ye=i}function $o(n,i,o,l){Ti=hr=null,gh(i),jo=null,Zs=0;var f=i.return;try{if(NN(n,f,i,o,Ze)){Mt=1,lu(n,Yn(o,n.current)),Ye=null;return}}catch(h){if(f!==null)throw Ye=f,h;Mt=1,lu(n,Yn(o,n.current)),Ye=null;return}i.flags&32768?(et||l===1?n=!0:To||(Ze&536870912)!==0?n=!1:(pa=n=!0,(l===2||l===9||l===3||l===6)&&(l=Rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),C1(i,n)):wu(i)}function wu(n){var i=n;do{if((i.flags&32768)!==0){C1(i,pa);return}n=i.return;var o=RN(i.alternate,i,Fi);if(o!==null){Ye=o;return}if(i=i.sibling,i!==null){Ye=i;return}Ye=i=n}while(i!==null);Mt===0&&(Mt=5)}function C1(n,i){do{var o=TN(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);Mt=6,Ye=null}function R1(n,i,o,l,f,h,y,k,U){n.cancelPendingCommit=null;do ku();while(Pt!==0);if((st&6)!==0)throw Error(r(327));if(i!==null){if(i===n.current)throw Error(r(177));if(h=i.lanes|i.childLanes,h|=Ff,fi(n,o,h,y,k,U),n===bt&&(Ye=bt=null,Ze=0),Lo=i,ba=n,Pi=o,Zh=h,Wh=f,w1=l,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,VN(we,function(){return $1(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||l){l=N.T,N.T=null,f=V.p,V.p=2,y=st,st|=4;try{DN(n,i,o)}finally{st=y,V.p=f,N.T=l}}Pt=1,T1(),D1(),L1()}}function T1(){if(Pt===1){Pt=0;var n=ba,i=Lo,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=N.T,N.T=null;var l=V.p;V.p=2;var f=st;st|=4;try{h1(i,n);var h=hm,y=v0(n.containerInfo),k=h.focusedElem,U=h.selectionRange;if(y!==k&&k&&k.ownerDocument&&b0(k.ownerDocument.documentElement,k)){if(U!==null&&Uf(k)){var Z=U.start,ue=U.end;if(ue===void 0&&(ue=Z),"selectionStart"in k)k.selectionStart=Z,k.selectionEnd=Math.min(ue,k.value.length);else{var he=k.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var re=J.getSelection(),Ae=k.textContent.length,Ue=Math.min(U.start,Ae),gt=U.end===void 0?Ue:Math.min(U.end,Ae);!re.extend&&Ue>gt&&(y=gt,gt=Ue,Ue=y);var G=y0(k,Ue),q=y0(k,gt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=he.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),Ue>gt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(he=[],re=k;re=re.parentNode;)re.nodeType===1&&he.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<he.length;k++){var fe=he[k];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Du=!!fm,hm=fm=null}finally{st=f,V.p=l,N.T=o}}n.current=i,Pt=2}}function D1(){if(Pt===2){Pt=0;var n=ba,i=Lo,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=N.T,N.T=null;var l=V.p;V.p=2;var f=st;st|=4;try{l1(n,i.alternate,i)}finally{st=f,V.p=l,N.T=o}}Pt=3}}function L1(){if(Pt===4||Pt===3){Pt=0,un();var n=ba,i=Lo,o=Pi,l=w1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Pt=5:(Pt=0,Lo=ba=null,z1(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(ya=null),Pe(o),i=i.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Qt,i,void 0,(i.current.flags&128)===128)}catch{}if(l!==null){i=N.T,f=V.p,V.p=2,N.T=null;try{for(var h=n.onRecoverableError,y=0;y<l.length;y++){var k=l[y];h(k.value,{componentStack:k.stack})}}finally{N.T=i,V.p=f}}(Pi&3)!==0&&ku(),gi(n),f=n.pendingLanes,(o&261930)!==0&&(f&42)!==0?n===Jh?ml++:(ml=0,Jh=n):ml=0,pl(0)}}function z1(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Qs(i)))}function ku(){return T1(),D1(),L1(),$1()}function $1(){if(Pt!==5)return!1;var n=ba,i=Zh;Zh=0;var o=Pe(Pi),l=N.T,f=V.p;try{V.p=32>o?32:o,N.T=null,o=Wh,Wh=null;var h=ba,y=Pi;if(Pt=0,Lo=ba=null,Pi=0,(st&6)!==0)throw Error(r(331));var k=st;if(st|=4,b1(h.current),p1(h,h.current,y,o),st=k,pl(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Qt,h)}catch{}return!0}finally{V.p=f,N.T=l,z1(n,i)}}function U1(n,i,o){i=Yn(o,i),i=Ch(n.stateNode,i,2),n=da(n,i,2),n!==null&&(ai(n,2),gi(n))}function ft(n,i,o){if(n.tag===3)U1(n,n,o);else for(;i!==null;){if(i.tag===3){U1(i,n,o);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ya===null||!ya.has(l))){n=Yn(o,n),o=Iv(2),l=da(i,o,2),l!==null&&(Bv(o,l,i,n),ai(l,2),gi(l));break}}i=i.return}}function nm(n,i,o){var l=n.pingCache;if(l===null){l=n.pingCache=new $N;var f=new Set;l.set(i,f)}else f=l.get(i),f===void 0&&(f=new Set,l.set(i,f));f.has(o)||(Yh=!0,f.add(o),n=qN.bind(null,n,i,o),i.then(n,n))}function qN(n,i,o){var l=n.pingCache;l!==null&&l.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,bt===n&&(Ze&o)===o&&(Mt===4||Mt===3&&(Ze&62914560)===Ze&&300>yt()-gu?(st&2)===0&&zo(n,0):Qh|=o,Do===Ze&&(Do=0)),gi(n)}function I1(n,i){i===0&&(i=Nn()),n=ur(n,i),n!==null&&(ai(n,i),gi(n))}function FN(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),I1(n,o)}function PN(n,i){var o=0;switch(n.tag){case 31:case 13:var l=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(i),I1(n,o)}function VN(n,i){return lt(n,i)}var _u=null,Uo=null,im=!1,Su=!1,am=!1,xa=0;function gi(n){n!==Uo&&n.next===null&&(Uo===null?_u=Uo=n:Uo=Uo.next=n),Su=!0,im||(im=!0,KN())}function pl(n,i){if(!am&&Su){am=!0;do for(var o=!1,l=_u;l!==null;){if(n!==0){var f=l.pendingLanes;if(f===0)var h=0;else{var y=l.suspendedLanes,k=l.pingedLanes;h=(1<<31-be(42|n)+1)-1,h&=f&~(y&~k),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,F1(l,h))}else h=Ze,h=Ft(l,l===bt?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||Xt(l,h)||(o=!0,F1(l,h));l=l.next}while(o);am=!1}}function GN(){B1()}function B1(){Su=im=!1;var n=0;xa!==0&&iM()&&(n=xa);for(var i=yt(),o=null,l=_u;l!==null;){var f=l.next,h=H1(l,i);h===0?(l.next=null,o===null?_u=f:o.next=f,f===null&&(Uo=o)):(o=l,(n!==0||(h&3)!==0)&&(Su=!0)),l=f}Pt!==0&&Pt!==5||pl(n),xa!==0&&(xa=0)}function H1(n,i){for(var o=n.suspendedLanes,l=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var y=31-be(h),k=1<<y,U=f[y];U===-1?((k&o)===0||(k&l)!==0)&&(f[y]=Zt(k,i)):U<=i&&(n.expiredLanes|=k),h&=~k}if(i=bt,o=Ze,o=Ft(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,o===0||n===i&&(dt===2||dt===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Fn(l),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Xt(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(l!==null&&Fn(l),Pe(o)){case 2:case 8:o=ii;break;case 32:o=we;break;case 268435456:o=Ce;break;default:o=we}return l=q1.bind(null,n),o=lt(o,l),n.callbackPriority=i,n.callbackNode=o,i}return l!==null&&l!==null&&Fn(l),n.callbackPriority=2,n.callbackNode=null,2}function q1(n,i){if(Pt!==0&&Pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(ku()&&n.callbackNode!==o)return null;var l=Ze;return l=Ft(n,n===bt?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(_1(n,l,i),H1(n,yt()),n.callbackNode!=null&&n.callbackNode===o?q1.bind(null,n):null)}function F1(n,i){if(ku())return null;_1(n,i,!0)}function KN(){rM(function(){(st&6)!==0?lt(di,GN):B1()})}function rm(){if(xa===0){var n=_o;n===0&&(n=He,He<<=1,(He&261888)===0&&(He=256)),xa=n}return xa}function P1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Rc(""+n)}function V1(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 YN(n,i,o,l,f){if(i==="submit"&&o&&o.stateNode===f){var h=P1((f[yn]||null).action),y=l.submitter;y&&(i=(i=y[yn]||null)?P1(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var k=new zc("action","action",null,l,f);n.push({event:k,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(xa!==0){var U=y?V1(f,y):new FormData(f);Eh(o,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(k.preventDefault(),U=y?V1(f,y):new FormData(f),Eh(o,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var om=0;om<qf.length;om++){var sm=qf[om],QN=sm.toLowerCase(),XN=sm[0].toUpperCase()+sm.slice(1);ri(QN,"on"+XN)}ri(k0,"onAnimationEnd"),ri(_0,"onAnimationIteration"),ri(S0,"onAnimationStart"),ri("dblclick","onDoubleClick"),ri("focusin","onFocus"),ri("focusout","onBlur"),ri(fN,"onTransitionRun"),ri(hN,"onTransitionStart"),ri(mN,"onTransitionCancel"),ri(E0,"onTransitionEnd"),lo("onMouseEnter",["mouseout","mouseover"]),lo("onMouseLeave",["mouseout","mouseover"]),lo("onPointerEnter",["pointerout","pointerover"]),lo("onPointerLeave",["pointerout","pointerover"]),or("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),or("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),or("onBeforeInput",["compositionend","keypress","textInput","paste"]),or("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),or("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),or("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="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(" "),ZN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gl));function G1(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var l=n[o],f=l.event;l=l.listeners;e:{var h=void 0;if(i)for(var y=l.length-1;0<=y;y--){var k=l[y],U=k.instance,Z=k.currentTarget;if(k=k.listener,U!==h&&f.isPropagationStopped())break e;h=k,f.currentTarget=Z;try{h(f)}catch(ue){Ic(ue)}f.currentTarget=null,h=U}else for(y=0;y<l.length;y++){if(k=l[y],U=k.instance,Z=k.currentTarget,k=k.listener,U!==h&&f.isPropagationStopped())break e;h=k,f.currentTarget=Z;try{h(f)}catch(ue){Ic(ue)}f.currentTarget=null,h=U}}}}function Qe(n,i){var o=i[xf];o===void 0&&(o=i[xf]=new Set);var l=n+"__bubble";o.has(l)||(K1(i,n,2,!1),o.add(l))}function lm(n,i,o){var l=0;i&&(l|=4),K1(o,n,l,i)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function cm(n){if(!n[Eu]){n[Eu]=!0,Bb.forEach(function(o){o!=="selectionchange"&&(ZN.has(o)||lm(o,!1,n),lm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Eu]||(i[Eu]=!0,lm("selectionchange",!1,i))}}function K1(n,i,o,l){switch(kx(i)){case 2:var f=EM;break;case 8:f=jM;break;default:f=Sm}o=f.bind(null,i,o,n),f=void 0,!Nf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),l?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 um(n,i,o,l,f){var h=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var k=l.stateNode.containerInfo;if(k===f)break;if(y===4)for(y=l.return;y!==null;){var U=y.tag;if((U===3||U===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;k!==null;){if(y=ro(k),y===null)return;if(U=y.tag,U===5||U===6||U===26||U===27){l=h=y;continue e}k=k.parentNode}}l=l.return}Wb(function(){var Z=h,ue=Of(o),he=[];e:{var J=j0.get(n);if(J!==void 0){var re=zc,Ae=n;switch(n){case"keypress":if(Dc(o)===0)break e;case"keydown":case"keyup":re=PA;break;case"focusin":Ae="focus",re=Tf;break;case"focusout":Ae="blur",re=Tf;break;case"beforeblur":case"afterblur":re=Tf;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=t0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=RA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=KA;break;case k0:case _0:case S0:re=LA;break;case E0:re=QA;break;case"scroll":case"scrollend":re=MA;break;case"wheel":re=ZA;break;case"copy":case"cut":case"paste":re=$A;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=i0;break;case"toggle":case"beforetoggle":re=JA}var Ue=(i&4)!==0,gt=!Ue&&(n==="scroll"||n==="scrollend"),G=Ue?J!==null?J+"Capture":null:J;Ue=[];for(var q=Z,X;q!==null;){var fe=q;if(X=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||X===null||G===null||(fe=Us(q,G),fe!=null&&Ue.push(yl(q,fe,X))),gt)break;q=q.return}0<Ue.length&&(J=new re(J,Ae,null,o,ue),he.push({event:J,listeners:Ue}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",J&&o!==jf&&(Ae=o.relatedTarget||o.fromElement)&&(ro(Ae)||Ae[ao]))break e;if((re||J)&&(J=ue.window===ue?ue:(J=ue.ownerDocument)?J.defaultView||J.parentWindow:window,re?(Ae=o.relatedTarget||o.toElement,re=Z,Ae=Ae?ro(Ae):null,Ae!==null&&(gt=c(Ae),Ue=Ae.tag,Ae!==gt||Ue!==5&&Ue!==27&&Ue!==6)&&(Ae=null)):(re=null,Ae=Z),re!==Ae)){if(Ue=t0,fe="onMouseLeave",G="onMouseEnter",q="mouse",(n==="pointerout"||n==="pointerover")&&(Ue=i0,fe="onPointerLeave",G="onPointerEnter",q="pointer"),gt=re==null?J:$s(re),X=Ae==null?J:$s(Ae),J=new Ue(fe,q+"leave",re,o,ue),J.target=gt,J.relatedTarget=X,fe=null,ro(ue)===Z&&(Ue=new Ue(G,q+"enter",Ae,o,ue),Ue.target=X,Ue.relatedTarget=gt,fe=Ue),gt=fe,re&&Ae)t:{for(Ue=WN,G=re,q=Ae,X=0,fe=G;fe;fe=Ue(fe))X++;fe=0;for(var De=q;De;De=Ue(De))fe++;for(;0<X-fe;)G=Ue(G),X--;for(;0<fe-X;)q=Ue(q),fe--;for(;X--;){if(G===q||q!==null&&G===q.alternate){Ue=G;break t}G=Ue(G),q=Ue(q)}Ue=null}else Ue=null;re!==null&&Y1(he,J,re,Ue,!1),Ae!==null&>!==null&&Y1(he,gt,Ae,Ue,!0)}}e:{if(J=Z?$s(Z):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var rt=d0;else if(c0(J))if(f0)rt=cN;else{rt=sN;var Me=oN}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Ef(Z.elementType)&&(rt=d0):rt=lN;if(rt&&(rt=rt(n,Z))){u0(he,rt,o,ue);break e}Me&&Me(n,J,Z),n==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&Sf(J,"number",J.value)}switch(Me=Z?$s(Z):window,n){case"focusin":(c0(Me)||Me.contentEditable==="true")&&(po=Me,If=Z,Gs=null);break;case"focusout":Gs=If=po=null;break;case"mousedown":Bf=!0;break;case"contextmenu":case"mouseup":case"dragend":Bf=!1,x0(he,o,ue);break;case"selectionchange":if(dN)break;case"keydown":case"keyup":x0(he,o,ue)}var Ve;if(Lf)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 mo?s0(n,o)&&(We="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(We="onCompositionStart");We&&(a0&&o.locale!=="ko"&&(mo||We!=="onCompositionStart"?We==="onCompositionEnd"&&mo&&(Ve=Jb()):(aa=ue,Mf="value"in aa?aa.value:aa.textContent,mo=!0)),Me=ju(Z,We),0<Me.length&&(We=new n0(We,n,null,o,ue),he.push({event:We,listeners:Me}),Ve?We.data=Ve:(Ve=l0(o),Ve!==null&&(We.data=Ve)))),(Ve=tN?nN(n,o):iN(n,o))&&(We=ju(Z,"onBeforeInput"),0<We.length&&(Me=new n0("onBeforeInput","beforeinput",null,o,ue),he.push({event:Me,listeners:We}),Me.data=Ve)),YN(he,n,Z,o,ue)}G1(he,i)})}function yl(n,i,o){return{instance:n,listener:i,currentTarget:o}}function ju(n,i){for(var o=i+"Capture",l=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Us(n,o),f!=null&&l.unshift(yl(n,f,h)),f=Us(n,i),f!=null&&l.push(yl(n,f,h))),n.tag===3)return l;n=n.return}return[]}function WN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Y1(n,i,o,l,f){for(var h=i._reactName,y=[];o!==null&&o!==l;){var k=o,U=k.alternate,Z=k.stateNode;if(k=k.tag,U!==null&&U===l)break;k!==5&&k!==26&&k!==27||Z===null||(U=Z,f?(Z=Us(o,h),Z!=null&&y.unshift(yl(o,Z,U))):f||(Z=Us(o,h),Z!=null&&y.push(yl(o,Z,U)))),o=o.return}y.length!==0&&n.push({event:i,listeners:y})}var JN=/\r\n?/g,eM=/\u0000|\uFFFD/g;function Q1(n){return(typeof n=="string"?n:""+n).replace(JN,`
|
|
49
|
-
`).replace(eM,"")}function X1(n,i){return i=Q1(i),Q1(n)===i}function pt(n,i,o,l,f,h){switch(o){case"children":typeof l=="string"?i==="body"||i==="textarea"&&l===""||uo(n,l):(typeof l=="number"||typeof l=="bigint")&&i!=="body"&&uo(n,""+l);break;case"className":Mc(n,"class",l);break;case"tabIndex":Mc(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mc(n,o,l);break;case"style":Xb(n,l,h);break;case"data":if(i!=="object"){Mc(n,"data",l);break}case"src":case"href":if(l===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(o);break}l=Rc(""+l),n.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="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(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(o);break}l=Rc(""+l),n.setAttribute(o,l);break;case"onClick":l!=null&&(n.onclick=Ni);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}o=Rc(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":l===!0?n.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,l):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(o,l):n.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(o):n.setAttribute(o,l);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Nc(n,"popover",l);break;case"xlinkActuate":Ai(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ai(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ai(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ai(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ai(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ai(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Nc(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=AA.get(o)||o,Nc(n,o,l))}}function dm(n,i,o,l,f,h){switch(o){case"style":Xb(n,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"children":typeof l=="string"?uo(n,l):(typeof l=="number"||typeof l=="bigint")&&uo(n,""+l);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hb.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[yn]||null,h=h!=null?h[o]:null,typeof h=="function"&&n.removeEventListener(i,h,f),typeof l=="function")){typeof h!="function"&&h!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,l,f);break e}o in n?n[o]=l:l===!0?n.setAttribute(o,""):Nc(n,o,l)}}}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 l=!1,f=!1,h;for(h in o)if(o.hasOwnProperty(h)){var y=o[h];if(y!=null)switch(h){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,h,y,o,null)}}f&&pt(n,i,"srcSet",o.srcSet,o,null),l&&pt(n,i,"src",o.src,o,null);return;case"input":Qe("invalid",n);var k=h=y=f=null,U=null,Z=null;for(l in o)if(o.hasOwnProperty(l)){var ue=o[l];if(ue!=null)switch(l){case"name":f=ue;break;case"type":y=ue;break;case"checked":U=ue;break;case"defaultChecked":Z=ue;break;case"value":h=ue;break;case"defaultValue":k=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,i));break;default:pt(n,i,l,ue,o,null)}}Gb(n,h,k,U,Z,y,f,!1);return;case"select":Qe("invalid",n),l=y=h=null;for(f in o)if(o.hasOwnProperty(f)&&(k=o[f],k!=null))switch(f){case"value":h=k;break;case"defaultValue":y=k;break;case"multiple":l=k;default:pt(n,i,f,k,o,null)}i=h,o=y,n.multiple=!!l,i!=null?co(n,!!l,i,!1):o!=null&&co(n,!!l,o,!0);return;case"textarea":Qe("invalid",n),h=f=l=null;for(y in o)if(o.hasOwnProperty(y)&&(k=o[y],k!=null))switch(y){case"value":l=k;break;case"defaultValue":f=k;break;case"children":h=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:pt(n,i,y,k,o,null)}Yb(n,l,f,h);return;case"option":for(U in o)if(o.hasOwnProperty(U)&&(l=o[U],l!=null))switch(U){case"selected":n.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:pt(n,i,U,l,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(l=0;l<gl.length;l++)Qe(gl[l],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(Z in o)if(o.hasOwnProperty(Z)&&(l=o[Z],l!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,Z,l,o,null)}return;default:if(Ef(i)){for(ue in o)o.hasOwnProperty(ue)&&(l=o[ue],l!==void 0&&dm(n,i,ue,l,o,void 0));return}}for(k in o)o.hasOwnProperty(k)&&(l=o[k],l!=null&&pt(n,i,k,l,o,null))}function tM(n,i,o,l){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,k=null,U=null,Z=null,ue=null;for(re in o){var he=o[re];if(o.hasOwnProperty(re)&&he!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":U=he;default:l.hasOwnProperty(re)||pt(n,i,re,null,l,he)}}for(var J in l){var re=l[J];if(he=o[J],l.hasOwnProperty(J)&&(re!=null||he!=null))switch(J){case"type":h=re;break;case"name":f=re;break;case"checked":Z=re;break;case"defaultChecked":ue=re;break;case"value":y=re;break;case"defaultValue":k=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,i));break;default:re!==he&&pt(n,i,J,re,l,he)}}_f(n,y,k,U,Z,ue,h,f);return;case"select":re=y=k=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:l.hasOwnProperty(h)||pt(n,i,h,null,l,U)}for(f in l)if(h=l[f],U=o[f],l.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":k=h;break;case"multiple":y=h;default:h!==U&&pt(n,i,f,h,l,U)}i=k,o=y,l=re,J!=null?co(n,!!o,J,!1):!!l!=!!o&&(i!=null?co(n,!!o,i,!0):co(n,!!o,o?[]:"",!1));return;case"textarea":re=J=null;for(k in o)if(f=o[k],o.hasOwnProperty(k)&&f!=null&&!l.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:pt(n,i,k,null,l,f)}for(y in l)if(f=l[y],h=o[y],l.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(r(91));break;default:f!==h&&pt(n,i,y,f,l,h)}Kb(n,J,re);return;case"option":for(var Ae in o)if(J=o[Ae],o.hasOwnProperty(Ae)&&J!=null&&!l.hasOwnProperty(Ae))switch(Ae){case"selected":n.selected=!1;break;default:pt(n,i,Ae,null,l,J)}for(U in l)if(J=l[U],re=o[U],l.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,l,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&&!l.hasOwnProperty(Ue)&&pt(n,i,Ue,null,l,J);for(Z in l)if(J=l[Z],re=o[Z],l.hasOwnProperty(Z)&&J!==re&&(J!=null||re!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,i));break;default:pt(n,i,Z,J,l,re)}return;default:if(Ef(i)){for(var gt in o)J=o[gt],o.hasOwnProperty(gt)&&J!==void 0&&!l.hasOwnProperty(gt)&&dm(n,i,gt,void 0,l,J);for(ue in l)J=l[ue],re=o[ue],!l.hasOwnProperty(ue)||J===re||J===void 0&&re===void 0||dm(n,i,ue,J,l,re);return}}for(var G in o)J=o[G],o.hasOwnProperty(G)&&J!=null&&!l.hasOwnProperty(G)&&pt(n,i,G,null,l,J);for(he in l)J=l[he],re=o[he],!l.hasOwnProperty(he)||J===re||J==null&&re==null||pt(n,i,he,J,l,re)}function Z1(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nM(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var f=o[l],h=f.transferSize,y=f.initiatorType,k=f.duration;if(h&&k&&Z1(y)){for(y=0,k=f.responseEnd,l+=1;l<o.length;l++){var U=o[l],Z=U.startTime;if(Z>k)break;var ue=U.transferSize,he=U.initiatorType;ue&&Z1(he)&&(U=U.responseEnd,y+=ue*(U<k?1:(k-Z)/(U-Z)))}if(--l,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 fm=null,hm=null;function Ou(n){return n.nodeType===9?n:n.ownerDocument}function W1(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 J1(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 mm(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 pm=null;function iM(){var n=window.event;return n&&n.type==="popstate"?n===pm?!1:(pm=n,!0):(pm=null,!1)}var ex=typeof setTimeout=="function"?setTimeout:void 0,aM=typeof clearTimeout=="function"?clearTimeout:void 0,tx=typeof Promise=="function"?Promise:void 0,rM=typeof queueMicrotask=="function"?queueMicrotask:typeof tx<"u"?function(n){return tx.resolve(null).then(n).catch(oM)}:ex;function oM(n){setTimeout(function(){throw n})}function wa(n){return n==="head"}function nx(n,i){var o=i,l=0;do{var f=o.nextSibling;if(n.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(l===0){n.removeChild(f),qo(i);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")bl(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,bl(o);for(var h=o.firstChild;h;){var y=h.nextSibling,k=h.nodeName;h[zs]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=y}}else o==="body"&&bl(n.ownerDocument.body);o=f}while(o);qo(i)}function ix(n,i){var o=n;n=0;do{var l=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||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=l}while(o)}function gm(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":gm(o),wf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function sM(n,i,o,l){for(;n.nodeType===1;){var f=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[zs])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=Jn(n.nextSibling),n===null)break}return null}function lM(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Jn(n.nextSibling),n===null))return null;return n}function ax(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Jn(n.nextSibling),n===null))return null;return n}function ym(n){return n.data==="$?"||n.data==="$~"}function bm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function cM(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var l=function(){i(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Jn(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 vm=null;function rx(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Jn(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function ox(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 sx(n,i,o){switch(i=Ou(o),n){case"html":if(n=i.documentElement,!n)throw Error(r(452));return n;case"head":if(n=i.head,!n)throw Error(r(453));return n;case"body":if(n=i.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function bl(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);wf(n)}var ei=new Map,lx=new Set;function Au(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Vi=V.d;V.d={f:uM,r:dM,D:fM,C:hM,L:mM,m:pM,X:yM,S:gM,M:bM};function uM(){var n=Vi.f(),i=vu();return n||i}function dM(n){var i=oo(n);i!==null&&i.tag===5&&i.type==="form"?Ev(i):Vi.r(n)}var Io=typeof document>"u"?null:document;function cx(n,i,o){var l=Io;if(l&&typeof i=="string"&&i){var f=Gn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),lx.has(f)||(lx.add(f),n={rel:n,crossOrigin:o,href:i},l.querySelector(f)===null&&(i=l.createElement("link"),rn(i,"link",n),Wt(i),l.head.appendChild(i)))}}function fM(n){Vi.D(n),cx("dns-prefetch",n,null)}function hM(n,i){Vi.C(n,i),cx("preconnect",n,i)}function mM(n,i,o){Vi.L(n,i,o);var l=Io;if(l&&n&&i){var f='link[rel="preload"][as="'+Gn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Gn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Gn(o.imageSizes)+'"]')):f+='[href="'+Gn(n)+'"]';var h=f;switch(i){case"style":h=Bo(n);break;case"script":h=Ho(n)}ei.has(h)||(n=b({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),ei.set(h,n),l.querySelector(f)!==null||i==="style"&&l.querySelector(vl(h))||i==="script"&&l.querySelector(xl(h))||(i=l.createElement("link"),rn(i,"link",n),Wt(i),l.head.appendChild(i)))}}function pM(n,i){Vi.m(n,i);var o=Io;if(o&&n){var l=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Gn(l)+'"][href="'+Gn(n)+'"]',h=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ho(n)}if(!ei.has(h)&&(n=b({rel:"modulepreload",href:n},i),ei.set(h,n),o.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(xl(h)))return}l=o.createElement("link"),rn(l,"link",n),Wt(l),o.head.appendChild(l)}}}function gM(n,i,o){Vi.S(n,i,o);var l=Io;if(l&&n){var f=so(l).hoistableStyles,h=Bo(n);i=i||"default";var y=f.get(h);if(!y){var k={loading:0,preload:null};if(y=l.querySelector(vl(h)))k.loading=5;else{n=b({rel:"stylesheet",href:n,"data-precedence":i},o),(o=ei.get(h))&&xm(n,o);var U=y=l.createElement("link");Wt(U),rn(U,"link",n),U._p=new Promise(function(Z,ue){U.onload=Z,U.onerror=ue}),U.addEventListener("load",function(){k.loading|=1}),U.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Nu(y,i,l)}y={type:"stylesheet",instance:y,count:1,state:k},f.set(h,y)}}}function yM(n,i){Vi.X(n,i);var o=Io;if(o&&n){var l=so(o).hoistableScripts,f=Ho(n),h=l.get(f);h||(h=o.querySelector(xl(f)),h||(n=b({src:n,async:!0},i),(i=ei.get(f))&&wm(n,i),h=o.createElement("script"),Wt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function bM(n,i){Vi.M(n,i);var o=Io;if(o&&n){var l=so(o).hoistableScripts,f=Ho(n),h=l.get(f);h||(h=o.querySelector(xl(f)),h||(n=b({src:n,async:!0,type:"module"},i),(i=ei.get(f))&&wm(n,i),h=o.createElement("script"),Wt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function ux(n,i,o,l){var f=(f=pe.current)?Au(f):null;if(!f)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Bo(o.href),o=so(f).hoistableStyles,l=o.get(i),l||(l={type:"style",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Bo(o.href);var h=so(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(vl(n)))&&!h._p&&(y.instance=h,y.state.loading=5),ei.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},ei.set(n,o),h||vM(f,n,o,y.state))),i&&l===null)throw Error(r(528,""));return y}if(i&&l!==null)throw Error(r(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ho(o),o=so(f).hoistableScripts,l=o.get(i),l||(l={type:"script",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Bo(n){return'href="'+Gn(n)+'"'}function vl(n){return'link[rel="stylesheet"]['+n+"]"}function dx(n){return b({},n,{"data-precedence":n.precedence,precedence:null})}function vM(n,i,o,l){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=n.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),rn(i,"link",o),Wt(i),n.head.appendChild(i))}function Ho(n){return'[src="'+Gn(n)+'"]'}function xl(n){return"script[async]"+n}function fx(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var l=n.querySelector('style[data-href~="'+Gn(o.href)+'"]');if(l)return i.instance=l,Wt(l),l;var f=b({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Wt(l),rn(l,"style",f),Nu(l,o.precedence,n),i.instance=l;case"stylesheet":f=Bo(o.href);var h=n.querySelector(vl(f));if(h)return i.state.loading|=4,i.instance=h,Wt(h),h;l=dx(o),(f=ei.get(f))&&xm(l,f),h=(n.ownerDocument||n).createElement("link"),Wt(h);var y=h;return y._p=new Promise(function(k,U){y.onload=k,y.onerror=U}),rn(h,"link",l),i.state.loading|=4,Nu(h,o.precedence,n),i.instance=h;case"script":return h=Ho(o.src),(f=n.querySelector(xl(h)))?(i.instance=f,Wt(f),f):(l=o,(f=ei.get(h))&&(l=b({},o),wm(l,f)),n=n.ownerDocument||n,f=n.createElement("script"),Wt(f),rn(f,"link",l),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(l=i.instance,i.state.loading|=4,Nu(l,o.precedence,n));return i.instance}function Nu(n,i,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,h=f,y=0;y<l.length;y++){var k=l[y];if(k.dataset.precedence===i)h=k;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 xm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function wm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Mu=null;function hx(n,i,o){if(Mu===null){var l=new Map,f=Mu=new Map;f.set(o,l)}else f=Mu,l=f.get(o),l||(l=new Map,f.set(o,l));if(l.has(n))return l;for(l.set(n,null),o=o.getElementsByTagName(n),f=0;f<o.length;f++){var h=o[f];if(!(h[zs]||h[Ot]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=n+y;var k=l.get(y);k?k.push(h):l.set(y,[h])}}return l}function mx(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function xM(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 px(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function wM(n,i,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=Bo(l.href),h=i.querySelector(vl(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Cu.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=h,Wt(h);return}h=i.ownerDocument||i,l=dx(l),(f=ei.get(f))&&xm(l,f),h=h.createElement("link"),Wt(h);var y=h;y._p=new Promise(function(k,U){y.onload=k,y.onerror=U}),rn(h,"link",l),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=Cu.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var km=0;function kM(n,i){return n.stylesheets&&n.count===0&&Tu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var l=setTimeout(function(){if(n.stylesheets&&Tu(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+i);0<n.imgBytes&&km===0&&(km=62500*nM());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Tu(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>km?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function Cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ru=null;function Tu(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ru=new Map,i.forEach(_M,n),Ru=null,Cu.call(n))}function _M(n,i){if(!(i.state.loading&4)){var o=Ru.get(n);if(o)var l=o.get(null);else{o=new Map,Ru.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),l=y)}l&&o.set(null,l)}f=i.instance,y=f.getAttribute("data-precedence"),h=o.get(y)||l,h===l&&o.set(null,f),o.set(y,f),this.count++,l=Cu.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var wl={$$typeof:O,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function SM(n,i,o,l,f,h,y,k,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=Oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oi(0),this.hiddenUpdates=Oi(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function gx(n,i,o,l,f,h,y,k,U,Z,ue,he){return n=new SM(n,i,o,y,U,Z,ue,he,k),i=1,h===!0&&(i|=24),h=Cn(3,null,null,i),n.current=h,h.stateNode=n,i=th(),i.refCount++,n.pooledCache=i,i.refCount++,h.memoizedState={element:l,isDehydrated:o,cache:i},rh(h),n}function yx(n){return n?(n=bo,n):bo}function bx(n,i,o,l,f,h){f=yx(f),l.context===null?l.context=f:l.pendingContext=f,l=ua(i),l.payload={element:o},h=h===void 0?null:h,h!==null&&(l.callback=h),o=da(n,l,i),o!==null&&(_n(o,n,i),Js(o,n,i))}function vx(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function _m(n,i){vx(n,i),(n=n.alternate)&&vx(n,i)}function xx(n){if(n.tag===13||n.tag===31){var i=ur(n,67108864);i!==null&&_n(i,n,67108864),_m(n,67108864)}}function wx(n){if(n.tag===13||n.tag===31){var i=zn();i=_e(i);var o=ur(n,i);o!==null&&_n(o,n,i),_m(n,i)}}var Du=!0;function EM(n,i,o,l){var f=N.T;N.T=null;var h=V.p;try{V.p=2,Sm(n,i,o,l)}finally{V.p=h,N.T=f}}function jM(n,i,o,l){var f=N.T;N.T=null;var h=V.p;try{V.p=8,Sm(n,i,o,l)}finally{V.p=h,N.T=f}}function Sm(n,i,o,l){if(Du){var f=Em(l);if(f===null)um(n,i,l,Lu,o),_x(n,l);else if(AM(f,n,i,o,l))l.stopPropagation();else if(_x(n,l),i&4&&-1<OM.indexOf(n)){for(;f!==null;){var h=oo(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=_t(h.pendingLanes);if(y!==0){var k=h;for(k.pendingLanes|=2,k.entangledLanes|=2;y;){var U=1<<31-be(y);k.entanglements[1]|=U,y&=~U}gi(h),(st&6)===0&&(yu=yt()+500,pl(0))}}break;case 31:case 13:k=ur(h,2),k!==null&&_n(k,h,2),vu(),_m(h,2)}if(h=Em(l),h===null&&um(n,i,l,Lu,o),h===f)break;f=h}f!==null&&l.stopPropagation()}else um(n,i,l,null,o)}}function Em(n){return n=Of(n),jm(n)}var Lu=null;function jm(n){if(Lu=null,n=ro(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 Lu=n,null}function kx(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(ia()){case di:return 2;case ii:return 8;case we:case Te:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var Om=!1,ka=null,_a=null,Sa=null,kl=new Map,_l=new Map,Ea=[],OM="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 _x(n,i){switch(n){case"focusin":case"focusout":ka=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":Sa=null;break;case"pointerover":case"pointerout":kl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":_l.delete(i.pointerId)}}function Sl(n,i,o,l,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:i,domEventName:o,eventSystemFlags:l,nativeEvent:h,targetContainers:[f]},i!==null&&(i=oo(i),i!==null&&xx(i)),n):(n.eventSystemFlags|=l,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function AM(n,i,o,l,f){switch(i){case"focusin":return ka=Sl(ka,n,i,o,l,f),!0;case"dragenter":return _a=Sl(_a,n,i,o,l,f),!0;case"mouseover":return Sa=Sl(Sa,n,i,o,l,f),!0;case"pointerover":var h=f.pointerId;return kl.set(h,Sl(kl.get(h)||null,n,i,o,l,f)),!0;case"gotpointercapture":return h=f.pointerId,_l.set(h,Sl(_l.get(h)||null,n,i,o,l,f)),!0}return!1}function Sx(n){var i=ro(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(){wx(o)});return}}else if(i===31){if(i=m(o),i!==null){n.blockedOn=i,nt(n.priority,function(){wx(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 zu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Em(n.nativeEvent);if(o===null){o=n.nativeEvent;var l=new o.constructor(o.type,o);jf=l,o.target.dispatchEvent(l),jf=null}else return i=oo(o),i!==null&&xx(i),n.blockedOn=o,!1;i.shift()}return!0}function Ex(n,i,o){zu(n)&&o.delete(i)}function NM(){Om=!1,ka!==null&&zu(ka)&&(ka=null),_a!==null&&zu(_a)&&(_a=null),Sa!==null&&zu(Sa)&&(Sa=null),kl.forEach(Ex),_l.forEach(Ex)}function $u(n,i){n.blockedOn===i&&(n.blockedOn=null,Om||(Om=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NM)))}var Uu=null;function jx(n){Uu!==n&&(Uu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uu===n&&(Uu=null);for(var i=0;i<n.length;i+=3){var o=n[i],l=n[i+1],f=n[i+2];if(typeof l!="function"){if(jm(l||o)===null)continue;break}var h=oo(o);h!==null&&(n.splice(i,3),i-=3,Eh(h,{pending:!0,data:f,method:o.method,action:l},l,f))}}))}function qo(n){function i(U){return $u(U,n)}ka!==null&&$u(ka,n),_a!==null&&$u(_a,n),Sa!==null&&$u(Sa,n),kl.forEach(i),_l.forEach(i);for(var o=0;o<Ea.length;o++){var l=Ea[o];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Ea.length&&(o=Ea[0],o.blockedOn===null);)Sx(o),o.blockedOn===null&&Ea.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var f=o[l],h=o[l+1],y=f[yn]||null;if(typeof h=="function")y||jx(o);else if(y){var k=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[yn]||null)k=y.formAction;else if(jm(f)!==null)continue}else k=y.action;typeof k=="function"?o[l+1]=k:(o.splice(l,3),l-=3),jx(o)}}}function Ox(){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),l||setTimeout(o,20)}function o(){if(!l&&!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 l=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Am(n){this._internalRoot=n}Iu.prototype.render=Am.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));var o=i.current,l=zn();bx(o,l,n,i,null,null)},Iu.prototype.unmount=Am.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;bx(n.current,2,null,n,null,null),vu(),i[ao]=null}};function Iu(n){this._internalRoot=n}Iu.prototype.unstable_scheduleHydration=function(n){if(n){var i=At();n={blockedOn:null,target:n,priority:i};for(var o=0;o<Ea.length&&i!==0&&i<Ea[o].priority;o++);Ea.splice(o,0,n),o===0&&Sx(n)}};var Ax=t.version;if(Ax!=="19.2.6")throw Error(r(527,Ax,"19.2.6"));V.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=g(i),n=n!==null?v(n):null,n=n===null?null:n.stateNode,n};var MM={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bu.isDisabled&&Bu.supportsFiber)try{Qt=Bu.inject(MM),ut=Bu}catch{}}return jl.createRoot=function(n,i){if(!s(n))throw Error(r(299));var o=!1,l="",f=Lv,h=zv,y=$v;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=gx(n,1,!1,null,null,o,l,null,f,h,y,Ox),n[ao]=i.current,cm(n),new Am(i)},jl.hydrateRoot=function(n,i,o){if(!s(n))throw Error(r(299));var l=!1,f="",h=Lv,y=zv,k=$v,U=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!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&&(k=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),i=gx(n,1,!0,i,o??null,l,f,U,h,y,k,Ox),i.context=yx(null),o=i.current,l=zn(),l=_e(l),f=ua(l),f.callback=null,da(o,f,l),o=l,i.current.lanes=o,ai(i,o),gi(i),n[ao]=i.current,cm(n),new Iu(i)},jl.version="19.2.6",jl}var Ix;function BM(){if(Ix)return Rm.exports;Ix=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(),Rm.exports=IM(),Rm.exports}var HM=BM();function qM(e){if(!e)return null;const t=e.split("~"),a=t[0];if(!a)return null;if(t.length===1)return{kind:"section",instanceId:a};const r=t[1];if(!r)return null;const s=t[2],c=s!==void 0?Number(s):NaN;return{kind:"slot",instanceId:a,slotId:r,...Number.isInteger(c)?{itemIndex:c}:{}}}function FM(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 PM(e,t){const a=new URL(t).pathname,r=a.endsWith("/")?a:`${a}/`;return`${e}/`===r?"":e.startsWith(r)?e.slice(r.length):null}function VM(e,t){const[a,r,s,c,...u]=e.split("/").filter(Boolean);if(a!=="fixtures"||!r||s!=="canvas"||u.length>0)return null;const m=new URLSearchParams(t);return{fixture:decodeURIComponent(r),canvasId:c?decodeURIComponent(c):null,format:m.get("format"),selection:qM(m.get("sel"))}}function GM(e){var a;const t=e.fixtures[0];return t===void 0?null:{fixture:t.id,canvasId:((a=e.template.canvases[0])==null?void 0:a.id)??null,format:null,selection:null}}function Bx(e){const t=e.canvasId===null?"canvas":`canvas/${encodeURIComponent(e.canvasId)}`,a=`fixtures/${encodeURIComponent(e.fixture)}/${t}`,r=new URLSearchParams;e.format!==null&&r.set("format",e.format);const s=FM(e.selection);s&&r.set("sel",s);const c=r.toString();return c?`${a}?${c}`:a}function H2(e,t){var a;return((a=e.parentElement)==null?void 0:a.closest(`[${t.slotId}],[${t.slotField}]`))??null}function Zi(e,t){return!e.hasAttribute(t.slotUnselectable)}function q2(e,t,a,r){const s=[];for(const c of Array.from(e.querySelectorAll(t)))H2(c,r)===a&&s.push(c);return s}function vg(e,t,a){return q2(e,`[${a.slotItem}="${String(t)}"]`,e,a)}function Hx(e,t,a,r){var c;let s=e.closest(`[${t}]`);for(;s&&a.contains(s);){if(Zi(s,r)&&H2(s,r)===a)return s;s=((c=s.parentElement)==null?void 0:c.closest(`[${t}]`))??null}return null}const zm=1,KM=12;function YM(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 QM(e){const t=zd(e);return t.width<=0||t.height<=0?!1:!XM(e,t)}function qx(e){return e==="hidden"||e==="scroll"||e==="auto"||e==="clip"}function XM(e,t){const a=e.ownerDocument.defaultView;if(!a)return!1;let r=-1/0,s=-1/0,c=1/0,u=1/0;for(let g=e.parentElement;g;g=g.parentElement){const v=a.getComputedStyle(g),b=qx(v.overflowX||v.overflow),w=qx(v.overflowY||v.overflow);if(!b&&!w)continue;const _=g.getBoundingClientRect();b&&(s=Math.max(s,_.left),c=Math.min(c,_.right)),w&&(r=Math.max(r,_.top),u=Math.min(u,_.bottom))}const m=t.left+t.width<=s||t.left>=c,p=t.top+t.height<=r||t.top>=u;return m||p}function zd(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return t;let a=1/0,r=1/0,s=-1/0,c=-1/0,u=!1;for(const m of Array.from(e.children)){const p=zd(m);p.width<=0||p.height<=0||(u=!0,a=Math.min(a,p.top),r=Math.min(r,p.left),s=Math.max(s,p.right),c=Math.max(c,p.bottom))}return u?new DOMRect(r,a,s-r,c-a):t}function F2(e,t,a,r){if(!e)return;if(!t){td(e);return}const s=YM(zd(t),a);for(const[c,u]of Object.entries(s))e.style.setProperty(c,u);r&&e.setAttribute("data-kind",r),e.setAttribute("data-active","true")}function td(e){e&&(e.removeAttribute("data-active"),e.removeAttribute("data-kind"))}function Fx(e,t,a,r){if(!e)return[];const s=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=s.createElement("div");m.className="we-chrome-ring we-chrome-ring--selection",e.insertBefore(m,u),c.push(m)}c.forEach((m,p)=>F2(m,t[p]??null,a,r));for(const m of c.slice(Math.max(t.length,1)))m.remove();return c.slice(0,t.length)}function ZM(e,t,a){if(!e)return;if(!t||!a){fp(e);return}const r=zd(t),s=e.getAttribute("data-active")==="true",c=e.textContent!==a;e.textContent=a,e.style.setProperty("--we-l-top",`${r.top}px`),e.style.setProperty("--we-l-left",`${r.left}px`),e.style.setProperty("--we-l-indent",`${KM}px`),s&&c&&(e.removeAttribute("data-active"),e.offsetWidth),e.setAttribute("data-active","true")}function fp(e){e&&(e.removeAttribute("data-active"),e.textContent="")}function qr(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function xg(e){const t=e.filter(a=>QM(a));return t.length>0?t:e.slice(0,1)}function P2(e,t,a){const r=Array.from(e.querySelectorAll(`[${a.slotId}="${qr(t)}"]`)).filter(s=>Zi(s,a));return xg(r)}function WM(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const s of e)r.push(...vg(s,t.item_index,a).filter(c=>Zi(c,a)));return xg(r)}function V2(e,t,a){if(!t)return[];const r=e.querySelector(`[${a.sectionInstanceId}="${qr(t.instance_id)}"]`);if(!r)return[];if(t.kind==="section")return[r];const s=P2(r,t.slot_id,a);if(s.length===0)return[];if(t.item_index!=null||t.field_name){const c=t.field_name?`[${a.slotField}="${qr(t.field_name)}"]`:null,u=[];for(const m of s){let p=[m];if(!(t.item_index!=null&&(p=vg(m,t.item_index,a).filter(g=>Zi(g,a)),p.length===0)))for(const g of p)if(c){const v=q2(g,c,m,a).filter(b=>Zi(b,a));if(v.length>0){u.push(...v);continue}g!==m&&u.push(g)}else u.push(g)}if(u.length>0)return xg(u)}return s.map(c=>{const u=c.closest(`[${a.slotGroup}]`);return u&&Zi(u,a)?u:c})}function JM(e,t,a){return V2(e,t,a)[0]??null}const Px="we-enh-shield",eC="we-enh-shield--item",Vo="data-we-live";function tC(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const s of G2(e,t,a))r.push(...vg(s,t.item_index,a).filter(c=>Zi(c,a)));return r}function G2(e,t,a){if(!t||t.kind!=="slot")return[];const r=e.querySelector(`[${a.sectionInstanceId}="${qr(t.instance_id)}"]`);return r?Array.from(r.querySelectorAll(`[${a.slotId}="${qr(t.slot_id)}"]`)):[]}function nC(e,t,a){if(e.querySelectorAll(`[${Vo}]`).forEach(s=>s.removeAttribute(Vo)),!t)return;const r=e.querySelector(`[${a.sectionInstanceId}="${qr(t.instance_id)}"]`);if(r)if(t.kind==="section")r.setAttribute(Vo,"true");else{const s=tC(e,t,a),c=s.length>0?s:G2(e,t,a).filter(u=>Zi(u,a));for(const u of c)u.setAttribute(Vo,"true")}}const Ir=1440,Vx=Math.round(Ir*9/16),K2=14,wg="we-frame-defaults";function iC(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 aC(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 ${wg} {
|
|
136
|
-
[${e}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
|
-
}`}function rC(e,t){const a=t?`#we-page {
|
|
138
|
-
padding: 0;
|
|
139
|
-
}`:`#we-page {
|
|
140
|
-
width: ${Ir}px;
|
|
141
|
-
min-height: ${Vx}px;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
border-radius: ${K2}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: ${Vx}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 ${wg} {
|
|
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
|
-
${a}
|
|
185
|
-
${t?aC(e.sectionInstanceId):iC(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
|
-
.${Px} {
|
|
250
|
-
position: absolute;
|
|
251
|
-
inset: 0;
|
|
252
|
-
z-index: 1;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
background: transparent;
|
|
255
|
-
}
|
|
256
|
-
.${eC} { z-index: 2; }
|
|
257
|
-
[${Vo}] .${Px} { display: none; }
|
|
258
|
-
|
|
259
|
-
/* Image slider: until the slider's \`images\` slot is the live selection, its
|
|
260
|
-
z-index:2 nav arrows would paint above the z-index:1 shield and stay
|
|
261
|
-
clickable, escaping the select-first gate. Disable them so the shield
|
|
262
|
-
catches the first click; restored once .tr-slider carries data-we-live.
|
|
263
|
-
Editor-only — deliberately not in published tokens.css. */
|
|
264
|
-
.tr-slider:not([${Vo}]) .tr-slider__nav { pointer-events: none; }
|
|
265
|
-
`}function oC(e,t){const r=e/Ir,s=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*r,.1926*r+.54,s))}const sC=420,Gx=.92;function lC(e,t,a){if(!a)return e;const r=Math.max(e,sC/a.width),s=Math.min(.9,e*Ir/a.width,Gx*t.availableWidthPx/a.width,Gx*t.availableHeightPx/a.height);return Math.max(.05,Math.min(r,s))}const cd="/section-assets/",Y2="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",cC=new RegExp(`^${Y2}$`),uC=new RegExp(`${cd.replace(/\//g,"\\/")}(${Y2})`,"g");function dC(e){switch(e.kind){case"canonical":return cd;case"publishedDocument":return"/assets/";case"publishedStylesheet":return"";case"canvas":return`${e.basePath}runtime/section-asset/`}}function fC(e,t){const a=e.startsWith(cd)?e.slice(cd.length):"";if(!cC.test(a))throw new Error(`not a canonical section-asset ref: ${e}`);return`${dC(t)}${a}`}function hC(e,t){return e.replace(uC,a=>fC(a,t))}function Kx(e,t,a){var s;let r=e.closest(`[${t}]`);for(;r&&!Zi(r,a);)r=((s=r.parentElement)==null?void 0:s.closest(`[${t}]`))??null;return r}function mC(e,t,a){for(const r of Array.from(e.querySelectorAll(`[${a.markers.slotId}]`))){if(r.closest(`[${a.markers.slotGroup}]`)!==e)continue;const s=r.getAttribute(a.markers.slotId);if(s&&a.isSlotEditable(t,s))return s}return null}function pC(e,t,a){if(!e)return null;const r=e.closest(`[${a.markers.sectionInstanceId}]`),s=r==null?void 0:r.getAttribute(a.markers.sectionInstanceId);if(!r||!s)return null;const c=t.find(j=>j.instance_id===s),u={selection:{kind:"section",instance_id:s},element:r};if(!c)return u;const m=Kx(e,a.markers.slotGroup,a.markers);if(m&&r.contains(m)){const j=mC(m,s,a);return j?{selection:{kind:"slot",instance_id:s,slot_id:j},element:m}:u}const p=Kx(e,a.markers.slotId,a.markers),g=p==null?void 0:p.getAttribute(a.markers.slotId);if(!p||!g||!a.isSlotEditable(s,g))return u;const v=Hx(e,a.markers.slotItem,p,a.markers),b=v?Number(v.getAttribute(a.markers.slotItem)):NaN,w=Number.isInteger(b)?b:void 0,_=Hx(e,a.markers.slotField,p,a.markers),E=(_==null?void 0:_.getAttribute(a.markers.slotField))??null,S=E&&a.isSlotEditable(s,g,E)?E:null;return{selection:{kind:"slot",instance_id:s,slot_id:g,...w!==void 0?{item_index:w}:{},...S?{field_name:S}:{}},element:(S?_:null)??v??p}}function hp(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 gC(e){if(!e)return"null";let t=2166136261;for(let a=0;a<e.length;a++)t^=e.charCodeAt(a),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Q2(e,t){var c;const a=t.createElement("div");a.className="we-render-error";const r=t.createElement("p");r.className="we-render-error__title",r.textContent="Couldn’t render this section.";const s=t.createElement("p");return s.className="we-render-error__detail",s.textContent=((c=e.render_error)==null?void 0:c.message)??"Unknown render error.",a.appendChild(r),a.appendChild(s),a}function yC(e,t,a,r){const s=t.createElement("div");s.setAttribute(a.sectionInstanceId,e.instance_id),s.setAttribute("data-section-label",hp(e)),s.dataset.svId=e.section_version_id,s.dataset.htmlHash=gC(e.html);const c=t.createElement("div");return c.className="we-section-body",e.render_error||e.html===null?c.appendChild(Q2(e,t)):c.innerHTML=r(e.html),s.appendChild(c),s}const bC=`(function () {
|
|
266
|
-
function CaptureIntersectionObserver(callback, options) {
|
|
267
|
-
var opts = options || {};
|
|
268
|
-
this.root = opts.root || null;
|
|
269
|
-
this.rootMargin = opts.rootMargin || "0px";
|
|
270
|
-
var threshold = opts.threshold;
|
|
271
|
-
this.thresholds = Object.freeze(
|
|
272
|
-
Array.isArray(threshold) ? threshold.slice() : [typeof threshold === "number" ? threshold : 0],
|
|
273
|
-
);
|
|
274
|
-
this._callback = callback;
|
|
275
|
-
this._queued = [];
|
|
276
|
-
this._scheduled = false;
|
|
277
|
-
}
|
|
278
|
-
CaptureIntersectionObserver.prototype._flush = function () {
|
|
279
|
-
this._scheduled = false;
|
|
280
|
-
var entries = this._queued;
|
|
281
|
-
this._queued = [];
|
|
282
|
-
if (entries.length === 0) return;
|
|
283
|
-
this._callback(entries, this);
|
|
284
|
-
};
|
|
285
|
-
CaptureIntersectionObserver.prototype.observe = function (target) {
|
|
286
|
-
var rect = target.getBoundingClientRect();
|
|
287
|
-
this._queued.push({
|
|
288
|
-
target: target,
|
|
289
|
-
isIntersecting: true,
|
|
290
|
-
intersectionRatio: 1,
|
|
291
|
-
boundingClientRect: rect,
|
|
292
|
-
intersectionRect: rect,
|
|
293
|
-
rootBounds: new DOMRectReadOnly(0, 0, window.innerWidth, window.innerHeight),
|
|
294
|
-
time: performance.now(),
|
|
295
|
-
});
|
|
296
|
-
if (this._scheduled) return;
|
|
297
|
-
this._scheduled = true;
|
|
298
|
-
var observer = this;
|
|
299
|
-
Promise.resolve().then(function () {
|
|
300
|
-
observer._flush();
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
CaptureIntersectionObserver.prototype.unobserve = function () {};
|
|
304
|
-
CaptureIntersectionObserver.prototype.disconnect = function () {
|
|
305
|
-
this._queued = [];
|
|
306
|
-
};
|
|
307
|
-
CaptureIntersectionObserver.prototype.takeRecords = function () {
|
|
308
|
-
var entries = this._queued;
|
|
309
|
-
this._queued = [];
|
|
310
|
-
return entries;
|
|
311
|
-
};
|
|
312
|
-
window.IntersectionObserver = CaptureIntersectionObserver;
|
|
313
|
-
})();`,Oa=96,Gi=72,vC=25.4,xC=/^(\d+(?:\.\d+)?)(in|mm)$/;function $m(e){const t=xC.exec(e),[,a,r]=t??[];if(a===void 0||r===void 0)throw new Error(`malformed physical length: "${e}"`);const s=Number.parseFloat(a);return r==="mm"?s/vC:s}function $d(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/Oa*Gi,pointHeight:e.height/Oa*Gi,bleedPoints:0,panels:1,sheetWidth:e.width,sheetHeight:e.height,sheetPointWidth:e.width/Oa*Gi,sheetPointHeight:e.height/Oa*Gi};const t=e,a=$m(t.width),r=$m(t.height),s=t.bleed===void 0?0:$m(t.bleed),c=a*Oa,u=r*Oa,m=s*Oa,p=c+2*m,g=u+2*m,v=t.dpi/Oa,b=t.panels??1;return{frameWidth:c,frameHeight:u,bleed:m,viewportWidth:p,viewportHeight:g,deviceScaleFactor:v,pixelWidth:Math.round(p*v),pixelHeight:Math.round(g*v),pointWidth:(a+2*s)*Gi,pointHeight:(r+2*s)*Gi,bleedPoints:s*Gi,panels:b,sheetWidth:b*c+2*m,sheetHeight:g,sheetPointWidth:(b*a+2*s)*Gi,sheetPointHeight:(r+2*s)*Gi}}const X2="concrete-frame",Z2="concrete-sheet";function wC(e){const t=$d(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function kC(e){const t=$d(e);return{"--sheet-w":`${t.panels*t.frameWidth}px`,"--sheet-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function Je(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ls(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function _C(e){return W2(e.id,{...wC(e)})}function W2(e,t){const a=Object.entries(t).map(([r,s])=>`${r}:${s}`).join(";");return{class:X2,dataFormat:e,style:a}}function Yx(e,t){const a=_C(e);return`<div class="${Je(a.class)}" data-format="${Je(a.dataFormat)}" style="${Je(a.style)}">${t.join("")}</div>`}function SC(e,t){const a=Object.entries(kC(e)).map(([r,s])=>`${r}:${s}`).join(";");return`<div class="${Je(Z2)}" style="${Je(a)}">${t.join("")}</div>`}function EC(e){switch(e.destination){case"published":return jC(e);case"artifact":return OC(e);case"preview":return AC(e);case"canvas":return NC(e)}}function J2(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${bC}<\/script>`]}const e_="html, body { margin: 0; padding: 0; }";function t_(e){const t=[`rel="${e.rel}"`,`href="${Je(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${Je(e.sizes)}"`),e.type!==void 0&&t.push(`type="${Je(e.type)}"`),`<link ${t.join(" ")} />`}function jC(e){const{meta:t}=e,a=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(t.title)}</title>`,`<meta name="description" content="${Je(t.description)}" />`];t.canonical&&a.push(`<link rel="canonical" href="${Je(t.canonical)}" />`);for(const s of t.icons??[])a.push(t_(s));a.push('<meta property="og:type" content="website" />'),t.siteName&&a.push(`<meta property="og:site_name" content="${Je(t.siteName)}" />`),a.push(`<meta property="og:title" content="${Je(t.title)}" />`),a.push(`<meta property="og:description" content="${Je(t.description)}" />`),t.ogUrl&&a.push(`<meta property="og:url" content="${Je(t.ogUrl)}" />`),t.ogImage&&(a.push(`<meta property="og:image" content="${Je(t.ogImage)}" />`),t.ogImageWidth&&a.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&a.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&a.push(`<meta property="og:image:type" content="${Je(t.ogImageType)}" />`),t.ogImageAlt&&a.push(`<meta property="og:image:alt" content="${Je(t.ogImageAlt)}" />`),a.push('<meta name="twitter:card" content="summary_large_image" />'),a.push(`<meta name="twitter:title" content="${Je(t.title)}" />`),a.push(`<meta name="twitter:description" content="${Je(t.description)}" />`),a.push(`<meta name="twitter:image" content="${Je(t.ogImage)}" />`)),a.push(..._g(e.stylesheets)),a.push(...Sg(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&a.push(`<script type="speculationrules">${ls({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}<\/script>`);const r=e.siteConfig?`
|
|
314
|
-
<script type="application/json" id="concrete-site-config">${ls(e.siteConfig)}<\/script>`:"";return kg({lang:t.lang??"en",head:a,body:` <body class="concrete-root">
|
|
315
|
-
${e.root.bodyHtml}${r}${Eg(e.islands,"viewport")}
|
|
316
|
-
<script type="module" src="${Je(e.analyticsJs.url)}"><\/script>
|
|
317
|
-
</body>`})}function OC(e){const t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${Je(e.title)}</title>`),t.push(..._g(e.stylesheets));const a=[e_,...TC(e.root)];return t.push(n_(a)),t.push(...J2(e.islands)),t.push(...Sg(e.islands)),kg({lang:"en",head:t,body:` <body>${RC(e.root)}${Eg(e.islands,"eager")}</body>`})}function AC(e){const t=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(e.title)}</title>`,...e.icon===void 0?[]:[t_({rel:"icon",href:e.icon})],..._g(e.stylesheets),n_([e_,...e.extraCss??[]]),...e.capture===!0?J2(e.islands):[],...Sg(e.islands)],a=(e.devScripts??[]).map(r=>`
|
|
318
|
-
${r}`).join("");return kg({lang:"en",head:t,body:` <body>
|
|
319
|
-
${e.root.bodyHtml}${Eg(e.islands,e.capture===!0?"eager":"viewport")}${a}
|
|
320
|
-
</body>`})}function NC(e){const t=e.stylesheets.hrefs.map(a=>`<link rel="stylesheet" href="${Je(a)}">`).join("");return`<!doctype html>
|
|
321
|
-
<html>
|
|
322
|
-
<head>
|
|
323
|
-
<meta charset="utf-8">
|
|
324
|
-
<base href="${Je(e.base)}">
|
|
325
|
-
<!-- Cascade-layer order is fixed by FIRST declaration, document-wide. The
|
|
326
|
-
kernel's document defaults must lose to everything a template declares,
|
|
327
|
-
so their layer is pre-declared here, before any template stylesheet,
|
|
328
|
-
pinning it below every layer those go on to declare. -->
|
|
329
|
-
<style>@layer ${e.defaultsLayer};</style>
|
|
330
|
-
${t}${CC(e.islands)}
|
|
331
|
-
<style>${e.frameCss}</style>
|
|
332
|
-
</head>
|
|
333
|
-
<body>
|
|
334
|
-
<div id="${Je(e.root.id)}"${MC(e.root)}></div>
|
|
335
|
-
</body>
|
|
336
|
-
</html>`}function MC(e){if(!e.pageBox)return"";const t=W2(e.pageBox.formatId,e.pageBox.tokens);return` class="${Je(t.class)}" data-format="${Je(t.dataFormat)}" style="${Je(t.style)}"`}function CC(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const t=e.hostScriptSrc?`
|
|
337
|
-
<script id="tr-island-host" type="module" src="${Je(e.hostScriptSrc)}"><\/script>`:"";return`${Object.keys(e.importMap).length===0?"":`
|
|
338
|
-
<script type="importmap">${ls({imports:e.importMap})}<\/script>`}
|
|
339
|
-
<script>window.__TR_ISLAND_MAP=${ls(e.islandMap)};<\/script>
|
|
340
|
-
<!-- id is the contract the host's readiness gate keys off — it waits on THIS
|
|
341
|
-
element's load event, not a timeout, so a slow cold first load still
|
|
342
|
-
activates without a refresh. -->${t}`}function kg(e){const t=e.head.map(a=>` ${a}`).join(`
|
|
343
|
-
`);return`<!doctype html>
|
|
344
|
-
<html lang="${Je(e.lang)}">
|
|
345
|
-
<head>
|
|
346
|
-
${t}
|
|
347
|
-
</head>
|
|
348
|
-
${e.body}
|
|
349
|
-
</html>
|
|
350
|
-
`}function RC(e){if(e.kind==="frame")return Yx(e.format,e.sectionHtml);const t=e.pages.map(s=>Yx(e.format,s)),{panels:a}=$d(e.format);if(a===1)return t.join(`
|
|
351
|
-
`);if(t.length%a!==0)throw new Error(`page-shell: format "${e.format.id}" folds ${a} panels to a sheet, but the stack has ${t.length} pages, not a whole number of sheets`);const r=[];for(let s=0;s<t.length;s+=a)r.push(SC(e.format,t.slice(s,s+a)));return r.join(`
|
|
352
|
-
`)}function TC(e){if(e.kind!=="frameStack")return[];const t=$d(e.format).panels===1?X2:Z2;return[`body > .${t} { break-after: page; }`,`body > .${t}:last-child { break-after: auto; }`]}function _g(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${Je(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function n_(e){const[t,...a]=e;return t===void 0?"<style></style>":a.length===0?`<style>${t}</style>`:`<style>${t}
|
|
353
|
-
${a.join(`
|
|
354
|
-
`)}
|
|
355
|
-
</style>`}function Sg(e){if(e.kind!=="bundles")return[];const t=[],a=e.reactVendorMap;if(a&&Object.keys(a).length>0&&t.push(`<script type="importmap">${ls({imports:a})}<\/script>`),Object.keys(e.islandMap).length===0)return t;for(const r of[e.runtime.url,...Object.values(a??{}),...e.reactVendorCore?[e.reactVendorCore.url]:[]])t.push(`<link rel="modulepreload" href="${Je(r)}" />`);return t}function Eg(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const a=ls(e.islandMap),r=t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':"";return e.kind==="bundles"?`
|
|
356
|
-
<script>window.__TR_ISLAND_MAP=${a};${r}<\/script>
|
|
357
|
-
<script type="module" src="${Je(e.runtime.url)}"><\/script>`:`
|
|
358
|
-
${DC}
|
|
359
|
-
<script>window.__TR_ISLAND_MAP = ${a};${r}<\/script>
|
|
360
|
-
<script type="module" src="${Je(e.bootstrapUrl)}"><\/script>`}const DC=`<script type="module">
|
|
361
|
-
import RefreshRuntime from "/@react-refresh";
|
|
362
|
-
RefreshRuntime.injectIntoGlobalHook(window);
|
|
363
|
-
window.$RefreshReg$ = () => {};
|
|
364
|
-
window.$RefreshSig$ = () => (type) => type;
|
|
365
|
-
window.__vite_plugin_react_preamble_installed__ = true;
|
|
366
|
-
<\/script>`;function LC(e){return Object.keys(e.islandMap).length===0?{kind:"none"}:Object.keys(e.importMap).length===0&&!e.hostResolvesOwnImports?(console.error("canvas: this template version has islands but no import map, so nothing can resolve their React — sections render statically. Republish the template to emit the vendor."),{kind:"none"}):{kind:"editorHost",islandMap:e.islandMap,importMap:e.importMap,hostScriptSrc:e.hostScriptSrc}}function zC(e,t,a){return EC({destination:"canvas",root:{kind:"canvas",id:"we-page",...a?{pageBox:{formatId:a.formatId,tokens:a.tokens}}:{}},islands:LC(e),stylesheets:{kind:"links",hrefs:e.stylesheets},base:e.basePath,defaultsLayer:wg,frameCss:rC(t,a)})}function $C(e){return!!(e!=null&&e.getElementById("we-page"))}function Qx(e){const t=a=>hC(a,{kind:"canvas",basePath:e.assets.basePath});return{srcdoc:()=>zC(e.assets,e.markers,e.pageBox),buildSectionWrapper:(a,r)=>yC(a,r,e.markers,t),buildErrorPlaceholder:Q2,resolveTarget:(a,r)=>pC(a,r,e),localizeSectionAssets:t,resolveSelectionEl:(a,r)=>JM(a,r,e.markers),resolveSelectionEls:(a,r)=>V2(a,r,e.markers),resolveVisibleSlotEls:(a,r)=>P2(a,r,e.markers),resolveItemEls:(a,r)=>WM(a,r,e.markers),setLiveOwner:(a,r)=>nC(a,r,e.markers)}}const i_=(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 UC(e){return i_(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 IC(e){return i_(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 BC=42,a_=16;function HC(e,t){const a=[];for(const s of e)for(a.push({sum:s.y,n:1,items:[s]});a.length>1;){const c=a[a.length-1],u=a[a.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)a.splice(a.length-2,2,{sum:u.sum+c.sum,n:u.n+c.n,items:u.items.concat(c.items)});else break}const r={};for(const s of a){const c=s.sum/s.n-(s.n-1)/2*t;s.items.forEach((u,m)=>{r[u.idx]=c+m*t})}return r}const qC=UC("we-htab-eye-off"),FC=IC("we-htab-eye-on"),mp=new WeakMap;function PC(e,t,a,r){const s=e.createElement("button");s.type="button",s.className="we-htab",s.dataset.hiddenTab=t,s.title=`Show ${a}`,s.setAttribute("aria-label",`Show ${a}`),s.innerHTML=`<span class="we-htab-eye">${qC}${FC}</span><span class="we-htab-name"></span>`;const c=s.querySelector(".we-htab-name");return c&&(c.textContent=a),mp.set(s,r),s.addEventListener("click",u=>{var m;u.stopPropagation(),(m=mp.get(s))==null||m()}),s}function VC(e,t,a,r){const s=new Map;e.querySelectorAll(".we-htab").forEach(m=>{const p=m.dataset.hiddenTab;p&&s.set(p,m)});const c=new Set,u=[];for(const m of a){let p=s.get(m.instanceId);if(!p)p=PC(t,m.instanceId,m.label,()=>r(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}`),mp.set(p,()=>r(m.instanceId))}c.add(m.instanceId),u.push(p)}return s.forEach((m,p)=>{c.has(p)||m.remove()}),u}function GC(e,t,a){const r=e.map((c,u)=>{const m=t(c.dataset.hiddenTab??""),p=m?m.getBoundingClientRect().top*a:0;return{idx:u,y:p}}),s=HC(r,BC);e.forEach((c,u)=>{c.style.top=`${s[u]}px`,c.style.left=`${a_-c.offsetWidth}px`})}const KC=48,YC=30,QC=`
|
|
367
|
-
@property --we-scale {
|
|
368
|
-
syntax: "<number>";
|
|
369
|
-
inherits: true;
|
|
370
|
-
initial-value: 1;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/* The scroll container + dotted canvas surface. The host lays this element
|
|
374
|
-
out — position and size are the host's (it must both bound the height and
|
|
375
|
-
be positioned, so the frame wrapper's offset parent is the stage);
|
|
376
|
-
everything inside is kernel-defined. Declaring position here would win
|
|
377
|
-
the cascade over a host's own positioning utility classes (this sheet
|
|
378
|
-
loads after theirs), which is how the app's absolutely-positioned stage
|
|
379
|
-
once silently became in-flow and unscrollable.
|
|
380
|
-
background-attachment: local makes the grid scroll together with
|
|
381
|
-
the page card so the canvas + website read as one scene being panned, not
|
|
382
|
-
a card sliding over a fixed grid. Padding aligns the page card with the
|
|
383
|
-
floating panel: top/bottom/left 20px; the right constant (40px) covers the
|
|
384
|
-
panel's right inset (20px) plus an equal 20px gap. Fallback 436px matches
|
|
385
|
-
the panel's base CSS width.
|
|
386
|
-
The top padding also carries the label lane: a page-title row is drawn
|
|
387
|
-
ABOVE its frame's box, so the topmost frame's row would otherwise sit in
|
|
388
|
-
the 20px margin. --we-frame-label-lane is set by the stage reconciler only
|
|
389
|
-
when some frame is labeled, so a canvas whose pages declare no label keeps
|
|
390
|
-
the original 20px exactly. */
|
|
391
|
-
.we-canvas-stage {
|
|
392
|
-
overflow: auto;
|
|
393
|
-
padding: calc(20px + var(--we-frame-label-lane, 0px))
|
|
394
|
-
calc(var(--we-panel-w, 436px) + 40px) 20px 20px;
|
|
395
|
-
transition: --we-scale 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
396
|
-
background-image: radial-gradient(rgba(20, 18, 13, 0.13) 1px, transparent 1.2px);
|
|
397
|
-
background-size: 20px 20px;
|
|
398
|
-
background-position: 10px 10px;
|
|
399
|
-
background-attachment: local;
|
|
400
|
-
scrollbar-width: none;
|
|
401
|
-
-ms-overflow-style: none;
|
|
402
|
-
}
|
|
403
|
-
.we-canvas-stage::-webkit-scrollbar { width: 0; height: 0; display: none; }
|
|
404
|
-
|
|
405
|
-
/* The scaled page card's layout box: exactly the iframe's visual footprint,
|
|
406
|
-
so the stage scrolls and centers the card correctly. Auto inline margins
|
|
407
|
-
rather than flex centering: they collapse to 0 when the card overflows the
|
|
408
|
-
stage, keeping the left edge reachable by scroll at high zoom.
|
|
409
|
-
|
|
410
|
-
isolation:isolate SEALS the canvas's own stacking hierarchy (tab layer,
|
|
411
|
-
page card, chrome overlay) into this element, so those z-indexes are
|
|
412
|
-
ordered only against each other and the whole card paints at the stage's
|
|
413
|
-
position in the HOST's DOM order. Without it the overlay competed
|
|
414
|
-
directly with the host's floating chrome -- a panel, a zoom toolbar, a
|
|
415
|
-
notice banner -- and a hover outline drew straight over the controls.
|
|
416
|
-
Same reasoning as the section wrappers' isolate in the frame document. */
|
|
417
|
-
.we-canvas-frame {
|
|
418
|
-
position: relative;
|
|
419
|
-
width: calc(var(--we-page-w, ${Ir}px) * var(--we-scale, 1));
|
|
420
|
-
height: calc(var(--we-page-h, 0px) * var(--we-scale, 1));
|
|
421
|
-
margin-inline: auto;
|
|
422
|
-
isolation: isolate;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/* The multi-frame stack: one frame per row, in the canvas's page order, each
|
|
426
|
-
centered on the same axis a lone page card already used (the auto inline
|
|
427
|
-
margins above), separated by a constant host-px gap plus whatever lane the
|
|
428
|
-
label chips need. Expressed as an adjacent-sibling rule so a single-frame
|
|
429
|
-
canvas matches no selector at all and lays out byte-identically to what it
|
|
430
|
-
did before frames could stack. The gap does NOT ride --we-scale: it is
|
|
431
|
-
chrome between two artifacts, not a part of either, so it stays the same
|
|
432
|
-
distance at any zoom. */
|
|
433
|
-
.we-canvas-frame + .we-canvas-frame {
|
|
434
|
-
margin-top: calc(${KC}px + var(--we-frame-label-lane, 0px));
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/* Page-title row -- "Front", "Back": which page of the canvas this frame
|
|
438
|
-
is, with the visibility toggle seated directly beside the name it acts
|
|
439
|
-
on (one group, never split across the page's corners). Drawn ABOVE the
|
|
440
|
-
frame's box (bottom: 100%, in the lane the stage padding and the
|
|
441
|
-
inter-frame gap reserve) so it never covers artwork, and sized in
|
|
442
|
-
--we-content like the edge tabs: constant visual size at any zoom,
|
|
443
|
-
because it names the page rather than belonging to it.
|
|
444
|
-
pointer-events:none at the row so the lane's empty run stays stage
|
|
445
|
-
surface (a deselect click must fall through); the toggle re-enables its
|
|
446
|
-
own. */
|
|
447
|
-
.we-frame-titlebar {
|
|
448
|
-
position: absolute;
|
|
449
|
-
bottom: 100%;
|
|
450
|
-
left: 0;
|
|
451
|
-
right: 0;
|
|
452
|
-
margin-bottom: calc(4 * var(--we-content, 1px));
|
|
453
|
-
display: flex;
|
|
454
|
-
align-items: center;
|
|
455
|
-
gap: calc(6 * var(--we-content, 1px));
|
|
456
|
-
pointer-events: none;
|
|
457
|
-
}
|
|
458
|
-
/* Quiet by design: the row annotates the artwork below it, so it reads in
|
|
459
|
-
a light gray that cedes attention to the page — the ink weights are
|
|
460
|
-
reserved for the states that earn them (hover, the engaged toggle). */
|
|
461
|
-
.we-canvas-frame-label {
|
|
462
|
-
min-width: 0;
|
|
463
|
-
overflow: hidden;
|
|
464
|
-
text-overflow: ellipsis;
|
|
465
|
-
white-space: nowrap;
|
|
466
|
-
color: #a09d94;
|
|
467
|
-
font-size: calc(13 * var(--we-content, 1px));
|
|
468
|
-
font-weight: 500;
|
|
469
|
-
letter-spacing: -0.01em;
|
|
470
|
-
line-height: 1;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* Page-visibility toggle -- the eye beside the page title, resting in the
|
|
474
|
-
title's own gray so the row reads as one quiet group. Rendered only
|
|
475
|
-
for pages the composition marks optional (frame-visibility.ts). */
|
|
476
|
-
.we-frame-toggle {
|
|
477
|
-
flex: 0 0 auto;
|
|
478
|
-
display: grid;
|
|
479
|
-
place-items: center;
|
|
480
|
-
width: calc(24 * var(--we-content, 1px));
|
|
481
|
-
height: calc(22 * var(--we-content, 1px));
|
|
482
|
-
padding: 0;
|
|
483
|
-
border: 0;
|
|
484
|
-
border-radius: calc(6 * var(--we-content, 1px));
|
|
485
|
-
background: transparent;
|
|
486
|
-
color: #a09d94;
|
|
487
|
-
cursor: pointer;
|
|
488
|
-
pointer-events: auto;
|
|
489
|
-
transition: background-color 0.15s, color 0.15s;
|
|
490
|
-
}
|
|
491
|
-
.we-frame-toggle svg {
|
|
492
|
-
width: calc(14 * var(--we-content, 1px));
|
|
493
|
-
height: calc(14 * var(--we-content, 1px));
|
|
494
|
-
}
|
|
495
|
-
.we-frame-toggle:hover {
|
|
496
|
-
background: rgba(20, 18, 13, 0.06);
|
|
497
|
-
color: #14180F;
|
|
498
|
-
}
|
|
499
|
-
.we-frame-toggle:focus-visible {
|
|
500
|
-
outline: none;
|
|
501
|
-
background: rgba(20, 18, 13, 0.06);
|
|
502
|
-
color: #14180F;
|
|
503
|
-
box-shadow: 0 0 0 2px rgba(15, 42, 34, 0.5);
|
|
504
|
-
}
|
|
505
|
-
/* Hidden state reads as an engaged control (the section eye's hidden
|
|
506
|
-
treatment): filled box, full-ink glyph. */
|
|
507
|
-
.we-frame-toggle[data-page-visibility="hidden"] {
|
|
508
|
-
background: rgba(20, 18, 13, 0.06);
|
|
509
|
-
color: #14180F;
|
|
510
|
-
box-shadow: inset 0 0 0 1px #ebebe6;
|
|
511
|
-
}
|
|
512
|
-
/* Hidden page -- tinted to a clear deactivated state, in place and at full
|
|
513
|
-
footprint (a page never collapses the way a hidden section does), still
|
|
514
|
-
fully interactive: the tint says "excluded from the artifact", not
|
|
515
|
-
"locked". The title strikes through and lightens, the same reading as a
|
|
516
|
-
fully-hidden canvas's bar tab. The stamp is written by
|
|
517
|
-
frame-visibility.ts. */
|
|
518
|
-
.we-canvas-frame[data-page-hidden="true"] > iframe {
|
|
519
|
-
filter: grayscale(1) opacity(0.55);
|
|
520
|
-
}
|
|
521
|
-
.we-canvas-frame[data-page-hidden="true"] > .we-frame-titlebar > .we-canvas-frame-label {
|
|
522
|
-
text-decoration: line-through;
|
|
523
|
-
color: #b6b3aa;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/* The frame document: unscaled ${Ir}px layout, scaled here as an
|
|
527
|
-
element. The border-radius matches #we-page inside, so the card shadow
|
|
528
|
-
follows the content's silhouette; both radius and shadow ride the
|
|
529
|
-
transform, exactly as they rode the old in-document scaling. z-index 2
|
|
530
|
-
stacks the card above the edge tabs (z-index 1) so the shadow falls over a
|
|
531
|
-
tab's tucked-under inner edge, nestling it against the page. */
|
|
532
|
-
.we-canvas-frame > iframe {
|
|
533
|
-
display: block;
|
|
534
|
-
border: 0;
|
|
535
|
-
background: transparent;
|
|
536
|
-
width: var(--we-page-w, ${Ir}px);
|
|
537
|
-
height: var(--we-page-h, 0px);
|
|
538
|
-
border-radius: var(--we-page-radius, ${K2}px);
|
|
539
|
-
box-shadow:
|
|
540
|
-
0 1px 0 rgba(20,18,13,0.06),
|
|
541
|
-
0 2px 6px -2px rgba(20,18,13,0.10),
|
|
542
|
-
0 12px 28px -8px rgba(20,18,13,0.18),
|
|
543
|
-
0 32px 64px -20px rgba(20,18,13,0.28);
|
|
544
|
-
transform: scale(var(--we-scale, 1));
|
|
545
|
-
transform-origin: 0 0;
|
|
546
|
-
position: relative;
|
|
547
|
-
z-index: 2;
|
|
548
|
-
transition: filter 0.2s ease;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/* Chrome overlay -- sized to the frame wrapper, i.e. the scaled page card,
|
|
552
|
-
so x=0/y=0 is the page's top-left corner. overflow stays visible: a ring
|
|
553
|
-
at the page boundary or a label straddling the top border extends past
|
|
554
|
-
the card and must not clip. pointer-events:none so clicks pass through to
|
|
555
|
-
the iframe underneath.
|
|
556
|
-
|
|
557
|
-
Positioning contract: chrome.ts measures a target in the FRAME document
|
|
558
|
-
(layout truth — that document never scales or scrolls) and writes the
|
|
559
|
-
rect as custom properties on the ring/label; the formulas here scale it
|
|
560
|
-
into host space. Keeping the formula in the stylesheet and the data in
|
|
561
|
-
properties is what lets a transitioned --we-scale move every ring in
|
|
562
|
-
lockstep with the iframe's own animated transform. The ring's offset
|
|
563
|
-
(its inflation past the target's edge) stays OUTSIDE the multiplication:
|
|
564
|
-
constant host px at any zoom.
|
|
565
|
-
|
|
566
|
-
z-index 3 -- one step above the page card, and nothing more: the frame's
|
|
567
|
-
isolate is what keeps the chrome under the host's own UI, so a large
|
|
568
|
-
value here would buy nothing and read as an escape hatch.
|
|
569
|
-
|
|
570
|
-
A CLASS, not an id: every frame on the stage carries one of these, and the
|
|
571
|
-
chrome functions are handed the overlay rather than resolving it by
|
|
572
|
-
document-global id. */
|
|
573
|
-
.we-chrome-overlay {
|
|
574
|
-
position: absolute;
|
|
575
|
-
inset: 0;
|
|
576
|
-
pointer-events: none;
|
|
577
|
-
z-index: 3;
|
|
578
|
-
}
|
|
579
|
-
.we-chrome-ring {
|
|
580
|
-
position: absolute;
|
|
581
|
-
pointer-events: none;
|
|
582
|
-
border: 2px solid transparent;
|
|
583
|
-
border-radius: 6px;
|
|
584
|
-
opacity: 0;
|
|
585
|
-
box-sizing: border-box;
|
|
586
|
-
top: calc(var(--we-r-top, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
587
|
-
left: calc(var(--we-r-left, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
588
|
-
width: calc(var(--we-r-w, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
589
|
-
height: calc(var(--we-r-h, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
590
|
-
}
|
|
591
|
-
/* Hover ring -- instant on cursor arrival, fades out on leave.
|
|
592
|
-
Position updates instantly (no top/left transition) so dragging
|
|
593
|
-
across elements never flickers. Ink stroke + white drop-shadow
|
|
594
|
-
halo keeps the ring readable on both light sections and dark ones. */
|
|
595
|
-
.we-chrome-ring--hover {
|
|
596
|
-
border-color: rgba(15,42,34,0.85);
|
|
597
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
598
|
-
transition: opacity 70ms ease-in;
|
|
599
|
-
}
|
|
600
|
-
.we-chrome-ring--hover[data-active="true"] {
|
|
601
|
-
opacity: 1;
|
|
602
|
-
transition: opacity 100ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
603
|
-
}
|
|
604
|
-
/* Selection ring -- appears instantly (continuous with hover),
|
|
605
|
-
then morphs ink → gold. No position transition so resize
|
|
606
|
-
tracking stays tight. Same ink + white halo as hover. */
|
|
607
|
-
.we-chrome-ring--selection {
|
|
608
|
-
border-color: rgba(15,42,34,0.85);
|
|
609
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
610
|
-
transform: scale(1);
|
|
611
|
-
box-shadow: none;
|
|
612
|
-
transition:
|
|
613
|
-
opacity 50ms ease-in,
|
|
614
|
-
border-color 160ms cubic-bezier(0.2, 0, 0, 1),
|
|
615
|
-
box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
|
|
616
|
-
}
|
|
617
|
-
.we-chrome-ring--selection[data-active="true"] {
|
|
618
|
-
opacity: 1;
|
|
619
|
-
/* Instant show on select; only border + glow animate */
|
|
620
|
-
transition:
|
|
621
|
-
opacity 0ms,
|
|
622
|
-
border-color 180ms cubic-bezier(0.2, 0, 0, 1),
|
|
623
|
-
box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
|
|
624
|
-
}
|
|
625
|
-
.we-chrome-ring--selection[data-kind="section"],
|
|
626
|
-
.we-chrome-ring--selection[data-kind="slot"] {
|
|
627
|
-
border-color: #E5B832;
|
|
628
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
629
|
-
box-shadow: 0 0 0 1px rgba(229,184,50,0.25), 0 8px 24px -10px rgba(229,184,50,0.35);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/* Geometry guides -- the trim line and the bleed region for a rendered-class
|
|
633
|
-
page. The overlay is the page (bleed) box exactly, so insetting all four
|
|
634
|
-
sides by the declared bleed gives the trim box with no arithmetic: the
|
|
635
|
-
border draws the trim line and the shadow's spread fills the band between
|
|
636
|
-
trim and page edge. Data/formula split as for the rings — guides.ts writes
|
|
637
|
-
--we-g-bleed in frame space, the multiplication happens here, so a
|
|
638
|
-
transitioned zoom moves the guides with the card. The 1px line itself
|
|
639
|
-
stays OUTSIDE the multiplication: constant host px at any zoom, like the
|
|
640
|
-
ring's offset.
|
|
641
|
-
|
|
642
|
-
Magenta rather than the chrome's ink/gold: a guide is an instrument about
|
|
643
|
-
the artifact, never a selection, and the print convention reads instantly.
|
|
644
|
-
The inset white hairline keeps the line legible over dark artwork, the
|
|
645
|
-
role the rings' drop-shadow halo plays for them. First child of the
|
|
646
|
-
overlay, so rings and the title pill paint above it. */
|
|
647
|
-
.we-guide {
|
|
648
|
-
position: absolute;
|
|
649
|
-
box-sizing: border-box;
|
|
650
|
-
pointer-events: none;
|
|
651
|
-
opacity: 0;
|
|
652
|
-
top: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
653
|
-
right: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
654
|
-
bottom: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
655
|
-
left: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
656
|
-
border: 1px solid rgba(214,32,140,0.9);
|
|
657
|
-
box-shadow:
|
|
658
|
-
inset 0 0 0 1px rgba(255,255,255,0.55),
|
|
659
|
-
0 0 0 calc(var(--we-g-bleed, 0px) * var(--we-scale, 1)) rgba(214,32,140,0.16);
|
|
660
|
-
transition: opacity 90ms ease-in;
|
|
661
|
-
}
|
|
662
|
-
.we-guide[data-active="true"] { opacity: 1; }
|
|
663
|
-
|
|
664
|
-
/* Section title pill -- straddles the selection's top border; geometry set
|
|
665
|
-
by chrome.ts as custom properties, same contract as the rings. The left
|
|
666
|
-
indent is constant host px. Sections only; slots get the outline ring but
|
|
667
|
-
no on-canvas label. */
|
|
668
|
-
.we-chrome-label {
|
|
669
|
-
position: absolute;
|
|
670
|
-
top: calc(var(--we-l-top, 0px) * var(--we-scale, 1));
|
|
671
|
-
left: calc(var(--we-l-left, 0px) * var(--we-scale, 1) + var(--we-l-indent, 0px));
|
|
672
|
-
pointer-events: none;
|
|
673
|
-
z-index: 1;
|
|
674
|
-
background: rgba(229,184,50,0.95);
|
|
675
|
-
color: #282c32;
|
|
676
|
-
padding: 3px 8px;
|
|
677
|
-
border-radius: 4px;
|
|
678
|
-
font-size: 10.5px;
|
|
679
|
-
font-weight: 600;
|
|
680
|
-
line-height: 1;
|
|
681
|
-
white-space: nowrap;
|
|
682
|
-
opacity: 0;
|
|
683
|
-
transform: translateY(calc(-50% - 4px)) scale(0.96);
|
|
684
|
-
transition:
|
|
685
|
-
opacity 60ms ease-in,
|
|
686
|
-
transform 60ms ease-in;
|
|
687
|
-
}
|
|
688
|
-
.we-chrome-label[data-active="true"] {
|
|
689
|
-
opacity: 1;
|
|
690
|
-
transform: translateY(-50%) scale(1);
|
|
691
|
-
transition:
|
|
692
|
-
opacity 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms,
|
|
693
|
-
transform 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/* Hidden-section edge tabs -------------------------------------
|
|
697
|
-
One dim chip-tab per hidden section, pinned to the page card's left edge
|
|
698
|
-
at the collapsed wrapper's reflow seam. Built + positioned by the host
|
|
699
|
-
orchestrator; de-collided via placeTabs. Constant visual size at any zoom
|
|
700
|
-
— the layer sits outside the scaled iframe. --we-content is the host's
|
|
701
|
-
interior scaling unit (its large-screen chrome scale); a host without one
|
|
702
|
-
leaves the 1px fallback in force. A class for the same reason the overlay
|
|
703
|
-
is one: one tab layer per frame, addressed through that frame's handle. */
|
|
704
|
-
.we-htabs {
|
|
705
|
-
position: absolute;
|
|
706
|
-
inset: 0;
|
|
707
|
-
pointer-events: none;
|
|
708
|
-
z-index: 1;
|
|
709
|
-
}
|
|
710
|
-
.we-htab {
|
|
711
|
-
position: absolute;
|
|
712
|
-
transform: translateY(-50%);
|
|
713
|
-
display: flex;
|
|
714
|
-
align-items: center;
|
|
715
|
-
gap: calc(9 * var(--we-content, 1px));
|
|
716
|
-
height: calc(34 * var(--we-content, 1px));
|
|
717
|
-
padding: 0 calc(${12+a_} * var(--we-content, 1px)) 0 calc(13 * var(--we-content, 1px));
|
|
718
|
-
background: #ffffff;
|
|
719
|
-
border: 1px solid #ebebe6;
|
|
720
|
-
border-radius: calc(9 * var(--we-content, 1px)) 0 0 calc(9 * var(--we-content, 1px));
|
|
721
|
-
box-shadow: 0 10px 24px -12px rgba(20,18,13,0.34);
|
|
722
|
-
color: #4a4842;
|
|
723
|
-
font: inherit;
|
|
724
|
-
cursor: pointer;
|
|
725
|
-
opacity: 1;
|
|
726
|
-
pointer-events: auto;
|
|
727
|
-
transition: transform 0.2s cubic-bezier(0.2,0.7,0.3,1),
|
|
728
|
-
border-color 0.18s, box-shadow 0.18s;
|
|
729
|
-
}
|
|
730
|
-
.we-htab-eye {
|
|
731
|
-
display: grid;
|
|
732
|
-
place-items: center;
|
|
733
|
-
flex: 0 0 auto;
|
|
734
|
-
color: #8a877e;
|
|
735
|
-
transition: color 0.18s;
|
|
736
|
-
}
|
|
737
|
-
.we-htab-eye svg { width: calc(14 * var(--we-content, 1px)); height: calc(14 * var(--we-content, 1px)); }
|
|
738
|
-
.we-htab-name {
|
|
739
|
-
font-size: calc(13 * var(--we-content, 1px));
|
|
740
|
-
font-weight: 600;
|
|
741
|
-
letter-spacing: -0.01em;
|
|
742
|
-
color: #14180F;
|
|
743
|
-
white-space: nowrap;
|
|
744
|
-
}
|
|
745
|
-
.we-htab:hover {
|
|
746
|
-
transform: translateY(-50%) scale(1.07);
|
|
747
|
-
border-color: rgba(15,42,34,0.5);
|
|
748
|
-
box-shadow: 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
749
|
-
}
|
|
750
|
-
.we-htab:hover .we-htab-eye { color: #0F2A22; }
|
|
751
|
-
.we-htab:focus-visible {
|
|
752
|
-
outline: none;
|
|
753
|
-
transform: translateY(-50%) scale(1.07);
|
|
754
|
-
border-color: #0F2A22;
|
|
755
|
-
box-shadow: 0 0 0 3px #F3F6EF, 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
756
|
-
}
|
|
757
|
-
/* Hover/focus swaps the eye-off glyph to the eye glyph in place — no width
|
|
758
|
-
change, no sliding label. Only one glyph is in flow at a time, so the eye
|
|
759
|
-
slot's grid keeps the shown glyph centered. */
|
|
760
|
-
.we-htab-eye-on { display: none; }
|
|
761
|
-
.we-htab:hover .we-htab-eye-off,
|
|
762
|
-
.we-htab:focus-visible .we-htab-eye-off { display: none; }
|
|
763
|
-
.we-htab:hover .we-htab-eye-on,
|
|
764
|
-
.we-htab:focus-visible .we-htab-eye-on { display: block; }
|
|
765
|
-
|
|
766
|
-
@media (prefers-reduced-motion: reduce) {
|
|
767
|
-
.we-canvas-stage,
|
|
768
|
-
.we-canvas-frame > iframe,
|
|
769
|
-
.we-chrome-ring,
|
|
770
|
-
.we-chrome-label,
|
|
771
|
-
.we-guide,
|
|
772
|
-
.we-htab,
|
|
773
|
-
.we-frame-toggle {
|
|
774
|
-
transition: none !important;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
`,XC='<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>',ud="we-canvas-frame",Xx="we-frame-titlebar",Zx="we-canvas-frame-label",Wx="we-htabs",Jx="we-chrome-overlay";function Um(e,t,a){const r=e.querySelector(t);if(r)return r;const s=a();return e.appendChild(s),s}function ZC(e,t){const a=e.querySelector(`:scope > .${Xx}`);if(a)return a;const r=t.createElement("div");return r.className=Xx,e.insertBefore(r,e.firstChild),r}function WC(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.classList.contains(ud))return t;return null}function JC(e,t){const a=e.ownerDocument,r=ZC(e,a),s=t.label??"",c=r.querySelector(`:scope > .${Zx}`);if(s==="")c==null||c.remove();else{const v=c??r.insertBefore(a.createElement("div"),r.firstChild);v.className=Zx,v.textContent!==s&&(v.textContent=s)}const u=Um(e,":scope > iframe",()=>a.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=Um(e,`:scope > .${Wx}`,()=>{const v=a.createElement("div");return v.className=Wx,v}),p=Um(e,`:scope > .${Jx}`,()=>{const v=a.createElement("div");return v.className=Jx,v.setAttribute("aria-hidden","true"),v});p.childElementCount===0&&(p.innerHTML=XC);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 e5(e,t,a){const{iframe:r}=a;return{key:t,wrapper:e,iframe:r,overlay:a.overlay,tabLayer:a.tabLayer,get doc(){return r.contentDocument},setPageHeight(s){e.style.setProperty("--we-page-h",`${s}px`)}}}function t5(e,t){const a=e.ownerDocument,r=new Map;for(const p of Array.from(e.querySelectorAll(`:scope > .${ud}`))){const g=p.dataset.frameKey;g!==void 0&&r.set(g,p)}const s=[],c=[],u=new Set;for(const p of t){let g=r.get(p.key);g||(g=a.createElement("div"),g.className=ud,g.dataset.frameKey=p.key);const v=JC(g,p);s.push(g),u.add(p.key),c.push(e5(g,p.key,v))}let m=null;for(let p=s.length-1;p>=0;p--){const g=s[p];g&&((g.parentNode!==e||WC(g)!==m)&&e.insertBefore(g,m),m=g)}return r.forEach((p,g)=>{u.has(g)||p.remove()}),t.some(p=>(p.label??"")!=="")?e.style.setProperty("--we-frame-label-lane",`${YC}px`):e.style.removeProperty("--we-frame-label-lane"),c}function n5(e,t,a){const r=[];for(const s of e){const c=s.doc;if(!c)continue;const u=t.resolveSelectionEls(c,a);u.length>0&&r.push({handle:s,els:u})}return r}function i5(e,t){const a=e==null?void 0:e.querySelector(":scope > .we-guide");if(a){if(t===null){a.removeAttribute("data-active");return}a.style.setProperty("--we-g-bleed",`${t}px`),a.setAttribute("data-active","true")}}const a5=24;function r5(e,t,a,r){if(e.height+2*r<=t)return e.top>=r&&e.bottom<=t-r?null:e.top<r?Math.max(0,a+e.top-r):Math.max(0,a+e.bottom-(t-r));const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function o5(e,t,a,r){const s=t+e.top*a-r,c=e.height*a;return{top:s,bottom:s+c,height:c}}const ew="__trEditorBridge",s5=1,r_=new WeakMap;function l5(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 c5(e){const t=e[ew];if(t)return t;const a=new Set,r={protocol:s5,selection:null,subscribe(s){return a.add(s),()=>{a.delete(s)}}};return r_.set(r,a),e[ew]=r,r}function u5(e,t,a){if(!e||!t)return;const s=c5(e);s.selection=l5(a);for(const c of[...r_.get(s)??[]])c()}const d5=6,jr=12,f5=288,h5='[aria-modal="true"]';function cs(e){var c;const t=window.innerWidth,a=window.innerHeight,r=(c=e.closest(h5))==null?void 0:c.getBoundingClientRect(),s=r?{top:Math.max(0,r.top),left:Math.max(0,r.left),right:Math.min(t,r.right),bottom:Math.min(a,r.bottom)}:{top:0,left:0,right:t,bottom:a};return{rect:e.getBoundingClientRect(),bounds:s,viewportHeight:a,viewportWidth:t}}function cc({rect:e,bounds:t,viewportHeight:a},{maxHeight:r=f5,minWidth:s=0,gap:c=d5,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-jr,p=e.top-t.top-c-jr,g=u??Math.min(r,220),v=m<g&&p>m,w=Math.max(0,Math.min(r,v?p:m)),_=Math.max(t.left+jr,Math.min(e.left,t.right-Math.max(e.width,s)-jr)),E={left:_,width:e.width,maxWidth:Math.max(e.width,s,t.right-_-jr),maxHeight:w};return v?{...E,bottom:a-e.top+c}:{...E,top:e.bottom+c}}const o_=Symbol.for("@homepages/concrete:row:of"),s_=Symbol.for("@homepages/concrete:element:of");function jg(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&qn(e.of)}function m5(e,t){return e===t||Gt(e)&&Gt(t)&&e.key===t.key}function l_(e,t){const a=[...e];for(const r of t??[])a.some(s=>m5(s,r))||a.push(r);return a}function vs(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function c_(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function uc(e){if(!c_(e))return;const t=e[o_];return typeof t=="object"&&t!==null?t:void 0}function Pa(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function p5(e){if(!Pa(e))return;const t=e[s_];return typeof t=="object"&&t!==null?t:void 0}function Gt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function g5(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&qn(e.declaration)}function qn(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function Im(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};const a=t;if(e.requires===void 0)return{kind:"compute",fn:a,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:a,reads:l_(e.reads,e.requires),requires:[...e.requires]}}function Va(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function Og(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function y5(e){return Og(e.source)}const b5="written-without-pick-none",v5={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function Ag(e,t){const a=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${a}: \`brief\` is required — it is the whole instruction the model is given.`);const r=v5[e],s={kind:"fill",verb:e};for(const[u,m]of Object.entries(t)){if(!r.has(u)){const p=u==="none"&&e==="pick"?` A pick judges every candidate, so selecting none is already an outcome its brief steers — \`concrete upgrade\` drops \`none\` from every \`fill.pick\` (the \`${b5}\` codemod).`:u==="count"?" A fill takes no count: the list's own `min` and `max` bound how many items it fills.":u==="cap"?" A write's budget is its holder's `cap` — a text slot's own, or a list's `item: text.short({ cap })`.":u==="of"&&e==="find"?" A find names no candidates: the platform's lookup for its holder's kind supplies the value.":u==="of"&&e==="pick"?" A pick chooses from its holder's candidates — a select's values, a media slot's `from` list of its kinds, a row's table, a list's item's.":u==="of"?" The kind a write produces is its holder's — a text slot's own, a list's `item`, a label's text slot.":"";throw new Error(`${a}: "${u}" is not an option — it takes ${[...r].map(g=>`\`${g}\``).join(", ")}, and everything the model should know goes in the brief.${p}`)}if(u==="none"&&m!==void 0&&m!==!0)throw new Error(`${a}: \`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(`${a}: \`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(`${a}: \`requires\` names at least one read — omit it when the fill needs none.`);m!==void 0&&(s[u]=u==="reads"||u==="requires"?[...m]:m)}const c=s.requires;return c!==void 0&&(s.reads=l_(s.reads??[],c)),s}function x5(e){return Ag("write",e)}function w5(e){return Ag("pick",e)}function k5(e){return Ag("find",e)}const ji={write:x5,pick:w5,find:k5};function Qa(e,t){if(Fr(e))return[e];if(!Array.isArray(e)||!e.every(s=>typeof s=="object"&&s!==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 a=e.filter(s=>!Fr(s)).length;if(a===0)return e;const r=a<e.length?"a derivation beside a fill":a>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${r} — \`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 Ud(e){return Fr(e)||Array.isArray(e)&&e.length>0&&e.every(Fr)}function Fr(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 Ng=Symbol.for("@homepages/concrete:fill:declaration");function _5(e){return Ud(e)?{[Ng]:Fr(e)?[e]:[...e]}:{}}function Wr(e){if(!(typeof e!="object"||e===null))return e[Ng]}const S5=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],tw=["id","slot","index","def","value","present","enclosing"],Jr=["image","video","tour","document"];function gn(e){return Jr.includes(e)}function xs(e){return e==="media"||gn(e)}const Xa={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:{}}},u_=Object.keys(Xa),E5=u_.filter(e=>Xa[e].site==="holder");u_.filter(e=>Xa[e].site==="kind");function j5(e){return typeof e=="string"&&Object.hasOwn(Xa,e)}function d_(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const{kind:t,verb:a}=e;return t==="process"&&j5(a)?e:null}function Mg(e){const t=Xa[e.verb],a=Object.keys(t.options),r=a.length>0?`it takes ${a.map(s=>`\`${s}\``).join(", ")}`:"it takes none";for(const[s,c]of Object.entries(e)){if(s==="kind"||s==="verb"||c===void 0)continue;if(s==="reads")return`\`${e.verb}\` takes no \`reads\` — a process is about one asset, never the property`;const u=t.options[s];if(u===void 0){const m=s==="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 "${s}" — ${r}${m}`}if(u.values!==void 0){if(typeof c!="string"||!u.values.includes(c))return`\`${e.verb}\`'s \`${s}\` is one of ${u.values.map(m=>`"${m}"`).join(", ")}`;continue}if(typeof c!==u.type||typeof c=="string"&&c.trim()==="")return`\`${e.verb}\`'s \`${s}\` is a non-empty ${u.type}`}for(const[s,c]of Object.entries(t.options))if(c.required&&e[s]===void 0)return`\`${e.verb}\` requires \`${s}\``;return null}function Ga(e){const{type:t,kinds:a}=e;if(t==="media"){const r=Array.isArray(a)?a.filter(s=>typeof s=="string"&&gn(s)):[];return r.length>0?r:Jr}return typeof t=="string"&&gn(t)?[t]:[]}function f_(e){const{kinds:t,process:a}=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"&&gn(c)))return`declares \`kinds\` ${JSON.stringify(t)} — a non-empty list of ${Jr.join(", ")}`}if(a===void 0)return null;const r=E5.map(c=>`process.${c}()`).join(", ");if(!Array.isArray(a)||a.length===0)return`declares \`process\` ${JSON.stringify(a)} — a non-empty list of processes (${r})`;const s=new Set;for(const c of a){const u=d_(c);if(u===null)return`processes ${JSON.stringify(c)}, which is no process (${r})`;const{verb:m}=u,p=Xa[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(s.has(m))return`processes "${m}" twice — a holder declares each process once`;s.add(m);const g=Mg(u);if(g!==null)return`processes "${m}" with options that do not fit: ${g}`;const v=Ga(e).filter(b=>!p.kinds.includes(b));if(v.length>0)return`processes "${m}", which applies to ${p.kinds.join(", ")} and not to ${v.join(", ")}`}return null}const O5=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 h_(e){const t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":O5.has(t)?"document":null}function m_(e){const t=dc(e);if(t===null)return null;const a=Za[t].kind;return a==="tour"||a==="video"?a:null}const A5=["name","title","org_name","email","phone","website","instagram","linkedin","x","facebook","headshot","logo_dark","logo_light"],N5=["headshot","logo_dark","logo_light"],p_={property:{latitude:"lat",longitude:"lon"},contact:{address:"contact_address"}},M5={address:{role:"bindable",container:"property",value_type:"text",fields:{display:{value_type:"text"},street:{value_type:"text"},street_no_type:{value_type:"text"},city:{value_type:"text"},state:{value_type:"text"},postal:{value_type:"text"},unit:{value_type:"text"}}},address_street:{role:"bindable",container:"property",value_type:"text"},address_unit:{role:"bindable",container:"property",value_type:"text"},address_city:{role:"bindable",container:"property",value_type:"text"},address_state:{role:"bindable",container:"property",value_type:"text"},address_postal:{role:"bindable",container:"property",value_type:"text"},listing_intent:{role:"bindable",container:"property",value_type:"text",writeback:{kind:"property",column:"listing_intent"}},lat:{role:"bindable",container:"property",value_type:"number"},lon:{role:"bindable",container:"property",value_type:"number"}},g_={units:{role:"bindable",container:"property",value_type:"unit_list",row:{unit_id:{path:"unit_id",value_type:"text"},position:{path:"position",value_type:"number"},floor_plans:{path:"floor_plans",value_type:"image_list",row:{id:{value_type:"text"},floor_label:{value_type:"text"},position:{value_type:"number"}}},unit_label:{path:"unit_label",value_type:"text",primary:!0,writeback:{column:"unit_label"}},beds:{path:"beds",value_type:"number",primary:!0,writeback:{column:"beds"}},baths:{path:"baths",value_type:"number",primary:!0,writeback:{column:"baths"}},sqft:{path:"sqft",value_type:"number",primary:!0,writeback:{column:"sqft"}},price:{path:"price",value_type:"text",primary:!0,writeback:{column:"price"}}}},comparables:{role:"bindable",container:"property",value_type:"comparable_list",row:{id:{path:"id",value_type:"text"},address_street:{path:"address_street",value_type:"text"},address_city:{path:"address_city",value_type:"text"},address_state:{path:"address_state",value_type:"text"},address_postal:{path:"address_postal",value_type:"text"},address:{path:"address",value_type:"text"},lat:{path:"lat",value_type:"number"},lng:{path:"lng",value_type:"number"},distance_m:{path:"distance_m",value_type:"number"},status:{path:"status",value_type:"text"},price:{path:"price",value_type:"number",writeback:{column:"price"}},price_period:{path:"price_period",value_type:"text"},sale_date:{path:"sale_date",value_type:"text",writeback:{column:"sale_date"}},beds:{path:"beds",value_type:"number",writeback:{column:"beds"}},baths:{path:"baths",value_type:"number",writeback:{column:"baths"}},sqft:{path:"sqft",value_type:"number",writeback:{column:"sqft"}},photo:{path:"photo_upload_id",value_type:"image"},year_built:{path:"year_built",value_type:"number"},lot_sqft:{path:"lot_sqft",value_type:"number"},stories:{path:"stories",value_type:"number"},units:{path:"units",value_type:"number"},hoa_monthly:{path:"hoa_monthly",value_type:"number"},list_price:{path:"list_price",value_type:"number"},listed_date:{path:"listed_date",value_type:"text"},mls_number:{path:"mls_number",value_type:"text"},description:{path:"description",value_type:"text"}}},contacts:{role:"bindable",container:"property",value_type:"contact_list",row:{id:{path:"id",value_type:"text"},primary:{path:"primary",value_type:"boolean"},name:{path:"name",value_type:"text",primary:!0,writeback:{column:"name"}},title:{path:"title",value_type:"text",primary:!0,writeback:{column:"title"}},org_name:{path:"org_name",value_type:"text",primary:!0,writeback:{column:"org_name"}},bio:{path:"bio",value_type:"text",primary:!0,writeback:{column:"bio"}},address:{path:"address",value_type:"text",primary:!0},email:{path:"email",value_type:"text",primary:!0,writeback:{column:"email"}},phone:{path:"phone",value_type:"text",primary:!0,writeback:{column:"phone"}},website:{path:"website_url",value_type:"text",primary:!0,writeback:{column:"website"}},instagram:{path:"instagram_url",value_type:"text",primary:!0,writeback:{column:"socials.instagram"}},linkedin:{path:"linkedin_url",value_type:"text",primary:!0,writeback:{column:"socials.linkedin"}},x:{path:"x_url",value_type:"text",primary:!0,writeback:{column:"socials.x"}},facebook:{path:"facebook_url",value_type:"text",primary:!0,writeback:{column:"socials.facebook"}},headshot:{path:"avatar_upload_id",value_type:"image",primary:!0},logo_dark:{path:"logo_dark_upload_id",value_type:"image",primary:!0},logo_light:{path:"logo_light_upload_id",value_type:"image",primary:!0}}}},y_={description:{role:"readable",path:"narrative.description",value_type:"text"},unit:{role:"readable",path:"units",value_type:"row",primary_of:"units"},contact:{role:"readable",path:"contacts",value_type:"row",primary_of:"contacts"}};function nw(e){const t=g_[y_[e].primary_of],a=p_[e]??{},r={};for(const[s,c]of Object.entries(t.row)){if(c.primary!==!0)continue;const u={role:"bindable",container:e,value_type:c.value_type};c.value_type==="image"&&(u.image=!0),c.writeback!==void 0&&(u.writeback=e==="unit"?{kind:"unit",column:c.writeback.column}:{kind:"contact",field:c.writeback.column}),r[a[s]??s]=u}return r}function C5(){return{...M5,...nw("unit"),...g_,...nw("contact"),...y_}}const ea=C5();function R5(e){const t={};for(const[a,r]of Object.entries(e)){if(r.role!=="bindable")continue;const s={container:r.container,value_type:r.value_type};r.image===!0&&(s.image=!0),r.writeback!==void 0&&(s.writeback=r.writeback),t[a]=s}return t}const pp=R5(ea),eo={units:{idKey:"unit_id",ownership:"property"},contacts:{idKey:"id",cap:12,min:1,ownership:"library"},comparables:{idKey:"id",ownership:"property"}},Pr={units:"property.units",contacts:"property.contacts",comparables:"property.comparables",commercial_spaces:"property.commercial_spaces"},b_={contacts:"library.contacts"};function Vr(e){return Object.hasOwn(eo,e)}const iw=Object.fromEntries([...Object.entries(Pr),...Object.entries(b_)].map(([e,t])=>[t,e]));function qt(e){if(typeof e!="string")return null;if(Object.hasOwn(eo,e))return{table:e,reading:"legacy"};const t=Object.hasOwn(iw,e)?iw[e]:void 0;return t===void 0?null:{table:t,reading:"registry"}}function Cg(e){return(e==null?void 0:e.kind)==="home"?qt(e.key):null}function T5(e,t){var r;return((r=ea[e].row[t])==null?void 0:r.writeback)??null}function D5(e,t){const a=ea[e].row;return Object.hasOwn(a,t)?a[t]??null:null}const L5=["tour","video","social","listing","file","map"],Za={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 dc(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(const[a,r]of Object.entries(Za))if(r.pattern.test(t.hostname)&&!(r.path&&!r.path.test(t.pathname)))return a;return null}function z5(e,t){const a=dc(t);return a===null?!1:a===e?!0:L5.includes(e)&&Za[a].kind===e}const $5=new Set(Jr.filter(e=>Object.values(Za).some(t=>t.kind===e)));function Rg(e){return e.filter(t=>$5.has(t))}function v_(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 U5(e){return typeof e=="string"&&/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(e)}function I5(e){if(typeof e!="string"||!/^\+?[\d\s().-]+$/.test(e))return!1;const t=e.replace(/\D/g,"").length;return t>=7&&t<=15}function B5(e){try{return new URL(e)}catch{return null}}function Ll(e){const t=e.trim();return t&&(/^https?:\/\//i.test(t)?t:`https://${t}`)}function Tg(e){const t=B5(e);if(t===null||t.protocol!=="http:"&&t.protocol!=="https:"||t.username!==""||t.password!=="")return!1;const a=t.hostname;return a.includes(".")&&!a.startsWith(".")&&!a.endsWith(".")}function H5(e){const t=e.trim();if(!t)return null;const a=dc(t);if(a==="matterport"){const r=new URL(t).searchParams.get("m");return r!==null&&/^[A-Za-z0-9]+$/.test(r)?`https://my.matterport.com/show/?m=${r}&nt=1`:null}return a!==null&&q5.has(a)?t:null}const q5=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);function x_(e,t){return[e,t].map(a=>(a??"").trim()).filter(a=>a!=="").join(", ")}const F5=["autocomplete","manual_pinned","resolved"],w_=["street","unit","city","state","postal"],Dg=[...w_,"latitude","longitude"];function Id(e){return Dg.includes(e)}function Ol(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function aw(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function _i(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,a=aw(t.latitude,90),r=aw(t.longitude,180),s=a!==null&&r!==null,c=t.source,u={street:Ol(t.street),unit:Ol(t.unit),city:Ol(t.city),state:Ol(t.state),postal:Ol(t.postal),latitude:s?a:null,longitude:s?r:null,source:typeof c=="string"&&F5.includes(c)?c:null};return s||w_.some(m=>u[m]!==null)?u:null}function Lg(e){var t;return((t=/^\s*(\d{5})-?\d{4}\s*$/.exec(e))==null?void 0:t[1])??e}function P5(e){const t=x_(e.street,e.unit),a=[e.state,e.postal===null?null:Lg(e.postal)].filter(s=>s!==null).join(" "),r=[t,e.city??"",a].filter(s=>s!=="").join(", ");return r===""?null:r}function V5(e,t){const a=_i(e);return a===null?null:a[t]}const k_=["crop","cutout","mask_white","mask_black"],G5=["master","crop","cutout","mask_white","mask_black","poster","encode"];function Bd(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function K5(e,t=e){return{id:t,file:e,crop:null,name:null,renditions:{crop:null,cutout:null,mask_white:null,mask_black:null}}}function Y5(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 Q5(e,t){const{id:a,renditions:r,...s}=e,c=e.kind==="image";return{...s,id:t.id,file:t.file,crop:c?t.crop:null,name:t.name!==null&&t.name!==""?t.name:Y5(e),renditions:{...r,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 X5(e){const{id:t,file:a,crop:r,name:s,renditions:c,...u}=e,{crop:m,cutout:p,mask_white:g,mask_black:v,...b}=c;return{file:{...u,id:a,renditions:b},value:{id:t,file:a,crop:r,name:s,renditions:{crop:m,cutout:p,mask_white:g,mask_black:v}}}}function zg(e,t){return Q5(e,t)}function Z5(e){return e.url===null?"upload":"link"}function Si(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function $g(e){if(!Si(e))return!1;const{id:t,kind:a,renditions:r}=e;return typeof t=="string"&&typeof a=="string"&&gn(a)&&Si(r)}function Hd(e){return Si(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Si(e.renditions)&&!("kind"in e)}function W5(e){return Si(e)&&typeof e.file=="string"&&"picked"in e&&Si(e.renditions)&&!("id"in e)}function ws(e){return Si(e)&&typeof e.media=="string"&&e.media!==""}function J5(e){const t=e.asset_id;return typeof t=="string"&&t!==""?t:void 0}function Wi(e){if(Si(e))return ws(e)?e.media:Hd(e)||$g(e)?e.id:W5(e)?e.picked??e.file:J5(e)}function gp(e,t){if(Array.isArray(e))for(const a of e)gp(a,t);else if(Hd(e))t.has(e.id)||t.set(e.id,e);else if(Si(e)&&!$g(e))for(const a of Object.values(e))gp(a,t)}function qd(e){const t=new Map;for(const[a,r]of Object.entries(e))a!=="files"&&gp(r,t);return t}function e4(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function t4(e,t){const a=Object.hasOwn(t,"crop"),r=t.renditions??{},s=a?null:e.renditions,c=Object.fromEntries(k_.map(u=>[u,Object.hasOwn(r,u)?r[u]??null:(s==null?void 0:s[u])??null]));return{crop:a?t.crop??null:e.crop,renditions:c}}function Ug(e,t){return e4(t)?{...e,...t4({crop:e.crop,renditions:e.renditions},t)}:e}function dd(e){if(Array.isArray(e))return e.map(dd);if(!Si(e))return e;if($g(e)||Hd(e))return{asset_id:e.id};if(ws(e))return{asset_id:e.media};const t={};for(const[a,r]of Object.entries(e))t[a]=dd(r);return t}const fd="property.uploads";function fc(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 hd(e){const t=Ga(e);if(t.length===0)return null;const a=fc(e.from);return a===void 0?{kinds:t}:{kinds:t,from:a}}function ql(e){return{kinds:e.kinds,from:fc(e.from)??[fd]}}function __(e){return ql(e).from[0]}function yp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function n4(e){if(Wi(e)!==void 0||!yp(e))return e;for(const t of Object.values(e))if(Wi(t)!==void 0)return t}function S_(e,t){const[a,...r]=t.split(".");if(a!=="property"||r.length===0)return null;let s=e;for(const c of r)if(s=Array.isArray(s)?s.find(u=>yp(u)&&u.id===c):yp(s)&&Object.hasOwn(s,c)?s[c]:void 0,s===void 0)return null;return Array.isArray(s)?s.flatMap(c=>{const u=n4(c),m=Wi(u);return m===void 0?[]:[{id:m,value:u}]}):null}function i4(e,t){const a=qd(e),r=new Set,s=[];for(const c of fc(t.from)??[])for(const{id:u,value:m}of S_(e,c)??[]){if(r.has(u))continue;const p=a.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;r.add(u);const v=ws(m)?Ug(p,m):p;s.push({id:u,value:v,file:g,list:c})}return s}function a4(e,t){const a={uploads:(e[fd]??t.map(r=>r.id)).map(r=>K5(r))};for(const[r,s]of Object.entries(e)){const[c,u,...m]=r.split(".");if(c!=="property"||u===void 0||m.length>0)throw new Error(`media candidates: "${r}" names no top-level property list`);r!==fd&&(a[u]=s.map(p=>({media:p})))}return{...a,files:Object.fromEntries(t.map(r=>[r.id,r]))}}function r4(e,t){const a=new Map(t.map(c=>[c.id,X5(c)])),r=a4(e,[...a.values()].map(({file:c})=>c)),s=r.uploads.map(c=>{var u;return((u=a.get(c.id))==null?void 0:u.value)??c});return{...r,uploads:s}}function o4(e){if(e===null||typeof e!="object")return null;const t=e;return t.type!=="media"||t.kinds===void 0||f_({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&(!Array.isArray(t.from)||fc(t.from)===void 0)?null:hd(t)}function s4(e,t){const a=new Set(e),r=t.filter(u=>a.has(u)),s=new Set(r);let c=0;return e.map(u=>s.has(u)?r[c++]:u)}const E_=new Map;function j_(e){E_.set(e.home,e)}function l4(e){const t=E_.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 O_=new Set(["text","select","email","phone","url","date"]);function to(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return c4(e.element);default:return O_.has(e.type)?"text":null}}function c4(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":O_.has(e.type)?"text_list":null}function bp(e){if(e.type==="list"){const a=e.element;if(a.type!=="object")return bp(a);for(const r of Object.values(a.fields)){const s=bp(r);if(s!==void 0)return s}return}const t=e.from===void 0?null:hd(e);return(t==null?void 0:t.from)===void 0?void 0:t}function u4(e){if(e.type!=="list")return!1;const t=e.element.type;return gn(t)||t==="media"}function d4(e){return Object.entries(e.pages).flatMap(([t,a])=>u4(a.declaration)?[`${e.home}.${t}`]:[])}function f4(e){return Og(e.source)}const rw=new WeakMap;function A_(e){let t=rw.get(e);return t===void 0&&(t=h4(e),rw.set(e,t)),t}function h4(e){const t=new Map;for(const[a,r]of Object.entries(e.pages)){const s=r.declaration;if(s.type==="list")continue;const c=`${e.home}.${a}`;if(s.type==="address"){t.set(c,{declaration:s,value_type:"address"});for(const u of Dg)t.set(`${c}.${u}`,{declaration:s,value_type:N_(u)});continue}t.set(c,{declaration:s,value_type:m4(c,s)})}return t}function m4(e,t){if(t.type==="image")return"image";if(gn(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 N_(e){return e==="latitude"||e==="longitude"?"number":"text"}function M_(e){return Object.hasOwn(b_,e)?"library":"property"}function C_(e,t){const a=e.pages[t],r=(a==null?void 0:a.declaration.type)==="list"?a.declaration.element:void 0;if((r==null?void 0:r.type)!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return r.fields}function ks(e){return C_(l4(M_(e)),e)}function _s(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function p4(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=qt(e.slice(0,t));if((a==null?void 0:a.reading)!=="registry")return null;const r=e.slice(t+1),s=_s(ks(a.table),r);return s!==void 0&&to(s)==="row_list"?{table:a,member:r}:null}function g4(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=e.slice(0,t),r=qt(a);if((r==null?void 0:r.reading)!=="registry")return null;const s=e.slice(t+1);return _s(ks(r.table),s)===void 0?null:{table:r.table,tableKey:a,member:s}}const Ig=["type","label","from","source","locked","when"],vp=new Set(Ig),Bg=Symbol.for("@homepages/concrete:table-of");function R_(e,t){return Object.defineProperty(e,Bg,{value:t,enumerable:!1})}function Hg(e){if(typeof e!="object"||e===null)return null;const t=e[Bg];return typeof t=="object"&&t!==null?t:null}function y4(e){if(e.reading==="registry")return Object.keys(ks(e.table));const t=ea[e.table].row;return Object.keys(t).filter(a=>a!==eo[e.table].idKey&&!vp.has(a))}function Fl(e,t){return Object.freeze({kind:"row",field:t,[o_]:e})}function b4(e,t){return new Proxy(Fl(e,t),{get(a,r,s){return typeof r=="string"&&!(r in a)&&Id(r)?Fl(e,`${t}.${r}`):Reflect.get(a,r,s)}})}const T_=Symbol.for("@homepages/concrete:row:definition");function Ei(e){const t=e[T_];return typeof t=="object"&&t!==null?t:e}function v4(e,t){if(e.reading==="legacy")return!1;const a=_s(ks(e.table),t);return a!==void 0&&to(a)==="address"}function ow(e,t){if(e.reading==="legacy"){const r=ea[e.table].row;return Object.hasOwn(r,t)?String(r[t].value_type):void 0}const a=_s(ks(e.table),t);return a===void 0?void 0:String(to(a)??"")}const x4=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function w4(e,t,a=[]){const r=t===null?null:new Set(y4(t)),s=new Proxy(e,{get(c,u,m){if(u===T_)return c;if(typeof u!="string")return Reflect.get(c,u,m);if(t!==null&&r!==null){const p=[t,...a],g=p.map(b=>b===t?r.has(u)?ow(t,u):void 0:ow(b,u));if(g.every(b=>b===void 0))return Reflect.get(c,u,m);const v=g.findIndex(b=>b===void 0||b!==g[0]);if(v===-1)return v4(t,u)?b4(s,u):Fl(s,u);if(u in c||vp.has(u))return Reflect.get(c,u,m);throw new Error(`row: "${String(c.label)}" reads the member "${u}", which its \`from\` table ${p[v].table} ${g[v]===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||vp.has(u)?Reflect.get(c,u,m):x4.has(u)?void 0:Fl(s,u)}});return s}function k4(e){const t=new Proxy(e,{get(a,r,s){return typeof r=="string"&&!(r in a)&&Id(r)?Fl(t,r):Reflect.get(a,r,s)}});return t}function sw(e,t){const a=e.map(t);return a.some((r,s)=>r!==e[s])?a:void 0}function lw(e,t){const a=e.reads===void 0?void 0:sw(e.reads,t),r=e.requires===void 0?void 0:sw(e.requires,t);return a===void 0&&r===void 0?e:{...e,...a===void 0?{}:{reads:a},...r===void 0?{}:{requires:r}}}function us(e,t){const a=Ei(e);let r;const s=a.source;if(s!==void 0)if(Va(s)){const u=lw(s,t);u!==s&&(r={...a,source:u})}else{const u=t(s);u!==s&&(r={...a,source:u})}const c=Wr(a);if(c!==void 0){let u=!1;const m=c.map(p=>{const g=lw(p,t);return g!==p&&(u=!0),g});u&&(r={...r??a,[Ng]:m})}return r??a}function _4(e){return t=>{const a=uc(t);if(a===void 0)return t;const r=e.get(a);return r===void 0?t:{kind:"row",slot:r,field:t.field}}}const D_=new Set(["row","address"]);function S4(e){const t=new Map;for(const[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&D_.has(r.type)&&t.set(r,a);return t}function E4(e,t,a){const r=[e.source];us(e,s=>(r.push(s),s));for(const[s,c]of t)if(!(s===e||c===a))for(const u of Ig){const m=s[u];if(m!==void 0&&r.includes(m))return`${c}.${u}`}}function j4(e){const t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member — a row's ${Ig.map(a=>`\`${a}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function Pl(e){return D_.has(e.type)?{...Ei(e)}:e}const O4={"property.listing_intent":"listing_intent","property.description":"description","property.address":"address","property.address.street":"address_street","property.address.unit":"address_unit","property.address.city":"address_city","property.address.state":"address_state","property.address.postal":"address_postal","property.address.latitude":"lat","property.address.longitude":"lon"},L_={units:{label:"unit_label",beds:"beds",baths:"baths",sqft:"sqft",price:"price"},contacts:{headshot:"headshot",name:"name",title:"title",org_name:"org_name",email:"email",phone:"phone",website:"website",bio:"bio",logo_dark:"logo_dark",logo_light:"logo_light",instagram:"instagram",linkedin:"linkedin",x:"x",facebook:"facebook"},comparables:{price:"price",sale_date:"sale_date",beds:"beds",baths:"baths",sqft:"sqft",photo:"photo",year_built:"year_built",lot_sqft:"lot_sqft",stories:"stories",units:"units",hoa_monthly:"hoa_monthly",list_price:"list_price",listed_date:"listed_date",mls_number:"mls_number",description:"description",status:"status",distance_m:"distance_m",price_period:"price_period"}};function A4(e,t){const a=L_[e];return Object.hasOwn(a,t)?a[t]:null}function N4(e,t){const a=L_[e];return Object.keys(a).find(r=>a[r]===t)??null}function M4(e){var r;const t=O4;if(Object.hasOwn(t,e))return t[e];const a=(r=qt(e))==null?void 0:r.table;return a!==void 0&&Vr(a)?a:e}function qg(e,t){for(const a of Qa(t,e)??[])if(!(a.verb!=="pick"||a.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 C4(e){return vs(e)?{kind:"section",section:e.section,slot:e.slot}:qn(e)?{kind:"sibling",of:e}:Gt(e)?{kind:"home",key:e.key}:e}function ui(e){return Fg(e,C4)}function R4(e,t,a){if(!(t!==!0||a===void 0)){if(Va(a)){if(a.requires!==void 0&&a.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(vs(a)||qn(a)||jg(a))throw new Error(`${e} is \`required\` and mirrors another slot — a mirror requires its upstream; mark that slot \`required\` instead.`)}}function Fg(e,t){const a=e.source;R4(e.label??"a slot",e.required,a);const r=a!==void 0&&Qa(a,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...r?{source:t(a)}:{},..._5(a),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function Bm(e){return t=>({type:"text",size:e,...ui(t),...t.cap!==void 0?{cap:t.cap}:{}})}const pn={short:Bm("short"),medium:Bm("medium"),long:Bm("long")};function sn(e){return{type:"number",...ui(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function T4(e){const t=e.source;return{type:"select",...ui(e),...Gt(t)?{options:{source:M4(t.key)}}:{},...e.creatable!==void 0?{creatable:e.creatable}:{}}}function D4(e){if(Gt(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` — a select takes exactly one set of choices.`);return qg(`select: "${e.label}"`,e.source),{type:"select",...ui(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function L4(e,t){if(Fr(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 qg("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function z4(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)?L4(e.from,e):e.from!==void 0?D4(e):T4(e)}const md=z4;function Po(e){return{type:"url",...ui(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function z_(e){return{type:"date",...ui(e)}}function $4(e){return{type:"email",...ui(e)}}function U4(e){return{type:"phone",...ui(e)}}function Pg(e={}){return k4({type:"address",...ui(e)})}function $_(e,t){const a=`${e}: "${t.label??e}"`;if(qg(a,t.source),"category"in t)throw new Error(`${a} declares \`category\` — a media declaration names the list it picks from in \`from\` (\`from: fact.property.property_media\`, \`fact.property.floor_plans\`, \`fact.property.uploads\`), or owns its asset without one.`);if("sources"in t)throw new Error(`${a} declares \`sources\` — a media slot takes a pasted link wherever a link provider claims its kind (a video, a tour), and declares nothing for it. \`concrete upgrade\` removes it.`);const r=f_({type:e,kinds:t.kinds,process:t.process});if(r!==null)throw new Error(`${a} ${r}.`);const s=Qa(t.source,a),c=t.source!==void 0&&s===void 0&&!Va(t.source);if(c&&t.from!==void 0)throw new Error(`${a} picks \`from\` a media list and declares a \`source\` — a slot bound to a fact holds what that fact holds.`);if((c||Va(t.source))&&t.process!==void 0)throw new Error(`${a} declares \`process\` beside a \`source\` that derives its value — a derived slot holds what it derives from, processed where that is declared.`);if((s==null?void 0:s.some(p=>p.verb==="pick"))===!0&&t.from===void 0)throw new Error(`${a} 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 asset.`);const u=I4(a,e,t.kinds,t.from),m=u==null?void 0:u.map(p=>Gt(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 I4(e,t,a,r){if(r===void 0)return;const s=Array.isArray(r)?r:[r];if(s.length===0)throw new Error(`${e} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its asset.`);const c=Ga({type:t,kinds:a}),u=new Set;for(const m of s){const p=typeof m=="object"&&m!==null&&!Gt(m),g=Gt(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; an asset two lists hold is one candidate, attributed to the first.`);if(u.add(g),!p)continue;const v=Ga(g.element);if(v.length>0&&!c.some(b=>v.includes(b)))throw new Error(`${e} picks \`from\` a list of ${v.join(", ")}, whose items can never be ${c.join(" or ")} — each list it picks from holds items of its kinds.`)}return s}function Ha(e={}){return{type:"image",...ui(e),...e.crop!==void 0?{crop:e.crop}:{},...$_("image",e)}}function Vg(e={}){return{type:"media",...ui(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...$_("media",e)}}const Gg=Symbol.for("@homepages/concrete:object:declared-fields");function Ss(e){return e[Gg]}function U_(e,t){const a=Ss(t);return a!==void 0&&Object.defineProperty(e,Gg,{value:a,enumerable:!1}),e}const I_="a label is a source, as a text slot takes one",xp="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",B4=new Set(["type","size","cap","locked"]);function H4(e,t,a){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} — ${I_}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(qn(t)){const r=Object.entries(a).find(([,s])=>s===t);if(r===void 0)return q4(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${r[0]}", a "${t.type}" — a label names a text or an address field.`);return{field:r[0]}}if(Ud(t)){const r=Fr(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${r} — the label is the fill's holder, so it states the kind the fill writes: ${xp}.`)}return pn.short({locked:!0,source:t})}function q4(e,t){const a=Wr(t);if(a===void 0||a.some(u=>u.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields — ${I_}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${xp}; a title the user edits is a field, which the label names by its const.`);const r=Object.keys(t).filter(u=>!B4.has(u));if(r.length>0)throw new Error(`${e} label is a written text slot declaring ${r.map(u=>`\`${u}\``).join(", ")} — a label states only its kind and cap: ${xp}; a title the user edits is a field, which the label names by its const.`);const{size:s,cap:c}=t;return pn[s]({locked:!0,source:a.length===1?a[0]:a,...c!==void 0?{cap:c}:{}})}function F4(e){const{type:t,element:a}=e;if(t==="object")return"an object — an object never holds another; flatten its fields into this one";if(t==="list"&&(a==null?void 0:a.type)==="object")return P4(e);if(t==="list"&&(a==null?void 0:a.type)==="row")return"a list of rows — declare the selection at the top level instead"}const zl="declare the list at the top level instead";function P4(e){const t=Wr(e);if(t!==void 0&&t.some(s=>s.verb!=="pick")||t===void 0&&Ud(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; ${zl}`;const a=e.source;if(Gt(a))return`a list of objects sourced by the fact "${a.key}" — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${zl}`;if(vs(a)||jg(a)||qn(a))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; ${zl}`;const r=e.element.fields;for(const[s,c]of Object.entries(r)){const u=V4(c,r);if(u!==void 0)return`a list of objects whose item field "${s}" is ${u}`}}function V4(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(Wr(e)!==void 0)return`filled — no fill writes into a list inside an object; ${zl}`;const a=e.source;if(a===void 0)return;if(Va(a))return`a \`compute()\` — an item of a list inside an object reads its element, or a row \`from\` its member; ${zl}`;const{kind:r,slot:s}=a;if(r==="element"&&e.type==="row"&&qt(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(r!=="element"&&!(e.type!=="row"&&r==="row"&&typeof s=="string"&&((u=t[s])==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 hc(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 a=tw.find(v=>Object.hasOwn(e.fields,v));if(a!==void 0)throw new Error(`${t} field "${a}" is named like its binding's own \`${a}\` — a field is read straight off its object's binding, which owns ${tw.map(v=>`\`${v}\``).join(", ")}. Rename the field.`);const r=e.label===void 0?void 0:H4(t,e.label,e.fields),s=r!==void 0&&!("type"in r)?r:void 0,c={...r===void 0||s!==void 0?{}:{label:r},...e.fields};if(Object.keys(c).length===0)throw new Error(`${t} declares no fields — an object groups at least one.`);for(const[v,b]of Object.entries(c)){const w=F4(b);if(w!==void 0)throw new Error(`${t} field "${v}" is ${w}.`);if(v!=="label"&&b.label===void 0)throw new Error(`${t} field "${v}" declares no \`label\` — every field of an object states the name the editor shows it by.`)}const u=S4(c);for(const[v,b]of Object.entries(c)){const w=E4(b,u);if(w!==void 0)throw new Error(`${t} field "${v}" ${j4(w)}`)}const m=_4(u),p={};for(const[v,b]of Object.entries(c))p[v]=Pl(us(b,m));const g={type:"object",...e.locked===!0?{locked:!0}:{},...s!==void 0?{label:s}:{},fields:p,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(g,Gg,{value:c,enumerable:!1}),g}function G4(e){if(e.type==="object")return null;const t=e.source;if(t===null||typeof t!="object")return null;const{kind:a,section:r,slot:s}=t;return a==="section"&&typeof r=="string"&&typeof s=="string"?{kind:"section",section:r,slot:s}:null}const mc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Kg(e,t){if(Object.hasOwn(e,t))return e[t];const a=t.indexOf(".");if(a<=0)return;const r=e[t.slice(0,a)];if((r==null?void 0:r.type)!=="object"||!mc(r.fields))return;const s=t.slice(a+1);return Object.hasOwn(r.fields,s)?r.fields[s]:void 0}function B_(e,t,a){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,a))return{path:t.container===void 0?a:`${t.container}.${a}`,def:t.siblings[a],sibling:!0};if(t.nested===!0)return;const r=Kg(e,a);return r===void 0?void 0:{path:a,def:r,sibling:!1}}function K4(e){return e==="row"||e==="address"}function Y4(e,t,a){const r=B_(e,t,a);if(!(r===void 0||!K4(r.def.type)))return{...r,kind:r.def.type}}function Q4(e){return qt(e.from)}function Vl(e){if(!Array.isArray(e.from)){const t=Q4(e);return t===null?[]:[t]}return e.from.flatMap(t=>qt(t)??[])}function X4(e,t){const a=new Set,r=[];for(const s of t){const c=e[s.table];for(const u of c){const m=pd(u.id);m===null||a.has(m)||(a.add(m),r.push({id:m,table:s}))}}return r}function Z4(e,t,a){if(t.length>1&&a!==null){const r=X4(e,t).find(s=>s.id===a);if(r!==void 0)return r.table}return t[0]??null}function H_(e){if(e===void 0)return;if(cw(e.source))return e;if(e.type!=="object"||!mc(e.fields))return;const t=Object.values(e.fields).filter(a=>cw(a.source));return t.length===1?t[0]:void 0}function q_(e){const t=H_(e);return(t==null?void 0:t.type)==="row"?Vl(t):[]}function cw(e){return mc(e)&&e.kind==="element"}function W4(e,t){return F_(e,e.section,e.slots,t,new Set)}function uw(e,t,a,r,s){const c=`${t??""}\0${r}`;if(s.has(c))return[];s.add(c);const u=Kg(a,r);return(u==null?void 0:u.type)==="row"?Vl(u):(u==null?void 0:u.type)==="list"?F_(e,t,a,u,s):[]}function F_(e,t,a,r,s){var b;const c=mc(r.source)?r.source:void 0;if(c===void 0||c.kind==="authored"||c.kind==="derived")return q_(r.element);const u=Cg(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 uw(e,t,a,g,s);const v=(b=e.sectionSlots)==null?void 0:b.call(e,p);return v===void 0?[]:uw(e,p,v,g,s)}const pd=e=>typeof e=="string"&&e!==""?e:null;function J4(e,t=null){if(typeof e=="string")return t===null?null:pd(e);const a=eR(e);return a===null?null:pd(e[a])}function eR(e){return mc(e)?["id","asset_id"].find(t=>pd(e[t])!==null)??null:null}function tR(e,t){if(Gt(e)){if(qt(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(vs(e))return{kind:"section",section:e.section,slot:e.slot};if(qn(e))return{kind:"sibling",of:e};if(uc(e)!==void 0||Va(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function P_(e){return Gt(e)?qt(e.key):qn(e)&&e.type==="list"?Hg(e):null}const nR=new Set(["label","locked","placeholder","when","source"]);function iR(e){const t={};for(const[a,r]of Object.entries(e))nR.has(a)||(t[a]=r);return t}function aR(e,t){if(Gt(e)&&qt(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(const r of Qa(e,`list: "${t}"`)??[]){if(r.verb==="write")throw new Error(V_(t,"declares no `item`"));if(r.verb==="pick")throw new Error(wp(t,"declares no `item`"))}if(Ud(e))return{type:"poi"};if(qn(e)&&e.type==="list")return oR(e,t);const a=uc(e);if(a!==void 0){const r=Hg(a);if(r!==null&&rR(r,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 rR(e,t){if(e.reading==="legacy"){const r=ea[e.table].row;return Object.hasOwn(r,t)?r[t].value_type:void 0}const a=_s(ks(e.table),t);return a===void 0?void 0:to(a)??void 0}function V_(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 G_(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;const t=e.fields??{};return!Object.values(t).some(a=>Pa(a.source))}function dw(e,t){if(e.type!=="object")return;const a=Object.entries(e.fields).filter(([,r])=>{var s;return r.type!=="row"&&((s=r.source)==null?void 0:s.kind)==="element"});if(a.length!==1)throw new Error(V_(t,a.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(a.length)} fields (${a.map(([r])=>`"${r}"`).join(", ")}) — one field holds it`))}function oR(e,t){const a=e.element;if(a===void 0||a.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects — declare \`item\` to say what each item holds.`);return a.type==="row"?{type:"row",from:a.from,source:{kind:"element"}}:iR(a)}function wp(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 kp(e){const t=Ei(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(gn(t.type)||t.type==="media")&&t.from!==void 0}function _p(e){return Ei(e).source===void 0&&Wr(e)===void 0}function K_(e,t){if(e.type!=="object")return kp(e)&&_p(e)?null:void 0;const a=Ss(e)??e.fields??{},r=Object.entries(a).filter(([,u])=>typeof u=="object"&&u!==null&&kp(u)&&_p(u)),s=r.filter(([,u])=>Ei(u).type!=="select"),c=s.length>0?s:r;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 fw(e){return{...Pl(e),source:{kind:"element"}}}function Hm(e,t){if(t===void 0)return null;const a=t===null?e:(Ss(e)??e.fields)[t],r=Ei(a);return r.type==="row"?qt(r.from):null}function sR(e,t){if(t===null)return fw(e);const a=e,r=(Ss(e)??a.fields)[t],s=u=>u===r||typeof u=="object"&&u!==null&&Ei(u)===Ei(r)?{kind:"element"}:u,c={};for(const[u,m]of Object.entries(a.fields))c[u]=u===t?fw(m):us(m,s);return U_({...a,fields:c},a)}function lR(e,t,a){const r=c=>{if(!Pa(c))return c;if(p5(c)!==t)throw new Error(`list: "${a}"'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]=Pl(us(g,r)),u[p]!==g&&(m=!0);return m?U_({...c,fields:u},c):c}return Pl(us(e,r))}function Y_(e,t){const a=e.type==="object"?Object.entries(e.fields):[["",e]];for(const[r,s]of a){const c=s.source;if((c==null?void 0:c.kind)==="home")throw new Error(`list: "${t}"'s item${r===""?"":` field "${r}"`} 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 cR(e,t){if(e.item===void 0)return aR(e.source,t);const a=new Set((Qa(e.source,`list: "${t}"`)??[]).map(p=>p.verb));if(a.has("pick")){const p=uR(e.item,t);return a.has("write")&&dw(p,t),p}const r={},s=Object.freeze({kind:"element",[s_]:r,[Bg]:P_(e.source)}),c=typeof e.item=="function"?e.item(s):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"&&Wr(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.`);Y_(c,t);const u=lR(c,r,t);if(a.has("write")&&!G_(e.item)&&dw(u,t),u.type==="object"||u.type==="row")return u;const m={...u};return delete m.locked,m}function uR(e,t){if(typeof e=="function")throw new Error(wp(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 a=K_(e,t);if(a===void 0)throw new Error(wp(t,"its item declares no field with `from` and no source"));Y_(e,t);const r=sR(e,a);if(r.type==="object"||r.type==="row")return r;const s={...r};return delete s.locked,s}function dR(e,t){const a=e.source;if(!(a===void 0||(Qa(a,"list")??[]).some(c=>c.verb==="pick"))||typeof e.item!="object"||e.item===null)return P_(a);const s=e.item;if(a===void 0){if(s.type!=="object")return Hm(s,kp(s)?null:void 0);const c=Object.entries(Ss(s)??{}).filter(([,u])=>Ei(u).type==="row"&&_p(u));return c.length===1?Hm(s,c[0][0]):null}return Hm(s,K_(s,t))}function ni(e){const t=e.label??"list";for(const g of["fields","title","unique","count"]){if(e[g]===void 0)continue;const v={fields:"declare `item: (el) => object({ fields })` — an item function returning an object",title:"give the item's object a `label` — a string, or a text slot",unique:"a pick is unique by default (`fill.pick({ unique: false })` lifts it)",count:"`min` and `max` bound how many items any source yields"};throw new Error(`list: "${t}" declares \`${g}\`, which a list no longer takes — ${v[g]}.`)}const a=e.source,r=Qa(a,`list: "${t}"`),s=G_(e.item),c=(r==null?void 0:r.every(g=>g.verb==="pick"||g.verb==="write"&&s))===!0;if(r!==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 r??[])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",...Fg(e,g=>tR(g,t)),element:cR(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},m=Va(a)?q_(u.element):void 0,p=m===void 0?dR(e,t):m.length===1?m[0]:null;return R_(u,p)}function Fd(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 a={kind:"process",verb:e};for(const[s,c]of Object.entries(t??{}))c!==void 0&&(a[s]=c);const r=Mg(a);if(r!==null)throw new Error(`process.${e}(): ${r}.`);return a}function fR(e){return Fd("cutout",e)}function hR(e){return Fd("autocrop",e)}function ta(e,t){return Fd(e,t)}function mR(e){return ta("probe",e)}function pR(e){return ta("understand",e)}function gR(e){return ta("preview",e)}function yR(e){return ta("ladder",e)}function bR(e){return ta("transcode",e)}function vR(e){return ta("poster",e)}function xR(e){return ta("rasterize",e)}function wR(e){return ta("fetch",e)}function kR(e){return ta("tour_details",e)}function _R(e){return Fd("crop",e)}const SR={cutout:fR,autocrop:hR},Et={...SR,probe:mR,understand:pR,preview:gR,ladder:yR,transcode:bR,poster:vR,rasterize:xR,fetch:wR,tour_details:kR,crop:_R};function ER(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 jR(e,t){if(Gt(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(vs(e))return{kind:"section",section:e.section,slot:e.slot};if(qn(e))return{kind:"sibling",of:e};if(Pa(e)||Va(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function OR(e,t){if(Array.isArray(e))return AR(e,t);const a=Gt(e)?qt(e.key):null;if(a!==null)return{key:e.key,tables:[a]};const r=uc(e);if(r!==void 0){const s=`${String(Ei(r).from)}.${e.field}`;if(p4(s)!==null)return{key:s,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 ${Gt(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 AR(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` — a row names the table it is a row of.`);const a=[],r=[];for(const s of e){const c=Gt(s)?qt(s.key):null;if(c===null)throw new Error(`row: "${t}"'s \`from\` lists ${Gt(s)?`the fact "${s.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(r.some(u=>u.table===c.table))throw new Error(`row: "${t}" names the ${c.table} table twice in \`from\` — each table is named once.`);a.push(s.key),r.push(c)}return{key:a.length===1?a[0]:a,tables:r}}function NR(e,t,a){const r=Hg(qn(e)||Pa(e)?e:void 0);if(!(r===null||t.some(s=>r.table===s.table)))throw new Error(`row: "${a}" is \`from\` the ${t.map(s=>s.table).join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${r.table} — a row's source yields a row of its own \`from\`.`)}function MR(e){const{key:t,tables:a}=OR(e.from,e.label),r=a[0]??null;if(r===null&&!Pa(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(qn(e.source)&&e.source.type==="list")throw new Error(ER(`row: "${e.label}"`));const s=Qa(e.source,`row: "${e.label}"`);for(const m of s??[]){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\`.`)}s===void 0&&e.source!==void 0&&r!==null&&NR(e.source,a,e.label);const c=Fg(e,m=>jR(m,e.label)),u=R_({type:"row",from:t,...c},r);return w4(u,r,a.slice(1))}const Q_=["property","library"];function Gl(e){const t=e.indexOf("."),a=t===-1?"":e.slice(0,t);if(!Q_.includes(a))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:a,key:e.slice(t+1)}}function CR(e){return e.type==="row"?e:null}function RR(e){if(e.type!=="object")return null;for(const[t,a]of Object.entries(e.fields)){const r=a.source;if(gn(a.type)&&typeof r=="object"&&r!==null&&r.kind==="element")return t}return null}function Yg(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(a=>typeof a=="string")}function gd(e){const t=X_(e);return t===null?null:t.label??null}function X_(e){const t=Gl(e),a=t.home==="library"?Es.pages:Ja.pages,[r,...s]=t.key.split(".");let c=r!==void 0&&Object.hasOwn(a,r)?a[r].declaration:void 0;for(const u of s)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 Gr(e){const t=[];let a=e;for(;a!==void 0&&!t.includes(a);){const r=X_(a);if(r===null)break;t.push(a),a=Z_(r.element)}return t}function Z_(e){const t=CR(e);if(t!==null)return Yg(t)[0];const a=e.type==="object"?RR(e):null,r=e.type==="object"&&a!==null?e.fields[a]:e;if(!gn(r.type)&&r.type!=="media")return;const s=r.from,c=Array.isArray(s)?s[0]:s;return typeof c=="string"&&c!==""?c:void 0}function TR(e){const t=typeof e=="string"?[e]:[...e],a=t[0];return a===void 0?[]:[...Gr(a).slice(1).filter(s=>!t.includes(s)).reverse().map(s=>[s]),t]}function DR(e){return e.head!==null}function na(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 a of["title","description"]){const r=e[a];if(typeof r=="string"&&r.trim()==="")throw new Error(`fact registry: a page declares an empty ${a}`)}return{head:e,declaration:t}}const LR=new Set(["home","item"]);function Sp(e,t,a){var c;const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0;if(r!==void 0)return{kind:"home",key:`${a.home}.${r}`};if(g5(t)){const u=a.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:`${a.home}.${u}`}}const s=jg(t)?t.of:t;if(qn(s)){const u=(c=a.fields)==null?void 0:c.get(s);if(u===void 0)throw new Error(`${e} reads the declaration "${s.label??s.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(Gt(t)&&[...a.pages.values()].some(u=>t.key===`${a.home}.${u}`))return{kind:"home",key:t.key};if(Gt(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(vs(t))throw new Error(`${e} reads a section's slot — a registry reads no section.`);if(Pa(t)&&a.picked===!0)return{kind:"element"};if(Pa(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(uc(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(c_(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&LR.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function zR(e,t,a){return Array.isArray(t)?t.length===1?qm(e,t[0],a):t.map(r=>qm(e,r,a)):qm(e,t,a)}function qm(e,t,a){const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0,s=typeof t=="string"?t:r===void 0?void 0:`${a.home}.${r}`;if(s===void 0||!a.mediaLists.has(s))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 asset.`);return s}function Ep(e,t,a){const r=t.reads.map(s=>Sp(e,s,a));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:r}:{kind:"compute",fn:t.fn,reads:r,requires:t.requires.map(s=>Sp(e,s,a))}}function $R(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 UR(e,t){const{type:a,fields:r}=t;if(a!=="object"||r===void 0)return;const s=Object.entries(r).filter(([,c])=>c.type==="row");if(s.length>0)throw new Error(`${e} holds a picked row in ${s.map(([c])=>`"${c}"`).join(", ")} — a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function IR(e){const t=new Map,a=e.fields;for(const r of[a,Ss(e)??{}])for(const[s,c]of Object.entries(r))typeof c=="object"&&c!==null&&t.set(c,s);return t}function jp(e,t,a){var s;$R(e,t);let r=Pl(us(t,c=>Sp(e,c,a)));switch(r.from!==void 0&&(gn(String(r.type))||r.type==="media")&&(r={...r,from:zR(e,t.from,a)}),r.type){case"object":{const c={},u={...a,fields:IR(r)};for(const[m,p]of Object.entries(r.fields))c[m]=jp(`${e}.${m}`,p,u);r={...r,fields:c};break}case"list":{const c=r.max,u={home:a.home,pages:a.pages,mediaLists:a.mediaLists},m=((s=Wr(t))==null?void 0:s.some(g=>g.verb==="pick"))===!0,p=jp(`${e}[]`,r.element,m?{...u,picked:!0}:u);UR(`${e}[]`,p),r={...r,element:p,...Og(c)?{max:Ep(`${e}.max`,c,u)}:{}};break}}return r}function BR(e,t,a,r){const s=`${e}.${t}`,c=jp(s,a.declaration,r);if(c.type==="object")throw new Error(`${s} 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(`${s} declares no \`label\` — a top-level fact states the name its page and its Details section show it by.`);if(a.head===null)return{head:null,declaration:c};const{title:u,description:m}=a.head;return{head:{title:typeof u=="string"?u:Ep(`${s}.title`,u,r),description:typeof m=="string"?m:Ep(`${s}.description`,m,r)},declaration:c}}const HR=["home","pages"];function qR(e){return"head"in e&&"declaration"in e}function FR(e){const t=e.element;return e.type==="list"&&typeof(t==null?void 0:t.type)=="string"&&(gn(t.type)||t.type==="media")}function W_(e,t){if(!Q_.includes(e))throw new Error(`fact registry: "${e}" is not a home`);const a=new Map,r=new Set,s={};for(const[p,g]of Object.entries(t)){if(HR.includes(p))throw new Error(`fact registry: ${e} declares a page keyed "${p}", a registry's own key`);a.set(g,p);const v=qR(g)?g:{head:null,declaration:g};s[p]=v,FR(v.declaration)&&r.add(`${e}.${p}`)}const c={home:e,pages:a,mediaLists:r},u={};for(const[p,g]of Object.entries(s))u[p]=BR(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 PR(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 VR=[{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."}],GR=["sold","active"],KR=["total","monthly"];function YR(e){return e==null?"active":"sold"}function QR(e){return e==="for_rent"?"monthly":"total"}const XR=6371e3;function ZR(e,t,a,r){const s=p=>p*Math.PI/180,c=s(a-e),u=s(r-t),m=Math.sin(c/2)**2+Math.cos(s(e))*Math.cos(s(a))*Math.sin(u/2)**2;return 2*XR*Math.asin(Math.sqrt(m))}function WR(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(ZR(t.latitude,t.longitude,e.latitude,e.longitude))}const Es=W_("library",{contacts:na({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ni({label:"Contacts",item:()=>{const e=pn.short({label:"Name",cap:256});return hc({label:e,fields:{headshot:Ha({label:"Headshot"}),name:e,title:pn.short({label:"Title",cap:128}),org_name:pn.short({label:"Organization",cap:256}),email:$4({label:"Email"}),phone:U4({label:"Phone"}),website:Po({label:"Website"}),address:Pg({label:"Address"}),bio:pn.long({label:"Bio",cap:4e3}),logo_dark:Ha({label:"Logo for light backgrounds",process:[Et.cutout()]}),logo_light:Ha({label:"Logo for dark backgrounds",process:[Et.cutout()]}),instagram:Po({label:"Instagram"}),linkedin:Po({label:"LinkedIn"}),x:Po({label:"X"}),facebook:Po({label:"Facebook"})}})}}))});j_(Es);const Op=na({title:"What’s the address?",description:"We’ll build your map and neighborhood details from this."},Pg({label:"Address"})),J_=na({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},md({label:"Listing intent",from:[...VR]})),Wa=na({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ni({label:"Uploads",item:Vg()})),Qg=ni({label:"Media",item:Vg({kinds:["image","video","tour"],from:Wa}),source:ji.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."})}),eS=ni({label:"Floor plans",item:Ha({label:"Floor plan",from:Wa,process:[Et.cutout({enclosed:"keep"})]}),source:ji.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."})}),JR=ni({label:"Documents",item:Vg({kinds:["document","image","video"],from:Wa}),source:ji.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."})}),e3=Ha({label:"Hero",from:Qg,source:ji.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."})}),t3=Po({label:"Website"}),n3=`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.`,i3=`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.`,a3=[`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(`
|
|
778
|
-
|
|
779
|
-
`),qu=pn.short({label:"Unit"}),r3=sn({label:"Beds"}),o3=sn({label:"Baths",decimals:!0}),tS=sn({label:"Sq ft",thousandsSep:!0}),nS=pn.short({label:"Price",cap:40}),iS=pn.short({label:"Building floor(s)",cap:20}),aS=sn({label:"Parking spaces"}),rS=ni({label:"Amenities",max:12,item:pn.short({cap:40})});function oS(e,t){return ni({label:"Floor plans",source:ji.pick({reads:[e],brief:t}),item:hc({fields:{image:Ha({label:"Floor plan",from:eS}),floor:md({label:"Floor",from:[...S5],creatable:!0})}})})}function sS(e,t){return ni({label:"Photos",source:ji.pick({reads:[e],brief:t}),item:Ha({label:"Photo",from:Qg})})}const s3=na({title:"Tell us about the units",description:"Add each unit’s details and floor plans so they appear on your website."},ni({label:"Units",source:ji.write({reads:[Wa],brief:a3}),item:hc({label:qu,fields:{label:qu,beds:r3,baths:o3,sqft:tS,price:nS,floor:iS,hoa_monthly:sn({label:"Monthly HOA fee"}),parking:aS,lot_sqft:sn({label:"Lot sq ft",thousandsSep:!0}),amenities:rS,floor_plans:oS(qu,n3),photos:sS(qu,i3)}})})),l3=`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.`,c3=`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.`,u3=["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(`
|
|
780
|
-
|
|
781
|
-
`),Fu=pn.short({label:"Space"}),d3=na({title:"Tell us about the commercial spaces",description:"Add each space’s details and floor plans so they appear on your website."},ni({label:"Commercial spaces",source:ji.write({reads:[Wa],brief:u3}),item:hc({label:Fu,fields:{label:Fu,use:pn.short({label:"Use",cap:40}),sqft:tS,price:nS,floor:iS,parking:aS,amenities:rS,floor_plans:oS(Fu,l3),photos:sS(Fu,c3)}})})),f3="The uploads may present comparable properties: other properties an upload sets beside the subject for comparison. The subject is the property the uploads are marketing, at the read address; in a building, that is the building and every unit the uploads market in it. Find every comparable and return it as an item. A property is a comparable because an upload compares it with the subject, and it may appear as a row in a sales or rent comparables table, as a panel with its own photo and figures, as a numbered pin in a map legend, or as a line in a survey of recent trades. An upload presenting the subject or one of its units for itself, such as its listing sheet, brochure, price list or market history, presents the subject, whatever unit line it prints beside the read street. Read every upload whole, including tables that continue from one page to the next. Copy each figure exactly as an upload states it for that property, and each listing's remarks word for word. Specs come only from what is printed as text: never count rooms or take a figure from what a floor plan drawing, a photo or a map shows; a studio has one bedroom. Never compute one: not by multiplying a price per unit by a unit count, not by dividing a price by a size, not by counting the days between two dates, not by converting a yearly fee to a monthly one, not by averaging rows, and never by carrying a figure across from a neighbouring row, a summary or the subject. If a property is listed in more than one place — on several pages, or in several uploads — return one item carrying every figure those places state. A figure no upload states for that property is null; a null is always better than a guess. Never return the subject, even where it appears in a comparables table or at the centre of a comparables map. Another unit of the subject's building is a comparable only where an upload sets it beside the subject as one, such as a sister unit's earlier sale in a comps table. Do not return a market, submarket or area average, a portfolio total, or anything that is not an individual property. When no upload compares another property with the subject, return no items.",Fm=Pg({label:"Address"}),hw=z_({label:"Sale date"}),h3=na({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ni({label:"Comparables",max:50,source:ji.write({reads:[Wa,Op],brief:f3}),item:hc({label:Fm,fields:{address:Fm,price:sn({label:"Price"}),sale_date:hw,beds:sn({label:"Beds"}),baths:sn({label:"Baths",decimals:!0}),sqft:sn({label:"Sq ft"}),photo:Ha({label:"Photo"}),year_built:sn({label:"Year built"}),lot_sqft:sn({label:"Lot sq ft"}),stories:sn({label:"Stories",decimals:!0}),units:sn({label:"Units"}),hoa_monthly:sn({label:"HOA per month"}),list_price:sn({label:"List price"}),listed_date:z_({label:"Listed date"}),mls_number:pn.short({label:"MLS number"}),description:pn.long({label:"Description"}),status:md({label:"Status",from:[...GR],locked:!0,source:Im({reads:[hw]},e=>YR(e))}),distance_m:sn({label:"Distance (m)",locked:!0,source:Im({reads:[Fm,Op]},(e,t)=>WR(e,t))}),price_period:md({label:"Price period",from:[...KR],locked:!0,source:Im({reads:[J_]},e=>QR(e))})}})})),m3=na({title:"Who’s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ni({label:"Contacts",min:1,max:12,source:ji.pick({reads:[Wa],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:MR({label:"Contact",from:Es.contacts})})),Ja=W_("property",{address:Op,listing_intent:J_,description:na({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},pn.long({label:"Description"})),uploads:Wa,property_media:Qg,floor_plans:eS,property_documents:JR,hero:e3,site_url:t3,units:s3,commercial_spaces:d3,contacts:m3,comparables:h3});j_(Ja);const p3=["text","number","select","url","email","phone","date"],g3=new Set(p3);function Xg(e){return g3.has(e)}function lS(e){return e.type===void 0||!Xg(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}const Ap=new Set(["image","video","tour","document"]);function cS(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function Zg(e){const t=Object.values(e).filter(cS).map(s=>s!==null&&typeof s=="object"?s:{}),a=t.filter(s=>s.type!==void 0&&Ap.has(s.type)),r=t.filter(s=>!(s.type!==void 0&&Ap.has(s.type)));return a.length===1&&r.length<=2&&r.every(lS)}function y3(e){var a;if(((a=e.element)==null?void 0:a.type)!=="object")return null;const t=e.element.fields;return t!==null&&typeof t=="object"?t:{}}function uS(e,t){var s,c;const a=y3(e);if(a!==null)return Zg(a)?"annotated-media":"object";const r=(s=e.element)==null?void 0:s.type;return r!==void 0&&Ap.has(r)?"media":r==="media"?((c=e.element)==null?void 0:c.from)===void 0&&t==="home"?"upload":"media":r==="row"?"row":r==="poi"?"poi":"scalar"}const b3={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 v3(e,t,a){const r=uS(e,a),s=r==="object"||r==="annotated-media"?"item":"unit";return{itemKind:r,view:b3[r][t],granularity:s}}const x3=["verb","unique","brief","none","reads"];new Set(x3);function mw(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function w3(e){return!mw(e)||!Array.isArray(e.fills)?[]:e.fills.filter(mw).map(t=>({...t,kind:"fill"}))}function Wg(e){return e!==null&&typeof e=="object"?e:null}function pc(e){const t=Wg(e);if((t==null?void 0:t.kind)!=="row")return null;const{slot:a,field:r}=t;return typeof a!="string"||a===""||typeof r!="string"||r===""?null:{slot:a,field:r}}function dS(e){return Object.entries(e??{}).filter(([,t])=>{var a;return t.type==="row"&&((a=Wg(t.source))==null?void 0:a.kind)==="element"}).map(([t])=>t)}function k3(e){const t=new Set(dS(e)),a={};for(const[r,s]of Object.entries(e??{})){const c=pc(s.source);c!==null&&t.has(c.slot)&&(a[r]=c.field)}return a}function yd(e){var t;if(((t=e.element)==null?void 0:t.type)==="object")return e.element.fields}function _3(e){return yd(e)!==void 0}function S3(e){const t=Wg(e.source);if(t===null||t.kind==="authored")return{kind:"none"};const{kind:a,key:r,section:s,slot:c,transform:u}=t;if(a==="home"&&typeof r=="string"){const m=qt(r);if(m!==null)return{kind:"table",table:m.table}}return a==="section"&&typeof s=="string"&&typeof c=="string"?{kind:"section",section:s,slot:c}:a==="derived"&&typeof u=="string"?{kind:"derived",transform:u}:{kind:"other"}}function bd(e){return A_(Ja).has(e)}function E3(e){const t=A_(Ja).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function j3(e){return E3(e).value_type}function O3(){return d4(Ja)}function A3(e){return typeof e=="string"&&O3().includes(e)}function N3(e){return{address:e.address,lat:e.address.latitude,lon:e.address.longitude,listing_intent:e.listing_intent,description:e.description,hero:e.hero,site_url:e.site_url}}function Pm(e){return typeof e=="string"?e:null}function M3(e){const t=Wi(e);return t===void 0?null:{media:t}}function C3(e,t){switch(e){case"property.listing_intent":return Pm(t.listing_intent);case"property.description":return Pm(t.description);case"property.hero":return M3(t.hero);case"property.site_url":return Pm(t.site_url);default:{const a=t.address!==null&&typeof t.address=="object"?t.address:{},r=_i({...a,latitude:t.lat,longitude:t.lon});return e==="property.address"?r:r===null?null:r[e.slice(17)]}}}function Jg(e){return C_(M_(e)==="library"?Es:Ja,e)}function ey(e,t){return _s(Jg(e),t)}function pw(e){return Object.keys(Jg(e))}function ty(e){return e.reading==="legacy"?eo[e.table].idKey:"id"}function R3(e,t){const a=ea[e].row,r=Object.hasOwn(a,t)?a[t]:void 0;if(r===void 0)return{kind:"unknown",offers:Object.keys(a).filter(c=>c!==eo[e].idKey)};const s=r.writeback??null;return{kind:"member",value_type:r.value_type,legacy:t,writeback:s,storable:s!==null}}function T3(e,t){const a=t.indexOf("."),r=a===-1?t:t.slice(0,a),s=ey(e,r),c=s===void 0?null:to(s);if(c===null)return{kind:"unknown",offers:pw(e)};if(a!==-1){const m=t.slice(a+1);return c!=="address"?{kind:"unknown",offers:pw(e)}:Id(m)?{kind:"member",value_type:N_(m),legacy:null,writeback:null,storable:gw(e,t)}:{kind:"unknown",offers:Dg.map(p=>`${r}.${p}`)}}const u=Vr(e)?A4(e,t):null;return{kind:"member",value_type:c,legacy:u,writeback:u===null||!Vr(e)?null:T5(e,u),storable:gw(e,t)}}function fS(e,t){return t===ty(e)?{kind:"identity"}:e.reading==="legacy"?R3(e.table,t):T3(e.table,t)}function gw(e,t){var r;if(t===void 0){if(((r=qt(e))==null?void 0:r.reading)==="registry")return!0;if(!bd(e))return!1;const s=e.slice(0,e.lastIndexOf("."));return!(bd(s)&&j3(s)==="address")}if(!Object.hasOwn(Pr,e))return!1;const a=ey(e,t);return a!==void 0&&!f4(a)}function yw(e,t){const a=t.source;return(a==null?void 0:a.kind)!=="row"||typeof a.field!="string"||fS(e,a.field).kind==="unknown"?null:a.field}const D3={unit:"units",contact:"contacts"};function ny(e,t){if(t!=null){const c=(Vr(t)?yw({table:t,reading:"legacy"},e):null)??yw({table:t,reading:"registry"},e);if(c!==null)return bw(t,c,"scope")}const a=e.source;if((a==null?void 0:a.kind)!=="home"||!Object.hasOwn(pp,a.key))return null;const r=pp[a.key].container,s=D3[r];return s!==void 0?bw(s,a.key,"primary"):null}function bw(e,t,a){const r=ey(e,t),s=Vr(e)?D5(e,t):null,c=(s==null?void 0:s.value_type)??(r===void 0?null:to(r));if(c==null)return null;const u=r===void 0?void 0:bp(r);return{table:e,member:t,value_type:c,...u!==void 0?{filter:u}:{},row:a}}const Pd={kind:"owned"};function vw(e){return e===null?Pd:{kind:"picked",filter:e}}function ds(e,t){if(e.from!==void 0)return vw(hd(e));const a=ny(e,t);return a===null?null:a.filter===void 0?Pd:vw(hd({type:e.type,from:a.filter.from}))}function Vd(e,t){return ds(e,t)??Pd}function L3(e,t,a){return ds(t,a)??ds({...t,source:e.source},a)}function z3(e,t,a){var s;const r=ds(t,a.itemTable);return r!==null?r:a.picksBy!==null&&((s=t.source)==null?void 0:s.kind)==="element"?{kind:"picked",filter:a.picksBy}:ds({...t,source:e.source},a.listTable)??Pd}const xw=1e-6;function $3(e,t){return e.w/e.h>t?{w:e.h*t,h:e.h}:{w:e.w,h:e.w/t}}function U3(e,t){const a=Math.max(e.w,e.h*t);return{w:a,h:a/t}}function I3(e,t){const a=Math.min(1,t.width/e.w,t.height/e.h);return{w:e.w*a,h:e.h*a}}function ww(e,t,a){const r=(s,c,u)=>Math.min(Math.max(s-c/2,0),u-c);return{x:r(t.x,e.w,a.width),y:r(t.y,e.h,a.height),w:e.w,h:e.h}}function B3(e,t,a,r){const s=U3(e,r);return s.w<=a.width+xw&&s.h<=a.height+xw?ww(I3(s,a),{x:e.x+e.w/2,y:e.y+e.h/2},a):ww($3({w:a.width,h:a.height},r),t,a)}const kw=16/10;function hS(e){var c;if(e===null||typeof e!="object")return{mode:"free",aspect:kw};const t=e,a=typeof t.aspect=="number"&&t.aspect>0?t.aspect:kw,r=(c=t.mobile)==null?void 0:c.aspect,s=typeof r=="number"&&r>0&&Math.abs(r-a)>1e-4?r:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:a,...s===void 0?{}:{mobileAspect:s}}}function _w(e){return{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function fs(e,t){if(e===null||t===null)return e===t;const a=r=>Math.round(r*1e4)/1e4;return a(e.x)===a(t.x)&&a(e.y)===a(t.y)&&a(e.width)===a(t.width)&&a(e.height)===a(t.height)}function H3(e,t,a){const{width:r,height:s}=t,c={x:e.x*r,y:e.y*s,w:e.width*r,h:e.height*s},u=B3(c,{x:c.x+c.w/2,y:c.y+c.h/2},t,a),m={x:u.x/r,y:u.y/s,width:u.w/r,height:u.h/s};return fs(m,{x:0,y:0,width:1,height:1})?null:m}function Sw(e,t,a){return e===null||a===null?e:t===null?null:H3(e,t,a)}function mS(e,t){if(e===null||!(e>0)||!(t>0))return null;const a=Math.min(1,t/e),r=Math.min(1,e/t),s={x:(1-a)/2,y:0,width:a,height:r};return fs(s,{x:0,y:0,width:1,height:1})?null:s}function q3(e,t,a){var u,m;const r=qd(e).get(a);if(r===void 0)return;const s=fc(t)??[fd],c=[...s,...Gr(s[0]).slice(1).filter(p=>!s.includes(p))];for(const p of c){const g=(m=(u=S_(e,p))==null?void 0:u.find(({id:v})=>v===a))==null?void 0:m.value;if(g!==void 0)return ws(g)?Ug(r,g):r}return r}function F3(e,t,a){const r=t.width!==null&&t.height!==null&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null,s=Sw(e.crop,r,a.mode==="free"?null:a.aspect),c=s===null||a.mobileAspect===void 0?null:Sw(e.crop,r,a.mobileAspect),u=Object.values(e.renditions).some(m=>m!==null);return{asset_id:e.file,picked:e.id,name:e.name,...s===null?{}:{rect:_w(s)},...r===null?{}:{ar:r.width/r.height},...c===null?{}:{mobile:{rect:_w(c),derived:!0}},...u?{renditions:e.renditions}:{}}}function iy(e){var s;const{mode:t,aspect:a,mobileAspect:r}=hS(e.crop);return{mode:t,aspect:a,aspectLabel:(s=e.crop)==null?void 0:s.aspectLabel,mobileAspect:r}}function vd(e,t,a){if(e==="free")return{nx:0,ny:0,nw:1,nh:1};const r=mS(t,a);return r===null?{nx:0,ny:0,nw:1,nh:1}:{nx:r.x,ny:r.y,nw:r.width,nh:r.height}}function Ew(e,t,a){const r=e.nx+e.nw/2,s=e.ny+e.nh/2;if(!t||!a)return{...e};const c=t/a;let u=e.nw,m=u/c;return m>e.nh&&(m=e.nh,u=m*c),{nx:r-u/2,ny:s-m/2,nw:u,nh:m}}function ay(e){const t=a=>Math.round(a*1e4)/1e4;return t(e.nx)===0&&t(e.ny)===0&&t(e.nw)===1&&t(e.nh)===1}function P3(e,t,a,r){const s=e==null?void 0:e.rect;return s&&s.nw&&s.nh?{nx:s.nx,ny:s.ny,nw:s.nw,nh:s.nh}:vd(t,a,r)}const Ma=52,V3=1,G3=6,K3=.94,on=(e,t,a)=>a<t?t:Math.max(t,Math.min(a,e));function Pu(e,t,a,r,s,c,u){e=Math.max(Ma,e);const m=s>0?u.r-a:a-u.l;e=Math.min(e,m);let p=e/t;const g=c>0?u.b-r:r-u.t;return p>g&&(p=g,e=p*t),{w:Math.max(Ma,e),h:Math.max(Ma,e/t)}}function Y3({src:e,mode:t,aspect:a,seed:r}){const s=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}),v=x.useRef(!1),b=x.useRef(r??null),[w,_]=x.useState(null),E=()=>{const K=u.current,Q=m.current;if(!K||!Q.w)return{w:0,h:0};const se=Math.min(Q.w/K.w,Q.h/K.h)*K3;return{w:K.w*se,h:K.h*se}},S=()=>{const K=E(),Q=p.current,se=K.w*Q.z,N=K.h*Q.z;return{l:Q.icx-se/2,t:Q.icy-N/2,r:Q.icx+se/2,b:Q.icy+N/2,w:se,h:N}},j=()=>{const K=S(),Q=m.current;return{l:Math.max(K.l,0),t:Math.max(K.t,0),r:Math.min(K.r,Q.w),b:Math.min(K.b,Q.h)}},C=()=>{const K=S(),Q=g.current,se=p.current,N=K.w/2,V=K.h/2;K.w>=Q.w&&(se.icx=on(se.icx,Q.x+Q.w-N,Q.x+N)),K.h>=Q.h&&(se.icy=on(se.icy,Q.y+Q.h-V,Q.y+V))},A=()=>{const K=g.current,Q=j(),se=Q.r-Q.l,N=Q.b-Q.t;if(t==="locked"){let V=Math.min(K.w,se),te=V/a;te>N&&(te=N,V=te*a),K.w=V,K.h=te}else K.w=Math.min(K.w,se),K.h=Math.min(K.h,N);K.x=on(K.x,Q.l,Q.r-K.w),K.y=on(K.y,Q.t,Q.b-K.h)},O=()=>{A(),C(),A()},T=K=>{const Q=m.current;if(!Q.w||!u.current)return;p.current={z:1,icx:Q.w/2,icy:Q.h/2};const se=S(),N=u.current.w/u.current.h,V=K?P3(b.current,t,N,a):vd(t,N,a);g.current={x:se.l+V.nx*se.w,y:se.t+V.ny*se.h,w:V.nw*se.w,h:V.nh*se.h},O(),v.current=!0,c()};x.useEffect(()=>{v.current=!1,u.current=null,c();const K=new Image;K.onload=()=>{u.current={w:K.naturalWidth||1,h:K.naturalHeight||1},T(!0)},K.src=e},[e]),x.useEffect(()=>{b.current=r??null},[r]),x.useEffect(()=>{u.current&&T(!1)},[t,a]),x.useLayoutEffect(()=>{const K=s.current;if(!K)return;const Q=()=>{const N=K.getBoundingClientRect(),V=m.current.w;m.current={w:N.width,h:N.height},!V&&u.current?T(!0):V&&(O(),c())};Q();const se=new ResizeObserver(Q);return se.observe(K),()=>se.disconnect()},[]);const R=K=>{const Q=s.current.getBoundingClientRect();return{x:K.clientX-Q.left,y:K.clientY-Q.top}},B=K=>{var te,me;if(K.button)return;K.stopPropagation(),(me=(te=K.currentTarget).setPointerCapture)==null||me.call(te,K.pointerId),_("move");const Q=R(K),se={...g.current},N=Y=>{const M=R(Y),H=j(),I=g.current;I.x=on(se.x+(M.x-Q.x),H.l,H.r-I.w),I.y=on(se.y+(M.y-Q.y),H.t,H.b-I.h),c()},V=()=>{window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),_(null)};window.addEventListener("pointermove",N),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},D=K=>Q=>{var Y,M;if(Q.button)return;Q.stopPropagation(),(M=(Y=Q.currentTarget).setPointerCapture)==null||M.call(Y,Q.pointerId),_(K);const se=g.current,N={l:se.x,t:se.y,r:se.x+se.w,b:se.y+se.h},V=R(Q),te=H=>{const I=R(H),F=j(),W=I.x-V.x,pe=I.y-V.y;let oe=N.l,ke=N.t,z=N.r,ce=N.b;if(t==="free")K.includes("w")&&(oe=on(N.l+W,F.l,z-Ma)),K.includes("e")&&(z=on(N.r+W,oe+Ma,F.r)),K.includes("n")&&(ke=on(N.t+pe,F.t,ce-Ma)),K.includes("s")&&(ce=on(N.b+pe,ke+Ma,F.b));else{const ye=a;if(K==="se"){const Se=Pu(N.r+W-N.l,ye,N.l,N.t,1,1,F);oe=N.l,ke=N.t,z=oe+Se.w,ce=ke+Se.h}else if(K==="nw"){const Se=Pu(N.r-(N.l+W),ye,N.r,N.b,-1,-1,F);z=N.r,ce=N.b,oe=z-Se.w,ke=ce-Se.h}else if(K==="ne"){const Se=Pu(N.r+W-N.l,ye,N.l,N.b,1,-1,F);oe=N.l,ce=N.b,z=oe+Se.w,ke=ce-Se.h}else if(K==="sw"){const Se=Pu(N.r-(N.l+W),ye,N.r,N.t,-1,1,F);z=N.r,ke=N.t,oe=z-Se.w,ce=ke+Se.h}else{const Se=(N.l+N.r)/2,Le=(N.t+N.b)/2;let Ie=se.w,ge=se.h;K==="e"?Ie=(N.r+W-Se)*2:K==="w"?Ie=(Se-(N.l+W))*2:K==="s"?(ge=(N.b+pe-Le)*2,Ie=ge*ye):K==="n"&&(ge=(Le-(N.t+pe))*2,Ie=ge*ye),Ie=Math.max(Ma,Ie),ge=Ie/ye,Ie=Math.min(Ie,F.r-F.l),ge=Ie/ye,ge>F.b-F.t&&(ge=F.b-F.t,Ie=ge*ye),oe=on(Se-Ie/2,F.l,F.r-Ie),ke=on(Le-ge/2,F.t,F.b-ge),z=oe+Ie,ce=ke+ge}}g.current={x:oe,y:ke,w:z-oe,h:ce-ke},c()},me=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",me),window.removeEventListener("pointercancel",me),_(null)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me)},L=(K,Q,se)=>{const N=p.current;K=on(K,V3,G3);const V=K/N.z;N.icx=Q+(N.icx-Q)*V,N.icy=se+(N.icy-se)*V,N.z=K,O(),c()},P=K=>{const Q=m.current;L(p.current.z*K,Q.w/2,Q.h/2)},le=x.useRef(()=>{});le.current=K=>{K.preventDefault();const Q=m.current,se=Math.exp(-K.deltaY*.0015*(K.ctrlKey?2.6:1));L(p.current.z*se,Q.w/2,Q.h/2)},x.useEffect(()=>{const K=s.current;if(!K)return;const Q=se=>le.current(se);return K.addEventListener("wheel",Q,{passive:!1}),()=>K.removeEventListener("wheel",Q)},[]);const ee=()=>T(!1),de=()=>{const K=S(),Q=g.current;return K.w?{nx:on((Q.x-K.l)/K.w,0,1),ny:on((Q.y-K.t)/K.h,0,1),nw:on(Q.w/K.w,0,1),nh:on(Q.h/K.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:s,ready:v.current,activeHandle:w,imgRect:S,box:g.current,view:p.current,onBoxDown:B,onHandleDown:D,zoomBy:P,reset:ee,cropValue:de,natAspect:u.current?u.current.w/u.current.h:null}}function Q3({chrome:e,pct:t,onZoomOut:a,onZoomIn:r,resetSlot:s,children:c}){return d.jsxs("div",{className:e.foot,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[s,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:a,"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:r,"aria-label":"Zoom in",children:d.jsx(e.ZoomInIcon,{})})]})]}),d.jsx("div",{className:e.actions,children:c})]})}const X3=["n","s","e","w"],Z3=["nw","ne","sw","se"];function W3({cr:e,mode:t,src:a,stageClassName:r}){const s=e.imgRect(),c=e.box,u=e.activeHandle!==null;return d.jsx("div",{className:`we-cs-stage ${r}`,ref:e.stageRef,children:e.ready&&d.jsxs(d.Fragment,{children:[d.jsx("img",{className:"we-cs-img",src:a,alt:"",draggable:!1,style:{left:s.l,top:s.t,width:s.w,height:s.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",{})]}),X3.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h edge ${m}`,onPointerDown:e.onHandleDown(m)},m)),Z3.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h corner ${m}`,onPointerDown:e.onHandleDown(m)},m))]})]})})}const J3=x.forwardRef(function({chrome:t,src:a,mode:r,aspect:s,seed:c,stageClassName:u="h-[412px]",footerActions:m,onUserEdit:p},g){const v=Y3({src:a,mode:r,aspect:s,seed:c});x.useImperativeHandle(g,()=>({cropValue:()=>v.cropValue(),natAspect:()=>v.natAspect}),[v]);const b=Math.round(v.view.z*100)+"%",w=x.useRef(!1),_=x.useRef(!1),E=()=>{_.current=!0},S=()=>{_.current&&!w.current&&(w.current=!0,p==null||p())},j=()=>{_.current=!1};return d.jsxs(d.Fragment,{children:[d.jsx("div",{onPointerDownCapture:E,onPointerMoveCapture:S,onPointerUpCapture:j,children:d.jsx(W3,{cr:v,mode:r,src:a,stageClassName:u})}),d.jsx(Q3,{chrome:t,pct:b,onZoomOut:()=>v.zoomBy(1/1.25),onZoomIn:()=>v.zoomBy(1.25),resetSlot:d.jsx("button",{type:"button",className:t.buttonLink,onClick:v.reset,children:"Reset"}),children:m})]})});function pS(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(a=pS(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function ry(){for(var e,t,a=0,r="",s=arguments.length;a<s;a++)(e=arguments[a])&&(t=pS(e))&&(r&&(r+=" "),r+=t);return r}const eT=(e,t)=>{const a=new Array(e.length+t.length);for(let r=0;r<e.length;r++)a[r]=e[r];for(let r=0;r<t.length;r++)a[e.length+r]=t[r];return a},tT=(e,t)=>({classGroupId:e,validator:t}),gS=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),xd="-",jw=[],nT="arbitrary..",iT=e=>{const t=rT(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return aT(u);const m=u.split(xd),p=m[0]===""&&m.length>1?1:0;return yS(m,p,t)},getConflictingClassGroupIds:(u,m)=>{if(m){const p=r[u],g=a[u];return p?g?eT(g,p):p:g||jw}return a[u]||jw}}},yS=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const s=e[t],c=a.nextPart.get(s);if(c){const g=yS(e,t+1,c);if(g)return g}const u=a.validators;if(u===null)return;const m=t===0?e.join(xd):e.slice(t).join(xd),p=u.length;for(let g=0;g<p;g++){const v=u[g];if(v.validator(m))return v.classGroupId}},aT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),r=t.slice(0,a);return r?nT+r:void 0})(),rT=e=>{const{theme:t,classGroups:a}=e;return oT(a,t)},oT=(e,t)=>{const a=gS();for(const r in e){const s=e[r];oy(s,a,r,t)}return a},oy=(e,t,a,r)=>{const s=e.length;for(let c=0;c<s;c++){const u=e[c];sT(u,t,a,r)}},sT=(e,t,a,r)=>{if(typeof e=="string"){lT(e,t,a);return}if(typeof e=="function"){cT(e,t,a,r);return}uT(e,t,a,r)},lT=(e,t,a)=>{const r=e===""?t:bS(t,e);r.classGroupId=a},cT=(e,t,a,r)=>{if(dT(e)){oy(e(r),t,a,r);return}t.validators===null&&(t.validators=[]),t.validators.push(tT(a,e))},uT=(e,t,a,r)=>{const s=Object.entries(e),c=s.length;for(let u=0;u<c;u++){const[m,p]=s[u];oy(p,bS(t,m),a,r)}},bS=(e,t)=>{let a=e;const r=t.split(xd),s=r.length;for(let c=0;c<s;c++){const u=r[c];let m=a.nextPart.get(u);m||(m=gS(),a.nextPart.set(u,m)),a=m}return a},dT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),r=Object.create(null);const s=(c,u)=>{a[c]=u,t++,t>e&&(t=0,r=a,a=Object.create(null))};return{get(c){let u=a[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in a?a[c]=u:s(c,u)}}},Np="!",Ow=":",hT=[],Aw=(e,t,a,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:r,isExternal:s}),mT=e=>{const{prefix:t,experimentalParseClassName:a}=e;let r=s=>{const c=[];let u=0,m=0,p=0,g;const v=s.length;for(let S=0;S<v;S++){const j=s[S];if(u===0&&m===0){if(j===Ow){c.push(s.slice(p,S)),p=S+1;continue}if(j==="/"){g=S;continue}}j==="["?u++:j==="]"?u--:j==="("?m++:j===")"&&m--}const b=c.length===0?s:s.slice(p);let w=b,_=!1;b.endsWith(Np)?(w=b.slice(0,-1),_=!0):b.startsWith(Np)&&(w=b.slice(1),_=!0);const E=g&&g>p?g-p:void 0;return Aw(c,_,w,E)};if(t){const s=t+Ow,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):Aw(hT,!1,u,void 0,!0)}if(a){const s=r;r=c=>a({className:c,parseClassName:s})}return r},pT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,r)=>{t.set(a,1e6+r)}),a=>{const r=[];let s=[];for(let c=0;c<a.length;c++){const u=a[c],m=u[0]==="[",p=t.has(u);m||p?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(u)):s.push(u)}return s.length>0&&(s.sort(),r.push(...s)),r}},gT=e=>({cache:fT(e.cacheSize),parseClassName:mT(e),sortModifiers:pT(e),postfixLookupClassGroupIds:yT(e),...iT(e)}),yT=e=>{const t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let r=0;r<a.length;r++)t[a[r]]=!0;return t},bT=/\s+/,vT=(e,t)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c,postfixLookupClassGroupIds:u}=t,m=[],p=e.trim().split(bT);let g="";for(let v=p.length-1;v>=0;v-=1){const b=p[v],{isExternal:w,modifiers:_,hasImportantModifier:E,baseClassName:S,maybePostfixModifierPosition:j}=a(b);if(w){g=b+(g.length>0?" "+g:g);continue}let C=!!j,A;if(C){const D=S.substring(0,j);A=r(D);const L=A&&u[A]?r(S):void 0;L&&L!==A&&(A=L,C=!1)}else A=r(S);if(!A){if(!C){g=b+(g.length>0?" "+g:g);continue}if(A=r(S),!A){g=b+(g.length>0?" "+g:g);continue}C=!1}const O=_.length===0?"":_.length===1?_[0]:c(_).join(":"),T=E?O+Np:O,R=T+A;if(m.indexOf(R)>-1)continue;m.push(R);const B=s(A,C);for(let D=0;D<B.length;++D){const L=B[D];m.push(T+L)}g=b+(g.length>0?" "+g:g)}return g},xT=(...e)=>{let t=0,a,r,s="";for(;t<e.length;)(a=e[t++])&&(r=vS(a))&&(s&&(s+=" "),s+=r);return s},vS=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=vS(e[r]))&&(a&&(a+=" "),a+=t);return a},wT=(e,...t)=>{let a,r,s,c;const u=p=>{const g=t.reduce((v,b)=>b(v),e());return a=gT(g),r=a.cache.get,s=a.cache.set,c=m,m(p)},m=p=>{const g=r(p);if(g)return g;const v=vT(p,a);return s(p,v),v};return c=u,(...p)=>c(xT(...p))},kT=[],Vt=e=>{const t=a=>a[e]||kT;return t.isThemeGetter=!0,t},xS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_T=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ST=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ET=/\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$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Aa=e=>_T.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),yi=e=>!!e&&Number.isInteger(Number(e)),Vm=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Ki=e=>ST.test(e),kS=()=>!0,NT=e=>ET.test(e)&&!jT.test(e),sy=()=>!1,MT=e=>OT.test(e),CT=e=>AT.test(e),RT=e=>!Ee(e)&&!je(e),TT=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)),DT=e=>er(e,ES,sy),Ee=e=>xS.test(e),_r=e=>er(e,jS,NT),Nw=e=>er(e,qT,Ke),LT=e=>er(e,AS,kS),zT=e=>er(e,OS,sy),Mw=e=>er(e,_S,sy),$T=e=>er(e,SS,CT),Vu=e=>er(e,NS,MT),je=e=>wS.test(e),Al=e=>no(e,jS),UT=e=>no(e,OS),Cw=e=>no(e,_S),IT=e=>no(e,ES),BT=e=>no(e,SS),Gu=e=>no(e,NS,!0),HT=e=>no(e,AS,!0),er=(e,t,a)=>{const r=xS.exec(e);return r?r[1]?t(r[1]):a(r[2]):!1},no=(e,t,a=!1)=>{const r=wS.exec(e);return r?r[1]?t(r[1]):a:!1},_S=e=>e==="position"||e==="percentage",SS=e=>e==="image"||e==="url",ES=e=>e==="length"||e==="size"||e==="bg-size",jS=e=>e==="length",qT=e=>e==="number",OS=e=>e==="family-name",AS=e=>e==="number"||e==="weight",NS=e=>e==="shadow",FT=()=>{const e=Vt("color"),t=Vt("font"),a=Vt("text"),r=Vt("font-weight"),s=Vt("tracking"),c=Vt("leading"),u=Vt("breakpoint"),m=Vt("container"),p=Vt("spacing"),g=Vt("radius"),v=Vt("shadow"),b=Vt("inset-shadow"),w=Vt("text-shadow"),_=Vt("drop-shadow"),E=Vt("blur"),S=Vt("perspective"),j=Vt("aspect"),C=Vt("ease"),A=Vt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...T(),je,Ee],B=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],L=()=>[je,Ee,p],P=()=>[Aa,"full","auto",...L()],le=()=>[yi,"none","subgrid",je,Ee],ee=()=>["auto",{span:["full",yi,je,Ee]},yi,je,Ee],de=()=>[yi,"auto",je,Ee],K=()=>["auto","min","max","fr",je,Ee],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...L()],V=()=>[Aa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],te=()=>[Aa,"screen","full","dvw","lvw","svw","min","max","fit",...L()],me=()=>[Aa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],Y=()=>[e,je,Ee],M=()=>[...T(),Cw,Mw,{position:[je,Ee]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",IT,DT,{size:[je,Ee]}],F=()=>[Vm,Al,_r],W=()=>["","none","full",g,je,Ee],pe=()=>["",Ke,Al,_r],oe=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Ke,Vm,Cw,Mw],ce=()=>["","none",E,je,Ee],ye=()=>["none",Ke,je,Ee],Se=()=>["none",Ke,je,Ee],Le=()=>[Ke,je,Ee],Ie=()=>[Aa,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ki],breakpoint:[Ki],color:[kS],container:[Ki],"drop-shadow":[Ki],ease:["in","out","in-out"],font:[RT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ki],shadow:[Ki],spacing:["px",Ke],text:[Ki],"text-shadow":[Ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Aa,Ee,je,j]}],container:["container"],"container-type":[{"@container":["","normal","size",je,Ee]}],"container-named":[TT],columns:[{columns:[Ke,Ee,je,m]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[yi,"auto",je,Ee]}],basis:[{basis:[Aa,"full","auto",m,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Aa,"auto","initial","none",Ee]}],grow:[{grow:["",Ke,je,Ee]}],shrink:[{shrink:["",Ke,je,Ee]}],order:[{order:[yi,"first","last","none",je,Ee]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"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",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],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",a,Al,_r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,HT,LT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vm,Ee]}],"font-family":[{font:[UT,zT,t]}],"font-features":[{"font-features":[Ee]}],"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:[s,je,Ee]}],"line-clamp":[{"line-clamp":[Ke,"none",je,Nw]}],leading:[{leading:[c,...L()]}],"list-image":[{"list-image":["none",je,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",je,_r]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Ke,"auto",je,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[yi,je,Ee]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Ee]}],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",je,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yi,je,Ee],radial:["",je,Ee],conic:[yi,je,Ee]},BT,$T]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,je,Ee]}],"outline-w":[{outline:["",Ke,Al,_r]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",v,Gu,Vu]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",b,Gu,Vu]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Ke,_r]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",w,Gu,Vu]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Ke,je,Ee]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[je,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Ee]}],filter:[{filter:["","none",je,Ee]}],blur:[{blur:ce()}],brightness:[{brightness:[Ke,je,Ee]}],contrast:[{contrast:[Ke,je,Ee]}],"drop-shadow":[{"drop-shadow":["","none",_,Gu,Vu]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Ke,je,Ee]}],"hue-rotate":[{"hue-rotate":[Ke,je,Ee]}],invert:[{invert:["",Ke,je,Ee]}],saturate:[{saturate:[Ke,je,Ee]}],sepia:[{sepia:["",Ke,je,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Ee]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,je,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,je,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,je,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,je,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Ke,je,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,je,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,je,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,je,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",je,Ee]}],ease:[{ease:["linear","initial",C,je,Ee]}],delay:[{delay:[Ke,je,Ee]}],animate:[{animate:["none",A,je,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,je,Ee]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[je,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],zoom:[{zoom:[yi,je,Ee]}],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",je,Ee]}],"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":Y()}],"scrollbar-track-color":[{"scrollbar-track":Y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",je,Ee]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Ke,Al,_r,Nw]}],stroke:[{stroke:["none",...Y()]}],"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"]}},ly=wT(FT);function Rw(...e){return ly(ry(e))}function PT({view:e,onChange:t,className:a}){const r=(s,c,u)=>d.jsx("button",{type:"button","aria-label":c,"aria-pressed":e===s,onClick:()=>t(s),className:Rw("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",e===s?"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:Rw("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",a),children:[r("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),r("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 VT=(e,t)=>{const a=r=>Math.round(r*1e4)/1e4;return a(e.nx)===a(t.nx)&&a(e.ny)===a(t.ny)&&a(e.nw)===a(t.nw)&&a(e.nh)===a(t.nh)};function cy({chrome:e,open:t=!0,src:a,mode:r,aspect:s,mobileAspect:c,seed:u,mobileSeed:m,onApply:p,onClose:g,title:v="Crop photo",subtitle:b,variant:w="crop",stageClassName:_="h-[412px]"}){const[E]=x.useState(a),S=c!=null&&Math.abs(c-s)>1e-4,[j,C]=x.useState("desktop"),[A,O]=x.useState({desktop:(u==null?void 0:u.rect)??null,mobile:(m==null?void 0:m.rect)??null}),T=x.useRef(!(m!=null&&m.rect)),R=x.useRef(null),B=Q=>Q==="mobile"?c??s:s,D=()=>{var Q;return((Q=R.current)==null?void 0:Q.natAspect())??s},L=Q=>!(u!=null&&u.rect)&&(Q===null||VT(Q,vd(r,D(),s))),P=Q=>({rect:Q==="desktop"?A.desktop:A.mobile}),le=()=>{var Q;return((Q=R.current)==null?void 0:Q.cropValue())??null},ee=Q=>{if(Q===j)return;const se=le();O(N=>{const V={...N,[j]:se??N[j]};if(j==="desktop"&&T.current){const te=V.desktop??se;V.mobile=te&&!L(te)?Ew(te,c??s,D()):null}return V}),C(Q)},de=()=>{j==="mobile"&&(T.current=!1)},K=()=>{const Q=le(),se=D(),N=(j==="desktop"?Q:A.desktop)??Q??{nx:0,ny:0,nw:1,nh:1};let V={rect:N,ar:se};if(S){let te=j==="mobile"?Q:A.mobile;te||(te=L(N)?vd(r,se,c??s):Ew(N,c??s,se)),V={...V,mobile:{rect:te,derived:T.current}}}p(V)};return d.jsxs(e.Shell,{open:t,variant:w,onClose:g,children:[d.jsxs("div",{className:e.head,children:[d.jsxs("div",{className:e.titles,children:[d.jsx("h2",{className:e.title,children:v}),b?d.jsx("span",{className:e.subtitle,children:b}):null]}),d.jsx("button",{className:e.close,onClick:g,"aria-label":"Close",children:d.jsx(e.CloseIcon,{})})]}),d.jsxs("div",{className:"relative",children:[S&&d.jsx(PT,{view:j,onChange:ee,className:"absolute right-3 top-3 z-10"}),d.jsx(J3,{ref:R,chrome:e,src:E,mode:r,aspect:B(j),seed:P(j),stageClassName:_,onUserEdit:de,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"})]})},j)]})]})}const Tw=e=>{let t;const a=new Set,r=(g,v)=>{const b=typeof g=="function"?g(t):g;if(!Object.is(b,t)){const w=t;t=v??(typeof b!="object"||b===null)?b:Object.assign({},t,b),a.forEach(_=>_(t,w))}},s=()=>t,m={setState:r,getState:s,getInitialState:()=>p,subscribe:g=>(a.add(g),()=>a.delete(g))},p=t=e(r,s,m);return m},GT=(e=>e?Tw(e):Tw),KT=e=>e;function YT(e,t=KT){const a=Ba.useSyncExternalStore(e.subscribe,Ba.useCallback(()=>t(e.getState()),[e,t]),Ba.useCallback(()=>t(e.getInitialState()),[e,t]));return Ba.useDebugValue(a),a}const Dw=e=>{const t=GT(e),a=r=>YT(t,r);return Object.assign(a,t),a},MS=(e=>e?Dw(e):Dw),uy=MS(e=>({noticeByKey:{},notice:(t,a)=>e(r=>r.noticeByKey[t]===a?r:{noticeByKey:{...r.noticeByKey,[t]:a}}),clearNotice:t=>e(a=>{if(!(t in a.noticeByKey))return a;const r={...a.noticeByKey};return delete r[t],{noticeByKey:r}})}));function QT(e){return uy(t=>t.noticeByKey[e])}const XT=12e4;function Kr(e){return`${e.holder}#${e.mediaId}`}const Tl=MS((e,t)=>({byPlace:{},start:(a,r,s)=>{const c=Kr(a),u={propertyId:r,place:a,crop:s};e(m=>({byPlace:{...m.byPlace,[c]:u}})),setTimeout(()=>{t().byPlace[c]===u&&t().settle(a)},XT)},settle:a=>e(r=>{const s=Kr(a);if(!(s in r.byPlace))return r;const c={...r.byPlace};return delete c[s],{byPlace:c}})})),nd={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}},CS={opacity:nd.dimOpacity,filter:`grayscale(${nd.grayscale})`,transition:`opacity ${nd.transitionMs}ms`};function ZT(){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 dy({label:e="Re-cropping…"}={}){ZT();const t=nd.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 js=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(){}},Nr,Ca,Ko,N2,WT=(N2=class extends js{constructor(){super();Ne(this,Nr);Ne(this,Ca);Ne(this,Ko);xe(this,Ko,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){$(this,Ca)||this.setEventListener($(this,Ko))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ca))==null||t.call(this),xe(this,Ca,void 0))}setEventListener(t){var a;xe(this,Ko,t),(a=$(this,Ca))==null||a.call(this),xe(this,Ca,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Nr)!==t&&(xe(this,Nr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){var t;return typeof $(this,Nr)=="boolean"?$(this,Nr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Nr=new WeakMap,Ca=new WeakMap,Ko=new WeakMap,N2),fy=new WT,JT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ra,yg,M2,eD=(M2=class{constructor(){Ne(this,Ra,JT);Ne(this,yg,!1)}setTimeoutProvider(e){xe(this,Ra,e)}setTimeout(e,t){return $(this,Ra).setTimeout(e,t)}clearTimeout(e){$(this,Ra).clearTimeout(e)}setInterval(e,t){return $(this,Ra).setInterval(e,t)}clearInterval(e){$(this,Ra).clearInterval(e)}},Ra=new WeakMap,yg=new WeakMap,M2),Or=new eD;function tD(e){setTimeout(e,0)}var nD=typeof window>"u"||"Deno"in globalThis;function mn(){}function iD(e,t){return typeof e=="function"?e(t):e}function Mp(e){return typeof e=="number"&&e>=0&&e!==1/0}function RS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qa(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Lw(e,t){const{type:a="all",exact:r,fetchStatus:s,predicate:c,queryKey:u,stale:m}=e;if(u){if(r){if(t.queryHash!==hy(u,t.options))return!1}else if(!hs(t.queryKey,u))return!1}if(a!=="all"){const p=t.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof m=="boolean"&&t.isStale()!==m||s&&s!==t.state.fetchStatus||c&&!c(t))}function zw(e,t){const{exact:a,status:r,predicate:s,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(a){if(Kl(t.options.mutationKey)!==Kl(c))return!1}else if(!hs(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function hy(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kl)(e)}function Kl(e){return JSON.stringify(e,(t,a)=>Cp(a)?Object.keys(a).sort().reduce((r,s)=>(r[s]=a[s],r),{}):a)}function hs(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 r=0;r<t.length;r++)if(!hs(e[r],t[r]))return!1;return!0}const a=Object.keys(t);for(const r of a)if(!hs(e[r],t[r]))return!1;return!0}return!1}var aD=Object.prototype.hasOwnProperty;function my(e,t,a=0){if(e===t)return e;if(a>500)return t;const r=$w(e)&&$w(t);if(!r&&!(Cp(e)&&Cp(t)))return t;const c=(r?e:Object.keys(e)).length,u=r?t:Object.keys(t),m=u.length,p=r?new Array(m):{};let g=0;for(let v=0;v<m;v++){const b=r?v:u[v],w=e[b],_=t[b];if(w===_){p[b]=w,(r?v<c:aD.call(e,b))&&g++;continue}if(w===null||_===null||typeof w!="object"||typeof _!="object"){p[b]=_;continue}const E=my(w,_,a+1);p[b]=E,E===w&&g++}return c===m&&g===c?e:p}function wd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(e[a]!==t[a])return!1;return!0}function $w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Cp(e){if(!Uw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!Uw(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Uw(e){return Object.prototype.toString.call(e)==="[object Object]"}function rD(e){return new Promise(t=>{Or.setTimeout(t,e)})}function Rp(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?my(e,t):t}function oD(e,t,a=0){const r=[...e,t];return a&&r.length>a?r.slice(1):r}function sD(e,t,a=0){const r=[t,...e];return a&&r.length>a?r.slice(0,-1):r}var py=Symbol();function TS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===py?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function DS(e,t){return typeof e=="function"?e(...t):!!e}function lD(e,t,a){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}var Yl=(()=>{let e=()=>nD;return{isServer(){return e()},setIsServer(t){e=t}}})();function Tp(){let e,t;const a=new Promise((s,c)=>{e=s,t=c});a.status="pending",a.catch(()=>{});function r(s){Object.assign(a,s),delete a.resolve,delete a.reject}return a.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},a.reject=s=>{r({status:"rejected",reason:s}),t(s)},a}var cD=tD;function uD(){let e=[],t=0,a=m=>{m()},r=m=>{m()},s=cD;const c=m=>{t?e.push(m):s(()=>{a(m)})},u=()=>{const m=e;e=[],m.length&&s(()=>{r(()=>{m.forEach(p=>{a(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=>{a=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{s=m}}}var Ht=uD(),Yo,Ta,Qo,C2,dD=(C2=class extends js{constructor(){super();Ne(this,Yo,!0);Ne(this,Ta);Ne(this,Qo);xe(this,Qo,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}})}onSubscribe(){$(this,Ta)||this.setEventListener($(this,Qo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ta))==null||t.call(this),xe(this,Ta,void 0))}setEventListener(t){var a;xe(this,Qo,t),(a=$(this,Ta))==null||a.call(this),xe(this,Ta,t(this.setOnline.bind(this)))}setOnline(t){$(this,Yo)!==t&&(xe(this,Yo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,Yo)}},Yo=new WeakMap,Ta=new WeakMap,Qo=new WeakMap,C2),kd=new dD;function fD(e){return Math.min(1e3*2**e,3e4)}function LS(e){return(e??"online")==="online"?kd.isOnline():!0}var Dp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function zS(e){let t=!1,a=0,r;const s=Tp(),c=()=>s.status!=="pending",u=S=>{var j;if(!c()){const C=new Dp(S);w(C),(j=e.onCancel)==null||j.call(e,C)}},m=()=>{t=!0},p=()=>{t=!1},g=()=>fy.isFocused()&&(e.networkMode==="always"||kd.isOnline())&&e.canRun(),v=()=>LS(e.networkMode)&&e.canRun(),b=S=>{c()||(r==null||r(),s.resolve(S))},w=S=>{c()||(r==null||r(),s.reject(S))},_=()=>new Promise(S=>{var j;r=C=>{(c()||g())&&S(C)},(j=e.onPause)==null||j.call(e)}).then(()=>{var S;r=void 0,c()||(S=e.onContinue)==null||S.call(e)}),E=()=>{if(c())return;let S;const j=a===0?e.initialPromise:void 0;try{S=j??e.fn()}catch(C){S=Promise.reject(C)}Promise.resolve(S).then(b).catch(C=>{var B;if(c())return;const A=e.retry??(Yl.isServer()?0:3),O=e.retryDelay??fD,T=typeof O=="function"?O(a,C):O,R=A===!0||typeof A=="number"&&a<A||typeof A=="function"&&A(a,C);if(t||!R){w(C);return}a++,(B=e.onFail)==null||B.call(e,a,C),rD(T).then(()=>g()?void 0:_()).then(()=>{t?w(C):E()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(r==null||r(),s),cancelRetry:m,continueRetry:p,canStart:v,start:()=>(v()?E():_().then(E),s)}}var Mr,R2,$S=(R2=class{constructor(){Ne(this,Mr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mp(this.gcTime)&&xe(this,Mr,Or.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yl.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Mr)!==void 0&&(Or.clearTimeout($(this,Mr)),xe(this,Mr,void 0))}},Mr=new WeakMap,R2);function hD(e){return{onFetch:(t,a)=>{var v,b,w,_,E;const r=t.options,s=(w=(b=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:b.fetchMore)==null?void 0:w.direction,c=((_=t.state.data)==null?void 0:_.pages)||[],u=((E=t.state.data)==null?void 0:E.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const g=async()=>{let S=!1;const j=O=>{lD(O,()=>t.signal,()=>S=!0)},C=TS(t.options,t.fetchOptions),A=async(O,T,R)=>{if(S)return Promise.reject(t.signal.reason);if(T==null&&O.pages.length)return Promise.resolve(O);const D=(()=>{const ee={client:t.client,queryKey:t.queryKey,pageParam:T,direction:R?"backward":"forward",meta:t.options.meta};return j(ee),ee})(),L=await C(D),{maxPages:P}=t.options,le=R?sD:oD;return{pages:le(O.pages,L,P),pageParams:le(O.pageParams,T,P)}};if(s&&c.length){const O=s==="backward",T=O?mD:Iw,R={pages:c,pageParams:u},B=T(r,R);m=await A(R,B,O)}else{const O=e??c.length;do{const T=p===0?u[0]??r.initialPageParam:Iw(r,m);if(p>0&&T==null)break;m=await A(m,T),p++}while(p<O)}return m};t.options.persister?t.fetchFn=()=>{var S,j;return(j=(S=t.options).persister)==null?void 0:j.call(S,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a)}:t.fetchFn=g}}}function Iw(e,{pages:t,pageParams:a}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,a[r],a):void 0}function mD(e,{pages:t,pageParams:a}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,a[0],a):void 0}var Xo,Cr,Zo,ti,Rr,en,ec,Tr,Un,US,Yi,T2,pD=(T2=class extends $S{constructor(t){super();Ne(this,Un);Ne(this,Xo);Ne(this,Cr);Ne(this,Zo);Ne(this,ti);Ne(this,Rr);Ne(this,en);Ne(this,ec);Ne(this,Tr);xe(this,Tr,!1),xe(this,ec,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,Rr,t.client),xe(this,ti,$(this,Rr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,Cr,Hw(this.options)),this.state=t.state??$(this,Cr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,Xo)}get promise(){var t;return(t=$(this,en))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,ec),...t},t!=null&&t._type&&xe(this,Xo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Hw(this.options);a.data!==void 0&&(this.setState(Bw(a.data,a.dataUpdatedAt)),xe(this,Cr,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,ti).remove(this)}setData(t,a){const r=Rp(this.state.data,t,this.options);return Be(this,Un,Yi).call(this,{data:r,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),r}setState(t){Be(this,Un,Yi).call(this,{type:"setState",state:t})}cancel(t){var r,s;const a=(r=$(this,en))==null?void 0:r.promise;return(s=$(this,en))==null||s.cancel(t),a?a.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Cr)}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===py||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qa(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:!RS(this.state.dataUpdatedAt,t)}onFocus(){var a;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,en))==null||a.continue()}onOnline(){var a;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,en))==null||a.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,ti).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||($(this,en)&&($(this,Tr)||Be(this,Un,US).call(this)?$(this,en).cancel({revert:!0}):$(this,en).cancelRetry()),this.scheduleGc()),$(this,ti).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Un,Yi).call(this,{type:"invalidate"})}async fetch(t,a){var g,v,b,w,_,E,S,j,C,A,O;if(this.state.fetchStatus!=="idle"&&((g=$(this,en))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if($(this,en))return $(this,en).continueRetry(),$(this,en).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(R=>R.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(xe(this,Tr,!0),r.signal)})},c=()=>{const T=TS(this.options,a),B=(()=>{const D={client:$(this,Rr),queryKey:this.queryKey,meta:this.meta};return s(D),D})();return xe(this,Tr,!1),this.options.persister?this.options.persister(T,B,this):T(B)},m=(()=>{const T={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:$(this,Rr),state:this.state,fetchFn:c};return s(T),T})(),p=$(this,Xo)==="infinite"?hD(this.options.pages):this.options.behavior;p==null||p.onFetch(m,this),xe(this,Zo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&Be(this,Un,Yi).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta}),xe(this,en,zS({initialPromise:a==null?void 0:a.initialPromise,fn:m.fetchFn,onCancel:T=>{T instanceof Dp&&T.revert&&this.setState({...$(this,Zo),fetchStatus:"idle"}),r.abort()},onFail:(T,R)=>{Be(this,Un,Yi).call(this,{type:"failed",failureCount:T,error:R})},onPause:()=>{Be(this,Un,Yi).call(this,{type:"pause"})},onContinue:()=>{Be(this,Un,Yi).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const T=await $(this,en).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(_=(w=$(this,ti).config).onSuccess)==null||_.call(w,T,this),(S=(E=$(this,ti).config).onSettled)==null||S.call(E,T,this.state.error,this),T}catch(T){if(T instanceof Dp){if(T.silent)return $(this,en).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw Be(this,Un,Yi).call(this,{type:"error",error:T}),(C=(j=$(this,ti).config).onError)==null||C.call(j,T,this),(O=(A=$(this,ti).config).onSettled)==null||O.call(A,this.state.data,T,this),T}finally{this.scheduleGc()}}},Xo=new WeakMap,Cr=new WeakMap,Zo=new WeakMap,ti=new WeakMap,Rr=new WeakMap,en=new WeakMap,ec=new WeakMap,Tr=new WeakMap,Un=new WeakSet,US=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Yi=function(t){const a=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...IS(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Bw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,Zo,t.manual?s:void 0),s;case"error":const c=t.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=a(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,ti).notify({query:this,type:"updated",action:t})})},T2);function IS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:LS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Bw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,r=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Sn,tt,tc,hn,Dr,Wo,Qi,Da,nc,Jo,es,Lr,zr,La,ts,ct,Dl,Lp,zp,$p,Up,Ip,Bp,Hp,BS,D2,gy=(D2=class extends js{constructor(t,a){super();Ne(this,ct);Ne(this,Sn);Ne(this,tt);Ne(this,tc);Ne(this,hn);Ne(this,Dr);Ne(this,Wo);Ne(this,Qi);Ne(this,Da);Ne(this,nc);Ne(this,Jo);Ne(this,es);Ne(this,Lr);Ne(this,zr);Ne(this,La);Ne(this,ts,new Set);this.options=a,xe(this,Sn,t),xe(this,Da,null),xe(this,Qi,Tp()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,tt).addObserver(this),qw($(this,tt),this.options)?Be(this,ct,Dl).call(this):this.updateResult(),Be(this,ct,Up).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qp($(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qp($(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,ct,Ip).call(this),Be(this,ct,Bp).call(this),$(this,tt).removeObserver(this)}setOptions(t){const a=this.options,r=$(this,tt);if(this.options=$(this,Sn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,$(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,ct,Hp).call(this),$(this,tt).setOptions(this.options),a._defaulted&&!wd(this.options,a)&&$(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,tt),observer:this});const s=this.hasListeners();s&&Fw($(this,tt),r,this.options,a)&&Be(this,ct,Dl).call(this),this.updateResult(),s&&($(this,tt)!==r||In(this.options.enabled,$(this,tt))!==In(a.enabled,$(this,tt))||qa(this.options.staleTime,$(this,tt))!==qa(a.staleTime,$(this,tt)))&&Be(this,ct,Lp).call(this);const c=Be(this,ct,zp).call(this);s&&($(this,tt)!==r||In(this.options.enabled,$(this,tt))!==In(a.enabled,$(this,tt))||c!==$(this,La))&&Be(this,ct,$p).call(this,c)}getOptimisticResult(t){const a=$(this,Sn).getQueryCache().build($(this,Sn),t),r=this.createResult(a,t);return yD(this,r)&&(xe(this,hn,r),xe(this,Wo,this.options),xe(this,Dr,$(this,tt).state)),r}getCurrentResult(){return $(this,hn)}trackResult(t,a){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),a==null||a(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Qi).status==="pending"&&$(this,Qi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){$(this,ts).add(t)}getCurrentQuery(){return $(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=$(this,Sn).defaultQueryOptions(t),r=$(this,Sn).getQueryCache().build($(this,Sn),a);return r.fetch().then(()=>this.createResult(r,a))}fetch(t){return Be(this,ct,Dl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,hn)))}createResult(t,a){var P;const r=$(this,tt),s=this.options,c=$(this,hn),u=$(this,Dr),m=$(this,Wo),g=t!==r?t.state:$(this,tc),{state:v}=t;let b={...v},w=!1,_;if(a._optimisticResults){const le=this.hasListeners(),ee=!le&&qw(t,a),de=le&&Fw(t,r,a,s);(ee||de)&&(b={...b,...IS(v.data,t.options)}),a._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:E,errorUpdatedAt:S,status:j}=b;_=b.data;let C=!1;if(a.placeholderData!==void 0&&_===void 0&&j==="pending"){let le;c!=null&&c.isPlaceholderData&&a.placeholderData===(m==null?void 0:m.placeholderData)?(le=c.data,C=!0):le=typeof a.placeholderData=="function"?a.placeholderData((P=$(this,es))==null?void 0:P.state.data,$(this,es)):a.placeholderData,le!==void 0&&(j="success",_=Rp(c==null?void 0:c.data,le,a),w=!0)}if(a.select&&_!==void 0&&!C)if(c&&_===(u==null?void 0:u.data)&&a.select===$(this,nc))_=$(this,Jo);else try{xe(this,nc,a.select),_=a.select(_),_=Rp(c==null?void 0:c.data,_,a),xe(this,Jo,_),xe(this,Da,null)}catch(le){xe(this,Da,le)}$(this,Da)&&(E=$(this,Da),_=$(this,Jo),S=Date.now(),j="error");const A=b.fetchStatus==="fetching",O=j==="pending",T=j==="error",R=O&&A,B=_!==void 0,L={status:j,fetchStatus:b.fetchStatus,isPending:O,isSuccess:j==="success",isError:T,isInitialLoading:R,isLoading:R,data:_,dataUpdatedAt:b.dataUpdatedAt,error:E,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:b.dataUpdateCount>g.dataUpdateCount||b.errorUpdateCount>g.errorUpdateCount,isFetching:A,isRefetching:A&&!O,isLoadingError:T&&!B,isPaused:b.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:T&&B,isStale:yy(t,a),refetch:this.refetch,promise:$(this,Qi),isEnabled:In(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const le=L.data!==void 0,ee=L.status==="error"&&!le,de=se=>{ee?se.reject(L.error):le&&se.resolve(L.data)},K=()=>{const se=xe(this,Qi,L.promise=Tp());de(se)},Q=$(this,Qi);switch(Q.status){case"pending":t.queryHash===r.queryHash&&de(Q);break;case"fulfilled":(ee||L.data!==Q.value)&&K();break;case"rejected":(!ee||L.error!==Q.reason)&&K();break}}return L}updateResult(){const t=$(this,hn),a=this.createResult($(this,tt),this.options);if(xe(this,Dr,$(this,tt).state),xe(this,Wo,this.options),$(this,Dr).data!==void 0&&xe(this,es,$(this,tt)),wd(a,t))return;xe(this,hn,a);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,c=typeof s=="function"?s():s;if(c==="all"||!c&&!$(this,ts).size)return!0;const u=new Set(c??$(this,ts));return this.options.throwOnError&&u.add("error"),Object.keys($(this,hn)).some(m=>{const p=m;return $(this,hn)[p]!==t[p]&&u.has(p)})};Be(this,ct,BS).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,ct,Up).call(this)}},Sn=new WeakMap,tt=new WeakMap,tc=new WeakMap,hn=new WeakMap,Dr=new WeakMap,Wo=new WeakMap,Qi=new WeakMap,Da=new WeakMap,nc=new WeakMap,Jo=new WeakMap,es=new WeakMap,Lr=new WeakMap,zr=new WeakMap,La=new WeakMap,ts=new WeakMap,ct=new WeakSet,Dl=function(t){Be(this,ct,Hp).call(this);let a=$(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(a=a.catch(mn)),a},Lp=function(){Be(this,ct,Ip).call(this);const t=qa(this.options.staleTime,$(this,tt));if(Yl.isServer()||$(this,hn).isStale||!Mp(t))return;const r=RS($(this,hn).dataUpdatedAt,t)+1;xe(this,Lr,Or.setTimeout(()=>{$(this,hn).isStale||this.updateResult()},r))},zp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,tt)):this.options.refetchInterval)??!1},$p=function(t){Be(this,ct,Bp).call(this),xe(this,La,t),!(Yl.isServer()||In(this.options.enabled,$(this,tt))===!1||!Mp($(this,La))||$(this,La)===0)&&xe(this,zr,Or.setInterval(()=>{(this.options.refetchIntervalInBackground||fy.isFocused())&&Be(this,ct,Dl).call(this)},$(this,La)))},Up=function(){Be(this,ct,Lp).call(this),Be(this,ct,$p).call(this,Be(this,ct,zp).call(this))},Ip=function(){$(this,Lr)!==void 0&&(Or.clearTimeout($(this,Lr)),xe(this,Lr,void 0))},Bp=function(){$(this,zr)!==void 0&&(Or.clearInterval($(this,zr)),xe(this,zr,void 0))},Hp=function(){const t=$(this,Sn).getQueryCache().build($(this,Sn),this.options);if(t===$(this,tt))return;const a=$(this,tt);xe(this,tt,t),xe(this,tc,t.state),this.hasListeners()&&(a==null||a.removeObserver(this),t.addObserver(this))},BS=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a($(this,hn))}),$(this,Sn).getQueryCache().notify({query:$(this,tt),type:"observerResultsUpdated"})})},D2);function gD(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function qw(e,t){return gD(e,t)||e.state.data!==void 0&&qp(e,t,t.refetchOnMount)}function qp(e,t,a){if(In(t.enabled,e)!==!1&&qa(t.staleTime,e)!=="static"){const r=typeof a=="function"?a(e):a;return r==="always"||r!==!1&&yy(e,t)}return!1}function Fw(e,t,a,r){return(e!==t||In(r.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&yy(e,a)}function yy(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(qa(t.staleTime,e))}function yD(e,t){return!wd(e.getCurrentResult(),t)}var ic,xi,cn,$r,wi,Na,L2,bD=(L2=class extends $S{constructor(t){super();Ne(this,wi);Ne(this,ic);Ne(this,xi);Ne(this,cn);Ne(this,$r);xe(this,ic,t.client),this.mutationId=t.mutationId,xe(this,cn,t.mutationCache),xe(this,xi,[]),this.state=t.state||vD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,xi).includes(t)||($(this,xi).push(t),this.clearGcTimeout(),$(this,cn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,xi,$(this,xi).filter(a=>a!==t)),this.scheduleGc(),$(this,cn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,xi).length||(this.state.status==="pending"?this.scheduleGc():$(this,cn).remove(this))}continue(){var t;return((t=$(this,$r))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,m,p,g,v,b,w,_,E,S,j,C,A,O,T,R,B,D;const a=()=>{Be(this,wi,Na).call(this,{type:"continue"})},r={client:$(this,ic),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,$r,zS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(L,P)=>{Be(this,wi,Na).call(this,{type:"failed",failureCount:L,error:P})},onPause:()=>{Be(this,wi,Na).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,cn).canRun(this)}));const s=this.state.status==="pending",c=!$(this,$r).canStart();try{if(s)a();else{Be(this,wi,Na).call(this,{type:"pending",variables:t,isPaused:c}),$(this,cn).config.onMutate&&await $(this,cn).config.onMutate(t,this,r);const P=await((m=(u=this.options).onMutate)==null?void 0:m.call(u,t,r));P!==this.state.context&&Be(this,wi,Na).call(this,{type:"pending",context:P,variables:t,isPaused:c})}const L=await $(this,$r).start();return await((g=(p=$(this,cn).config).onSuccess)==null?void 0:g.call(p,L,t,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,L,t,this.state.context,r)),await((_=(w=$(this,cn).config).onSettled)==null?void 0:_.call(w,L,null,this.state.variables,this.state.context,this,r)),await((S=(E=this.options).onSettled)==null?void 0:S.call(E,L,null,t,this.state.context,r)),Be(this,wi,Na).call(this,{type:"success",data:L}),L}catch(L){try{await((C=(j=$(this,cn).config).onError)==null?void 0:C.call(j,L,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((O=(A=this.options).onError)==null?void 0:O.call(A,L,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((R=(T=$(this,cn).config).onSettled)==null?void 0:R.call(T,void 0,L,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((D=(B=this.options).onSettled)==null?void 0:D.call(B,void 0,L,t,this.state.context,r))}catch(P){Promise.reject(P)}throw Be(this,wi,Na).call(this,{type:"error",error:L}),L}finally{$(this,cn).runNext(this)}}},ic=new WeakMap,xi=new WeakMap,cn=new WeakMap,$r=new WeakMap,wi=new WeakSet,Na=function(t){const a=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Ht.batch(()=>{$(this,xi).forEach(r=>{r.onMutationUpdate(t)}),$(this,cn).notify({mutation:this,type:"updated",action:t})})},L2);function vD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xi,li,ac,z2,xD=(z2=class extends js{constructor(t={}){super();Ne(this,Xi);Ne(this,li);Ne(this,ac);this.config=t,xe(this,Xi,new Set),xe(this,li,new Map),xe(this,ac,0)}build(t,a,r){const s=new bD({client:t,mutationCache:this,mutationId:++Hu(this,ac)._,options:t.defaultMutationOptions(a),state:r});return this.add(s),s}add(t){$(this,Xi).add(t);const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a);r?r.push(t):$(this,li).set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Xi).delete(t)){const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&$(this,li).delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a),s=r==null?void 0:r.find(c=>c.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const a=Ku(t);if(typeof a=="string"){const s=(r=$(this,li).get(a))==null?void 0:r.find(c=>c!==t&&c.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{$(this,Xi).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Xi).clear(),$(this,li).clear()})}getAll(){return Array.from($(this,Xi))}find(t){const a={exact:!0,...t};return this.getAll().find(r=>zw(a,r))}findAll(t={}){return this.getAll().filter(a=>zw(t,a))}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return Ht.batch(()=>Promise.all(t.map(a=>a.continue().catch(mn))))}},Xi=new WeakMap,li=new WeakMap,ac=new WeakMap,z2);function Ku(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Pw(e,t){const a=new Set(t);return e.filter(r=>!a.has(r))}function wD(e,t,a){const r=e.slice(0);return r[t]=a,r}var ns,En,is,Ur,$n,za,rc,oc,sc,lc,Kt,Fp,Pp,HS,Vp,Gp,Kp,$2,kD=($2=class extends js{constructor(t,a,r){super();Ne(this,Kt);Ne(this,ns);Ne(this,En);Ne(this,is);Ne(this,Ur);Ne(this,$n);Ne(this,za);Ne(this,rc);Ne(this,oc);Ne(this,sc);Ne(this,lc,[]);xe(this,ns,t),xe(this,Ur,r),xe(this,is,[]),xe(this,$n,[]),xe(this,En,[]),this.setQueries(a)}onSubscribe(){this.listeners.size===1&&$(this,$n).forEach(t=>{t.subscribe(a=>{Be(this,Kt,Gp).call(this,t,a)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,$(this,$n).forEach(t=>{t.destroy()})}setQueries(t,a){xe(this,is,t),xe(this,Ur,a),Ht.batch(()=>{const r=$(this,$n),s=Be(this,Kt,Vp).call(this,$(this,is));s.forEach(b=>b.observer.setOptions(b.defaultedQueryOptions));const c=s.map(b=>b.observer),u=c.map(b=>b.getCurrentResult()),m=r.length!==c.length,p=c.some((b,w)=>b!==r[w]),g=m||p,v=g?!0:u.some((b,w)=>{const _=$(this,En)[w];return!_||!wd(b,_)});!g&&!v||(g&&(xe(this,lc,s),xe(this,$n,c)),xe(this,En,u),this.hasListeners()&&(g&&(Pw(r,c).forEach(b=>{b.destroy()}),Pw(c,r).forEach(b=>{b.subscribe(w=>{Be(this,Kt,Gp).call(this,b,w)})})),Be(this,Kt,Kp).call(this)))})}getCurrentResult(){return $(this,En)}getQueries(){return $(this,$n).map(t=>t.getCurrentQuery())}getObservers(){return $(this,$n)}getOptimisticResult(t,a){const r=Be(this,Kt,Vp).call(this,t),s=r.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=r.map(u=>u.defaultedQueryOptions.queryHash);return[s,u=>Be(this,Kt,Pp).call(this,u??s,a,c),()=>Be(this,Kt,Fp).call(this,s,r)]}},ns=new WeakMap,En=new WeakMap,is=new WeakMap,Ur=new WeakMap,$n=new WeakMap,za=new WeakMap,rc=new WeakMap,oc=new WeakMap,sc=new WeakMap,lc=new WeakMap,Kt=new WeakSet,Fp=function(t,a){return a.map((r,s)=>{const c=t[s];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,u=>{a.forEach(m=>{m.observer.trackProp(u)})})})},Pp=function(t,a,r){if(a){const s=$(this,sc),c=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((u,m)=>u!==s[m]));return(!$(this,za)||$(this,En)!==$(this,oc)||c||a!==$(this,rc))&&(xe(this,rc,a),xe(this,oc,$(this,En)),r!==void 0&&xe(this,sc,r),xe(this,za,my($(this,za),a(t)))),$(this,za)}return t},HS=function(){var t;return((t=$(this,Ur))==null?void 0:t.combine)!==void 0&&$(this,$n).some((a,r)=>{var s;return a.options.suspense&&((s=$(this,En)[r])==null?void 0:s.data)===void 0})},Vp=function(t){const a=new Map;$(this,$n).forEach(s=>{const c=s.options.queryHash;if(!c)return;const u=a.get(c);u?u.push(s):a.set(c,[s])});const r=[];return t.forEach(s=>{var p;const c=$(this,ns).defaultQueryOptions(s),m=((p=a.get(c.queryHash))==null?void 0:p.shift())??new gy($(this,ns),c);r.push({defaultedQueryOptions:c,observer:m})}),r},Gp=function(t,a){const r=$(this,$n).indexOf(t);r!==-1&&(xe(this,En,wD($(this,En),r,a)),Be(this,Kt,Kp).call(this))},Kp=function(){var t;if(this.hasListeners()){const a=Be(this,Kt,Fp).call(this,$(this,En),$(this,lc)),r=Be(this,Kt,HS).call(this),s=$(this,za),c=r?s:Be(this,Kt,Pp).call(this,a,(t=$(this,Ur))==null?void 0:t.combine);(r||s!==c)&&Ht.batch(()=>{this.listeners.forEach(u=>{u($(this,En))})})}},$2),ki,U2,_D=(U2=class extends js{constructor(t={}){super();Ne(this,ki);this.config=t,xe(this,ki,new Map)}build(t,a,r){const s=a.queryKey,c=a.queryHash??hy(s,a);let u=this.get(c);return u||(u=new pD({client:t,queryKey:s,queryHash:c,options:t.defaultQueryOptions(a),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(u)),u}add(t){$(this,ki).has(t.queryHash)||($(this,ki).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=$(this,ki).get(t.queryHash);a&&(t.destroy(),a===t&&$(this,ki).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,ki).get(t)}getAll(){return[...$(this,ki).values()]}find(t){const a={exact:!0,...t};return this.getAll().find(r=>Lw(a,r))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(r=>Lw(t,r)):a}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ki=new WeakMap,U2),Ct,$a,Ua,as,rs,Ia,os,ss,I2,SD=(I2=class{constructor(e={}){Ne(this,Ct);Ne(this,$a);Ne(this,Ua);Ne(this,as);Ne(this,rs);Ne(this,Ia);Ne(this,os);Ne(this,ss);xe(this,Ct,e.queryCache||new _D),xe(this,$a,e.mutationCache||new xD),xe(this,Ua,e.defaultOptions||{}),xe(this,as,new Map),xe(this,rs,new Map),xe(this,Ia,0)}mount(){Hu(this,Ia)._++,$(this,Ia)===1&&(xe(this,os,fy.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onFocus())})),xe(this,ss,kd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onOnline())})))}unmount(){var e,t;Hu(this,Ia)._--,$(this,Ia)===0&&((e=$(this,os))==null||e.call(this),xe(this,os,void 0),(t=$(this,ss))==null||t.call(this),xe(this,ss,void 0))}isFetching(e){return $(this,Ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,$a).findAll({...e,status:"pending"}).length}getQueryData(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=$(this,Ct).build(this,t),r=a.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(qa(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,Ct).findAll(e).map(({queryKey:t,state:a})=>{const r=a.data;return[t,r]})}setQueryData(e,t,a){const r=this.defaultQueryOptions({queryKey:e}),s=$(this,Ct).get(r.queryHash),c=s==null?void 0:s.state.data,u=iD(t,c);if(u!==void 0)return $(this,Ct).build(this,r).setData(u,{...a,manual:!0})}setQueriesData(e,t,a){return Ht.batch(()=>$(this,Ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,a)]))}getQueryState(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state}removeQueries(e){const t=$(this,Ct);Ht.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=$(this,Ct);return Ht.batch(()=>(a.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},r=Ht.batch(()=>$(this,Ct).findAll(e).map(s=>s.cancel(a)));return Promise.all(r).then(mn).catch(mn)}invalidateQueries(e,t={}){return Ht.batch(()=>($(this,Ct).findAll(e).forEach(a=>{a.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 a={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>$(this,Ct).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let c=s.fetch(void 0,a);return a.throwOnError||(c=c.catch(mn)),s.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(mn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=$(this,Ct).build(this,t);return a.isStaleByTime(qa(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mn).catch(mn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mn).catch(mn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return kd.isOnline()?$(this,$a).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Ct)}getMutationCache(){return $(this,$a)}getDefaultOptions(){return $(this,Ua)}setDefaultOptions(e){xe(this,Ua,e)}setQueryDefaults(e,t){$(this,as).set(Kl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,as).values()],a={};return t.forEach(r=>{hs(e,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(e,t){$(this,rs).set(Kl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,rs).values()],a={};return t.forEach(r=>{hs(e,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ua).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hy(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===py&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ua).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Ct).clear(),$(this,$a).clear()}},Ct=new WeakMap,$a=new WeakMap,Ua=new WeakMap,as=new WeakMap,rs=new WeakMap,Ia=new WeakMap,os=new WeakMap,ss=new WeakMap,I2),qS=x.createContext(void 0),Gd=e=>{const t=x.useContext(qS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ED=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(qS.Provider,{value:e,children:t})),FS=x.createContext(!1),PS=()=>x.useContext(FS);FS.Provider;function jD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var OD=x.createContext(jD()),VS=()=>x.useContext(OD),GS=(e,t,a)=>{const r=a!=null&&a.state.error&&typeof e.throwOnError=="function"?DS(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},KS=e=>{x.useEffect(()=>{e.clearReset()},[e])},YS=({result:e,errorResetBoundary:t,throwOnError:a,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||DS(a,[e.error,r])),QS=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>a(r(...s)):a(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},AD=(e,t)=>e.isLoading&&e.isFetching&&!t,Yp=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Qp=(e,t,a)=>t.fetchOptimistic(e).catch(()=>{a.clearReset()});function ND({queries:e,...t},a){const r=Gd(),s=PS(),c=VS(),u=x.useMemo(()=>e.map(S=>{const j=r.defaultQueryOptions(S);return j._optimisticResults=s?"isRestoring":"optimistic",j}),[e,r,s]);u.forEach(S=>{QS(S);const j=r.getQueryCache().get(S.queryHash);GS(S,c,j)}),KS(c);const[m]=x.useState(()=>new kD(r,u,t)),[p,g,v]=m.getOptimisticResult(u,t.combine),b=!s&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(S=>b?m.subscribe(Ht.batchCalls(S)):mn,[m,b]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setQueries(u,t)},[u,t,m]);const _=p.some((S,j)=>Yp(u[j],S))?p.flatMap((S,j)=>{const C=u[j];if(C&&Yp(C,S)){const A=new gy(r,C);return Qp(C,A,c)}return[]}):[];if(_.length>0)throw Promise.all(_);const E=p.find((S,j)=>{const C=u[j];return C&&YS({result:S,errorResetBoundary:c,throwOnError:C.throwOnError,query:r.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(E!=null&&E.error)throw E.error;return g(v())}function MD(e,t,a){var _,E,S,j;const r=PS(),s=VS(),c=Gd(),u=c.defaultQueryOptions(e);(E=(_=c.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||E.call(_,u);const m=c.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=r?"isRestoring":p?"optimistic":void 0,QS(u),GS(u,s,m),KS(s);const g=!c.getQueryCache().get(u.queryHash),[v]=x.useState(()=>new t(c,u)),b=v.getOptimisticResult(u),w=!r&&p;if(x.useSyncExternalStore(x.useCallback(C=>{const A=w?v.subscribe(Ht.batchCalls(C)):mn;return v.updateResult(),A},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),x.useEffect(()=>{v.setOptions(u)},[u,v]),Yp(u,b))throw Qp(u,v,s);if(YS({result:b,errorResetBoundary:s,throwOnError:u.throwOnError,query:m,suspense:u.suspense}))throw b.error;if((j=(S=c.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||j.call(S,u,b),u.experimental_prefetchInRender&&!Yl.isServer()&&AD(b,r)){const C=g?Qp(u,v,s):m==null?void 0:m.promise;C==null||C.catch(mn).finally(()=>{v.updateResult()})}return u.notifyOnChangeProps?b:v.trackResult(b)}function gc(e,t){return MD(e,gy)}const CD=600*1e3,RD=(e,t,a)=>({queryKey:["crop-url",e,t],queryFn:()=>a(e,t),staleTime:CD});function XS(e,t,a){const r=x.useMemo(()=>[...new Set(t.filter(c=>!!c))],[t]),s=ND({queries:r.map(c=>({...RD(e,c,a),enabled:!!e}))});return x.useMemo(()=>{const c=new Map;return r.forEach((u,m)=>{var g;const p=(g=s[m])==null?void 0:g.data;typeof p=="string"&&c.set(u,p)}),c},[r,s])}/**
|
|
782
|
-
* @license lucide-react v1.28.0 - ISC
|
|
783
|
-
*
|
|
784
|
-
* This source code is licensed under the ISC license.
|
|
785
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
786
|
-
*/const ZS=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
|
|
787
|
-
* @license lucide-react v1.28.0 - ISC
|
|
788
|
-
*
|
|
789
|
-
* This source code is licensed under the ISC license.
|
|
790
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
791
|
-
*/const TD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
792
|
-
* @license lucide-react v1.28.0 - ISC
|
|
793
|
-
*
|
|
794
|
-
* This source code is licensed under the ISC license.
|
|
795
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
796
|
-
*/const DD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
|
|
797
|
-
* @license lucide-react v1.28.0 - ISC
|
|
798
|
-
*
|
|
799
|
-
* This source code is licensed under the ISC license.
|
|
800
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
801
|
-
*/const Vw=e=>{const t=DD(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
802
|
-
* @license lucide-react v1.28.0 - ISC
|
|
803
|
-
*
|
|
804
|
-
* This source code is licensed under the ISC license.
|
|
805
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
806
|
-
*/var Gm={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"};/**
|
|
807
|
-
* @license lucide-react v1.28.0 - ISC
|
|
808
|
-
*
|
|
809
|
-
* This source code is licensed under the ISC license.
|
|
810
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
811
|
-
*/const LD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},zD=x.createContext({}),$D=()=>x.useContext(zD),UD=x.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:c,iconNode:u,...m},p)=>{const{size:g=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,color:w="currentColor",className:_=""}=$D()??{},E=r??b?Number(a??v)*24/Number(t??g):a??v;return x.createElement("svg",{ref:p,...Gm,width:t??g??Gm.width,height:t??g??Gm.height,stroke:e??w,strokeWidth:E,className:ZS("lucide",_,s),...!c&&!LD(m)&&{"aria-hidden":"true"},...m},[...u.map(([S,j])=>x.createElement(S,j)),...Array.isArray(c)?c:[c]])});/**
|
|
812
|
-
* @license lucide-react v1.28.0 - ISC
|
|
813
|
-
*
|
|
814
|
-
* This source code is licensed under the ISC license.
|
|
815
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
816
|
-
*/const ve=(e,t)=>{const a=x.forwardRef(({className:r,...s},c)=>x.createElement(UD,{ref:c,iconNode:t,className:ZS(`lucide-${TD(Vw(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Vw(e),a};/**
|
|
817
|
-
* @license lucide-react v1.28.0 - ISC
|
|
818
|
-
*
|
|
819
|
-
* This source code is licensed under the ISC license.
|
|
820
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
821
|
-
*/const ID=[["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"}]],BD=ve("activity",ID);/**
|
|
822
|
-
* @license lucide-react v1.28.0 - ISC
|
|
823
|
-
*
|
|
824
|
-
* This source code is licensed under the ISC license.
|
|
825
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
826
|
-
*/const HD=[["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"}]],qD=ve("archive",HD);/**
|
|
827
|
-
* @license lucide-react v1.28.0 - ISC
|
|
828
|
-
*
|
|
829
|
-
* This source code is licensed under the ISC license.
|
|
830
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
831
|
-
*/const FD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],PD=ve("arrow-down",FD);/**
|
|
832
|
-
* @license lucide-react v1.28.0 - ISC
|
|
833
|
-
*
|
|
834
|
-
* This source code is licensed under the ISC license.
|
|
835
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
836
|
-
*/const VD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],GD=ve("arrow-left",VD);/**
|
|
837
|
-
* @license lucide-react v1.28.0 - ISC
|
|
838
|
-
*
|
|
839
|
-
* This source code is licensed under the ISC license.
|
|
840
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
841
|
-
*/const KD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],YD=ve("arrow-right",KD);/**
|
|
842
|
-
* @license lucide-react v1.28.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*/const QD=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],WS=ve("arrow-up-right",QD);/**
|
|
847
|
-
* @license lucide-react v1.28.0 - ISC
|
|
848
|
-
*
|
|
849
|
-
* This source code is licensed under the ISC license.
|
|
850
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
851
|
-
*/const XD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ZD=ve("arrow-up",XD);/**
|
|
852
|
-
* @license lucide-react v1.28.0 - ISC
|
|
853
|
-
*
|
|
854
|
-
* This source code is licensed under the ISC license.
|
|
855
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
856
|
-
*/const WD=[["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"}]],JD=ve("book-open",WD);/**
|
|
857
|
-
* @license lucide-react v1.28.0 - ISC
|
|
858
|
-
*
|
|
859
|
-
* This source code is licensed under the ISC license.
|
|
860
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
861
|
-
*/const eL=[["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"}]],by=ve("box",eL);/**
|
|
862
|
-
* @license lucide-react v1.28.0 - ISC
|
|
863
|
-
*
|
|
864
|
-
* This source code is licensed under the ISC license.
|
|
865
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
866
|
-
*/const tL=[["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"}]],nL=ve("building-2",tL);/**
|
|
867
|
-
* @license lucide-react v1.28.0 - ISC
|
|
868
|
-
*
|
|
869
|
-
* This source code is licensed under the ISC license.
|
|
870
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
871
|
-
*/const iL=[["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"}]],aL=ve("building",iL);/**
|
|
872
|
-
* @license lucide-react v1.28.0 - ISC
|
|
873
|
-
*
|
|
874
|
-
* This source code is licensed under the ISC license.
|
|
875
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
876
|
-
*/const rL=[["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"}]],oL=ve("calendar-days",rL);/**
|
|
877
|
-
* @license lucide-react v1.28.0 - ISC
|
|
878
|
-
*
|
|
879
|
-
* This source code is licensed under the ISC license.
|
|
880
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
881
|
-
*/const sL=[["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"}]],lL=ve("calendar",sL);/**
|
|
882
|
-
* @license lucide-react v1.28.0 - ISC
|
|
883
|
-
*
|
|
884
|
-
* This source code is licensed under the ISC license.
|
|
885
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
886
|
-
*/const cL=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],uL=ve("chart-line",cL);/**
|
|
887
|
-
* @license lucide-react v1.28.0 - ISC
|
|
888
|
-
*
|
|
889
|
-
* This source code is licensed under the ISC license.
|
|
890
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
891
|
-
*/const dL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Kd=ve("check",dL);/**
|
|
892
|
-
* @license lucide-react v1.28.0 - ISC
|
|
893
|
-
*
|
|
894
|
-
* This source code is licensed under the ISC license.
|
|
895
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
896
|
-
*/const fL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vy=ve("chevron-down",fL);/**
|
|
897
|
-
* @license lucide-react v1.28.0 - ISC
|
|
898
|
-
*
|
|
899
|
-
* This source code is licensed under the ISC license.
|
|
900
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
901
|
-
*/const hL=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],JS=ve("chevron-left",hL);/**
|
|
902
|
-
* @license lucide-react v1.28.0 - ISC
|
|
903
|
-
*
|
|
904
|
-
* This source code is licensed under the ISC license.
|
|
905
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
906
|
-
*/const mL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xy=ve("chevron-right",mL);/**
|
|
907
|
-
* @license lucide-react v1.28.0 - ISC
|
|
908
|
-
*
|
|
909
|
-
* This source code is licensed under the ISC license.
|
|
910
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
911
|
-
*/const pL=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],gL=ve("chevrons-up-down",pL);/**
|
|
912
|
-
* @license lucide-react v1.28.0 - ISC
|
|
913
|
-
*
|
|
914
|
-
* This source code is licensed under the ISC license.
|
|
915
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
916
|
-
*/const yL=[["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"}]],bL=ve("circle-question-mark",yL);/**
|
|
917
|
-
* @license lucide-react v1.28.0 - ISC
|
|
918
|
-
*
|
|
919
|
-
* This source code is licensed under the ISC license.
|
|
920
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
921
|
-
*/const vL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],xL=ve("clock",vL);/**
|
|
922
|
-
* @license lucide-react v1.28.0 - ISC
|
|
923
|
-
*
|
|
924
|
-
* This source code is licensed under the ISC license.
|
|
925
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
926
|
-
*/const wL=[["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"}]],wy=ve("cloud-upload",wL);/**
|
|
927
|
-
* @license lucide-react v1.28.0 - ISC
|
|
928
|
-
*
|
|
929
|
-
* This source code is licensed under the ISC license.
|
|
930
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
931
|
-
*/const kL=[["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"}]],_L=ve("copy",kL);/**
|
|
932
|
-
* @license lucide-react v1.28.0 - ISC
|
|
933
|
-
*
|
|
934
|
-
* This source code is licensed under the ISC license.
|
|
935
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
936
|
-
*/const SL=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],EL=ve("credit-card",SL);/**
|
|
937
|
-
* @license lucide-react v1.28.0 - ISC
|
|
938
|
-
*
|
|
939
|
-
* This source code is licensed under the ISC license.
|
|
940
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
941
|
-
*/const jL=[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]],OL=ve("crop",jL);/**
|
|
942
|
-
* @license lucide-react v1.28.0 - ISC
|
|
943
|
-
*
|
|
944
|
-
* This source code is licensed under the ISC license.
|
|
945
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
946
|
-
*/const AL=[["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"}]],NL=ve("database",AL);/**
|
|
947
|
-
* @license lucide-react v1.28.0 - ISC
|
|
948
|
-
*
|
|
949
|
-
* This source code is licensed under the ISC license.
|
|
950
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
951
|
-
*/const ML=[["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"}]],eE=ve("download",ML);/**
|
|
952
|
-
* @license lucide-react v1.28.0 - ISC
|
|
953
|
-
*
|
|
954
|
-
* This source code is licensed under the ISC license.
|
|
955
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
956
|
-
*/const CL=[["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"}]],RL=ve("ellipsis-vertical",CL);/**
|
|
957
|
-
* @license lucide-react v1.28.0 - ISC
|
|
958
|
-
*
|
|
959
|
-
* This source code is licensed under the ISC license.
|
|
960
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
961
|
-
*/const TL=[["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"}]],DL=ve("ellipsis",TL);/**
|
|
962
|
-
* @license lucide-react v1.28.0 - ISC
|
|
963
|
-
*
|
|
964
|
-
* This source code is licensed under the ISC license.
|
|
965
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
966
|
-
*/const LL=[["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"}]],tE=ve("external-link",LL);/**
|
|
967
|
-
* @license lucide-react v1.28.0 - ISC
|
|
968
|
-
*
|
|
969
|
-
* This source code is licensed under the ISC license.
|
|
970
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
971
|
-
*/const zL=[["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"}]],$L=ve("eye-off",zL);/**
|
|
972
|
-
* @license lucide-react v1.28.0 - ISC
|
|
973
|
-
*
|
|
974
|
-
* This source code is licensed under the ISC license.
|
|
975
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
976
|
-
*/const UL=[["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"}]],nE=ve("eye",UL);/**
|
|
977
|
-
* @license lucide-react v1.28.0 - ISC
|
|
978
|
-
*
|
|
979
|
-
* This source code is licensed under the ISC license.
|
|
980
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
981
|
-
*/const IL=[["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"}]],BL=ve("file-pen-line",IL);/**
|
|
982
|
-
* @license lucide-react v1.28.0 - ISC
|
|
983
|
-
*
|
|
984
|
-
* This source code is licensed under the ISC license.
|
|
985
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
986
|
-
*/const HL=[["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"}]],iE=ve("file-spreadsheet",HL);/**
|
|
987
|
-
* @license lucide-react v1.28.0 - ISC
|
|
988
|
-
*
|
|
989
|
-
* This source code is licensed under the ISC license.
|
|
990
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
991
|
-
*/const qL=[["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"}]],Yd=ve("file-text",qL);/**
|
|
992
|
-
* @license lucide-react v1.28.0 - ISC
|
|
993
|
-
*
|
|
994
|
-
* This source code is licensed under the ISC license.
|
|
995
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
996
|
-
*/const FL=[["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"}]],Km=ve("files",FL);/**
|
|
997
|
-
* @license lucide-react v1.28.0 - ISC
|
|
998
|
-
*
|
|
999
|
-
* This source code is licensed under the ISC license.
|
|
1000
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1001
|
-
*/const PL=[["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"}]],VL=ve("file",PL);/**
|
|
1002
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1003
|
-
*
|
|
1004
|
-
* This source code is licensed under the ISC license.
|
|
1005
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1006
|
-
*/const GL=[["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"}]],KL=ve("film",GL);/**
|
|
1007
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1008
|
-
*
|
|
1009
|
-
* This source code is licensed under the ISC license.
|
|
1010
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1011
|
-
*/const YL=[["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"}]],QL=ve("globe",YL);/**
|
|
1012
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1013
|
-
*
|
|
1014
|
-
* This source code is licensed under the ISC license.
|
|
1015
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1016
|
-
*/const XL=[["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"}]],ky=ve("grip-vertical",XL);/**
|
|
1017
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1018
|
-
*
|
|
1019
|
-
* This source code is licensed under the ISC license.
|
|
1020
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1021
|
-
*/const ZL=[["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"}]],WL=ve("house",ZL);/**
|
|
1022
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1023
|
-
*
|
|
1024
|
-
* This source code is licensed under the ISC license.
|
|
1025
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1026
|
-
*/const JL=[["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"}]],Qd=ve("image",JL);/**
|
|
1027
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1028
|
-
*
|
|
1029
|
-
* This source code is licensed under the ISC license.
|
|
1030
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1031
|
-
*/const e6=[["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"}]],Xp=ve("images",e6);/**
|
|
1032
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1033
|
-
*
|
|
1034
|
-
* This source code is licensed under the ISC license.
|
|
1035
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1036
|
-
*/const t6=[["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"}]],n6=ve("key-round",t6);/**
|
|
1037
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1038
|
-
*
|
|
1039
|
-
* This source code is licensed under the ISC license.
|
|
1040
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1041
|
-
*/const i6=[["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"}]],aE=ve("layout-grid",i6);/**
|
|
1042
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1043
|
-
*
|
|
1044
|
-
* This source code is licensed under the ISC license.
|
|
1045
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1046
|
-
*/const a6=[["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"}]],r6=ve("layout-template",a6);/**
|
|
1047
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1048
|
-
*
|
|
1049
|
-
* This source code is licensed under the ISC license.
|
|
1050
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1051
|
-
*/const o6=[["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"}]],s6=ve("library-big",o6);/**
|
|
1052
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1053
|
-
*
|
|
1054
|
-
* This source code is licensed under the ISC license.
|
|
1055
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1056
|
-
*/const l6=[["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"}]],_y=ve("link-2",l6);/**
|
|
1057
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1058
|
-
*
|
|
1059
|
-
* This source code is licensed under the ISC license.
|
|
1060
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1061
|
-
*/const c6=[["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"}]],u6=ve("link",c6);/**
|
|
1062
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1063
|
-
*
|
|
1064
|
-
* This source code is licensed under the ISC license.
|
|
1065
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1066
|
-
*/const d6=[["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"}]],rE=ve("list",d6);/**
|
|
1067
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1068
|
-
*
|
|
1069
|
-
* This source code is licensed under the ISC license.
|
|
1070
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1071
|
-
*/const f6=[["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"}]],h6=ve("lock",f6);/**
|
|
1072
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1073
|
-
*
|
|
1074
|
-
* This source code is licensed under the ISC license.
|
|
1075
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1076
|
-
*/const m6=[["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"}]],p6=ve("log-out",m6);/**
|
|
1077
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1078
|
-
*
|
|
1079
|
-
* This source code is licensed under the ISC license.
|
|
1080
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1081
|
-
*/const g6=[["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"}]],y6=ve("mail",g6);/**
|
|
1082
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1083
|
-
*
|
|
1084
|
-
* This source code is licensed under the ISC license.
|
|
1085
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1086
|
-
*/const b6=[["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"}]],v6=ve("map-pin-house",b6);/**
|
|
1087
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1088
|
-
*
|
|
1089
|
-
* This source code is licensed under the ISC license.
|
|
1090
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1091
|
-
*/const x6=[["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"}]],oE=ve("map-pin",x6);/**
|
|
1092
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1093
|
-
*
|
|
1094
|
-
* This source code is licensed under the ISC license.
|
|
1095
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1096
|
-
*/const w6=[["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"}]],k6=ve("map-pinned",w6);/**
|
|
1097
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1098
|
-
*
|
|
1099
|
-
* This source code is licensed under the ISC license.
|
|
1100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1101
|
-
*/const _6=[["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"}]],S6=ve("maximize-2",_6);/**
|
|
1102
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1103
|
-
*
|
|
1104
|
-
* This source code is licensed under the ISC license.
|
|
1105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1106
|
-
*/const E6=[["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"}]],j6=ve("mic",E6);/**
|
|
1107
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1108
|
-
*
|
|
1109
|
-
* This source code is licensed under the ISC license.
|
|
1110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1111
|
-
*/const O6=[["path",{d:"M5 12h14",key:"1ays0h"}]],A6=ve("minus",O6);/**
|
|
1112
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1113
|
-
*
|
|
1114
|
-
* This source code is licensed under the ISC license.
|
|
1115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1116
|
-
*/const N6=[["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"}]],M6=ve("mouse-pointer-click",N6);/**
|
|
1117
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1118
|
-
*
|
|
1119
|
-
* This source code is licensed under the ISC license.
|
|
1120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1121
|
-
*/const C6=[["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"}]],R6=ve("newspaper",C6);/**
|
|
1122
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1123
|
-
*
|
|
1124
|
-
* This source code is licensed under the ISC license.
|
|
1125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1126
|
-
*/const T6=[["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"}]],D6=ve("palette",T6);/**
|
|
1127
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1128
|
-
*
|
|
1129
|
-
* This source code is licensed under the ISC license.
|
|
1130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1131
|
-
*/const L6=[["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"}]],Sy=ve("pencil",L6);/**
|
|
1132
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1133
|
-
*
|
|
1134
|
-
* This source code is licensed under the ISC license.
|
|
1135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1136
|
-
*/const z6=[["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"}]],$6=ve("phone",z6);/**
|
|
1137
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1138
|
-
*
|
|
1139
|
-
* This source code is licensed under the ISC license.
|
|
1140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1141
|
-
*/const U6=[["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"}]],sE=ve("play",U6);/**
|
|
1142
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1143
|
-
*
|
|
1144
|
-
* This source code is licensed under the ISC license.
|
|
1145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1146
|
-
*/const I6=[["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"}]],B6=ve("plug",I6);/**
|
|
1147
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1148
|
-
*
|
|
1149
|
-
* This source code is licensed under the ISC license.
|
|
1150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1151
|
-
*/const H6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xd=ve("plus",H6);/**
|
|
1152
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1153
|
-
*
|
|
1154
|
-
* This source code is licensed under the ISC license.
|
|
1155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1156
|
-
*/const q6=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],F6=ve("power",q6);/**
|
|
1157
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1158
|
-
*
|
|
1159
|
-
* This source code is licensed under the ISC license.
|
|
1160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1161
|
-
*/const P6=[["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"}]],Ey=ve("presentation",P6);/**
|
|
1162
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1163
|
-
*
|
|
1164
|
-
* This source code is licensed under the ISC license.
|
|
1165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1166
|
-
*/const V6=[["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"}]],G6=ve("redo-2",V6);/**
|
|
1167
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1168
|
-
*
|
|
1169
|
-
* This source code is licensed under the ISC license.
|
|
1170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1171
|
-
*/const K6=[["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"}]],jy=ve("rotate-3d",K6);/**
|
|
1172
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1173
|
-
*
|
|
1174
|
-
* This source code is licensed under the ISC license.
|
|
1175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1176
|
-
*/const Y6=[["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"}]],Q6=ve("rotate-cw",Y6);/**
|
|
1177
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1178
|
-
*
|
|
1179
|
-
* This source code is licensed under the ISC license.
|
|
1180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1181
|
-
*/const X6=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Oy=ve("search",X6);/**
|
|
1182
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1183
|
-
*
|
|
1184
|
-
* This source code is licensed under the ISC license.
|
|
1185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1186
|
-
*/const Z6=[["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"}]],W6=ve("settings",Z6);/**
|
|
1187
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1188
|
-
*
|
|
1189
|
-
* This source code is licensed under the ISC license.
|
|
1190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1191
|
-
*/const J6=[["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"}]],e8=ve("share",J6);/**
|
|
1192
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1193
|
-
*
|
|
1194
|
-
* This source code is licensed under the ISC license.
|
|
1195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1196
|
-
*/const t8=[["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"}]],n8=ve("sparkles",t8);/**
|
|
1197
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1198
|
-
*
|
|
1199
|
-
* This source code is licensed under the ISC license.
|
|
1200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1201
|
-
*/const i8=[["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"}]],a8=ve("tag",i8);/**
|
|
1202
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1203
|
-
*
|
|
1204
|
-
* This source code is licensed under the ISC license.
|
|
1205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1206
|
-
*/const r8=[["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"}]],Os=ve("trash-2",r8);/**
|
|
1207
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1208
|
-
*
|
|
1209
|
-
* This source code is licensed under the ISC license.
|
|
1210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1211
|
-
*/const o8=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],s8=ve("trending-up",o8);/**
|
|
1212
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1213
|
-
*
|
|
1214
|
-
* This source code is licensed under the ISC license.
|
|
1215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1216
|
-
*/const l8=[["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"}]],c8=ve("triangle-alert",l8);/**
|
|
1217
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1218
|
-
*
|
|
1219
|
-
* This source code is licensed under the ISC license.
|
|
1220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1221
|
-
*/const u8=[["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"}]],d8=ve("type",u8);/**
|
|
1222
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1223
|
-
*
|
|
1224
|
-
* This source code is licensed under the ISC license.
|
|
1225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1226
|
-
*/const f8=[["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"}]],h8=ve("undo-2",f8);/**
|
|
1227
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1228
|
-
*
|
|
1229
|
-
* This source code is licensed under the ISC license.
|
|
1230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1231
|
-
*/const m8=[["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"}]],Zd=ve("upload",m8);/**
|
|
1232
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1233
|
-
*
|
|
1234
|
-
* This source code is licensed under the ISC license.
|
|
1235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1236
|
-
*/const p8=[["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"}]],g8=ve("user-plus",p8);/**
|
|
1237
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1238
|
-
*
|
|
1239
|
-
* This source code is licensed under the ISC license.
|
|
1240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1241
|
-
*/const y8=[["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"}]],b8=ve("user",y8);/**
|
|
1242
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1243
|
-
*
|
|
1244
|
-
* This source code is licensed under the ISC license.
|
|
1245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1246
|
-
*/const v8=[["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"}]],x8=ve("users",v8);/**
|
|
1247
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1248
|
-
*
|
|
1249
|
-
* This source code is licensed under the ISC license.
|
|
1250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1251
|
-
*/const w8=[["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"}]],Ay=ve("video",w8);/**
|
|
1252
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1253
|
-
*
|
|
1254
|
-
* This source code is licensed under the ISC license.
|
|
1255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1256
|
-
*/const k8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ny=ve("x",k8);function ie(...e){return ly(ry(e))}const _8="flex flex-col gap-3.5 pt-1",Yr="flex flex-col gap-1",lE="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",As="m-0 text-caption leading-[1.4] text-danger",cE="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",S8="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)]",E8="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",Ns=ie("data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft");function Ms(e,t){return e===null||e==="required"&&!t?{}:{"data-attention":e}}const uE="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",j8=ie(vt,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4"),O8="py-2.25",A8="text-[length:calc(13.5*var(--content))]",dE=ie(O8,A8),fE="font-mono text-[length:calc(10.5*var(--content))] [font-feature-settings:'tnum'] shrink-0",hE="text-[#7a5a14]";function N8(e,t){const a=ie(fE,"text-ink-4");return t==null?a:e>t?ie(a,"text-danger"):e>=t*.9?ie(a,hE):a}function M8({children:e}){return d.jsx("span",{className:lE,children:e})}function C8({value:e,onChange:t,placeholder:a,inputMode:r,maxLength:s,spellCheck:c,className:u,ariaLabel:m,id:p}){return d.jsx("input",{id:p,className:ie(j8,u),value:e,placeholder:a,inputMode:r,maxLength:s,spellCheck:c,"aria-label":m,onChange:g=>t(g.target.value)})}function fn(e,t,a=1.5){const r=e;return function({size:c=t}={}){return d.jsx(r,{size:c,strokeWidth:a,style:{width:`calc(${c} * var(--content))`,height:`calc(${c} * var(--content))`}})}}const Rt={trash:fn(Os,11),plus:fn(Xd,14),up:fn(Zd,15),link:fn(u6,13),play:({size:e=20}={})=>d.jsx(sE,{size:e,strokeWidth:0,fill:"currentColor",style:{width:`calc(${e} * var(--content))`,height:`calc(${e} * var(--content))`}}),tour:fn(jy,18),search:fn(Oy,14),x:fn(Ny,15),check:fn(Kd,13),minus:fn(A6,16),external:fn(tE,11),grip:fn(ky,13,1.8),calendar:fn(oL,14),chevL:fn(JS,15),chevR:fn(xy,15),chevD:fn(vy,13)},Wd=x.createContext(null);function R8({ports:e,children:t}){return d.jsx(Wd.Provider,{value:e,children:t})}function Yt(){const e=x.useContext(Wd);if(!e)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return e}function T8(){var e;return(e=x.useContext(Wd))==null?void 0:e.fillMark}function D8(){var e;return(e=x.useContext(Wd))==null?void 0:e.isAssetProcessing}function Fa(e){return Yt().useEditorStore(e)}function L8(){return Yt().api}const z8="size-[calc(6*var(--content))] shrink-0 rounded-full bg-honey-ink";function Ql(e,t){const a=J4(t);return e===void 0||a===null?void 0:`${e}.${a}`}function Xl(e,t){return e===void 0?void 0:`${e}.${t}`}function mE(e){return e==="list"||e==="media"||gn(e)}function $8(e){const t=T8();return t===void 0||e===void 0?null:t(e)}function U8({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:z8,"aria-hidden":"true"}),e]})}var tr=B2();function I8(...e){return ly(ry(e))}const Jd=1e3,Qr=Jd+200,B8=Jd+500;let H8=0;const Ka=[];let pE="",gE="";function q8(){if(Ka.length!==1||typeof document>"u")return;const e=document.body;pE=e.style.overflow,gE=e.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",t>0&&(e.style.paddingRight=`${t}px`)}function F8(){Ka.length===0&&(typeof document>"u"||(document.body.style.overflow=pE,document.body.style.paddingRight=gE))}function yE(){const e=++H8;return Ka.push(e),q8(),e}function Zp(e){const t=Ka.indexOf(e);t!==-1&&Ka.splice(t,1),F8()}function bE(e){const t=Ka.indexOf(e);return Jd+(t===-1?0:t)*10}function Gw(e){return Ka[Ka.length-1]===e}const P8="(prefers-reduced-motion: reduce)";function V8(){const[e,t]=x.useState(!1);return x.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(P8);t(a.matches);const r=s=>t(s.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}const G8={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)]"},K8='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function My({open:e,onClose:t,className:a,size:r,closeOnBackdrop:s=!0,closeOnEsc:c=!0,labelledBy:u,ariaLabel:m,children:p}){const[g,v]=x.useState("closed"),b=x.useRef(null),w=x.useRef(null),_=x.useRef(null),[E,S]=x.useState(1e3),j=V8(),[C,A]=x.useState(p);e&&C!==p&&A(p),x.useEffect(()=>{e&&g==="closed"?v("open"):!e&&g==="open"&&v(j?"closed":"closing")},[e,g,j]),x.useEffect(()=>{var R;if(g==="open"&&b.current===null){_.current=document.activeElement??null;const B=yE();b.current=B,S(bE(B)),(R=w.current)==null||R.focus()}},[g]),x.useEffect(()=>{var R,B;g==="closed"&&b.current!==null&&(Zp(b.current),b.current=null,(B=(R=_.current)==null?void 0:R.focus)==null||B.call(R),_.current=null)},[g]),x.useEffect(()=>()=>{b.current!==null&&(Zp(b.current),b.current=null)},[]),x.useEffect(()=>{if(g!=="closing")return;const R=setTimeout(()=>v("closed"),400);return()=>clearTimeout(R)},[g]),x.useEffect(()=>{if(g!=="open"||!c)return;const R=B=>{B.key==="Escape"&&(b.current===null||!Gw(b.current)||(B.stopPropagation(),t()))};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g,c,t]),x.useEffect(()=>{if(g!=="open")return;const R=B=>{if(B.key!=="Tab"||b.current===null||!Gw(b.current))return;const D=w.current;if(!D)return;const L=D.querySelectorAll(K8);if(L.length===0){B.preventDefault();return}const P=L[0],le=L[L.length-1];B.shiftKey&&document.activeElement===P?(B.preventDefault(),le==null||le.focus()):!B.shiftKey&&document.activeElement===le&&(B.preventDefault(),P==null||P.focus())};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g]);const O=x.useCallback(R=>{R.target===R.currentTarget&&g==="closing"&&v("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const T=g==="closing"?"closing":"open";return tr.createPortal(d.jsx("div",{className:"hp-modal-backdrop","data-state":T,inert:T==="closing",style:{zIndex:E},onMouseDown:s?t:void 0,children:d.jsx("div",{ref:w,className:I8("hp-modal-panel",r?G8[r]:void 0,a),"data-state":T,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":m,tabIndex:-1,onMouseDown:R=>R.stopPropagation(),onAnimationEnd:O,children:e?p:C})}),document.body)}function vE(){const[e,t]=x.useState(Jd);return x.useEffect(()=>{const a=yE();return t(bE(a)),()=>Zp(a)},[]),e}const Y8={youtube:"video",vimeo:"video"};function xE(e){const t=dc(e.startsWith("http")?e:`https://${e}`);if(t!==null){const a=Za[t],r=a.kind==="tour"||a.kind==="video"?a.kind:void 0;return{key:t,name:a.label,kind:Y8[t]??"link",...r?{media:r}:{}}}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 Cy="bg-[#f7f6f2]",jn="bg-[#eceae3]",Q8="[mask-image:var(--fade-down)]",X8="[background-image:var(--wash-soft)]";function yc({className:e,children:t}){return d.jsx("div",{"aria-hidden":"true",className:ie("pointer-events-none absolute inset-0 select-none overflow-hidden",Q8,e),children:t})}function _d({icon:e,headline:t,line:a,lifted:r=!1}){return d.jsx("div",{className:ie("absolute inset-0 flex items-center justify-center-safe overflow-y-auto px-6 py-8",X8),children:d.jsxs("div",{className:"flex max-w-full flex-col items-center text-center",children:[d.jsx("span",{"data-lifted":r||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}),a?d.jsx("div",{className:"mt-1.5 text-[length:calc(14*var(--content))] text-ink-3",children:a}):null]})})}const Ry="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",Ty="border-line bg-canvas text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",ef="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)]",wE="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",Kw=ie(Ry,Ty,"font-semibold text-ink focus-visible:bg-[#f6f5f1] aria-expanded:bg-[#f6f5f1]"),Z8={large:Kw,compact:ie(Kw,"h-8")},W8="size-[calc(15*var(--content))] shrink-0";function Sd({add:e,size:t,onClick:a,buttonRef:r,expanded:s}){return d.jsxs("button",{ref:r,type:"button",...s!==void 0?{"aria-haspopup":"dialog","aria-expanded":s}:{},"data-list-verb":e.verb,className:Z8[t],onClick:a,children:[d.jsx(e.icon,{"aria-hidden":"true",strokeWidth:2.4,className:W8}),e.label]})}function bc({size:e,add:t,onAdd:a,newChip:r,choose:s}){const c=s!==void 0?d.jsx(Sd,{add:s.choose,size:e,onClick:s.onChoose}):r??(a!==null?d.jsx(Sd,{add:t,size:e,onClick:a}):null);return c===null?null:d.jsx("div",{"data-list-verbs":"",className:"flex flex-wrap items-center gap-2",children:c})}const kE=x.createContext(null);function J8({api:e,children:t}){return d.jsx(kE.Provider,{value:e,children:t})}function Dy(){const e=x.useContext(kE);if(!e)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return e}async function ez(e,t,a){let r=0;const s=Math.max(1,Math.min(t,e.length)),c=Array.from({length:s},async()=>{for(;r<e.length;){const u=r++;try{await a(e[u],u)}catch{}}});await Promise.all(c)}const Yw=500*1024*1024,Ed=[{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"}],_E=new Set(Ed.map(e=>e.extension)),SE=new Set(Ed.flatMap(e=>e.mimeTypes));function tf(e){const t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function Ly(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),a=e.slice(t+1),r=a.lastIndexOf(".");return r<=0?"":a.slice(r).toLowerCase()}function tz(e){return tf(e).startsWith("image/")}function nz(e){return tf(e).startsWith("video/")}function iz(e,t){return _E.has(Ly(e))&&SE.has(tf(t))}function az(e,t){return tz(t)||nz(t)||iz(e,t)}function rz(e,t){const a=Ly(e),r=Ed.find(u=>u.extension===a);if(r)return r.family;const s=tf(t),c=Ed.find(u=>u.mimeTypes.includes(s));return c?c.family:null}const oz=[...SE,..._E].join(","),sz="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function lz(e){return e.replace(/^https?:\/\//i,"").replace(/\/$/,"")}function cz(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 EE(e,t){const a=rz(e,t),{glyph:r,typeNoun:s}=a===null?{glyph:"doc",typeNoun:"File"}:cz(a);return{glyph:r,typeNoun:s,extension:Ly(e).replace(".","").toUpperCase()}}function uz(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}function jd(e){var t;return((t=e.renditions.poster)==null?void 0:t.url)??(e.kind==="image"?e.file_url:null)}function dz(e){var t;return e.kind!=="image"?jd(e):(Bd(e.crop)?(t=e.renditions.crop)==null?void 0:t.url:void 0)??jd(e)}function jE(e){if(e.kind!=="image"||e.state==="failed")return!1;const{crop:t,cutout:a}=e.renditions;return t!==null&&Bd(e.crop)&&!fs(t.over.crop,e.crop)?!0:a!==null&&!fs(a.over.crop,e.crop)}function fz(e){return e.url!==null||e.renditions.encode!==null}function OE(e){return e.url!==null&&H5(e.url)!==null}function vc({renditions:e={},...t}){const a=new Set(k_),r=s=>{const c=e[s];if(c===void 0)return null;const u={key:c,mime:null,width:null,height:null,bytes:null,url:c};return a.has(s)?{...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(G5.map(s=>[s,r(s)]))}}function AE(e){var t,a,r,s;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)??jd(e)??""};case"video":return{id:e.id,kind:"video",name:e.name,size:"",src:((a=e.renditions.poster)==null?void 0:a.url)??"",ready:fz(e),durationMs:e.renditions.encode===null?null:e.duration_ms,videoSource:Z5(e),...e.provider!==null?{provider:e.provider}:{}};case"tour":return{id:e.id,kind:"tour",name:e.name,size:"",src:((r=e.renditions.poster)==null?void 0:r.url)??"",ready:OE(e),provider:e.provider??""};case"document":return{id:e.id,kind:"document",name:e.name,size:e.bytes!==null&&e.bytes>0?uz(e.bytes):"",src:((s=e.renditions.poster)==null?void 0:s.url)??"",mime:e.mime??""}}}function hz(e){if(e==null||!Number.isFinite(e)||e<0)return"";const t=Math.round(e/1e3),a=Math.floor(t/60),r=t%60;return`${a}:${String(r).padStart(2,"0")}`}const mz=5;function Qw(e){return`${Math.round(e/(1024*1024))} MB`}function pz(e){return e.size>Yw?{ok:!1,message:`This file is ${Qw(e.size)}. The maximum upload size is ${Qw(Yw)}.`}:az(e.name,e.type)?{ok:!0}:{ok:!1,message:`This file type (${e.type||"unknown"}) isn't supported. Upload ${sz}.`}}function gz(e){return e.attempt?{kind:"resume",attempt:e.attempt}:{kind:"fresh"}}function nf(e){const{mediaFactsQuery:t}=Dy(),a=t(e??"");return gc({...a,select:r=>r.facts,enabled:!!e}).data}async function Wp(e,t,a){await e.invalidateQueries({queryKey:t.mediaFactsQuery(a).queryKey})}const yz=new Map;function bz(e){if(e===void 0)return yz;const t=new Map;for(const[a,r]of qd(e)){if(!Object.hasOwn(e.files,r.file))continue;const s=e.files[r.file];"renditions"in s&&t.set(a,zg(s,r))}return t}function Cs(e){const t=nf(e===""?null:e);return x.useMemo(()=>bz(t),[t])}const vz={search:Oy,chevd:vy,chevr:xy,chevl:JS,grid:aE,list:rE,plus:Xd,choose:WS,cloud:wy,dots:RL,trash:Os,down:eE,x:Ny,check:Kd,warn:c8,recheck:Q6,play:sE,eye:nE,pencil:Sy,crop:OL,image:Qd,doc:Yd,spreadsheet:iE,presentation:Ey,file:VL,video:Ay,tour:by,upload:Zd};function it({name:e,size:t=14,stroke:a=1.8}){const r=vz[e];if(!r)return null;const s={width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`};return e==="play"?d.jsx(r,{size:t,strokeWidth:a,fill:"currentColor",style:s}):d.jsx(r,{size:t,strokeWidth:a,style:s})}const zy={image:{process:[Et.probe(),Et.understand(),Et.preview(),Et.ladder()],gates:["probe","understand"],publishes:["preview","ladder"]},video:{process:[Et.probe(),Et.transcode(),Et.poster(),Et.understand(),Et.preview(),Et.ladder(),Et.fetch()],gates:["probe","understand"],publishes:["transcode","poster","preview","ladder"]},document:{process:[Et.probe(),Et.understand(),Et.poster(),Et.rasterize(),Et.preview(),Et.ladder()],gates:["probe","understand"],publishes:["poster","preview","ladder"]},tour:{process:[Et.fetch(),Et.tour_details(),Et.understand()],gates:["understand"],publishes:[]}};function xz(e){for(const t of Jr){const a=e[t];if(a===void 0)return`has no row for ${t} — every media kind has one`;const r=new Set;for(const s of a.process){const c=d_(s);if(c===null||typeof s!="object")return`${t}'s row lists ${JSON.stringify(s)}, which is no process binding`;const u=Xa[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=Mg(c);if(m!==null)return`${t}'s row lists "${c.verb}" with options that do not fit: ${m}`;if(r.has(c.verb))return`${t}'s row lists "${c.verb}" twice — a row runs each process once`;r.add(c.verb)}for(const s of a.gates)if(!r.has(s))return`${t}'s row gates on "${s}", which is not on its row`;for(const s of a.publishes)if(!r.has(s))return`${t}'s row publishes on "${s}", which is not on its row`}return null}const Xw=xz(zy);if(Xw!==null)throw new Error(`KIND_TABLE ${Xw}.`);const wz={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},kz={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 _z(e,t){const a=kz[e];if(typeof a=="string")return a;const r=a[t];if(r===void 0)throw new Error(`kindRow(${t}): "${e}" names no input for ${t}.`);return r}const NE={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 Jr){const t=zy[e].process.map(a=>a.verb);for(const{before:a,after:r}of NE[e])if(!t.includes(a)||!t.includes(r))throw new Error(`KIND_TABLE: ${e}'s edge ${a} → ${r} names a verb not on its row.`)}const Zw=new Map,Sz={image:[Et.crop()],video:[],document:[],tour:[]};for(const e of Jr)for(const t of Sz[e]){const a=Xa[t.verb];if(a.site!=="place"||!a.kinds.includes(e))throw new Error(`PLACE_TABLE: ${e}'s row lists "${t.verb}", which is no place process of ${e}.`)}function Ez(e){const t=Zw.get(e);if(t!==void 0)return t;const a=zy[e],r=a.process.map(c=>{const u=_z(c.verb,e);return{verb:c.verb,binding:c,input:u,present:wz[u],gates:a.gates.includes(c.verb),publishes:a.publishes.includes(c.verb)}}),s={kind:e,entries:r,edges:NE[e],gates:a.gates};return Zw.set(e,s),s}const xc={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]"}},Od=Object.keys(xc);function On(e){return"send"in e}function ME(e){return On(e)?e.id:e.asset.id}function jz(e){return e.renditions.poster!==null||e.state==="failed"?!1:e.url!==null?e.state==="processing":Ez(e.kind).entries.some(t=>t.verb==="poster"&&t.present(e))}function Oz(e){return e.url!==null&&e.state==="failed"}function $l(e){return e.url!==null}function CE(e){return m_(/^https?:\/\//i.test(e)?e:`https://${e}`)}const Az=()=>0;function Nz({asset:e,list:t,tier:a},r){const s=r(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:dz(e),addedAt:Date.parse(e.added_at),previewPending:jz(e),linkUnreachable:Oz(e),inFlight:!1,error:null,list:t,tier:a??s,upstream:s>0}}function Mz(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 Cz(e,t=Az){return On(e)?Mz(e):Nz(e,t)}function Ww(e){return e.kind===null?Od.length:Od.indexOf(e.kind)}const Rz={name:(e,t)=>e.name.localeCompare(t.name),kind:(e,t)=>Ww(e)-Ww(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 Tz(e,t,a){const r=t==="all"?[...e]:e.filter(c=>c.kind===t),s=Rz[a];return r.sort((c,u)=>c.tier-u.tier||s(c,u))}function Dz(e){const t={all:e.length};for(const a of Od)t[a]=0;for(const a of e)a.kind&&(t[a.kind]+=1);return t}function RE(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 TE(e,t=Date.now()){const a=new Date(e),r=new Date(t),s=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),c=Math.round((s(r)-s(a))/864e5);return c<=0?"Today":c===1?"Yesterday":a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Lz(e){const[t,a]=x.useState(e);return(e===null||t===null)&&t!==e&&a(e),x.useEffect(()=>{if(e===null||t===null||e===t)return;let r=!0;const s=new Image,c=()=>{r&&a(e)};return s.onload=c,s.onerror=c,s.src=e,()=>{r=!1,s.onload=null,s.onerror=null}},[e,t]),e===null?null:t}const zz="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]",$z={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 Xr({kind:e,size:t="mark",glyph:a,decorative:r=!1}){const s=xc[e],c=$z[t];return d.jsx("span",{className:ie("inline-grid shrink-0 place-items-center text-white",c.box,s.solid),...r?{"aria-hidden":!0}:{role:"img","aria-label":s.label},children:d.jsx(it,{name:a??s.icon,size:c.glyph,stroke:2})})}function DE({file:e}){if(e.kind===null)return null;const t=xc[e.kind];return d.jsxs("span",{className:ie(zz,t.soft),children:[d.jsx(it,{name:t.icon,size:10,stroke:2.2}),t.label]})}function Uz(e){const t=e.url!==null?xE(e.url).name:e.bytes!==null?RE(e.bytes):"",a=TE(e.addedAt);return t?`${t} · ${a}`:a}function Iz(e){return EE(e.name,e.mime??"").glyph}function Bz(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 Hz={row:"thumb",card:"logo",lightbox:"hero"};function $y({file:e,face:t="card"}){const a=Lz(e.thumbnailUrl);if(a)return d.jsx("div",{"data-preview":"image",className:"relative h-full w-full bg-cover bg-top",style:{backgroundImage:`url("${a}")`},children:e.kind==="video"?d.jsx("span",{className:`absolute inset-0 m-auto ${Bz(t==="lightbox")}`,children:d.jsx(it,{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 r=e.kind==="document"?Iz(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(it,{name:"file",size:t==="row"?16:32,stroke:1.6})}):d.jsx(Xr,{kind:e.kind,size:Hz[t],decorative:!0,...r===void 0?{}:{glyph:r}}),t==="lightbox"?d.jsx("span",{className:"line-clamp-2 max-w-[80%] text-body text-ink-3",children:e.name}):null]})}const Yu="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]",LE="Can’t be reached",Jp="We couldn’t load this link. It may be private, unpublished, or mistyped. Fix it at the provider, then re-check.",Qu="absolute inset-0 z-[2] flex items-center justify-center bg-[rgba(252,252,250,0.82)] px-1";function zE({file:e,compact:t=!1,onRetry:a,onRecheck:r}){if(e.state==="uploading"){const s=e.progress??0;return d.jsx("div",{className:t?Qu:Yu,children:d.jsx("span",{role:"progressbar","aria-label":"Uploading","aria-valuenow":Math.round(s),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:`${s}%`}})})})}return e.state==="processing"?d.jsx("div",{className:t?Qu:Yu,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:`${Qu} text-danger`,title:e.error??void 0,children:d.jsx(it,{name:"warn",size:13})}):e.state==="failed"?d.jsxs("div",{className:`${Yu} text-[length:calc(11.5*var(--content))] font-semibold text-danger`,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[85%] truncate",children:e.error}),a?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:s=>{s.stopPropagation(),a()},children:"Retry"}):null]}):e.linkUnreachable&&t?d.jsx("div",{className:`${Qu} text-warn`,title:Jp,children:d.jsx(it,{name:"warn",size:13})}):e.linkUnreachable?d.jsxs("div",{className:`${Yu} text-[length:calc(11.5*var(--content))] font-semibold text-warn`,title:Jp,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[90%]",children:LE}),r?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:s=>{s.stopPropagation(),r()},children:[d.jsx(it,{name:"recheck",size:11}),"Re-check"]}):null]}):null}function wc(e,t,a,r){x.useEffect(()=>{if(!t)return;const s=u=>{var p,g;const m=u.target;!((p=e.current)!=null&&p.contains(m))&&!((g=r==null?void 0:r.current)!=null&&g.contains(m))&&a()},c=u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),a())};return document.addEventListener("pointerdown",s,!0),document.addEventListener("keydown",c),window.addEventListener("blur",a),()=>{document.removeEventListener("pointerdown",s,!0),document.removeEventListener("keydown",c),window.removeEventListener("blur",a)}},[e,t,a,r])}function $E({inputRef:e,accept:t,onFiles:a,disabled:r,multiple:s=!0}){return d.jsx("input",{ref:e,type:"file",multiple:s,hidden:!0,accept:t,onChange:c=>{!r&&c.target.files&&c.target.files.length>0&&a(Array.from(c.target.files)),c.target.value=""}})}function Ad(e,t="or"){return e.length<2?e[0]??"":`${e.slice(0,-1).join(", ")} ${t} ${e.at(-1)}`}const UE=["tour","video"],qz={tour:"3D tour",video:"video"};function Uy(e){return UE.filter(t=>e.includes(t)).flatMap(t=>qz[t]??[])}function Fz(e,t){const a=s=>e.includes(s);if(t.accept!==null){const s=[...a("image")?["photos"]:[],...a("image")&&a("document")?["floor plans"]:[],...a("document")?["documents"]:[],...a("video")?["video"]:[]];return s.length===0?null:`Drop ${Ad(s)} anywhere here`}if(!t.onLink)return null;const r=Uy(e);return r.length===0?null:`Paste a link to a ${Ad(r)}`}function Pz(e,t){const a=e.trim();if(!a)return{state:"empty"};const r=CE(a);return r===null||!t.includes(r)?{state:"refused"}:{state:"ok",kind:r,provider:xE(a).name}}function Vz(e,t,a){const[r,s]=x.useState(""),c=Pz(r,a),u=!t&&c.state==="ok";return{value:r,setValue:s,verdict:c,canAdd:u,submit:p=>{p.preventDefault(),p.stopPropagation(),u&&(e(r.trim()),s(""))},kinds:a}}function Gz({verdict:e,kinds:t,className:a}){return d.jsx("div",{className:ie("flex items-center gap-2 text-[length:calc(11.5*var(--content))]",a),"aria-live":"polite",children:e.state==="ok"?d.jsxs(d.Fragment,{children:[d.jsx(Xr,{kind:e.kind,decorative:!0}),d.jsxs("span",{className:"font-medium text-ink-2",children:[e.provider," ",xc[e.kind].label.toLowerCase()]})]}):e.state==="refused"?d.jsxs("span",{className:"text-warn",children:["Only ",Ad(Uy(t),"and")," links can be added."]}):null})}const Kz="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 Yz({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(_y,{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 ${Ad(Uy(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(Kz,"h-8 rounded-md px-3 text-[length:calc(12.5*var(--content))]"),children:"New link"})]})}function Qz({add:e,kinds:t,dragging:a}){if(e===null)return d.jsx(_d,{icon:d.jsx(Xp,{size:25,strokeWidth:1.8}),headline:"Nothing here yet"});const r=Fz(t,e);return d.jsx(_d,{icon:e.accept!==null?d.jsx(wy,{size:25,strokeWidth:1.8}):d.jsx(_y,{size:24,strokeWidth:1.8}),headline:a?"Drop to upload":"Nothing uploaded yet",...r!==null?{line:r}:{},lifted:a})}function Xz({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(wy,{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 Zz({onAdd:e,disabled:t,kinds:a}){const r=Vz(e,t,a);return d.jsxs("div",{className:"flex flex-col gap-2 px-1 pb-1",children:[d.jsx(Yz,{draft:r}),d.jsx(Gz,{verdict:r.verdict,kinds:a,className:"px-0.5 empty:hidden"})]})}function IE({add:e,onBrowse:t,onLinked:a,uploadDetail:r}){return d.jsxs(d.Fragment,{children:[e.accept!==null?d.jsx(Xz,{onChoose:t,...r!==void 0?{detail:r}:{}}):d.jsx("div",{className:"px-1.5 pb-0.5 pt-1 text-body font-semibold text-ink",children:"New link"}),d.jsx(Zz,{onAdd:s=>{e.onLink(s),a()},disabled:e.disabled,kinds:e.linkKinds??UE})]})}function Wz({add:e,verb:t}){const{accept:a,onFiles:r,onLink:s,disabled:c}=e,[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),v=x.useCallback(()=>m(!1),[]);wc(p,u,v);const b=()=>{var _;v(),(_=g.current)==null||_.click()},w=()=>{u?v():s?m(!0):b()};return d.jsxs("div",{className:"relative",ref:p,onClick:_=>_.stopPropagation(),children:[a!==null?d.jsx($E,{inputRef:g,accept:a,onFiles:r,disabled:c}):null,d.jsx(Sd,{add:t,size:"large",onClick:w,...s?{expanded:u}:{}}),u&&s?d.jsx("div",{className:`${ef} 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(IE,{add:{...e,onLink:s},onBrowse:b,onLinked:v,uploadDetail:"Photos, floor plans, documents or video"})}):null]})}function BE(e,t,a,r=!0){const{accept:s,onFiles:c,onLink:u,disabled:m}=e,[p,g]=x.useState(!1),[v,b]=x.useState(null),w=x.useRef(null),_=x.useRef(null),E=x.useCallback(()=>{g(!1),b(null)},[]);wc(a,p,E,w),x.useLayoutEffect(()=>{if(!p)return;const C=()=>{const A=a.current,O=w.current;if(!A||!O)return;const T=O.offsetHeight,R=cc(cs(A),{height:T,maxHeight:T,minWidth:O.offsetWidth});b(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,a]);const S=()=>{var C;E(),(C=_.current)==null||C.click()},j=d.jsxs(d.Fragment,{children:[s!==null?d.jsx($E,{inputRef:_,accept:s,onFiles:c,disabled:m,multiple:r}):null,p&&u?tr.createPortal(d.jsx("div",{ref:w,className:`we-no-drag ${ef} flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,style:v?{position:"fixed",...v,zIndex:Qr}:{position:"fixed",top:0,left:0,zIndex:Qr,opacity:0,pointerEvents:"none"},role:"dialog","aria-label":t,onClick:C=>C.stopPropagation(),children:d.jsx(IE,{add:{...e,onLink:u},onBrowse:S,onLinked:E})}),document.body):null]});return{start:()=>{u?p?E():g(!0):S()},...u?{expanded:p}:{},node:j}}function Jz({add:e,intake:t,trigger:a}){const r=x.useRef(null),s=BE(t,e.label,r);return d.jsxs(d.Fragment,{children:[s.node,a({buttonRef:r,...s.expanded!==void 0?{expanded:s.expanded}:{},onClick:s.start})]})}const e$="relative cursor-grab touch-none select-none",t$="relative grid grid-cols-[repeat(auto-fill,minmax(calc(150*var(--frame)),1fr))] gap-2.5",n$={compact:"flex flex-col gap-2.5",large:"flex flex-col gap-3"},Jw=new Set;function Iy(e,t,a){const r=a!==null?{kind:"take",intake:a}:t!==null?{kind:"choose",open:t}:null;return{add:e.add,onAdd:r,choose:e.choose!==null&&t!==null?{choose:e.choose,onChoose:t}:void 0}}function Rs(e,t,a,r,s){const c=new Set(t.map(g=>g.id)),u=e.filter(g=>{const v=a(g.value);return v===null||c.has(v)}),m=new Set(u.map(g=>a(g.value)));return[...t.filter(g=>!m.has(g.id)).map(g=>s(r(g))),...u]}function By({engine:e,label:t,noun:a,size:r,onAdd:s,add:c,choose:u,renderTile:m,tileActions:p,onRemove:g,children:v}){const{rows:b,canAdd:w,canRemove:_}=e,{containerRef:E,getItemProps:S}=e.drag,[j,C]=x.useState(Jw),A=b.filter(P=>j.has(P.key)),O=A.map(P=>P.key),T=P=>C(le=>{const ee=new Set(le);return ee.has(P)?ee.delete(P):ee.add(P),ee}),R=()=>C(Jw),B=P=>{g?g(P):e.removeMany(P.map(le=>le.key)),R()},D=P=>{if(!_)return null;const le=j.has(P.key)&&A.length>1?A:null;return le?{label:`Remove ${le.length} ${a}s`,glyph:"trash",danger:!0,onSelect:()=>B(le)}:{label:"Remove",glyph:"trash",danger:!0,onSelect:()=>B([P])}},L=w?d.jsx(bc,{size:r,add:c,onAdd:(s==null?void 0:s.kind)==="choose"?s.open:null,...(s==null?void 0:s.kind)==="take"?{newChip:d.jsx(Jz,{add:c,intake:s.intake,trigger:P=>d.jsx(Sd,{add:c,size:r,...P})})}:{},choose:u}):null;return d.jsxs("div",{className:Yr,children:[d.jsxs("div",{className:n$[r],children:[L,b.length===0?r==="large"&&d.jsx("div",{className:"py-4.5 text-center text-small text-ink-3",children:c.empty}):d.jsx("div",{className:t$,ref:E,onClick:P=>{P.target===P.currentTarget&&R()},children:d.jsx("div",{className:"contents",role:"listbox","aria-multiselectable":!0,"aria-label":t,onKeyDown:P=>{P.key!=="Escape"||O.length===0||(P.stopPropagation(),R())},children:b.map((P,le)=>{const ee=D(P),de={selected:j.has(P.key),onToggleSelect:()=>T(P.key),actions:[...(p==null?void 0:p(P))??[],...ee?[ee]:[]]},K=j.has(P.key)&&O.length>1?O:void 0;return d.jsx("div",{...S(P.key,K),className:e$,children:m(P,le,de)},P.key)})})})]}),v]})}const i$="data-drag-clone",ek="0 16px 38px -8px rgba(20,18,13,0.5)",a$=["id","for","name","data-dragid","data-drag-scope"];function id(e){if(!e||e==="transparent")return!1;const t=/^rgba\([^,]+,[^,]+,[^,]+,\s*([\d.]+)\s*\)$/.exec(e);if(t)return Number(t[1])>=1;const a=/\/\s*([\d.]+)(%?)\s*\)$/.exec(e);return a?Number(a[1])>=(a[2]?100:1):!0}function r$(e){for(let t=e;t;t=t.parentElement){const a=getComputedStyle(t).backgroundColor;if(id(a))return a}return"#fff"}function tk(e){for(let t=e;t;){const a=getComputedStyle(t).borderRadius;if(o$(a))return a;const r=t.children.length===1?t.children[0]:null;t=r&&r.offsetWidth===e.offsetWidth&&r.offsetHeight===e.offsetHeight?r:null}return null}function o$(e){return e!==""&&!/^(0(px)?\s*)+$/.test(e)}function s$(e){const t=e.cloneNode(!0),a=[e,...e.querySelectorAll("*")],r=[t,...t.querySelectorAll("*")];a.forEach((s,c)=>{const u=r[c];if(!(!u||u.tagName!==s.tagName))switch(s.tagName){case"INPUT":u.value=s.value,u.checked=s.checked;break;case"TEXTAREA":case"SELECT":u.value=s.value;break;case"VIDEO":u.muted=!0,u.autoplay=!1;break}});for(const s of r)for(const c of a$)s.removeAttribute(c);return t.setAttribute(i$,""),t.setAttribute("aria-hidden","true"),t.inert=!0,t}function l$(e,t,a){if(t===a||t<0||a<0)return e;const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}const HE="data-drag-scope";function Ym(e){return Array.from(e.querySelectorAll("[data-dragid]")).filter(t=>t.closest(`[${HE}]`)===e)}function c$(e){const t=/^matrix(3d)?\(([^)]+)\)$/.exec(e.trim());if(!(t!=null&&t[2]))return{x:0,y:0};const a=t[2].split(",").map(Number),[r,s]=t[1]?[a[12],a[13]]:[a[4],a[5]];return{x:r||0,y:s||0}}const nk=190,ik=220,Qm="cubic-bezier(.2,.7,.3,1)",u$="0.4",d$="0",f$="1",h$="2",m$="60",Nd="data-drag-active",ak="hp-drag-reorder-active",p$=`html[${Nd}], html[${Nd}] * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }`;function Xm(e){const t=document.documentElement;if(!e){t.removeAttribute(Nd);return}if(!document.getElementById(ak)){const a=document.createElement("style");a.id=ak,a.textContent=p$,document.head.appendChild(a)}t.setAttribute(Nd,"")}function rk(e){return!e||typeof e.animate!="function"?!1:!(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}function g$(e){if(!e)return;const t=a=>{a.target!==null&&e.contains(a.target)&&(a.stopPropagation(),a.preventDefault()),window.removeEventListener("click",t,!0)};window.addEventListener("click",t,!0),setTimeout(()=>window.removeEventListener("click",t,!0),0)}const y$="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 b$(e,t,a){const r=e.filter(c=>a.has(t(c))),s=r[0];return{collapsed:e.filter(c=>c===s||!a.has(t(c))),members:r}}function v$(e,t){const a=t[0]===void 0?-1:e.indexOf(t[0]);return a<0?e:[...e.slice(0,a),...t,...e.slice(a+1)]}function qE({items:e,getKey:t,onReorder:a,onDrop:r,axis:s="xy",threshold:c=4,ignoreSelector:u=".we-no-drag"}){const[m,p]=x.useState(null),g=x.useRef(null),v=x.useRef({}),b=x.useRef({grabX:0,grabY:0,scale:1,originLeft:0}),w=x.useRef({x:0,y:0}),_=x.useRef(null),E=x.useRef(null),S=x.useRef(null),j=x.useRef(null),C=x.useRef("#fff"),A=x.useRef(new Set),O=x.useRef(new Map),T=x.useRef(new WeakMap),R=x.useRef(null),B=x.useRef(null),D=x.useRef(e),L=x.useRef(t),P=x.useRef({onReorder:a,onDrop:r});x.useLayoutEffect(()=>{P.current={onReorder:a,onDrop:r}}),x.useEffect(()=>()=>{var W;const I=R.current;R.current=null,I&&P.current.onDrop(I);const F=B.current;F&&(window.removeEventListener("pointermove",F.move),window.removeEventListener("pointerup",F.end),window.removeEventListener("pointercancel",F.end)),(W=j.current)==null||W.remove(),S.current&&Xm(!1)},[]);function le(I){const F=I.getBoundingClientRect(),W=b.current.scale||1;return{x:(w.current.x-F.left)/W-I.clientLeft,y:(w.current.y-F.top)/W-I.clientTop}}function ee(){const I=j.current,F=g.current;if(!I||!F)return;const W=le(F);I.style.left=`${s==="y"?b.current.originLeft:W.x-b.current.grabX}px`,I.style.top=`${W.y-b.current.grabY}px`}function de(){const I=g.current,{x:F,y:W}=le(I),pe=D.current;let oe=0,ke=1/0;return Ym(I).forEach(z=>{const ce=pe.findIndex(Ie=>L.current(Ie)===z.dataset.dragid);if(ce<0)return;const ye=z.offsetLeft+z.offsetWidth/2,Se=z.offsetTop+z.offsetHeight/2,Le=(F-ye)**2+(W-Se)**2;Le<ke&&(ke=Le,oe=ce)}),Math.max(0,Math.min(pe.length-1,oe))}function K(I,F,W){const pe=!O.current.has(I),oe=O.current.get(I)??{position:I.style.position,zIndex:I.style.zIndex,opacity:I.style.opacity,borderRadius:I.style.borderRadius};O.current.set(I,oe),getComputedStyle(I).position==="static"&&(I.style.position="relative"),pe&&(I.style.borderRadius=tk(I)??oe.borderRadius),I.style.zIndex=F,I.style.opacity=W?u$:oe.opacity,W?I.setAttribute("data-ghost",""):I.removeAttribute("data-ghost")}function Q(I){const F=O.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"),O.current.delete(I))}function se(I,F){var z;C.current=r$(I);const W=getComputedStyle(F).backgroundColor,pe=tk(F),oe=s$(F);pe&&(oe.style.borderRadius=pe),Object.assign(oe.style,{position:"absolute",left:"0px",top:"0px",width:`${F.offsetWidth}px`,margin:"0",zIndex:m$,pointerEvents:"none",transform:"none",opacity:"1",transition:"none",animation:"none",boxShadow:ek,backgroundColor:id(W)?W:C.current}),b.current.originLeft=F.offsetLeft;const ke=((z=E.current)==null?void 0:z.length)??1;if(ke>1){const ce=document.createElement("span");ce.className=y$,ce.textContent=String(ke),oe.appendChild(ce)}I.appendChild(oe),j.current=oe}function N(I,F,W,pe){if(F.left===W.left&&F.top===W.top)return;const oe=T.current.get(I),ke=(oe==null?void 0:oe.playState)==="running"?c$(getComputedStyle(I).transform):{x:0,y:0};oe==null||oe.cancel();const z=F.left+ke.x-W.left,ce=F.top+ke.y-W.top;if(!z&&!ce)return;T.current.set(I,I.animate([{transform:`translate(${z}px,${ce}px)`},{transform:"none"}],{duration:nk,easing:Qm}));const ye=C.current;pe&&!id(getComputedStyle(I).backgroundColor)&&I.animate([{backgroundColor:ye},{backgroundColor:ye}],{duration:nk})}function V(I,F,W){var Se;(Se=T.current.get(I))==null||Se.cancel();const pe=F.left-W.left,oe=F.top-W.top;if(!pe&&!oe)return;const ke=getComputedStyle(I),z=id(ke.backgroundColor)?ke.backgroundColor:C.current;K(I,h$,!1);const ce=I.animate([{transform:`translate(${pe}px,${oe}px)`},{transform:"none"}],{duration:ik,easing:Qm});I.animate([{boxShadow:ek,backgroundColor:z},{boxShadow:ke.boxShadow,backgroundColor:z}],{duration:ik,easing:Qm}),T.current.set(I,ce);const ye=()=>{S.current||Q(I)};ce.onfinish=ye,ce.oncancel=ye}x.useLayoutEffect(()=>{const I=g.current;if(!I)return;I.setAttribute(HE,"");const F=S.current,W=A.current;A.current=new Set;const pe=Ym(I);if(F&&!j.current){const ce=pe.find(ye=>ye.dataset.dragid===F);ce&&se(I,ce)}if(!F)for(const ce of[...O.current.keys()])Q(ce);const oe=rk(I),ke=v.current,z={};pe.forEach(ce=>{const ye=ce.dataset.dragid,Se={left:ce.offsetLeft,top:ce.offsetTop};z[ye]=Se,F&&K(ce,ye===F?d$:f$,ye===F);const Le=ke[ye];!Le||!oe||(W.has(ye)?V(ce,Le,Se):N(ce,Le,Se,F!==null&&ye!==F))}),v.current=z,F&&ee()});function te(){const I=R.current;R.current=null,I&&P.current.onDrop(I)}function me(I,F,W){var ye,Se,Le,Ie,ge;te();const pe=g.current,oe=Ym(pe).find(Re=>Re.dataset.dragid===I)??null;if(!oe)return;const ke=oe.getBoundingClientRect(),z=pe.getBoundingClientRect().width/pe.offsetWidth||1;b.current={grabX:(W.clientX-ke.left)/z,grabY:(W.clientY-ke.top)/z,scale:z,originLeft:oe.offsetLeft},(Se=(ye=document.activeElement)==null?void 0:ye.blur)==null||Se.call(ye),(ge=(Ie=(Le=window.getSelection)==null?void 0:Le.call(window))==null?void 0:Ie.removeAllRanges)==null||ge.call(Ie),Xm(!0),w.current={x:W.clientX,y:W.clientY},D.current=e,L.current=t,E.current=null;let ce=I;if(F&&F.length>1&&F.includes(I)){const{collapsed:Re,members:ht}=b$(e,t,new Set(F)),$e=ht[0];ht.length>1&&$e!==void 0&&(E.current=ht,ce=t($e),D.current=Re,P.current.onReorder(Re))}S.current=ce,p(ce)}function Y(I,F,W){I.button===0&&(I.target.closest(u)||(_.current={key:F,x:I.clientX,y:I.clientY,group:W},B.current={move:M,end:H},window.addEventListener("pointermove",M),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)))}function M(I){const F=_.current;if(!F)return;if(!S.current){if(Math.hypot(I.clientX-F.x,I.clientY-F.y)<c)return;me(F.key,F.group,I)}w.current={x:I.clientX,y:I.clientY},ee();const W=de(),pe=D.current,oe=pe.findIndex(z=>L.current(z)===S.current);if(oe<0||oe===W)return;const ke=l$(pe,oe,W);D.current=ke,P.current.onReorder(ke)}function H(){window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),B.current=null,_.current=null;const I=S.current;if(!I)return;const F=E.current;E.current=null;const W=F?F.map(oe=>L.current(oe)):[I];if(F){const oe=v$(D.current,F);D.current=oe,P.current.onReorder(oe)}const pe=j.current;if(pe){for(const oe of W)v.current[oe]={left:pe.offsetLeft,top:pe.offsetTop};A.current=new Set(W),pe.remove(),j.current=null}g$(g.current),S.current=null,Xm(!1),p(null),R.current=D.current,rk(g.current)?requestAnimationFrame(()=>setTimeout(te,0)):te()}return{containerRef:g,getItemProps:(I,F)=>({"data-dragid":I,onPointerDown:W=>Y(W,I,F)}),draggingKey:m}}let x$=0;function w$(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(x$++).toString(36)}`}function Md(e,t){return{key:(t==null?void 0:t(e))??w$(),value:e}}function k$(e,t){return e.map(a=>Md(a,t))}function _$(e,t,a){return t.map((r,s)=>{const c=e[s];return c!==void 0&&JSON.stringify(c.value)===JSON.stringify(r)?{key:c.key,value:r}:Md(r,a)})}function Zm(e){return JSON.stringify(e)}function nr({items:e,identityOf:t,fixed:a=!1,axis:r="y",commit:s,onCommitted:c}){const[u,m]=x.useState(()=>k$(e,t)),[p,g]=x.useState(()=>Zm(e)),v=x.useRef(u);x.useEffect(()=>{v.current=u},[u]);function b(j){v.current=j,m(j)}function w(j,C){b(j),g(Zm(j.map(A=>A.value))),s(j,C),c==null||c(j,C)}const _=qE({items:u,getKey:j=>j.key,onReorder:b,onDrop:j=>w(j,"reorder"),axis:r,threshold:5});if(!_.draggingKey){const j=Zm(e);j!==p&&(g(j),m(_$(u,e,t)))}function E(j,C){const A=v.current;A.some(O=>O.key===j)&&w(A.map(O=>O.key===j?{...O,value:C(O.value)}:O),"edit")}function S(j,C=0){if(a)return;const A=v.current,O=Math.min(Math.max(C,0),A.length);w([...A.slice(0,O),j,...A.slice(O)],"add")}return{rows:u,drag:_,canAdd:!a,canRemove:!a,add:(j,C)=>S(Md(j,t),C),insert:S,remove:j=>{a||w(v.current.filter(C=>C.key!==j),"remove")},removeMany:j=>{const C=v.current,A=C.filter(O=>!j.includes(O.key));a||A.length===C.length||w(A,"remove")},setValue:(j,C)=>E(j,()=>C),updateValue:E,replace:j=>w(j,"replace"),mint:j=>Md(j,t),indexOf:j=>u.findIndex(C=>C.key===j),keyAt:j=>{var C;return((C=u[j])==null?void 0:C.key)??null},latestRows:()=>v.current}}function Hy(e,t){const a=D8();return e!==void 0&&t!==""&&a!==void 0&&a(e,t)}function ir(e,t,a,r){return e.isEmpty(a)?r?"required":null:e.isInvalid(a,t)?"invalid":null}const S$={failed:"Crop failed. The image is unchanged. Try cropping again."};function E$({storeKey:e}){const t=QT(e),a=uy(r=>r.clearNotice);return t?d.jsxs("p",{role:"alert","data-crop-notice":t,className:ie(As,"flex items-center justify-between gap-2"),children:[d.jsx("span",{children:S$[t]}),d.jsx("button",{type:"button",className:ie(vt,"shrink-0 underline"),onClick:()=>a(e),children:"Dismiss"})]}):null}const FE=["asset_id","photo_id","video_id","tour_id"];function Ji(e){if(typeof e!="object"||e===null)return null;const t=e;for(const a of FE){const r=t[a];if(typeof r=="string"&&r.length>0)return r}return Wi(e)??null}function j$(e){if(typeof e!="object"||e===null)return!1;const t=e;return FE.some(a=>typeof t[a]=="string")||Wi(e)!==void 0}function PE(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const t=Ji(e),a=e.picked;if(t!==null)return{asset_id:t,...typeof a=="string"||a===null?{picked:a}:{}}}return{asset_id:""}}function O$(e){return e.map(PE).filter(t=>t.asset_id!=="")}function VE(e){switch(e.kind){case"document":return EE(e.name,e.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":case"plan":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function A$(e){return[VE(e).typeNoun,e.size].filter(Boolean).join(" · ")}function N$(e){const t=Cs(e);return a=>{const r=t.get(a);return r===void 0?void 0:AE(r)}}const M$={page:"expanded",panel:"compact",cell:"compact"};function C$(e){return M$[e]}const GE=x.createContext(null);function af({place:e,children:t}){return d.jsx(GE.Provider,{value:e,children:t})}function qy(){const e=x.useContext(GE);if(e===null)throw new Error("[slot-editors] a slot editor was drawn outside a place: its container mounts <SlotPlaceProvider>.");return e}const R$=x.createContext(!1);function Ts(){return x.useContext(R$)}const T$=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)]",Ns),D$="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",L$=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)]",Ns),KE={"data-card-fields":""},z$="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",$$={page:{frame:ie(Yr,"gap-1.5"),shell:T$,inner:D$,adornEnd:"pr-3.5",multiline:"resize-none leading-[1.5]",inline:!1},panel:{frame:Yr,shell:ie(S8,Ns),inner:E8,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:L$,inner:z$,adornEnd:"pr-2.5",multiline:"resize-none overflow-hidden whitespace-nowrap",inline:!0}};function ar(){return YE(qy())}function YE(e){return{place:e,...$$[e]}}function U$({count:e,max:t}){const a=t-e;return a>Math.ceil(t/5)?null:a<=0?{left:0,tone:"text-danger"}:{left:a,tone:a<=Math.ceil(t/10)?hE:"text-ink-4"}}const I$=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"),B$="pointer-events-none absolute inset-y-0 right-0 flex items-center",H$=ie("flex h-0 basis-full items-end justify-end overflow-hidden","transition-[height] duration-200 ease-out motion-reduce:transition-none"),q$={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 Zr({attention:e,count:t,className:a,ref:r,children:s}){const c=ar(),u=Ts(),[m,p]=x.useState(!1),g=t!==void 0&&!c.inline,v=g&&m?U$(t):null,b=g&&t.multiline,w=v!==null&&d.jsxs("span",{"data-field-count":"",className:ie(fE,v.tone,"leading-none transition-[opacity,transform] duration-200 ease-out starting:translate-y-1 starting:opacity-0 motion-reduce:transition-none"),children:[v.left,d.jsx("span",{className:"sr-only",children:" characters left"})]});return d.jsxs("div",{ref:r,className:ie(c.shell,g&&I$,a),...Ms(e,u),"data-count-room":g?b?"band":"end":void 0,"data-count-open":v!==null?"":void 0,onFocus:g?()=>p(!0):void 0,onBlur:g?()=>p(!1):void 0,children:[s,b?d.jsx("div",{className:ie(H$,q$[c.place],c.adornEnd),"data-open":v!==null?"":void 0,children:w}):v!==null&&d.jsx("div",{className:ie(B$,c.adornEnd),children:w})]})}function QE({attention:e,message:t}){const a=ar();return e!=="invalid"||a.inline?null:d.jsx("p",{className:As,children:t})}const XE="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(560*var(--frame))))]",F$="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(480*var(--frame))))]",Fy="data-upstream:opacity-55 data-upstream:hover:opacity-100 data-upstream:focus-within:opacity-100",P$="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)]",ZE="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))]",V$=`${ZE} text-ink-2 hover:bg-accent-soft hover:text-ink`,WE="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)]",JE="select-none";function G$(e,t){const a=[{label:"Preview",glyph:"eye",onSelect:t.onPreview}];return t.onRenameStart&&a.push({label:"Rename",glyph:"pencil",onSelect:t.onRenameStart}),t.onCrop&&a.push({label:"Crop",glyph:"crop",onSelect:t.onCrop}),$l(e)||a.push({label:"Download",glyph:"down",onSelect:t.onDownload}),t.onDelete&&a.push({label:t.deleteLabel??"Delete",glyph:"trash",onSelect:t.onDelete,danger:!0}),a}function ej({file:e,handlers:t,shown:a=!1}){return d.jsx(nj,{name:e.name,actions:G$(e,t),shown:a})}function tj(e){return{plain:e.filter(t=>!t.foot&&!t.danger),foot:[...e.filter(t=>t.foot&&!t.danger),...e.filter(t=>t.danger)]}}const ok=4;function nj({name:e,actions:t,shown:a=!1,scale:r="card"}){const[s,c]=x.useState(!1),u=x.useRef(null),m=x.useRef(null),p=x.useRef(null),[g,v]=x.useState(null),b=x.useCallback(()=>{c(!1),v(null)},[]);wc(u,s,b,p),x.useLayoutEffect(()=>{if(!s)return;const S=()=>{const j=m.current,C=p.current;if(!j||!C)return;const A=cs(j),O=C.offsetHeight,T=cc(A,{height:O,maxHeight:O,gap:ok});if(!T){v(null);return}const R=document.documentElement.clientWidth-A.rect.right;if(T.maxHeight>=O){v({top:T.top,bottom:T.bottom,right:R});return}const{rect:B,bounds:D}=A,L=D.bottom-jr-O,P=Math.max(D.top+jr,Math.min(B.bottom+ok,L));v({top:P,right:R})};return S(),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),()=>{window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}},[s]);const{plain:w,foot:_}=tj(t),E=S=>d.jsxs("button",{type:"button",role:"menuitem",className:S.danger?`${ZE} text-danger hover:bg-accent-soft`:V$,onClick:()=>{b(),S.onSelect()},children:[d.jsx(it,{name:S.glyph,size:13}),S.label]},S.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 ${a?r==="compact"?"h-6 w-6":"h-8 w-8":"h-5.5 w-5.5"} ${s||a?"opacity-100":"opacity-0"}`,"aria-label":`Actions for ${e}`,"aria-haspopup":"menu","aria-expanded":s,onClick:S=>{S.stopPropagation(),c(j=>!j)},onDoubleClick:S=>S.stopPropagation(),children:d.jsx(it,{name:"dots",size:r==="compact"?13:14})}),s?tr.createPortal(d.jsxs("div",{ref:p,className:`we-no-drag ${P$} w-[calc(188*var(--frame))] p-1.25`,style:g?{position:"fixed",...g,zIndex:Qr}:{position:"fixed",top:0,right:0,zIndex:Qr,visibility:"hidden"},role:"menu",onClick:S=>S.stopPropagation(),onDoubleClick:S=>S.stopPropagation(),children:[w.map(E),_.length>0?d.jsxs(d.Fragment,{children:[w.length>0?d.jsx("div",{className:"mx-0 my-1 h-px bg-line-soft"}):null,_.map(E)]}):null]}),document.body):null]})}function ij({name:e,onCommit:t}){const[a,r]=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:a,autoFocus:!0,"aria-label":`Rename ${e}`,onFocus:s=>s.target.select(),onClick:s=>s.stopPropagation(),onDoubleClick:s=>s.stopPropagation(),onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&t(a.trim()),s.key==="Escape"&&t(null),s.stopPropagation()},onBlur:()=>t(a.trim())})}function aj(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 Br={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"}},K$="we-no-drag flex cursor-auto flex-col gap-2 px-2 pt-2";function rj({kind:e,name:t,selected:a,select:r,onToggleSelect:s,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] ${a?"opacity-0":r.disabled?"":"group-hover/card:opacity-0"}`,children:e===null?d.jsx("span",{className:"text-ink-3",children:d.jsx(it,{name:"file",size:u?13:16})}):d.jsx(Xr,{kind:e,size:u?"dot":"mark"})}),d.jsx("button",{type:"button",role:r.control,"aria-checked":a,disabled:r.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 ${r.control==="radio"?"rounded-full":u?"rounded-[calc(4*var(--content))]":"rounded-md"} ${a?"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":a?`Deselect ${t}`:`Select ${t}`,onClick:m=>{m.stopPropagation(),s()},onDoubleClick:m=>m.stopPropagation(),children:d.jsx(it,{name:"check",size:u?10:12,stroke:2.6})})]})}function Y$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:s,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:v,handlers:b,drag:w,beneath:_}){return d.jsxs("div",{...w,role:"option","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,tabIndex:0,className:`${aj(t)} ${Fy} ${w?JE:""}`,onClick:r,onDoubleClick:s,onKeyDown:E=>{E.target===E.currentTarget&&E.key==="Enter"&&(E.stopPropagation(),b.onPreview())},children:[d.jsxs("div",{className:Br.card.bar,children:[d.jsx(rj,{kind:e.kind,name:e.name,selected:t,select:u,onToggleSelect:c}),a?d.jsx(ij,{name:e.name,onCommit:v}):d.jsx("span",{className:Br.card.name,title:e.name,children:e.name}),d.jsx(ej,{file:e,handlers:b,shown:!0})]}),d.jsxs("div",{className:Br.card.thumb,children:[d.jsx($y,{file:e}),d.jsx(zE,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`absolute right-2 top-2 z-[3] max-w-[calc(100%-16px)] ${WE}`,"data-list-chip":"",children:m}):null]}),_?d.jsx("div",{className:K$,...KE,onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),children:_}):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:Uz(e)})})]})}function Q$(){return d.jsxs("div",{className:`flex flex-col rounded-2xl ${Cy}`,children:[d.jsxs("div",{className:Br.card.bar,children:[d.jsx("span",{className:`h-4.5 w-4.5 shrink-0 rounded-md ${jn}`}),d.jsx("span",{className:"min-w-0 flex-1",children:d.jsx("span",{className:`block h-2.5 w-3/5 rounded-full ${jn}`})}),d.jsx("span",{className:`mr-1.5 h-1.5 w-4 shrink-0 rounded-full ${jn}`})]}),d.jsx("div",{className:ie(Br.card.thumb,jn)}),d.jsx("div",{className:"flex h-11 items-center px-3.5",children:d.jsx("span",{className:`h-2 w-2/5 rounded-full ${jn}`})})]})}const oj="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",sk="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[length:calc(11.5*var(--content))] font-medium";function X$(){return d.jsxs("div",{role:"row",className:`${oj} 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 Z$({file:e,onRetry:t,onRecheck:a}){return e.state==="failed"?d.jsxs("span",{className:`${sk} text-danger`,children:[e.error,t?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),t()},children:"Retry"}):null]}):e.linkUnreachable?d.jsxs("span",{className:`${sk} text-warn`,title:Jp,children:[LE,a?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),a()},children:"Re-check"}):null]}):null}function W$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:s,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:v,handlers:b,drag:w}){return d.jsxs("div",{...w,role:"row","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,className:`group ${oj} ${Fy} 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]"} ${w?JE:""}`,onClick:r,onDoubleClick:s,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:_=>{_.stopPropagation(),c()},onDoubleClick:_=>_.stopPropagation(),children:t?d.jsx(it,{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($y,{file:e,face:"row"}),d.jsx(zE,{file:e,compact:!0})]}),d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a?d.jsx(ij,{name:e.name,onCommit:v}):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(Z$,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`shrink-0 ${WE}`,"data-list-chip":"",children:m}):null]}),d.jsx("span",{className:"inline-flex",children:d.jsx(DE,{file:e})}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:RE(e.bytes)}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:TE(e.addedAt)}),d.jsx(ej,{file:e,handlers:b})]})}const J$={control:"checkbox",disabled:!1},{bar:e7,name:t7,thumb:n7}=Br.compact,i7="we-no-drag flex cursor-auto flex-col gap-1.5 px-1.5 pt-1.5";function a7({kind:e,name:t,chrome:a,thumb:r,below:s,beneath:c}){const{selected:u,onToggleSelect:m,actions:p}=a;return d.jsxs("div",{role:"option","aria-selected":u,tabIndex:0,"data-gallery-card":"",className:aj(u,"compact"),onClick:m,onKeyDown:g=>{g.target===g.currentTarget&&(g.key===" "||g.key==="Enter")&&(g.preventDefault(),m())},children:[d.jsxs("div",{className:e7,children:[d.jsx(rj,{kind:e,name:t,selected:u,select:J$,onToggleSelect:m,scale:"compact"}),d.jsx("span",{className:t7,title:t,children:t}),p.length>0&&d.jsx(nj,{name:t,actions:p,shown:!0,scale:"compact"})]}),d.jsx("div",{className:n7,"data-thumb":!0,"data-media-tile":e,children:r}),s,c?d.jsx("div",{className:i7,...KE,onClick:g=>g.stopPropagation(),children:c}):null,d.jsx("div",{className:"h-1.5"})]})}function Py(e,t){const a=e!=null&&e.cut?e.derivativeUrl:t,[r,s]=x.useState(a);return a!==void 0&&a!==r&&s(a),a??r??t}const Vy="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)]",r7="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",o7=ie(Vy,r7),s7="max-h-[min(calc(100vh-120px),max(680px,72vh))] w-[clamp(560px,38vw,960px)] max-w-full max-md:w-full",sj="px-[clamp(18px,1.4vw,40px)]",Gy="px-[clamp(20px,1.75vw,36px)]",l7=ie("flex flex-shrink-0 items-center gap-[14px] pb-3 pt-[clamp(18px,1.6vw,30px)]",Gy),c7=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",Gy),Ky="mr-auto flex min-w-0 flex-col gap-0.5",Yy="m-0 text-[16px] font-semibold tracking-[-0.01em]",u7="text-[12px] text-ink-3",Qy=ie(vt,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),lj="px-[18px] py-[13px]",d7=ie("flex flex-shrink-0 items-center gap-[14px]",lj),f7=ie("flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft",lj),h7="ml-auto flex gap-2",cj=ie(vt,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),m7=ie(cj,"border-line bg-white text-ink hover:bg-[#faf9f6]"),p7=ie(cj,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),g7=ie(vt,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),y7={page:"max-w-[920px]",crop:"max-w-[680px]"};function b7({open:e=!0,variant:t,onClose:a,children:r}){return d.jsx(My,{open:e,onClose:a,className:ie(Vy,y7[t]),children:r})}const Xy={Shell:b7,head:d7,titles:Ky,title:Yy,subtitle:u7,close:Qy,CloseIcon:Rt.x,foot:f7,actions:h7,buttonGhost:m7,buttonPrimary:p7,buttonLink:g7,ZoomOutIcon:Rt.minus,ZoomInIcon:Rt.plus},lk=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function v7(e,t){let a=e;for(const r of t.holder.split("."))Array.isArray(a)?a=a.find(s=>lk(s)&&s.id===r):a=lk(a)?a[r]:void 0;return Array.isArray(a)?a.find(r=>Wi(r)===t.mediaId):Wi(a)===t.mediaId?a:void 0}function x7(e,t,a){if(e===void 0)return;const r=v7(e,a),s=r===void 0?void 0:t.get(a.mediaId),c=s===void 0||!Object.hasOwn(e.files,s.file)?void 0:e.files[s.file];if(s===void 0||c===void 0)return;const u=ws(r)?Ug(s,r):s;return zg(c,u)}const w7=16/10;function ck(e){return e.slice(e.indexOf(".")+1)}function uk(e){return e===null?null:{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function k7(e){return ay(e)?null:{x:e.nx,y:e.ny,width:e.nw,height:e.nh}}function dk(e,t){return e.state==="failed"?!0:!fs(e.crop,t)||jE(e)?!1:!Bd(t)||e.renditions.crop!==null}function uj({propertyId:e,recordAt:t,write:a,onFailed:r,onArrived:s}){const c=Tl(w=>w.byPlace),[u,m]=x.useState(null),p=w=>{const _=t(w),E=c[Kr(w)];return E!==void 0?_===void 0||!dk(_,E.crop):_!==void 0&&jE(_)};x.useEffect(()=>{const w=Object.values(c).filter(_=>{const E=_.propertyId===e?t(_.place):void 0;return E!==void 0&&dk(E,_.crop)});if(w.length!==0){for(const _ of w)Tl.getState().settle(_.place);s==null||s()}},[c,t,e,s]);const g=async(w,_,E)=>{if(m(null),a===void 0)return;const S=k7(E);if(!fs(S,_.crop)){Tl.getState().start(w,e,S);try{await a(w,uk(S))}catch(j){Tl.getState().settle(w),r==null||r(w),console.error("[media] home crop failed",{place:w,err:j})}}},v=u===null?void 0:t(u),b=(v==null?void 0:v.file_url)??null;return{offers:w=>{const _=t(w);return e!==""&&a!==void 0&&(_==null?void 0:_.kind)==="image"&&_.url===null&&_.file_url!==null},open:m,isOpen:v!==void 0&&b!==null,recropping:p,modal:u!==null&&v!==void 0&&b!==null?d.jsx(cy,{chrome:Xy,src:b,mode:"free",aspect:w7,seed:{rect:uk(v.crop)},onClose:()=>m(null),onApply:w=>void g(u,v,w.rect)}):null}}const _7=1500;function S7(e){const t=nf(e===""?null:e);return x.useMemo(()=>{const a=t===void 0?new Map:qd(t);return r=>x7(t,a,r)},[t])}function dj(e,t){const a=Dy(),r=Gd(),s=S7(e),{cropMedia:c}=a,u=x.useMemo(()=>c===void 0?void 0:async(b,w)=>{await c(e,b.mediaId,w,b.holder),await Wp(r,a,e)},[c,e,r,a]),m=x.useMemo(()=>()=>void Wp(r,a,e),[r,a,e]),p=uj({propertyId:e,recordAt:s,write:u,onFailed:t,onArrived:m}),g=Tl(b=>b.byPlace),v=Object.values(g).some(b=>b.propertyId===e&&p.recropping(b.place));return gc({...a.mediaFactsQuery(e),enabled:e!==""&&v,refetchInterval:v?_7:!1}),p}function E7(e){const{width:t,height:a}=e!==null&&typeof e=="object"?e:{};return{width:typeof t=="number"?t:null,height:typeof a=="number"?a:null}}function ms(e){var t;return((t=e.renditions.cutout)==null?void 0:t.url)??jd(e)??""}function Zy(e,t,a,r,s){const c=ms(e);if(e.id===t.asset_id)return{...t,url:c};const u=a===void 0?void 0:q3(a,s,e.id);return u===void 0||a===void 0?{asset_id:e.id,url:c,alt:t.alt,picked:e.id}:{...F3(u,E7(a.files[u.file]),r),url:c,alt:t.alt}}const fj={New:Xd,Choose:WS,Upload:Zd};function j7(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 hj(e){return/^[A-Z][A-Z]/.test(e)?e:e.charAt(0).toLowerCase()+e.slice(1)}function rr(e){const t=hj((e??"").trim());if(t==="")return{singular:"item",plural:"items"};const a=t.search(/\S+$/);return{singular:t.slice(0,a)+j7(t.slice(a)),plural:t}}function Wy(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Zl(e,t){return`${e} ${t}`}function Jy(e,t,a){const r=rr(t),s=a&&e==="New"?r.singular:r.plural;return{verb:e,icon:fj[e],label:Zl(e,s),empty:`No ${r.plural} yet`}}function O7(e,t,a,r){const s=a.flatMap(u=>{const m=mj(u,r);return m===null?[]:[rr(m)[t?"plural":"singular"]]}),c=Jy("Choose",e,t);return s.length===0?c:{...c,label:Zl("Choose",[...new Set(s)].join(" or "))}}const A7={property:"Property",library:"Library"};function mj(e,t){if(!/^(?:property|library)\./.test(e))return null;const a=gd(e);if(a===null)return null;const{home:r}=Gl(e);return r===t?a:`${A7[r]} ${a.charAt(0).toLowerCase()}${a.slice(1)}`}function rf(e,t={}){return e.locked===!0||!N7(e)?null:eb(e,t)}function N7(e){const t=e.type;return t==="list"||t==="row"||xs(e.type)}function eb(e,t={}){const a=e.type==="list",r=C7(e,t);return{add:Jy(!a&&xs(e.type)?"Upload":"New",e.label,a),choose:r===null?null:O7(e.label,a,r.lists,r.home)}}function M7(e){const[t]=e,a=e.length===1&&t!==void 0?gd(t)??void 0:void 0;return Jy("New",a,!0)}function pj(e){return e.choose??e.add}function C7(e,t){const a=T7(e,t.table);if(a!==null&&Gr(a).length>0){const c=Gr(a)[1];return c===void 0?null:{lists:[c],home:Gl(a).home}}const r=R7(e,t),s=t.membership;if((s==null?void 0:s.kind)==="pick-row"||(s==null?void 0:s.kind)==="pick-media"){const c=s.kind==="pick-row"?s.tables.map(u=>Pr[u.table]):Ar(s.filter.from);return{lists:r!==null&&r.length>0?r:c,home:"property"}}return r===null?null:{lists:r,home:"property"}}function R7(e,t){if(e.type==="list")return e.element===void 0?null:L7(e.element);if(e.type==="row")return Ar(e.from);if(!xs(e.type))return null;const a=ds(e,t.table);return(a==null?void 0:a.kind)==="picked"?Ar(a.filter.from):null}function Ar(e){return Yg({from:e}).flatMap(t=>{if(/^(?:property|library)\./.test(t))return[t];const a=qt(t);return a===null?[]:[Pr[a.table]]})}function T7(e,t){const a=e.source;if((a==null?void 0:a.kind)==="home"&&typeof a.key=="string"){if(/^(?:property|library)\./.test(a.key))return a.key;const s=qt(a.key);return s===null?null:Pr[s.table]}const r=(a==null?void 0:a.kind)==="row"?a.field:void 0;return typeof r!="string"||r===""||t==null?null:`${Pr[t]}.${D7}.${r}`}const D7="_";function L7(e){const t=e.fields??{};if(Z_(e)!==void 0)return e.from!==void 0?Ar(e.from):Object.values(t).flatMap(s=>Ar(s.from));if(e.type!=="object")return null;const a=H_(e);if((a==null?void 0:a.type)==="row"&&a.from!==void 0)return Ar(a.from);if(!Zg(t))return null;const r=Object.values(t).filter(s=>xs(s.type)&&s.locked!==!0&&s.from!==void 0);return r.length===0?null:r.flatMap(s=>Ar(s.from))}const tb={image:"image/*",video:"video/*",tour:null,document:oz};function nb(e){const t=e.flatMap(a=>tb[a]??[]);return t.length===0?null:t.join(",")}function kc(e){return[...nb(e)!==null?["file"]:[],...Rg(e).length>0?["link"]:[]]}const z7=ve("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"}]]),$7=ve("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),U7=ve("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"}]]),I7=ve("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"}]]),B7={home:WL,building:nL,apartments:aL,trendUp:s8,tag:a8,key:n6,template:r6,palette:D6,filePen:BL,library:s6,plug:B6,helpCircle:bL,lock:h6,creditCard:EL,settings:W6,power:F6,user:b8,plus:Xd,globe:QL,image:Qd,fileText:Yd,users:x8,eye:nE,eyeOff:$L,pulse:BD,search:Oy,chart:uL,layout:aE,chevDown:vy,chevRight:xy,chevSelector:gL,pencil:Sy,dots:DL,grip:ky,external:tE,copy:_L,trash:Os,archive:qD,sparkle:n8,arrowUp:ZD,arrowDown:PD,arrowLeft:GD,arrowRight:YD,undo:h8,redo:G6,logout:p6,check:Kd,x:Ny,clock:xL,calendar:lL,mapPin:oE,userPlus:g8,mail:y6,phone:$6,share:e8,upload:Zd,bookOpen:JD,newspaper:R6,presentation:Ey,instagram:z7,facebook:$7,linkedin:U7,xLogo:I7};function ci({name:e,size:t=18,stroke:a=2,fill:r,color:s,className:c,style:u}){const m=B7[e];return d.jsx(m,{size:t,strokeWidth:a,fill:r??"none",color:s,className:c,style:{flexShrink:0,width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`,color:s??"currentColor",...u},"aria-hidden":"true"})}function H7(e,t=Date.now()){const a=Math.floor((t-e)/1e3);return a<5?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:`${Math.floor(a/3600)}h ago`}const Wm="inline-flex flex-shrink-0 items-center gap-1.5 whitespace-nowrap p-1 text-[length:calc(12.5*var(--content))] font-medium";function q7({status:e}){const[,t]=x.useReducer(a=>a+1,0);return x.useEffect(()=>{const a=setInterval(t,15e3);return()=>clearInterval(a)},[]),e.state==="saving"?d.jsxs("div",{className:ie(Wm,"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(Wm,"text-ink-2"),children:[d.jsx(ci,{name:"x",size:13,stroke:2.4,className:"text-danger"}),d.jsx("span",{children:"Not saved"})]}):d.jsxs("div",{className:ie(Wm,"text-ink-3"),children:[d.jsx(ci,{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:H7(e.savedAt)})]})]})}const F7=x.createContext(null);function gj(){const e=x.useContext(F7);return e===null?null:d.jsx(q7,{status:e})}function P7({open:e=!0,onClose:t,title:a,notice:r,children:s}){return d.jsxs(My,{open:e,onClose:t,ariaLabel:a,className:o7,children:[d.jsxs("div",{className:l7,children:[d.jsx("div",{className:Ky,children:d.jsx("h2",{className:ie(Yy,"truncate"),children:a})}),d.jsx(gj,{}),d.jsx("button",{type:"button",className:Qy,onClick:t,"aria-label":"Close",children:d.jsx(Rt.x,{})})]}),r,d.jsx("div",{className:c7,children:s})]})}function V7(e){const[t]=e.ids,{removeFrom:a}=e,r=a===void 0&&e.ids.length===1&&t!==void 0&&!e.inFlightIds.has(t)?t:null,c=gc({queryKey:["media-holders",e.scope,r],queryFn:()=>{if(r===null)throw new Error("holder read disabled without a single listed id");return e.holders(r)},enabled:r!==null}).data??[],u=vE(),m=e.ids.length;return tr.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:[a===void 0?"Delete":"Remove"," ",m===1?"this object":`${m} objects`,a===void 0?"":` from ${a}`,"?"]}),a!==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:a===void 0?"Delete":"Remove"})]})]})}),document.body)}const Xu="grid h-8 w-8 place-items-center rounded-full text-white/85 hover:bg-white/[0.12] hover:text-white",fk="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 G7({file:e,index:t,total:a,onClose:r,onPrev:s,onNext:c,onDownload:u,onDelete:m,onCrop:p}){const g=e.thumbnailUrl!==null,v=vE();return tr.createPortal(d.jsxs("div",{className:"fixed inset-0 flex flex-col bg-black/80",style:{zIndex:v},role:"dialog","aria-modal":"true","aria-label":`Preview: ${e.name}`,onClick:r,children:[d.jsxs("div",{className:"flex shrink-0 items-center gap-2.5 px-4.5 py-3.25",onClick:b=>b.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(DE,{file:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[p?d.jsx("button",{type:"button",className:Xu,title:"Crop","aria-label":`Crop ${e.name}`,onClick:b=>{b.stopPropagation(),p()},children:d.jsx(it,{name:"crop",size:15})}):null,u&&!$l(e)?d.jsx("button",{type:"button",className:Xu,title:"Download",onClick:b=>{b.stopPropagation(),u()},children:d.jsx(it,{name:"down",size:15})}):null,m?d.jsx("button",{type:"button",className:Xu,title:"Delete",onClick:b=>{b.stopPropagation(),m()},children:d.jsx(it,{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:Xu,title:"Close","aria-label":"Close preview",onClick:r,children:d.jsx(it,{name:"x",size:15})})]})]}),d.jsxs("div",{className:"relative grid min-h-0 flex-1 place-items-center px-19",children:[a>1?d.jsx("button",{type:"button",className:`${fk} left-5`,"aria-label":"Previous",onClick:b=>{b.stopPropagation(),s()},children:d.jsx(it,{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:b=>b.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(it,{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:b=>b.stopPropagation(),children:d.jsx($y,{file:e,face:"lightbox"})}),a>1?d.jsx("button",{type:"button",className:`${fk} right-5`,"aria-label":"Next",onClick:b=>{b.stopPropagation(),c()},children:d.jsx(it,{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 ",a]})]}),document.body)}function K7(e){return[{id:"all",label:"All"},...Od.filter(t=>e.includes(t)).map(t=>({id:t,label:xc[t].plural}))]}const hk=[{id:"custom",label:"Custom"},{id:"date",label:"Date added"},{id:"name",label:"Name"},{id:"kind",label:"Kind"},{id:"size",label:"Size"}],Y7="ml-auto inline-flex text-ink-3";function Q7({filter:e,setFilter:t,counts:a,kinds:r}){const s=K7(r),[c,u]=x.useState(!1),m=x.useRef(null),p=x.useCallback(()=>u(!1),[]);wc(m,c,p);const g=e!=="all",v=s.find(b=>b.id===e)??{label:"All"};return d.jsxs("div",{className:"relative",ref:m,children:[d.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>u(b=>!b),className:`${Ry} ${g?"border-accent bg-accent-soft text-accent-ink":Ty}`,children:[e==="all"?null:d.jsx(Xr,{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:v.label}),d.jsx("span",{className:`inline-flex ${g?"text-accent-ink":"text-ink-3"}`,children:d.jsx(it,{name:"chevd",size:13})})]}),c?d.jsx("div",{className:`${ef} right-0 top-[calc(100%+6*var(--content))] min-w-[calc(210*var(--frame))] p-1.5`,role:"menu",children:s.map(b=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===b.id,className:wE,onClick:()=>{t(b.id),u(!1)},children:[b.id==="all"?d.jsx("span",{className:"grid h-5 w-5 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(it,{name:"grid",size:13})}):d.jsx(Xr,{kind:b.id,decorative:!0}),d.jsx("span",{children:b.label}),d.jsx("span",{className:"ml-auto text-[length:calc(11.5*var(--content))] font-medium text-ink-4",children:a[b.id]}),d.jsx("span",{className:`inline-flex w-3 text-ink-3 ${e===b.id?"":"invisible"}`,children:d.jsx(it,{name:"check",size:12,stroke:2.4})})]},b.id))}):null]})}function X7({sort:e,setSort:t}){var m;const[a,r]=x.useState(!1),s=x.useRef(null),c=x.useCallback(()=>r(!1),[]);wc(s,a,c);const u=((m=hk.find(p=>p.id===e))==null?void 0:m.label)??"Custom";return d.jsxs("span",{className:"relative inline-flex",ref:s,children:[d.jsxs("button",{type:"button",className:`${Ry} ${Ty}`,"aria-expanded":a,onClick:()=>r(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(it,{name:"chevd",size:13})})]}),a?d.jsx("div",{className:`${ef} right-0 top-[calc(100%+6*var(--content))] w-[calc(170*var(--frame))] p-1.5`,role:"menu",children:hk.map(p=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===p.id,className:wE,onClick:()=>{t(p.id),r(!1)},children:[p.label,e===p.id?d.jsx("span",{className:Y7,children:d.jsx(it,{name:"check",size:12,stroke:2.4})}):null]},p.id))}):null]})}function Z7({view:e,setView:t}){const a=(r,s)=>{const c=e===r;return d.jsxs("button",{type:"button","aria-label":s,"aria-pressed":c,title:s,onClick:()=>t(r),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"} ${r==="list"?"border-l border-line":""}`,children:[c?d.jsx(it,{name:"check",size:13,stroke:2.4}):null,d.jsx(it,{name:r,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:[a("list","List view"),a("grid","Grid view")]})}function W7({lead:e,selectionPill:t,filter:a,setFilter:r,counts:s,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:v=>v.stopPropagation(),children:[e,t,d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(Q7,{filter:a,setFilter:r,counts:s,kinds:c}),d.jsx(X7,{sort:u,setSort:m}),d.jsx(Z7,{view:p,setView:g})]})]})}function J7({count:e,onClear:t,onDownload:a,onDelete:r}){const s="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(it,{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:`${s} text-accent`,onClick:a,children:[d.jsx(it,{name:"down",size:13}),"Download"]}),r?d.jsxs("button",{type:"button",className:`${s} text-danger`,onClick:r,children:[d.jsx(it,{name:"trash",size:13}),"Delete"]}):null]})}function ib(e,t,a=new Set){const r=e.includes(t);return{checked:r,disabled:!r&&a.has(t)}}function yj(e,t,a,r){const{checked:s,disabled:c}=ib(e,t,r);return a==="radio"?s||c?e:[t]:s?e.filter(u=>u!==t):c?e:[t,...e]}const mk="hp-uploads-view",eU=new Set;function tU({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 nU=ie(XE,"flex flex-col gap-3"),iU="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",aU=ie(XE,"flex flex-col rounded-2xl border border-line bg-canvas items-center justify-center text-center text-body text-ink-3"),pk="grid grid-cols-[repeat(auto-fill,minmax(calc(200*var(--frame)),1fr))] gap-4 p-4",rU=8;function oU({filter:e,selection:t,host:a,beneathOf:r,tiers:s}){const{capabilities:c,preparing:u}=a,{kinds:m,from:p}=ql(e),g=x.useMemo(()=>{const ae=new Map((s??[]).flatMap((_e,Pe)=>_e.map(At=>[At,Pe])));return _e=>ae.get(_e)??0},[s]),v=(s==null?void 0:s.flat())??p,b=c.upload?nb(m):null,w=c.upload&&Rg(m).length>0,_=x.useRef(null),E=x.useRef(new Set),S=ae=>{t.mode!=="all"&&(_.current??(_.current=Date.now())),a.addFiles(ae)},j=ae=>{t.mode!=="all"&&(_.current??(_.current=Date.now())),a.addLink(ae)},C=M7(p),A=b!==null||w?{accept:b,onFiles:S,...w?{onLink:j}:{},disabled:u}:null,[O,T]=x.useState(()=>new Set),[R,B]=x.useState(()=>t.mode==="multi"?t.selectedIds:[]),[D,L]=x.useState("all"),[P,le]=x.useState("custom"),[ee,de]=x.useState(null),[K,Q]=x.useState(null),[se,N]=x.useState(()=>{if(typeof window>"u")return"grid";try{return window.localStorage.getItem(mk)==="list"?"list":"grid"}catch{return"grid"}}),[V,te]=x.useState(null),[me,Y]=x.useState(null),[M,H]=x.useState(!1),[I,F]=x.useState(null),[W,pe]=x.useState(null),oe=x.useRef(0),ke=x.useRef(null);x.useEffect(()=>{try{window.localStorage.setItem(mk,se)}catch{}},[se]),x.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const z=x.useCallback(ae=>{F(ae),ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>F(null),2400)},[]),ce=x.useMemo(()=>new Map(a.items.flatMap(ae=>On(ae)?[]:[[ae.asset.id,ae.asset]])),[a.items]),ye=x.useMemo(()=>new Map(a.items.flatMap(ae=>On(ae)?[]:[[Kr({holder:ck(ae.list),mediaId:ae.asset.id}),ae.asset]])),[a.items]),Se=x.useCallback(ae=>ye.get(Kr(ae)),[ye]),Le=uj({propertyId:t.mode==="all"?a.scope:"",recordAt:Se,write:a.crop,onFailed:()=>z("Couldn't crop")}),Ie=ae=>({holder:ck(ae.list),mediaId:ae.id}),ge=ae=>t.mode==="all"&&c.manage&&ae.kind==="image"&&!ae.inFlight&&Le.offers(Ie(ae))?{onCrop:()=>Le.open(Ie(ae))}:{},Re=a.items.filter(ae=>{const _e=On(ae)?ae.kind:ae.asset.kind;return v.includes(ae.list)&&(_e===null||m.includes(_e))}).map(ae=>Cz(ae,g)).map(ae=>ae.state==="ready"&&Le.recropping(Ie(ae))?{...ae,state:"processing"}:ae),ht=x.useMemo(()=>new Set(a.items.filter(On).map(ME)),[a.items]),$e=Dz(Re),Lt=ee===null?Re:[...Re].sort((ae,_e)=>ee.indexOf(ae.id)-ee.indexOf(_e.id)),lt=Tz(Lt,D,P),[Fn]=p,An=a.reorder,un=t.mode==="all"&&c.manage&&An!==void 0&&P==="custom"&&p.length===1&&V===null,yt=un?lt.filter(ae=>!ae.inFlight):[],ia=ae=>{Q(null);const _e=ae.map(nt=>nt.id),Pe=Lt.filter(nt=>!nt.inFlight).map(nt=>nt.id),At=s4(Pe,_e);An===void 0||Fn===void 0||At.every((nt,Pn)=>nt===Pe[Pn])||(de(At),An(Fn,_e).then(()=>de(null),()=>{de(null),z("Couldn't reorder")}))},{containerRef:di,getItemProps:ii}=qE({items:yt,getKey:ae=>ae.id,onReorder:Q,onDrop:ia,axis:se==="list"?"y":"xy",threshold:5}),we=K===null?lt:[...lt.filter(ae=>ae.inFlight),...K],Te=x.useCallback(()=>T(new Set),[]),Ce=x.useMemo(()=>t.mode==="all"?eU:new Set([...t.disabledIds??[],...ht]),[t,ht]),Xe=t.mode==="single"?t.selectedId===null?[]:[t.selectedId]:R,at=ae=>{if(t.mode==="all")return;if(t.mode==="single"){const Pe=Ce.has(ae)?void 0:ce.get(ae);Pe&&t.onPick(Pe);return}const _e=yj(Xe,ae,"checkbox",Ce);_e!==Xe&&(B(_e),t.onChange(_e.flatMap(Pe=>ce.get(Pe)??[])))};x.useEffect(()=>{const ae=_.current;if(ae===null||t.mode==="all")return;for(const nt of a.items)On(nt)&&nt.addedAt>=ae&&E.current.add(nt.id);const _e=[...E.current].filter(nt=>ce.has(nt)&&!Ce.has(nt)),[Pe]=_e;if(Pe===void 0)return;for(const nt of _e)E.current.delete(nt);if(t.mode==="single"){at(Pe);return}const At=[..._e.filter(nt=>!Xe.includes(nt)),...Xe];At.length!==Xe.length&&(B(At),t.onChange(At.flatMap(nt=>ce.get(nt)??[])))},[a.items]);const Qt=ae=>{if(t.mode==="all")return{selected:O.has(ae),control:"checkbox",disabled:!1};const{checked:_e,disabled:Pe}=ib(Xe,ae,Ce);return{selected:_e,control:t.mode==="single"?"radio":"checkbox",disabled:Pe}},ut=ae=>{if(t.mode!=="all"){at(ae);return}T(_e=>{const Pe=new Set(_e);return Pe.has(ae)?Pe.delete(ae):Pe.add(ae),Pe})},ne=lt.findIndex(ae=>ae.id===me),be=ne>=0?lt[ne]:void 0,Oe=ae=>{var Pe;if(lt.length===0)return;const _e=(Math.max(ne,0)+ae+lt.length)%lt.length;Y(((Pe=lt[_e])==null?void 0:Pe.id)??null)},ze=ae=>{if(!me||!ae.includes(me))return;const _e=lt.findIndex(nt=>nt.id===me),At=[...lt.slice(_e+1),...lt.slice(0,Math.max(_e,0))].find(nt=>!ae.includes(nt.id));Y(At?At.id:null)};x.useEffect(()=>{const ae=_e=>{if(Le.isOpen)return;const Pe=_e.target instanceof HTMLElement?_e.target.tagName:"";if(!(Pe==="INPUT"||Pe==="TEXTAREA")){if(W){_e.key==="Escape"&&pe(null),(_e.key==="Escape"||_e.key==="Enter")&&_e.preventDefault();return}if(_e.key==="Escape"){if(me)Y(null);else if(O.size>0)Te();else return;_e.preventDefault()}else me&&_e.key==="ArrowRight"?Oe(1):me&&_e.key==="ArrowLeft"?Oe(-1):me&&_e.key==="Enter"&&_e.preventDefault()}};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)});const Ge=ae=>{ze(ae),T(_e=>{const Pe=new Set(_e);return ae.forEach(At=>Pe.delete(At)),Pe}),a.remove(ae).then(_e=>{_e>0?z(`Couldn't delete ${_e}`):z(`Deleted ${ae.length} object${ae.length===1?"":"s"}`)})},He=()=>{W&&(pe(null),Ge(W))},kt=ae=>{$l(ae)||ae.inFlight||(z("Preparing download…"),a.download(ae.id).catch(()=>z("Couldn't download")))},jt=()=>{const ae=Re.filter(_e=>O.has(_e.id)&&!$l(_e)&&!_e.inFlight);ae.length!==0&&(z("Preparing download…"),ae.forEach(_e=>void a.download(_e.id).catch(()=>z("Couldn't download"))))},_t=(ae,_e)=>{te(null),!(_e===null||!_e||_e===ae.name)&&a.rename(ae.id,_e).catch(()=>z("Couldn't rename"))},Ft=b!==null&&!u,Xt=ae=>{ae.preventDefault(),!(!Ft||!Array.from(ae.dataTransfer.types).includes("Files"))&&(oe.current+=1,H(!0))},Zt=ae=>{ae.preventDefault(),oe.current-=1,oe.current<=0&&(oe.current=0,H(!1))},Nn=ae=>{ae.preventDefault(),oe.current=0,H(!1),Ft&&ae.dataTransfer.files.length>0&&S(Array.from(ae.dataTransfer.files))},Oi=ae=>t.mode==="all"&&O.has(ae)&&O.size>1?lt.filter(_e=>O.has(_e.id)).map(_e=>_e.id):null,ai=ae=>{const{selected:_e,control:Pe,disabled:At}=Qt(ae.id),nt=Oi(ae.id),Pn=nt==null?void 0:nt.filter(Ot=>!ht.has(Ot));return{file:ae,selected:_e,select:{control:Pe,disabled:At},listChip:p.length<2||ae.upstream?null:gd(ae.list)??ae.list,renaming:V===ae.id,onClick:Ot=>{Ot.stopPropagation(),ut(ae.id)},onDoubleClick:()=>t.mode==="single"?at(ae.id):Y(ae.id),onToggleSelect:()=>ut(ae.id),...ae.state==="failed"&&a.canRetry(ae.id)?{onRetry:()=>a.retry(ae.id)}:{},...ae.linkUnreachable?{onRecheck:()=>void a.recheck(ae.id)}:{},onRenameCommit:Ot=>_t(ae,Ot),handlers:{onPreview:()=>Y(ae.id),onDownload:()=>kt(ae),...ge(ae),...c.manage?{onRenameStart:()=>te(ae.id),onDelete:()=>pe(nt??[ae.id]),...nt!==null?{deleteLabel:`Delete ${nt.length} objects`}:{}}:{}},...un&&!ae.inFlight?{drag:ii(ae.id,Pn)}:{}}},fi=ae=>{const _e=new Set(Re.filter(At=>ae.includes(At.id)).map(At=>At.list)),[Pe]=_e;return _e.size!==1||Pe===void 0||Gr(Pe).at(-1)===Pe?{}:{removeFrom:gd(Pe)??Pe}},io=[...O],Ac=Re.length===0;return d.jsxs("div",{className:"flex flex-col",onClick:Te,onDragEnter:Xt,onDragOver:ae=>ae.preventDefault(),onDragLeave:Zt,onDrop:Nn,children:[a.loading?d.jsx("div",{className:aU,children:"Loading…"}):d.jsxs("div",{className:nU,children:[d.jsx(W7,{lead:d.jsx(bc,{size:"large",add:C,onAdd:null,...A!==null?{newChip:d.jsx(Wz,{add:A,verb:C})}:{}}),selectionPill:O.size>0?d.jsx(J7,{count:O.size,onClear:Te,onDownload:jt,...c.manage?{onDelete:()=>pe(io)}:{}}):null,filter:D,setFilter:L,counts:$e,kinds:m,sort:P,setSort:le,view:se,setView:N}),d.jsx("div",{className:iU,"data-dragging":M||void 0,children:Ac?d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(yc,{children:d.jsx("div",{className:pk,children:Array.from({length:rU},(ae,_e)=>d.jsx(Q$,{},_e))})}),d.jsx(Qz,{add:A,kinds:m,dragging:M})]}):lt.length===0?d.jsx(tU,{onReset:()=>L("all")}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:se==="grid"?d.jsx("div",{ref:di,className:ie("relative",pk),role:"listbox","aria-multiselectable":t.mode!=="single","aria-label":"Uploaded objects",children:we.map(ae=>d.jsx(Y$,{...ai(ae),beneath:r==null?void 0:r(ae)},ae.id))}):d.jsxs("div",{ref:di,className:"relative pt-1",role:"table","aria-label":"Uploaded objects",children:[d.jsx(X$,{}),we.map(ae=>d.jsx(W$,{...ai(ae)},ae.id))]})})})]}),be?d.jsx(G7,{file:be,index:ne,total:lt.length,onClose:()=>Y(null),onPrev:()=>Oe(-1),onNext:()=>Oe(1),...!$l(be)&&!be.inFlight?{onDownload:()=>kt(be)}:{},...c.manage?{onDelete:()=>pe([be.id])}:{},...ge(be)}):null,Le.modal,W&&!u?d.jsx(V7,{scope:a.scope,ids:W,inFlightIds:ht,holders:a.holders,...fi(W),onCancel:()=>pe(null),onConfirm:He}):null,I?d.jsx("div",{role:"status",style:{zIndex:B8},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 ab(){return Yt()}function sU(e){const t=Gl(e[0]).home;return TR(e).flatMap(a=>{const[r,...s]=a;return r===void 0?[]:[{lists:[r,...s],label:a.map(c=>mj(c,t)??Gl(c).key).join(" + ")}]}).reverse()}const eg=new Map,ad=new Map,tg=new Set,ng=[],rd=new Map,gk=new Set,ps=new Map;function lU(e,t){var a;(a=ps.get(e))==null||a.onStored(t),ps.delete(e)}function Jm(e,t){var a;(a=ps.get(e))==null||a.onFailed(t),ps.delete(e)}function bj(){for(const e of tg)e()}function vj(e){return tg.add(e),()=>{tg.delete(e)}}function rb(e,t){t.length===0?eg.delete(e):eg.set(e,t),bj()}function Hr(e){return eg.get(e)??ng}function yk(e,t){t.length!==0&&rb(e,[...t,...Hr(e)])}function ig(e,t,a){const r=Hr(e);r.some(s=>s.inFlight.id===t)&&rb(e,r.map(s=>s.inFlight.id===t?a(s):s))}function bk(e,t){var c;const a=new Set(t),r=Hr(e),s=r.filter(u=>a.has(u.inFlight.id));if(s.length!==0){for(const u of s)(c=u.inFlight.preview)!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(u.inFlight.preview);rb(e,r.filter(u=>!a.has(u.inFlight.id)))}}function vk(e,t,a,r){const s=ad.get(e)??rd,c=s.get(t)??[];if(c.includes(a)===r)return;const u=new Map(s),m=r?[...c,a]:c.filter(p=>p!==a);m.length===0?u.delete(t):u.set(t,m),u.size===0?ad.delete(e):ad.set(e,u),bj()}function cU(e){return x.useSyncExternalStore(vj,()=>e===null?ng:Hr(e),()=>ng)}function uU(e){return x.useSyncExternalStore(vj,()=>e===null?rd:ad.get(e)??rd,()=>rd)}function dU(e,t,a){const r=e.get(t);if(r===void 0)return!1;const s=Gr(a).at(-1)??a;return r.includes(a)||r.includes(s)}function fU(e,t,a){return e.flatMap(({inFlight:r})=>{if(a.has(r.id))return[];const s=Gr(r.list),c=t.find(u=>s.includes(u));return c===void 0?[]:[{...r,list:c}]})}const xj="local-",wj=()=>`${xj}${Math.random().toString(36).slice(2,10)}`,hU=e=>e.startsWith(xj);function xk(e,t){return e instanceof Error&&"problem"in e&&e.message!==""?e.message:t}function mU(e,t){const a=pz(t);return{inFlight:{id:wj(),list:e,kind:h_(t.type),name:t.name,bytes:t.size,mime:t.type,url:null,addedAt:Date.now(),preview:a.ok&&t.type.startsWith("image/")?URL.createObjectURL(t):null,send:a.ok?{state:"uploading",progress:0}:{state:"failed",error:a.message}},baggage:{file:t}}}function Nl(e,t,a){ig(e,t,r=>({...r,inFlight:{...r.inFlight,send:a}}))}function pU(e,t,a){const{postListUploadWithProgress:r,postListLink:s,withdrawListItem:c,holdListItem:u}=e,m=A=>Wp(t,e,A),p=async(A,O,T)=>{vk(A,T,O,!0);try{await c(A,O,T)}catch(R){throw vk(A,T,O,!1),m(A),R}m(A)},g=async(A,O,T,R)=>{if(gk.delete(O)){Jm(O,"Removed while sending"),p(A,R,T).catch(()=>{});return}ig(A,O,B=>({...B,inFlight:{...B.inFlight,id:T,send:{state:"saving"}}})),await m(A),bk(A,[T]),lU(O,T)},v=async(A,O,T,R,B)=>{let D;try{D=(await r(A,T,R,P=>Nl(A,O,{state:"uploading",progress:P}),{attempt:B,onAttempt:P=>ig(A,O,le=>({...le,baggage:{...le.baggage,attempt:P??void 0}}))})).id}catch(L){console.error("media.upload.failed",{itemId:O,propertyId:A,into:T,name:R.name,size:R.size,mime:R.type,error:L});const P=xk(L,"Upload failed");Nl(A,O,{state:"failed",error:P}),Jm(O,P);return}await g(A,O,D,T)},b=async(A,O,T,R,B)=>{let D;try{D=(await s(A,T,R,B)).id}catch(L){console.error("media.link.create_failed",{itemId:O,propertyId:A,into:T,url:R,error:L});const P=xk(L,"Couldn’t add link");Nl(A,O,{state:"failed",error:P}),Jm(O,P);return}await g(A,O,D,T)},w=(A,O,T)=>{if(a===null)return;const R=A.filter(Boolean).map(D=>mU(O,D));yk(a,R);for(const D of R){if(T===void 0)continue;const{send:L}=D.inFlight;L.state==="failed"?T.onFailed(L.error):ps.set(D.inFlight.id,T)}const B=R.filter(D=>D.inFlight.send.state==="uploading");ez(B,mz,async D=>{D.baggage.file&&await v(a,D.inFlight.id,O,D.baggage.file)})},_=(A,O,T)=>{if(a===null)return;const R=/^https?:\/\//i.test(A)?A:`https://${A}`,B=crypto.randomUUID(),D={inFlight:{id:wj(),list:O,kind:CE(R),name:lz(R),bytes:null,mime:null,url:R,addedAt:Date.now(),preview:null,send:{state:"saving"}},baggage:{link:{url:R,idempotencyKey:B}}};yk(a,[D]),T!==void 0&&ps.set(D.inFlight.id,T),b(a,D.inFlight.id,O,R,B)},E=A=>{if(a===null)return!1;const O=Hr(a).find(T=>T.inFlight.id===A);return O!==void 0&&O.inFlight.send.state==="failed"&&(O.baggage.file!==void 0||O.baggage.link!==void 0)},S=A=>{if(a===null)return;const O=Hr(a).find(R=>R.inFlight.id===A);if(O===void 0)return;const T=O.inFlight.list;if(O.baggage.link){const{url:R,idempotencyKey:B}=O.baggage.link;Nl(a,A,{state:"saving"}),b(a,A,T,R,B);return}if(O.baggage.file){const R=gz({attempt:O.baggage.attempt});Nl(a,A,{state:"uploading",progress:0}),v(a,A,T,O.baggage.file,R.kind==="resume"?R.attempt:void 0)}},j=async(A,O)=>{if(a===null)return 0;const T=new Set(A);for(const D of Hr(a))T.has(D.inFlight.id)&&D.inFlight.send.state==="uploading"&&gk.add(D.inFlight.id);bk(a,A);const R=A.filter(D=>!hU(D));return(await Promise.allSettled(R.map(D=>p(a,O,D)))).filter(D=>D.status==="rejected").length},C=u===void 0||a===null?void 0:async(A,O)=>{await u(a,O,A),await m(a)};return{addFiles:w,addLink:_,canRetry:E,retry:S,remove:j,...C!==void 0?{hold:C}:{}}}function gU(e){const t=Dy(),a=Gd();return x.useMemo(()=>pU(t,a,e),[t,a,e])}function yU(e,t,a,r){const s=ql(t),c=e===void 0?[]:i4(e,s).filter(({id:p,list:g})=>!dU(r,p,g)),u=c.map(({value:p,file:g,list:v})=>({asset:zg(g,p),list:v}));return[...fU(a,s.from,new Set(c.map(({id:p})=>p))),...u]}function bU(e,t,a,r){const s=cU(e),c=uU(e),u=gU(e),m=x.useMemo(()=>yU(a,t,s,c),[a,t,s,c]),p=r??__(t),g=x.useCallback(E=>u.addFiles(E,p),[u,p]),v=x.useCallback(E=>u.addLink(E,p),[u,p]),b=x.useCallback(async E=>{const S=new Map;for(const C of m){const A=ME(C);E.includes(A)&&S.set(C.list,[...S.get(C.list)??[],A])}return(await Promise.all([...S].map(([C,A])=>u.remove(A,C)))).reduce((C,A)=>C+A,0)},[m,u]),{hold:w}=u,_=x.useMemo(()=>w===void 0||r===void 0?void 0:E=>w(E,r),[w,r]);return{items:m,sent:s,deleting:c,addFiles:g,addLink:v,remove:b,canRetry:u.canRetry,retry:u.retry,..._!==void 0?{land:_}:{}}}function _c(e){const{MediaPicker:t}=ab();return d.jsx(t,{...e})}function vU(e){return new Set(e.flatMap(t=>{if(On(t))return[];const{asset:a}=t;return a.state!=="ready"||a.kind==="tour"&&!OE(a)?[a.id]:[]}))}const wk=ie("m-0 py-1 text-caption text-ink-3",Gy);function xU({useHost:e,filter:t,propertyId:a,...r}){var K;const{onClose:s}=r,c=x.useMemo(()=>sU(ql(t).from),[t]),u=x.useMemo(()=>c.map(({lists:Q})=>Q),[c]),m=x.useMemo(()=>({kinds:t.kinds,from:[...ql(t).from,...u.slice(1).flat()]}),[t,u]),p=e(a,m,__(t)),{land:g}=p,v=x.useMemo(()=>new Map(u.flatMap((Q,se)=>Q.map(N=>[N,se]))),[u]),[b,w]=x.useState(()=>new Set),_=x.useRef(null),E=x.useMemo(()=>{if(p.loading)return p.items;const Q=new Map;for(const te of p.items){if(On(te)||b.has(te.asset.id))continue;const me=Q.get(te.asset.id);(me===void 0||(v.get(te.list)??0)<(v.get(me.list)??0))&&Q.set(te.asset.id,te)}const se=[...Q.values()],N=_.current??(_.current=new Map(se.map((te,me)=>[te.asset.id,{tier:v.get(te.list)??0,rank:me}])));for(const te of se)N.has(te.asset.id)||N.set(te.asset.id,{tier:v.get(te.list)??0,rank:-N.size});const V=te=>N.get(te.asset.id)??{tier:0,rank:0};return[...p.items.filter(On),...se.map(te=>({...te,tier:V(te).tier})).sort((te,me)=>V(te).rank-V(me).rank)]},[p.items,p.loading,v,b]),{remove:S}=p,j=x.useMemo(()=>({...p,items:E,remove:async se=>{const N=se.filter(te=>E.some(me=>!On(me)&&me.asset.id===te&&(v.get(me.list)??0)===0)),V=await S(se);return V===0&&N.length>0&&w(te=>new Set([...te,...N])),V}}),[p,E,S,v]),C=x.useMemo(()=>vU(E),[E]),A=x.useMemo(()=>new Set(E.flatMap(Q=>!On(Q)&&(v.get(Q.list)??0)>0?[Q.asset.id]:[])),[E,v]),[O,T]=x.useState("idle"),[R,B]=x.useState(0),D=x.useRef(Promise.resolve()),L=x.useRef(0),P=x.useRef(new Set);if(t.kinds.length===0)return null;const le=(Q,se)=>{const N=g===void 0?[]:Q.filter(V=>A.has(V)&&!P.current.has(V));if(N.length===0&&L.current===0){se();return}L.current+=1,D.current=D.current.then(async()=>{try{if(g===void 0||N.length===0){se();return}T("landing");try{for(const V of N)await g(V),P.current.add(V)}catch{T("failed"),B(V=>V+1);return}T("idle"),se()}finally{L.current-=1}})},ee=r.mode==="single"?{mode:"single",selectedId:r.currentId??null,disabledIds:C,onPick:Q=>le([Q.id],()=>r.onPick(Q))}:{mode:"multi",selectedIds:r.selectedIds.filter(Boolean),disabledIds:C,onChange:Q=>{const se=r.selectedIds;le(Q.filter(({id:N})=>!se.includes(N)).map(({id:N})=>N),()=>r.onChange(Q))}},de=((K=c[0])==null?void 0:K.label)??"";return d.jsx(P7,{onClose:s,title:de,notice:O==="landing"?d.jsxs("p",{role:"status",className:wk,children:["Adding to ",de,"…"]}):O==="failed"?d.jsxs("p",{role:"alert",className:ie(wk,"text-danger"),children:["Couldn't add it to ",de,". Try again."]}):null,children:d.jsx(oU,{filter:t,selection:ee,host:j,...g!==void 0?{tiers:u}:{}},R)})}function wU(e){return function(a,r,s){const c=nf(a),u=bU(a,r,c,s),{items:m}=u,p=x.useCallback(g=>{const v=m.find(w=>!On(w)&&w.asset.id===g),b=v===void 0||On(v)?null:v.asset.file_url;return b&&window.open(b,"_blank","noopener"),Promise.resolve()},[m]);return{items:m,loading:c===void 0,capabilities:e,preparing:!1,scope:a,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 kU({capabilities:e,...t}){const{upload:a,manage:r}=e,s=x.useMemo(()=>wU({upload:a,manage:r}),[a,r]);return d.jsx(xU,{...t,useHost:s})}const of=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"),ob="hover:bg-[#fbe6e2] hover:text-danger",_U="size-[calc(13*var(--content))]",SU="we-no-drag h-[calc(36*var(--content))] shrink-0",kj="flex shrink-0 items-center";function sf({icon:e,label:t,title:a,tone:r="neutral",onClick:s}){return d.jsx("button",{type:"button",className:ie(of,SU,r==="remove"&&ob),"aria-label":t,title:a,onClick:s,children:Ba.createElement(e,{className:_U})})}const EU={card:"rounded-2xl",compact:"rounded-xl"},jU={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}},OU="text-ink-3",AU={card:"mx-2 rounded-xl",compact:"mx-1.5 rounded-lg"},NU=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]",cE),MU="border-honey-2 bg-honey-soft";function kk({kind:e,name:t,empty:a,scale:r,actions:s,attention:c,drop:u,children:m}){const p=Ts(),g=Br[r],v=jU[r],{plain:b,foot:w}=tj(s),_=(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]",EU[r],Ns,_&&!a&&"ring-2 ring-honey-2"),...Ms(c,p),...u==null?void 0:u.handlers,"data-media-drop":u?"":void 0,children:[d.jsxs("div",{className:v.bar,children:[d.jsx("span",{className:ie("grid shrink-0 place-items-center",v.mark),children:d.jsx(Xr,{kind:e,size:r==="compact"?"mark":"lead"})}),d.jsx("span",{className:ie(v.name,a&&"font-normal text-ink-4"),title:t,children:t}),s.length>0&&d.jsx("span",{className:"we-no-drag flex shrink-0 items-center gap-0.5",children:[...b,...w].map(E=>d.jsx("button",{type:"button",className:ie(of,OU,v.button,E.danger&&ob),"aria-label":E.label,title:E.label,onClick:E.onSelect,children:d.jsx(it,{name:E.glyph,size:v.glyph})},E.label))})]}),a?d.jsx("div",{className:ie(NU,AU[r],_&&MU),"data-thumb":"",children:m}):d.jsx("div",{className:g.thumb,"data-thumb":"","data-media-tile":e,children:m}),d.jsx("div",{className:r==="compact"?"h-1.5":"h-2"})]})}function ag(e){var t;return e===void 0?"Link":((t=Za[e])==null?void 0:t.label)??"Link"}function CU(e){return e.kind==="tour"?ag(e.provider):e.kind!=="video"?"":e.videoSource==="link"?ag(e.provider):e.ready===!1?"Processing…":hz(e.durationMs)||"Video"}function RU({kind:e,size:t}){return e==="tour"?d.jsx(Rt.tour,{size:t}):d.jsx(Rt.play,{size:t})}const TU="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",DU={doc:Yd,spreadsheet:iE,presentation:Ey,image:Qd,video:Ay};function LU({glyph:e,extension:t,size:a=16,className:r}){const s=DU[e];return d.jsxs(d.Fragment,{children:[d.jsx(s,{size:a,strokeWidth:1.5,className:r,style:{width:`calc(${a} * var(--content))`,height:`calc(${a} * var(--content))`}}),t&&d.jsx("span",{className:TU,children:t})]})}const zU=new Set(["image","video","tour","document","media"]);function $U(e){return Ga(e).length>0}function _j(e,t){const a=ny(e,t);return a!==null?!zU.has(a.value_type)||a.filter!==void 0?null:{holder:"home",table:a.table,field:(Vr(a.table)?N4(a.table,a.member):null)??a.member,row:a.row}:!$U(e)||typeof e.from=="string"||e.source!==void 0&&e.source.kind!=="authored"?null:{holder:"section"}}function Sj(){return`tmp_${globalThis.crypto.randomUUID()}`}function lf(e){return typeof e=="string"&&e.startsWith("tmp_")}function UU(e,t=!0){var s,c,u;const a=L8();return((u=(c=(s=gc({queryKey:["property",e],queryFn:()=>a.fetchProperty(e),enabled:t}).data)==null?void 0:s.contacts)==null?void 0:c[0])==null?void 0:u.library_item_id)??null}function IU(e,t,a,r){const s=Vr(a.table)&&eo[a.table].ownership==="library"?{home:"library"}:{home:"property",propertyId:t},c=`${a.table}.${r}.${a.field}`;return{place:`${s.home}:${c}`,take:u=>e.stageOwnedAsset(s,c,u),presign:u=>e.ownedAssetUrl(s,c,u),discard:u=>e.discardStagedAsset(s,c,u)}}function Ej(e,t,a){return{place:`content:${a.deliverableId}:${a.instanceId}:${a.slotId}`,take:r=>e.uploadContentAsset(t,a,r),presign:r=>e.contentAssetUrl(t,a,r),discard:null}}function BU(e,t,a){if(e.row!=="primary")return t?t.itemId:a??null}function jj({props:e,table:t,ownerSlot:a,assetId:r,inLibrary:s}){const{slot:c,propertyId:u,instanceId:m,recordContext:p,boundRowId:g,onUpload:v}=e,{api:b,useEditorStore:w}=Yt(),_=w(L=>L.session.deliverable_id),E=v===void 0?_j(a??c,t):null,S=(E==null?void 0:E.holder)==="home"?E:null,j=S===null?null:BU(S,p,g),C=lf(j),A=UU(u,(S==null?void 0:S.table)==="contacts"&&j===void 0),O=S===null||C?null:j!==void 0?j:S.table==="contacts"?A:null;let T=null;S!==null&&O!==null&&(T=IU(b,u,S,O)),((E==null?void 0:E.holder)==="section"||C)&&_!==void 0&&(T=Ej(b,u,{deliverableId:_,instanceId:m,slotId:Oj(e)}));const R=gc({queryKey:["owned-media-url",T==null?void 0:T.place,r],queryFn:()=>T.presign(r),enabled:T!==null&&r!==""&&!s,retry:!1}),B=x.useRef(null);return{upload:T===null?null:async L=>{const P=await T.take(L),le=B.current;return B.current=P.asset_id,T.discard!==null&&le!==null&&le!==P.asset_id&&T.discard(le).catch(()=>{}),Aj(P,L)},previewUrl:R.data}}function Oj(e){var a;const t=(a=e.recordContext)==null?void 0:a.fieldKey;return t?`${e.slotId}.${t}`:e.slotId}function Aj(e,t){const a=e.provider??("link"in t?dc(e.url)??void 0:void 0);return a===void 0?e:{...e,provider:a}}function sb(e,t){var u;const{api:a,useEditorStore:r}=Yt(),s=r(m=>m.session.deliverable_id);if(s===void 0||((u=_j(e))==null?void 0:u.holder)!=="section")return null;const c=Ej(a,t.propertyId,{deliverableId:s,instanceId:t.instanceId,slotId:t.slotId});return async m=>Aj(await c.take(m),m)}function Ul(e,t){return e===void 0||e===""||t===""?null:{holder:e,mediaId:t}}function Nj(e,t){const{capabilities:a}=ab(),r=a.framingCrop!==!1,s=!r&&t==="image",c=x.useRef(new Map),u=dj(s?e:"",m=>{const p=c.current.get(Kr(m));p!==void 0&&uy.getState().notice(p,"failed")});return{framing:r&&t==="image",offers:m=>r?t==="image":s&&m!==null&&u.offers(m),recrop:(m,p)=>{c.current.set(Kr(m),p),u.open(m)},recropping:m=>s&&m!==null&&u.recropping(m),modal:u.modal}}function Mj(e,t,a,r){const s=t.asset_id===""?void 0:e.get(t.asset_id),u=((s==null?void 0:s.kind)==="image"?s.file_url??"":"")||r||t.url;if(t.rect)return{src:u,seed:t.rect,inherited:!1};const m=(s==null?void 0:s.kind)==="image"&&a!=="locked"?s.crop:null;return m===null||!Bd(m)?{src:u,seed:null,inherited:!1}:{src:u,seed:{nx:m.x,ny:m.y,nw:m.width,nh:m.height},inherited:!0}}function Cj(e,t){if(!e.inherited||e.seed===null)return!1;const a=s=>Math.round(s*1e4)/1e4,{seed:r}=e;return a(t.nx)===a(r.nx)&&a(t.ny)===a(r.ny)&&a(t.nw)===a(r.nw)&&a(t.nh)===a(r.nh)}function Rj(e,t){var r;if(ay(t.rect)){if(!e.rect&&!e.mobile)return null;const s=e.renditions?{renditions:{...e.renditions,crop:null}}:{};return{...e,rect:null,ar:null,mobile:null,...s}}const a=(r=e.mobile)!=null&&r.renditions?{renditions:e.mobile.renditions}:{};return{...e,rect:t.rect,ar:t.ar,mobile:t.mobile?{rect:t.mobile.rect,derived:t.mobile.derived,...a}:e.mobile??null}}function HU(e,t){return e.rect?!ay(e.rect):(t==null?void 0:t.mode)!=="locked"?!1:typeof e.ar!="number"||mS(e.ar,t.aspect)!==null}function rg(e,t){var s,c,u,m;if(!HU(e,t))return null;const a=(c=(s=e.renditions)==null?void 0:s.cutout)==null?void 0:c.key;if(typeof a=="string"&&a.startsWith(`processed/cutout/${e.asset_id}/`))return a;const r=(m=(u=e.renditions)==null?void 0:u.crop)==null?void 0:m.key;return typeof r=="string"&&r.startsWith(`processed/crops/${e.asset_id}/`)?r:null}function qU({value:e,onChange:t,propertyId:a,cropCfg:r}){const{api:s}=Yt(),c=Cs(a),[u,m]=x.useState(!1),p=rg(e,r),g=XS(a,[p],s.getCropDerivativeUrl),v=p?g.get(p):void 0,b=w=>{var E;if(!u)return null;const _=Mj(c,e,r.mode,w);return _.src?d.jsx(cy,{chrome:Xy,src:_.src,mode:r.mode,aspect:r.aspect,aspectLabel:r.aspectLabel,mobileAspect:r.mobileAspect,seed:{rect:_.seed},mobileSeed:{rect:((E=e.mobile)==null?void 0:E.rect)??null},onClose:()=>m(!1),onApply:S=>{if(m(!1),!e.asset_id||!S.mobile&&Cj(_,S.rect))return;const j=Rj(e,S);j!==null&&t(j)}}):null};return{cropCfg:r,ar:e.ar??null,cut:p,derivativeUrl:v,open:()=>m(!0),modal:b}}function lb({propertyId:e,children:t}){return d.jsx(d.Fragment,{children:t(nf(e))})}function cb(e,t){const a=Cs(t).get(e);return a===void 0?void 0:AE(a)}function FU(e){return e==null||e===""?void 0:e}function _k(e){return{asset_id:e.asset_id,url:e.url,alt:e.alt}}const PU={noun:"image",takes:kc(["image"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>e.id===t.asset_id?{...t,url:ms(e)}:{..._k(t),asset_id:e.id,url:ms(e),alt:t.alt,picked:e.id},fromUploaded:(e,t)=>({..._k(t),asset_id:e.asset_id,url:e.url,picked:null}),cleared:{asset_id:"",url:"",alt:""},usePreview:function(t,a){const r=cb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.url,name:FU(t.name)??(r==null?void 0:r.name)}}},VU={noun:"video",takes:kc(["video"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>({...t,asset_id:e.id,url:"",poster:ms(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,asset_id:e.asset_id,url:"",poster:e.poster??"",source:e.provider!==void 0?"link":void 0,provider:e.provider,picked:null}),cleared:{asset_id:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=cb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:r?CU(r):void 0}}},GU={noun:"tour",takes:kc(["tour"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>({...t,asset_id:e.id,url:"",poster:ms(e),provider:e.provider??void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,asset_id:e.asset_id,url:"",poster:e.poster??"",provider:e.provider,picked:null}),cleared:{asset_id:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=cb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:t.asset_id?ag((r==null?void 0:r.provider)??t.provider):void 0}}},KU={noun:"document",takes:kc(["document"]),assetIdOf:e=>(e==null?void 0:e.asset_id)??"",fromPicked:e=>({asset_id:e.id,picked:e.id}),fromUploaded:e=>({asset_id:e.asset_id,picked:null}),cleared:null,usePreview:function(t,a){const r=N$(a),s=(t==null?void 0:t.asset_id)??"";if(!s)return{src:""};const c=r(s);return c?{src:c.src,name:c.name,detail:A$(c),attachment:VE(c)}:{src:"",name:"Document unavailable"}}},YU={image:PU,video:VU,tour:GU,document:KU};function Hn(e){return YU[e]}function gs(e){return e.recordContext?e.recordContext.table??null:e.boundRowTable??null}const QU="text-[length:calc(11.5*var(--content))] text-ink-3",XU=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"),ZU="flex w-full max-w-90 items-center gap-1.5",WU="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",JU=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",Ns);function Sk(e){return e.kind==="image"?d.jsx(e9,{...e}):d.jsx(Tj,{...e})}function Tj(e){const t=Hn(e.kind),a=jj({props:e.props,table:gs(e.props),assetId:t.assetIdOf(e.props.value),inLibrary:!0});return d.jsx($j,{...e,extras:{crop:null,pick:null,ownerUpload:a.upload,ownerPreview:void 0}})}function Dj(e){const{slot:t,value:a,onChange:r,propertyId:s,factPath:c}=e,u=qU({value:a,onChange:r,propertyId:s,cropCfg:iy(t)}),m=ab().capabilities.framingCrop===!1,p=dj(m?s:"");if(!m)return{...u,offered:!0,recropping:!1};const g=Ul(c,a.asset_id);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 e9(e){const t=Dj(e.props),a=Cs(e.props.propertyId),r=e.props.value.asset_id,s=(u,m,p)=>{e.props.onChange(Zy(u,e.props.value,m,t.cropCfg,p))},c=jj({props:e.props,table:gs(e.props),assetId:r,inLibrary:r!==""&&a.has(r)});return d.jsx($j,{...e,extras:{crop:t,pick:s,ownerUpload:c.upload,ownerPreview:c.previewUrl}})}function Lj(e){return e.kind==="image"?d.jsx(t9,{...e}):d.jsx(zj,{...e,crop:null})}function t9(e){return d.jsx(zj,{...e,crop:Dj(e.props)})}function zj({kind:e,model:t,props:a,onOpen:r,crop:s}){const{slot:c,value:u,propertyId:m,required:p}=a,g=Hn(e),v=g.usePreview(u,m),b=Vd(c,gs(a)),w=rf(c,{table:gs(a)}),_=Hy(a.factPath,g.assetIdOf(u));return d.jsx(a9,{kind:e,offer:b.kind,noun:g.noun,label:c.label,emptyName:w===null?c.label:pj(w).label,preview:v,empty:t.isEmpty(u),crop:s,processing:_,attention:ir(t,c,u,p??!1),onOpen:r})}function $j({kind:e,face:t,model:a,props:r,extras:s,open:c}){var oe,ke;const{slot:u,value:m,onChange:p,propertyId:g,onUpload:v,required:b}=r,{crop:w,pick:_,ownerUpload:E,ownerPreview:S}=s,j=Hn(e),C=j.usePreview(m,g),A=S?{...C,src:S}:C,O=v!==void 0?{kind:"owned"}:Vd(u,gs(r)),T=a.isEmpty(m),R=ir(a,u,m,b??!1),B=Hy(r.factPath,j.assetIdOf(m))||((w==null?void 0:w.recropping)??!1),[D,L]=x.useState(!1),P=v??E??void 0,le=n9(P,(z,ce)=>c?c.onUploaded(z,ce):p(j.fromUploaded(z,m))),ee=x.useRef(null),de=c?c.accept:tb[e]??void 0,K=c&&T?c.noun:j.noun,Q=((ke=(oe=rf(u,{table:gs(r)}))==null?void 0:oe.choose)==null?void 0:ke.label)??Zl("Choose",K),se=(c==null?void 0:c.takes)??j.takes,N=O.kind==="owned"&&P!==void 0,V=(z,ce)=>{c?c.onPicked(z):_?_(z,ce,O.kind==="picked"?O.filter.from:void 0):p(j.fromPicked(z,m))},te=le,me=N&&se.includes("file"),Y=N&&se.includes("link"),M=Zl("Upload",K),H=BE({accept:me?de??"":null,onFiles:([z])=>{z&&te.takeFile(z)},...Y?{onLink:te.takeLink,...c?{}:{linkKinds:[e]}}:{},disabled:te.busy},M,ee,!1),I=me||Y,F=O.kind==="picked"?[{label:Q,glyph:"choose",run:()=>L(!0)}]:I?[{label:M,glyph:"upload",run:H.start}]:[],W=w!=null&&w.offered&&!T&&A.src?w.open:null,pe=T?null:()=>p(j.cleared);return d.jsxs("div",{ref:ee,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":O.kind,children:[d.jsx(i9,{scale:t==="expanded"?"card":"compact",kind:e,noun:K,label:u.label,preview:A,empty:T,crop:w,sources:F,onCrop:W,onRemove:pe,drop:me?te.takeFile:null,link:Y?te.takeLink:null,busy:te.busy,processing:B,attention:R}),te.error&&d.jsx("p",{className:As,children:te.error}),H.node,D&&O.kind==="picked"&&d.jsx(lb,{propertyId:g,children:z=>d.jsx(_c,{mode:"single",propertyId:g,filter:O.filter,currentId:j.assetIdOf(m)||void 0,onClose:()=>L(!1),onPick:ce=>V(ce,z)})}),w==null?void 0:w.modal(S)]})}function n9(e,t){const[a,r]=x.useState(!1),[s,c]=x.useState(null),u=m=>{e&&(r(!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(()=>r(!1)))};return{busy:a,error:s,takeFile:m=>u({file:m}),takeLink:m=>u({link:m})}}function Uj({kind:e,preview:t,size:a}){var r,s;return e==="document"?d.jsx(LU,{glyph:((r=t.attachment)==null?void 0:r.glyph)??"doc",extension:((s=t.attachment)==null?void 0:s.extension)??"",size:a}):e==="video"||e==="tour"?d.jsx(RU,{kind:e,size:a}):d.jsx(Rt.up,{})}function i9({scale:e,kind:t,noun:a,label:r,preview:s,empty:c,crop:u,sources:m,onCrop:p,onRemove:g,drop:v,link:b,busy:w,processing:_,attention:E}){const[S,j]=x.useState(!1),[C,A]=x.useState(""),O=Py(u,s.src),T=v?{over:S,handlers:{onDragOver:B=>{B.preventDefault(),j(!0)},onDragLeave:B=>{B.currentTarget.contains(B.relatedTarget)||j(!1)},onDrop:B=>{var L;B.preventDefault(),j(!1);const D=(L=B.dataTransfer.files)==null?void 0:L[0];D&&v(D)}}}:null,R=[];if(p&&R.push({label:"Crop",glyph:"crop",onSelect:p}),!w)for(const B of m)R.push({label:B.label,glyph:B.glyph,onSelect:B.run,foot:!0});return g&&R.push({label:"Remove",glyph:"trash",onSelect:g,danger:!0}),c?d.jsxs(kk,{kind:t,name:`No ${a}`,empty:!0,scale:e,actions:R,attention:E,drop:T,children:[d.jsx("span",{className:"text-ink-4",children:d.jsx(Uj,{kind:t,preview:s,size:24})}),(w||v)&&d.jsx("span",{className:QU,children:w?"Uploading…":S?`Drop to add this ${a}`:"Drop a file here"}),b&&d.jsxs("form",{className:ZU,onSubmit:B=>{B.preventDefault(),C.trim()&&b(C.trim()),A("")},children:[d.jsx("input",{className:WU,value:C,onChange:B=>A(B.target.value),placeholder:`Paste a ${a} link`,"aria-label":`${r} link`}),d.jsxs("button",{type:"submit",className:XU,disabled:w||!C.trim(),children:[d.jsx(Rt.link,{})," Add"]})]})]}):d.jsx(kk,{kind:t,name:s.name??`Untitled ${a}`,empty:!1,scale:e,actions:R,attention:E,drop:T,children:d.jsx(Ij,{kind:t,src:O,preview:s,dimmed:w||_,children:w?d.jsx(dy,{label:"Uploading…"}):_&&d.jsx(ub,{})})})}function ub(){return d.jsx(dy,{label:"Processing…"})}function a9({kind:e,offer:t,noun:a,label:r,emptyName:s,preview:c,empty:u,crop:m,processing:p,attention:g,onOpen:v}){const b=Ts(),w=Py(m,c.src),_=e==="image"?null:c.name??(u?null:`Untitled ${a}`),E=w?d.jsx("img",{className:"absolute inset-0 size-full object-cover object-top",src:w,alt:"",draggable:!1,style:p?CS:void 0}):u?d.jsx(Rt.plus,{}):d.jsx(Uj,{kind:e,preview:c,size:16});return d.jsxs("button",{type:"button",className:JU,"data-media-summary":"","data-media-kind":e,"data-media-offer":t,"data-empty":u?"":void 0,...Ms(g,b),"aria-label":u?s:`${r}: ${_??a}`,disabled:v===void 0,onClick:v,children:[E,p&&d.jsx(ub,{})]})}const r9="block size-full object-cover object-top",o9="flex size-full items-center justify-center bg-canvas",s9="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",l9="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 Ij({kind:e,src:t,preview:a,dimmed:r,children:s}){return d.jsxs(d.Fragment,{children:[t?d.jsx("img",{className:r9,src:t,alt:"",draggable:!1,style:r?CS:void 0}):d.jsx("span",{className:o9,children:d.jsx(Xr,{kind:e,size:"logo",decorative:!0,...e==="document"&&a.attachment?{glyph:a.attachment.glyph}:{}})}),e==="video"&&t&&d.jsx("span",{className:l9,children:d.jsx(it,{name:"play",size:14})}),s,a.detail&&d.jsx("span",{className:s9,children:a.detail})]})}function db({kind:e,value:t,propertyId:a,frame:r,holderPath:s}){const c=Hn(e),u=c.usePreview(t,a),m=Hy(s,c.assetIdOf(t)),{chrome:p,crop:g,beneath:v}=r,b=Py(g,u.src),w=(g==null?void 0:g.cropping)??!1,_=u.name??(c.assetIdOf(t)?`Untitled ${c.noun}`:`No ${c.noun}`);return d.jsx(a7,{kind:e,name:_,chrome:p,thumb:d.jsx(Ij,{kind:e,src:b,preview:u,dimmed:w||m,children:w?d.jsx(dy,{}):m&&d.jsx(ub,{})}),below:g&&d.jsx(E$,{storeKey:g.storeKey}),beneath:v})}function cf(e,t){function a(s){return d.jsx(Sk,{kind:e,face:"expanded",model:t.model,props:s})}a.displayName=`MediaExpandedFace(${e})`;function r(s){return d.jsx(Sk,{kind:e,face:"compact",model:t.model,props:s})}return r.displayName=`MediaCompactFace(${e})`,{model:t.model,faces:{expanded:a,compact:r},applyOptimistic:t.applyOptimistic}}function c9(e,t){const a=Cs(t).get(e);return a===void 0?null:a.kind}function fb(e,t,a){const r=c9((e==null?void 0:e.kind)===void 0?(e==null?void 0:e.asset_id)??"":"",a);return(e==null?void 0:e.kind)??r??t[0]??"image"}function uf(e,t){return t===null||Hn(e).assetIdOf(t)===""?null:{...t,kind:e}}function Ek(e,t,a,r){const s=Hn(e),c=t===e?a:s.cleared;return uf(e,r(s,c))}function u9(e){const t=e.map(a=>tb[a]).filter(a=>a!==null);return{takes:kc(e),accept:t.length>0?t.join(","):void 0}}function od(e){return"file"in e?h_(e.file.type):m_(e.link)}function d9(e){const{kind:t}=e;return uf(t,Hn(t).fromPicked(e,Hn(t).cleared))}function f9(e,t,a,r){return{noun:e.length===1?Hn(t).noun:"media",...u9(e),onPicked:s=>r(Ek(s.kind,t,a,(c,u)=>c.fromPicked(s,u))),onUploaded:(s,c)=>{const u=od(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(", ")}`);r(Ek(u,t,a,(m,p)=>m.fromUploaded(s,p)))}}}function jk({face:e,models:t,props:a}){const r=Ga(a.slot),s=fb(a.value,r,a.propertyId);return d.jsx(h9,{kind:s,kinds:r,face:e,models:t,props:a},s)}function Bj(e,t,a){const r=a.value===null?Hn(e).cleared:t.coerce(a.value);return{...a,value:r,onChange:s=>a.onChange(uf(e,s))}}function h9({kind:e,kinds:t,face:a,models:r,props:s}){const c=r[e],u=Bj(e,c,s);return d.jsx(Tj,{kind:e,face:a,model:c,props:u,open:f9(t,e,u.value,s.onChange)})}function m9({models:e,props:t,onOpen:a}){const r=fb(t.value,Ga(t.slot),t.propertyId);return d.jsx(p9,{kind:r,models:e,props:t,onOpen:a},r)}function p9({kind:e,models:t,props:a,onOpen:r}){const s=t[e];return d.jsx(Lj,{kind:e,model:s,onOpen:r,props:Bj(e,s,a)})}function g9(e){function t(r){return d.jsx(jk,{face:"expanded",models:e.models(),props:r})}function a(r){return d.jsx(jk,{face:"compact",models:e.models(),props:r})}return{model:e.model,faces:{expanded:t,compact:a},applyOptimistic:null}}function y9(e,t){const a=e.querySelector("img");if(a){t.url&&a.setAttribute("src",t.url),a.setAttribute("alt",t.alt??""),a.style.transform="",a.style.transformOrigin="",a.style.objectPosition="";return}const r=e.querySelector("video");r&&(t.url?r.setAttribute("poster",t.url):r.removeAttribute("poster"))}function Hj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(t)??"",url:typeof t.url=="string"?t.url:"",alt:typeof t.alt=="string"?t.alt:"",rect:t.rect&&typeof t.rect=="object"?t.rect:void 0,ar:typeof t.ar=="number"?t.ar:void 0,mobile:t.mobile&&typeof t.mobile=="object"&&t.mobile.rect?t.mobile:void 0,...t.renditions&&typeof t.renditions=="object"?{renditions:t.renditions}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{},...typeof t.name=="string"||t.name===null?{name:t.name}:{}}}return{asset_id:"",url:"",alt:""}}const qj=cf("image",{model:{defaultValue:{asset_id:"",url:"",alt:""},coerce:Hj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:y9});function b9(e,t){const a=e.matches("img")?e:e.querySelector("img");a&&t.poster&&a.setAttribute("src",t.poster)}function Fj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(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}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{}}}return{asset_id:"",url:"",poster:"",alt:""}}const Pj=cf("tour",{model:{defaultValue:{asset_id:"",url:"",poster:"",alt:""},coerce:Fj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:b9});function Vj({engine:e,lens:t,propertyId:a,instanceId:r,slotId:s,cropCfg:c}){const{api:u}=Yt(),m=Cs(a),{rows:p}=e,[g,v]=x.useState(null),b=C=>`${a}:${r}:${s}:${C}`,w=C=>t.get(C.value),_=XS(a,p.map(C=>{const A=w(C);return A===null?null:rg(A,c)}),u.getCropDerivativeUrl),E=(C,A)=>{const O=g;v(null),O&&(!A.mobile&&Cj(C,A.rect)||e.updateValue(O,T=>{const R=t.get(T);if(R===null||!R.asset_id)return T;const B=Rj(R,A);return B===null?T:t.set(T,B)}))},S=()=>{var T;const C=g?p.find(R=>R.key===g):null,A=C?w(C):null;if(!C||!A)return null;const O=Mj(m,A,c.mode);return O.src?d.jsx(cy,{chrome:Xy,src:O.src,mode:c.mode,aspect:c.aspect,aspectLabel:c.aspectLabel,mobileAspect:c.mobileAspect,seed:{rect:O.seed},mobileSeed:{rect:((T=A.mobile)==null?void 0:T.rect)??null},onApply:R=>E(O,R),onClose:()=>v(null)}):null},j=C=>{const A=w(C);return A===null?null:rg(A,c)};return{keyOf:b,cutOf:j,derivativeOf:C=>{const A=j(C);return A?_.get(A):void 0},open:v,modal:S}}function Ok(e,t){return e.matches(t)?e:e.querySelector(t)}function v9(e,t){const a=Ok(e,"video");if(a){t.poster&&a.setAttribute("poster",t.poster),t.url&&a.setAttribute("src",t.url),t.alt&&a.setAttribute("aria-label",t.alt);return}const r=Ok(e,"img");r&&t.poster&&r.setAttribute("src",t.poster)}function Gj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(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}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{}}}return{asset_id:"",url:"",poster:"",alt:""}}const Kj=cf("video",{model:{defaultValue:{asset_id:"",url:"",poster:"",alt:""},coerce:Gj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:v9});function x9(e,t){switch(e){case"image":return t.map(Hj);case"video":return t.map(Gj);case"tour":return t.map(Fj);case"document":return O$(t)}}function w9(e){return{get:t=>e==="image"?t:null,set:(t,a)=>a}}function k9({kind:e,label:t,itemSlot:a,offer:r,verbs:s,fixed:c,instanceId:u,slotId:m,ownerSlotId:p=m,value:g,propertyId:v,commit:b,onUpload:w,factPath:_,size:E}){const S=Hn(e),j=iy(a),C=x.useMemo(()=>x9(e,g),[e,g]),[A,O]=x.useState(!1),T=nr({items:C,fixed:c,axis:"xy",commit:b}),{rows:R}=T,B=x.useMemo(()=>w9(e),[e]),D=Vj({engine:T,lens:B,propertyId:v,instanceId:u,slotId:m,cropCfg:j}),L=Nj(v,e),P=sb(a,{propertyId:v,instanceId:u,slotId:p}),le=w??P??void 0,ee=Yj(le,me=>T.add(S.fromUploaded(me,S.cleared))),de=r.kind==="owned"&&le!==void 0,K=(me,Y)=>e==="image"?Zy(me,S.cleared,Y,j,r.kind==="picked"?r.filter.from:void 0):S.fromPicked(me,S.cleared),Q=(me,Y)=>{T.replace(Rs(R,me,S.assetIdOf,M=>K(M,Y),T.mint))},{add:se,onAdd:N,choose:V}=Iy(s,r.kind==="picked"?()=>O(!0):null,r.kind==="owned"&&de?hb([e],ee):null),te=ee.error;return d.jsxs(By,{engine:T,label:t,noun:S.noun,size:E,onAdd:N,add:se,choose:V,renderTile:(me,Y,M)=>d.jsx(db,{kind:e,value:me.value,propertyId:v,holderPath:_,frame:{chrome:M,crop:e==="image"?{cfg:j,cut:D.cutOf(me),derivativeUrl:D.derivativeOf(me),cropping:L.recropping(Ul(_,S.assetIdOf(me.value))),storeKey:D.keyOf(me.key)}:null}}),tileActions:me=>e==="image"&&L.offers(Ul(_,S.assetIdOf(me.value)))?[{label:"Crop",glyph:"crop",onSelect:()=>L.framing?D.open(me.key):L.recrop(Ul(_,S.assetIdOf(me.value)),D.keyOf(me.key))}]:[],children:[te&&d.jsx("p",{className:As,children:te}),A&&r.kind==="picked"&&d.jsx(lb,{propertyId:v,children:me=>d.jsx(_c,{mode:"multi",propertyId:v,filter:r.filter,selectedIds:R.map(Y=>S.assetIdOf(Y.value)),onChange:Y=>Q(Y,me),onClose:()=>O(!1)})}),L.framing&&D.modal(),L.modal]})}function Yj(e,t){const[a,r]=x.useState(!1),[s,c]=x.useState(null);return{busy:a,error:s,take:m=>{!e||m.length===0||(r(!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{r(!1)}})())}}}function hb(e,t){const a=Rg(e);return{accept:nb(e),onFiles:r=>t.take(r.map(s=>({file:s}))),...a.length>0?{onLink:r=>t.take([{link:r}]),linkKinds:a}:{},disabled:t.busy}}const Ak="label";function sd(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function df(e){var c;const t=sd(e);if((t==null?void 0:t.type)!=="object")return null;const a=sd(t.fields);if(a===null)return null;const r=(c=sd(t.label))==null?void 0:c.field,s=t.item_order;return{...typeof r=="string"?{labelField:r}:{},fields:a,...Array.isArray(s)?{item_order:s.filter(u=>typeof u=="string")}:{}}}function Ya(e){return df(e.element)}function Ds(e){const{fields:t}=e,a=e.item_order;if(!a||a.length===0)return Object.entries(t);const r=new Set,s=[];for(const c of a)c in t&&!r.has(c)&&(r.add(c),s.push([c,t[c]]));for(const[c,u]of Object.entries(t))r.has(c)||s.push([c,u]);return s}function ys(e,t){return e.labelField!==void 0&&e.fields[e.labelField]?{kind:"field",field:e.labelField}:e.fields[Ak]?{kind:"field",field:Ak}:{kind:"text",text:t}}function ff(e,t,a){var u;if(e.kind==="text")return e.text;const r=(u=sd(a))==null?void 0:u[e.field],s=t.fields[e.field];if((s==null?void 0:s.type)==="address"){const m=_i(r);return(m===null?null:P5(m))??"Untitled"}const c=typeof r=="string"?r.trim():typeof r=="number"?String(r):"";if(!c)return"Untitled";if((s==null?void 0:s.type)!=="select")return c;for(const m of s.values??[])if(typeof m!="string"&&m.value===c)return m.label;return c}function _9(e){const t=Ya(e);return t?Ds(t):[]}function S9(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 Go(e){const t={};for(const[a,r]of e)t[a]=S9(r);return t}const E9=["street","unit","city","state","postal"],Qj={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function j9(e,t){const a=e??Qj,r=_i({...a,...t}),s=E9.filter(c=>((r==null?void 0:r[c])??null)!==a[c]);return s.length===0?e:s.every(c=>c==="unit")?r:r===null?null:_i({...r,latitude:null,longitude:null,source:null})}function Nk(e,t,a){return j9(e,{[t]:a})}function O9(e){return _i({...e,source:"autocomplete"})}function A9(e,t){return _i({...e??Qj,...t,source:"manual_pinned"})}function Xj(e){return e!==null&&e.latitude!==null&&e.longitude!==null}function Zj(e){return e!==null&&!Xj(e)}function N9(e,t,a){const r=a===void 0||a.size===0?t!=="unit":a.has(t);return e!==null&&r&&e[t]===null}function M9(e){return Zj(e)||(e==null?void 0:e.source)==="manual_pinned"}const Wj={defaultValue:null,coerce:_i,isEmpty:e=>e===null,isInvalid:()=>!1},og=[{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 Zu(e){const t=e.trim().toLowerCase();if(t==="")return[...og];const a=r=>{const s=r.name.toLowerCase();return r.code.toLowerCase()===t||s===t?0:s.startsWith(t)?1:s.includes(` ${t}`)?2:s.includes(t)?3:-1};return og.map(r=>({state:r,rank:a(r)})).filter(({rank:r})=>r>=0).sort((r,s)=>r.rank-s.rank).map(({state:r})=>r)}function C9(e){const t=e.trim().toLowerCase();return t===""?null:og.find(a=>a.code.toLowerCase()===t||a.name.toLowerCase()===t)??null}const R9="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)]",T9=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"),D9="ml-auto text-caption font-medium text-ink-4",L9=4,z9=280,Mk=220;function $9({value:e,onCommit:t,ariaLabel:a,placeholder:r,shellClassName:s,attention:c,inputClassName:u}){const m=e??"",[p,g]=x.useState(null),[v,b]=x.useState(0),[w,_]=x.useState(null),E=x.useId(),S=x.useRef(null),j=x.useRef(null),C=p!==null,A=C&&p!==m,O=Zu(A?p:""),T=x.useCallback(()=>{S.current&&_(cs(S.current))},[]);x.useEffect(()=>{if(C)return window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[C,T]),x.useEffect(()=>{var ee,de;(de=(ee=j.current)==null?void 0:ee.querySelector('[data-active="true"]'))==null||de.scrollIntoView({block:"nearest"})},[v,C]);function R(){T(),g(m);const ee=Zu("").findIndex(de=>de.code===m);b(Math.max(0,ee))}function B(){g(null),_(null)}function D(ee){B(),ee!==e&&t(ee)}function L(ee){if(ee===m)return B();if(ee.trim()==="")return D(null);const de=C9(ee);if(de)return D(de.code);const K=Zu(ee);if(K.length===1)return D(K[0].code);B()}function P(ee){if(!C){(ee.key==="ArrowDown"||ee.key==="ArrowUp")&&(ee.preventDefault(),R());return}switch(ee.key){case"ArrowDown":ee.preventDefault(),b(de=>Math.min(O.length-1,de+1));return;case"ArrowUp":ee.preventDefault(),b(de=>Math.max(0,de-1));return;case"Enter":{ee.preventDefault(),ee.stopPropagation();const de=O[v];de?D(de.code):L(p);return}case"Tab":{const de=A?O[v]:void 0;de?D(de.code):L(p);return}case"Escape":ee.preventDefault(),B();return}}const le=w?cc(w,{maxHeight:z9,minWidth:Mk,gap:L9}):null;return d.jsxs("div",{className:s,ref:S,...c,children:[d.jsx("input",{className:u,type:"text",role:"combobox","aria-label":a,"aria-expanded":C,"aria-controls":E,"aria-autocomplete":"list",autoComplete:"address-level1",placeholder:r,value:C?p:m,onFocus:ee=>{R(),ee.currentTarget.select()},onChange:ee=>{C||T(),g(ee.target.value),b(0)},onKeyDown:P,onBlur:()=>{C&&L(p)}}),C&&le&&O.length>0&&typeof document<"u"&&tr.createPortal(d.jsx("div",{ref:j,id:E,role:"listbox","aria-label":`${a} options`,className:R9,style:{left:le.left,top:le.top,bottom:le.bottom,maxHeight:le.maxHeight,minWidth:Math.max(le.width,Mk),zIndex:Qr},children:O.map((ee,de)=>d.jsxs("button",{type:"button",role:"option",tabIndex:-1,"aria-selected":ee.code===m,"data-active":de===v,"data-state-option":ee.code,className:T9,onMouseEnter:()=>b(de),onMouseDown:K=>{K.preventDefault(),D(ee.code)},children:[d.jsx("span",{className:"truncate",children:ee.name}),d.jsx("span",{className:D9,children:ee.code})]},ee.code))}),document.body)]})}const U9=x.createContext(null);function Jj(e){const t=x.useContext(U9);return t!==null&&e!==void 0&&t.factPath===e?t.fields:void 0}const I9={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"}},B9={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}},H9=250,q9=2e3;function F9(e){const t=M9(e),[a,r]=x.useState(!1),[s,c]=x.useState(t);!a&&s!==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(),r(!1)},[m]),g=x.useCallback(()=>{m(),r(!0),u.current=setTimeout(()=>{u.current=null,r(!1)},q9)},[m]);return{show:a?s:t,hold:g,settle:p}}function P9(){const[e,t]=x.useState({});return{shown:(a,r)=>e[a]??r,type:(a,r)=>t(s=>({...s,[a]:r})),settle:a=>t(({[a]:r,...s})=>s),settleAll:()=>t({})}}function V9(e){const t=Yt().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:a=>e.onChange(a.target.value),onBlur:e.onBlur})}function G9({value:e,onPin:t,place:a}){const r=Yt().address;if(!r)return null;const s=Xj(e)?{latitude:e.latitude,longitude:e.longitude}:null;return d.jsx(r.PinMap,{pin:s,postal:(e==null?void 0:e.postal)??null,place:a,onPin:t})}function K9({value:e,show:t,onChange:a,place:r}){const[s,c]=x.useState(t);return t&&!s&&c(!0),x.useEffect(()=>{if(t)return;const u=setTimeout(()=>c(!1),H9);return()=>clearTimeout(u)},[t]),s?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:r==="page"?"pt-4":"pt-1.5",children:d.jsx(G9,{value:e,onPin:u=>a(A9(e,u)),place:r})})})}):null}function Y9({value:e,onChange:t,place:a,fields:r,hold:s}){const c=P9(),u=Ts(),m=YE(a),p=B9[a],g=ie(m.inner,"w-full"),v=b=>{const w=I9[b],_=Ms(N9(e,b,r==null?void 0:r.required)?"required":null,u),E=p.labelled?w.placeholder:w.panelPlaceholder,S=(e==null?void 0:e[b])??"",j=b==="postal"?Lg(S):S,C=O=>{c.type(b,O),s.hold(),t(Nk(e,b,O))};let A;return b==="street"?A=d.jsx("div",{className:m.shell,..._,children:d.jsx(V9,{className:g,value:c.shown(b,j),placeholder:E,ariaLabel:w.label,onChange:C,onPick:O=>{c.settleAll(),s.settle(),t(O9(O))},onBlur:()=>c.settle(b)})}):b==="state"?A=d.jsx($9,{value:(e==null?void 0:e.state)??null,onCommit:O=>{s.hold(),t(Nk(e,"state",O??""))},ariaLabel:w.label,placeholder:E,shellClassName:m.shell,attention:_,inputClassName:g}):A=d.jsx("div",{className:m.shell,..._,children:d.jsx("input",{className:g,type:"text",value:c.shown(b,j),placeholder:E,"aria-label":w.label,autoComplete:"off",inputMode:b==="postal"?"numeric":void 0,maxLength:b==="postal"?10:void 0,onChange:O=>C(O.target.value),onBlur:()=>c.settle(b)})}),d.jsxs("label",{className:ie(m.frame,"min-w-0",p.span[b]),children:[p.labelled&&d.jsx("span",{className:lE,children:w.label}),A]},b)};return d.jsx("div",{className:p.grid,children:Q9.filter(b=>r===void 0||r.used.has(b)).map(v)})}const Q9=["street","unit","city","state","postal"];function X9(e){return e===void 0||e.used.has("latitude")||e.used.has("longitude")}function eO({slot:e,value:t,onChange:a,factPath:r,place:s}){const c=Jj(r)??void 0,u=F9(t),m=g=>{g.relatedTarget instanceof Node&&g.currentTarget.contains(g.relatedTarget)||u.settle()},p=g=>{u.settle(),a(g)};return d.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e.label,onBlur:m,children:[d.jsx(Y9,{value:t,onChange:a,place:s,fields:c,hold:u}),X9(c)&&d.jsx(K9,{value:t,show:u.show,onChange:p,place:s})]})}function Z9(e){return d.jsx(eO,{...e,place:"page"})}function W9(e){return d.jsx(eO,{...e,place:"panel"})}const J9={model:Wj,faces:{expanded:Z9,compact:W9},applyOptimistic:null},Ck=["January","February","March","April","May","June","July","August","September","October","November","December"],eI=["Su","Mo","Tu","We","Th","Fr","Sa"],Rk=e=>String(e).padStart(2,"0");function tO(e,t,a){return`${String(e).padStart(4,"0")}-${Rk(t+1)}-${Rk(a)}`}function tI(e=new Date){return tO(e.getFullYear(),e.getMonth(),e.getDate())}function Tk(e){return{year:Number(e.slice(0,4)),month:Number(e.slice(5,7))-1}}function nI(e,t){const a=e.year*12+e.month+t;return{year:Math.floor(a/12),month:(a%12+12)%12}}function iI(e){const t=new Date(Date.UTC(e.year,e.month,1)).getUTCDay();return Array.from({length:42},(a,r)=>{const s=new Date(Date.UTC(e.year,e.month,1+r-t));return{iso:tO(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),inMonth:s.getUTCMonth()===e.month,day:s.getUTCDate()}})}const aI="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)]",Dk=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"),rI=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"),nO=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"),Lk=ie(nO,"h-[calc(40*var(--content))]"),zk=12,oI=4,sI=4;function lI({anchorRef:e,ownerRef:t,value:a,label:r,onPick:s,onClose:c}){const[u,m]=x.useState(()=>Tk(a??tI())),[p,g]=x.useState("days"),[v,b]=x.useState(0),[w,_]=x.useState(null),E=x.useRef(null),[S,j]=x.useState(a);a!==S&&(j(a),a!==null&&m(Tk(a))),x.useLayoutEffect(()=>{const R=()=>{const B=e.current,D=E.current;!B||!D||_(cc(cs(B),{height:D.offsetHeight,minWidth:D.offsetWidth,gap:sI}))};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=L=>{var le,ee;const P=L.target;(le=E.current)!=null&&le.contains(P)||(ee=t.current)!=null&&ee.contains(P)||c()},B=()=>c(),D=L=>{L.key!=="Escape"||L.defaultPrevented||(L.preventDefault(),c())};return document.addEventListener("pointerdown",R,!0),document.addEventListener("keydown",D),window.addEventListener("blur",B),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("keydown",D),window.removeEventListener("blur",B)}},[t,c]);const C=R=>{R==="years"&&b(u.year-oI),g(p===R?"days":R)},A=R=>{p==="years"?b(v+R*zk):m(nI(u,R))},O=p==="years"?"years":"month",T=(R,B,D)=>d.jsxs("button",{type:"button",className:rI,"aria-label":D,"aria-expanded":p===R,"data-open":p===R,onClick:()=>C(R),children:[B,d.jsx("span",{className:ie("text-ink-4 transition-transform",p===R&&"rotate-180"),children:d.jsx(Rt.chevD,{})})]});return tr.createPortal(d.jsxs("div",{ref:E,role:"dialog","aria-label":`${r} calendar`,className:aI,style:{left:(w==null?void 0:w.left)??0,top:w?w.top:0,bottom:w==null?void 0:w.bottom,visibility:w?void 0:"hidden",zIndex:Qr},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:[T("months",Ck[u.month]??"","Choose month"),T("years",String(u.year),"Choose year")]}),p!=="months"&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",className:Dk,"aria-label":`Previous ${O}`,onClick:()=>A(-1),children:d.jsx(Rt.chevL,{})}),d.jsx("button",{type:"button",className:Dk,"aria-label":`Next ${O}`,onClick:()=>A(1),children:d.jsx(Rt.chevR,{})})]})]}),p==="days"?d.jsxs("div",{className:"grid grid-cols-7 gap-0.5",children:[eI.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)),iI(u).map(R=>d.jsx("button",{type:"button",className:nO,"aria-label":R.iso,"aria-pressed":R.iso===a,"data-outside":!R.inMonth,"data-selected":R.iso===a,onClick:()=>s(R.iso),children:R.day},R.iso))]}):p==="months"?d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Ck.map((R,B)=>d.jsx("button",{type:"button",className:Lk,"aria-pressed":B===u.month,"data-selected":B===u.month,onClick:()=>{m({year:u.year,month:B}),g("days")},children:R.slice(0,3)},R))}):d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Array.from({length:zk},(R,B)=>v+B).map(R=>d.jsx("button",{type:"button",className:Lk,"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 iO={defaultValue:null,coerce:e=>typeof e=="string"&&e!==""?e:null,isEmpty:e=>e===null,isInvalid:e=>!v_(e)};function $k({slot:e,value:t,onChange:a,required:r=!1}){const[s,c]=x.useState(!1),[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),v=x.useRef(null),b=s||t!==null,w=ir(iO,e,t,r),_=ar(),E=t!==null&&v_(t)?t:null;x.useEffect(()=>{var C;s&&((C=p.current)==null||C.focus())},[s]);const S=x.useCallback(()=>{var C;m(!1),document.activeElement!==p.current&&((C=p.current)==null?void 0:C.value)===""&&c(!1)},[]),j=b?d.jsxs(Zr,{attention:w,className:u?"border-accent":void 0,ref:v,children:[d.jsx("input",{ref:p,className:ie(_.inner,"[font-variant-numeric:tabular-nums] [&::-webkit-calendar-picker-indicator]:hidden"),type:"date","aria-label":e.label,"aria-invalid":w==="invalid"||void 0,value:E??"",onFocus:()=>c(!0),onChange:C=>a(C.target.value===""?null:C.target.value),onBlur:C=>{m(!1),C.target.value===""&&c(!1)}}),d.jsx("span",{className:ie(uE,_.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?S():m(!0),children:d.jsx(Rt.calendar,{})})})]}):d.jsx(Zr,{attention:w,children:d.jsx("button",{type:"button",className:ie(vt,_.inner,"cursor-pointer text-left text-ink-4"),"aria-label":e.label,onClick:()=>{c(!0),m(!0)},children:"None"})});return d.jsxs("div",{className:_.frame,ref:g,children:[j,b&&u&&d.jsx(lI,{anchorRef:v,ownerRef:g,value:E,label:e.label,onPick:C=>{var A;a(C),m(!1),(A=p.current)==null||A.focus()},onClose:S}),d.jsx(QE,{attention:w,message:"Not a real date. Pick one"})]})}const cI={model:iO,faces:{expanded:$k,compact:$k},applyOptimistic:null},aO=cf("document",{model:{defaultValue:{asset_id:""},coerce:PE,isEmpty:e=>e===null||e.asset_id==="",isInvalid:()=>!1},applyOptimistic:null}),uI="data-slot-id",Uk="data-slot-text-leaf",dI="data-slot-group",fI="data-slot-item",hI="data-slot-field",mI="data-slot-unselectable",hf="data-section-instance-id";function rO(e,t){const a=[];e.hasAttribute(Uk)&&a.push(e),a.push(...Array.from(e.querySelectorAll(`[${Uk}]`))),a.length!==0&&a.forEach(r=>{pI(r,t)})}function pI(e,t){const a=e.ownerDocument,r=[];t.split(`
|
|
1257
|
-
`).forEach((s,c)=>{c>0&&r.push(a.createElement("br")),r.push(a.createTextNode(s))}),e.replaceChildren(...r)}function Sc(e){return typeof e=="string"?e:e==null?"":typeof e=="number"||typeof e=="boolean"?String(e):""}function gI(e){const[t,a]=x.useState(e),[r,s]=x.useState(e);return e!==r&&(s(e),a(e)),[t,a]}function mb({kind:e,slot:t,value:a,onChange:r,required:s=!1}){var w;const c=a??"",[u,m]=gI(c),p=ir(e.model,t,u,s),g=e.invalidMessage(u,t),v=_=>{if(!e.model.isEmpty(_)&&e.model.isInvalid(_,t))return;const S=e.model.isEmpty(_)?"":e.normalize(_);m(S),S!==c&&r(S)},b=ar();return d.jsxs("div",{className:b.frame,children:[d.jsxs(Zr,{attention:p,children:[d.jsx("input",{className:b.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":b.inline&&p==="invalid"?g:void 0,onChange:_=>m(_.target.value),onBlur:_=>v(_.target.value)}),!b.inline&&((w=e.adornment)==null?void 0:w.call(e,u))]}),d.jsx(QE,{attention:p,message:g})]})}const oO={model:{defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:e=>!U5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid email address",inputType:"email",inputMode:"email",autoComplete:"email",placeholder:"name@example.com"};function Ik(e){return d.jsx(mb,{kind:oO,...e})}const yI={model:oO.model,faces:{expanded:Ik,compact:Ik},applyOptimistic:null},sO="section";function lO(e,t){const{itemKind:a,view:r,granularity:s}=v3(e,t,sO),c=a==="object"||a==="annotated-media"?{kind:"record",entries:_9(e)}:{kind:"single",slot:e.element??{type:"text",label:e.label}};return{itemKind:a,view:r,granularity:s,itemContent:c,axis:r==="gallery"||r==="annotated-gallery"?"xy":"y"}}function bI(e,t){const a=Ji(e),r=Ji(t);return a!=null||r!=null?a===r:e===t?!0:e==null||t==null?!1:String(e)===String(t)}function vI(e,t,a,r,s){const c=Fa(m=>m.markSlotOverridden),u=!s&&!_3(e);return function(p,g){u&&c(t,a,{kind:"scalar"}),r(p.map(v=>v.value))}}function Wl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function xI(e){var t;return((t=Wl(e.element))==null?void 0:t.type)==="row"}function wI(e,t){var r;const a=(r=Wl(e))==null?void 0:r.decisions;if(Array.isArray(a))return a.find(s=>{var u;const c=(u=Wl(s))==null?void 0:u.produces;return Array.isArray(c)&&c[0]===t})}function cO(e,t,a){const r=Wl(t),s=w3(r).some(v=>v.verb==="pick")||xI(e),c=W4({slots:{},...a===void 0?{}:{sectionSlots:a}},e);switch(S3(e).kind){case"table":{const v=Cg(e.source);return v===null?{kind:"owned"}:{kind:"table",...v}}case"section":case"derived":return c.length===0?{kind:"follows"}:{kind:"follows",tables:c}}if(!s)return{kind:"owned"};const[m,...p]=c;if(m!==void 0)return{kind:"pick-row",tables:[m,...p]};const g=o4(r==null?void 0:r.of);return g===null?{kind:"owned"}:{kind:"pick-media",filter:g}}function pb(e){switch(e.kind){case"table":return[e.reading==="legacy"?{table:e.table,reading:"legacy"}:{table:e.table,reading:"registry"}];case"pick-row":return e.tables;case"follows":return e.tables??[];case"pick-media":case"owned":return[]}}function kI(e){const t=pb(e);return t.length===1?t[0]:null}function uO(e){var t;return((t=kI(e))==null?void 0:t.table)??null}const gb="id";function dO(e){const[t,...a]=[...new Set(e.map(r=>r.table))];return t===void 0?null:[t,...a]}function yb(e){return dO(pb(e))}const _I=()=>null;function mf(e){const t=dO(Vl(e));return t===null?{kind:"none"}:e.source===void 0?{kind:"table",tables:t}:{kind:"table",tables:t,inert:!0}}function Bk(e,t,a){const r=yb(t);if(r!==null)return{kind:"table",tables:r};const s=Wl(e.source);return t.kind==="follows"&&(s==null?void 0:s.kind)==="section"?SI(s,a):{kind:"none"}}function SI(e,t){const a=e.section,r=e.slot;return typeof a!="string"||typeof r!="string"?{kind:"none"}:{kind:"content",labelOf:(t==null?void 0:t({section:a,slot:r}))??_I}}function bb(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function fO({instanceId:e,slotId:t,membership:a,itemBaseline:r,insideRecord:s}){const c=Fa(b=>b.markSlotOverridden),u=Fa(b=>b.relinkSlot),m=gb,p=uO(a)===null&&a.kind!=="follows",g=b=>bb(b,m),v=b=>g(b.value)??(p?b.key:null);return{identityKey:m,identityOf:g,stamp:b=>p?b.map(w=>g(w.value)===null?{key:w.key,value:{...w.value,[m]:w.key}}:w):b,markerIdentity:v,markFields:(b,w)=>{if(s)return;const _=v(b);if(_===null){c(e,t,{kind:"scalar"});return}const E=r==null?void 0:r.find(S=>S[m]===_);for(const S of Object.keys(w))S!==m&&(E!=null&&bI(w[S],E[S])?u(e,t,{kind:"item",item_id:_,field:S}):c(e,t,{kind:"item",item_id:_,field:S}))},markRemoved:b=>{if(s||a.kind!=="table")return;const w=g(b.value);w!==null&&!lf(w)&&c(e,t,{kind:"item_removed",item_id:w})}}}async function EI(e,t,a){const r=await e(`/properties/${t}/poi/search`,{method:"POST",json:{query:a}});return Array.isArray(r==null?void 0:r.results)?r.results:[]}async function hO(e,t,a){return e(`/properties/${t}/poi/${encodeURIComponent(a)}`)}async function jI(e,t,a){if(a.length===0)return{};const r=await e(`/properties/${t}/poi/photo-urls`,{method:"POST",json:{place_ids:a}});return(r==null?void 0:r.urls)??{}}function mO(e){if(e==null||!Number.isFinite(e))return null;const t=e/1609.344;return t<.1?"< 0.1 mi":`${t.toFixed(1)} mi`}let OI=0;function AI(){return`poi${++OI}${Math.random().toString(36).slice(2,6)}`}const Cd=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ml=e=>typeof e=="string"&&e!==""?e:void 0;function NI(e){const t={},a=Cd(e.rating);a!==void 0&&(t.rating=a);const r=Cd(e.review_count);r!==void 0&&(t.review_count=r);const s=Ml(e.type_label);s!==void 0&&(t.type_label=s);const c=Ml(e.price_level);c!==void 0&&(t.price_level=c);const u=Ml(e.website_uri);u!==void 0&&(t.website_uri=u);const m=Ml(e.google_maps_uri);m!==void 0&&(t.google_maps_uri=m);const p=Ml(e.summary);p!==void 0&&(t.summary=p);const g=MI(e.photo);return g!==void 0&&(t.photo=g),t}function MI(e){if(!e||typeof e!="object")return;const t=e,a=Cd(t.width),r=Cd(t.height),s=t.attribution;if(!(a===void 0||r===void 0||typeof s!="string"))return{width:a,height:r,attribution:s}}function vb(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.place_id!="string"||typeof t.name!="string"||typeof t.lat!="number"||typeof t.lng!="number"?null:{id:typeof t.id=="string"?t.id:AI(),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,...NI(t)}}function CI(e){return e.map(vb).filter(t=>t!==null)}function RI(e){return[e.rating===void 0?null:`★ ${e.rating.toFixed(1)}${e.review_count===void 0?"":` (${e.review_count.toLocaleString()})`}`,e.type_label,mO(e.distance_m),e.address].filter(Boolean).join(" · ")}const xb="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]",wb="grid w-5 flex-shrink-0 place-items-center text-ink-4",kb="flex min-w-0 flex-1 flex-col gap-px",_b="truncate text-[length:calc(13.5*var(--content))] text-ink",Sb="truncate text-caption text-ink-3",TI="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",pO="text-caption text-danger",gO="opacity-70",yO="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",DI="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",LI="we-no-drag flex flex-shrink-0 items-center gap-0.75",zI="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",$I="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",UI=()=>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 bO(e,t){const{apiFetch:a}=Yt().api,[r,s]=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)),jI(a,e,p).then(g=>{s(v=>({...v,...g}))}).catch(()=>{p.forEach(g=>u.current.delete(g))}))},[c,e,a]),{urls:r,dropUrl:m=>s(p=>{if(!(m in p))return p;const g={...p};return delete g[m],g})}}function vO({row:e,photoUrl:t,onPhotoError:a,onRemove:r,dragProps:s,flashNew:c}){const u=RI(e);return d.jsxs("div",{...s,className:ie(xb,s&&"cursor-grab hover:border-[#d9d5c9]",c&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[t?d.jsx("img",{className:DI,src:t,alt:"",draggable:!1,onError:a}):d.jsx("span",{className:wb,children:d.jsx(UI,{})}),d.jsxs("div",{className:kb,children:[d.jsx("span",{className:_b,children:e.name}),u&&d.jsx("span",{className:Sb,children:u})]}),r&&d.jsx("div",{className:LI,children:d.jsx("span",{className:zI,children:d.jsx("button",{type:"button",className:ie($I,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:r,children:d.jsx(Rt.trash,{})})})})]})}const II="relative flex flex-col",BI="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)]",HI="grid flex-shrink-0 place-items-center text-ink-4",qI="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",FI="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",PI="absolute left-0 right-0 top-[calc(100%+4*var(--content))] z-[40] overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",VI="m-0 max-h-[calc(264*var(--content))] list-none overflow-y-auto p-1",GI=ie(vt,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),KI="bg-accent-soft",YI="cursor-default opacity-55",QI="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",XI="truncate text-caption text-ink-3",ep="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",ZI="inline-flex flex-shrink-0 items-center gap-1 text-good",WI=2,JI=300;function xO({propertyId:e,placeholder:t,addedIds:a,disabled:r=!1,disabledHint:s,onSelect:c}){const{apiFetch:u}=Yt().api,[m,p]=x.useState(""),[g,v]=x.useState([]),[b,w]=x.useState("idle"),[_,E]=x.useState(0),[S,j]=x.useState(0),C=x.useRef(0),A=x.useId();x.useEffect(()=>{const B=m.trim();if(B.length<WI){++C.current,w("idle"),v([]);return}const D=++C.current;w("loading");const L=setTimeout(()=>{EI(u,e,B).then(P=>{D===C.current&&(v(P),E(0),w(P.length?"results":"empty"))}).catch(()=>{D===C.current&&w("error")})},JI);return()=>clearTimeout(L)},[m,e,S,u]);function O(B){a.has(B.place_id)||(c(B),p(""),v([]),w("idle"))}function T(B){if(B.key==="Escape"){w("idle"),v([]);return}if(b==="results"){if(B.key==="ArrowDown")B.preventDefault(),E(D=>Math.min(g.length-1,D+1));else if(B.key==="ArrowUp")B.preventDefault(),E(D=>Math.max(0,D-1));else if(B.key==="Enter"){B.preventDefault();const D=g[_];D&&O(D)}}}const R=b!=="idle";return d.jsxs("div",{className:II,onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||w("idle")},children:[d.jsxs("div",{className:ie(BI,r&&"opacity-55"),role:"combobox","aria-expanded":R,"aria-haspopup":"listbox","aria-controls":A,children:[d.jsx("span",{className:HI,children:d.jsx(Rt.search,{})}),d.jsx("input",{className:qI,value:m,placeholder:t,disabled:r,title:r?s:void 0,onChange:B=>p(B.target.value),onKeyDown:T,"aria-label":t,"aria-autocomplete":"list","aria-activedescendant":b==="results"?`${A}-${_}`:void 0}),b==="loading"&&d.jsx("span",{className:FI})]}),R&&d.jsxs("div",{className:PI,children:[b==="loading"&&d.jsx("div",{className:ep,children:"Searching…"}),b==="empty"&&d.jsxs("div",{className:ep,children:["No places found for “",m.trim(),"”."]}),b==="error"&&d.jsxs("div",{className:ep,children:["Couldn't reach search."," ",d.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>j(B=>B+1),children:"Retry"})]}),b==="results"&&d.jsx("ul",{className:VI,role:"listbox",id:A,children:g.map((B,D)=>{const L=a.has(B.place_id),P=[mO(B.distance_m),B.address].filter(Boolean).join(" · ");return d.jsx("li",{id:`${A}-${D}`,role:"option","aria-selected":D===_,children:d.jsxs("button",{type:"button",disabled:L,className:ie(GI,D===_&&!L&&KI,L&&YI),onMouseEnter:()=>E(D),onClick:()=>O(B),children:[d.jsxs("span",{className:QI,children:[L&&d.jsxs("span",{className:ZI,children:[d.jsx(Rt.check,{size:12})," Added ·"]}),d.jsx("span",{className:"truncate",children:B.name})]}),P&&d.jsx("span",{className:XI,children:P})]})},B.place_id)})})]})]})}const eB="flex flex-col gap-2.75",tB="relative flex flex-col gap-1.75",nB=400;function iB({slot:e,fixed:t,value:a,propertyId:r,commit:s}){const{apiFetch:c}=Yt().api,u=x.useMemo(()=>CI(a),[a]),[m,p]=x.useState(null),[g,v]=x.useState(null),[b,w]=x.useState({}),_=x.useRef({});x.useEffect(()=>()=>{Object.values(_.current).forEach(clearTimeout)},[]);const E=nr({items:u,identityOf:D=>D.id,fixed:t,axis:"y",commit:s}),{rows:S}=E,{urls:j,dropUrl:C}=bO(r,u);function A(D){w(L=>({...L,[D]:!0})),clearTimeout(_.current[D]),_.current[D]=setTimeout(()=>w(L=>{const P={...L};return delete P[D],P}),nB)}async function O(D){if(p(null),!!E.canAdd&&!E.latestRows().some(L=>L.value.place_id===D.place_id)){v(D);try{let L;try{L=await hO(c,r,D.place_id)}catch{p("Couldn't add that place. Try again.");return}if(E.latestRows().some(P=>P.value.place_id===L.place_id))return;E.add(L),A(L.id)}finally{v(null)}}}const{containerRef:T,getItemProps:R}=E.drag,B=new Set(S.map(D=>D.value.place_id));return d.jsxs("div",{className:eB,role:"group","aria-label":e.label,children:[d.jsx(xO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:B,disabled:!E.canAdd,disabledHint:"Set by its source",onSelect:D=>void O(D)}),m&&d.jsx("span",{className:pO,children:m}),(S.length>0||g)&&d.jsxs("div",{className:tB,ref:T,children:[g&&d.jsxs("div",{className:ie(xb,gO),"aria-live":"polite",children:[d.jsx("span",{className:wb,children:d.jsx("span",{className:yO})}),d.jsxs("div",{className:kb,children:[d.jsx("span",{className:_b,children:g.name}),d.jsx("span",{className:Sb,children:"Adding…"})]})]}),S.map(D=>d.jsx(vO,{row:D.value,photoUrl:j[D.value.place_id],onPhotoError:()=>C(D.value.place_id),onRemove:E.canRemove?()=>E.remove(D.key):void 0,dragProps:R(D.key),flashNew:b[D.value.id]===!0},D.key))]})]})}const aB={property:"this property's",library:"your"},rB={property:Ja.pages,library:Es.pages};function Fo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Hk(e){return Yg({from:e.from??[]}).filter(t=>t!=="")}function oB(e){var r,s;const t=Cg(Fo(e.source));if(t!==null){const c=(r=Fo(e.source))==null?void 0:r.key;return[t.reading==="registry"&&typeof c=="string"?c:Pr[t.table]]}const a=Fo(e.element);if(a===null)return[];if(a.type==="row"||a.type==="media"||typeof a.type=="string"&&xs(a.type))return Hk(a);for(const c of Object.values(Fo(a.fields)??{})){const u=Fo(c);if(u!==null&&((s=Fo(u.source))==null?void 0:s.kind)==="element")return Hk(u)}return[]}function sB(e){const t=e.indexOf("."),a=e.slice(0,t);if(a!=="property"&&a!=="library")return null;const r=rB[a],s=e.slice(t+1),c=Object.hasOwn(r,s)?r[s]:null;return c!==null&&DR(c)&&c.declaration.type==="list"?{home:a,label:PR(c)}:null}function wO(e){const t=[...new Set(oB(e))],a=t.length===1?sB(t[0]):null;return a===null?null:`From ${aB[a.home]} ${rr(a.label).plural}`}function lB(e,t){var a;return((a=e==null?void 0:e.scalar)==null?void 0:a[t])===!0}function kO(e,t){return`${e}.${t}`}function Ec(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 ld(e,t){const a=Ec(t);if(a===null)return e[t];const r=e[a.object];return r!==null&&typeof r=="object"&&!Array.isArray(r)?r[a.field]:void 0}function cB(e,t,a){const r=Ec(t);if(r===null)return{...e,[t]:a};const s=e[r.object],c=s!==null&&typeof s=="object"&&!Array.isArray(s)?s:{};return{...e,[r.object]:{...c,[r.field]:a}}}function uB(e,t,a,r){var s,c,u;return lB(e,t)||((u=(c=(s=e==null?void 0:e.items)==null?void 0:s[t])==null?void 0:c[a])==null?void 0:u[r])===!0}function dB(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}const _O=e=>{var t;return(t=dB(e))==null?void 0:t.source};function fB(e,t){return Object.entries(e).flatMap(([a,r])=>{const s=pc(_O(r));return s!==null&&s.slot===t?[{key:a,member:s.field}]:[]})}function hB(e,t){var s;const a=pc(_O(e));if(a===null)return!1;const r=t.fields===void 0?{}:{siblings:t.fields};return((s=B_(t.slots??{},r,a.slot))==null?void 0:s.def.type)==="address"}function bs(e){var t;return((t=e.source)==null?void 0:t.kind)==="element"}function SO(e){return e.type==="row"}function EO(e,t,a){const r={};for(const s of fB(Object.fromEntries(e),t))Object.hasOwn(a,s.member)&&(r[s.key]=a[s.member]);return r}function Eb(e,t,a,r){const s=Go(e);for(const[c,u]of e)bs(u)&&(s[c]=a,r&&Object.assign(s,EO(e,c,r)));return s[t]=a,s}function jO(e,t,a){var c;const r=(c=t.find(([,u])=>SO(u)&&bs(u)))==null?void 0:c[0],s=r!==void 0?e[r]:void 0;return typeof s=="string"&&s!==""?s:bb(e,a)}function Rd(e,t,a){return e.flatMap(r=>jO(r,t,a)??[])}function mB(e,t){return e.map(a=>{const r=t.get(a);return r===void 0?{id:a}:{id:a,members:r}})}function OO(e,t,a,r,s,c){return Rs(e,mB(r,s),u=>jO(u,t,a),u=>Eb(t,a,u.id,u.members),c)}function pB(e,t,a,r,s){const c=e.map((m,p)=>({key:String(p),value:m}));return OO(c,t,a,r,s,m=>({key:"",value:m})).map(m=>m.value)}function gB(e){const t=e.split(/\s+/).filter(r=>/[\p{L}\p{N}]/u.test(r));return(t.length>1?[t[0][0],t[t.length-1][0]]:[...(t[0]??"").slice(0,2)]).join("").toUpperCase()}const yB="flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))]",bB={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))]"},AO={bar:"text-[length:calc(15*var(--content))]",cell:"text-[length:calc(12.5*var(--content))]"},vB={bar:"text-[length:calc(13.5*var(--content))]",cell:"text-[length:calc(12*var(--content))]"};function tp({face:e,imageUrl:t,size:a="bar"}){return d.jsxs("span",{className:yB,"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",bB[a]),"data-row-face-thumb":"",children:t?d.jsx("img",{src:t,alt:"",className:"absolute inset-0 size-full object-cover object-top"}):gB(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",AO[a]),children:e.title}),e.supporting!==null&&d.jsx("span",{className:ie("min-w-0 shrink-[2] truncate text-ink-3",vB[a]),children:e.supporting})]})]})}function np({children:e,size:t="bar"}){return d.jsx("span",{className:ie("min-w-0 flex-1 truncate text-ink-4",AO[t]),children:e})}const xB="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",qk={contacts:"Contact",units:"Unit",comparables:"Comparable",commercial_spaces:"Commercial space"};function Jl(e){return typeof e=="string"&&e!==""?e:null}function wB(e){const t=e==null?void 0:e.fieldKey;return e===void 0||t===void 0?[]:(e.siblingRecords??[]).flatMap((a,r)=>{if(r===e.itemIndex)return[];const s=Jl(a[t]);return s===null?[]:[s]})}function kB({slot:e,value:t,onChange:a,onRowPick:r,recordContext:s,...c}){var E;const{TablePicker:u}=Yt(),[m,p]=x.useState(null),g=c.rowTable??mf(e),v=g.kind==="table"&&g.inert!==!0?g.tables:null,b=!bs(e),w=(S,j)=>{S!==t&&(r?r(S,j):a(S))},_=hj(e.label);return d.jsxs("div",{className:Yr,role:"group","aria-label":e.label,children:[d.jsxs("div",{className:xB,children:[d.jsx(jb,{rowTable:g,value:t}),v!==null&&u!==void 0&&d.jsxs("span",{className:kj,children:[t!==null&&!lf(t)&&d.jsx(NO,{label:`Edit ${_}`,onClick:()=>p("record")}),b&&d.jsx(_B,{label:((E=eb(e).choose)==null?void 0:E.label)??Zl("Choose",_),onClick:()=>p("pick")}),b&&t!==null&&d.jsx(sf,{icon:Os,label:`Remove ${_}`,title:"Remove",tone:"remove",onClick:()=>w(null,{})})]})]}),m==="record"&&t!==null&&v!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"record",tables:v,rowId:t,onClose:()=>p(null)}),m==="pick"&&v!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"single",tables:v,selectedId:t,disabledIds:wB(s),onPick:w,onClose:()=>p(null)})]})}function NO({label:e,onClick:t}){return d.jsx(sf,{icon:Sy,label:e,title:"Edit",onClick:t})}function _B({label:e,onClick:t}){return d.jsx(sf,{icon:fj.Choose,label:e,title:"Choose",onClick:t})}function jb({rowTable:e,value:t,size:a="bar"}){const{TableRowSummary:r}=Yt();switch(e.kind){case"table":{if(lf(t))return d.jsx(tp,{face:{title:`New ${qk[e.tables[0]].toLowerCase()}`,supporting:null,image:null},size:a});if(r)return d.jsx("span",{className:"flex min-w-0 flex-1",children:d.jsx(r,{tables:e.tables,rowId:t,size:a})});const s=qk[e.tables[0]];return t===null?d.jsxs(np,{size:a,children:["No ",s.toLowerCase()," chosen"]}):d.jsx(tp,{face:{title:s,supporting:null,image:null},size:a})}case"content":return t===null?d.jsx(np,{size:a,children:"None"}):d.jsx(tp,{face:{title:e.labelOf(t)??"Untitled",supporting:null,image:null},size:a});case"none":return d.jsx(np,{size:a,children:"Set automatically"})}}const SB={model:{defaultValue:null,coerce:Jl,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:kB},applyOptimistic:null};function EB(e){var t,a,r,s;switch(uS(e,sO)){case"media":return((t=e.element)==null?void 0:t.type)==="media"?Km:((a=e.element)==null?void 0:a.type)==="video"?KL:((r=e.element)==null?void 0:r.type)==="tour"?jy:((s=e.element)==null?void 0:s.type)==="document"?Km:Xp;case"upload":return Km;case"poi":return k6;case"annotated-media":return Xp;case"object":case"row":return NL;case"scalar":return rE}}function pf(e){switch(e.type){case"text":return d8;case"url":return _y;case"image":case"media":return Qd;case"video":return Ay;case"tour":return jy;case"poi":return oE;case"address":return v6;case"document":return Yd;case"select":return M6;case"list":return EB(e);default:return by}}function MO(e){const t=new Set(e.map(pf));return t.size===1?[...t][0]:by}const jB="relative flex flex-col gap-2",OB={large:"gap-3",compact:"gap-2"},AB="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",NB={field:"cursor-text",bar:"cursor-grab pr-2"},MB=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 CB(e){const t=e.currentTarget.control;if(!t||e.target===t||e.target.closest("button")||(e.preventDefault(),t.focus(),!(t instanceof HTMLInputElement)))return;const r=e.clientX<t.getBoundingClientRect().left?0:t.value.length;t.setSelectionRange(r,r)}function Ob({engine:e,itemKind:t="field",label:a,add:r,choose:s,size:c,renderControl:u,renderActions:m,onAdd:p,renderAdd:g,addUnbound:v=!1,empty:b}){const{rows:w,drag:_}=e,{containerRef:E,getItemProps:S}=_,j=g==null?void 0:g(e.add),C=w.length===0&&b!==void 0&&j==null;return d.jsx("div",{className:Yr,role:"group","aria-label":a,children:d.jsxs("div",{className:ie("flex flex-col",OB[c]),children:[e.canAdd&&d.jsx(bc,{size:c,add:r,onAdd:v?null:()=>p(e.add),choose:s}),C&&b,j,w.length>0&&d.jsx("div",{className:jB,ref:E,children:w.map(A=>d.jsxs("label",{htmlFor:A.key,onClick:CB,...S(A.key),className:ie(AB,NB[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(Rt.grip,{})}),u({id:A.key,value:A.value,onChange:O=>e.setValue(A.key,O)}),t==="bar"&&d.jsxs("span",{className:kj,children:[m==null?void 0:m({id:A.key,value:A.value}),e.canRemove&&d.jsx(sf,{icon:Os,label:`Remove ${rr(a).singular}`,title:"Remove",tone:"remove",onClick:()=>e.remove(A.key)})]}),e.canRemove&&t==="field"&&d.jsx("button",{type:"button",className:MB,title:"Remove",onClick:()=>e.remove(A.key),children:d.jsx(Rt.trash,{})})]},A.key))})]})})}function RB({engine:e,label:t,add:a,placeholder:r="List item",maxLength:s,size:c}){return d.jsx(Ob,{engine:e,label:t,add:a,size:c,renderControl:({id:u,value:m,onChange:p})=>d.jsx(C8,{id:u,value:m,onChange:p,placeholder:r,ariaLabel:r,maxLength:s,className:ie("cursor-[inherit]",dE)}),onAdd:u=>u("")})}const TB="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",DB="relative h-[calc(280*var(--frame))]",LB=5,zB=ie("flex items-center gap-2 rounded-[calc(8*var(--content))] px-2.75 py-[calc(7*var(--content))] pr-2",Cy),$B=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",jn),Fk=["w-[28%]","w-[22%]","w-[34%]"];function UB({position:e}){return d.jsxs("div",{className:zB,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",jn)})}),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))]",jn)}),d.jsx("span",{className:ie("block h-[calc(10*var(--content))] rounded-full",jn,Fk[e%Fk.length])}),d.jsx("span",{className:ie("block h-[calc(8*var(--content))] w-[16%] rounded-full",jn)})]}),[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:$B})},t))]})}function IB(e){return Jl(typeof e=="object"&&e!==null?e.id:e)}function BB({slot:e,face:t,rowTable:a,verbs:r,fixed:s,value:c,commit:u}){const{TablePicker:m,TableCreate:p}=Yt(),g=nr({items:c.map(IB),fixed:s,axis:"y",commit:u}),[v,b]=x.useState(!1),[w,_]=x.useState(!1),[E,S]=x.useState(null),j=a.kind==="table"&&a.inert!==!0?a.tables:null,C=j!==null?m:void 0,A=j!==null?p:void 0,O=rr(e.label).singular,T=()=>b(!0),R=C!==void 0&&r.choose!==null?{choose:r.choose,onChoose:T}:void 0,B=r.add,D=()=>_(!0),L=A!==void 0,P=g.rows.flatMap(ee=>ee.value!==null?[ee.value]:[]),le=t==="expanded"&&g.rows.length===0?wO(e):null;return d.jsxs(d.Fragment,{children:[d.jsx(Ob,{engine:g,itemKind:"bar",label:e.label,add:B,...R!==void 0?{choose:R}:{},size:t==="expanded"?"large":"compact",addUnbound:!L,onAdd:D,...t==="expanded"?{empty:d.jsxs("div",{className:DB,children:[d.jsx(yc,{className:"flex flex-col gap-2",children:Array.from({length:LB},(ee,de)=>d.jsx(UB,{position:de},de))}),d.jsx(_d,{icon:Ba.createElement(pf(e),{size:25,strokeWidth:1.8}),headline:B.empty,...le!==null?{line:le}:{}})]})}:{},renderControl:({id:ee,value:de})=>d.jsx("div",{id:ee,className:TB,children:d.jsx(jb,{rowTable:a,value:de})}),renderActions:({value:ee})=>C!==void 0&&ee!==null&&d.jsx(NO,{label:`Edit ${O}`,onClick:()=>S(ee)})}),E!==null&&C!==void 0&&j!==null&&d.jsx(C,{open:!0,mode:"record",tables:j,rowId:E,onClose:()=>S(null)}),w&&A!==void 0&&j!==null&&d.jsx(A,{tables:j,onCreated:ee=>{_(!1),g.rows.some(de=>de.value===ee)||g.add(ee)},onClose:()=>_(!1)}),v&&C!==void 0&&j!==null&&d.jsx(C,{open:!0,mode:"multi",tables:j,selectedIds:P,onChange:ee=>g.replace(Rs(g.rows,ee.map(de=>({id:de})),de=>de,de=>de.id,g.mint)),onClose:()=>b(!1)})]})}const HB=12;function qB(e,t,a,r){if(e.top>=r&&e.bottom<=t-r)return null;const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function FB({icon:e,title:t,subtitle:a,showGrip:r=!1,open:s}){return d.jsxs(d.Fragment,{children:[r?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(ci,{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}),a?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:a})]}):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(PB,{open:s})]})}function PB({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(ci,{name:"chevDown",size:14,stroke:1.8})})}const Cl=new WeakSet;function CO({open:e,onToggle:t,icon:a,title:r,subtitle:s,scrollKey:c,dragId:u,dragHandleProps:m,children:p}){const g=x.useRef(null);return x.useEffect(()=>{if(!e)return;const v=g.current,b=v==null?void 0:v.closest(".hp-sb-scroll");if(!v||!b||Array.from(v.querySelectorAll(".we-acc")).some(C=>Cl.has(C)))return;Cl.add(v);const w=window.matchMedia("(prefers-reduced-motion: reduce)").matches,_=()=>{Cl.delete(v);const C=v.getBoundingClientRect(),A=b.getBoundingClientRect(),O=qB({top:C.top-A.top,bottom:C.bottom-A.top,height:C.height},b.clientHeight,b.scrollTop,HB);O!=null&&b.scrollTo({top:O,behavior:w?"auto":"smooth"})};if(w){const C=requestAnimationFrame(_);return()=>{cancelAnimationFrame(C),Cl.delete(v)}}const E=new AbortController,S=()=>{E.abort(),window.clearTimeout(j),_()};v.addEventListener("transitionend",C=>{C.propertyName==="grid-template-rows"&&C.target instanceof Node&&C.target.parentNode===v&&S()},{signal:E.signal});const j=window.setTimeout(S,280);return()=>{E.abort(),window.clearTimeout(j),Cl.delete(v)}},[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(FB,{icon:a,title:r,subtitle:s,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 Pk(e){return lS(e)}function VB(e){const t=[];for(let a=0;a<e.length;a++){const r=e[a+1];Pk(e[a])&&r!==void 0&&Pk(r)?(t.push({kind:"pair",indices:[a,a+1]}),a++):t.push({kind:"single",index:a})}return t}function GB({items:e,rows:t}){const a=r=>r&&d.jsxs("div",{className:`${Yr} min-w-0`,...r.attrs,children:[r.label!==null?d.jsx(M8,{children:r.label}):null,r.node]},r.key);return d.jsx("div",{className:_8,children:t.map(r=>r.kind==="pair"?d.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a(e[r.indices[0]]),a(e[r.indices[1]])]},`p${r.indices[0]}`):d.jsx("div",{children:a(e[r.index])},`s${r.index}`))})}const KB='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Td="data-field-name",Ab="data-field-scope";function YB(e,t){var r;const a=(r=e.parentElement)==null?void 0:r.closest(`[${Ab}]`);return a==null||a===t||!t.contains(a)}function RO(e,t){var r;const a=Array.from(e.querySelectorAll(`[${Td}]`)).find(s=>s.getAttribute(Td)===t&&YB(s,e));a&&(a.scrollIntoView({block:"nearest"}),(r=a.querySelector(KB))==null||r.focus({preventScroll:!0}))}function QB(e){const t={fields:Object.fromEntries(e)};return e.filter(([,a])=>Ld(a,t)&&!y5(a))}const XB="data-object-fields";function Nb({fields:e,lone:t=!1,reveal:a,renderField:r}){const s=qy(),c=QB(e),u=x.useRef(null);return x.useEffect(()=>{if(!a)return;const m=requestAnimationFrame(()=>{u.current&&RO(u.current,a)});return()=>cancelAnimationFrame(m)},[a]),d.jsx("div",{ref:u,[XB]:s,[Ab]:"",children:d.jsx(GB,{rows:VB(c.map(([,m])=>m)),items:c.map(([m,p])=>({key:m,label:t?null:p.label||m,attrs:{[Td]:m},node:r(m,p)}))})})}function jc({slot:e,instanceId:t,slotId:a,value:r,propertyId:s,onChange:c,required:u,overridden:m,selectedItemIndex:p,selectedFieldName:g,itemBaseline:v,boundRowId:b,boundRowTable:w,membership:_,rowTable:E,onRowPick:S,onUpload:j,recordContext:C,factPath:A}){const O=qy(),T=$8(e.type==="list"?void 0:A),R=Ls(e.type);if(!R)return null;const B=C$(O),D=R.faces[B];if(!D)return null;const L=R.model.coerce(r),P=d.jsx(D,{slot:e,instanceId:t,slotId:a,value:L,onChange:c,required:u,propertyId:s,selectedItemIndex:p,selectedFieldName:g,overridden:m,itemBaseline:v,boundRowId:b,boundRowTable:w,membership:_,rowTable:E,onRowPick:S,onUpload:j,recordContext:C,factPath:A});return T===null?P:d.jsxs("div",{className:"flex flex-col gap-[calc(6*var(--content))]",children:[P,d.jsx(U8,{mark:T})]})}const ZB=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"),WB="relative flex flex-col gap-3";function JB(e,t){return bs(e)?t:mf(e)}function eH({slot:e,entries:t,fixed:a,instanceId:r,slotId:s,value:c,commit:u,membership:m,verbs:p,selectedItemIndex:g,selectedFieldName:v,itemBaseline:b,rowTable:w,insideRecord:_=!1,factPath:E}){var ii;const{TablePicker:S,TableCreate:j}=Yt(),C=MO(t.map(([,we])=>we)),A=Fa(we=>we.session.property_id),O=Fa(we=>we.select),T=Fa(we=>{var Te,Ce;return(Ce=(Te=we.content_doc)==null?void 0:Te.instances.find(Xe=>Xe.instance_id===r))==null?void 0:Ce.slot_overrides}),R=m.kind==="table"?m.table:null,B=fO({instanceId:r,slotId:s,membership:m,itemBaseline:b,insideRecord:_}),{identityKey:D}=B,L=Ya(e)??{fields:Object.fromEntries(t)},P=Wy(rr(e.label).singular),{add:le}=p,ee=(we,Te)=>ff(ys(L,`${P} ${Te+1}`),L,we),de=ys(L,""),K=de.kind==="field"?de.field:void 0,[Q,se]=x.useState(!1),[N,V]=x.useState(!1),[te,me]=x.useState(null);function Y(we){O({kind:"slot",instance_id:r,slot_id:s,item_index:we})}const M=x.useRef(null),H=nr({items:c,identityOf:B.identityOf,fixed:a,axis:"y",commit:(we,Te)=>u(B.stamp(we),Te),onCommitted:(we,Te)=>{const Ce=M.current;if(_||Te!=="reorder"&&Te!=="replace"||Ce==null)return;const Xe=we.findIndex(at=>at.key===Ce);Xe<0?O({kind:"slot",instance_id:r,slot_id:s}):(Te==="reorder"||Xe!==H.indexOf(Ce))&&Y(Xe)}}),{rows:I}=H,F=_?te:g!=null?H.keyAt(g):null,W=F!=null?H.indexOf(F):-1;x.useEffect(()=>{M.current=F},[F]);function pe(we){if(_){me(we);return}const Te=H.indexOf(we);Te<0||Y(Te)}function oe(){_?me(null):O({kind:"slot",instance_id:r,slot_id:s})}function ke(we){F===we?oe():pe(we)}const z=m.kind==="pick-row"||m.kind==="table"?yb(m):null,ce=H.canAdd&&(m.kind!=="pick-row"||j!==void 0),ye=p.choose!==null&&H.canAdd&&(z!==null&&S!==void 0||m.kind==="pick-media"),Se=(ii=t.find(([,we])=>bs(we)))==null?void 0:ii[0];function Le(we){const Te=H.mint(we);H.insert(Te),_?me(Te.key):Y(0)}function Ie(){ye&&se(!0)}function ge(){if(ce){if(m.kind==="pick-row"){V(!0);return}if(m.kind==="pick-media"){se(!0);return}Le(R?{...Go(t),[D]:Sj()}:Go(t))}}function Re(we,Te){H.replace(OO(I,t,D,we,Te,H.mint))}function ht(we,Te){const Ce=Go(t);for(const[Xe,at]of t)bs(at)&&(Ce[Xe]=at.type==="image"?Zy(we,{asset_id:"",url:"",alt:""},Te,hS(at.crop),m.kind==="pick-media"?m.filter.from:void 0):{asset_id:we.id,url:ms(we),alt:""});return Ce}function $e(we){var Ce;const Te=Se===void 0||(Ce=we[Se])==null?void 0:Ce.asset_id;return typeof Te=="string"&&Te!==""?Te:null}function Lt(we,Te){const Ce=Rs(I,we,$e,at=>ht(at,Te),H.mint),Xe=new Set(Ce.map(at=>at.key));for(const at of I)Xe.has(at.key)||B.markRemoved(at);H.replace(Ce)}function lt(we){if(!H.canRemove)return;const Te=I.find(Xe=>Xe.key===we);Te&&B.markRemoved(Te);const Ce=H.indexOf(we);H.remove(we),F===we?oe():!_&&W>=0&&Ce>=0&&Ce<W&&Y(W-1)}function Fn(we,Te,Ce={}){const Xe=I.find(at=>at.key===we);Xe!=null&&(B.markFields(Xe,Te),H.setValue(we,{...Xe.value,...Ce,...Te}))}function An(we,Te,Ce,Xe){const at=I.find(ne=>ne.key===we);if(at==null)return;const Qt=B.markerIdentity(at),ut=Ce===null?{}:EO(t,Te,Xe);if(Qt!==null)for(const ne of Object.keys(ut))uB(T,s,Qt,ne)&&delete ut[ne];Fn(we,{[Te]:Ce},ut)}const{containerRef:un,getItemProps:yt,draggingKey:ia}=H.drag,di=ye&&p.choose!==null?{choose:p.choose,onChoose:Ie}:void 0;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(bc,{size:"compact",add:le,onAdd:ce?ge:null,choose:di}),I.length>0&&d.jsx("div",{ref:un,className:WB,children:I.map((we,Te)=>{const Ce=ee(we.value,Te),Xe=F===we.key;return d.jsx("div",{children:d.jsx(CO,{open:ia==null&&Xe,onToggle:()=>ke(we.key),icon:d.jsx(C,{size:14}),title:Ce,scrollKey:we.key,dragId:we.key,dragHandleProps:{onPointerDown:yt(we.key).onPointerDown},children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Nb,{fields:t,reveal:!_&&Xe?v:void 0,renderField:(at,Qt)=>d.jsx(jc,{slot:Qt,instanceId:r,slotId:s,value:we.value[at],propertyId:A,onChange:ut=>Fn(we.key,{[at]:ut}),...mE(Qt.type)?{factPath:Xl(Ql(E,we.value),at)}:{},...SO(Qt)?{rowTable:JB(Qt,w),onRowPick:(ut,ne)=>An(we.key,at,ut,ne)}:{},recordContext:{...R?{itemId:bb(we.value,D)??void 0}:{},itemIndex:Te,siblingRecords:I.map(ut=>ut.value),fieldKey:at,table:R,...K?{titleKey:K}:{},membership:m}})}),Xe&&H.canRemove&&d.jsxs("button",{type:"button",className:ie(ZB,"max-w-full"),onClick:()=>lt(we.key),children:[d.jsx("span",{className:"inline-flex shrink-0",children:d.jsx(Rt.trash,{size:13})}),d.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",Ce]})]})]})})},we.key)})}),N&&z!==null&&j!==void 0&&d.jsx(j,{tables:z,onCreated:(we,Te)=>{V(!1),Rd(I.map(Ce=>Ce.value),t,D).includes(we)||Le(Eb(t,D,we,Te))},onClose:()=>V(!1)}),Q&&z!==null&&S&&d.jsx(S,{open:!0,mode:"multi",tables:z,selectedIds:Rd(I.map(we=>we.value),t,D),onChange:Re,onClose:()=>se(!1)}),Q&&m.kind==="pick-media"&&d.jsx(lb,{propertyId:A,children:we=>d.jsx(_c,{mode:"multi",propertyId:A,filter:m.filter,selectedIds:I.flatMap(Te=>$e(Te.value)??[]),onChange:Te=>Lt(Te,we),onClose:()=>se(!1)})})]})}const ip={listing_intent:e=>[{value:"for_sale",label:"For Sale"},{value:"for_rent",label:"For Rent"}]};function tH(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 TO(e,t){var r,s;if(e.values)return e.values.map(tH);const a=(r=e.options)==null?void 0:r.source;return a!==void 0&&a!==""?((s=ip[a])==null?void 0:s.call(ip,t))??[]:[]}function Il(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}const nH=["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"],iH=new Set(nH);function DO(e){return typeof e=="string"&&iH.has(e)}const aH="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)]",LO=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"),rH=ie(LO,"text-accent"),oH=4,Vk=160,Gk=240,sH=ie(vt,dE,"min-w-0 flex-1 cursor-text bg-transparent text-left text-ink outline-none placeholder:text-ink-4");function Kk({open:e,className:t,onMouseDown:a}){return d.jsx("span",{className:ie("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",e&&"rotate-180",t),onMouseDown:a,"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 lH(){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 cH({option:e}){const t=DO(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(ci,{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 uH(e,t){const a=t.toLowerCase().trim();return a?e.filter(r=>r.label.toLowerCase().includes(a)):e}function dH(e,t){const a=Il(t);if(a.length!==0)return e.find(r=>Il(r.value)===a||Il(r.label)===a)}function sg({label:e,value:t,options:a,onChange:r,placeholder:s,bare:c=!1,autoOpen:u=!1,onDismiss:m,id:p,creatable:g=!1,canCreate:v,attention:b=null}){const w=ar(),[_,E]=x.useState(u),[S,j]=x.useState(0),[C,A]=x.useState(null),[O,T]=x.useState(""),R=x.useId(),B=x.useRef(null),D=x.useRef(null),L=x.useRef(null),P=a.findIndex(z=>z.value===t),le=P>=0?a[P]:void 0,ee=uH(a,_?O:""),de=O.trim(),K=_?dH(a,O):void 0,Q=K&&!ee.some(z=>z.value===K.value)?[...ee,K]:ee,se=g&&de.length>0&&!K&&((v==null?void 0:v(de))??!0),N=Q.length+(se?1:0);function V(){L.current&&A(cs(L.current)),j(Math.max(0,P)),E(!0)}const te=x.useCallback(()=>{E(!1),T(""),m==null||m()},[m]);function me(z){var ce;z.value!==t&&r(z.value),E(!1),T(""),(ce=D.current)==null||ce.focus()}function Y(z){var ce;r(z),E(!1),T(""),(ce=D.current)==null||ce.focus()}function M(z){var ce;if(!_){(z.key==="ArrowDown"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),V());return}if(z.key==="Escape")z.preventDefault(),(ce=D.current)==null||ce.focus(),te();else if(z.key==="ArrowDown")z.preventDefault(),j(ye=>Math.min(N-1,ye+1));else if(z.key==="ArrowUp")z.preventDefault(),j(ye=>Math.max(0,ye-1));else if(z.key==="Enter")if(z.preventDefault(),S<Q.length){const ye=Q[S];ye&&me(ye)}else se&&Y(de)}const H=x.useCallback(z=>{var Se,Le;const ce=(Se=B.current)==null?void 0:Se.contains(z),ye=(Le=document.getElementById(R))==null?void 0:Le.contains(z);return!ce&&!ye},[R]);function I(z){_&&H(z.relatedTarget)&&te()}x.useEffect(()=>{var z;u&&((z=D.current)==null||z.focus())},[u]),x.useEffect(()=>{if(!_)return;const z=()=>{L.current&&A(cs(L.current))};return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[_]),x.useEffect(()=>{if(!_)return;const z=ce=>{H(ce.target)&&te()};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[_,H,te]);const F=z=>{z.preventDefault(),_||V()},W=d.jsx("input",{ref:D,id:p,className:c?sH:ie(w.inner,"cursor-text"),value:_?O:(le==null?void 0:le.label)??t,placeholder:s??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":R,"aria-label":e,onFocus:V,onClick:()=>{_||V()},onChange:z=>{T(z.target.value),_||V(),j(0)},onKeyDown:M}),pe=c?d.jsxs(d.Fragment,{children:[W,d.jsx(Kk,{open:_,className:"pl-2",onMouseDown:F})]}):d.jsxs(d.Fragment,{children:[W,d.jsx(Kk,{open:_,className:"pl-1 pr-2.75",onMouseDown:F})]}),oe=_&&C?cc(C,{maxHeight:Gk*2,minWidth:Vk,gap:oH}):null,ke=_&&oe&&N>0?tr.createPortal(d.jsxs("div",{className:aH,id:R,role:"listbox",style:{left:oe.left,top:oe.top,bottom:oe.bottom,minWidth:Math.max(oe.width,Vk),maxHeight:`min(${oe.maxHeight}px, calc(${Gk}*var(--content)))`,zIndex:Qr},children:[Q.map((z,ce)=>d.jsxs("button",{type:"button",role:"option","aria-selected":z.value===t,"data-active":ce===S,className:LO,onMouseEnter:()=>j(ce),onMouseDown:ye=>ye.preventDefault(),onClick:()=>me(z),children:[d.jsx(cH,{option:z}),z.value===t&&d.jsx(lH,{})]},z.value)),se&&d.jsx("button",{type:"button",role:"option","aria-selected":S===Q.length,"data-active":S===Q.length,className:rH,onMouseEnter:()=>j(Q.length),onMouseDown:z=>z.preventDefault(),onClick:()=>Y(de),children:d.jsxs("span",{className:"truncate",children:["Create “",de,"”"]})})]}),document.body):null;return c?d.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:z=>{B.current=z,L.current=z},onBlurCapture:I,children:[pe,ke]}):d.jsxs("div",{className:w.frame,ref:B,onBlurCapture:I,children:[d.jsx(Zr,{attention:b,className:_?"border-accent":void 0,ref:L,children:pe}),ke]})}function fH({engine:e,label:t,add:a,options:r,unique:s=!1,creatable:c=!1,size:u}){const[m,p]=x.useState(!1),g=e.rows.map(E=>E.value),v=E=>s?r.filter(S=>S.value===E||!g.includes(S.value)):r,b=v(null),w=E=>!s||!g.some(S=>Il(S)===Il(E)),_=b.length>0?b:r;return d.jsx(Ob,{engine:e,label:t,add:a,size:u,renderControl:({id:E,value:S,onChange:j})=>d.jsx(sg,{bare:!0,id:E,label:t,value:S,options:v(S),onChange:j,creatable:c,canCreate:w}),onAdd:()=>p(!0),renderAdd:E=>m?d.jsx(sg,{bare:!0,autoOpen:!0,label:a.label,value:"",placeholder:"Choose one",options:_,onDismiss:()=>p(!1),onChange:S=>{p(!1),w(S)&&E(S)},creatable:c,canCreate:w}):null})}function hH({slot:e,itemSlot:t,add:a,fixed:r,value:s,commit:c,size:u}){const m=Fa(g=>g.session.listing_intent),p=nr({items:s,fixed:r,axis:"y",commit:c});return t.type==="select"?d.jsx(fH,{engine:p,label:e.label,add:a,options:TO(t,{listingIntent:m}),creatable:t.creatable===!0,unique:e.unique===!0,size:u}):d.jsx(RB,{engine:p,label:e.label,add:a,maxLength:t.cap,size:u})}const Yk="grid size-[calc(18*var(--content))] shrink-0 place-items-center border-[1.5px] bg-canvas transition-[border-color,background-color] duration-[120ms]";function mH({control:e,state:t,label:a,onToggle:r}){return d.jsx("button",{type:"button",role:e,"aria-checked":t.checked,"aria-label":a,disabled:t.disabled,className:ie(vt,"flex w-full items-center justify-center",t.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:s=>{s.stopPropagation(),r()},children:e==="radio"?d.jsx("span",{"aria-hidden":"true",className:ie(Yk,"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(Yk,"rounded-[calc(5*var(--content))]",t.checked?"border-ink bg-ink text-canvas":"border-ink-4 text-transparent"),children:d.jsx(Kd,{className:"size-[calc(11*var(--content))]",strokeWidth:3})})})}function pH(e){return e.derived!==void 0}const gH=new Set(["image","video","tour","document","media"]);function yH(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 bH(e){const t=yH(e),a=gH.has(e.type),r=`calc(${t}*var(--content))`;return{track:a?r:`minmax(${r},${t/100}fr)`,minPx:t}}function vH(e){const t=Object.entries(e.fields);return{used:new Set(t.map(([a])=>a)),required:new Set(t.filter(([,a])=>a.required===!0).map(([a])=>a))}}function zO(e){return e.reduce((t,a)=>t+a.minPx,0)}function xH(e,t,a=Number.POSITIVE_INFINITY){const r=Ya(e);if(r===null)return[];const s=ys(r,""),c=s.kind==="field"?s.field:null,u=[];for(const[v,b]of Ds(r)){if(pH(b)||b.locked===!0||!t.used.has(v))continue;const w=v===c,_=t.required.has(v),E={key:v,slot:b,header:b.label||v,required:_,title:w,...bH(b)};u.push({column:E,pinned:w||_})}let m=a-zO(u.filter(v=>v.pinned).map(v=>v.column)),p=!1;const g=[];for(const{column:v,pinned:b}of u)b?g.push(v):!p&&v.minPx<=m?(m-=v.minPx,g.push(v)):p=!0;return g}function $O(e){if(e===null||typeof e!="object")return null;const t=Ji(e);if(t===null||t==="")return null;if(Hd(e)||ws(e))return{asset_id:t};const{kind:a,...r}=e;return{...r,asset_id:t,...typeof a=="string"&&gn(a)?{kind:a}:{}}}function Mb(){return{image:qj.model,video:Kj.model,tour:Pj.model,document:aO.model}}const wH=g9({model:{defaultValue:null,coerce:$O,isEmpty:e=>e===null||e.asset_id==="",isInvalid:()=>!1},models:Mb}),kH=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",Ns),_H="inline-flex size-[calc(16*var(--content))] shrink-0 items-center justify-center opacity-80",SH="min-w-0 truncate";function gf({slot:e,reading:t,readingText:a,attention:r,scope:s,onOpen:c}){const u=Ts(),m=t===null,p=m?rf(e,s):null,g=p!==null?pj(p):null,v=g!==null?g.label:a!==void 0?`${e.label}: ${a}`:`Open ${e.label}`;return d.jsxs("button",{type:"button",className:kH,"data-summary-pill":e.type,"data-empty":m?"":void 0,...Ms(r,u),"aria-label":v,disabled:c===void 0,onClick:c,children:[d.jsx("span",{className:_H,children:Ba.createElement(g!==null?g.icon:pf(e),{size:14})}),d.jsx("span",{className:SH,children:m?e.label:t})]})}function yf({slot:e,value:t,required:a}){const r=Ls(e.type);return r===null?null:ir(r.model,e,r.model.coerce(t),a??!1)}function EH(e){var a;const t=Array.isArray(e.value)?e.value.length:0;return d.jsx(gf,{slot:e.slot,reading:t===0?null:`${t} ${e.slot.label}`,readingText:String(t),attention:yf(e),scope:{table:((a=e.recordContext)==null?void 0:a.table)??null},onOpen:e.onOpen})}function jH(e){const t=Wj.coerce(e.value),a=x_((t==null?void 0:t.street)??null,(t==null?void 0:t.unit)??null),r=[t==null?void 0:t.city,t==null?void 0:t.state,(t==null?void 0:t.postal)==null?null:Lg(t.postal)].filter(Boolean).join(", "),s=a!==""?a:r!==""?r:null;return d.jsx(gf,{slot:e.slot,reading:s,readingText:s??void 0,attention:yf(e)??(Zj(t)?"required":null),onOpen:e.onOpen})}function OH(e){const t=vb(e.value);return d.jsx(gf,{slot:e.slot,reading:(t==null?void 0:t.name)??null,readingText:t==null?void 0:t.name,attention:yf(e),onOpen:e.onOpen})}function AH(e){const t=Jl(e.value);return d.jsx(gf,{slot:e.slot,reading:t===null?null:d.jsx(jb,{rowTable:mf(e.slot),value:t,size:"cell"}),attention:yf(e),onOpen:e.onOpen})}function Wu(e){const t=e.slot.type,a=Ls(t).model;return d.jsx(Lj,{kind:t,model:a,onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:a.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}function NH(e){const t=Ls("media").model;return d.jsx(m9,{models:Mb(),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 MH={list:EH,image:Wu,video:Wu,tour:Wu,document:Wu,media:NH,address:jH,poi:OH,row:AH};function CH(e){const a=MH[e.slot.type];return a?d.jsx(a,{...e}):null}const Cb=24,UO=36,RH=36,TH=8,ap=e=>`calc(${e}*var(--content))`,IO=ie(F$,"flex flex-col gap-3"),BO="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[calc(12*var(--content))] border border-line bg-canvas",DH="-mb-px min-h-0 flex-1 overflow-auto",LH="transition-[background-color,opacity] duration-100 hover:bg-[#fbfaf6] focus-within:bg-[#faf8f1]",Rb="h-[calc(44*var(--content))]",Sr="flex min-w-0 items-stretch p-[calc(4*var(--content))]",zH=ie(of,ob),$H="[data-table-cell] > *, input, textarea, select, button, a, [contenteditable], [role='button'], [role='checkbox'], [role='radio'], [tabindex]:not([tabindex='-1'])",Tb="[:where(&)_:where([data-table-cell]>*,input,textarea,select,button,a,[contenteditable],[role=button],[role=checkbox],[role=radio],[tabindex]:not([tabindex='-1']))]:cursor-auto",UH=ie("cursor-grab",Tb),IH=ie("cursor-pointer",Tb),Qk=e=>e.closest($H)!==null,HO=11,Dd=["w-3/5","w-2/5","w-1/2","w-[70%]"],qO=ie("block h-[calc(9*var(--content))] rounded-full",jn),BH=ie("block h-[calc(22*var(--content))] w-[calc(76*var(--content))] rounded-full",jn),HH=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",jn);function FO(e){return TH+RH*(e?2:1)}function PO(e,t){return Cb+(e?UO:0)+FO(t)}function qH(e,t,a){const r=FO(a),s=[ap(Cb),...t?[ap(UO)]:[],...e.map(u=>u.track),ap(r)],c=PO(t,a)+zO(e);return{style:{gridTemplateColumns:s.join(" "),minWidth:c},selection:t,actionsPx:r}}function FH({columns:e,layout:t,position:a,marks:r}){return d.jsxs("div",{className:ie("grid items-center border-b border-line-soft",Rb),style:t.style,children:[d.jsx("span",{}),t.selection&&d.jsx("span",{}),e.map((s,c)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:Xg(s.slot.type)?ie(qO,Dd[(a+c)%Dd.length]):BH})},s.key)),d.jsx("span",{className:"flex justify-end pr-[calc(4*var(--content))]",children:Array.from({length:r},(s,c)=>d.jsx("span",{className:"grid w-[calc(36*var(--content))] place-items-center",children:d.jsx("span",{className:HH})},c))})]})}const PH=3,VH=ie("grid items-center border-b border-line-soft","grid-cols-[calc(24*var(--content))_repeat(3,minmax(0,1fr))_calc(44*var(--content))]",Rb);function GH(){return d.jsx("div",{className:IO,"data-table-pending":"",children:d.jsx("div",{className:BO,children:d.jsx("div",{className:"relative min-h-0 flex-1",children:d.jsx(yc,{children:Array.from({length:HO},(e,t)=>d.jsxs("div",{className:VH,children:[d.jsx("span",{}),Array.from({length:PH},(a,r)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:ie(qO,Dd[(t+r)%Dd.length])})},r)),d.jsx("span",{})]},t))})})})})}function KH(){const e=x.useRef(null),t=x.useRef(null),[a,r]=x.useState(Number.POSITIVE_INFINITY);return x.useLayoutEffect(()=>{const s=e.current;if(s===null||typeof ResizeObserver>"u")return;const c=()=>{var g;const m=((g=t.current)==null?void 0:g.getBoundingClientRect().width)??0,p=s.clientWidth;m<=0||p<=0||r(p/(m/Cb))};c();const u=new ResizeObserver(c);return u.observe(s),()=>u.disconnect()},[]),{box:e,grip:t,widthPx:a}}const Xk=new Set;function YH(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function rp(e,t,a){return e.rowId?e.rowId(t,a):YH(t,e.idKey)}function QH(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}const XH="input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";function VO(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 ZH(e,t){if(!VO(e))return!0;let a,r;try{a=e.selectionStart,r=e.selectionEnd}catch{return!0}return a===null||r===null?!0:t==="start"?a===0&&r===0:a===e.value.length&&r===e.value.length}function WH(e){const{fields:t}=e;return t===null?d.jsx(GH,{}):d.jsx(JH,{...e,fields:t})}function JH({declaration:e,value:t,onChange:a,propertyId:r,instanceId:s="",slotId:c="",selection:u,onOpenRecord:m,onAdd:p,newRowStamp:g,fixed:v=!1,orderable:b=!0,add:w=eb(e).add,choose:_,factPath:E,fields:S}){const j=e,{itemContent:C}=lO(j,"expanded"),A=C.kind==="record"?C.entries:[],{box:O,grip:T,widthPx:R}=KH(),B=xH(j,S,R-PO(u!==void 0,m!==void 0)),D=Ya(j),L=D?ys(D,""):null,P=(L==null?void 0:L.kind)==="field"?L.field:void 0,le=qH(B,u!==void 0,m!==void 0),ee=Array.isArray(t)?t.map(QH):[],de=nr({items:ee,fixed:v,axis:"y",commit:(z,ce)=>a(z.map(ye=>ye.value),ce)}),{drag:K}=de,Q=de.rows,se=p!==null&&de.canAdd,N=Q.map(z=>({key:z.key,index:de.indexOf(z.key),value:z.value})),V=N.length===0,te=V?wO(j):null,me=x.useRef(null);x.useLayoutEffect(()=>{const z=me.current;z&&(me.current=null,Y(z.row,z.col))});function Y(z,ce){var Le;const ye=K.containerRef.current,Se=ye==null?void 0:ye.querySelector(`[data-table-cell][data-row="${z}"][data-col="${ce}"]`);(Le=Se==null?void 0:Se.querySelector(XH))==null||Le.focus()}function M(z,ce="top"){if(p){p();return}const ye=ce==="top"?0:de.rows.length;me.current={row:ye,col:z},de.add({...Go(A),...g==null?void 0:g()},ye)}function H(z,ce,ye){de.updateValue(z,Se=>({...Se,[ce]:ye}))}function I(z){if(z.defaultPrevented||z.altKey||z.ctrlKey||z.metaKey||z.nativeEvent.isComposing)return;const ce=z.target,ye=ce.closest("[data-table-cell]");if(!ye)return;const Se=Number(ye.dataset.row),Le=Number(ye.dataset.col),Ie=N.length-1;switch(z.key){case"Enter":{if(z.shiftKey||!VO(ce))return;z.preventDefault(),Se<Ie?Y(Se+1,Le):se&&M(Le,"below");return}case"ArrowDown":case"ArrowUp":{if(Zk(ce))return;const ge=z.key==="ArrowDown"?Se+1:Se-1;if(ge<0||ge>Ie)return;z.preventDefault(),Y(ge,Le);return}case"ArrowLeft":case"ArrowRight":{if(Zk(ce))return;const ge=z.key==="ArrowLeft",Re=ge?Le-1:Le+1;if(Re<0||Re>=B.length||!ZH(ce,ge?"start":"end"))return;z.preventDefault(),Y(Se,Re);return}}}function F(z){const ce=`${Wy(rr(e.label).singular)} ${z.index+1}`;if(!D||(L==null?void 0:L.kind)!=="field")return ce;const ye=ff(L,D,z.value);return ye==="Untitled"?ce:ye}const W=u?u.control:null;function pe(z){if(!u)return null;const ce=rp(u,z.value,z.index);return ce===null?{checked:!1,disabled:!0}:ib(u.ids,ce,u.held??Xk)}function oe(z){const ce=u?rp(u,z.value,z.index):null;if(!u||ce===null)return;const ye=yj(u.ids,ce,u.control,u.held??Xk);ye!==u.ids&&u.onChange(ye)}function ke(z,ce){var ht;const ye=pe(z),Se=K.getItemProps(z.key),Le=F(z),Ie=Ql(E,z.value),ge=ye!==null&&!ye.disabled,Re=u?rp(u,z.value,z.index):null;return d.jsxs("div",{role:"row","data-dragid":Se["data-dragid"],"data-disabled":(ye==null?void 0:ye.disabled)||void 0,"data-upstream":Re!==null&&((ht=u==null?void 0:u.upstream)==null?void 0:ht.has(Re))||void 0,onPointerDown:b?$e=>{Qk($e.target)||Se.onPointerDown($e)}:void 0,onClick:ge?$e=>{Qk($e.target)||oe(z)}: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",Fy,Rb,LH,ge?IH:b?UH:Tb),style:le.style,children:[d.jsx("div",{role:"cell",className:ie(Sr,"items-center justify-center"),children:b&&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(ky,{className:"size-[calc(14*var(--content))]",strokeWidth:1.8})})}),W&&d.jsx("div",{role:"cell",className:Sr,children:ye&&d.jsx(mH,{control:W,state:ye,label:`Select ${Le}`,onToggle:()=>oe(z)})}),B.map(($e,Lt)=>d.jsx("div",{role:"cell","data-table-cell":"","data-row":ce,"data-col":Lt,"data-field":$e.key,className:Sr,children:Xg($e.slot.type)?d.jsx(jc,{slot:$e.slot,instanceId:s,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:lt=>H(z.key,$e.key,lt),recordContext:{itemIndex:z.index,fieldKey:$e.key,...P?{titleKey:P}:{}}}):d.jsx(CH,{slot:$e.slot,instanceId:s,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:lt=>H(z.key,$e.key,lt),recordContext:{itemIndex:z.index,fieldKey:$e.key,...P?{titleKey:P}:{}},factPath:Xl(Ie,$e.key),onOpen:m?()=>m(z.index,$e.key):void 0})},$e.key)),d.jsxs("div",{role:"cell",className:ie(Sr,"justify-end"),children:[m&&d.jsx("button",{type:"button",className:of,"aria-label":`Open ${Le}`,onClick:()=>m(z.index),children:d.jsx(S6,{className:"size-[calc(13*var(--content))]"})}),de.canRemove&&d.jsx("button",{type:"button",className:zH,"aria-label":`Remove ${Le}`,onClick:()=>de.remove(z.key),children:d.jsx(Os,{className:"size-[calc(13*var(--content))]"})})]})]},z.key)}return d.jsxs("div",{className:IO,children:[de.canAdd&&d.jsx(bc,{size:"large",add:w,onAdd:se?()=>M(0):null,choose:_}),d.jsx("div",{className:BO,children:d.jsxs("div",{ref:O,className:ie(DH,V&&"flex flex-col"),role:"table","aria-rowcount":N.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:le.style,children:[d.jsx("div",{ref:T,role:"columnheader",className:Sr}),le.selection&&d.jsx("div",{role:"columnheader",className:Sr}),B.map(z=>d.jsx("div",{role:"columnheader","data-field":z.key,className:"min-w-0 px-[calc(14*var(--content))] py-[calc(10*var(--content))]",children:d.jsx("span",{className:"block truncate",children:z.header})},z.key)),d.jsx("div",{role:"columnheader",className:Sr})]}),d.jsx("div",{ref:K.containerRef,className:"relative",onKeyDown:I,children:d.jsx(af,{place:"cell",children:N.map((z,ce)=>ke(z,ce))})}),V&&d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(yc,{children:Array.from({length:HO},(z,ce)=>d.jsx(FH,{columns:B,layout:le,position:ce,marks:(m?1:0)+(de.canRemove?1:0)},ce))}),d.jsx(_d,{icon:Ba.createElement(pf(j),{size:25,strokeWidth:1.8}),headline:w.empty,...te!==null?{line:te}:{}})]})]})})]})}function eq({object:e,row:t,reveal:a,withRecordContext:r=!1,onField:s,host:c,fieldProps:u}){const{fields:m}=c;return m===null?d.jsx(aq,{}):d.jsx(Nb,{fields:Ds(e).filter(([p])=>m.used.has(p)),reveal:a,renderField:(p,g)=>d.jsx(jc,{slot:g,instanceId:c.instanceId,slotId:`${c.slotId}.${p}`,propertyId:c.propertyId,value:t[p],required:m.required.has(p),onChange:v=>s(p,v),...mE(g.type)?{factPath:Xl(c.factPath,p)}:{},...r?{recordContext:{fieldKey:p}}:{},...u==null?void 0:u(p,g)})})}const tq=5,nq=ie("block h-[calc(9*var(--content))] w-1/4 rounded-full",jn),iq=ie("block h-[calc(40*var(--content))] w-full rounded-[calc(10*var(--content))]",Cy);function aq(){return d.jsx("div",{className:"relative h-[calc(360*var(--content))]","data-record-pending":"",children:d.jsx(yc,{className:"flex flex-col gap-[calc(20*var(--content))]",children:Array.from({length:tq},(e,t)=>d.jsxs("span",{className:"flex flex-col gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:nq}),d.jsx("span",{className:iq})]},t))})})}const rq=ie("relative z-[1] flex flex-shrink-0 items-center gap-[14px] py-3",sj);function oq(e){const{open:t,onClose:a}=e;return d.jsx(My,{open:t,onClose:a,ariaLabel:e.fallbackTitle,className:ie(Vy,s7),children:t?d.jsx(sq,{...e}):null})}function sq({object:e,row:t,fallbackTitle:a,onChange:r,onClose:s,propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g,revealFieldName:v,fieldProps:b}){const w=ys(e,a),_=ff(w,e,t),E=_==="Untitled"?a:_,S=x.useRef(t);x.useEffect(()=>{S.current=t},[t]);const j=(C,A)=>{S.current={...S.current,[C]:A},r(S.current)};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:rq,children:[d.jsx("div",{className:Ky,children:d.jsx("h2",{className:ie(Yy,"truncate"),children:E})}),d.jsx(gj,{}),d.jsx("button",{type:"button",className:Qy,"aria-label":"Close",onClick:s,children:d.jsx(Rt.x,{size:14})})]}),d.jsx("div",{className:ie("min-h-0 flex-1 overflow-y-auto py-[clamp(16px,1.2vw,28px)]",sj),children:d.jsx(af,{place:"panel",children:d.jsx(eq,{object:e,row:t,reveal:v,withRecordContext:!0,onField:j,host:{propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g},fieldProps:b})})})]})}const lq=new Set(["image","video","tour","document"]);function cq(e){var t;return((t=e.source)==null?void 0:t.kind)==="row"}function GO(e){return lq.has(e.type)&&Vd(e).kind==="owned"}function uq(e,t){return Ds(e).some(([a,r])=>GO(r)&&!cq(r)&&t.required.has(a))}function dq({slot:e,value:t,onChange:a,propertyId:r,instanceId:s,slotId:c,selection:u,onRecordAdded:m,onAdd:p,newRowStamp:g,fixed:v,orderable:b,add:w,choose:_,factPath:E,record:S,fields:j}){const[C,A]=x.useState(null),O=S!==void 0?{index:S.index,added:S.added===!0}:C,{ownedUpload:T}=Yt(),R=Ya(e),B=t,D=O===null?void 0:B[O.index]??{},L=R!==null&&j!==null&&uq(R,j),P=x.useRef({open:O,rows:B});x.useEffect(()=>{P.current={open:O,rows:B}});const le=()=>{const N=P.current.rows,V=[(g==null?void 0:g())??{},...N],te={index:0,added:!0};P.current={open:te,rows:V},a(V,"add"),A(te)},ee=N=>{const{open:V,rows:te}=P.current;if(V===null)return;const me=te.map((Y,M)=>M===V.index?N:Y);P.current={open:V,rows:me},a(me,"edit")},de=()=>{if(S!==void 0){S.onClose();return}(O==null?void 0:O.added)===!0&&(m==null||m(O.index)),A(null)},K=(N,V)=>{const te=P.current.open;return!T||te===null?Promise.reject(new Error("list-table-view: no record is open")):T({slotId:c,itemIndex:te.index,field:N},V)},Q=T&&O!==null?(N,V)=>GO(V)?{onUpload:te=>K(N,te)}:{}:void 0,se=rr(e.label).singular;return d.jsxs(d.Fragment,{children:[S===void 0&&d.jsx(WH,{declaration:e,value:t,onChange:(N,V)=>a(N,V),propertyId:r,instanceId:s,slotId:c,selection:u,...w!==void 0?{add:w}:{},..._!==void 0?{choose:_}:{},...v!==void 0?{fixed:v}:{},...b!==void 0?{orderable:b}:{},onOpenRecord:R?(N,V)=>A({index:N,added:!1,field:V}):void 0,onAdd:p!==void 0?p:L?le:void 0,...g!==void 0?{newRowStamp:g}:{},factPath:E,fields:j}),R&&d.jsx(oq,{open:D!==void 0,object:R,row:D??{},fallbackTitle:(O==null?void 0:O.added)===!0?`New ${se}`:`${Wy(se)} ${((O==null?void 0:O.index)??0)+1}`,propertyId:r,instanceId:s,slotId:c,fieldProps:Q,factPath:Ql(E,D),fields:j,revealFieldName:O==null?void 0:O.field,onChange:ee,onClose:de})]})}function fq(e){return e.map($O).filter(t=>t!==null)}function hq({label:e,itemSlot:t,offer:a,verbs:r,fixed:s,instanceId:c,slotId:u,ownerSlotId:m=u,value:p,propertyId:g,commit:v,onUpload:b,factPath:w,size:_}){const E=Ga(t),S=x.useMemo(()=>fq(p),[p]),[j,C]=x.useState(!1),A=nr({items:S,fixed:s,axis:"xy",commit:v}),{rows:O}=A,T=sb(t,{propertyId:g,instanceId:c,slotId:m}),R=a.kind==="owned"?b??T??void 0:void 0,B=pq(R,E,A.add),{add:D,onAdd:L,choose:P}=Iy(r,a.kind==="picked"?()=>C(!0):null,R!==void 0?hb(E,B):null),le=B.error;return d.jsxs(By,{engine:A,label:e,noun:"item",size:_,onAdd:L,add:D,choose:P,renderTile:(ee,de,K)=>d.jsx(gq,{value:ee.value,kinds:E,propertyId:g,holderPath:w,frame:{chrome:K,crop:null}}),children:[le&&d.jsx("p",{className:As,children:le}),j&&a.kind==="picked"&&d.jsx(_c,{mode:"multi",propertyId:g,filter:a.filter,selectedIds:O.map(ee=>ee.value.asset_id),onChange:ee=>A.replace(Rs(O,ee,de=>de.asset_id,mq,A.mint)),onClose:()=>C(!1)})]})}function mq(e){return d9(e)??{asset_id:e.id}}function pq(e,t,a){const[r,s]=x.useState(!1),[c,u]=x.useState(null);return{busy:r,error:c,take:p=>{if(!e||p.length===0)return;const g=p.filter(b=>!Wk(t,od(b)));u(g.length>0?`Only ${t.join(", ")} can be added here.`:null);const v=p.filter(b=>Wk(t,od(b)));v.length!==0&&(s(!0),(async()=>{try{for(const b of v){const w=od(b),_=Hn(w),E=uf(w,_.fromUploaded(await e(b),_.cleared));E!==null&&a(E)}}catch(b){console.error("[editor] media upload failed",b),u("Upload failed. Try again.")}finally{s(!1)}})())}}}function Wk(e,t){return t!==null&&e.includes(t)}function gq({value:e,kinds:t,propertyId:a,frame:r,holderPath:s}){const c=fb(e,t,a);return d.jsx(db,{kind:c,value:yq(c,e),propertyId:a,frame:r,holderPath:s},c)}function yq(e,t){return Mb()[e].coerce(t)}function KO({face:e,...t}){const{slot:a,instanceId:r,slotId:s,value:c,onChange:u,recordContext:m}=t,p=lO(a,e),g=vI(a,r,s,u,m!=null),v=t.membership??cO(a,void 0),b=Array.isArray(c)?c:[],w=Oj({slotId:s,recordContext:m}),_=m?m.table??null:pc(a.source)!==null?t.boundRowTable??null:null,E=x.useMemo(()=>p.view==="gallery"?sF(a,_):null,[p.view,a,_]),S=v.kind==="follows",{itemContent:j}=p,C=e==="compact"?"compact":"large",A=rf(a,{table:_,membership:v});if(A===null)return null;switch(p.view){case"table":return d.jsx(vq,{slot:a,items:b,onChange:u,membership:v,verbs:A,entries:j.kind==="record"?j.entries:null,fixed:S,propertyId:t.propertyId,instanceId:r,slotId:s,factPath:t.factPath});case"annotated-gallery":{const O=j.kind==="record"?rA(j.entries):null;return O===null?null:d.jsx(xq,{list:a,label:a.label,face:e,annotated:O,listTable:_,membership:v,verbs:A,itemBaseline:t.itemBaseline,insideRecord:m!=null,fixed:S,instanceId:r,slotId:s,mediaSlotId:`${w}.${O.mediaKey}`,value:b,propertyId:t.propertyId,table:(m==null?void 0:m.table)??uO(v),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C})}case"accordion":return j.kind!=="record"?null:d.jsx(eH,{slot:a,entries:j.entries,fixed:S,instanceId:r,slotId:s,value:c,commit:g,membership:v,verbs:A,rowTable:t.rowTable??Bk(a,v),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,itemBaseline:t.itemBaseline,insideRecord:m!=null,factPath:t.factPath});case"gallery":{if(j.kind!=="single"||!xs(j.slot.type))return null;if(E!==null)return d.jsx(wq,{label:a.label,member:E,verbs:A,fixed:S,instanceId:r,slotId:s,mediaSlotId:w,value:c,propertyId:t.propertyId,selectedItemIndex:t.selectedItemIndex,commit:g,onUpload:t.onUpload,size:C});const O=j.slot,T=j.slot.type,R=L3(a,O,_)??{kind:"owned"};if(T==="media")return d.jsx(hq,{label:a.label,itemSlot:O,offer:R,verbs:A,fixed:S,instanceId:r,slotId:s,ownerSlotId:w,value:b,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C});const B=T;return d.jsx(k9,{kind:B,label:a.label,itemSlot:O,offer:R,verbs:A,fixed:S,instanceId:r,slotId:s,ownerSlotId:w,value:b,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C},B)}case"media-manager":return null;case"poi-curation":return d.jsx(iB,{slot:a,fixed:S,value:c,propertyId:t.propertyId,commit:g});case"bullet-list":return j.kind!=="single"?null:d.jsx(hH,{slot:a,itemSlot:j.slot,add:A.add,fixed:S,value:c,commit:g,size:C});case"row-bar":{const O=Bk(a,v),T=j.kind==="single"?mf(j.slot):bq,R=t.rowTable??(O.kind!=="none"?O:T);return d.jsx(BB,{slot:a,face:e,rowTable:v.kind==="follows"&&R.kind==="table"?{...R,inert:!0}:R,verbs:A,fixed:S,value:b,commit:g})}}}const bq={kind:"none"};function vq({slot:e,items:t,onChange:a,membership:r,verbs:s,entries:c,fixed:u,propertyId:m,instanceId:p,slotId:g,factPath:v}){const{TablePicker:b,TableCreate:w}=Yt(),_=Jj(v),E=_!==void 0?_:vH(Ya(e)??{fields:{}}),[S,j]=x.useState(!1),[C,A]=x.useState(!1),O=r.kind==="pick-row"&&c!==null?yb(r):null,T=gb,R=t,B=x.useRef(R);x.useEffect(()=>{B.current=R});const D=b===void 0?null:()=>j(!0),L=O!==null&&D!==null&&s.choose!==null?{choose:s.choose,onChoose:D}:void 0,P=O===null?void 0:w===void 0?null:()=>A(!0),le=r.kind==="table"?()=>({[T]:Sj()}):void 0;return d.jsxs(d.Fragment,{children:[d.jsx(dq,{slot:e,value:t,onChange:ee=>a(ee),propertyId:m,instanceId:p,slotId:g,factPath:v,fields:E,fixed:u,...P!==void 0?{onAdd:P}:{},...le!==void 0?{newRowStamp:le}:{},add:s.add,...L!==void 0?{choose:L}:{}}),C&&O!==null&&c!==null&&w!==void 0&&d.jsx(w,{tables:O,onCreated:(ee,de)=>{if(A(!1),Rd(B.current,c,T).includes(ee))return;const K=[Eb(c,T,ee,de),...B.current];B.current=K,a(K)},onClose:()=>A(!1)}),S&&O!==null&&c!==null&&b!==void 0&&d.jsx(b,{open:!0,mode:"multi",tables:O,selectedIds:Rd(R,c,T),onChange:(ee,de)=>{const K=pB(B.current,c,T,ee,de);B.current=K,a(K)},onClose:()=>j(!1)})]})}function xq({list:e,face:t,annotated:a,listTable:r,membership:s,itemBaseline:c,insideRecord:u,table:m,...p}){const g=fO({instanceId:p.instanceId,slotId:p.slotId,membership:s,itemBaseline:c,insideRecord:u});return d.jsx(oA,{...p,annotated:a,offer:z3(e,a.mediaSlot,{itemTable:m,listTable:r,picksBy:s.kind==="pick-media"?s.filter:null}),markers:t==="compact"?g:null,table:m})}function wq({member:e,value:t,commit:a,...r}){const s=x.useMemo(()=>Array.isArray(t)?t.map(e.toItem):[],[t,e]),c=(u,m)=>a(u.map(p=>({key:p.key,value:e.toStored(p.value)})),m);return d.jsx(oA,{...r,annotated:e.annotated,offer:Vd(e.annotated.mediaSlot,null),markers:null,value:s,table:null,commit:c})}function kq(e){return d.jsx(KO,{face:"expanded",...e})}function _q(e){return d.jsx(KO,{face:"compact",...e})}const Sq={model:{defaultValue:[],coerce:e=>Array.isArray(e)?e:[],isEmpty:e=>e.length===0,isInvalid:()=>!1},faces:{expanded:kq,compact:_q},applyOptimistic:null};function Eq(e,t){return e.toLocaleString("en-US",{useGrouping:t.thousandsSep===!0,maximumFractionDigits:t.decimals===!0?20:0})}function jq(e,t){const a=String(e??"").replace(/[^\d.]/g,"");if(a==="")return"";const[r,s]=a.split("."),c=(r??"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return s!=null?`${c}.${s}`:c}function Oq(e,t){if(t<=0)return 0;let a=0;for(let r=0;r<e.length;r++)if(e[r]!==","&&a++,a===t)return r+1;return e.length}function Jk(e,t,a){e.value=t,e.setSelectionRange(a,a)}function e2(e,t){let a=e.replace(t!=null&&t.decimals?/[^\d.]/g:/[^\d]/g,"");if(t!=null&&t.decimals){const s=a.indexOf(".");s>=0&&(a=a.slice(0,s+1)+a.slice(s+1).replace(/\./g,""))}const r=a.replace(/[^\d]/g,"");return(t==null?void 0:t.maxDigits)!=null&&r.length>t.maxDigits?null:a}function Aq({label:e,value:t,onChange:a,group:r,decimals:s,maxDigits:c,placeholder:u,onBlur:m,attention:p=null}){const g=w=>r?jq(w):w,v=g(t),b=ar();return d.jsx("div",{className:b.frame,children:d.jsx(Zr,{attention:p,children:d.jsx("input",{className:ie(b.inner,"[font-variant-numeric:tabular-nums]"),"aria-label":e,inputMode:s?"decimal":"numeric",value:v,placeholder:u??"0",onBlur:m,onChange:w=>{var O;const _=w.currentTarget,E=_.value,S=_.selectionStart??E.length,j=e2(E,{decimals:s,maxDigits:c});if(j==null){const T=S-(E.length-v.length);Jk(_,v,Math.min(Math.max(T,0),v.length));return}const C=g(j),A=((O=e2(E.slice(0,S),{decimals:s}))==null?void 0:O.length)??0;Jk(_,C,Oq(C,A)),a(j)}})})})}function op(e){return e==null?"":String(e)}function lg(e){const t=e.trim();if(t==="")return null;const a=Number(t);return Number.isFinite(a)?a:null}const YO={defaultValue:null,coerce:e=>typeof e=="number"?e:lg(typeof e=="string"?e:""),isEmpty:e=>e===null,isInvalid:()=>!1};function t2({slot:e,value:t,onChange:a,required:r=!1}){const[s,c]=x.useState(()=>op(t)),u=lg(s)===t?s:op(t);return d.jsx(Aq,{attention:ir(YO,e,t,r),label:e.label,value:u,onChange:m=>{c(m);const p=lg(m);p!==t&&a(p)},onBlur:()=>c(op(t)),group:e.thousandsSep,decimals:e.decimals,maxDigits:e.maxDigits,placeholder:e.placeholder})}const Nq={model:YO,faces:{expanded:t2,compact:t2},applyOptimistic:(e,t,a)=>rO(e,t==null?"":Eq(t,a))},QO={model:{defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:e=>!I5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid phone number",inputType:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 555-0100"};function n2(e){return d.jsx(mb,{kind:QO,...e})}const Mq={model:QO.model,faces:{expanded:n2,compact:n2},applyOptimistic:null},Cq="flex flex-col gap-2";function Rq({slot:e,value:t,onChange:a,propertyId:r}){const{apiFetch:s}=Yt().api,[c,u]=x.useState(null),[m,p]=x.useState(null),g=x.useMemo(()=>t?[t]:[],[t]),{urls:v,dropUrl:b}=bO(r,g);async function w(_){if(u(null),(t==null?void 0:t.place_id)!==_.place_id){p(_);try{const E=await hO(s,r,_.place_id);a(E)}catch{u("Couldn't add that place. Try again.")}finally{p(null)}}}return d.jsxs("div",{className:Cq,children:[d.jsx(xO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:t?new Set([t.place_id]):new Set,onSelect:_=>void w(_)}),c&&d.jsx("span",{className:pO,children:c}),m?d.jsxs("div",{className:ie(xb,gO),"aria-live":"polite",children:[d.jsx("span",{className:wb,children:d.jsx("span",{className:yO})}),d.jsxs("div",{className:kb,children:[d.jsx("span",{className:_b,children:m.name}),d.jsx("span",{className:Sb,children:"Adding…"})]})]}):t?d.jsx(vO,{row:t,photoUrl:v[t.place_id],onPhotoError:()=>b(t.place_id),onRemove:()=>a(null)}):d.jsx("div",{className:TI,children:"No place yet. Search above to choose one."})]})}const Tq={model:{defaultValue:null,coerce:vb,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:Rq},applyOptimistic:null},Dq=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"),Lq=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 zq(e){return e.length>0&&e.every(t=>t.description!==void 0)}function $q({label:e,value:t,options:a,onChange:r,attention:s}){const c=Ts();return d.jsx("div",{className:ie(Yr,"gap-1.5"),children:d.jsx("div",{className:"grid grid-cols-2 gap-2.5",role:"radiogroup","aria-label":e,children:a.map(u=>{const m=DO(u.icon)?u.icon:null;return d.jsxs("button",{type:"button",role:"radio","aria-checked":u.value===t,className:Dq,...Ms(s,c),onClick:()=>{u.value!==t&&r(u.value)},children:[m!==null&&d.jsx("span",{className:Lq,children:d.jsx(ci,{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 XO={defaultValue:null,coerce:e=>typeof e=="string"?e:null,isEmpty:e=>e===null||e==="",isInvalid:()=>!1};function ZO({cards:e,slot:t,value:a,onChange:r,required:s=!1}){const c=Fa(g=>g.session.listing_intent),u=TO(t,{listingIntent:c}),m=t.creatable??!1,p=ir(XO,t,a,s);return e&&!m&&zq(u)?d.jsx($q,{label:t.label,value:a,options:u,onChange:r,attention:p}):d.jsx(sg,{attention:p,label:t.label,value:a??"",options:u,creatable:m,placeholder:"Choose one",onChange:r})}function Uq(e){return d.jsx(ZO,{cards:!0,...e})}function Iq(e){return d.jsx(ZO,{cards:!1,...e})}const Bq={model:XO,faces:{expanded:Uq,compact:Iq},applyOptimistic:null};function WO(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function Hq(){return x.useSyncExternalStore(()=>()=>{},()=>WO()!==null,()=>!1)}function qq({value:e,onChange:t,recording:a,onRecordingChange:r,onEnd:s}){const c=Hq(),[u,m]=x.useState(0),p=x.useRef(null),g=x.useRef(""),v=x.useRef(""),b=x.useRef(t),w=x.useRef(s);x.useEffect(()=>{b.current=t,w.current=s},[t,s]),x.useEffect(()=>{if(!a)return;const S=setInterval(()=>m(j=>j+1),1e3);return()=>clearInterval(S)},[a]),x.useEffect(()=>()=>{var S;(S=p.current)==null||S.abort(),p.current=null},[]);const _=x.useCallback(()=>{const S=WO();if(!S||p.current)return;const j=new S;j.continuous=!0,j.interimResults=!0,j.lang=typeof navigator<"u"&&navigator.language||"en-US",g.current=e,v.current="",j.onresult=C=>{let A="",O="";for(let D=C.resultIndex;D<C.results.length;D++){const L=C.results[D];if(L===void 0)continue;const P=L[0].transcript;L.isFinal?A+=P:O+=P}A&&(v.current+=A);const T=v.current+O,R=g.current,B=!R||/\s$/.test(R)||/^\s/.test(T)?"":" ";b.current(R+B+T)},j.onerror=()=>{},j.onend=()=>{var C;p.current=null,r(!1),m(0),(C=w.current)==null||C.call(w)},p.current=j,m(0),r(!0);try{j.start()}catch{p.current=null,r(!1)}},[r,e]),E=x.useCallback(()=>{var S;(S=p.current)==null||S.stop()},[]);return{canDictate:c,seconds:u,start:_,stop:E}}function Fq(e){return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(Math.floor(e%60)).padStart(2,"0")}`}const Pq={short:120,medium:240,long:2e3};function Vq(e){return Pq[e]}const JO={defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:()=>!1};function eA(e){const t=e.slot.size??"short";return{size:t,cap:typeof e.slot.cap=="number"?e.slot.cap:Vq(t)}}function tA({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 nA({slot:e,value:t,required:a=!1}){return ir(JO,e,t,a)}const Gq={medium:2,long:5};function iA(e){const{slot:t,value:a,onChange:r}=e,{size:s,cap:c}=eA(e),u=ar(),m={value:a,maxLength:c,placeholder:tA(e),"aria-label":t.label};return d.jsx("div",{className:u.frame,children:d.jsx(Zr,{attention:nA(e),count:{count:a.length,max:c,multiline:s!=="short"},children:s==="short"?d.jsx("input",{className:u.inner,...m,onChange:p=>r(p.target.value)}):d.jsx("textarea",{className:ie(u.inner,u.multiline),rows:u.inline?1:Gq[s],...m,onChange:p=>r(p.target.value)})})})}function Kq(e){return eA(e).size==="long"?d.jsx(Yq,{...e,cap:typeof e.slot.cap=="number"?e.slot.cap:null}):d.jsx(iA,{...e})}function Yq(e){const{slot:t,value:a,onChange:r,cap:s}=e,c=ar(),u=x.useRef(null),[m,p]=x.useState(!1),g=x.useCallback(()=>requestAnimationFrame(()=>{var _;return(_=u.current)==null?void 0:_.focus()}),[]),v=x.useCallback(_=>r(s===null?_:_.slice(0,s)),[r,s]),b=qq({value:a,onChange:v,recording:m,onRecordingChange:p,onEnd:g}),w=m?null:a.length>0?s===null?`${a.length.toLocaleString()} character${a.length===1?"":"s"}`:`${a.length.toLocaleString()} / ${s.toLocaleString()}`:b.canDictate?"Type, or tap the mic to dictate":"Type to fill this in";return d.jsx("div",{className:c.frame,children:d.jsxs(Zr,{attention:nA(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:a,maxLength:s??void 0,placeholder:tA(e),"aria-label":t.label,onChange:_=>r(_.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:Fq(b.seconds)}),"Listening…"]}):d.jsx("span",{className:ie(N8(a.length,s??void 0),"font-sans text-caption"),children:w}),b.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?b.stop:b.start,children:m?d.jsx("span",{className:"block size-2.75 rounded-[2px] bg-white","aria-hidden":"true"}):d.jsx(j6,{size:16})})]})]})})}const Qq={model:JO,faces:{expanded:Kq,compact:iA},applyOptimistic:(e,t)=>rO(e,Sc(t))};function Xq(e){if(e===void 0)return"Not a valid URL";const t=Object.entries(Za).find(([r])=>r===e);if(t)return`Needs a ${t[1].label} link`;const a=Zq(e);return a.length>0?`Needs a ${e} link (${a.join(", ")})`:`Needs a ${e} link`}function Zq(e){return Object.values(Za).filter(t=>t.kind===e).map(t=>t.label)}function Wq(e,t){const a=Ll(e);return a===""?!1:Tg(a)?t.accepts!==void 0&&!z5(t.accepts,a):!0}const aA={model:{defaultValue:"",coerce:Sc,isEmpty:e=>Ll(e)==="",isInvalid:Wq},normalize:Ll,invalidMessage:(e,t)=>Tg(Ll(e))?Xq(t.accepts):"Not a valid URL",inputType:"text",inputMode:"url",autoComplete:"url",placeholder:"https://",adornment:e=>d.jsx(Jq,{draft:e})};function Jq({draft:e}){const t=Ll(e);return d.jsx("span",{className:ie(uE,"pr-2.75"),children:Tg(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(Rt.external,{})}):d.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:d.jsx(Rt.external,{})})})}function i2(e){return d.jsx(mb,{kind:aA,...e})}const eF={model:aA.model,faces:{expanded:i2,compact:i2},applyOptimistic:null};let a2=null;function tF(){return a2??(a2={text:Qq,number:Nq,select:Bq,url:eF,email:yI,phone:Mq,date:cI,image:qj,list:Sq,poi:Tq,video:Kj,tour:Pj,document:aO,media:wH,address:J9}),a2}function nF(){return SB}function Ls(e){if(e==="row")return nF();const a=tF()[e];return a===void 0?null:a}function Ld(e,t={}){const a=df(e);if(a!==null){const s={...t,fields:a.fields};return e.locked!==!0&&Object.values(a.fields).some(c=>Ld(c,s))}if(hB(e,t))return!1;const r=Ls(e.type);return r?r.isEditable?r.isEditable(e):e.locked!==!0:!1}function rA(e){const t=e.filter(([,r])=>cS(r)),a=t.find(([,r])=>gn(r.type));return a?{mediaKey:a[0],mediaSlot:a[1],fields:t.filter(([r])=>r!==a[0])}:null}const iF="flex flex-col gap-1.5",aF="flex flex-col";function oA({label:e,annotated:t,offer:a,verbs:r,markers:s,fixed:c,instanceId:u,slotId:m,mediaSlotId:p,value:g,propertyId:v,table:b,selectedItemIndex:w,selectedFieldName:_,commit:E,onUpload:S,factPath:j,size:C}){const{mediaKey:A,mediaSlot:O,fields:T}=t,R=p??`${m}.${A}`,B=O.type,D=Hn(B),L=iy(O),P=x.useMemo(()=>[[A,O],...T],[A,O,T]),le=x.useMemo(()=>g.map(ge=>ge!==null&&typeof ge=="object"?{...ge}:{}),[g]),ee=nr({items:le,...s?{identityOf:s.identityOf}:{},fixed:c,axis:"xy",commit:(ge,Re)=>E(s?s.stamp(ge):ge,Re)}),{rows:de}=ee,K=ge=>{var Re;return((Re=Ls(B))==null?void 0:Re.model.coerce(ge[A]))??D.cleared},Q=(ge,Re)=>({...ge,[A]:Re}),se=(ge,Re,ht)=>{const $e=de.find(Lt=>Lt.key===ge);$e&&(s==null||s.markFields($e,{[Re]:ht($e.value)}),ee.updateValue(ge,Lt=>({...Lt,[Re]:ht(Lt)})))},N=ge=>{for(const Re of ge)s==null||s.markRemoved(Re);ee.removeMany(ge.map(Re=>Re.key))},V=ge=>Q(Go(P),ge),te=x.useMemo(()=>({get:ge=>B==="image"?K(ge):null,set:(ge,Re)=>Q(ge,Re)}),[B,A]),me=_!==void 0&&_!==A,Y=Vj({engine:ee,lens:te,propertyId:v,instanceId:u,slotId:m,cropCfg:L}),M=Nj(v,B),H=ge=>Ul(Xl(Ql(j,ge),A),D.assetIdOf(K(ge))),I=x.useRef(null);x.useEffect(()=>{me&&I.current&&RO(I.current,_)},[me,_,w]);const[F,W]=x.useState(!1),pe=sb(O,{propertyId:v,instanceId:u,slotId:R}),oe=S??pe??void 0,ke=a.kind==="owned"&&oe!==void 0,z=Yj(oe,ge=>ee.add(V(D.fromUploaded(ge,D.cleared)))),ce=ge=>{const Re=Rs(de,ge,$e=>D.assetIdOf(K($e)),$e=>V(D.fromPicked($e,D.cleared)),ee.mint),ht=new Set(Re.map($e=>$e.key));for(const $e of de)ht.has($e.key)||s==null||s.markRemoved($e);ee.replace(Re)},{add:ye,onAdd:Se,choose:Le}=Iy(r,a.kind==="picked"?()=>W(!0):null,a.kind==="owned"&&ke?hb([B],z):null),Ie=z.error;return d.jsxs(By,{engine:ee,label:e,noun:D.noun,size:C,onAdd:Se,add:ye,choose:Le,renderTile:(ge,Re,ht)=>d.jsx("div",{className:aF,"data-annotated-item":Re,children:d.jsx(db,{kind:B,value:K(ge.value),propertyId:v,holderPath:Xl(Ql(j,ge.value),A),frame:{chrome:ht,beneath:T.length>0&&d.jsx("div",{className:iF,ref:Re===w?I:void 0,[Ab]:"",children:d.jsx(af,{place:"cell",children:T.map(([$e,Lt])=>d.jsx("div",{[Td]:$e,children:d.jsx(jc,{slot:Lt,instanceId:u,slotId:m,value:ge.value[$e],propertyId:v,onChange:lt=>se(ge.key,$e,()=>lt),recordContext:{itemIndex:Re,fieldKey:$e,table:b}})},$e))})}),crop:B==="image"?{cfg:L,cut:Y.cutOf(ge),derivativeUrl:Y.derivativeOf(ge),cropping:M.recropping(H(ge.value)),storeKey:Y.keyOf(ge.key)}:null}})}),onRemove:N,tileActions:ge=>{const Re=H(ge.value),ht=[];return M.offers(Re)&&ht.push({label:"Crop",glyph:"crop",onSelect:()=>M.framing?Y.open(ge.key):M.recrop(Re,Y.keyOf(ge.key))}),ht},children:[Ie&&d.jsx("p",{className:As,children:Ie}),F&&a.kind==="picked"&&d.jsx(_c,{mode:"multi",propertyId:v,filter:a.filter,selectedIds:de.map(ge=>D.assetIdOf(K(ge.value))),onChange:ce,onClose:()=>W(!1)}),M.framing&&Y.modal(),M.modal]})}const rF={floor:"floor_label"},sp=e=>rF[e]??e;function oF(e){const a={...Es.pages,...Ja.pages}[e];return a?a.declaration:null}function sF(e,t){const a=ny(e,t);if(a===null)return null;const r=oF(a.table),s=r?Ya(r):null,c=s==null?void 0:s.fields[a.member],u=c?Ya(c):null;if(!u||!Zg(u.fields))return null;const m=rA(Ds(u));if(m===null)return null;const{mediaKey:p,fields:g}=m,v=new Set(g.map(([b])=>sp(b)));return{annotated:m,toItem:b=>{const w=b!==null&&typeof b=="object"?b:{},_={};for(const[S,j]of Object.entries(w))v.has(S)||(_[S]=j);const E={[p]:_};for(const[S]of g)E[S]=w[sp(S)]??null;return E},toStored:b=>{const w=b[p],_=w!==null&&typeof w=="object"?{...w}:{};for(const[E]of g){const S=b[E];_[sp(E)]=typeof S=="string"&&S.trim()===""?null:S??null}return _}}}const lF=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(lF,"text-accent");ie("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",cE);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 r2(e,t){const a=e.variant;return!a||t==null?!0:a.cases.includes(t)}function cF(e){const t=Object.keys(e.slots),a=e.slot_order;if(!a||a.length===0)return t;const r=new Set,s=[];for(const c of a)c in e.slots&&!r.has(c)&&(r.add(c),s.push(c));for(const c of t)r.has(c)||s.push(c);return s}function o2(e,t,a,r,s=!1){return{kind:"object",key:e,header:t,Icon:MO(a.map(c=>c.slot)),fields:a,selectSlotId:r,lone:s}}function sA(e,t){const a=[];for(const r of cF(e)){const s=e.slots[r];if(!r2(s,t)||!Ld(s,{slots:e.slots}))continue;const c=df(s);if(c!==null){const u={slots:e.slots,fields:c.fields},m=Ds(c).filter(([,p])=>Ld(p,u)&&r2(p,t)).map(([p,g])=>({slotId:kO(r,p),slot:g}));if(m.length===0)continue;a.push(o2(r,ys(c,r),m,r));continue}a.push(o2(r,{kind:"text",text:s.label},[{slotId:r,slot:s}],r,!0))}return a}function uF(e,t,a){if(e.header.kind==="text")return e.header.text;const r=df(t.slots[e.key]);return r===null?e.key:ff(e.header,r,a(e.key))}function s2(e){var t;return((t=Ec(e.slotId))==null?void 0:t.field)??e.slotId}function l2(e,t){return e.key===t||e.fields.some(a=>a.slotId===t)}function dF(e){return e.fields.map(t=>t.slotId)}function fF(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 hF(e,t,a){const r=[];for(const s of sA(e,t))for(const{slotId:c,slot:u}of s.fields)u.variant&&fF(a(c))&&r.push(c);return r}function mF(e,t){const a=(e??"").trim(),r=(t??"").trim();return a===""||r===""?e:`${a}, ${r}`}function pF(e){const t=r=>(r??"").trim(),a=[t(e.address_state),t(e.address_postal)].filter(r=>r!=="").join(" ");return[t(e.address_street),t(e.address_city),a].filter(r=>r!=="").join(", ")}function lA(e,t){return Db[t](e)}function cg(e,t){const a=wF[t];return a===void 0?void 0:a(e)}function Bn(e){return e??""}function c2(e){return e??0}function Bl(e){return Wi(e)??null}function gF(e){return{display:Bn(e.display),street:Bn(e.street),street_no_type:Bn(e.street_no_type),city:Bn(e.city),state:Bn(e.state),postal:Bn(e.postal),unit:Bn(e.unit)}}function yF(e){return e.flatMap((t,a)=>{const r=Bl(t.image);return r===null?[]:[{id:r,floor_label:t.floor,position:a}]})}function u2(e){return mF(e.address.street,e.address.unit)}function lp(e,t){return a=>e(a).map((r,s)=>Object.fromEntries(Object.entries(t).map(([c,u])=>[c,u(r,s,a)])))}const bF={unit_id:e=>e.id,position:(e,t)=>t,floor_plans:e=>yF(e.floor_plans),unit_label:e=>e.label,beds:e=>c2(e.beds),baths:e=>c2(e.baths),sqft:e=>e.sqft,price:e=>e.price},vF={id:e=>e.id,primary:(e,t)=>t===0,name:e=>e.name,title:e=>e.title,org_name:e=>e.org_name,bio:e=>e.bio,address:e=>e.address.display,email:e=>e.email,phone:e=>e.phone,website:e=>e.website,instagram:e=>e.instagram,linkedin:e=>e.linkedin,x:e=>e.x,facebook:e=>e.facebook,headshot:e=>Bl(e.headshot),logo_dark:e=>Bl(e.logo_dark),logo_light:e=>Bl(e.logo_light)},xF={id:e=>e.id,address_street:u2,address_city:e=>e.address.city,address_state:e=>e.address.state,address_postal:e=>e.address.postal,address:e=>pF({address_street:u2(e),address_city:e.address.city,address_state:e.address.state,address_postal:e.address.postal}),lat:e=>e.address.latitude,lng:e=>e.address.longitude,distance_m:e=>e.distance_m,status:e=>e.status,price:e=>e.price,price_period:e=>e.price_period,sale_date:e=>e.sale_date,beds:e=>e.beds,baths:e=>e.baths,sqft:e=>e.sqft,photo:e=>Bl(e.photo),year_built:e=>e.year_built,lot_sqft:e=>e.lot_sqft,stories:e=>e.stories,units:e=>e.units,hoa_monthly:e=>e.hoa_monthly,list_price:e=>e.list_price,listed_date:e=>e.listed_date,mls_number:e=>e.mls_number,description:e=>e.description},Db={units:lp(e=>e.units,bF),contacts:lp(e=>e.contacts,vF),comparables:lp(e=>e.comparables,xF)};function ug(e){return t=>Db[e](t)[0]??null}function Bt(e,t){return a=>{const r=ug(e)(a);return r===null?null:r[t]}}function cp(e){return t=>Db[e](t)}const wF={address:e=>gF(e.address),address_street:e=>Bn(e.address.street),address_unit:e=>Bn(e.address.unit),address_city:e=>Bn(e.address.city),address_state:e=>Bn(e.address.state),address_postal:e=>Bn(e.address.postal),listing_intent:e=>e.listing_intent,lat:e=>e.address.latitude,lon:e=>e.address.longitude,unit_label:Bt("units","unit_label"),beds:Bt("units","beds"),baths:Bt("units","baths"),sqft:Bt("units","sqft"),price:Bt("units","price"),units:cp("units"),comparables:cp("comparables"),contacts:cp("contacts"),name:Bt("contacts","name"),title:Bt("contacts","title"),org_name:Bt("contacts","org_name"),bio:Bt("contacts","bio"),contact_address:Bt("contacts","address"),email:Bt("contacts","email"),phone:Bt("contacts","phone"),website:Bt("contacts","website"),instagram:Bt("contacts","instagram"),linkedin:Bt("contacts","linkedin"),x:Bt("contacts","x"),facebook:Bt("contacts","facebook"),headshot:Bt("contacts","headshot"),logo_dark:Bt("contacts","logo_dark"),logo_light:Bt("contacts","logo_light"),description:e=>Bn(e.description),unit:ug("units"),contact:ug("contacts")};function bf(e){return typeof e=="string"?{table:e,reading:"legacy"}:e}function dg(e,t){const a=Object.entries(Jg(e)).filter(([,s])=>to(s)==="address").map(([s])=>s);return t[e].map(s=>{const c={...s};for(const u of a)c[u]=_i(s[u]);return c})}function cA(e){return lA(e,"contacts")}const uA=new Set(A5),kF=new Set(N5),_F={logo_dark:{other:"logo_light",mask:"black"},logo_light:{other:"logo_dark",mask:"white"}};function SF(e,t){if(!uA.has(t))return null;const a=(e==null?void 0:e[t])??null;if(kF.has(t)){const r=typeof a=="string"&&a.trim().length>0?a.trim():null;if(r!==null)return{asset_id:r};const s=_F[t];if(s!==void 0){const c=(e==null?void 0:e[s.other])??null,u=typeof c=="string"&&c.trim().length>0?c.trim():null;if(u!==null)return{asset_id:u,mask:s.mask}}return null}return a==null?"":typeof a=="string"?a:String(a)}const EF={primary_contact_name:"name",primary_contact_title:"title",primary_contact_bio:"bio",primary_contact_email:"email",primary_contact_phone:"phone",primary_contact_address:"address",primary_contact_website_url:"website",primary_contact_avatar_upload_id:"headshot",primary_contact_logo_dark_upload_id:"logo_dark",primary_contact_logo_light_upload_id:"logo_light",primary_contact_instagram_url:"instagram",primary_contact_linkedin_url:"linkedin",primary_contact_x_url:"x",primary_contact_facebook_url:"facebook"};function jF(e,t){var s;const a=EF[t];if(a===void 0)return;const r=((s=cA(e)[0])==null?void 0:s[a])??null;return typeof r=="string"?r:null}function Lb(e,t){const a=bf(e);return a.reading==="legacy"?lA(t,a.table):dg(a.table,t)}const dA=Object.fromEntries(Object.entries(ea.contacts.row).filter(([,e])=>e.primary===!0).map(([e])=>[e,p_.contact[e]??e]));function fA(e){if(typeof e!="string")return null;const t=e.trim();return t.length>0?{asset_id:t}:null}function OF(e){return Array.isArray(e)?[...e].sort((t,a)=>(typeof t.position=="number"?t.position:0)-(typeof a.position=="number"?a.position:0)).flatMap(t=>{const a=fA(t.id);return a===null?[]:("floor_label"in t&&(a.floor_label=typeof t.floor_label=="string"?t.floor_label:null),[a])}):[]}function fg(e,t,a){const r=bf(e);return r.reading==="legacy"?AF(r.table,t,a):NF(r.table,t,a)}function AF(e,t,a){const r=ea[e].row[a];if(r===void 0)return null;if(e==="contacts"){const c=dA[a];if(c!==void 0)return mA(t,c)}const s=t[a]??null;return r.value_type==="image"?fA(s):r.value_type==="image_list"?OF(s):s}function NF(e,t,a){const r=fS({table:e,reading:"registry"},a);if(r.kind==="identity")return t.id??null;if(r.kind==="unknown")return null;const s=a.indexOf(".");if(s===-1)return t[a]??null;const c=a.slice(s+1);return Id(c)?V5(t[a.slice(0,s)],c):null}function hA(e,t,a){const r=ty(bf(e));return Lb(e,a).find(s=>s[r]===t)}function MF(e,t,a,r){const s=hA(e,t,r);return s===void 0?null:fg(e,s,a)}function hg(e,t,a,r={},s){const c=dS(a);return CF(bf(e),t,k3(a),c,r,s)}function CF(e,t,a,r,s,c){const u=ty(e);return(c===void 0?Lb(e,t):c.flatMap(p=>{const g=hA(e,p,t);return g===void 0?[]:[g]})).map(p=>{const g={id:p[u]};for(const v of r)g[v]=p[u];for(const[v,b]of Object.entries(a))g[v]=fg(e,p,b);for(const[v,b]of Object.entries(s))g[v]=b(w=>fg(e,p,w),p[u]);return g})}function RF(e){return Lb("units",e)[0]}function TF(e,t){switch(t){case"beds":return(e==null?void 0:e.beds)??null;case"baths":return(e==null?void 0:e.baths)??null;case"sqft":return(e==null?void 0:e.sqft)??null;case"price":return(e==null?void 0:e.price)??null;case"unit_label":return(e==null?void 0:e.unit_label)??null;default:return null}}function DF(e,t){const a=cg(e,"address");if(t==="address")return a&&typeof a=="object"?a.display??null:a;const r=UF[t];if(r!==void 0)return IF(a,r);const s=jF(e,t);return s!==void 0?s:cg(e,t)}const LF=Object.fromEntries(Object.entries(dA).map(([e,t])=>[t,e]));function mA(e,t){if(uA.has(t))return SF(e,t);const a=LF[t];if(a===void 0)return null;const r=(e==null?void 0:e[a])??null;if(typeof r!="string")return null;const s=r.trim();return s.length>0?s:null}function zF(e,t){if(bd(t))return C3(t,N3(e));if(A3(t))return e[t.slice(9)];const a=qt(t);if((a==null?void 0:a.reading)==="registry")return dg(a.table,e);const r=g4(t);return r!==null?dg(r.table,e).map(s=>s[r.member]??null):cg(e,t)}function $F(e,t){if(bd(e))return zF(t.facts,e);const a=pp[e];return!a||Object.hasOwn(eo,e)?null:a.container==="contact"?mA(t.contact??cA(t.facts)[0],e):a.container==="unit"?TF(t.unit??RF(t.facts),e):DF(t.facts,e)}const UF={address_street:"street",address_unit:"unit",address_city:"city",address_state:"state",address_postal:"postal"};function IF(e,t){if(!e||typeof e!="object")return null;const r=(e[t]??"").trim();return r.length>0?r:null}function BF(e,t,a,r){const s=qt(e);return dd(s!==null?hg(s,t,a,r):$F(e,{facts:t}))}function HF(e,t,a,r,s){if(a.kind==="computed")return Object.hasOwn(r.computed,t)?r.computed[t]:void 0;const{facts:c}=r;if(c!==null){if(a.kind==="fact")return BF(a.key,c,yd(e));if(a.kind==="member"){const u=s(a.holder);if(typeof u!="string"||u==="")return;const m=Z4(c,a.tables,u);return m===null?void 0:MF(m,u,a.member,c)}}}function qF(e,t,a,r){if(a.kind==="computed"){const c=Object.hasOwn(r.computed,t)?r.computed[t]:void 0;return Array.isArray(c)?c.filter(FF):void 0}const{facts:s}=r;if(s!==null){if(a.kind==="fact")return a.table===null?void 0:hg(a.table,s,yd(e));if(a.kind==="rows")return a.tables.flatMap(c=>hg(c,s,yd(e)))}}function FF(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function PF(){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(ci,{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 VF(e){const t=e.source;return t==null?void 0:t.kind}function d2(e,t,a,r,s){const c=r.type;if(c==="row")return{kind:"row",tables:Vl(r)};const u=pc(r.source);if(u!==null){const p=Y4(e,t,u.slot);return(p==null?void 0:p.kind)==="row"?{kind:"member",holder:p.path,tables:Vl(p.def),member:u.field}:null}if(c==="list"){const p=wI(s.fillSpec,a),g=cO(r,p,s.sectionSlots),[v,...b]=g.kind==="table"?[]:pb(g);if(v!==void 0)return{kind:"rows",tables:[v,...b]}}if(G4(r)!==null)return{kind:"slot"};const m=VF(r);if(m==="home"){const p=r.source.key;return typeof p=="string"&&p!==""?{kind:"fact",key:p,table:qt(p)}:null}return m==="derived"?{kind:"computed"}:null}function GF(e,t={}){const a=[];for(const[r,s]of Object.entries(e)){if(s.type==="object"){const u=s.fields??{},m={container:r,siblings:u};for(const[p,g]of Object.entries(u)){const v=kO(r,p),b=d2(e,m,v,g,t);b!==null&&a.push([v,b])}continue}const c=d2(e,{},r,s,t);c!==null&&a.push([r,c])}return a}function KF(e){return e.kind==="member"||e.kind==="fact"||e.kind==="rows"}function pA(e,t){const a=e==null||e==="",r=t==null||t==="";return a||r?a&&r:e===t?!0:typeof e=="object"||typeof t=="object"?h2(e)===h2(t):f2(e)===f2(t)}function f2(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e)??""}function h2(e){const t=_i(e);if(t!==null){const{source:a,...r}=t;return JSON.stringify(r)}return JSON.stringify(e,(a,r)=>r!==null&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).sort(([s],[c])=>s.localeCompare(c))):r)}const up=2.5,YF=1;function Ju(e){return e?e.closest(".we-acc-head"):null}function Rl(e){return e.closest(".we-acc")}function m2(e,t){const a=e.offsetWidth,r=e.offsetHeight;!a||!r||(e.style.setProperty("--gx",((a+t*2)/a).toFixed(5)),e.style.setProperty("--gy",((r+t*2)/r).toFixed(5)))}function QF(e){e.style.removeProperty("--gx"),e.style.removeProperty("--gy")}function XF(){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=up;const a=typeof ResizeObserver<"u"?new ResizeObserver(()=>{e&&m2(e,t)}):null,r=(v,b)=>{v&&(e&&e!==v&&s(e),e=v,t=b,m2(v,b),a==null||a.observe(v))},s=v=>{v&&(a==null||a.unobserve(v),QF(v),e===v&&(e=null))},c=v=>{const b=Ju(v.target);b&&r(Rl(b),up)},u=v=>{const b=Ju(v.target);if(!b)return;const w=v.relatedTarget;w&&b.contains(w)||s(Rl(b))},m=v=>{const b=Ju(v.target);b&&r(Rl(b),YF)},p=v=>{const b=Ju(v.target);b&&(b.matches(":hover")?r(Rl(b),up):s(Rl(b)))};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),a==null||a.disconnect()}},[])}const p2=1;function g2(e){const t=new URLSearchParams;for(const[r,s]of Object.entries(e))s!=null&&s!==""&&t.set(r,s);const a=t.toString();return a===""?"":`?${a}`}const Er={catalog:"api/catalog",render:"api/render",media:e=>`api/media${g2({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${g2({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"},ZF={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function y2(e,t){const a=(await t.text().catch(()=>"")).trim();return new Error(a===""?`${e}: HTTP ${t.status}`:a)}function WF(e,t=(a,r)=>fetch(a,r)){const a=s=>new URL(s,e).href,r=async s=>{const c=await t(a(s));if(!c.ok)throw await y2(s,c);return await c.json()};return{base:e,async catalog(){const s=await r(Er.catalog);if(s.wire!==p2)throw new Error(`This playground speaks wire ${p2}, and its host answered with wire ${String(s.wire)}.`);return s},async render(s){const c=await t(a(Er.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(!c.ok)throw await y2(Er.render,c);return await c.json()},media:s=>r(Er.media(s)),captureHref:(s,c)=>a(Er.capture(s,c)),liveHref:(s,c)=>a(Er.live(s,c)),subscribe(s){let c;try{c=new EventSource(a(Er.hmr))}catch{return()=>{}}const u=Object.entries(s).map(([m,p])=>{const g=ZF[m],v=()=>p();return c.addEventListener(g,v),()=>c.removeEventListener(g,v)});return()=>{for(const m of u)m();c.close()}}}}let mg=null;function JF(e){mg=e}function eP(){if(mg===null)throw new Error("The playground's host is not installed yet.");return mg}let gA=null;function tP(e){gA=e}function nP(){return gA}function b2(e,t){return`${e} ${t}${e===1?"":"s"}`}function iP(e){const t=[e.listingIntent].filter(r=>r!==null).map(r=>r.replaceAll("_"," "));t.push(b2(e.units,"unit"),b2(e.photos,"photo"));const a=t.join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function aP(e){return`${e.label} (${iP(e.summary)})`}const rP={sectionInstanceId:hf,slotId:uI,slotGroup:dI,slotItem:fI,slotField:hI,slotUnselectable:mI};function oP(e,t){return`${e}${e.includes("?")?"&":"?"}v=${encodeURIComponent(t)}`}function sP(e){return{basePath:e.basePath,stylesheets:e.stylesheets.map(t=>oP(t,e.cssRev)),importMap:e.importMap,islandMap:e.islands,hostScriptSrc:e.hostScript,hostResolvesOwnImports:Object.keys(e.importMap).length===0}}function v2(e){const t=e.sectionSchemaByInstance??{};return{markers:rP,assets:sP(e),...e.pageBox===void 0?{}:{pageBox:e.pageBox},isSlotEditable:(a,r,s)=>{var u,m,p,g;const c=(u=t[a])==null?void 0:u.slots[r];return c===void 0||c.locked===!0?!1:s===void 0||((g=(p=c.fields??((m=c.element)==null?void 0:m.fields))==null?void 0:p[s])==null?void 0:g.locked)!==!0}}}const lP=/^\/properties\/[^/]+\/poi\/search$/,cP=/^\/properties\/[^/]+\/poi\/([^/]+)$/,pg=[{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 uP(e){const t=typeof e=="object"&&e!==null?e.query:void 0,a=typeof t=="string"?t.trim().toLowerCase():"";return a?{results:pg.filter(r=>{var s;return r.name.toLowerCase().includes(a)||(((s=r.address)==null?void 0:s.toLowerCase().includes(a))??!1)})}:{results:pg}}let dP=0;function fP(e,t={}){const a=(t.method??"GET").toUpperCase();if(a==="POST"&&lP.test(e))return Promise.resolve(uP(t.json));const r=a==="GET"?cP.exec(e):null;if(r){const s=decodeURIComponent(r[1]),c=pg.find(u=>u.place_id===s);if(c)return Promise.resolve({...c,id:`pg-row-${++dP}`})}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 hP(e,t,a){const r=Math.min(Math.max(Math.round(e.nx*t),0),Math.max(t-1,0)),s=Math.min(Math.max(Math.round(e.ny*a),0),Math.max(a-1,0)),c=Math.max(Math.min(Math.round(e.nw*t),t-r),1),u=Math.max(Math.min(Math.round(e.nh*a),a-s),1);return{sx:r,sy:s,sw:c,sh:u}}function mP(e,t){return new Promise((a,r)=>{const s=t.createElement("img");s.onload=()=>a(s),s.onerror=()=>r(new Error(`Could not load ${e} to crop it.`)),s.src=e})}async function pP(e,t,a=document){const r=await mP(e,a),{sx:s,sy:c,sw:u,sh:m}=hP(t,r.naturalWidth,r.naturalHeight),p=a.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(r,s,c,u,m,0,0,u,m);const v=await new Promise(b=>p.toBlob(b));if(!v)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(v)}const Oc="2026-01-01T00:00:00.000Z",x2=new Map;function zb(e){let t=x2.get(e);return t===void 0&&(t=eP().media(e).catch(()=>({items:[],contacts:[],lists:{}})),x2.set(e,t)),t}async function gP(e){const{items:t,lists:a}=await zb(e);return r4(a,yP(t))}function yP(e){return[...xP(e),...SP(e),...wP(e),...kP(e),..._P(e)]}async function bP(e){return(await zb(e)).contacts}async function vP(e,t){var c;const{items:a,contacts:r}=await zb(e);return((c=a.find(u=>u.id===t))==null?void 0:c.src)||r.map(u=>u.images[t]).find(u=>u!==void 0)}function xP(e){return e.filter(t=>t.kind==="photo").map(t=>vc({id:t.id,kind:"image",name:t.name,added_at:Oc,file_url:t.src}))}function wP(e){return e.filter(t=>t.kind==="video").map(t=>{const a=t.provider!==void 0,r=t.src===""?{}:{poster:t.src},s=!a&&(t.ready??!0)?{encode:t.src}:{};return vc({id:t.id,kind:"video",name:t.name,added_at:Oc,duration_ms:t.durationMs??null,url:a?"":null,provider:t.provider??null,renditions:{...r,...s}})})}function kP(e){return e.filter(t=>t.kind==="tour").map(t=>vc({id:t.id,kind:"tour",name:t.name,added_at:Oc,url:t.url??"",provider:t.provider??null,renditions:t.src===""?{}:{poster:t.src}}))}function _P(e){return e.filter(t=>t.kind==="document").map(t=>vc({id:t.id,kind:"document",name:t.name,added_at:Oc,mime:t.mime??null,bytes:t.sizeBytes??null,renditions:t.src===""?{}:{poster:t.src}}))}function SP(e){return e.filter(t=>t.kind==="plan").map(t=>vc({id:t.id,kind:"image",name:t.name,added_at:Oc,file_url:t.src}))}function EP(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 jP(e){return gP(e)}function OP(e,t,a){return EP("Pasting a link")}const AP=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/,w2=new Map;function NP(e,t){const a=AP.exec(t);if(a===null)return Promise.reject(new Error(`Unknown crop ${t}.`));const[,r,s,c,u,m]=a,p={nx:Number(s),ny:Number(c),nw:Number(u),nh:Number(m)};let g=w2.get(t);return g||(g=vP(e,r).then(v=>{if(!v)throw new Error(`The fixture's property has no asset ${r} to crop.`);return pP(v,p)}),w2.set(t,g)),g}async function MP(e,t,a){var p;const[r,s]=t.split(".");if(e.home!=="library"||r!=="contacts")throw new Error(`The fixture holds no owned asset at '${t}'.`);const c=nP(),m=(p=(c===null?[]:await bP(c)).find(g=>g.id===s))==null?void 0:p.images[a];if(m===void 0)throw new Error(`The fixture's contact ${s} has no image ${a}.`);return m}function vf(){return Promise.reject(new Error("Uploads are served by the host application. The dev media pack is read-only."))}function CP(e,t,a){return vf()}function RP(e,t,a){return vf()}function TP(e,t,a){return vf()}function DP(e,t,a){return vf()}function LP(e){return Promise.reject(new Error("There is no property in the playground: the canvas renders a template, not a listing."))}const $b="Uploading is served by the host application; the playground has no upload backend.";function zP(e,t,a,r){return Promise.reject(new Error($b))}function $P(e,t,a,r){return Promise.reject(new Error($b))}function UP(e,t,a){return Promise.reject(new Error($b))}const IP={postListUploadWithProgress:zP,postListLink:$P,withdrawListItem:UP,mediaFactsQuery:e=>({queryKey:["media-facts",e],queryFn:async()=>({facts:await jP(e)})})};function gg(e){return e===null||typeof e!="object"?JSON.stringify(e)??"undefined":Array.isArray(e)?`[${e.map(gg).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${gg(e[t])}`).join(",")}}`}function BP(e){return Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[]}function HP(e,t,a){const r=new Map(t.map(s=>[s[a],s]));return BP(e).some(s=>{const c=r.get(s[a]);return c!==void 0&&Object.keys(c).some(u=>u in s&&!pA(s[u],c[u]))})}function qP(e,t,a,r,s,c){if(a.kind==="rows"){const m=qF(e,t,a,s);return m!==void 0&&HP(r,m,gb)}const u=HF(e,t,a,s,c);return u===void 0?!1:j$(r)?Ji(r)!==Ji(u):!pA(r,u)}function FP(e,t,a){if(t===null)return[];const r={facts:t.facts,computed:t.computed},s=u=>ld(e.slots,u)??ld(t.resolvedProps.slots,u),c=[];for(const[u,m]of GF(a.slots)){if(!KF(m))continue;const p=ld(e.slots,u),g=Kg(a.slots,u);p===void 0||g===void 0||!qP(g,u,m,p,r,s)||c.push({id:`${u}:scalar::@${gg(p)}`,kind:"scalar",label:g.label,slotId:u})}return c}const PP={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 VP(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(a=>a.id).join(" "),title:`${t.kind}: ${t.slots.map(a=>a.ref===null?a.id:`${a.id} ← ${a.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] ${PP[t.kind]}`,children:t.kind},t.kind))})}function GP(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(VP,{chips:e.chips})})]})}function KP(e,t){const a=!t,r=e.required&&!a;return{hidden:a,locked:r,title:r?"Required section — cannot hide":a?"Hidden from live page":"Visible on live page"}}function yA(e){const{variant:t}=e;return t===null||t.locked||t.cases.length<2?null:t.cases}function YP(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 QP(e,t,a){const r=new Map;for(const s of e){const{kind:c,ref:u}=YP(t==null?void 0:t[s],a(s));r.set(c,[...r.get(c)??[],{id:s,ref:u}])}return[...r].map(([s,c])=>({kind:s,slots:c}))}const k2="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function XP(e){const t=KP(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:`${k2} 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(ci,{name:t.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),yA(e.display)?d.jsx("button",{type:"button","data-testid":"section-gear",onClick:e.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${k2} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:d.jsx(ci,{name:"settings",size:15,stroke:1.8})}):null]})]})}const ZP=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 WP(e){const t=yA(e.display),a=hF(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(ci,{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(r=>d.jsxs("label",{"data-selected":r.value===e.variant,className:ZP,children:[d.jsx("input",{type:"radio",className:"sr-only",name:`variation-${e.instanceId}`,value:r.value,checked:r.value===e.variant,onChange:()=>e.onSetVariant(r.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:r.label})]},r.value))}),a>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:a===1?"1 empty field in this variation":`${a} 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 JP(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function _2(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 eV(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 S2(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 tV({items:e,onApply:t}){const a=e??[],r=a.length,s=a.map(le=>le.id).join("|"),[c,u]=x.useState(!1),[m,p]=x.useState("idle"),[g,v]=x.useState(!1),[b,w]=x.useState(0),_=x.useRef(null),E=x.useRef(null),S=x.useRef(null),j=x.useRef(null),C=x.useRef(a),A=x.useRef(!0);x.useLayoutEffect(()=>{C.current=a});const O=x.useRef(JP()).current,T=x.useCallback(le=>{const ee=_.current;if(O||document.hidden||ee==null||typeof ee.animate!="function"){v(!1),u(!1),p("idle"),le==null||le();return}v(!0);const de=ee.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});de.onfinish=()=>{v(!1),u(!1),p("idle"),le==null||le()}},[O]);x.useEffect(()=>(E.current!=null&&clearTimeout(E.current),r>0&&m==="idle"?s!==j.current&&!c&&(E.current=setTimeout(()=>{u(!0)},550)):r===0&&c&&!g&&m==="idle"&&T(),()=>{E.current!=null&&clearTimeout(E.current)}),[r,s,c,m,g,T]),x.useLayoutEffect(()=>{if(!c||m!=="idle"||O||g)return;const le=_.current;le!=null&&typeof le.animate=="function"&&!document.hidden&&le.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[c,m,O,g]),x.useEffect(()=>{if(m!=="applying")return;const le=ee=>{ee.preventDefault(),ee.returnValue=""};return window.addEventListener("beforeunload",le),()=>window.removeEventListener("beforeunload",le)},[m]),x.useEffect(()=>(A.current=!0,()=>{A.current=!1,E.current!=null&&clearTimeout(E.current),S.current!=null&&clearTimeout(S.current)}),[]);const R=()=>{const le=C.current;w(le.length),p("applying"),(async()=>{try{if(await t(le),!A.current)return;u(!1),p("success"),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{T(()=>{j.current=null})},1200)}catch{if(!A.current)return;p("error")}})()},B=()=>{j.current=s,T()};if(!c&&m!=="success"&&!g)return null;const D=m==="applying",L=D?b:r,P=L===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:L})," 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:_,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(eV,{})}),"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:B,"aria-label":"Dismiss",children:d.jsx(S2,{})})]}),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(_2,{})]})]}):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:[P,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:B,disabled:D,"aria-label":"Dismiss",children:d.jsx(S2,{})})]}),d.jsx("button",{type:"button","data-action":"apply",disabled:D,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:D?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(_2,{})]})})]})})})})}const nV="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",iV="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function aV({items:e}){const[t,a]=x.useState([]),r=e.filter(u=>!t.includes(u.id)),s=t.length>0&&r.length===0,c=x.useCallback(u=>{a(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(tV,{items:r,onApply:c})}),r.length>0||s?d.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":s?"applied":"preview",children:s?iV:nV}):null]})}const rV={apiFetch:fP,getCropDerivativeUrl:NP,postLink:OP,stageOwnedAsset:CP,ownedAssetUrl:MP,discardStagedAsset:RP,uploadContentAsset:TP,contentAssetUrl:DP,fetchProperty:LP};function oV(e,t,a){return x.useMemo(()=>{const r={session:{property_id:e,listing_intent:null},select:s=>{if(s===null){a(null);return}if(s.kind==="section"){a({kind:"section",instanceId:s.instance_id});return}a({kind:"slot",instanceId:s.instance_id,slotId:s.slot_id,...s.item_index!==void 0?{itemIndex:s.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:s=>s(r),capabilities:{},api:rV,MediaPicker:sV}},[e,t,a])}function sV(e){return d.jsx(kU,{...e,capabilities:{upload:!1,manage:!1}})}function lV(e,t){const{selection:a}=e;if((a==null?void 0:a.kind)==="slot"&&!(a.instanceId!==e.instanceId||a.slotId!==t))return a.itemIndex}function cV(e,t){var a;return QP(t,(a=e.payload)==null?void 0:a.provenance,r=>e.override.slots[r]!==void 0)}function Hl(e,t){var s;const a=Ec(t);if(a!==null)return ld({[a.object]:Hl(e,a.object)},t);const r=e.override.slots[t];return r!==void 0?r:(s=e.payload)==null?void 0:s.resolvedProps.slots[t]}function uV(e,t,a){const r=Ec(t);if(r===null)return e.onApplySlot(t,a);const s=cB({[r.object]:Hl(e,r.object)},t,a)[r.object];e.onApplySlot(r.object,s)}function dV(e){var m;const t=oV(e.fixture,e.selection,e.onSelect);XF();const a=x.useMemo(()=>new SD,[]),r=e.displayState.variant,s=x.useMemo(()=>sA(e.sectionSchema,r),[e.sectionSchema,r]),c=x.useMemo(()=>FP(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(WP,{instanceId:e.instanceId,label:e.label,display:e.display,sectionSchema:e.sectionSchema,variant:r,slotValue:p=>Hl(e,p),onSetVariant:e.onSetVariant,onBack:e.onCloseSettings}):d.jsx(XP,{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(ED,{client:a,children:d.jsx(J8,{api:IP,children:d.jsx(R8,{ports:t,children:d.jsx(af,{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:[s.map(p=>d.jsx(GP,{chips:cV(e,dF(p)),children:d.jsx(CO,{open:u!=null&&l2(p,u),onToggle:()=>u!=null&&l2(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:uF(p,e.sectionSchema,g=>Hl(e,g)),scrollKey:p.key,children:d.jsx(Nb,{fields:p.fields.map(g=>[s2(g),g.slot]),lone:p.lone,renderField:(g,v)=>{const b=p.fields.find(w=>s2(w)===g).slotId;return d.jsx(jc,{slot:v,instanceId:e.instanceId,slotId:b,value:Hl(e,b),propertyId:e.fixture,onChange:w=>uV(e,b,w),selectedItemIndex:lV(e,b)})}})})},p.key)),s.length===0?d.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),d.jsx(aV,{items:c})]})})})})})]})}function fV(e,t){return e.find(a=>a.pages.includes(t))??null}function hV(e,t,a,r){const s=t.endsWith("/")?t:`${t}/`;if(!e.startsWith(s))return null;const c=e.indexOf("#"),u=c===-1?null:e.slice(c+1),m=(c===-1?e:e.slice(0,c)).slice(s.length).split("/").filter(Boolean),[p,g,v,b,...w]=m;if(p!=="fixtures"||g===void 0||v!=="live"||w.length>0)return null;const _=b===void 0?"/":`/${decodeURIComponent(b)}`,E=a.find(j=>j.path===_);if(!E)return null;const S=fV(r,E.id);return S?{pageId:E.id,canvasId:S.id,anchor:u||null}:null}const dp="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]",mV="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]",pV="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]",gV="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function yV({host:e,templateName:t,fixture:a,output:r,format:s,canvas:c,pagePath:u}){const m=r==="website"?{href:e.liveHref(a,u??"/"),title:`Open this page as it would publish — ${t}`}:null,p=r==="image"?{href:e.captureHref("bundle",{fixture:a,format:s,canvas:c}),title:`Download every page of this canvas as a zip — ${t}`}:r==="document"?{href:e.captureHref("print",{fixture:a,format:s}),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:`${dp} ${mV}`,children:[d.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:d.jsx(ci,{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:`${dp} ${pV}`,children:[d.jsx(eE,{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:`${dp} ${gV}`,children:d.jsx("span",{children:"Publish"})})]})})}function bV(e,t,a,r){const s=e.ownerDocument,c=[],u=new Map;for(const m of Array.from(e.children)){const p=m,g=p.getAttribute(hf);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&&(r==null||r(p),p.remove());const v=p&&!g,b=v?p:a(m,s);v||c.push(b),e.appendChild(b),u.delete(m.instance_id)}return u.forEach(m=>{r==null||r(m),m.remove()}),c}function bA(e){return e==null?void 0:e.__trCanvasIslands}function vV(e,t,a,r){const s=e==null?void 0:e.querySelector(`[${hf}="${a}"]`);if(!s)return!1;const c=s.querySelector(":scope > .we-section-body")??s,u=bA(t);return u==null||u.unmountRoot(s),c.innerHTML=r,u==null||u.hydrateRoot(s),!0}function xV(){return{slots:{}}}function vi(e,t,a){var r;return((r=e[t])==null?void 0:r[a])??xV()}function Ub(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function wV(e,t,a,r,s){const c=vi(e,t,a);return Ub(e,t,a,{...c,slots:{...c.slots,[r]:s}})}function kV(e,t,a,r){return Ub(e,t,a,{...vi(e,t,a),enabled:r})}function _V(e,t,a,r){return Ub(e,t,a,{...vi(e,t,a),variant:r})}function SV(e,t){const a=e.enabled??(t==null?void 0:t.enabled)??!0,r=e.variant??(t==null?void 0:t.variant);return r===void 0?{enabled:a}:{enabled:a,variant:r}}function EV(e){return Object.keys(e.slots).length===0?{}:{slots:e.slots}}function jV(e,t){const a={};for(const[r,s]of Object.entries(e[t]??{}))s.enabled===void 0&&s.variant===void 0||(a[r]={...s.enabled===void 0?{}:{enabled:s.enabled},...s.variant===void 0?{}:{variant:s.variant}});return a}function OV(e,t){return Object.keys(e).filter(a=>t[a]!==e[a])}function AV(e,t){if(!t.some(r=>r in e))return e;const a={...e};for(const r of t)delete a[r];return a}function E2(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function NV(e,t,a){const r=e[t];if(!r||!(a in r))return e;const s={...r};return delete s[a],{...e,[t]:s}}function MV(e){const{host:t,fixture:a,doc:r,resolvedDisplay:s,sessions:c,pages:u,frameFor:m}=e,{edits:p,setEdits:g}=c,[v,b]=x.useState({}),[w,_]=x.useState({}),E=[a,r??"",...u.map(Y=>Y.id)].join("\0"),[S,j]=x.useState(E);S!==E&&(j(E),b({}),_({}));const C=x.useRef(v);C.current=v;const A=x.useRef(m);A.current=m;const O=x.useRef(u);O.current=u;const T=x.useRef(p);T.current=p;const R=x.useRef(a);R.current=a;const B=x.useRef(r);B.current=r;const D=x.useRef(new Map),L=x.useCallback(Y=>vi(p,a,Y),[p,a]),P=x.useCallback(Y=>SV(vi(p,a,Y),s==null?void 0:s[Y]),[p,a,s]),le=x.useCallback((Y,M)=>{var H;return((H=w[Y])==null?void 0:H[M])??null},[w]),ee=x.useCallback(Y=>{var M;for(const H of u){const I=(M=w[H.id])==null?void 0:M[Y];if(I!==void 0)return I}return null},[w,u]),de=x.useCallback(Y=>{var M;for(const H of u){const I=(M=v[H.id])==null?void 0:M[Y];if(I)return I}return null},[v,u]),K=x.useCallback(async(Y,M,H,I)=>{const F=Y.id,W=R.current,pe=B.current,oe=`${F}\0${M}`,ke=(D.current.get(oe)??0)+1;D.current.set(oe,ke);const z=()=>W!==R.current||pe!==B.current||D.current.get(oe)!==ke;try{const ce=await t.render({page:F,instance:M,fixture:W,session:EV(H),display:jV(T.current,W)});if(z()||(b(Le=>E2(Le,F,M,ce)),_(Le=>NV(Le,F,M)),!I))return;const{doc:ye,win:Se}=A.current(F);vV(ye,Se,M,ce.html)}catch(ce){if(z())return;const ye=ce instanceof Error?ce.message:String(ce);_(Se=>E2(Se,F,M,ye))}},[t]),Q=x.useCallback((Y,M)=>{var I;if((I=C.current[Y])!=null&&I[M])return;const H=O.current.find(F=>F.id===Y);H&&K(H,M,vi(T.current,R.current,M),!1)},[K]),se=x.useCallback((Y,M)=>{var H;for(const I of O.current)((H=C.current[I.id])==null?void 0:H[Y])!==void 0&&K(I,Y,M,!0)},[K]),N=x.useCallback(Y=>{se(Y,vi(T.current,R.current,Y))},[se]),V=x.useCallback((Y,M,H)=>{const I=wV(T.current,R.current,Y,M,H);T.current=I,g(I),se(Y,vi(I,R.current,Y))},[se,g]),te=x.useCallback((Y,M)=>{const H=kV(T.current,R.current,Y,M);T.current=H,g(H);for(const I of O.current)for(const F of Object.keys(C.current[I.id]??{}))K(I,F,vi(H,R.current,F),!0)},[K,g]),me=x.useCallback((Y,M)=>{const H=_V(T.current,R.current,Y,M);T.current=H,g(H),se(Y,vi(H,R.current,Y))},[se,g]);return x.useMemo(()=>({overrideFor:L,displayFor:P,payloads:v,errorOn:le,errorFor:ee,payloadFor:de,ensureLoaded:Q,reload:N,applySlot:V,setEnabled:te,setVariant:me}),[L,P,v,le,ee,de,Q,N,V,te,me])}const CV={slots:{},slot_order:[]},RV={required:!1,variant:null},TV=[];function j2(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 DV(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 LV(e,t){if(!e)return[];const a=[];for(const r of e.pages){const s=t.find(c=>c.id===r);s&&a.push(s)}return a}function ed(e,t,a,r){var p;const s=((p=t.doc)==null?void 0:p.getElementById(e))??null;if(!s||!a)return;const c=s.getBoundingClientRect(),u=o5({top:c.top,height:c.height},t.wrapper.offsetTop,r,a.scrollTop),m=r5(u,a.clientHeight,a.scrollTop,a5);m!==null&&a.scrollTo({top:m,behavior:"smooth"})}function O2(e,t){return e.querySelector(`[${hf}="${qr(t)}"]`)}function bi(e){const t=JSON.stringify(e);return x.useMemo(()=>e,[t])}function zV(e){var at,Qt,ut;const{host:t,catalog:a,view:r,onViewChange:s,sessions:c}=e,u=x.useRef(null),m=x.useRef([]),[p,g]=x.useState({}),[v,b]=x.useState(1),[w,_]=x.useState(0),[E,S]=x.useState(!1),[j,C]=x.useState(null),A=r.fixture,O=a.fixtures.find(ne=>ne.id===A),T=O==null?void 0:O.doc,R=O==null?void 0:O.display,[B,D]=x.useState(null),L=x.useCallback(ne=>{D(null),s(ne)},[s]);x.useEffect(()=>{tP(A)},[A]);const P=x.useMemo(()=>new URL(t.base).pathname,[t.base]),le=bi(a.template.pages),ee=bi(a.template.canvases),de=bi(a.islands.map),K=bi(a.stylesheets),Q=a.islands.hostScript,se=bi(a.islands.importMap),N=bi(Object.fromEntries(a.template.instances.map(ne=>[ne.instanceId,ne.sectionSchema]))),V=bi(Object.fromEntries(a.template.instances.map(ne=>[ne.instanceId,ne.section]))),te=bi(a.template.instances),me=a.template.output,Y=me!=="website",M=Y?a.template.formats:[],H=bi(Y?M.find(ne=>ne.id===r.format)??M[0]??null:null),I=H!==null&&H.bleed>0?H.bleed:null,F=x.useMemo(()=>H?{formatId:H.id,width:H.cssWidth,height:H.cssHeight,tokens:H.tokens}:void 0,[H]),W=ee.find(ne=>ne.id===r.canvasId)??(r.canvasId===null?ee[0]??null:null),pe=ee.length>0&&W===null,oe=x.useMemo(()=>W?LV(W,le):TV,[W,le]),ke=x.useMemo(()=>oe.map(ne=>({id:ne.id})),[oe]),z={basePath:P,stylesheets:K,cssRev:String(w),islands:de,hostScript:Q,importMap:se},ce=x.useMemo(()=>Qx(v2({...z,sectionSchemaByInstance:N,...F?{pageBox:F}:{}})),[P,K,w,de,Q,se,N,F]),ye=x.useMemo(()=>Qx(v2({...z,...F?{pageBox:F}:{}})).srcdoc(),[P,K,w,de,Q,se,F]),[Se,Le]=x.useState(ye);Se!==ye&&(Le(ye),g({}));const Ie=x.useCallback(ne=>{const be=m.current.find(Oe=>Oe.key===ne);return{doc:(be==null?void 0:be.doc)??null,win:(be==null?void 0:be.iframe.contentWindow)??null}},[]),ge=MV({host:t,fixture:A,doc:T,resolvedDisplay:R,sessions:c,pages:ke,frameFor:Ie}),Re=bi(te.map(ne=>ne.instanceId).filter(ne=>!ge.displayFor(ne).enabled)),[ht,$e]=x.useState(null),Lt=x.useRef(r.selection);Lt.current=r.selection;const lt=x.useRef(ge);lt.current=ge;const Fn=x.useRef(oe);Fn.current=oe;const An=x.useRef(v);An.current=v;const un=x.useMemo(()=>oe.map(ne=>({key:ne.id,srcdoc:ye,label:ne.label,title:`Canvas preview — ${ne.label}`,...F?{pageBox:F}:{}})),[oe,ye,F]);x.useEffect(()=>{const ne=u.current;if(!ne)return;const be=t5(ne,un);m.current=be;const Oe=be.map(ze=>{const Ge=()=>{$C(ze.doc)&&g(He=>({...He,[ze.key]:!0}))};return ze.iframe.addEventListener("load",Ge),()=>ze.iframe.removeEventListener("load",Ge)});return()=>{for(const ze of Oe)ze()}},[un]),x.useEffect(()=>{for(const ne of m.current)i5(ne.overlay,E?I:null)},[E,I,un]),x.useEffect(()=>{const ne=u.current;if(!ne||typeof ResizeObserver>"u")return;const be=new ResizeObserver(Oe=>{var He;const ze=(He=Oe[0])==null?void 0:He.contentRect;if(!(ze!=null&&ze.width))return;const Ge=oC(ze.width);b(lC(Ge,{availableWidthPx:ze.width,availableHeightPx:ze.height},F?{width:F.width,height:F.height}:void 0))});return be.observe(ne),()=>be.disconnect()},[F]),x.useEffect(()=>{var ne;(ne=u.current)==null||ne.style.setProperty("--we-scale",String(v))},[v]),x.useEffect(()=>{var be;if(F)return;const ne=[];for(const Oe of m.current){if(!p[Oe.key])continue;const ze=(be=Oe.doc)==null?void 0:be.getElementById("we-page");if(!ze)continue;const Ge=()=>Oe.setPageHeight(ze.getBoundingClientRect().height);if(Ge(),typeof ResizeObserver>"u")continue;const He=new ResizeObserver(Ge);He.observe(ze),ne.push(()=>He.disconnect())}return()=>{for(const Oe of ne)Oe()}},[p,un,F]),x.useEffect(()=>{const ne=ht;if(!ne)return;const be=()=>{document.documentElement.style.setProperty("--we-panel-w",`${ne.offsetWidth}px`)};be();const Oe=typeof ResizeObserver<"u"?new ResizeObserver(be):null;return Oe==null||Oe.observe(ne),()=>{Oe==null||Oe.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[ht]),x.useEffect(()=>{for(const ne of oe)for(const be of ne.instanceIds)ge.ensureLoaded(ne.id,be)},[oe,ge.ensureLoaded,A,T]);const yt=x.useMemo(()=>{const ne={};for(const be of oe){const Oe=ge.payloads[be.id]??{};ne[be.id]=be.instanceIds.filter(ze=>Oe[ze]??ge.errorOn(be.id,ze)).map(ze=>{var He,kt;const Ge=ge.errorOn(be.id,ze);return{instance_id:ze,section_version_id:A,section_key:V[ze]??ze,section_display_name:((He=te.find(jt=>jt.instanceId===ze))==null?void 0:He.label)??null,html:((kt=Oe[ze])==null?void 0:kt.html)??null,render_error:Ge?{code:"render_failed",message:Ge}:null}})}return ne},[oe,ge.payloads,ge.errorOn,V,te,A]);x.useEffect(()=>{let ne=!1;for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc,ze=be.iframe.contentWindow,Ge=Oe==null?void 0:Oe.getElementById("we-page");if(!Ge)continue;const He=bA(ze),kt=bV(Ge,yt[be.key]??[],(jt,_t)=>ce.buildSectionWrapper(jt,_t),jt=>He==null?void 0:He.unmountRoot(jt));kt.length>0&&!He&&!ne&&Object.keys(de).length>0&&(ne=!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 jt of kt)He==null||He.hydrateRoot(jt).catch(_t=>{console.error("playground: canvas hydration pass failed:",_t)})}},[p,un,yt,ce,de]);const ia=x.useRef(()=>{});ia.current=ne=>{ge.setEnabled(ne,!0),L({...r,selection:{kind:"section",instanceId:ne}})},x.useEffect(()=>{var Oe;const ne=new Set(Re),be=[];for(const ze of m.current){if(!p[ze.key])continue;const Ge=ze.doc;if(!Ge)continue;const He=yt[ze.key]??[];for(const Zt of He)(Oe=O2(Ge,Zt.instance_id))==null||Oe.setAttribute("data-hidden",ne.has(Zt.instance_id)?"true":"false");const kt=He.filter(Zt=>ne.has(Zt.instance_id)).map(Zt=>({instanceId:Zt.instance_id,label:hp(Zt)})),jt=VC(ze.tabLayer,document,kt,Zt=>ia.current(Zt)),_t=()=>GC(jt,Zt=>O2(Ge,Zt),v);_t();const Ft=Ge.getElementById("we-page");if(!Ft||typeof ResizeObserver>"u")continue;const Xt=new ResizeObserver(_t);Xt.observe(Ft),be.push(()=>Xt.disconnect())}return()=>{for(const ze of be)ze()}},[p,un,yt,Re,v]);const di=x.useCallback(()=>{const ne=m.current,be=Lt.current,Oe=j2(be);for(const He of ne)He.doc&&ce.setLiveOwner(He.doc,Oe);const ze=n5(ne,ce,Oe),Ge=be!==null&&Re.includes(be.instanceId);for(const He of ne){const kt=He.overlay.querySelector(".we-chrome-label"),jt=be&&!Ge?ze.find(_t=>_t.handle.key===He.key):void 0;if(!jt||!be){Fx(He.overlay,[],zm),fp(kt);continue}if(Fx(He.overlay,jt.els,zm,be.kind),be.kind==="section"){const _t=(yt[He.key]??[]).find(Ft=>Ft.instance_id===be.instanceId);ZM(kt,jt.els[0]??null,_t?hp(_t):"")}else fp(kt)}},[ce,yt,Re]);x.useEffect(()=>{di();for(const ne of m.current){if(!p[ne.key])continue;const be=ne.doc,Oe=ne.iframe.contentWindow;be&&Oe&&u5(Oe,be,j2(r.selection))}},[p,un,r.selection,di]);const ii=x.useCallback((ne,be)=>{const Oe=ne.getAttribute("href")??"";if(!Oe||Oe==="#")return;const ze=u.current;if(Oe.startsWith("#")){ed(Oe.slice(1),be,ze,An.current);return}const Ge=hV(Oe,P,le,ee);if(!Ge){window.open(Oe,"_blank","noopener,noreferrer");return}if(W!==null&&Ge.canvasId===W.id){const He=m.current.find(kt=>kt.key===Ge.pageId);if(!He)return;Ge.anchor?ed(Ge.anchor,He,ze,An.current):He!==be&&ed("we-page",He,ze,An.current);return}L({...r,canvasId:Ge.canvasId,selection:null}),Ge.anchor&&C({pageId:Ge.pageId,anchor:Ge.anchor})},[r,L,P,le,ee,W]);x.useEffect(()=>{var be;if(!j||!p[j.pageId])return;const ne=m.current.find(Oe=>Oe.key===j.pageId);(be=ne==null?void 0:ne.doc)!=null&&be.getElementById(j.anchor)&&(ed(j.anchor,ne,u.current,An.current),C(null))},[j,p,yt]),x.useEffect(()=>{const ne=[];for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc;if(!Oe)continue;const ze=yt[be.key]??[],Ge=be.overlay.querySelector(".we-chrome-ring--hover"),He=Ft=>{var ai;const Xt=Ft.target,Zt=ce.resolveTarget(Xt,ze);td(Ge);const Nn=Zt?DV(Zt.selection):null,Oi=((ai=Xt.closest)==null?void 0:ai.call(Xt,"a"))??null;if(Oi){if(Ft.preventDefault(),(Nn==null?void 0:Nn.kind)==="slot"){const fi=r.selection,io=(fi==null?void 0:fi.kind)==="slot"&&fi.instanceId===Nn.instanceId&&fi.slotId===Nn.slotId&&fi.itemIndex===Nn.itemIndex;L({...r,selection:Nn}),io&&ii(Oi,be);return}ii(Oi,be);return}L({...r,selection:Nn})},kt=Ft=>{const Xt=ce.resolveTarget(Ft.target,ze);Xt?F2(Ge,Xt.element,zm):td(Ge)},jt=()=>td(Ge),_t=Ft=>{Ft.key==="Escape"&&L({...r,selection:null})};Oe.body.addEventListener("click",He),Oe.body.addEventListener("mouseover",kt),Oe.body.addEventListener("mouseleave",jt),Oe.body.addEventListener("keydown",_t),ne.push(()=>{Oe.body.removeEventListener("click",He),Oe.body.removeEventListener("mouseover",kt),Oe.body.removeEventListener("mouseleave",jt),Oe.body.removeEventListener("keydown",_t)})}return()=>{for(const be of ne)be()}},[p,un,ce,yt,r,L,ii]);const we=a.capabilities.hmr;x.useEffect(()=>{if(!we)return;const ne=()=>{const be=new Set;for(const Oe of Fn.current)for(const ze of Oe.instanceIds)be.has(ze)||(be.add(ze),lt.current.reload(ze))};return t.subscribe({source:ne,stylesheet:()=>_(be=>be+1)})},[t,we]);const Te=r.selection,Ce=(Te==null?void 0:Te.instanceId)??null,Xe=oe.find(ne=>Ce!==null&&ne.instanceIds.includes(Ce))??oe[0]??null;return x.useEffect(()=>{Ce&&Xe&&ge.ensureLoaded(Xe.id,Ce)},[Ce,Xe==null?void 0:Xe.id,ge.ensureLoaded]),pe?d.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',r.canvasId,'".',`
|
|
1258
|
-
`,"Declared canvases: ",ee.map(ne=>ne.id).join(", ")]}):d.jsxs("div",{className:"canvas-mirror",children:[d.jsx("style",{children:QC}),ee.length>1?d.jsx("div",{className:"canvas-bar",children:d.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:ee.map(ne=>d.jsx("button",{type:"button",className:ne.id===(W==null?void 0:W.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":ne.id===(W==null?void 0:W.id)?"page":void 0,onClick:()=>L({...r,canvasId:ne.id,selection:null}),children:ne.label},ne.id))})}):null,d.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:u,onClick:ne=>{var Oe;const be=ne.target;(be===u.current||(Oe=be.classList)!=null&&Oe.contains(ud))&&L({...r,selection:null})}}),d.jsxs("div",{className:"canvas-mirror__sidebar",ref:$e,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:A,onChange:ne=>L({...r,fixture:ne.target.value,selection:null}),children:a.fixtures.map(ne=>d.jsx("option",{value:ne.id,children:aP(ne)},ne.id))})]}),Y&&H&&M.length>1?d.jsxs("label",{className:"sidebar-template__field",children:["Format",d.jsx("select",{"data-testid":"format-switcher",value:H.id,onChange:ne=>s({...r,format:ne.target.value}),children:M.map(ne=>d.jsx("option",{value:ne.id,children:`${ne.id} — ${ne.pixelWidth}×${ne.pixelHeight}px${ne.physical?` (${ne.physical})`:""}`},ne.id))})]}):null,I!==null?d.jsxs("label",{className:"sidebar-template__toggle",children:[d.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:E,onChange:ne=>S(ne.target.checked)}),"Trim & bleed guides"]}):null]}),Ce?d.jsx(dV,{instanceId:Ce,label:((at=te.find(ne=>ne.instanceId===Ce))==null?void 0:at.label)??Ce,display:((Qt=te.find(ne=>ne.instanceId===Ce))==null?void 0:Qt.display)??RV,displayState:ge.displayFor(Ce),settingsOpen:B===Ce,onSetEnabled:ne=>ge.setEnabled(Ce,ne),onSetVariant:ne=>ge.setVariant(Ce,ne),onOpenSettings:()=>D(Ce),onCloseSettings:()=>D(null),fixture:A,sectionSchema:N[Ce]??CV,override:ge.overrideFor(Ce),payload:ge.payloadFor(Ce),renderError:ge.errorFor(Ce),selection:Te,onSelect:ne=>L({...r,selection:ne}),onApplySlot:(ne,be)=>ge.applySlot(Ce,ne,be)}):d.jsx(PF,{}),a.capabilities.capture||me==="website"?d.jsx(yV,{host:t,templateName:a.template.name,fixture:A,output:me,format:(H==null?void 0:H.id)??null,canvas:(W==null?void 0:W.id)??null,pagePath:((ut=oe[0])==null?void 0:ut.path)??null}):null]})]})}function $V(e){const[t,a]=x.useState({}),[r,s]=x.useState(e);if(e!==null&&e!==r){const u=r===null?[]:OV(r,e);s(e),u.length>0&&a(m=>AV(m,u))}const c=x.useCallback(u=>a(u),[]);return x.useMemo(()=>({edits:t,setEdits:c}),[t,c])}function A2(e){const t=PM(window.location.pathname,e.base);return t===null?null:VM(t,window.location.search)}function UV({host:e}){const[t,a]=x.useState(null),[r,s]=x.useState(null),[c,u]=x.useState(0),[m,p]=x.useState(()=>A2(e)),g=x.useMemo(()=>t===null||t.error!==void 0?null:Object.fromEntries(t.fixtures.map(E=>[E.id,E.doc])),[t]),v=$V(g);x.useEffect(()=>{let E=!0;return e.catalog().then(S=>{E&&(a(S),s(null))},S=>{E&&s(S instanceof Error?S.message:String(S))}),()=>{E=!1}},[e,c]);const b=t==null?void 0:t.template.name;x.useEffect(()=>{b&&(document.title=`${b} - Playground`)},[b]);const w=(t==null?void 0:t.capabilities.hmr)===!0;x.useEffect(()=>{if(!w)return;const E=()=>u(S=>S+1);return e.subscribe({source:E,fixtures:E})},[e,w]),x.useEffect(()=>{const E=()=>p(A2(e));return window.addEventListener("popstate",E),()=>window.removeEventListener("popstate",E)},[e]),x.useEffect(()=>{if(m!==null||t===null)return;const E=GM(t);E!==null&&(window.history.replaceState({},"",new URL(Bx(E),e.base).href),p(E))},[m,t,e]);const _=x.useCallback(E=>{window.history.replaceState({},"",new URL(Bx(E),e.base).href),p(E)},[e]);return r?d.jsxs("div",{className:"boot-error",children:["The playground could not load its catalog — ",r,`
|
|
1259
|
-
`,"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(E=>E.id===m.fixture)?d.jsx(zV,{host:e,catalog:t,view:m,onViewChange:_,sessions:v}):d.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',m.fixture,'" (have: ',t.fixtures.map(E=>E.id).join(", "),")."]}):d.jsx("div",{className:"empty",children:"loading canvas…"}):d.jsx("div",{className:"empty",children:"loading…"})}const vA=document.getElementById("root");if(!vA)throw new Error("playground: #root missing from index.html");const xA=WF(document.baseURI);JF(xA);HM.createRoot(vA).render(d.jsx(x.StrictMode,{children:d.jsx(UV,{host:xA})}));
|