@hyperframes/studio 0.6.0-alpha.12 → 0.6.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hyperframes-player-BI1oj9hu.js +418 -0
- package/dist/assets/index-CBj2NLRG.js +117 -0
- package/dist/assets/index-D1JDq7Gg.css +1 -0
- package/dist/favicon.svg +14 -0
- package/dist/index.html +3 -2
- package/package.json +9 -9
- package/src/App.tsx +427 -4487
- package/src/components/AskAgentModal.tsx +120 -0
- package/src/components/StudioHeader.tsx +133 -0
- package/src/components/StudioLeftSidebar.tsx +125 -0
- package/src/components/StudioPreviewArea.tsx +163 -0
- package/src/components/StudioRightPanel.tsx +198 -0
- package/src/components/TimelineToolbar.tsx +89 -0
- package/src/components/editor/DomEditOverlay.tsx +15 -1
- package/src/components/editor/PropertyPanel.tsx +129 -2681
- package/src/components/editor/domEditing.ts +38 -5
- package/src/components/editor/manualEditingAvailability.test.ts +2 -2
- package/src/components/editor/manualEditingAvailability.ts +1 -1
- package/src/components/editor/manualEdits.ts +32 -0
- package/src/components/editor/propertyPanelColor.tsx +371 -0
- package/src/components/editor/propertyPanelFill.tsx +421 -0
- package/src/components/editor/propertyPanelFont.tsx +455 -0
- package/src/components/editor/propertyPanelHelpers.ts +401 -0
- package/src/components/editor/propertyPanelPrimitives.tsx +357 -0
- package/src/components/editor/propertyPanelSections.tsx +453 -0
- package/src/components/editor/propertyPanelStyleSections.tsx +411 -0
- package/src/components/nle/NLELayout.tsx +0 -10
- package/src/contexts/DomEditContext.tsx +137 -0
- package/src/contexts/FileManagerContext.tsx +110 -0
- package/src/contexts/PanelLayoutContext.tsx +68 -0
- package/src/contexts/StudioContext.tsx +135 -0
- package/src/hooks/useAppHotkeys.ts +326 -0
- package/src/hooks/useAskAgentModal.ts +162 -0
- package/src/hooks/useCaptionDetection.ts +132 -0
- package/src/hooks/useCompositionDimensions.ts +25 -0
- package/src/hooks/useConsoleErrorCapture.ts +60 -0
- package/src/hooks/useDomEditCommits.ts +437 -0
- package/src/hooks/useDomEditSession.ts +342 -0
- package/src/hooks/useDomEditTextCommits.ts +330 -0
- package/src/hooks/useDomSelection.ts +398 -0
- package/src/hooks/useFileManager.ts +431 -0
- package/src/hooks/useFrameCapture.ts +77 -0
- package/src/hooks/useLintModal.ts +35 -0
- package/src/hooks/useManifestPersistence.ts +492 -0
- package/src/hooks/usePanelLayout.ts +68 -0
- package/src/hooks/usePreviewInteraction.ts +153 -0
- package/src/hooks/useRenderClipContent.ts +124 -0
- package/src/hooks/useTimelineEditing.ts +472 -0
- package/src/player/components/Player.tsx +19 -1
- package/src/player/components/Timeline.test.ts +0 -8
- package/src/player/components/Timeline.tsx +2 -83
- package/src/player/components/TimelineClip.tsx +9 -244
- package/src/player/hooks/useTimelinePlayer.ts +140 -103
- package/src/utils/domEditHelpers.ts +50 -0
- package/src/utils/studioFontHelpers.ts +83 -0
- package/src/utils/studioHelpers.ts +214 -0
- package/src/utils/studioPreviewHelpers.ts +185 -0
- package/dist/assets/hyperframes-player-DjsVzYFP.js +0 -418
- package/dist/assets/index-FWg79aJz.css +0 -1
- package/dist/assets/index-xdyn_qRZ.js +0 -110
- package/src/player/components/TimelineClip.test.ts +0 -92
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Ik(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ip={exports:{}},Fc={},sp={exports:{}},Ct={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 J8;function Xk(){if(J8)return Ct;J8=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),O=Symbol.iterator;function x(E){return E===null||typeof E!="object"?null:(E=O&&E[O]||E["@@iterator"],typeof E=="function"?E:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function $(E,X,ee){this.props=E,this.context=X,this.refs=k,this.updater=ee||v}$.prototype.isReactComponent={},$.prototype.setState=function(E,X){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,X,"setState")},$.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=$.prototype;function V(E,X,ee){this.props=E,this.context=X,this.refs=k,this.updater=ee||v}var A=V.prototype=new M;A.constructor=V,w(A,$.prototype),A.isPureReactComponent=!0;var Q=Array.isArray,T=Object.prototype.hasOwnProperty,N={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function W(E,X,ee){var Ce,Te={},tt=null,De=null;if(X!=null)for(Ce in X.ref!==void 0&&(De=X.ref),X.key!==void 0&&(tt=""+X.key),X)T.call(X,Ce)&&!j.hasOwnProperty(Ce)&&(Te[Ce]=X[Ce]);var G=arguments.length-2;if(G===1)Te.children=ee;else if(1<G){for(var oe=Array(G),fe=0;fe<G;fe++)oe[fe]=arguments[fe+2];Te.children=oe}if(E&&E.defaultProps)for(Ce in G=E.defaultProps,G)Te[Ce]===void 0&&(Te[Ce]=G[Ce]);return{$$typeof:n,type:E,key:tt,ref:De,props:Te,_owner:N.current}}function K(E,X){return{$$typeof:n,type:E.type,key:X,ref:E.ref,props:E.props,_owner:E._owner}}function ae(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function ie(E){var X={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(ee){return X[ee]})}var L=/\/+/g;function le(E,X){return typeof E=="object"&&E!==null&&E.key!=null?ie(""+E.key):X.toString(36)}function ye(E,X,ee,Ce,Te){var tt=typeof E;(tt==="undefined"||tt==="boolean")&&(E=null);var De=!1;if(E===null)De=!0;else switch(tt){case"string":case"number":De=!0;break;case"object":switch(E.$$typeof){case n:case e:De=!0}}if(De)return De=E,Te=Te(De),E=Ce===""?"."+le(De,0):Ce,Q(Te)?(ee="",E!=null&&(ee=E.replace(L,"$&/")+"/"),ye(Te,X,ee,"",function(fe){return fe})):Te!=null&&(ae(Te)&&(Te=K(Te,ee+(!Te.key||De&&De.key===Te.key?"":(""+Te.key).replace(L,"$&/")+"/")+E)),X.push(Te)),1;if(De=0,Ce=Ce===""?".":Ce+":",Q(E))for(var G=0;G<E.length;G++){tt=E[G];var oe=Ce+le(tt,G);De+=ye(tt,X,ee,oe,Te)}else if(oe=x(E),typeof oe=="function")for(E=oe.call(E),G=0;!(tt=E.next()).done;)tt=tt.value,oe=Ce+le(tt,G++),De+=ye(tt,X,ee,oe,Te);else if(tt==="object")throw X=String(E),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return De}function Oe(E,X,ee){if(E==null)return E;var Ce=[],Te=0;return ye(E,Ce,"","",function(tt){return X.call(ee,tt,Te++)}),Ce}function $e(E){if(E._status===-1){var X=E._result;X=X(),X.then(function(ee){(E._status===0||E._status===-1)&&(E._status=1,E._result=ee)},function(ee){(E._status===0||E._status===-1)&&(E._status=2,E._result=ee)}),E._status===-1&&(E._status=0,E._result=X)}if(E._status===1)return E._result.default;throw E._result}var pe={current:null},D={transition:null},z={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:D,ReactCurrentOwner:N};function q(){throw Error("act(...) is not supported in production builds of React.")}return Ct.Children={map:Oe,forEach:function(E,X,ee){Oe(E,function(){X.apply(this,arguments)},ee)},count:function(E){var X=0;return Oe(E,function(){X++}),X},toArray:function(E){return Oe(E,function(X){return X})||[]},only:function(E){if(!ae(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},Ct.Component=$,Ct.Fragment=t,Ct.Profiler=i,Ct.PureComponent=V,Ct.StrictMode=r,Ct.Suspense=u,Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,Ct.act=q,Ct.cloneElement=function(E,X,ee){if(E==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var Ce=w({},E.props),Te=E.key,tt=E.ref,De=E._owner;if(X!=null){if(X.ref!==void 0&&(tt=X.ref,De=N.current),X.key!==void 0&&(Te=""+X.key),E.type&&E.type.defaultProps)var G=E.type.defaultProps;for(oe in X)T.call(X,oe)&&!j.hasOwnProperty(oe)&&(Ce[oe]=X[oe]===void 0&&G!==void 0?G[oe]:X[oe])}var oe=arguments.length-2;if(oe===1)Ce.children=ee;else if(1<oe){G=Array(oe);for(var fe=0;fe<oe;fe++)G[fe]=arguments[fe+2];Ce.children=G}return{$$typeof:n,type:E.type,key:Te,ref:tt,props:Ce,_owner:De}},Ct.createContext=function(E){return E={$$typeof:a,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},E.Provider={$$typeof:s,_context:E},E.Consumer=E},Ct.createElement=W,Ct.createFactory=function(E){var X=W.bind(null,E);return X.type=E,X},Ct.createRef=function(){return{current:null}},Ct.forwardRef=function(E){return{$$typeof:c,render:E}},Ct.isValidElement=ae,Ct.lazy=function(E){return{$$typeof:m,_payload:{_status:-1,_result:E},_init:$e}},Ct.memo=function(E,X){return{$$typeof:h,type:E,compare:X===void 0?null:X}},Ct.startTransition=function(E){var X=D.transition;D.transition={};try{E()}finally{D.transition=X}},Ct.unstable_act=q,Ct.useCallback=function(E,X){return pe.current.useCallback(E,X)},Ct.useContext=function(E){return pe.current.useContext(E)},Ct.useDebugValue=function(){},Ct.useDeferredValue=function(E){return pe.current.useDeferredValue(E)},Ct.useEffect=function(E,X){return pe.current.useEffect(E,X)},Ct.useId=function(){return pe.current.useId()},Ct.useImperativeHandle=function(E,X,ee){return pe.current.useImperativeHandle(E,X,ee)},Ct.useInsertionEffect=function(E,X){return pe.current.useInsertionEffect(E,X)},Ct.useLayoutEffect=function(E,X){return pe.current.useLayoutEffect(E,X)},Ct.useMemo=function(E,X){return pe.current.useMemo(E,X)},Ct.useReducer=function(E,X,ee){return pe.current.useReducer(E,X,ee)},Ct.useRef=function(E){return pe.current.useRef(E)},Ct.useState=function(E){return pe.current.useState(E)},Ct.useSyncExternalStore=function(E,X,ee){return pe.current.useSyncExternalStore(E,X,ee)},Ct.useTransition=function(){return pe.current.useTransition()},Ct.version="18.3.1",Ct}var e4;function eg(){return e4||(e4=1,sp.exports=Xk()),sp.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its 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 t4;function Fk(){if(t4)return Fc;t4=1;var n=eg(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(c,u,h){var m,O={},x=null,v=null;h!==void 0&&(x=""+h),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(v=u.ref);for(m in u)r.call(u,m)&&!s.hasOwnProperty(m)&&(O[m]=u[m]);if(c&&c.defaultProps)for(m in u=c.defaultProps,u)O[m]===void 0&&(O[m]=u[m]);return{$$typeof:e,type:c,key:x,ref:v,props:O,_owner:i.current}}return Fc.Fragment=t,Fc.jsx=a,Fc.jsxs=a,Fc}var n4;function zk(){return n4||(n4=1,ip.exports=Fk()),ip.exports}var p=zk(),d=eg();const J0=Ik(d);var e1={},op={exports:{}},_r={},ap={exports:{}},lp={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its 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 r4;function Hk(){return r4||(r4=1,(function(n){function e(D,z){var q=D.length;D.push(z);e:for(;0<q;){var E=q-1>>>1,X=D[E];if(0<i(X,z))D[E]=z,D[q]=X,q=E;else break e}}function t(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var z=D[0],q=D.pop();if(q!==z){D[0]=q;e:for(var E=0,X=D.length,ee=X>>>1;E<ee;){var Ce=2*(E+1)-1,Te=D[Ce],tt=Ce+1,De=D[tt];if(0>i(Te,q))tt<X&&0>i(De,Te)?(D[E]=De,D[tt]=q,E=tt):(D[E]=Te,D[Ce]=q,E=Ce);else if(tt<X&&0>i(De,q))D[E]=De,D[tt]=q,E=tt;else break e}}return z}function i(D,z){var q=D.sortIndex-z.sortIndex;return q!==0?q:D.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();n.unstable_now=function(){return a.now()-c}}var u=[],h=[],m=1,O=null,x=3,v=!1,w=!1,k=!1,$=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(D){for(var z=t(h);z!==null;){if(z.callback===null)r(h);else if(z.startTime<=D)r(h),z.sortIndex=z.expirationTime,e(u,z);else break;z=t(h)}}function Q(D){if(k=!1,A(D),!w)if(t(u)!==null)w=!0,$e(T);else{var z=t(h);z!==null&&pe(Q,z.startTime-D)}}function T(D,z){w=!1,k&&(k=!1,M(W),W=-1),v=!0;var q=x;try{for(A(z),O=t(u);O!==null&&(!(O.expirationTime>z)||D&&!ie());){var E=O.callback;if(typeof E=="function"){O.callback=null,x=O.priorityLevel;var X=E(O.expirationTime<=z);z=n.unstable_now(),typeof X=="function"?O.callback=X:O===t(u)&&r(u),A(z)}else r(u);O=t(u)}if(O!==null)var ee=!0;else{var Ce=t(h);Ce!==null&&pe(Q,Ce.startTime-z),ee=!1}return ee}finally{O=null,x=q,v=!1}}var N=!1,j=null,W=-1,K=5,ae=-1;function ie(){return!(n.unstable_now()-ae<K)}function L(){if(j!==null){var D=n.unstable_now();ae=D;var z=!0;try{z=j(!0,D)}finally{z?le():(N=!1,j=null)}}else N=!1}var le;if(typeof V=="function")le=function(){V(L)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Oe=ye.port2;ye.port1.onmessage=L,le=function(){Oe.postMessage(null)}}else le=function(){$(L,0)};function $e(D){j=D,N||(N=!0,le())}function pe(D,z){W=$(function(){D(n.unstable_now())},z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.unstable_continueExecution=function(){w||v||(w=!0,$e(T))},n.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return t(u)},n.unstable_next=function(D){switch(x){case 1:case 2:case 3:var z=3;break;default:z=x}var q=x;x=z;try{return D()}finally{x=q}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(D,z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var q=x;x=D;try{return z()}finally{x=q}},n.unstable_scheduleCallback=function(D,z,q){var E=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?E+q:E):q=E,D){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=q+X,D={id:m++,callback:z,priorityLevel:D,startTime:q,expirationTime:X,sortIndex:-1},q>E?(D.sortIndex=q,e(h,D),t(u)===null&&D===t(h)&&(k?(M(W),W=-1):k=!0,pe(Q,q-E))):(D.sortIndex=X,e(u,D),w||v||(w=!0,$e(T))),D},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(D){var z=x;return function(){var q=x;x=z;try{return D.apply(this,arguments)}finally{x=q}}}})(lp)),lp}var i4;function Wk(){return i4||(i4=1,ap.exports=Hk()),ap.exports}/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its 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 s4;function Bk(){if(s4)return _r;s4=1;var n=eg(),e=Wk();function t(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(i[o]=l,o=0;o<l.length;o++)r.add(l[o])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},O={};function x(o){return u.call(O,o)?!0:u.call(m,o)?!1:h.test(o)?O[o]=!0:(m[o]=!0,!1)}function v(o,l,f,g){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:f!==null?!f.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function w(o,l,f,g){if(l===null||typeof l>"u"||v(o,l,f,g))return!0;if(g)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function k(o,l,f,g,y,b,P){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=y,this.mustUseProperty=f,this.propertyName=o,this.type=l,this.sanitizeURL=b,this.removeEmptyString=P}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){$[o]=new k(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];$[l]=new k(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){$[o]=new k(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){$[o]=new k(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){$[o]=new k(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){$[o]=new k(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){$[o]=new k(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){$[o]=new k(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){$[o]=new k(o,5,!1,o.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function V(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(M,V);$[l]=new k(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(M,V);$[l]=new k(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(M,V);$[l]=new k(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){$[o]=new k(o,1,!1,o.toLowerCase(),null,!1,!1)}),$.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){$[o]=new k(o,1,!1,o.toLowerCase(),null,!0,!0)});function A(o,l,f,g){var y=$.hasOwnProperty(l)?$[l]:null;(y!==null?y.type!==0:g||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(w(l,f,y,g)&&(f=null),g||y===null?x(l)&&(f===null?o.removeAttribute(l):o.setAttribute(l,""+f)):y.mustUseProperty?o[y.propertyName]=f===null?y.type===3?!1:"":f:(l=y.attributeName,g=y.attributeNamespace,f===null?o.removeAttribute(l):(y=y.type,f=y===3||y===4&&f===!0?"":""+f,g?o.setAttributeNS(g,l,f):o.setAttribute(l,f))))}var Q=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=Symbol.for("react.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),ie=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ye=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),$e=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),D=Symbol.iterator;function z(o){return o===null||typeof o!="object"?null:(o=D&&o[D]||o["@@iterator"],typeof o=="function"?o:null)}var q=Object.assign,E;function X(o){if(E===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);E=l&&l[1]||""}return`
|
|
34
|
-
`+E+o}var ee=!1;function Ce(o,l){if(!o||ee)return"";ee=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(re){var g=re}Reflect.construct(o,[],l)}else{try{l.call()}catch(re){g=re}o.call(l.prototype)}else{try{throw Error()}catch(re){g=re}o()}}catch(re){if(re&&g&&typeof re.stack=="string"){for(var y=re.stack.split(`
|
|
35
|
-
`),b=g.stack.split(`
|
|
36
|
-
`),P=y.length-1,Z=b.length-1;1<=P&&0<=Z&&y[P]!==b[Z];)Z--;for(;1<=P&&0<=Z;P--,Z--)if(y[P]!==b[Z]){if(P!==1||Z!==1)do if(P--,Z--,0>Z||y[P]!==b[Z]){var I=`
|
|
37
|
-
`+y[P].replace(" at new "," at ");return o.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",o.displayName)),I}while(1<=P&&0<=Z);break}}}finally{ee=!1,Error.prepareStackTrace=f}return(o=o?o.displayName||o.name:"")?X(o):""}function Te(o){switch(o.tag){case 5:return X(o.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return o=Ce(o.type,!1),o;case 11:return o=Ce(o.type.render,!1),o;case 1:return o=Ce(o.type,!0),o;default:return""}}function tt(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case j:return"Fragment";case N:return"Portal";case K:return"Profiler";case W:return"StrictMode";case le:return"Suspense";case ye:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case ie:return(o.displayName||"Context")+".Consumer";case ae:return(o._context.displayName||"Context")+".Provider";case L:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Oe:return l=o.displayName||null,l!==null?l:tt(o.type)||"Memo";case $e:l=o._payload,o=o._init;try{return tt(o(l))}catch{}}return null}function De(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tt(l);case 8:return l===W?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function G(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function oe(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function fe(o){var l=oe(o)?"checked":"value",f=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),g=""+o[l];if(!o.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,b=f.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return y.call(this)},set:function(P){g=""+P,b.call(this,P)}}),Object.defineProperty(o,l,{enumerable:f.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Ee(o){o._valueTracker||(o._valueTracker=fe(o))}function Le(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var f=l.getValue(),g="";return o&&(g=oe(o)?o.checked?"true":"false":o.value),o=g,o!==f?(l.setValue(o),!0):!1}function Fe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ve(o,l){var f=l.checked;return q({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??o._wrapperState.initialChecked})}function qe(o,l){var f=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;f=G(l.value!=null?l.value:f),o._wrapperState={initialChecked:g,initialValue:f,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Ue(o,l){l=l.checked,l!=null&&A(o,"checked",l,!1)}function ce(o,l){Ue(o,l);var f=G(l.value),g=l.type;if(f!=null)g==="number"?(f===0&&o.value===""||o.value!=f)&&(o.value=""+f):o.value!==""+f&&(o.value=""+f);else if(g==="submit"||g==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Se(o,l.type,f):l.hasOwnProperty("defaultValue")&&Se(o,l.type,G(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function je(o,l,f){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,f||l===o.value||(o.value=l),o.defaultValue=l}f=o.name,f!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,f!==""&&(o.name=f)}function Se(o,l,f){(l!=="number"||Fe(o.ownerDocument)!==o)&&(f==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+f&&(o.defaultValue=""+f))}var Me=Array.isArray;function ct(o,l,f,g){if(o=o.options,l){l={};for(var y=0;y<f.length;y++)l["$"+f[y]]=!0;for(f=0;f<o.length;f++)y=l.hasOwnProperty("$"+o[f].value),o[f].selected!==y&&(o[f].selected=y),y&&g&&(o[f].defaultSelected=!0)}else{for(f=""+G(f),l=null,y=0;y<o.length;y++){if(o[y].value===f){o[y].selected=!0,g&&(o[y].defaultSelected=!0);return}l!==null||o[y].disabled||(l=o[y])}l!==null&&(l.selected=!0)}}function fn(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(t(91));return q({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Mn(o,l){var f=l.value;if(f==null){if(f=l.children,l=l.defaultValue,f!=null){if(l!=null)throw Error(t(92));if(Me(f)){if(1<f.length)throw Error(t(93));f=f[0]}l=f}l==null&&(l=""),f=l}o._wrapperState={initialValue:G(f)}}function ze(o,l){var f=G(l.value),g=G(l.defaultValue);f!=null&&(f=""+f,f!==o.value&&(o.value=f),l.defaultValue==null&&o.defaultValue!==f&&(o.defaultValue=f)),g!=null&&(o.defaultValue=""+g)}function Pt(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function pt(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vt(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?pt(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var dt,Rt=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,f,g,y){MSApp.execUnsafeLocalFunction(function(){return o(l,f,g,y)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(dt=dt||document.createElement("div"),dt.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=dt.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function en(o,l){if(l){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=l;return}}o.textContent=l}var Qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},te=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(o){te.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Qt[l]=Qt[o]})});function ne(o,l,f){return l==null||typeof l=="boolean"||l===""?"":f||typeof l!="number"||l===0||Qt.hasOwnProperty(o)&&Qt[o]?(""+l).trim():l+"px"}function Ke(o,l){o=o.style;for(var f in l)if(l.hasOwnProperty(f)){var g=f.indexOf("--")===0,y=ne(f,l[f],g);f==="float"&&(f="cssFloat"),g?o.setProperty(f,y):o[f]=y}}var Ze=q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Je(o,l){if(l){if(Ze[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(t(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(t(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(t(61))}if(l.style!=null&&typeof l.style!="object")throw Error(t(62))}}function Et(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 mt=null;function wt(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ft=null,st=null,_e=null;function At(o){if(o=Cc(o)){if(typeof ft!="function")throw Error(t(280));var l=o.stateNode;l&&(l=p0(l),ft(o.stateNode,o.type,l))}}function ut(o){st?_e?_e.push(o):_e=[o]:st=o}function zt(){if(st){var o=st,l=_e;if(_e=st=null,At(o),l)for(o=0;o<l.length;o++)At(l[o])}}function Tt(o,l){return o(l)}function jt(){}var cn=!1;function yn(o,l,f){if(cn)return o(l,f);cn=!0;try{return Tt(o,l,f)}finally{cn=!1,(st!==null||_e!==null)&&(jt(),zt())}}function hn(o,l){var f=o.stateNode;if(f===null)return null;var g=p0(f);if(g===null)return null;f=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(t(231,l,typeof f));return f}var Nt=!1;if(c)try{var Yn={};Object.defineProperty(Yn,"passive",{get:function(){Nt=!0}}),window.addEventListener("test",Yn,Yn),window.removeEventListener("test",Yn,Yn)}catch{Nt=!1}function Or(o,l,f,g,y,b,P,Z,I){var re=Array.prototype.slice.call(arguments,3);try{l.apply(f,re)}catch(ge){this.onError(ge)}}var Br=!1,tr=null,nr=!1,Ps=null,Xa={onError:function(o){Br=!0,tr=o}};function io(o,l,f,g,y,b,P,Z,I){Br=!1,tr=null,Or.apply(Xa,arguments)}function ki(o,l,f,g,y,b,P,Z,I){if(io.apply(this,arguments),Br){if(Br){var re=tr;Br=!1,tr=null}else throw Error(t(198));nr||(nr=!0,Ps=re)}}function xr(o){var l=o,f=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(f=l.return),o=l.return;while(o)}return l.tag===3?f:null}function As(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function Fi(o){if(xr(o)!==o)throw Error(t(188))}function ic(o){var l=o.alternate;if(!l){if(l=xr(o),l===null)throw Error(t(188));return l!==o?null:o}for(var f=o,g=l;;){var y=f.return;if(y===null)break;var b=y.alternate;if(b===null){if(g=y.return,g!==null){f=g;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===f)return Fi(y),o;if(b===g)return Fi(y),l;b=b.sibling}throw Error(t(188))}if(f.return!==g.return)f=y,g=b;else{for(var P=!1,Z=y.child;Z;){if(Z===f){P=!0,f=y,g=b;break}if(Z===g){P=!0,g=y,f=b;break}Z=Z.sibling}if(!P){for(Z=b.child;Z;){if(Z===f){P=!0,f=b,g=y;break}if(Z===g){P=!0,g=b,f=y;break}Z=Z.sibling}if(!P)throw Error(t(189))}}if(f.alternate!==g)throw Error(t(190))}if(f.tag!==3)throw Error(t(188));return f.stateNode.current===f?o:l}function so(o){return o=ic(o),o!==null?Pi(o):null}function Pi(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=Pi(o);if(l!==null)return l;o=o.sibling}return null}var rr=e.unstable_scheduleCallback,zi=e.unstable_cancelCallback,Hi=e.unstable_shouldYield,$s=e.unstable_requestPaint,it=e.unstable_now,bt=e.unstable_getCurrentPriorityLevel,yr=e.unstable_ImmediatePriority,ai=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,vn=e.unstable_LowPriority,Wi=e.unstable_IdlePriority,bn=null,B=null;function Pe(o){if(B&&typeof B.onCommitFiberRoot=="function")try{B.onCommitFiberRoot(bn,o,void 0,(o.current.flags&128)===128)}catch{}}var ke=Math.clz32?Math.clz32:be,xe=Math.log,We=Math.LN2;function be(o){return o>>>=0,o===0?32:31-(xe(o)/We|0)|0}var Lt=64,pn=4194304;function Yt(o){switch(o&-o){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: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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function wn(o,l){var f=o.pendingLanes;if(f===0)return 0;var g=0,y=o.suspendedLanes,b=o.pingedLanes,P=f&268435455;if(P!==0){var Z=P&~y;Z!==0?g=Yt(Z):(b&=P,b!==0&&(g=Yt(b)))}else P=f&~y,P!==0?g=Yt(P):b!==0&&(g=Yt(b));if(g===0)return 0;if(l!==0&&l!==g&&(l&y)===0&&(y=g&-g,b=l&-l,y>=b||y===16&&(b&4194240)!==0))return l;if((g&4)!==0&&(g|=f&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=g;0<l;)f=31-ke(l),y=1<<f,g|=o[f],l&=~y;return g}function Ln(o,l){switch(o){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ir(o,l){for(var f=o.suspendedLanes,g=o.pingedLanes,y=o.expirationTimes,b=o.pendingLanes;0<b;){var P=31-ke(b),Z=1<<P,I=y[P];I===-1?((Z&f)===0||(Z&g)!==0)&&(y[P]=Ln(Z,l)):I<=l&&(o.expiredLanes|=Z),b&=~Z}}function qn(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Tr(){var o=Lt;return Lt<<=1,(Lt&4194240)===0&&(Lt=64),o}function Zt(o){for(var l=[],f=0;31>f;f++)l.push(o);return l}function li(o,l,f){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ke(l),o[l]=f}function tn(o,l){var f=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var g=o.eventTimes;for(o=o.expirationTimes;0<f;){var y=31-ke(f),b=1<<y;l[y]=0,g[y]=-1,o[y]=-1,f&=~b}}function Vn(o,l){var f=o.entangledLanes|=l;for(o=o.entanglements;f;){var g=31-ke(f),y=1<<g;y&l|o[g]&l&&(o[g]|=l),f&=~y}}var _t=0;function Fa(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var sc,ht,Bt,vr,Bi,Ai=!1,Yi=[],Mr=null,qi=null,Ui=null,Ht=new Map,Yr=new Map,qr=[],za="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 submit".split(" ");function Qr(o,l){switch(o){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":qi=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":Ht.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yr.delete(l.pointerId)}}function $i(o,l,f,g,y,b){return o===null||o.nativeEvent!==b?(o={blockedOn:l,domEventName:f,eventSystemFlags:g,nativeEvent:b,targetContainers:[y]},l!==null&&(l=Cc(l),l!==null&&ht(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),o)}function oc(o,l,f,g,y){switch(l){case"focusin":return Mr=$i(Mr,o,l,f,g,y),!0;case"dragenter":return qi=$i(qi,o,l,f,g,y),!0;case"mouseover":return Ui=$i(Ui,o,l,f,g,y),!0;case"pointerover":var b=y.pointerId;return Ht.set(b,$i(Ht.get(b)||null,o,l,f,g,y)),!0;case"gotpointercapture":return b=y.pointerId,Yr.set(b,$i(Yr.get(b)||null,o,l,f,g,y)),!0}return!1}function jr(o){var l=ea(o.target);if(l!==null){var f=xr(l);if(f!==null){if(l=f.tag,l===13){if(l=As(f),l!==null){o.blockedOn=l,Bi(o.priority,function(){Bt(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Gi(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var f=$n(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(f===null){f=o.nativeEvent;var g=new f.constructor(f.type,f);mt=g,f.target.dispatchEvent(g),mt=null}else return l=Cc(f),l!==null&&ht(l),o.blockedOn=f,!1;l.shift()}return!0}function Ha(o,l,f){Gi(o)&&f.delete(l)}function ci(){Ai=!1,Mr!==null&&Gi(Mr)&&(Mr=null),qi!==null&&Gi(qi)&&(qi=null),Ui!==null&&Gi(Ui)&&(Ui=null),Ht.forEach(Ha),Yr.forEach(Ha)}function Ki(o,l){o.blockedOn===l&&(o.blockedOn=null,Ai||(Ai=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ci)))}function Ji(o){function l(y){return Ki(y,o)}if(0<Yi.length){Ki(Yi[0],o);for(var f=1;f<Yi.length;f++){var g=Yi[f];g.blockedOn===o&&(g.blockedOn=null)}}for(Mr!==null&&Ki(Mr,o),qi!==null&&Ki(qi,o),Ui!==null&&Ki(Ui,o),Ht.forEach(l),Yr.forEach(l),f=0;f<qr.length;f++)g=qr[f],g.blockedOn===o&&(g.blockedOn=null);for(;0<qr.length&&(f=qr[0],f.blockedOn===null);)jr(f),f.blockedOn===null&&qr.shift()}var es=Q.ReactCurrentBatchConfig,oo=!0;function ac(o,l,f,g){var y=_t,b=es.transition;es.transition=null;try{_t=1,Cs(o,l,f,g)}finally{_t=y,es.transition=b}}function lc(o,l,f,g){var y=_t,b=es.transition;es.transition=null;try{_t=4,Cs(o,l,f,g)}finally{_t=y,es.transition=b}}function Cs(o,l,f,g){if(oo){var y=$n(o,l,f,g);if(y===null)Yf(o,l,g,ts,f),Qr(o,g);else if(oc(y,o,l,f,g))g.stopPropagation();else if(Qr(o,g),l&4&&-1<za.indexOf(o)){for(;y!==null;){var b=Cc(y);if(b!==null&&sc(b),b=$n(o,l,f,g),b===null&&Yf(o,l,g,ts,f),b===y)break;y=b}y!==null&&g.stopPropagation()}else Yf(o,l,g,null,f)}}var ts=null;function $n(o,l,f,g){if(ts=null,o=wt(g),o=ea(o),o!==null)if(l=xr(o),l===null)o=null;else if(f=l.tag,f===13){if(o=As(l),o!==null)return o;o=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return ts=o,null}function Go(o){switch(o){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(bt()){case yr:return 1;case ai:return 4;case Ut:case vn:return 16;case Wi:return 536870912;default:return 16}default:return 16}}var sn=null,ui=null,sr=null;function Ju(){if(sr)return sr;var o,l=ui,f=l.length,g,y="value"in sn?sn.value:sn.textContent,b=y.length;for(o=0;o<f&&l[o]===y[o];o++);var P=f-o;for(g=1;g<=P&&l[f-g]===y[b-g];g++);return sr=y.slice(o,1<g?1-g:void 0)}function Ko(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Wa(){return!0}function e0(){return!1}function br(o){function l(f,g,y,b,P){this._reactName=f,this._targetInst=y,this.type=g,this.nativeEvent=b,this.target=P,this.currentTarget=null;for(var Z in o)o.hasOwnProperty(Z)&&(f=o[Z],this[Z]=f?f(b):b[Z]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wa:e0,this.isPropagationStopped=e0,this}return q(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Wa)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),l}var ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cc=br(ao),ns=q({},ao,{view:0,detail:0}),Ba=br(ns),rs,_n,lo,Ya=q({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==lo&&(lo&&o.type==="mousemove"?(rs=o.screenX-lo.screenX,_n=o.screenY-lo.screenY):_n=rs=0,lo=o),rs)},movementY:function(o){return"movementY"in o?o.movementY:_n}}),uc=br(Ya),kf=q({},Ya,{dataTransfer:0}),t0=br(kf),Pf=q({},ns,{relatedTarget:0}),dc=br(Pf),Af=q({},ao,{animationName:0,elapsedTime:0,pseudoElement:0}),$f=br(Af),fc=q({},ao,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),hc=br(fc),co=q({},ao,{data:0}),n0=br(co),Cf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ef={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"},Tf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mf(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=Tf[o])?!!l[o]:!1}function pc(){return Mf}var Qf=q({},ns,{key:function(o){if(o.key){var l=Cf[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Ko(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Ef[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(o){return o.type==="keypress"?Ko(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Ko(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),jf=br(Qf),Zf=q({},Ya,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wr=br(Zf),uo=q({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),mc=br(uo),Rf=q({},ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nf=br(Rf),Lf=q({},Ya,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Vf=br(Lf),r0=[9,13,27,32],gc=c&&"CompositionEvent"in window,Jo=null;c&&"documentMode"in document&&(Jo=document.documentMode);var Oc=c&&"TextEvent"in window&&!Jo,i0=c&&(!gc||Jo&&8<Jo&&11>=Jo),s0=" ",xc=!1;function yc(o,l){switch(o){case"keyup":return r0.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vc(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var fo=!1;function qa(o,l){switch(o){case"compositionend":return vc(l);case"keypress":return l.which!==32?null:(xc=!0,s0);case"textInput":return o=l.data,o===s0&&xc?null:o;default:return null}}function _f(o,l){if(fo)return o==="compositionend"||!gc&&yc(o,l)?(o=Ju(),sr=ui=sn=null,fo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return i0&&l.locale!=="ko"?null:l.data;default:return null}}var Df={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 bc(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!Df[o.type]:l==="textarea"}function wc(o,l,f,g){ut(g),l=d0(l,"onChange"),0<l.length&&(f=new cc("onChange","change",null,f,g),o.push({event:f,listeners:l}))}var ho=null,Es=null;function o0(o){mO(o,0)}function Ua(o){var l=el(o);if(Le(l))return o}function If(o,l){if(o==="change")return l}var S=!1;if(c){var C;if(c){var R="oninput"in document;if(!R){var _=document.createElement("div");_.setAttribute("oninput","return;"),R=typeof _.oninput=="function"}C=R}else C=!1;S=C&&(!document.documentMode||9<document.documentMode)}function Y(){ho&&(ho.detachEvent("onpropertychange",se),Es=ho=null)}function se(o){if(o.propertyName==="value"&&Ua(Es)){var l=[];wc(l,Es,o,wt(o)),yn(o0,l)}}function de(o,l,f){o==="focusin"?(Y(),ho=l,Es=f,ho.attachEvent("onpropertychange",se)):o==="focusout"&&Y()}function me(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Ua(Es)}function we(o,l){if(o==="click")return Ua(l)}function lt(o,l){if(o==="input"||o==="change")return Ua(l)}function xt(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var rt=typeof Object.is=="function"?Object.is:xt;function St(o,l){if(rt(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var f=Object.keys(o),g=Object.keys(l);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var y=f[g];if(!u.call(l,y)||!rt(o[y],l[y]))return!1}return!0}function Dn(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function $t(o,l){var f=Dn(o);o=0;for(var g;f;){if(f.nodeType===3){if(g=o+f.textContent.length,o<=l&&g>=l)return{node:f,offset:l-o};o=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Dn(f)}}function Ur(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?Ur(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function di(){for(var o=window,l=Fe();l instanceof o.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)o=l.contentWindow;else break;l=Fe(o.document)}return l}function Ts(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function or(o){var l=di(),f=o.focusedElem,g=o.selectionRange;if(l!==f&&f&&f.ownerDocument&&Ur(f.ownerDocument.documentElement,f)){if(g!==null&&Ts(f)){if(l=g.start,o=g.end,o===void 0&&(o=l),"selectionStart"in f)f.selectionStart=l,f.selectionEnd=Math.min(o,f.value.length);else if(o=(l=f.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var y=f.textContent.length,b=Math.min(g.start,y);g=g.end===void 0?b:Math.min(g.end,y),!o.extend&&b>g&&(y=g,g=b,b=y),y=$t(f,b);var P=$t(f,g);y&&P&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==P.node||o.focusOffset!==P.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),o.removeAllRanges(),b>g?(o.addRange(l),o.extend(P.node,P.offset)):(l.setEnd(P.node,P.offset),o.addRange(l)))}}for(l=[],o=f;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<l.length;f++)o=l[f],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var a0=c&&"documentMode"in document&&11>=document.documentMode,Ms=null,Xf=null,Sc=null,Ff=!1;function oO(o,l,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Ff||Ms==null||Ms!==Fe(g)||(g=Ms,"selectionStart"in g&&Ts(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Sc&&St(Sc,g)||(Sc=g,g=d0(Xf,"onSelect"),0<g.length&&(l=new cc("onSelect","select",null,l,f),o.push({event:l,listeners:g}),l.target=Ms)))}function l0(o,l){var f={};return f[o.toLowerCase()]=l.toLowerCase(),f["Webkit"+o]="webkit"+l,f["Moz"+o]="moz"+l,f}var Ga={animationend:l0("Animation","AnimationEnd"),animationiteration:l0("Animation","AnimationIteration"),animationstart:l0("Animation","AnimationStart"),transitionend:l0("Transition","TransitionEnd")},zf={},aO={};c&&(aO=document.createElement("div").style,"AnimationEvent"in window||(delete Ga.animationend.animation,delete Ga.animationiteration.animation,delete Ga.animationstart.animation),"TransitionEvent"in window||delete Ga.transitionend.transition);function c0(o){if(zf[o])return zf[o];if(!Ga[o])return o;var l=Ga[o],f;for(f in l)if(l.hasOwnProperty(f)&&f in aO)return zf[o]=l[f];return o}var lO=c0("animationend"),cO=c0("animationiteration"),uO=c0("animationstart"),dO=c0("transitionend"),fO=new Map,hO="abort auxClick 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(" ");function po(o,l){fO.set(o,l),s(l,[o])}for(var Hf=0;Hf<hO.length;Hf++){var Wf=hO[Hf],US=Wf.toLowerCase(),GS=Wf[0].toUpperCase()+Wf.slice(1);po(US,"on"+GS)}po(lO,"onAnimationEnd"),po(cO,"onAnimationIteration"),po(uO,"onAnimationStart"),po("dblclick","onDoubleClick"),po("focusin","onFocus"),po("focusout","onBlur"),po(dO,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kc="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(" "),KS=new Set("cancel close invalid load scroll toggle".split(" ").concat(kc));function pO(o,l,f){var g=o.type||"unknown-event";o.currentTarget=f,ki(g,l,void 0,o),o.currentTarget=null}function mO(o,l){l=(l&4)!==0;for(var f=0;f<o.length;f++){var g=o[f],y=g.event;g=g.listeners;e:{var b=void 0;if(l)for(var P=g.length-1;0<=P;P--){var Z=g[P],I=Z.instance,re=Z.currentTarget;if(Z=Z.listener,I!==b&&y.isPropagationStopped())break e;pO(y,Z,re),b=I}else for(P=0;P<g.length;P++){if(Z=g[P],I=Z.instance,re=Z.currentTarget,Z=Z.listener,I!==b&&y.isPropagationStopped())break e;pO(y,Z,re),b=I}}}if(nr)throw o=Ps,nr=!1,Ps=null,o}function nn(o,l){var f=l[eh];f===void 0&&(f=l[eh]=new Set);var g=o+"__bubble";f.has(g)||(gO(l,o,2,!1),f.add(g))}function Bf(o,l,f){var g=0;l&&(g|=4),gO(f,o,g,l)}var u0="_reactListening"+Math.random().toString(36).slice(2);function Pc(o){if(!o[u0]){o[u0]=!0,r.forEach(function(f){f!=="selectionchange"&&(KS.has(f)||Bf(f,!1,o),Bf(f,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[u0]||(l[u0]=!0,Bf("selectionchange",!1,l))}}function gO(o,l,f,g){switch(Go(l)){case 1:var y=ac;break;case 4:y=lc;break;default:y=Cs}f=y.bind(null,l,f,o),y=void 0,!Nt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),g?y!==void 0?o.addEventListener(l,f,{capture:!0,passive:y}):o.addEventListener(l,f,!0):y!==void 0?o.addEventListener(l,f,{passive:y}):o.addEventListener(l,f,!1)}function Yf(o,l,f,g,y){var b=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var Z=g.stateNode.containerInfo;if(Z===y||Z.nodeType===8&&Z.parentNode===y)break;if(P===4)for(P=g.return;P!==null;){var I=P.tag;if((I===3||I===4)&&(I=P.stateNode.containerInfo,I===y||I.nodeType===8&&I.parentNode===y))return;P=P.return}for(;Z!==null;){if(P=ea(Z),P===null)return;if(I=P.tag,I===5||I===6){g=b=P;continue e}Z=Z.parentNode}}g=g.return}yn(function(){var re=b,ge=wt(f),ve=[];e:{var he=fO.get(o);if(he!==void 0){var Ne=cc,He=o;switch(o){case"keypress":if(Ko(f)===0)break e;case"keydown":case"keyup":Ne=jf;break;case"focusin":He="focus",Ne=dc;break;case"focusout":He="blur",Ne=dc;break;case"beforeblur":case"afterblur":Ne=dc;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ne=uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ne=t0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ne=mc;break;case lO:case cO:case uO:Ne=$f;break;case dO:Ne=Nf;break;case"scroll":Ne=Ba;break;case"wheel":Ne=Vf;break;case"copy":case"cut":case"paste":Ne=hc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ne=wr}var Ge=(l&4)!==0,Sn=!Ge&&o==="scroll",U=Ge?he!==null?he+"Capture":null:he;Ge=[];for(var H=re,J;H!==null;){J=H;var Ae=J.stateNode;if(J.tag===5&&Ae!==null&&(J=Ae,U!==null&&(Ae=hn(H,U),Ae!=null&&Ge.push(Ac(H,Ae,J)))),Sn)break;H=H.return}0<Ge.length&&(he=new Ne(he,He,null,f,ge),ve.push({event:he,listeners:Ge}))}}if((l&7)===0){e:{if(he=o==="mouseover"||o==="pointerover",Ne=o==="mouseout"||o==="pointerout",he&&f!==mt&&(He=f.relatedTarget||f.fromElement)&&(ea(He)||He[Qs]))break e;if((Ne||he)&&(he=ge.window===ge?ge:(he=ge.ownerDocument)?he.defaultView||he.parentWindow:window,Ne?(He=f.relatedTarget||f.toElement,Ne=re,He=He?ea(He):null,He!==null&&(Sn=xr(He),He!==Sn||He.tag!==5&&He.tag!==6)&&(He=null)):(Ne=null,He=re),Ne!==He)){if(Ge=uc,Ae="onMouseLeave",U="onMouseEnter",H="mouse",(o==="pointerout"||o==="pointerover")&&(Ge=wr,Ae="onPointerLeave",U="onPointerEnter",H="pointer"),Sn=Ne==null?he:el(Ne),J=He==null?he:el(He),he=new Ge(Ae,H+"leave",Ne,f,ge),he.target=Sn,he.relatedTarget=J,Ae=null,ea(ge)===re&&(Ge=new Ge(U,H+"enter",He,f,ge),Ge.target=J,Ge.relatedTarget=Sn,Ae=Ge),Sn=Ae,Ne&&He)t:{for(Ge=Ne,U=He,H=0,J=Ge;J;J=Ka(J))H++;for(J=0,Ae=U;Ae;Ae=Ka(Ae))J++;for(;0<H-J;)Ge=Ka(Ge),H--;for(;0<J-H;)U=Ka(U),J--;for(;H--;){if(Ge===U||U!==null&&Ge===U.alternate)break t;Ge=Ka(Ge),U=Ka(U)}Ge=null}else Ge=null;Ne!==null&&OO(ve,he,Ne,Ge,!1),He!==null&&Sn!==null&&OO(ve,Sn,He,Ge,!0)}}e:{if(he=re?el(re):window,Ne=he.nodeName&&he.nodeName.toLowerCase(),Ne==="select"||Ne==="input"&&he.type==="file")var et=If;else if(bc(he))if(S)et=lt;else{et=me;var ot=de}else(Ne=he.nodeName)&&Ne.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&(et=we);if(et&&(et=et(o,re))){wc(ve,et,f,ge);break e}ot&&ot(o,he,re),o==="focusout"&&(ot=he._wrapperState)&&ot.controlled&&he.type==="number"&&Se(he,"number",he.value)}switch(ot=re?el(re):window,o){case"focusin":(bc(ot)||ot.contentEditable==="true")&&(Ms=ot,Xf=re,Sc=null);break;case"focusout":Sc=Xf=Ms=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,oO(ve,f,ge);break;case"selectionchange":if(a0)break;case"keydown":case"keyup":oO(ve,f,ge)}var at;if(gc)e:{switch(o){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else fo?yc(o,f)&&(gt="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(gt="onCompositionStart");gt&&(i0&&f.locale!=="ko"&&(fo||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&fo&&(at=Ju()):(sn=ge,ui="value"in sn?sn.value:sn.textContent,fo=!0)),ot=d0(re,gt),0<ot.length&&(gt=new n0(gt,o,null,f,ge),ve.push({event:gt,listeners:ot}),at?gt.data=at:(at=vc(f),at!==null&&(gt.data=at)))),(at=Oc?qa(o,f):_f(o,f))&&(re=d0(re,"onBeforeInput"),0<re.length&&(ge=new n0("onBeforeInput","beforeinput",null,f,ge),ve.push({event:ge,listeners:re}),ge.data=at))}mO(ve,l)})}function Ac(o,l,f){return{instance:o,listener:l,currentTarget:f}}function d0(o,l){for(var f=l+"Capture",g=[];o!==null;){var y=o,b=y.stateNode;y.tag===5&&b!==null&&(y=b,b=hn(o,f),b!=null&&g.unshift(Ac(o,b,y)),b=hn(o,l),b!=null&&g.push(Ac(o,b,y))),o=o.return}return g}function Ka(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function OO(o,l,f,g,y){for(var b=l._reactName,P=[];f!==null&&f!==g;){var Z=f,I=Z.alternate,re=Z.stateNode;if(I!==null&&I===g)break;Z.tag===5&&re!==null&&(Z=re,y?(I=hn(f,b),I!=null&&P.unshift(Ac(f,I,Z))):y||(I=hn(f,b),I!=null&&P.push(Ac(f,I,Z)))),f=f.return}P.length!==0&&o.push({event:l,listeners:P})}var JS=/\r\n?/g,ek=/\u0000|\uFFFD/g;function xO(o){return(typeof o=="string"?o:""+o).replace(JS,`
|
|
38
|
-
`).replace(ek,"")}function f0(o,l,f){if(l=xO(l),xO(o)!==l&&f)throw Error(t(425))}function h0(){}var qf=null,Uf=null;function Gf(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Kf=typeof setTimeout=="function"?setTimeout:void 0,tk=typeof clearTimeout=="function"?clearTimeout:void 0,yO=typeof Promise=="function"?Promise:void 0,nk=typeof queueMicrotask=="function"?queueMicrotask:typeof yO<"u"?function(o){return yO.resolve(null).then(o).catch(rk)}:Kf;function rk(o){setTimeout(function(){throw o})}function Jf(o,l){var f=l,g=0;do{var y=f.nextSibling;if(o.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(g===0){o.removeChild(y),Ji(l);return}g--}else f!=="$"&&f!=="$?"&&f!=="$!"||g++;f=y}while(f);Ji(l)}function mo(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function vO(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return o;l--}else f==="/$"&&l++}o=o.previousSibling}return null}var Ja=Math.random().toString(36).slice(2),is="__reactFiber$"+Ja,$c="__reactProps$"+Ja,Qs="__reactContainer$"+Ja,eh="__reactEvents$"+Ja,ik="__reactListeners$"+Ja,sk="__reactHandles$"+Ja;function ea(o){var l=o[is];if(l)return l;for(var f=o.parentNode;f;){if(l=f[Qs]||f[is]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(o=vO(o);o!==null;){if(f=o[is])return f;o=vO(o)}return l}o=f,f=o.parentNode}return null}function Cc(o){return o=o[is]||o[Qs],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function el(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(t(33))}function p0(o){return o[$c]||null}var th=[],tl=-1;function go(o){return{current:o}}function rn(o){0>tl||(o.current=th[tl],th[tl]=null,tl--)}function Kt(o,l){tl++,th[tl]=o.current,o.current=l}var Oo={},ar=go(Oo),Zr=go(!1),ta=Oo;function nl(o,l){var f=o.type.contextTypes;if(!f)return Oo;var g=o.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var y={},b;for(b in f)y[b]=l[b];return g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=y),y}function Rr(o){return o=o.childContextTypes,o!=null}function m0(){rn(Zr),rn(ar)}function bO(o,l,f){if(ar.current!==Oo)throw Error(t(168));Kt(ar,l),Kt(Zr,f)}function wO(o,l,f){var g=o.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return f;g=g.getChildContext();for(var y in g)if(!(y in l))throw Error(t(108,De(o)||"Unknown",y));return q({},f,g)}function g0(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Oo,ta=ar.current,Kt(ar,o),Kt(Zr,Zr.current),!0}function SO(o,l,f){var g=o.stateNode;if(!g)throw Error(t(169));f?(o=wO(o,l,ta),g.__reactInternalMemoizedMergedChildContext=o,rn(Zr),rn(ar),Kt(ar,o)):rn(Zr),Kt(Zr,f)}var js=null,O0=!1,nh=!1;function kO(o){js===null?js=[o]:js.push(o)}function ok(o){O0=!0,kO(o)}function xo(){if(!nh&&js!==null){nh=!0;var o=0,l=_t;try{var f=js;for(_t=1;o<f.length;o++){var g=f[o];do g=g(!0);while(g!==null)}js=null,O0=!1}catch(y){throw js!==null&&(js=js.slice(o+1)),rr(yr,xo),y}finally{_t=l,nh=!1}}return null}var rl=[],il=0,x0=null,y0=0,fi=[],hi=0,na=null,Zs=1,Rs="";function ra(o,l){rl[il++]=y0,rl[il++]=x0,x0=o,y0=l}function PO(o,l,f){fi[hi++]=Zs,fi[hi++]=Rs,fi[hi++]=na,na=o;var g=Zs;o=Rs;var y=32-ke(g)-1;g&=~(1<<y),f+=1;var b=32-ke(l)+y;if(30<b){var P=y-y%5;b=(g&(1<<P)-1).toString(32),g>>=P,y-=P,Zs=1<<32-ke(l)+y|f<<y|g,Rs=b+o}else Zs=1<<b|f<<y|g,Rs=o}function rh(o){o.return!==null&&(ra(o,1),PO(o,1,0))}function ih(o){for(;o===x0;)x0=rl[--il],rl[il]=null,y0=rl[--il],rl[il]=null;for(;o===na;)na=fi[--hi],fi[hi]=null,Rs=fi[--hi],fi[hi]=null,Zs=fi[--hi],fi[hi]=null}var Gr=null,Kr=null,on=!1,Ci=null;function AO(o,l){var f=Oi(5,null,null,0);f.elementType="DELETED",f.stateNode=l,f.return=o,l=o.deletions,l===null?(o.deletions=[f],o.flags|=16):l.push(f)}function $O(o,l){switch(o.tag){case 5:var f=o.type;return l=l.nodeType!==1||f.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Gr=o,Kr=mo(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Gr=o,Kr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(f=na!==null?{id:Zs,overflow:Rs}:null,o.memoizedState={dehydrated:l,treeContext:f,retryLane:1073741824},f=Oi(18,null,null,0),f.stateNode=l,f.return=o,o.child=f,Gr=o,Kr=null,!0):!1;default:return!1}}function sh(o){return(o.mode&1)!==0&&(o.flags&128)===0}function oh(o){if(on){var l=Kr;if(l){var f=l;if(!$O(o,l)){if(sh(o))throw Error(t(418));l=mo(f.nextSibling);var g=Gr;l&&$O(o,l)?AO(g,f):(o.flags=o.flags&-4097|2,on=!1,Gr=o)}}else{if(sh(o))throw Error(t(418));o.flags=o.flags&-4097|2,on=!1,Gr=o}}}function CO(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Gr=o}function v0(o){if(o!==Gr)return!1;if(!on)return CO(o),on=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Gf(o.type,o.memoizedProps)),l&&(l=Kr)){if(sh(o))throw EO(),Error(t(418));for(;l;)AO(o,l),l=mo(l.nextSibling)}if(CO(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(t(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="/$"){if(l===0){Kr=mo(o.nextSibling);break e}l--}else f!=="$"&&f!=="$!"&&f!=="$?"||l++}o=o.nextSibling}Kr=null}}else Kr=Gr?mo(o.stateNode.nextSibling):null;return!0}function EO(){for(var o=Kr;o;)o=mo(o.nextSibling)}function sl(){Kr=Gr=null,on=!1}function ah(o){Ci===null?Ci=[o]:Ci.push(o)}var ak=Q.ReactCurrentBatchConfig;function Ec(o,l,f){if(o=f.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(t(309));var g=f.stateNode}if(!g)throw Error(t(147,o));var y=g,b=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===b?l.ref:(l=function(P){var Z=y.refs;P===null?delete Z[b]:Z[b]=P},l._stringRef=b,l)}if(typeof o!="string")throw Error(t(284));if(!f._owner)throw Error(t(290,o))}return o}function b0(o,l){throw o=Object.prototype.toString.call(l),Error(t(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function TO(o){var l=o._init;return l(o._payload)}function MO(o){function l(U,H){if(o){var J=U.deletions;J===null?(U.deletions=[H],U.flags|=16):J.push(H)}}function f(U,H){if(!o)return null;for(;H!==null;)l(U,H),H=H.sibling;return null}function g(U,H){for(U=new Map;H!==null;)H.key!==null?U.set(H.key,H):U.set(H.index,H),H=H.sibling;return U}function y(U,H){return U=Ao(U,H),U.index=0,U.sibling=null,U}function b(U,H,J){return U.index=J,o?(J=U.alternate,J!==null?(J=J.index,J<H?(U.flags|=2,H):J):(U.flags|=2,H)):(U.flags|=1048576,H)}function P(U){return o&&U.alternate===null&&(U.flags|=2),U}function Z(U,H,J,Ae){return H===null||H.tag!==6?(H=Kh(J,U.mode,Ae),H.return=U,H):(H=y(H,J),H.return=U,H)}function I(U,H,J,Ae){var et=J.type;return et===j?ge(U,H,J.props.children,Ae,J.key):H!==null&&(H.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===$e&&TO(et)===H.type)?(Ae=y(H,J.props),Ae.ref=Ec(U,H,J),Ae.return=U,Ae):(Ae=H0(J.type,J.key,J.props,null,U.mode,Ae),Ae.ref=Ec(U,H,J),Ae.return=U,Ae)}function re(U,H,J,Ae){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=Jh(J,U.mode,Ae),H.return=U,H):(H=y(H,J.children||[]),H.return=U,H)}function ge(U,H,J,Ae,et){return H===null||H.tag!==7?(H=da(J,U.mode,Ae,et),H.return=U,H):(H=y(H,J),H.return=U,H)}function ve(U,H,J){if(typeof H=="string"&&H!==""||typeof H=="number")return H=Kh(""+H,U.mode,J),H.return=U,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case T:return J=H0(H.type,H.key,H.props,null,U.mode,J),J.ref=Ec(U,null,H),J.return=U,J;case N:return H=Jh(H,U.mode,J),H.return=U,H;case $e:var Ae=H._init;return ve(U,Ae(H._payload),J)}if(Me(H)||z(H))return H=da(H,U.mode,J,null),H.return=U,H;b0(U,H)}return null}function he(U,H,J,Ae){var et=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return et!==null?null:Z(U,H,""+J,Ae);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case T:return J.key===et?I(U,H,J,Ae):null;case N:return J.key===et?re(U,H,J,Ae):null;case $e:return et=J._init,he(U,H,et(J._payload),Ae)}if(Me(J)||z(J))return et!==null?null:ge(U,H,J,Ae,null);b0(U,J)}return null}function Ne(U,H,J,Ae,et){if(typeof Ae=="string"&&Ae!==""||typeof Ae=="number")return U=U.get(J)||null,Z(H,U,""+Ae,et);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case T:return U=U.get(Ae.key===null?J:Ae.key)||null,I(H,U,Ae,et);case N:return U=U.get(Ae.key===null?J:Ae.key)||null,re(H,U,Ae,et);case $e:var ot=Ae._init;return Ne(U,H,J,ot(Ae._payload),et)}if(Me(Ae)||z(Ae))return U=U.get(J)||null,ge(H,U,Ae,et,null);b0(H,Ae)}return null}function He(U,H,J,Ae){for(var et=null,ot=null,at=H,gt=H=0,Fn=null;at!==null&><J.length;gt++){at.index>gt?(Fn=at,at=null):Fn=at.sibling;var Wt=he(U,at,J[gt],Ae);if(Wt===null){at===null&&(at=Fn);break}o&&at&&Wt.alternate===null&&l(U,at),H=b(Wt,H,gt),ot===null?et=Wt:ot.sibling=Wt,ot=Wt,at=Fn}if(gt===J.length)return f(U,at),on&&ra(U,gt),et;if(at===null){for(;gt<J.length;gt++)at=ve(U,J[gt],Ae),at!==null&&(H=b(at,H,gt),ot===null?et=at:ot.sibling=at,ot=at);return on&&ra(U,gt),et}for(at=g(U,at);gt<J.length;gt++)Fn=Ne(at,U,gt,J[gt],Ae),Fn!==null&&(o&&Fn.alternate!==null&&at.delete(Fn.key===null?gt:Fn.key),H=b(Fn,H,gt),ot===null?et=Fn:ot.sibling=Fn,ot=Fn);return o&&at.forEach(function($o){return l(U,$o)}),on&&ra(U,gt),et}function Ge(U,H,J,Ae){var et=z(J);if(typeof et!="function")throw Error(t(150));if(J=et.call(J),J==null)throw Error(t(151));for(var ot=et=null,at=H,gt=H=0,Fn=null,Wt=J.next();at!==null&&!Wt.done;gt++,Wt=J.next()){at.index>gt?(Fn=at,at=null):Fn=at.sibling;var $o=he(U,at,Wt.value,Ae);if($o===null){at===null&&(at=Fn);break}o&&at&&$o.alternate===null&&l(U,at),H=b($o,H,gt),ot===null?et=$o:ot.sibling=$o,ot=$o,at=Fn}if(Wt.done)return f(U,at),on&&ra(U,gt),et;if(at===null){for(;!Wt.done;gt++,Wt=J.next())Wt=ve(U,Wt.value,Ae),Wt!==null&&(H=b(Wt,H,gt),ot===null?et=Wt:ot.sibling=Wt,ot=Wt);return on&&ra(U,gt),et}for(at=g(U,at);!Wt.done;gt++,Wt=J.next())Wt=Ne(at,U,gt,Wt.value,Ae),Wt!==null&&(o&&Wt.alternate!==null&&at.delete(Wt.key===null?gt:Wt.key),H=b(Wt,H,gt),ot===null?et=Wt:ot.sibling=Wt,ot=Wt);return o&&at.forEach(function(Dk){return l(U,Dk)}),on&&ra(U,gt),et}function Sn(U,H,J,Ae){if(typeof J=="object"&&J!==null&&J.type===j&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case T:e:{for(var et=J.key,ot=H;ot!==null;){if(ot.key===et){if(et=J.type,et===j){if(ot.tag===7){f(U,ot.sibling),H=y(ot,J.props.children),H.return=U,U=H;break e}}else if(ot.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===$e&&TO(et)===ot.type){f(U,ot.sibling),H=y(ot,J.props),H.ref=Ec(U,ot,J),H.return=U,U=H;break e}f(U,ot);break}else l(U,ot);ot=ot.sibling}J.type===j?(H=da(J.props.children,U.mode,Ae,J.key),H.return=U,U=H):(Ae=H0(J.type,J.key,J.props,null,U.mode,Ae),Ae.ref=Ec(U,H,J),Ae.return=U,U=Ae)}return P(U);case N:e:{for(ot=J.key;H!==null;){if(H.key===ot)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){f(U,H.sibling),H=y(H,J.children||[]),H.return=U,U=H;break e}else{f(U,H);break}else l(U,H);H=H.sibling}H=Jh(J,U.mode,Ae),H.return=U,U=H}return P(U);case $e:return ot=J._init,Sn(U,H,ot(J._payload),Ae)}if(Me(J))return He(U,H,J,Ae);if(z(J))return Ge(U,H,J,Ae);b0(U,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,H!==null&&H.tag===6?(f(U,H.sibling),H=y(H,J),H.return=U,U=H):(f(U,H),H=Kh(J,U.mode,Ae),H.return=U,U=H),P(U)):f(U,H)}return Sn}var ol=MO(!0),QO=MO(!1),w0=go(null),S0=null,al=null,lh=null;function ch(){lh=al=S0=null}function uh(o){var l=w0.current;rn(w0),o._currentValue=l}function dh(o,l,f){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===f)break;o=o.return}}function ll(o,l){S0=o,lh=al=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(Nr=!0),o.firstContext=null)}function pi(o){var l=o._currentValue;if(lh!==o)if(o={context:o,memoizedValue:l,next:null},al===null){if(S0===null)throw Error(t(308));al=o,S0.dependencies={lanes:0,firstContext:o}}else al=al.next=o;return l}var ia=null;function fh(o){ia===null?ia=[o]:ia.push(o)}function jO(o,l,f,g){var y=l.interleaved;return y===null?(f.next=f,fh(l)):(f.next=y.next,y.next=f),l.interleaved=f,Ns(o,g)}function Ns(o,l){o.lanes|=l;var f=o.alternate;for(f!==null&&(f.lanes|=l),f=o,o=o.return;o!==null;)o.childLanes|=l,f=o.alternate,f!==null&&(f.childLanes|=l),f=o,o=o.return;return f.tag===3?f.stateNode:null}var yo=!1;function hh(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZO(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Ls(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function vo(o,l,f){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(Dt&2)!==0){var y=g.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),g.pending=l,Ns(o,f)}return y=g.interleaved,y===null?(l.next=l,fh(g)):(l.next=y.next,y.next=l),g.interleaved=l,Ns(o,f)}function k0(o,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194240)!==0)){var g=l.lanes;g&=o.pendingLanes,f|=g,l.lanes=f,Vn(o,f)}}function RO(o,l){var f=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var y=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var P={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};b===null?y=b=P:b=b.next=P,f=f.next}while(f!==null);b===null?y=b=l:b=b.next=l}else y=b=l;f={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:g.shared,effects:g.effects},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=l:o.next=l,f.lastBaseUpdate=l}function P0(o,l,f,g){var y=o.updateQueue;yo=!1;var b=y.firstBaseUpdate,P=y.lastBaseUpdate,Z=y.shared.pending;if(Z!==null){y.shared.pending=null;var I=Z,re=I.next;I.next=null,P===null?b=re:P.next=re,P=I;var ge=o.alternate;ge!==null&&(ge=ge.updateQueue,Z=ge.lastBaseUpdate,Z!==P&&(Z===null?ge.firstBaseUpdate=re:Z.next=re,ge.lastBaseUpdate=I))}if(b!==null){var ve=y.baseState;P=0,ge=re=I=null,Z=b;do{var he=Z.lane,Ne=Z.eventTime;if((g&he)===he){ge!==null&&(ge=ge.next={eventTime:Ne,lane:0,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null});e:{var He=o,Ge=Z;switch(he=l,Ne=f,Ge.tag){case 1:if(He=Ge.payload,typeof He=="function"){ve=He.call(Ne,ve,he);break e}ve=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=Ge.payload,he=typeof He=="function"?He.call(Ne,ve,he):He,he==null)break e;ve=q({},ve,he);break e;case 2:yo=!0}}Z.callback!==null&&Z.lane!==0&&(o.flags|=64,he=y.effects,he===null?y.effects=[Z]:he.push(Z))}else Ne={eventTime:Ne,lane:he,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},ge===null?(re=ge=Ne,I=ve):ge=ge.next=Ne,P|=he;if(Z=Z.next,Z===null){if(Z=y.shared.pending,Z===null)break;he=Z,Z=he.next,he.next=null,y.lastBaseUpdate=he,y.shared.pending=null}}while(!0);if(ge===null&&(I=ve),y.baseState=I,y.firstBaseUpdate=re,y.lastBaseUpdate=ge,l=y.shared.interleaved,l!==null){y=l;do P|=y.lane,y=y.next;while(y!==l)}else b===null&&(y.shared.lanes=0);aa|=P,o.lanes=P,o.memoizedState=ve}}function NO(o,l,f){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var g=o[l],y=g.callback;if(y!==null){if(g.callback=null,g=f,typeof y!="function")throw Error(t(191,y));y.call(g)}}}var Tc={},ss=go(Tc),Mc=go(Tc),Qc=go(Tc);function sa(o){if(o===Tc)throw Error(t(174));return o}function ph(o,l){switch(Kt(Qc,l),Kt(Mc,o),Kt(ss,Tc),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:vt(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=vt(l,o)}rn(ss),Kt(ss,l)}function cl(){rn(ss),rn(Mc),rn(Qc)}function LO(o){sa(Qc.current);var l=sa(ss.current),f=vt(l,o.type);l!==f&&(Kt(Mc,o),Kt(ss,f))}function mh(o){Mc.current===o&&(rn(ss),rn(Mc))}var un=go(0);function A0(o){for(var l=o;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var gh=[];function Oh(){for(var o=0;o<gh.length;o++)gh[o]._workInProgressVersionPrimary=null;gh.length=0}var $0=Q.ReactCurrentDispatcher,xh=Q.ReactCurrentBatchConfig,oa=0,dn=null,Qn=null,In=null,C0=!1,jc=!1,Zc=0,lk=0;function lr(){throw Error(t(321))}function yh(o,l){if(l===null)return!1;for(var f=0;f<l.length&&f<o.length;f++)if(!rt(o[f],l[f]))return!1;return!0}function vh(o,l,f,g,y,b){if(oa=b,dn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$0.current=o===null||o.memoizedState===null?fk:hk,o=f(g,y),jc){b=0;do{if(jc=!1,Zc=0,25<=b)throw Error(t(301));b+=1,In=Qn=null,l.updateQueue=null,$0.current=pk,o=f(g,y)}while(jc)}if($0.current=M0,l=Qn!==null&&Qn.next!==null,oa=0,In=Qn=dn=null,C0=!1,l)throw Error(t(300));return o}function bh(){var o=Zc!==0;return Zc=0,o}function os(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?dn.memoizedState=In=o:In=In.next=o,In}function mi(){if(Qn===null){var o=dn.alternate;o=o!==null?o.memoizedState:null}else o=Qn.next;var l=In===null?dn.memoizedState:In.next;if(l!==null)In=l,Qn=o;else{if(o===null)throw Error(t(310));Qn=o,o={memoizedState:Qn.memoizedState,baseState:Qn.baseState,baseQueue:Qn.baseQueue,queue:Qn.queue,next:null},In===null?dn.memoizedState=In=o:In=In.next=o}return In}function Rc(o,l){return typeof l=="function"?l(o):l}function wh(o){var l=mi(),f=l.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=o;var g=Qn,y=g.baseQueue,b=f.pending;if(b!==null){if(y!==null){var P=y.next;y.next=b.next,b.next=P}g.baseQueue=y=b,f.pending=null}if(y!==null){b=y.next,g=g.baseState;var Z=P=null,I=null,re=b;do{var ge=re.lane;if((oa&ge)===ge)I!==null&&(I=I.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),g=re.hasEagerState?re.eagerState:o(g,re.action);else{var ve={lane:ge,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};I===null?(Z=I=ve,P=g):I=I.next=ve,dn.lanes|=ge,aa|=ge}re=re.next}while(re!==null&&re!==b);I===null?P=g:I.next=Z,rt(g,l.memoizedState)||(Nr=!0),l.memoizedState=g,l.baseState=P,l.baseQueue=I,f.lastRenderedState=g}if(o=f.interleaved,o!==null){y=o;do b=y.lane,dn.lanes|=b,aa|=b,y=y.next;while(y!==o)}else y===null&&(f.lanes=0);return[l.memoizedState,f.dispatch]}function Sh(o){var l=mi(),f=l.queue;if(f===null)throw Error(t(311));f.lastRenderedReducer=o;var g=f.dispatch,y=f.pending,b=l.memoizedState;if(y!==null){f.pending=null;var P=y=y.next;do b=o(b,P.action),P=P.next;while(P!==y);rt(b,l.memoizedState)||(Nr=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),f.lastRenderedState=b}return[b,g]}function VO(){}function _O(o,l){var f=dn,g=mi(),y=l(),b=!rt(g.memoizedState,y);if(b&&(g.memoizedState=y,Nr=!0),g=g.queue,kh(XO.bind(null,f,g,o),[o]),g.getSnapshot!==l||b||In!==null&&In.memoizedState.tag&1){if(f.flags|=2048,Nc(9,IO.bind(null,f,g,y,l),void 0,null),Xn===null)throw Error(t(349));(oa&30)!==0||DO(f,l,y)}return y}function DO(o,l,f){o.flags|=16384,o={getSnapshot:l,value:f},l=dn.updateQueue,l===null?(l={lastEffect:null,stores:null},dn.updateQueue=l,l.stores=[o]):(f=l.stores,f===null?l.stores=[o]:f.push(o))}function IO(o,l,f,g){l.value=f,l.getSnapshot=g,FO(l)&&zO(o)}function XO(o,l,f){return f(function(){FO(l)&&zO(o)})}function FO(o){var l=o.getSnapshot;o=o.value;try{var f=l();return!rt(o,f)}catch{return!0}}function zO(o){var l=Ns(o,1);l!==null&&Qi(l,o,1,-1)}function HO(o){var l=os();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rc,lastRenderedState:o},l.queue=o,o=o.dispatch=dk.bind(null,dn,o),[l.memoizedState,o]}function Nc(o,l,f,g){return o={tag:o,create:l,destroy:f,deps:g,next:null},l=dn.updateQueue,l===null?(l={lastEffect:null,stores:null},dn.updateQueue=l,l.lastEffect=o.next=o):(f=l.lastEffect,f===null?l.lastEffect=o.next=o:(g=f.next,f.next=o,o.next=g,l.lastEffect=o)),o}function WO(){return mi().memoizedState}function E0(o,l,f,g){var y=os();dn.flags|=o,y.memoizedState=Nc(1|l,f,void 0,g===void 0?null:g)}function T0(o,l,f,g){var y=mi();g=g===void 0?null:g;var b=void 0;if(Qn!==null){var P=Qn.memoizedState;if(b=P.destroy,g!==null&&yh(g,P.deps)){y.memoizedState=Nc(l,f,b,g);return}}dn.flags|=o,y.memoizedState=Nc(1|l,f,b,g)}function BO(o,l){return E0(8390656,8,o,l)}function kh(o,l){return T0(2048,8,o,l)}function YO(o,l){return T0(4,2,o,l)}function qO(o,l){return T0(4,4,o,l)}function UO(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function GO(o,l,f){return f=f!=null?f.concat([o]):null,T0(4,4,UO.bind(null,l,o),f)}function Ph(){}function KO(o,l){var f=mi();l=l===void 0?null:l;var g=f.memoizedState;return g!==null&&l!==null&&yh(l,g[1])?g[0]:(f.memoizedState=[o,l],o)}function JO(o,l){var f=mi();l=l===void 0?null:l;var g=f.memoizedState;return g!==null&&l!==null&&yh(l,g[1])?g[0]:(o=o(),f.memoizedState=[o,l],o)}function e8(o,l,f){return(oa&21)===0?(o.baseState&&(o.baseState=!1,Nr=!0),o.memoizedState=f):(rt(f,l)||(f=Tr(),dn.lanes|=f,aa|=f,o.baseState=!0),l)}function ck(o,l){var f=_t;_t=f!==0&&4>f?f:4,o(!0);var g=xh.transition;xh.transition={};try{o(!1),l()}finally{_t=f,xh.transition=g}}function t8(){return mi().memoizedState}function uk(o,l,f){var g=ko(o);if(f={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null},n8(o))r8(l,f);else if(f=jO(o,l,f,g),f!==null){var y=kr();Qi(f,o,g,y),i8(f,l,g)}}function dk(o,l,f){var g=ko(o),y={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null};if(n8(o))r8(l,y);else{var b=o.alternate;if(o.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var P=l.lastRenderedState,Z=b(P,f);if(y.hasEagerState=!0,y.eagerState=Z,rt(Z,P)){var I=l.interleaved;I===null?(y.next=y,fh(l)):(y.next=I.next,I.next=y),l.interleaved=y;return}}catch{}finally{}f=jO(o,l,y,g),f!==null&&(y=kr(),Qi(f,o,g,y),i8(f,l,g))}}function n8(o){var l=o.alternate;return o===dn||l!==null&&l===dn}function r8(o,l){jc=C0=!0;var f=o.pending;f===null?l.next=l:(l.next=f.next,f.next=l),o.pending=l}function i8(o,l,f){if((f&4194240)!==0){var g=l.lanes;g&=o.pendingLanes,f|=g,l.lanes=f,Vn(o,f)}}var M0={readContext:pi,useCallback:lr,useContext:lr,useEffect:lr,useImperativeHandle:lr,useInsertionEffect:lr,useLayoutEffect:lr,useMemo:lr,useReducer:lr,useRef:lr,useState:lr,useDebugValue:lr,useDeferredValue:lr,useTransition:lr,useMutableSource:lr,useSyncExternalStore:lr,useId:lr,unstable_isNewReconciler:!1},fk={readContext:pi,useCallback:function(o,l){return os().memoizedState=[o,l===void 0?null:l],o},useContext:pi,useEffect:BO,useImperativeHandle:function(o,l,f){return f=f!=null?f.concat([o]):null,E0(4194308,4,UO.bind(null,l,o),f)},useLayoutEffect:function(o,l){return E0(4194308,4,o,l)},useInsertionEffect:function(o,l){return E0(4,2,o,l)},useMemo:function(o,l){var f=os();return l=l===void 0?null:l,o=o(),f.memoizedState=[o,l],o},useReducer:function(o,l,f){var g=os();return l=f!==void 0?f(l):l,g.memoizedState=g.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},g.queue=o,o=o.dispatch=uk.bind(null,dn,o),[g.memoizedState,o]},useRef:function(o){var l=os();return o={current:o},l.memoizedState=o},useState:HO,useDebugValue:Ph,useDeferredValue:function(o){return os().memoizedState=o},useTransition:function(){var o=HO(!1),l=o[0];return o=ck.bind(null,o[1]),os().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,f){var g=dn,y=os();if(on){if(f===void 0)throw Error(t(407));f=f()}else{if(f=l(),Xn===null)throw Error(t(349));(oa&30)!==0||DO(g,l,f)}y.memoizedState=f;var b={value:f,getSnapshot:l};return y.queue=b,BO(XO.bind(null,g,b,o),[o]),g.flags|=2048,Nc(9,IO.bind(null,g,b,f,l),void 0,null),f},useId:function(){var o=os(),l=Xn.identifierPrefix;if(on){var f=Rs,g=Zs;f=(g&~(1<<32-ke(g)-1)).toString(32)+f,l=":"+l+"R"+f,f=Zc++,0<f&&(l+="H"+f.toString(32)),l+=":"}else f=lk++,l=":"+l+"r"+f.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},hk={readContext:pi,useCallback:KO,useContext:pi,useEffect:kh,useImperativeHandle:GO,useInsertionEffect:YO,useLayoutEffect:qO,useMemo:JO,useReducer:wh,useRef:WO,useState:function(){return wh(Rc)},useDebugValue:Ph,useDeferredValue:function(o){var l=mi();return e8(l,Qn.memoizedState,o)},useTransition:function(){var o=wh(Rc)[0],l=mi().memoizedState;return[o,l]},useMutableSource:VO,useSyncExternalStore:_O,useId:t8,unstable_isNewReconciler:!1},pk={readContext:pi,useCallback:KO,useContext:pi,useEffect:kh,useImperativeHandle:GO,useInsertionEffect:YO,useLayoutEffect:qO,useMemo:JO,useReducer:Sh,useRef:WO,useState:function(){return Sh(Rc)},useDebugValue:Ph,useDeferredValue:function(o){var l=mi();return Qn===null?l.memoizedState=o:e8(l,Qn.memoizedState,o)},useTransition:function(){var o=Sh(Rc)[0],l=mi().memoizedState;return[o,l]},useMutableSource:VO,useSyncExternalStore:_O,useId:t8,unstable_isNewReconciler:!1};function Ei(o,l){if(o&&o.defaultProps){l=q({},l),o=o.defaultProps;for(var f in o)l[f]===void 0&&(l[f]=o[f]);return l}return l}function Ah(o,l,f,g){l=o.memoizedState,f=f(g,l),f=f==null?l:q({},l,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var Q0={isMounted:function(o){return(o=o._reactInternals)?xr(o)===o:!1},enqueueSetState:function(o,l,f){o=o._reactInternals;var g=kr(),y=ko(o),b=Ls(g,y);b.payload=l,f!=null&&(b.callback=f),l=vo(o,b,y),l!==null&&(Qi(l,o,y,g),k0(l,o,y))},enqueueReplaceState:function(o,l,f){o=o._reactInternals;var g=kr(),y=ko(o),b=Ls(g,y);b.tag=1,b.payload=l,f!=null&&(b.callback=f),l=vo(o,b,y),l!==null&&(Qi(l,o,y,g),k0(l,o,y))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var f=kr(),g=ko(o),y=Ls(f,g);y.tag=2,l!=null&&(y.callback=l),l=vo(o,y,g),l!==null&&(Qi(l,o,g,f),k0(l,o,g))}};function s8(o,l,f,g,y,b,P){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,b,P):l.prototype&&l.prototype.isPureReactComponent?!St(f,g)||!St(y,b):!0}function o8(o,l,f){var g=!1,y=Oo,b=l.contextType;return typeof b=="object"&&b!==null?b=pi(b):(y=Rr(l)?ta:ar.current,g=l.contextTypes,b=(g=g!=null)?nl(o,y):Oo),l=new l(f,b),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Q0,o.stateNode=l,l._reactInternals=o,g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=y,o.__reactInternalMemoizedMaskedChildContext=b),l}function a8(o,l,f,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,g),l.state!==o&&Q0.enqueueReplaceState(l,l.state,null)}function $h(o,l,f,g){var y=o.stateNode;y.props=f,y.state=o.memoizedState,y.refs={},hh(o);var b=l.contextType;typeof b=="object"&&b!==null?y.context=pi(b):(b=Rr(l)?ta:ar.current,y.context=nl(o,b)),y.state=o.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(Ah(o,l,b,f),y.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(l=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),l!==y.state&&Q0.enqueueReplaceState(y,y.state,null),P0(o,f,y,g),y.state=o.memoizedState),typeof y.componentDidMount=="function"&&(o.flags|=4194308)}function ul(o,l){try{var f="",g=l;do f+=Te(g),g=g.return;while(g);var y=f}catch(b){y=`
|
|
39
|
-
Error generating stack: `+b.message+`
|
|
40
|
-
`+b.stack}return{value:o,source:l,stack:y,digest:null}}function Ch(o,l,f){return{value:o,source:null,stack:f??null,digest:l??null}}function Eh(o,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var mk=typeof WeakMap=="function"?WeakMap:Map;function l8(o,l,f){f=Ls(-1,f),f.tag=3,f.payload={element:null};var g=l.value;return f.callback=function(){_0||(_0=!0,zh=g),Eh(o,l)},f}function c8(o,l,f){f=Ls(-1,f),f.tag=3;var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var y=l.value;f.payload=function(){return g(y)},f.callback=function(){Eh(o,l)}}var b=o.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(f.callback=function(){Eh(o,l),typeof g!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})}),f}function u8(o,l,f){var g=o.pingCache;if(g===null){g=o.pingCache=new mk;var y=new Set;g.set(l,y)}else y=g.get(l),y===void 0&&(y=new Set,g.set(l,y));y.has(f)||(y.add(f),o=Ek.bind(null,o,l,f),l.then(o,o))}function d8(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function f8(o,l,f,g,y){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=Ls(-1,1),l.tag=2,vo(f,l,1))),f.lanes|=1),o):(o.flags|=65536,o.lanes=y,o)}var gk=Q.ReactCurrentOwner,Nr=!1;function Sr(o,l,f,g){l.child=o===null?QO(l,null,f,g):ol(l,o.child,f,g)}function h8(o,l,f,g,y){f=f.render;var b=l.ref;return ll(l,y),g=vh(o,l,f,g,b,y),f=bh(),o!==null&&!Nr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~y,Vs(o,l,y)):(on&&f&&rh(l),l.flags|=1,Sr(o,l,g,y),l.child)}function p8(o,l,f,g,y){if(o===null){var b=f.type;return typeof b=="function"&&!Gh(b)&&b.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=b,m8(o,l,b,g,y)):(o=H0(f.type,null,g,l,l.mode,y),o.ref=l.ref,o.return=l,l.child=o)}if(b=o.child,(o.lanes&y)===0){var P=b.memoizedProps;if(f=f.compare,f=f!==null?f:St,f(P,g)&&o.ref===l.ref)return Vs(o,l,y)}return l.flags|=1,o=Ao(b,g),o.ref=l.ref,o.return=l,l.child=o}function m8(o,l,f,g,y){if(o!==null){var b=o.memoizedProps;if(St(b,g)&&o.ref===l.ref)if(Nr=!1,l.pendingProps=g=b,(o.lanes&y)!==0)(o.flags&131072)!==0&&(Nr=!0);else return l.lanes=o.lanes,Vs(o,l,y)}return Th(o,l,f,g,y)}function g8(o,l,f){var g=l.pendingProps,y=g.children,b=o!==null?o.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Kt(fl,Jr),Jr|=f;else{if((f&1073741824)===0)return o=b!==null?b.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,Kt(fl,Jr),Jr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=b!==null?b.baseLanes:f,Kt(fl,Jr),Jr|=g}else b!==null?(g=b.baseLanes|f,l.memoizedState=null):g=f,Kt(fl,Jr),Jr|=g;return Sr(o,l,y,f),l.child}function O8(o,l){var f=l.ref;(o===null&&f!==null||o!==null&&o.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function Th(o,l,f,g,y){var b=Rr(f)?ta:ar.current;return b=nl(l,b),ll(l,y),f=vh(o,l,f,g,b,y),g=bh(),o!==null&&!Nr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~y,Vs(o,l,y)):(on&&g&&rh(l),l.flags|=1,Sr(o,l,f,y),l.child)}function x8(o,l,f,g,y){if(Rr(f)){var b=!0;g0(l)}else b=!1;if(ll(l,y),l.stateNode===null)Z0(o,l),o8(l,f,g),$h(l,f,g,y),g=!0;else if(o===null){var P=l.stateNode,Z=l.memoizedProps;P.props=Z;var I=P.context,re=f.contextType;typeof re=="object"&&re!==null?re=pi(re):(re=Rr(f)?ta:ar.current,re=nl(l,re));var ge=f.getDerivedStateFromProps,ve=typeof ge=="function"||typeof P.getSnapshotBeforeUpdate=="function";ve||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(Z!==g||I!==re)&&a8(l,P,g,re),yo=!1;var he=l.memoizedState;P.state=he,P0(l,g,P,y),I=l.memoizedState,Z!==g||he!==I||Zr.current||yo?(typeof ge=="function"&&(Ah(l,f,ge,g),I=l.memoizedState),(Z=yo||s8(l,f,Z,g,he,I,re))?(ve||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(l.flags|=4194308)):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=I),P.props=g,P.state=I,P.context=re,g=Z):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{P=l.stateNode,ZO(o,l),Z=l.memoizedProps,re=l.type===l.elementType?Z:Ei(l.type,Z),P.props=re,ve=l.pendingProps,he=P.context,I=f.contextType,typeof I=="object"&&I!==null?I=pi(I):(I=Rr(f)?ta:ar.current,I=nl(l,I));var Ne=f.getDerivedStateFromProps;(ge=typeof Ne=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(Z!==ve||he!==I)&&a8(l,P,g,I),yo=!1,he=l.memoizedState,P.state=he,P0(l,g,P,y);var He=l.memoizedState;Z!==ve||he!==He||Zr.current||yo?(typeof Ne=="function"&&(Ah(l,f,Ne,g),He=l.memoizedState),(re=yo||s8(l,f,re,g,he,He,I)||!1)?(ge||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(g,He,I),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(g,He,I)),typeof P.componentDidUpdate=="function"&&(l.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof P.componentDidUpdate!="function"||Z===o.memoizedProps&&he===o.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||Z===o.memoizedProps&&he===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=He),P.props=g,P.state=He,P.context=I,g=re):(typeof P.componentDidUpdate!="function"||Z===o.memoizedProps&&he===o.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||Z===o.memoizedProps&&he===o.memoizedState||(l.flags|=1024),g=!1)}return Mh(o,l,f,g,b,y)}function Mh(o,l,f,g,y,b){O8(o,l);var P=(l.flags&128)!==0;if(!g&&!P)return y&&SO(l,f,!1),Vs(o,l,b);g=l.stateNode,gk.current=l;var Z=P&&typeof f.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,o!==null&&P?(l.child=ol(l,o.child,null,b),l.child=ol(l,null,Z,b)):Sr(o,l,Z,b),l.memoizedState=g.state,y&&SO(l,f,!0),l.child}function y8(o){var l=o.stateNode;l.pendingContext?bO(o,l.pendingContext,l.pendingContext!==l.context):l.context&&bO(o,l.context,!1),ph(o,l.containerInfo)}function v8(o,l,f,g,y){return sl(),ah(y),l.flags|=256,Sr(o,l,f,g),l.child}var Qh={dehydrated:null,treeContext:null,retryLane:0};function jh(o){return{baseLanes:o,cachePool:null,transitions:null}}function b8(o,l,f){var g=l.pendingProps,y=un.current,b=!1,P=(l.flags&128)!==0,Z;if((Z=P)||(Z=o!==null&&o.memoizedState===null?!1:(y&2)!==0),Z?(b=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(y|=1),Kt(un,y&1),o===null)return oh(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(P=g.children,o=g.fallback,b?(g=l.mode,b=l.child,P={mode:"hidden",children:P},(g&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=P):b=W0(P,g,0,null),o=da(o,g,f,null),b.return=l,o.return=l,b.sibling=o,l.child=b,l.child.memoizedState=jh(f),l.memoizedState=Qh,o):Zh(l,P));if(y=o.memoizedState,y!==null&&(Z=y.dehydrated,Z!==null))return Ok(o,l,P,g,Z,y,f);if(b){b=g.fallback,P=l.mode,y=o.child,Z=y.sibling;var I={mode:"hidden",children:g.children};return(P&1)===0&&l.child!==y?(g=l.child,g.childLanes=0,g.pendingProps=I,l.deletions=null):(g=Ao(y,I),g.subtreeFlags=y.subtreeFlags&14680064),Z!==null?b=Ao(Z,b):(b=da(b,P,f,null),b.flags|=2),b.return=l,g.return=l,g.sibling=b,l.child=g,g=b,b=l.child,P=o.child.memoizedState,P=P===null?jh(f):{baseLanes:P.baseLanes|f,cachePool:null,transitions:P.transitions},b.memoizedState=P,b.childLanes=o.childLanes&~f,l.memoizedState=Qh,g}return b=o.child,o=b.sibling,g=Ao(b,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=f),g.return=l,g.sibling=null,o!==null&&(f=l.deletions,f===null?(l.deletions=[o],l.flags|=16):f.push(o)),l.child=g,l.memoizedState=null,g}function Zh(o,l){return l=W0({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function j0(o,l,f,g){return g!==null&&ah(g),ol(l,o.child,null,f),o=Zh(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Ok(o,l,f,g,y,b,P){if(f)return l.flags&256?(l.flags&=-257,g=Ch(Error(t(422))),j0(o,l,P,g)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(b=g.fallback,y=l.mode,g=W0({mode:"visible",children:g.children},y,0,null),b=da(b,y,P,null),b.flags|=2,g.return=l,b.return=l,g.sibling=b,l.child=g,(l.mode&1)!==0&&ol(l,o.child,null,P),l.child.memoizedState=jh(P),l.memoizedState=Qh,b);if((l.mode&1)===0)return j0(o,l,P,null);if(y.data==="$!"){if(g=y.nextSibling&&y.nextSibling.dataset,g)var Z=g.dgst;return g=Z,b=Error(t(419)),g=Ch(b,g,void 0),j0(o,l,P,g)}if(Z=(P&o.childLanes)!==0,Nr||Z){if(g=Xn,g!==null){switch(P&-P){case 4:y=2;break;case 16:y=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(g.suspendedLanes|P))!==0?0:y,y!==0&&y!==b.retryLane&&(b.retryLane=y,Ns(o,y),Qi(g,o,y,-1))}return Uh(),g=Ch(Error(t(421))),j0(o,l,P,g)}return y.data==="$?"?(l.flags|=128,l.child=o.child,l=Tk.bind(null,o),y._reactRetry=l,null):(o=b.treeContext,Kr=mo(y.nextSibling),Gr=l,on=!0,Ci=null,o!==null&&(fi[hi++]=Zs,fi[hi++]=Rs,fi[hi++]=na,Zs=o.id,Rs=o.overflow,na=l),l=Zh(l,g.children),l.flags|=4096,l)}function w8(o,l,f){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),dh(o.return,l,f)}function Rh(o,l,f,g,y){var b=o.memoizedState;b===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:y}:(b.isBackwards=l,b.rendering=null,b.renderingStartTime=0,b.last=g,b.tail=f,b.tailMode=y)}function S8(o,l,f){var g=l.pendingProps,y=g.revealOrder,b=g.tail;if(Sr(o,l,g.children,f),g=un.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&w8(o,f,l);else if(o.tag===19)w8(o,f,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}if(Kt(un,g),(l.mode&1)===0)l.memoizedState=null;else switch(y){case"forwards":for(f=l.child,y=null;f!==null;)o=f.alternate,o!==null&&A0(o)===null&&(y=f),f=f.sibling;f=y,f===null?(y=l.child,l.child=null):(y=f.sibling,f.sibling=null),Rh(l,!1,y,f,b);break;case"backwards":for(f=null,y=l.child,l.child=null;y!==null;){if(o=y.alternate,o!==null&&A0(o)===null){l.child=y;break}o=y.sibling,y.sibling=f,f=y,y=o}Rh(l,!0,f,null,b);break;case"together":Rh(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Z0(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Vs(o,l,f){if(o!==null&&(l.dependencies=o.dependencies),aa|=l.lanes,(f&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(t(153));if(l.child!==null){for(o=l.child,f=Ao(o,o.pendingProps),l.child=f,f.return=l;o.sibling!==null;)o=o.sibling,f=f.sibling=Ao(o,o.pendingProps),f.return=l;f.sibling=null}return l.child}function xk(o,l,f){switch(l.tag){case 3:y8(l),sl();break;case 5:LO(l);break;case 1:Rr(l.type)&&g0(l);break;case 4:ph(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,y=l.memoizedProps.value;Kt(w0,g._currentValue),g._currentValue=y;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(Kt(un,un.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?b8(o,l,f):(Kt(un,un.current&1),o=Vs(o,l,f),o!==null?o.sibling:null);Kt(un,un.current&1);break;case 19:if(g=(f&l.childLanes)!==0,(o.flags&128)!==0){if(g)return S8(o,l,f);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Kt(un,un.current),g)break;return null;case 22:case 23:return l.lanes=0,g8(o,l,f)}return Vs(o,l,f)}var k8,Nh,P8,A8;k8=function(o,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)o.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},Nh=function(){},P8=function(o,l,f,g){var y=o.memoizedProps;if(y!==g){o=l.stateNode,sa(ss.current);var b=null;switch(f){case"input":y=Ve(o,y),g=Ve(o,g),b=[];break;case"select":y=q({},y,{value:void 0}),g=q({},g,{value:void 0}),b=[];break;case"textarea":y=fn(o,y),g=fn(o,g),b=[];break;default:typeof y.onClick!="function"&&typeof g.onClick=="function"&&(o.onclick=h0)}Je(f,g);var P;f=null;for(re in y)if(!g.hasOwnProperty(re)&&y.hasOwnProperty(re)&&y[re]!=null)if(re==="style"){var Z=y[re];for(P in Z)Z.hasOwnProperty(P)&&(f||(f={}),f[P]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(i.hasOwnProperty(re)?b||(b=[]):(b=b||[]).push(re,null));for(re in g){var I=g[re];if(Z=y!=null?y[re]:void 0,g.hasOwnProperty(re)&&I!==Z&&(I!=null||Z!=null))if(re==="style")if(Z){for(P in Z)!Z.hasOwnProperty(P)||I&&I.hasOwnProperty(P)||(f||(f={}),f[P]="");for(P in I)I.hasOwnProperty(P)&&Z[P]!==I[P]&&(f||(f={}),f[P]=I[P])}else f||(b||(b=[]),b.push(re,f)),f=I;else re==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,Z=Z?Z.__html:void 0,I!=null&&Z!==I&&(b=b||[]).push(re,I)):re==="children"?typeof I!="string"&&typeof I!="number"||(b=b||[]).push(re,""+I):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(i.hasOwnProperty(re)?(I!=null&&re==="onScroll"&&nn("scroll",o),b||Z===I||(b=[])):(b=b||[]).push(re,I))}f&&(b=b||[]).push("style",f);var re=b;(l.updateQueue=re)&&(l.flags|=4)}},A8=function(o,l,f,g){f!==g&&(l.flags|=4)};function Lc(o,l){if(!on)switch(o.tailMode){case"hidden":l=o.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function cr(o){var l=o.alternate!==null&&o.alternate.child===o.child,f=0,g=0;if(l)for(var y=o.child;y!==null;)f|=y.lanes|y.childLanes,g|=y.subtreeFlags&14680064,g|=y.flags&14680064,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)f|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=g,o.childLanes=f,l}function yk(o,l,f){var g=l.pendingProps;switch(ih(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cr(l),null;case 1:return Rr(l.type)&&m0(),cr(l),null;case 3:return g=l.stateNode,cl(),rn(Zr),rn(ar),Oh(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(v0(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ci!==null&&(Bh(Ci),Ci=null))),Nh(o,l),cr(l),null;case 5:mh(l);var y=sa(Qc.current);if(f=l.type,o!==null&&l.stateNode!=null)P8(o,l,f,g,y),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(t(166));return cr(l),null}if(o=sa(ss.current),v0(l)){g=l.stateNode,f=l.type;var b=l.memoizedProps;switch(g[is]=l,g[$c]=b,o=(l.mode&1)!==0,f){case"dialog":nn("cancel",g),nn("close",g);break;case"iframe":case"object":case"embed":nn("load",g);break;case"video":case"audio":for(y=0;y<kc.length;y++)nn(kc[y],g);break;case"source":nn("error",g);break;case"img":case"image":case"link":nn("error",g),nn("load",g);break;case"details":nn("toggle",g);break;case"input":qe(g,b),nn("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!b.multiple},nn("invalid",g);break;case"textarea":Mn(g,b),nn("invalid",g)}Je(f,b),y=null;for(var P in b)if(b.hasOwnProperty(P)){var Z=b[P];P==="children"?typeof Z=="string"?g.textContent!==Z&&(b.suppressHydrationWarning!==!0&&f0(g.textContent,Z,o),y=["children",Z]):typeof Z=="number"&&g.textContent!==""+Z&&(b.suppressHydrationWarning!==!0&&f0(g.textContent,Z,o),y=["children",""+Z]):i.hasOwnProperty(P)&&Z!=null&&P==="onScroll"&&nn("scroll",g)}switch(f){case"input":Ee(g),je(g,b,!0);break;case"textarea":Ee(g),Pt(g);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(g.onclick=h0)}g=y,l.updateQueue=g,g!==null&&(l.flags|=4)}else{P=y.nodeType===9?y:y.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=pt(f)),o==="http://www.w3.org/1999/xhtml"?f==="script"?(o=P.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof g.is=="string"?o=P.createElement(f,{is:g.is}):(o=P.createElement(f),f==="select"&&(P=o,g.multiple?P.multiple=!0:g.size&&(P.size=g.size))):o=P.createElementNS(o,f),o[is]=l,o[$c]=g,k8(o,l,!1,!1),l.stateNode=o;e:{switch(P=Et(f,g),f){case"dialog":nn("cancel",o),nn("close",o),y=g;break;case"iframe":case"object":case"embed":nn("load",o),y=g;break;case"video":case"audio":for(y=0;y<kc.length;y++)nn(kc[y],o);y=g;break;case"source":nn("error",o),y=g;break;case"img":case"image":case"link":nn("error",o),nn("load",o),y=g;break;case"details":nn("toggle",o),y=g;break;case"input":qe(o,g),y=Ve(o,g),nn("invalid",o);break;case"option":y=g;break;case"select":o._wrapperState={wasMultiple:!!g.multiple},y=q({},g,{value:void 0}),nn("invalid",o);break;case"textarea":Mn(o,g),y=fn(o,g),nn("invalid",o);break;default:y=g}Je(f,y),Z=y;for(b in Z)if(Z.hasOwnProperty(b)){var I=Z[b];b==="style"?Ke(o,I):b==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&Rt(o,I)):b==="children"?typeof I=="string"?(f!=="textarea"||I!=="")&&en(o,I):typeof I=="number"&&en(o,""+I):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?I!=null&&b==="onScroll"&&nn("scroll",o):I!=null&&A(o,b,I,P))}switch(f){case"input":Ee(o),je(o,g,!1);break;case"textarea":Ee(o),Pt(o);break;case"option":g.value!=null&&o.setAttribute("value",""+G(g.value));break;case"select":o.multiple=!!g.multiple,b=g.value,b!=null?ct(o,!!g.multiple,b,!1):g.defaultValue!=null&&ct(o,!!g.multiple,g.defaultValue,!0);break;default:typeof y.onClick=="function"&&(o.onclick=h0)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return cr(l),null;case 6:if(o&&l.stateNode!=null)A8(o,l,o.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(t(166));if(f=sa(Qc.current),sa(ss.current),v0(l)){if(g=l.stateNode,f=l.memoizedProps,g[is]=l,(b=g.nodeValue!==f)&&(o=Gr,o!==null))switch(o.tag){case 3:f0(g.nodeValue,f,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&f0(g.nodeValue,f,(o.mode&1)!==0)}b&&(l.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[is]=l,l.stateNode=g}return cr(l),null;case 13:if(rn(un),g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(on&&Kr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)EO(),sl(),l.flags|=98560,b=!1;else if(b=v0(l),g!==null&&g.dehydrated!==null){if(o===null){if(!b)throw Error(t(318));if(b=l.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(t(317));b[is]=l}else sl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;cr(l),b=!1}else Ci!==null&&(Bh(Ci),Ci=null),b=!0;if(!b)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(g=g!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(un.current&1)!==0?jn===0&&(jn=3):Uh())),l.updateQueue!==null&&(l.flags|=4),cr(l),null);case 4:return cl(),Nh(o,l),o===null&&Pc(l.stateNode.containerInfo),cr(l),null;case 10:return uh(l.type._context),cr(l),null;case 17:return Rr(l.type)&&m0(),cr(l),null;case 19:if(rn(un),b=l.memoizedState,b===null)return cr(l),null;if(g=(l.flags&128)!==0,P=b.rendering,P===null)if(g)Lc(b,!1);else{if(jn!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(P=A0(o),P!==null){for(l.flags|=128,Lc(b,!1),g=P.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=f,f=l.child;f!==null;)b=f,o=g,b.flags&=14680066,P=b.alternate,P===null?(b.childLanes=0,b.lanes=o,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=P.childLanes,b.lanes=P.lanes,b.child=P.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=P.memoizedProps,b.memoizedState=P.memoizedState,b.updateQueue=P.updateQueue,b.type=P.type,o=P.dependencies,b.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),f=f.sibling;return Kt(un,un.current&1|2),l.child}o=o.sibling}b.tail!==null&&it()>hl&&(l.flags|=128,g=!0,Lc(b,!1),l.lanes=4194304)}else{if(!g)if(o=A0(P),o!==null){if(l.flags|=128,g=!0,f=o.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),Lc(b,!0),b.tail===null&&b.tailMode==="hidden"&&!P.alternate&&!on)return cr(l),null}else 2*it()-b.renderingStartTime>hl&&f!==1073741824&&(l.flags|=128,g=!0,Lc(b,!1),l.lanes=4194304);b.isBackwards?(P.sibling=l.child,l.child=P):(f=b.last,f!==null?f.sibling=P:l.child=P,b.last=P)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=it(),l.sibling=null,f=un.current,Kt(un,g?f&1|2:f&1),l):(cr(l),null);case 22:case 23:return qh(),g=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(Jr&1073741824)!==0&&(cr(l),l.subtreeFlags&6&&(l.flags|=8192)):cr(l),null;case 24:return null;case 25:return null}throw Error(t(156,l.tag))}function vk(o,l){switch(ih(l),l.tag){case 1:return Rr(l.type)&&m0(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return cl(),rn(Zr),rn(ar),Oh(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return mh(l),null;case 13:if(rn(un),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(t(340));sl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return rn(un),null;case 4:return cl(),null;case 10:return uh(l.type._context),null;case 22:case 23:return qh(),null;case 24:return null;default:return null}}var R0=!1,ur=!1,bk=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function dl(o,l){var f=o.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){mn(o,l,g)}else f.current=null}function Lh(o,l,f){try{f()}catch(g){mn(o,l,g)}}var $8=!1;function wk(o,l){if(qf=oo,o=di(),Ts(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var y=g.anchorOffset,b=g.focusNode;g=g.focusOffset;try{f.nodeType,b.nodeType}catch{f=null;break e}var P=0,Z=-1,I=-1,re=0,ge=0,ve=o,he=null;t:for(;;){for(var Ne;ve!==f||y!==0&&ve.nodeType!==3||(Z=P+y),ve!==b||g!==0&&ve.nodeType!==3||(I=P+g),ve.nodeType===3&&(P+=ve.nodeValue.length),(Ne=ve.firstChild)!==null;)he=ve,ve=Ne;for(;;){if(ve===o)break t;if(he===f&&++re===y&&(Z=P),he===b&&++ge===g&&(I=P),(Ne=ve.nextSibling)!==null)break;ve=he,he=ve.parentNode}ve=Ne}f=Z===-1||I===-1?null:{start:Z,end:I}}else f=null}f=f||{start:0,end:0}}else f=null;for(Uf={focusedElem:o,selectionRange:f},oo=!1,Ie=l;Ie!==null;)if(l=Ie,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Ie=o;else for(;Ie!==null;){l=Ie;try{var He=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(He!==null){var Ge=He.memoizedProps,Sn=He.memoizedState,U=l.stateNode,H=U.getSnapshotBeforeUpdate(l.elementType===l.type?Ge:Ei(l.type,Ge),Sn);U.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Ae){mn(l,l.return,Ae)}if(o=l.sibling,o!==null){o.return=l.return,Ie=o;break}Ie=l.return}return He=$8,$8=!1,He}function Vc(o,l,f){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&o)===o){var b=y.destroy;y.destroy=void 0,b!==void 0&&Lh(l,f,b)}y=y.next}while(y!==g)}}function N0(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&o)===o){var g=f.create;f.destroy=g()}f=f.next}while(f!==l)}}function Vh(o){var l=o.ref;if(l!==null){var f=o.stateNode;switch(o.tag){case 5:o=f;break;default:o=f}typeof l=="function"?l(o):l.current=o}}function C8(o){var l=o.alternate;l!==null&&(o.alternate=null,C8(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[is],delete l[$c],delete l[eh],delete l[ik],delete l[sk])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function E8(o){return o.tag===5||o.tag===3||o.tag===4}function T8(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||E8(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function _h(o,l,f){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(o,l):f.insertBefore(o,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(o,f)):(l=f,l.appendChild(o)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=h0));else if(g!==4&&(o=o.child,o!==null))for(_h(o,l,f),o=o.sibling;o!==null;)_h(o,l,f),o=o.sibling}function Dh(o,l,f){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?f.insertBefore(o,l):f.appendChild(o);else if(g!==4&&(o=o.child,o!==null))for(Dh(o,l,f),o=o.sibling;o!==null;)Dh(o,l,f),o=o.sibling}var Un=null,Ti=!1;function bo(o,l,f){for(f=f.child;f!==null;)M8(o,l,f),f=f.sibling}function M8(o,l,f){if(B&&typeof B.onCommitFiberUnmount=="function")try{B.onCommitFiberUnmount(bn,f)}catch{}switch(f.tag){case 5:ur||dl(f,l);case 6:var g=Un,y=Ti;Un=null,bo(o,l,f),Un=g,Ti=y,Un!==null&&(Ti?(o=Un,f=f.stateNode,o.nodeType===8?o.parentNode.removeChild(f):o.removeChild(f)):Un.removeChild(f.stateNode));break;case 18:Un!==null&&(Ti?(o=Un,f=f.stateNode,o.nodeType===8?Jf(o.parentNode,f):o.nodeType===1&&Jf(o,f),Ji(o)):Jf(Un,f.stateNode));break;case 4:g=Un,y=Ti,Un=f.stateNode.containerInfo,Ti=!0,bo(o,l,f),Un=g,Ti=y;break;case 0:case 11:case 14:case 15:if(!ur&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var b=y,P=b.destroy;b=b.tag,P!==void 0&&((b&2)!==0||(b&4)!==0)&&Lh(f,l,P),y=y.next}while(y!==g)}bo(o,l,f);break;case 1:if(!ur&&(dl(f,l),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(Z){mn(f,l,Z)}bo(o,l,f);break;case 21:bo(o,l,f);break;case 22:f.mode&1?(ur=(g=ur)||f.memoizedState!==null,bo(o,l,f),ur=g):bo(o,l,f);break;default:bo(o,l,f)}}function Q8(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var f=o.stateNode;f===null&&(f=o.stateNode=new bk),l.forEach(function(g){var y=Mk.bind(null,o,g);f.has(g)||(f.add(g),g.then(y,y))})}}function Mi(o,l){var f=l.deletions;if(f!==null)for(var g=0;g<f.length;g++){var y=f[g];try{var b=o,P=l,Z=P;e:for(;Z!==null;){switch(Z.tag){case 5:Un=Z.stateNode,Ti=!1;break e;case 3:Un=Z.stateNode.containerInfo,Ti=!0;break e;case 4:Un=Z.stateNode.containerInfo,Ti=!0;break e}Z=Z.return}if(Un===null)throw Error(t(160));M8(b,P,y),Un=null,Ti=!1;var I=y.alternate;I!==null&&(I.return=null),y.return=null}catch(re){mn(y,l,re)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)j8(l,o),l=l.sibling}function j8(o,l){var f=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Mi(l,o),as(o),g&4){try{Vc(3,o,o.return),N0(3,o)}catch(Ge){mn(o,o.return,Ge)}try{Vc(5,o,o.return)}catch(Ge){mn(o,o.return,Ge)}}break;case 1:Mi(l,o),as(o),g&512&&f!==null&&dl(f,f.return);break;case 5:if(Mi(l,o),as(o),g&512&&f!==null&&dl(f,f.return),o.flags&32){var y=o.stateNode;try{en(y,"")}catch(Ge){mn(o,o.return,Ge)}}if(g&4&&(y=o.stateNode,y!=null)){var b=o.memoizedProps,P=f!==null?f.memoizedProps:b,Z=o.type,I=o.updateQueue;if(o.updateQueue=null,I!==null)try{Z==="input"&&b.type==="radio"&&b.name!=null&&Ue(y,b),Et(Z,P);var re=Et(Z,b);for(P=0;P<I.length;P+=2){var ge=I[P],ve=I[P+1];ge==="style"?Ke(y,ve):ge==="dangerouslySetInnerHTML"?Rt(y,ve):ge==="children"?en(y,ve):A(y,ge,ve,re)}switch(Z){case"input":ce(y,b);break;case"textarea":ze(y,b);break;case"select":var he=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!b.multiple;var Ne=b.value;Ne!=null?ct(y,!!b.multiple,Ne,!1):he!==!!b.multiple&&(b.defaultValue!=null?ct(y,!!b.multiple,b.defaultValue,!0):ct(y,!!b.multiple,b.multiple?[]:"",!1))}y[$c]=b}catch(Ge){mn(o,o.return,Ge)}}break;case 6:if(Mi(l,o),as(o),g&4){if(o.stateNode===null)throw Error(t(162));y=o.stateNode,b=o.memoizedProps;try{y.nodeValue=b}catch(Ge){mn(o,o.return,Ge)}}break;case 3:if(Mi(l,o),as(o),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Ji(l.containerInfo)}catch(Ge){mn(o,o.return,Ge)}break;case 4:Mi(l,o),as(o);break;case 13:Mi(l,o),as(o),y=o.child,y.flags&8192&&(b=y.memoizedState!==null,y.stateNode.isHidden=b,!b||y.alternate!==null&&y.alternate.memoizedState!==null||(Fh=it())),g&4&&Q8(o);break;case 22:if(ge=f!==null&&f.memoizedState!==null,o.mode&1?(ur=(re=ur)||ge,Mi(l,o),ur=re):Mi(l,o),as(o),g&8192){if(re=o.memoizedState!==null,(o.stateNode.isHidden=re)&&!ge&&(o.mode&1)!==0)for(Ie=o,ge=o.child;ge!==null;){for(ve=Ie=ge;Ie!==null;){switch(he=Ie,Ne=he.child,he.tag){case 0:case 11:case 14:case 15:Vc(4,he,he.return);break;case 1:dl(he,he.return);var He=he.stateNode;if(typeof He.componentWillUnmount=="function"){g=he,f=he.return;try{l=g,He.props=l.memoizedProps,He.state=l.memoizedState,He.componentWillUnmount()}catch(Ge){mn(g,f,Ge)}}break;case 5:dl(he,he.return);break;case 22:if(he.memoizedState!==null){N8(ve);continue}}Ne!==null?(Ne.return=he,Ie=Ne):N8(ve)}ge=ge.sibling}e:for(ge=null,ve=o;;){if(ve.tag===5){if(ge===null){ge=ve;try{y=ve.stateNode,re?(b=y.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(Z=ve.stateNode,I=ve.memoizedProps.style,P=I!=null&&I.hasOwnProperty("display")?I.display:null,Z.style.display=ne("display",P))}catch(Ge){mn(o,o.return,Ge)}}}else if(ve.tag===6){if(ge===null)try{ve.stateNode.nodeValue=re?"":ve.memoizedProps}catch(Ge){mn(o,o.return,Ge)}}else if((ve.tag!==22&&ve.tag!==23||ve.memoizedState===null||ve===o)&&ve.child!==null){ve.child.return=ve,ve=ve.child;continue}if(ve===o)break e;for(;ve.sibling===null;){if(ve.return===null||ve.return===o)break e;ge===ve&&(ge=null),ve=ve.return}ge===ve&&(ge=null),ve.sibling.return=ve.return,ve=ve.sibling}}break;case 19:Mi(l,o),as(o),g&4&&Q8(o);break;case 21:break;default:Mi(l,o),as(o)}}function as(o){var l=o.flags;if(l&2){try{e:{for(var f=o.return;f!==null;){if(E8(f)){var g=f;break e}f=f.return}throw Error(t(160))}switch(g.tag){case 5:var y=g.stateNode;g.flags&32&&(en(y,""),g.flags&=-33);var b=T8(o);Dh(o,b,y);break;case 3:case 4:var P=g.stateNode.containerInfo,Z=T8(o);_h(o,Z,P);break;default:throw Error(t(161))}}catch(I){mn(o,o.return,I)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Sk(o,l,f){Ie=o,Z8(o)}function Z8(o,l,f){for(var g=(o.mode&1)!==0;Ie!==null;){var y=Ie,b=y.child;if(y.tag===22&&g){var P=y.memoizedState!==null||R0;if(!P){var Z=y.alternate,I=Z!==null&&Z.memoizedState!==null||ur;Z=R0;var re=ur;if(R0=P,(ur=I)&&!re)for(Ie=y;Ie!==null;)P=Ie,I=P.child,P.tag===22&&P.memoizedState!==null?L8(y):I!==null?(I.return=P,Ie=I):L8(y);for(;b!==null;)Ie=b,Z8(b),b=b.sibling;Ie=y,R0=Z,ur=re}R8(o)}else(y.subtreeFlags&8772)!==0&&b!==null?(b.return=y,Ie=b):R8(o)}}function R8(o){for(;Ie!==null;){var l=Ie;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:ur||N0(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!ur)if(f===null)g.componentDidMount();else{var y=l.elementType===l.type?f.memoizedProps:Ei(l.type,f.memoizedProps);g.componentDidUpdate(y,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var b=l.updateQueue;b!==null&&NO(l,b,g);break;case 3:var P=l.updateQueue;if(P!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}NO(l,P,f)}break;case 5:var Z=l.stateNode;if(f===null&&l.flags&4){f=Z;var I=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&f.focus();break;case"img":I.src&&(f.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var re=l.alternate;if(re!==null){var ge=re.memoizedState;if(ge!==null){var ve=ge.dehydrated;ve!==null&&Ji(ve)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}ur||l.flags&512&&Vh(l)}catch(he){mn(l,l.return,he)}}if(l===o){Ie=null;break}if(f=l.sibling,f!==null){f.return=l.return,Ie=f;break}Ie=l.return}}function N8(o){for(;Ie!==null;){var l=Ie;if(l===o){Ie=null;break}var f=l.sibling;if(f!==null){f.return=l.return,Ie=f;break}Ie=l.return}}function L8(o){for(;Ie!==null;){var l=Ie;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{N0(4,l)}catch(I){mn(l,f,I)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var y=l.return;try{g.componentDidMount()}catch(I){mn(l,y,I)}}var b=l.return;try{Vh(l)}catch(I){mn(l,b,I)}break;case 5:var P=l.return;try{Vh(l)}catch(I){mn(l,P,I)}}}catch(I){mn(l,l.return,I)}if(l===o){Ie=null;break}var Z=l.sibling;if(Z!==null){Z.return=l.return,Ie=Z;break}Ie=l.return}}var kk=Math.ceil,L0=Q.ReactCurrentDispatcher,Ih=Q.ReactCurrentOwner,gi=Q.ReactCurrentBatchConfig,Dt=0,Xn=null,Cn=null,Gn=0,Jr=0,fl=go(0),jn=0,_c=null,aa=0,V0=0,Xh=0,Dc=null,Lr=null,Fh=0,hl=1/0,_s=null,_0=!1,zh=null,wo=null,D0=!1,So=null,I0=0,Ic=0,Hh=null,X0=-1,F0=0;function kr(){return(Dt&6)!==0?it():X0!==-1?X0:X0=it()}function ko(o){return(o.mode&1)===0?1:(Dt&2)!==0&&Gn!==0?Gn&-Gn:ak.transition!==null?(F0===0&&(F0=Tr()),F0):(o=_t,o!==0||(o=window.event,o=o===void 0?16:Go(o.type)),o)}function Qi(o,l,f,g){if(50<Ic)throw Ic=0,Hh=null,Error(t(185));li(o,f,g),((Dt&2)===0||o!==Xn)&&(o===Xn&&((Dt&2)===0&&(V0|=f),jn===4&&Po(o,Gn)),Vr(o,g),f===1&&Dt===0&&(l.mode&1)===0&&(hl=it()+500,O0&&xo()))}function Vr(o,l){var f=o.callbackNode;ir(o,l);var g=wn(o,o===Xn?Gn:0);if(g===0)f!==null&&zi(f),o.callbackNode=null,o.callbackPriority=0;else if(l=g&-g,o.callbackPriority!==l){if(f!=null&&zi(f),l===1)o.tag===0?ok(_8.bind(null,o)):kO(_8.bind(null,o)),nk(function(){(Dt&6)===0&&xo()}),f=null;else{switch(Fa(g)){case 1:f=yr;break;case 4:f=ai;break;case 16:f=Ut;break;case 536870912:f=Wi;break;default:f=Ut}f=B8(f,V8.bind(null,o))}o.callbackPriority=l,o.callbackNode=f}}function V8(o,l){if(X0=-1,F0=0,(Dt&6)!==0)throw Error(t(327));var f=o.callbackNode;if(pl()&&o.callbackNode!==f)return null;var g=wn(o,o===Xn?Gn:0);if(g===0)return null;if((g&30)!==0||(g&o.expiredLanes)!==0||l)l=z0(o,g);else{l=g;var y=Dt;Dt|=2;var b=I8();(Xn!==o||Gn!==l)&&(_s=null,hl=it()+500,ca(o,l));do try{$k();break}catch(Z){D8(o,Z)}while(!0);ch(),L0.current=b,Dt=y,Cn!==null?l=0:(Xn=null,Gn=0,l=jn)}if(l!==0){if(l===2&&(y=qn(o),y!==0&&(g=y,l=Wh(o,y))),l===1)throw f=_c,ca(o,0),Po(o,g),Vr(o,it()),f;if(l===6)Po(o,g);else{if(y=o.current.alternate,(g&30)===0&&!Pk(y)&&(l=z0(o,g),l===2&&(b=qn(o),b!==0&&(g=b,l=Wh(o,b))),l===1))throw f=_c,ca(o,0),Po(o,g),Vr(o,it()),f;switch(o.finishedWork=y,o.finishedLanes=g,l){case 0:case 1:throw Error(t(345));case 2:ua(o,Lr,_s);break;case 3:if(Po(o,g),(g&130023424)===g&&(l=Fh+500-it(),10<l)){if(wn(o,0)!==0)break;if(y=o.suspendedLanes,(y&g)!==g){kr(),o.pingedLanes|=o.suspendedLanes&y;break}o.timeoutHandle=Kf(ua.bind(null,o,Lr,_s),l);break}ua(o,Lr,_s);break;case 4:if(Po(o,g),(g&4194240)===g)break;for(l=o.eventTimes,y=-1;0<g;){var P=31-ke(g);b=1<<P,P=l[P],P>y&&(y=P),g&=~b}if(g=y,g=it()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*kk(g/1960))-g,10<g){o.timeoutHandle=Kf(ua.bind(null,o,Lr,_s),g);break}ua(o,Lr,_s);break;case 5:ua(o,Lr,_s);break;default:throw Error(t(329))}}}return Vr(o,it()),o.callbackNode===f?V8.bind(null,o):null}function Wh(o,l){var f=Dc;return o.current.memoizedState.isDehydrated&&(ca(o,l).flags|=256),o=z0(o,l),o!==2&&(l=Lr,Lr=f,l!==null&&Bh(l)),o}function Bh(o){Lr===null?Lr=o:Lr.push.apply(Lr,o)}function Pk(o){for(var l=o;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var y=f[g],b=y.getSnapshot;y=y.value;try{if(!rt(b(),y))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Po(o,l){for(l&=~Xh,l&=~V0,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var f=31-ke(l),g=1<<f;o[f]=-1,l&=~g}}function _8(o){if((Dt&6)!==0)throw Error(t(327));pl();var l=wn(o,0);if((l&1)===0)return Vr(o,it()),null;var f=z0(o,l);if(o.tag!==0&&f===2){var g=qn(o);g!==0&&(l=g,f=Wh(o,g))}if(f===1)throw f=_c,ca(o,0),Po(o,l),Vr(o,it()),f;if(f===6)throw Error(t(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,ua(o,Lr,_s),Vr(o,it()),null}function Yh(o,l){var f=Dt;Dt|=1;try{return o(l)}finally{Dt=f,Dt===0&&(hl=it()+500,O0&&xo())}}function la(o){So!==null&&So.tag===0&&(Dt&6)===0&&pl();var l=Dt;Dt|=1;var f=gi.transition,g=_t;try{if(gi.transition=null,_t=1,o)return o()}finally{_t=g,gi.transition=f,Dt=l,(Dt&6)===0&&xo()}}function qh(){Jr=fl.current,rn(fl)}function ca(o,l){o.finishedWork=null,o.finishedLanes=0;var f=o.timeoutHandle;if(f!==-1&&(o.timeoutHandle=-1,tk(f)),Cn!==null)for(f=Cn.return;f!==null;){var g=f;switch(ih(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&m0();break;case 3:cl(),rn(Zr),rn(ar),Oh();break;case 5:mh(g);break;case 4:cl();break;case 13:rn(un);break;case 19:rn(un);break;case 10:uh(g.type._context);break;case 22:case 23:qh()}f=f.return}if(Xn=o,Cn=o=Ao(o.current,null),Gn=Jr=l,jn=0,_c=null,Xh=V0=aa=0,Lr=Dc=null,ia!==null){for(l=0;l<ia.length;l++)if(f=ia[l],g=f.interleaved,g!==null){f.interleaved=null;var y=g.next,b=f.pending;if(b!==null){var P=b.next;b.next=y,g.next=P}f.pending=g}ia=null}return o}function D8(o,l){do{var f=Cn;try{if(ch(),$0.current=M0,C0){for(var g=dn.memoizedState;g!==null;){var y=g.queue;y!==null&&(y.pending=null),g=g.next}C0=!1}if(oa=0,In=Qn=dn=null,jc=!1,Zc=0,Ih.current=null,f===null||f.return===null){jn=1,_c=l,Cn=null;break}e:{var b=o,P=f.return,Z=f,I=l;if(l=Gn,Z.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var re=I,ge=Z,ve=ge.tag;if((ge.mode&1)===0&&(ve===0||ve===11||ve===15)){var he=ge.alternate;he?(ge.updateQueue=he.updateQueue,ge.memoizedState=he.memoizedState,ge.lanes=he.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var Ne=d8(P);if(Ne!==null){Ne.flags&=-257,f8(Ne,P,Z,b,l),Ne.mode&1&&u8(b,re,l),l=Ne,I=re;var He=l.updateQueue;if(He===null){var Ge=new Set;Ge.add(I),l.updateQueue=Ge}else He.add(I);break e}else{if((l&1)===0){u8(b,re,l),Uh();break e}I=Error(t(426))}}else if(on&&Z.mode&1){var Sn=d8(P);if(Sn!==null){(Sn.flags&65536)===0&&(Sn.flags|=256),f8(Sn,P,Z,b,l),ah(ul(I,Z));break e}}b=I=ul(I,Z),jn!==4&&(jn=2),Dc===null?Dc=[b]:Dc.push(b),b=P;do{switch(b.tag){case 3:b.flags|=65536,l&=-l,b.lanes|=l;var U=l8(b,I,l);RO(b,U);break e;case 1:Z=I;var H=b.type,J=b.stateNode;if((b.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(wo===null||!wo.has(J)))){b.flags|=65536,l&=-l,b.lanes|=l;var Ae=c8(b,Z,l);RO(b,Ae);break e}}b=b.return}while(b!==null)}F8(f)}catch(et){l=et,Cn===f&&f!==null&&(Cn=f=f.return);continue}break}while(!0)}function I8(){var o=L0.current;return L0.current=M0,o===null?M0:o}function Uh(){(jn===0||jn===3||jn===2)&&(jn=4),Xn===null||(aa&268435455)===0&&(V0&268435455)===0||Po(Xn,Gn)}function z0(o,l){var f=Dt;Dt|=2;var g=I8();(Xn!==o||Gn!==l)&&(_s=null,ca(o,l));do try{Ak();break}catch(y){D8(o,y)}while(!0);if(ch(),Dt=f,L0.current=g,Cn!==null)throw Error(t(261));return Xn=null,Gn=0,jn}function Ak(){for(;Cn!==null;)X8(Cn)}function $k(){for(;Cn!==null&&!Hi();)X8(Cn)}function X8(o){var l=W8(o.alternate,o,Jr);o.memoizedProps=o.pendingProps,l===null?F8(o):Cn=l,Ih.current=null}function F8(o){var l=o;do{var f=l.alternate;if(o=l.return,(l.flags&32768)===0){if(f=yk(f,l,Jr),f!==null){Cn=f;return}}else{if(f=vk(f,l),f!==null){f.flags&=32767,Cn=f;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{jn=6,Cn=null;return}}if(l=l.sibling,l!==null){Cn=l;return}Cn=l=o}while(l!==null);jn===0&&(jn=5)}function ua(o,l,f){var g=_t,y=gi.transition;try{gi.transition=null,_t=1,Ck(o,l,f,g)}finally{gi.transition=y,_t=g}return null}function Ck(o,l,f,g){do pl();while(So!==null);if((Dt&6)!==0)throw Error(t(327));f=o.finishedWork;var y=o.finishedLanes;if(f===null)return null;if(o.finishedWork=null,o.finishedLanes=0,f===o.current)throw Error(t(177));o.callbackNode=null,o.callbackPriority=0;var b=f.lanes|f.childLanes;if(tn(o,b),o===Xn&&(Cn=Xn=null,Gn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||D0||(D0=!0,B8(Ut,function(){return pl(),null})),b=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||b){b=gi.transition,gi.transition=null;var P=_t;_t=1;var Z=Dt;Dt|=4,Ih.current=null,wk(o,f),j8(f,o),or(Uf),oo=!!qf,Uf=qf=null,o.current=f,Sk(f),$s(),Dt=Z,_t=P,gi.transition=b}else o.current=f;if(D0&&(D0=!1,So=o,I0=y),b=o.pendingLanes,b===0&&(wo=null),Pe(f.stateNode),Vr(o,it()),l!==null)for(g=o.onRecoverableError,f=0;f<l.length;f++)y=l[f],g(y.value,{componentStack:y.stack,digest:y.digest});if(_0)throw _0=!1,o=zh,zh=null,o;return(I0&1)!==0&&o.tag!==0&&pl(),b=o.pendingLanes,(b&1)!==0?o===Hh?Ic++:(Ic=0,Hh=o):Ic=0,xo(),null}function pl(){if(So!==null){var o=Fa(I0),l=gi.transition,f=_t;try{if(gi.transition=null,_t=16>o?16:o,So===null)var g=!1;else{if(o=So,So=null,I0=0,(Dt&6)!==0)throw Error(t(331));var y=Dt;for(Dt|=4,Ie=o.current;Ie!==null;){var b=Ie,P=b.child;if((Ie.flags&16)!==0){var Z=b.deletions;if(Z!==null){for(var I=0;I<Z.length;I++){var re=Z[I];for(Ie=re;Ie!==null;){var ge=Ie;switch(ge.tag){case 0:case 11:case 15:Vc(8,ge,b)}var ve=ge.child;if(ve!==null)ve.return=ge,Ie=ve;else for(;Ie!==null;){ge=Ie;var he=ge.sibling,Ne=ge.return;if(C8(ge),ge===re){Ie=null;break}if(he!==null){he.return=Ne,Ie=he;break}Ie=Ne}}}var He=b.alternate;if(He!==null){var Ge=He.child;if(Ge!==null){He.child=null;do{var Sn=Ge.sibling;Ge.sibling=null,Ge=Sn}while(Ge!==null)}}Ie=b}}if((b.subtreeFlags&2064)!==0&&P!==null)P.return=b,Ie=P;else e:for(;Ie!==null;){if(b=Ie,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Vc(9,b,b.return)}var U=b.sibling;if(U!==null){U.return=b.return,Ie=U;break e}Ie=b.return}}var H=o.current;for(Ie=H;Ie!==null;){P=Ie;var J=P.child;if((P.subtreeFlags&2064)!==0&&J!==null)J.return=P,Ie=J;else e:for(P=H;Ie!==null;){if(Z=Ie,(Z.flags&2048)!==0)try{switch(Z.tag){case 0:case 11:case 15:N0(9,Z)}}catch(et){mn(Z,Z.return,et)}if(Z===P){Ie=null;break e}var Ae=Z.sibling;if(Ae!==null){Ae.return=Z.return,Ie=Ae;break e}Ie=Z.return}}if(Dt=y,xo(),B&&typeof B.onPostCommitFiberRoot=="function")try{B.onPostCommitFiberRoot(bn,o)}catch{}g=!0}return g}finally{_t=f,gi.transition=l}}return!1}function z8(o,l,f){l=ul(f,l),l=l8(o,l,1),o=vo(o,l,1),l=kr(),o!==null&&(li(o,1,l),Vr(o,l))}function mn(o,l,f){if(o.tag===3)z8(o,o,f);else for(;l!==null;){if(l.tag===3){z8(l,o,f);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(wo===null||!wo.has(g))){o=ul(f,o),o=c8(l,o,1),l=vo(l,o,1),o=kr(),l!==null&&(li(l,1,o),Vr(l,o));break}}l=l.return}}function Ek(o,l,f){var g=o.pingCache;g!==null&&g.delete(l),l=kr(),o.pingedLanes|=o.suspendedLanes&f,Xn===o&&(Gn&f)===f&&(jn===4||jn===3&&(Gn&130023424)===Gn&&500>it()-Fh?ca(o,0):Xh|=f),Vr(o,l)}function H8(o,l){l===0&&((o.mode&1)===0?l=1:(l=pn,pn<<=1,(pn&130023424)===0&&(pn=4194304)));var f=kr();o=Ns(o,l),o!==null&&(li(o,l,f),Vr(o,f))}function Tk(o){var l=o.memoizedState,f=0;l!==null&&(f=l.retryLane),H8(o,f)}function Mk(o,l){var f=0;switch(o.tag){case 13:var g=o.stateNode,y=o.memoizedState;y!==null&&(f=y.retryLane);break;case 19:g=o.stateNode;break;default:throw Error(t(314))}g!==null&&g.delete(l),H8(o,f)}var W8;W8=function(o,l,f){if(o!==null)if(o.memoizedProps!==l.pendingProps||Zr.current)Nr=!0;else{if((o.lanes&f)===0&&(l.flags&128)===0)return Nr=!1,xk(o,l,f);Nr=(o.flags&131072)!==0}else Nr=!1,on&&(l.flags&1048576)!==0&&PO(l,y0,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;Z0(o,l),o=l.pendingProps;var y=nl(l,ar.current);ll(l,f),y=vh(null,l,g,o,y,f);var b=bh();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Rr(g)?(b=!0,g0(l)):b=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,hh(l),y.updater=Q0,l.stateNode=y,y._reactInternals=l,$h(l,g,o,f),l=Mh(null,l,g,!0,b,f)):(l.tag=0,on&&b&&rh(l),Sr(null,l,y,f),l=l.child),l;case 16:g=l.elementType;e:{switch(Z0(o,l),o=l.pendingProps,y=g._init,g=y(g._payload),l.type=g,y=l.tag=jk(g),o=Ei(g,o),y){case 0:l=Th(null,l,g,o,f);break e;case 1:l=x8(null,l,g,o,f);break e;case 11:l=h8(null,l,g,o,f);break e;case 14:l=p8(null,l,g,Ei(g.type,o),f);break e}throw Error(t(306,g,""))}return l;case 0:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ei(g,y),Th(o,l,g,y,f);case 1:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ei(g,y),x8(o,l,g,y,f);case 3:e:{if(y8(l),o===null)throw Error(t(387));g=l.pendingProps,b=l.memoizedState,y=b.element,ZO(o,l),P0(l,g,null,f);var P=l.memoizedState;if(g=P.element,b.isDehydrated)if(b={element:g,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){y=ul(Error(t(423)),l),l=v8(o,l,g,f,y);break e}else if(g!==y){y=ul(Error(t(424)),l),l=v8(o,l,g,f,y);break e}else for(Kr=mo(l.stateNode.containerInfo.firstChild),Gr=l,on=!0,Ci=null,f=QO(l,null,g,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(sl(),g===y){l=Vs(o,l,f);break e}Sr(o,l,g,f)}l=l.child}return l;case 5:return LO(l),o===null&&oh(l),g=l.type,y=l.pendingProps,b=o!==null?o.memoizedProps:null,P=y.children,Gf(g,y)?P=null:b!==null&&Gf(g,b)&&(l.flags|=32),O8(o,l),Sr(o,l,P,f),l.child;case 6:return o===null&&oh(l),null;case 13:return b8(o,l,f);case 4:return ph(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=ol(l,null,g,f):Sr(o,l,g,f),l.child;case 11:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ei(g,y),h8(o,l,g,y,f);case 7:return Sr(o,l,l.pendingProps,f),l.child;case 8:return Sr(o,l,l.pendingProps.children,f),l.child;case 12:return Sr(o,l,l.pendingProps.children,f),l.child;case 10:e:{if(g=l.type._context,y=l.pendingProps,b=l.memoizedProps,P=y.value,Kt(w0,g._currentValue),g._currentValue=P,b!==null)if(rt(b.value,P)){if(b.children===y.children&&!Zr.current){l=Vs(o,l,f);break e}}else for(b=l.child,b!==null&&(b.return=l);b!==null;){var Z=b.dependencies;if(Z!==null){P=b.child;for(var I=Z.firstContext;I!==null;){if(I.context===g){if(b.tag===1){I=Ls(-1,f&-f),I.tag=2;var re=b.updateQueue;if(re!==null){re=re.shared;var ge=re.pending;ge===null?I.next=I:(I.next=ge.next,ge.next=I),re.pending=I}}b.lanes|=f,I=b.alternate,I!==null&&(I.lanes|=f),dh(b.return,f,l),Z.lanes|=f;break}I=I.next}}else if(b.tag===10)P=b.type===l.type?null:b.child;else if(b.tag===18){if(P=b.return,P===null)throw Error(t(341));P.lanes|=f,Z=P.alternate,Z!==null&&(Z.lanes|=f),dh(P,f,l),P=b.sibling}else P=b.child;if(P!==null)P.return=b;else for(P=b;P!==null;){if(P===l){P=null;break}if(b=P.sibling,b!==null){b.return=P.return,P=b;break}P=P.return}b=P}Sr(o,l,y.children,f),l=l.child}return l;case 9:return y=l.type,g=l.pendingProps.children,ll(l,f),y=pi(y),g=g(y),l.flags|=1,Sr(o,l,g,f),l.child;case 14:return g=l.type,y=Ei(g,l.pendingProps),y=Ei(g.type,y),p8(o,l,g,y,f);case 15:return m8(o,l,l.type,l.pendingProps,f);case 17:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:Ei(g,y),Z0(o,l),l.tag=1,Rr(g)?(o=!0,g0(l)):o=!1,ll(l,f),o8(l,g,y),$h(l,g,y,f),Mh(null,l,g,!0,o,f);case 19:return S8(o,l,f);case 22:return g8(o,l,f)}throw Error(t(156,l.tag))};function B8(o,l){return rr(o,l)}function Qk(o,l,f,g){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oi(o,l,f,g){return new Qk(o,l,f,g)}function Gh(o){return o=o.prototype,!(!o||!o.isReactComponent)}function jk(o){if(typeof o=="function")return Gh(o)?1:0;if(o!=null){if(o=o.$$typeof,o===L)return 11;if(o===Oe)return 14}return 2}function Ao(o,l){var f=o.alternate;return f===null?(f=Oi(o.tag,l,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=l,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&14680064,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,l=o.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f}function H0(o,l,f,g,y,b){var P=2;if(g=o,typeof o=="function")Gh(o)&&(P=1);else if(typeof o=="string")P=5;else e:switch(o){case j:return da(f.children,y,b,l);case W:P=8,y|=8;break;case K:return o=Oi(12,f,l,y|2),o.elementType=K,o.lanes=b,o;case le:return o=Oi(13,f,l,y),o.elementType=le,o.lanes=b,o;case ye:return o=Oi(19,f,l,y),o.elementType=ye,o.lanes=b,o;case pe:return W0(f,y,b,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case ae:P=10;break e;case ie:P=9;break e;case L:P=11;break e;case Oe:P=14;break e;case $e:P=16,g=null;break e}throw Error(t(130,o==null?o:typeof o,""))}return l=Oi(P,f,l,y),l.elementType=o,l.type=g,l.lanes=b,l}function da(o,l,f,g){return o=Oi(7,o,g,l),o.lanes=f,o}function W0(o,l,f,g){return o=Oi(22,o,g,l),o.elementType=pe,o.lanes=f,o.stateNode={isHidden:!1},o}function Kh(o,l,f){return o=Oi(6,o,null,l),o.lanes=f,o}function Jh(o,l,f){return l=Oi(4,o.children!==null?o.children:[],o.key,l),l.lanes=f,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function Zk(o,l,f,g,y){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zt(0),this.expirationTimes=Zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zt(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function ep(o,l,f,g,y,b,P,Z,I){return o=new Zk(o,l,f,Z,I),l===1?(l=1,b===!0&&(l|=8)):l=0,b=Oi(3,null,null,l),o.current=b,b.stateNode=o,b.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},hh(b),o}function Rk(o,l,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:g==null?null:""+g,children:o,containerInfo:l,implementation:f}}function Y8(o){if(!o)return Oo;o=o._reactInternals;e:{if(xr(o)!==o||o.tag!==1)throw Error(t(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Rr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(t(171))}if(o.tag===1){var f=o.type;if(Rr(f))return wO(o,f,l)}return l}function q8(o,l,f,g,y,b,P,Z,I){return o=ep(f,g,!0,o,y,b,P,Z,I),o.context=Y8(null),f=o.current,g=kr(),y=ko(f),b=Ls(g,y),b.callback=l??null,vo(f,b,y),o.current.lanes=y,li(o,y,g),Vr(o,g),o}function B0(o,l,f,g){var y=l.current,b=kr(),P=ko(y);return f=Y8(f),l.context===null?l.context=f:l.pendingContext=f,l=Ls(b,P),l.payload={element:o},g=g===void 0?null:g,g!==null&&(l.callback=g),o=vo(y,l,P),o!==null&&(Qi(o,y,P,b),k0(o,y,P)),P}function Y0(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function U8(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<l?f:l}}function tp(o,l){U8(o,l),(o=o.alternate)&&U8(o,l)}function Nk(){return null}var G8=typeof reportError=="function"?reportError:function(o){console.error(o)};function np(o){this._internalRoot=o}q0.prototype.render=np.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(t(409));B0(o,l,null,null)},q0.prototype.unmount=np.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;la(function(){B0(null,o,null,null)}),l[Qs]=null}};function q0(o){this._internalRoot=o}q0.prototype.unstable_scheduleHydration=function(o){if(o){var l=vr();o={blockedOn:null,target:o,priority:l};for(var f=0;f<qr.length&&l!==0&&l<qr[f].priority;f++);qr.splice(f,0,o),f===0&&jr(o)}};function rp(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function U0(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function K8(){}function Lk(o,l,f,g,y){if(y){if(typeof g=="function"){var b=g;g=function(){var re=Y0(P);b.call(re)}}var P=q8(l,g,o,0,null,!1,!1,"",K8);return o._reactRootContainer=P,o[Qs]=P.current,Pc(o.nodeType===8?o.parentNode:o),la(),P}for(;y=o.lastChild;)o.removeChild(y);if(typeof g=="function"){var Z=g;g=function(){var re=Y0(I);Z.call(re)}}var I=ep(o,0,!1,null,null,!1,!1,"",K8);return o._reactRootContainer=I,o[Qs]=I.current,Pc(o.nodeType===8?o.parentNode:o),la(function(){B0(l,I,f,g)}),I}function G0(o,l,f,g,y){var b=f._reactRootContainer;if(b){var P=b;if(typeof y=="function"){var Z=y;y=function(){var I=Y0(P);Z.call(I)}}B0(l,P,o,y)}else P=Lk(f,l,o,y,g);return Y0(P)}sc=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var f=Yt(l.pendingLanes);f!==0&&(Vn(l,f|1),Vr(l,it()),(Dt&6)===0&&(hl=it()+500,xo()))}break;case 13:la(function(){var g=Ns(o,1);if(g!==null){var y=kr();Qi(g,o,1,y)}}),tp(o,1)}},ht=function(o){if(o.tag===13){var l=Ns(o,134217728);if(l!==null){var f=kr();Qi(l,o,134217728,f)}tp(o,134217728)}},Bt=function(o){if(o.tag===13){var l=ko(o),f=Ns(o,l);if(f!==null){var g=kr();Qi(f,o,l,g)}tp(o,l)}},vr=function(){return _t},Bi=function(o,l){var f=_t;try{return _t=o,l()}finally{_t=f}},ft=function(o,l,f){switch(l){case"input":if(ce(o,f),l=f.name,f.type==="radio"&&l!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var g=f[l];if(g!==o&&g.form===o.form){var y=p0(g);if(!y)throw Error(t(90));Le(g),ce(g,y)}}}break;case"textarea":ze(o,f);break;case"select":l=f.value,l!=null&&ct(o,!!f.multiple,l,!1)}},Tt=Yh,jt=la;var Vk={usingClientEntryPoint:!1,Events:[Cc,el,p0,ut,zt,Yh]},Xc={findFiberByHostInstance:ea,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_k={bundleType:Xc.bundleType,version:Xc.version,rendererPackageName:Xc.rendererPackageName,rendererConfig:Xc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=so(o),o===null?null:o.stateNode},findFiberByHostInstance:Xc.findFiberByHostInstance||Nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var K0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!K0.isDisabled&&K0.supportsFiber)try{bn=K0.inject(_k),B=K0}catch{}}return _r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vk,_r.createPortal=function(o,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rp(l))throw Error(t(200));return Rk(o,l,null,f)},_r.createRoot=function(o,l){if(!rp(o))throw Error(t(299));var f=!1,g="",y=G8;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(y=l.onRecoverableError)),l=ep(o,1,!1,null,null,f,!1,g,y),o[Qs]=l.current,Pc(o.nodeType===8?o.parentNode:o),new np(l)},_r.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(t(188)):(o=Object.keys(o).join(","),Error(t(268,o)));return o=so(l),o=o===null?null:o.stateNode,o},_r.flushSync=function(o){return la(o)},_r.hydrate=function(o,l,f){if(!U0(l))throw Error(t(200));return G0(null,o,l,!0,f)},_r.hydrateRoot=function(o,l,f){if(!rp(o))throw Error(t(405));var g=f!=null&&f.hydratedSources||null,y=!1,b="",P=G8;if(f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onRecoverableError!==void 0&&(P=f.onRecoverableError)),l=q8(l,null,o,1,f??null,y,!1,b,P),o[Qs]=l.current,Pc(o),g)for(o=0;o<g.length;o++)f=g[o],y=f._getVersion,y=y(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,y]:l.mutableSourceEagerHydrationData.push(f,y);return new q0(l)},_r.render=function(o,l,f){if(!U0(l))throw Error(t(200));return G0(null,o,l,!1,f)},_r.unmountComponentAtNode=function(o){if(!U0(o))throw Error(t(40));return o._reactRootContainer?(la(function(){G0(null,null,o,!1,function(){o._reactRootContainer=null,o[Qs]=null})}),!0):!1},_r.unstable_batchedUpdates=Yh,_r.unstable_renderSubtreeIntoContainer=function(o,l,f,g){if(!U0(f))throw Error(t(200));if(o==null||o._reactInternals===void 0)throw Error(t(38));return G0(o,l,f,!1,g)},_r.version="18.3.1-next-f1338f8080-20240426",_r}var o4;function My(){if(o4)return op.exports;o4=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),op.exports=Bk(),op.exports}var a4;function Yk(){if(a4)return e1;a4=1;var n=My();return e1.createRoot=n.createRoot,e1.hydrateRoot=n.hydrateRoot,e1}var qk=Yk();function On(n){d.useEffect(n,[])}const Uk="modulepreload",Gk=function(n){return"/"+n},l4={},Kk=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let a=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=a(t.map(h=>{if(h=Gk(h),h in l4)return;l4[h]=!0;const m=h.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${O}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":Uk,m||(x.as="script"),x.crossOrigin="",x.href=h,u&&x.setAttribute("nonce",u),document.head.appendChild(x),m)return new Promise((v,w)=>{x.addEventListener("load",v),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};function Jk(n){if(typeof n!="object"||n===null)return!0;const e=n;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}const Qy={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},e7={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},t7=d.forwardRef(({variant:n="secondary",size:e="md",loading:t,icon:r,children:i,className:s="",disabled:a,...c},u)=>p.jsxs("button",{ref:u,disabled:a||t,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Qy[n],e7[e],s].join(" "),...c,children:[t?p.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?p.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&p.jsx("span",{children:i})]}));t7.displayName="Button";const n7={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},r7=d.forwardRef(({icon:n,size:e="md",variant:t="ghost",className:r="",...i},s)=>p.jsx("button",{ref:s,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Qy[t],n7[e],r].join(" "),...i,children:n}));r7.displayName="IconButton";function c4({title:n,detail:e,mono:t,size:r=64,progress:i}){const s=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,a=Math.round(r*1.16);return p.jsxs("div",{className:"hf-loader",draggable:!1,children:[p.jsx("div",{className:"hf-loader-mark-frame",style:{width:a,height:a},draggable:!1,children:p.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[p.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:p.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:p.jsxs("g",{transform:"translate(-50 -50)",children:[p.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),p.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#06E3FA"}),p.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),p.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#06E3FA"}),p.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),p.jsx("div",{className:"hf-loader-title",children:n}),e&&p.jsx("div",{className:"hf-loader-detail",children:e}),s!==void 0&&p.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:p.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${s})`}})}),t&&p.jsx("div",{className:"hf-loader-mono",children:t})]})}const i7=3,s7=3;function u4(n){return typeof n=="object"&&n!==null}function o7(n){if(!(n instanceof CustomEvent))return null;const e=n.detail;if(!u4(e))return null;const t=e.state;return u4(t)?t.loading===!0&&t.ready!==!0:null}function a7(n){const e=n.shadowRoot;if(!e)return;const t=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");t==null||t.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function l7(n){const e=n.tagName.toLowerCase();return e==="video"||e==="audio"}function d4(n,e){try{const t=n.contentWindow,r=n.contentDocument;if(!t||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(l7(s)&&!s.error&&s.networkState!==s7&&s.readyState<i7)return!0;const i=t.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!Jk(s))return!0}return!1}catch{return e}}const Cm=d.forwardRef(({projectId:n,directUrl:e,onLoad:t,onCompositionLoadingChange:r,portrait:i,style:s,suppressLoadingOverlay:a},c)=>{const u=d.useRef(null),h=d.useRef(0),m=d.useRef(null),O=d.useRef(null),[x,v]=d.useState(!1),[w,k]=d.useState(!1),[$,M]=d.useState(!1),[V,A]=d.useState(!1),[Q,T]=d.useState(!0);On(()=>{const W=u.current;if(!W)return;let K=!1,ae;return Kk(()=>import("./hyperframes-player-DjsVzYFP.js"),[]).then(()=>{if(K)return;const ie=document.createElement("hyperframes-player"),L=e||`/api/projects/${n}/preview`;ie.setAttribute("shader-capture-scale","1"),ie.setAttribute("shader-loading","player"),ie.setAttribute("src",L),ie.setAttribute("width",String(i?1080:1920)),ie.setAttribute("height",String(i?1920:1080)),ie.style.width="100%",ie.style.height="100%",ie.style.display="block",W.appendChild(ie),a7(ie);const le=ie.iframeElement;typeof c=="function"?c(le):c&&(c.current=le);const ye=z=>z.stopImmediatePropagation();ie.addEventListener("click",ye,{capture:!0});const Oe=z=>{const q=o7(z);q!==null&&A(q)};ie.addEventListener("shadertransitionstate",Oe);const $e=()=>{T(!1)},pe=()=>{T(!1)};ie.addEventListener("ready",$e),ie.addEventListener("error",pe);const D=()=>{if(h.current++,A(!1),T(!0),h.current>1){W.classList.remove("preview-revealing"),W.offsetWidth,W.classList.add("preview-revealing");const q=()=>W.classList.remove("preview-revealing");W.addEventListener("animationend",q,{once:!0})}t(),m.current&&clearInterval(m.current);let z=d4(le,!1);if(z){v(!0);let q=0;m.current=setInterval(()=>{q+=1,z=d4(le,z),(!z||q>100)&&(m.current&&clearInterval(m.current),m.current=null,v(!1),z&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else v(!1)};le.addEventListener("load",D),ae=()=>{le.removeEventListener("load",D),ie.removeEventListener("click",ye,{capture:!0}),ie.removeEventListener("shadertransitionstate",Oe),ie.removeEventListener("ready",$e),ie.removeEventListener("error",pe),m.current&&clearInterval(m.current),m.current=null,W.removeChild(ie),typeof c=="function"?c(null):c&&(c.current=null)}}),()=>{K=!0,ae==null||ae()}}),d.useEffect(()=>{if(O.current&&(clearTimeout(O.current),O.current=null),x){k(!0),M(!1);return}return M(!0),O.current=setTimeout(()=>{k(!1),M(!1),O.current=null},240),()=>{O.current&&(clearTimeout(O.current),O.current=null)}},[x]);const N=!a&&Q,j=w&&!V&&!N;return d.useEffect(()=>{r==null||r(N||j)},[r,N,j]),p.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",style:s,children:[p.jsx("div",{ref:u,className:"w-full h-full"}),N&&p.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:W=>W.preventDefault(),onMouseDown:W=>W.preventDefault(),onPointerDown:W=>W.preventDefault(),children:p.jsx(c4,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),j&&p.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:$?0:1,pointerEvents:$?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:W=>W.preventDefault(),onMouseDown:W=>W.preventDefault(),onPointerDown:W=>W.preventDefault(),children:p.jsx(c4,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});Cm.displayName="Player";const Vu=30;function $r(n){if(!Number.isFinite(n)||n<0)return"0:00";const e=Math.floor(n/60),t=Math.floor(n%60);return`${e}:${t.toString().padStart(2,"0")}`}function Em(n,e=Vu){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:Math.round(n*e)}function jy(n,e=Vu){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:n/e}function Tm(n,e,t=Vu){const r=Em(n,t),i=Math.max(0,r+e);return jy(i,t)}function f4(n,e,t=Vu){const r=Em(n,t),i=Em(e,t);return`${r}f / ${i}f`}const h4=n=>{let e;const t=new Set,r=(h,m)=>{const O=typeof h=="function"?h(e):h;if(!Object.is(O,e)){const x=e;e=m??(typeof O!="object"||O===null)?O:Object.assign({},e,O),t.forEach(v=>v(e,x))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h))},u=e=n(r,i,c);return c},c7=(n=>n?h4(n):h4),u7=n=>n;function d7(n,e=u7){const t=J0.useSyncExternalStore(n.subscribe,J0.useCallback(()=>e(n.getState()),[n,e]),J0.useCallback(()=>e(n.getInitialState()),[n,e]));return J0.useDebugValue(t),t}const p4=n=>{const e=c7(n),t=r=>d7(e,r);return Object.assign(t,e),t},Zy=(n=>n?p4(n):p4),cp=new Set,Ni={notify:n=>cp.forEach(e=>e(n)),subscribe:n=>(cp.add(n),()=>cp.delete(n))},Re=Zy(n=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,setIsPlaying:e=>n({isPlaying:e}),setPlaybackRate:e=>n({playbackRate:e}),setLoopEnabled:e=>n({loopEnabled:e}),setZoomMode:e=>n({zoomMode:e}),setManualZoomPercent:e=>n({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>n({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>n({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>n({timelineReady:e}),setElements:e=>n({elements:e}),setSelectedElementId:e=>n({selectedElementId:e}),updateElement:(e,t)=>n(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...t}:i)})),reset:()=>n({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),f7=[.25,.5,1,1.5,2],h7=8,p7=[{key:"J",label:"Play backward"},{key:"K",label:"Stop playback"},{key:"L",label:"Play forward"},{key:"←/→",label:"Step one frame backward or forward"}];function m7(n,e,t){if(!Number.isFinite(t)||t<=0)return 0;const r=(n-e)/t,i=Math.max(0,Math.min(1,r)),s=Math.min(.5,h7/t);return i<=s?0:i>=1-s?1:i}const g7=d.memo(function({onTogglePlay:e,onSeek:t,disabled:r=!1}){const i=Re(D=>D.isPlaying),s=Re(D=>D.duration),a=Re(D=>D.timelineReady),c=Re(D=>D.playbackRate),u=Re(D=>D.loopEnabled),h=Re.getState().setPlaybackRate,m=Re.getState().setLoopEnabled,[O,x]=d.useState(!1),[v,w]=d.useState("time"),[k,$]=d.useState(""),M=d.useRef(null),V=d.useRef(null),A=d.useRef(null),Q=d.useRef(null),T=d.useRef(null),N=d.useRef(null),j=d.useRef(!1),W=d.useRef(0),K=d.useRef(v);K.current=v;const ae=d.useRef(s);ae.current=s;const ie=r||!a;On(()=>{const D=E=>{W.current=E;const X=ae.current,ee=X>0?Math.min(100,E/X*100):0;M.current&&(M.current.style.width=`${ee}%`),V.current&&(V.current.style.left=`${ee}%`),A.current&&(A.current.textContent=K.current==="frame"?f4(E,X):$r(E)),T.current&&T.current.setAttribute("aria-valuenow",String(Math.round(E)))},z=Ni.subscribe(D);D(Re.getState().currentTime);const q=setInterval(()=>{const E=Re.getState().currentTime,X=Re.getState().duration;if(X>0&&E>0){const ee=Math.min(100,E/X*100);M.current&&(M.current.style.width=`${ee}%`),V.current&&(V.current.style.left=`${ee}%`)}},500);return()=>{z(),clearInterval(q)}}),d.useEffect(()=>{if(!A.current)return;const D=W.current;A.current.textContent=v==="frame"?f4(D,s):$r(D)},[s,v]),d.useEffect(()=>{if(!O)return;const D=z=>{N.current&&!N.current.contains(z.target)&&x(!1)};return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[O]);const L=d.useCallback(D=>{if(r)return;const z=Q.current;if(!z||s<=0)return;const q=z.getBoundingClientRect(),E=m7(D,q.left,q.width),X=E*100;M.current&&(M.current.style.width=`${X}%`),V.current&&(V.current.style.left=`${X}%`),t(E*s)},[r,s,t]),le=d.useCallback(D=>{if(D.button!==0)return;D.preventDefault(),D.currentTarget.focus(),j.current=!0;const z=D.currentTarget,q=D.pointerId;try{z.setPointerCapture(q)}catch{}L(D.clientX);const E=Te=>{Te.pointerId===q&&j.current&&L(Te.clientX)},X=()=>{j.current=!1;try{z.releasePointerCapture(q)}catch{}z.removeEventListener("pointermove",E),z.removeEventListener("pointerup",ee),z.removeEventListener("pointercancel",ee),window.removeEventListener("pointerup",ee),window.removeEventListener("pointercancel",ee),document.removeEventListener("visibilitychange",Ce),window.removeEventListener("blur",X)},ee=Te=>{Te.pointerId===q&&X()},Ce=()=>{document.visibilityState==="hidden"&&X()};z.addEventListener("pointermove",E),z.addEventListener("pointerup",ee),z.addEventListener("pointercancel",ee),window.addEventListener("pointerup",ee),window.addEventListener("pointercancel",ee),document.addEventListener("visibilitychange",Ce),window.addEventListener("blur",X)},[L]),ye=d.useCallback(D=>{if(r||!a||s<=0)return;const z=D.shiftKey?10:1;D.key==="ArrowLeft"?(D.preventDefault(),t(Tm(W.current,-z))):D.key==="ArrowRight"&&(D.preventDefault(),t(Math.min(s,Tm(W.current,z))))},[r,a,s,t]),Oe=d.useCallback(()=>{if(r)return;const D=Number.parseInt(k,10);!Number.isFinite(D)||s<=0||t(Math.min(s,jy(Math.max(0,D))))},[r,s,k,t]),$e=d.useCallback(D=>{D.preventDefault(),Oe()},[Oe]),pe=d.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),Oe())},[Oe]);return p.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1","aria-disabled":r||void 0,style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[p.jsx("button",{type:"button","aria-label":i?"Pause":"Play",onClick:e,disabled:ie,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:i?p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[p.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),p.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):p.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:p.jsx("polygon",{points:"6,3 20,12 6,21"})})}),p.jsxs("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px]",style:{color:"#A1A1AA"},children:[p.jsx("span",{ref:A,children:$r(0)}),v==="time"?p.jsxs(p.Fragment,{children:[p.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),p.jsx("span",{style:{color:"#52525B"},children:$r(s)})]}):null]}),p.jsx("div",{ref:D=>{Q.current=D,T.current=D},role:"slider",tabIndex:r?-1:0,"aria-label":"Seek","aria-disabled":r||void 0,"aria-valuemin":0,"aria-valuemax":Math.round(s),"aria-valuenow":0,className:`min-w-[96px] flex-1 h-6 flex items-center group ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{touchAction:"none"},onPointerDown:le,onKeyDown:ye,children:p.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[p.jsx("div",{ref:M,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),p.jsx("div",{ref:V,className:"absolute top-1/2 z-[2] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})}),p.jsxs("div",{ref:N,className:"relative flex-shrink-0",children:[p.jsx("button",{type:"button",onClick:()=>x(D=>!D),disabled:r,className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:c===1?"1x":`${c}x`}),O&&p.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:f7.map(D=>p.jsxs("button",{onClick:()=>{h(D),x(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:D===c?"#FAFAFA":"#71717A",background:D===c?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:z=>{D!==c&&(z.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:z=>{D!==c&&(z.currentTarget.style.background="transparent")},children:[D,"x"]},D))})]}),p.jsx("button",{type:"button",onClick:()=>m(!u),disabled:r,className:`h-7 w-14 rounded-md border px-2 text-[10px] font-medium transition-colors ${u?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,title:"Loop playback","aria-label":u?"Disable loop playback":"Enable loop playback","aria-pressed":u,children:"Loop"}),p.jsx("button",{type:"button",onClick:()=>w(D=>D==="time"?"frame":"time"),disabled:r,className:"h-7 w-14 rounded-md border border-neutral-700 px-2 text-[10px] font-mono text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800",title:"Toggle time/frame display","aria-label":"Toggle time and frame display",children:v==="time"?"m:ss":"frames"}),p.jsx("form",{onSubmit:$e,className:"hidden sm:flex flex-shrink-0 w-[58px] items-center",children:p.jsx("input",{value:k,onChange:D=>$(D.target.value),disabled:r,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame",className:"h-7 w-[58px] rounded-md border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:pe,onBlur:Oe})}),p.jsx("div",{className:"hidden lg:flex items-center gap-1 text-[9px] font-mono text-neutral-500","aria-label":"Playback shortcuts: J backward, K stop, L forward, arrows step one frame",children:p7.map(D=>p.jsxs("span",{className:"group relative rounded border border-neutral-800 px-1 py-0.5",children:[D.key,p.jsx("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 hidden -translate-x-1/2 whitespace-nowrap rounded-md border border-neutral-700 bg-neutral-950 px-2 py-1 font-sans text-[10px] text-neutral-200 shadow-lg group-hover:block",children:D.label})]},D.key))})]})}),m4="#3CE6AC",O7="#E9FFF6",x7="rgba(60,230,172,0.12)";function ds(){return{clip:m4,accent:m4,label:O7,iconBackground:x7}}const g4={video:ds(),audio:ds(),img:ds(),div:ds(),span:ds(),p:ds(),h1:ds(),section:ds(),sfx:ds()},y7=ds(),Ry={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.045)",rowBackground:"#0A0A0B",rowBorder:"rgba(255,255,255,0.05)",gutterBackground:"#0A0A0B",gutterBorder:"rgba(255,255,255,0.05)",textPrimary:"#E8EDF5",textSecondary:"#8391A8",tickText:"rgba(131,145,168,0.92)",tickMajor:"rgba(255,255,255,0.13)",tickMinor:"rgba(255,255,255,0.08)",clipBackground:"linear-gradient(180deg, rgba(20,25,34,0.98), rgba(14,18,27,0.98))",clipBackgroundActive:"linear-gradient(180deg, rgba(24,30,40,0.99), rgba(15,20,29,0.99))",clipBorder:"rgba(255,255,255,0.07)",clipBorderHover:"rgba(255,255,255,0.11)",clipBorderActive:"rgba(255,255,255,0.14)",clipShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.18)",clipShadowHover:"inset 0 1px 0 rgba(255,255,255,0.035), 0 8px 20px rgba(0,0,0,0.2)",clipShadowActive:"inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.035)",clipShadowDragging:"inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 36px rgba(0,0,0,0.34), 0 8px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04)",handleColor:"rgba(255,255,255,0.11)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"11px 15px 13px 9px / 10px 14px 12px 10px"};function v7(n){const e=n.toLowerCase();return e.startsWith("h")&&e.length===2&&"123456".includes(e[1]??"")?g4.h1:g4[e]??y7}function b7({isHovered:n,isSelected:e,isDragging:t}){return t?.95:e?.82:n?.76:0}function w7({element:n,draggedElementId:e,previewStart:t,previewTrack:r}){return(n.key??n.id)!==e||t===null||r===null?n:{...n,start:t,track:r}}const O4=100;function Sl(n){return Math.round(n*O4)/O4}function Ou(n,e,t){return Math.min(Math.max(n,e),t)}const x4=.55,t1=40,y4=12;function v4(n,e,t){const r=(i,s,a)=>{if(a<i+t1){const c=Math.max(0,1-(a-i)/t1);return-Math.round(y4*c)}if(a>s-t1){const c=Math.max(0,1-(s-a)/t1);return Math.round(y4*c)}return 0};return{x:r(n.left,n.right,e),y:r(n.top,n.bottom,t)}}function S7(n,e,t){const r=(n.currentScrollLeft??0)-(n.originScrollLeft??0),i=(n.currentScrollTop??0)-(n.originScrollTop??0),s=(e-n.originClientX+r)/Math.max(n.pixelsPerSecond,1),a=(t-n.originClientY+i)/Math.max(n.trackHeight,1),c=Math.round(a),u=Math.max(0,n.trackOrder.indexOf(n.track)),h=u+c,m=Ou(h,0,Math.max(0,n.trackOrder.length-1)),O=Math.min(...n.trackOrder),x=Math.max(...n.trackOrder);let v=n.trackOrder[m]??n.track;const w=u===0,k=u===n.trackOrder.length-1;return w&&h<0&&u+a<=-x4?v=O-1:k&&h>n.trackOrder.length-1&&u+a>=n.trackOrder.length-1+x4&&(v=x+1),{start:Ou(Sl(n.start+s),0,Math.max(0,n.maxStart)),track:v}}function up(n){const e=Array.from(new Set(n)).sort((r,i)=>r-i),t=e.length;return new Map(e.map((r,i)=>[r,t-i]))}function k7(n,e,t){const r=Math.max(.05,n.minDuration??.1),i=(t-n.originClientX)/Math.max(n.pixelsPerSecond,1);if(e==="end"){const v=Ou(Sl(n.duration+i),r,Math.max(r,n.maxEnd-n.start));return{start:n.start,duration:v,playbackStart:n.playbackStart}}const s=Math.max(.1,n.playbackRate??1),a=n.playbackStart!=null?n.playbackStart/s:Number.POSITIVE_INFINITY,c=-Math.min(n.start-n.minStart,a),u=n.duration-r,h=Ou(i,c,u),m=Sl(n.start+h),O=Sl(n.duration-h),x=n.playbackStart!=null?Sl(Math.max(0,n.playbackStart+h*s)):void 0;return{start:m,duration:O,playbackStart:x}}function P7(n){if(n.compositionSrc||n.playbackStartAttr!=null||n.sourceDuration!=null&&Number.isFinite(n.sourceDuration)&&n.sourceDuration>0)return!0;const e=n.tag.toLowerCase();return["video","audio","img"].includes(e)}function A7(n){return!!(n.domId||n.selector)}function $7(n){if(n.playbackStartAttr!=null||n.playbackStart!=null)return!0;const e=n.tag.toLowerCase();return["video","audio"].includes(e)}function Ny(n){if(n.timingSource==="implicit")return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=A7(n),t=Number.isFinite(n.duration)&&n.duration>0,r=P7(n);return{canMove:e&&(r||t),canTrimEnd:e&&t&&r,canTrimStart:e&&t&&$7(n)}}function C7(n){if(n.capabilities.canMove)return null;const e=Math.max(0,n.width),t=Ou(n.offsetX,0,e),r=Math.max(0,n.handleWidth);return t<=r&&!n.capabilities.canTrimStart?"resize-start":t>=Math.max(0,e-r)&&!n.capabilities.canTrimEnd?"resize-end":"move"}function E7(n,e){return{start:n.start,end:n.start+n.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function T7({rangeStart:n,rangeEnd:e,elements:t,prompt:r}){const i=Math.min(n,e),s=Math.max(n,e),a=t.map(c=>`- #${c.id} (${c.tag}) — ${$r(c.start)} to ${$r(c.start+c.duration)}, track ${c.track}`).join(`
|
|
41
|
-
`);return`Edit the following HyperFrames composition:
|
|
42
|
-
|
|
43
|
-
Time range: ${$r(i)} — ${$r(s)}
|
|
44
|
-
|
|
45
|
-
Elements in range:
|
|
46
|
-
${a||"(none)"}
|
|
47
|
-
|
|
48
|
-
User request:
|
|
49
|
-
${r.trim()||"(no prompt provided)"}
|
|
50
|
-
|
|
51
|
-
Instructions:
|
|
52
|
-
Modify only the elements listed above within the specified time range.
|
|
53
|
-
The composition uses HyperFrames data attributes (data-start, data-duration, data-track-index) and GSAP for animations.
|
|
54
|
-
Preserve all other elements and timing outside this range.`}function b4(n){return n.trim()}function fa(n){return Number(Sl(n).toFixed(2)).toString()}const dp=20,M7=112;function Q7({widthPx:n,isSelected:e,isHovered:t,isInspectorActive:r,isThumbnailActive:i,isDragging:s}){const a=n<M7;return{compact:a,showControls:!s&&(!a||(t||e||r||i)),containerClassName:a?"absolute right-1 top-1 flex items-center gap-1":"absolute right-2 top-2 flex items-center gap-1",buttonClassName:a?"flex h-5 w-5 items-center justify-center rounded-[7px]":"flex h-6 w-6 items-center justify-center rounded-md",iconSize:a?12:14}}const w4=d.memo(function({el:e,pps:t,clipY:r,isSelected:i,isHovered:s,isDragging:a=!1,hasCustomContent:c,theme:u=Ry,trackStyle:h,isComposition:m,isInspectorActive:O=!1,isThumbnailActive:x=!1,thumbnailLabel:v="thumbnail",childCount:w=0,onHoverStart:k,onHoverEnd:$,onPointerDown:M,onResizeStart:V,onInspectorClick:A,onThumbnailClick:Q,onClick:T,onDoubleClick:N,children:j}){const W=e.start*t,K=Math.max(e.duration*t,4),ae=b7({isHovered:s,isSelected:i,isDragging:a}),ie=i?u.clipBorderActive:s?u.clipBorderHover:u.clipBorder,L=a?u.clipShadowDragging:i?u.clipShadowActive:s?u.clipShadowHover:u.clipShadow,le=Ny(e),ye=e.label||e.id||e.tag,Oe=w>0?`${w} nested selectable layer${w===1?"":"s"}`:"Inspect clip layer",$e=ae>.01,pe=i?u.clipBackgroundActive:u.clipBackground,D=Q7({widthPx:K,isSelected:i,isHovered:s,isInspectorActive:O,isThumbnailActive:x,isDragging:a}),z=i?"linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0))":"linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0))",q=`linear-gradient(120deg, ${h.accent}${i?"22":"1e"}, transparent 28%)`,X=[m&&!c?"repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(255,255,255,0.05) 3px, rgba(255,255,255,0.05) 6px)":void 0,z,q,pe].filter(Boolean).join(", ");return p.jsxs("div",{"data-clip":"true",className:c?"absolute overflow-hidden":"absolute flex items-center overflow-hidden",style:{left:W,width:K,top:r,bottom:r,borderRadius:u.clipRadius,backgroundImage:X,border:`1px solid ${ie}`,boxShadow:L,transition:"border-color 120ms ease-out, box-shadow 140ms ease-out, background 140ms ease-out",zIndex:a?20:i?10:s?5:1,cursor:le.canMove?"grab":"default",transform:a?"translateY(-1px)":void 0},title:m?`${e.compositionSrc} • Double-click to open`:`${ye} • ${e.start.toFixed(1)}s – ${(e.start+e.duration).toFixed(1)}s`,onPointerEnter:k,onPointerLeave:$,onPointerDown:M,onClick:T,onDoubleClick:N,children:[w>0&&D.showControls&&p.jsxs("button",{type:"button",className:`absolute flex items-center gap-1 rounded-md border border-studio-accent/30 bg-neutral-950/75 text-[10px] font-semibold tabular-nums text-studio-accent shadow-lg shadow-black/25 backdrop-blur transition-colors hover:border-studio-accent/60 hover:bg-studio-accent/15 ${D.compact?"left-1 top-1 h-5 px-1":"left-2 top-2 h-6 px-1.5"}`,style:{zIndex:dp},title:Oe,"aria-label":Oe,onPointerDown:ee=>{ee.stopPropagation()},onClick:ee=>{ee.stopPropagation(),A==null||A(ee)},children:[p.jsxs("svg",{width:D.compact?"11":"13",height:D.compact?"11":"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1"}),p.jsx("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1"}),p.jsx("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1"}),p.jsx("path",{d:"M14 17h6"})]}),w]}),A&&D.compact&&!D.showControls&&!a&&p.jsx("button",{type:"button",className:"group/clip-inspect absolute right-1 top-1/2 flex h-7 w-2 -translate-y-1/2 items-center justify-center rounded-full border border-white/15 bg-neutral-950/70 text-neutral-300 shadow-lg shadow-black/25 backdrop-blur transition-all hover:w-5 hover:border-white/30 hover:bg-neutral-950/90 focus:w-5 focus:border-studio-accent/60 focus:bg-studio-accent/15 focus:outline-none",style:{zIndex:dp},title:Oe,"aria-label":Oe,onPointerDown:ee=>{ee.stopPropagation()},onClick:ee=>{ee.stopPropagation(),A(ee)},children:p.jsxs("svg",{className:"opacity-0 transition-opacity group-hover/clip-inspect:opacity-100 group-focus/clip-inspect:opacity-100",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z"}),p.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),(Q||A)&&D.showControls&&p.jsxs("div",{className:D.containerClassName,style:{zIndex:dp},children:[Q&&p.jsx("button",{type:"button",className:`${D.buttonClassName} border shadow-lg shadow-black/25 backdrop-blur transition-colors ${x?"border-studio-accent/60 bg-studio-accent/18 text-studio-accent":"border-white/12 bg-neutral-950/70 text-neutral-400 hover:border-white/24 hover:text-neutral-100"}`,title:x?`Hide clip ${v}`:`Show clip ${v}`,"aria-label":x?`Hide clip ${v}`:`Show clip ${v}`,onPointerDown:ee=>{ee.stopPropagation()},onClick:ee=>{ee.stopPropagation(),Q(ee)},children:p.jsxs("svg",{width:D.iconSize,height:D.iconSize,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),p.jsx("circle",{cx:"8",cy:"10",r:"1.5"}),p.jsx("path",{d:"m4 17 5-5 4 4 2-2 5 5"})]})}),A&&p.jsx("button",{type:"button",className:`${D.buttonClassName} border shadow-lg shadow-black/25 backdrop-blur transition-colors ${O?"border-studio-accent/60 bg-studio-accent/18 text-studio-accent":"border-white/12 bg-neutral-950/70 text-neutral-400 hover:border-white/24 hover:text-neutral-100"}`,title:Oe,"aria-label":Oe,onPointerDown:ee=>{ee.stopPropagation()},onClick:ee=>{ee.stopPropagation(),A(ee)},children:p.jsxs("svg",{width:D.iconSize,height:D.iconSize,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z"}),p.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),p.jsx("div",{"aria-hidden":"true",role:"presentation",onPointerDown:ee=>V==null?void 0:V("start",ee),style:{position:"absolute",left:0,top:0,bottom:0,width:18,opacity:$e&&le.canTrimStart?1:0,pointerEvents:V&&le.canTrimStart?"auto":"none",zIndex:4,transition:"opacity 120ms ease-out",cursor:"col-resize",background:$e&&le.canTrimStart?`linear-gradient(90deg, ${h.accent}4d 0%, ${h.accent}22 42%, transparent 100%)`:"transparent"},children:p.jsx("div",{style:{position:"absolute",left:6,top:7,bottom:7,width:3,borderRadius:999,background:u.handleColor,boxShadow:`0 0 0 1px ${h.accent}38, 0 0 12px ${h.accent}18`,opacity:ae,pointerEvents:"none"}})}),p.jsx("div",{"aria-hidden":"true",role:"presentation",onPointerDown:ee=>V==null?void 0:V("end",ee),style:{position:"absolute",right:0,top:0,bottom:0,width:18,opacity:$e&&le.canTrimEnd?1:0,pointerEvents:V&&le.canTrimEnd?"auto":"none",zIndex:4,transition:"opacity 120ms ease-out",cursor:"col-resize",background:$e&&le.canTrimEnd?`linear-gradient(270deg, ${h.accent}4d 0%, ${h.accent}22 42%, transparent 100%)`:"transparent"},children:p.jsx("div",{style:{position:"absolute",right:6,top:7,bottom:7,width:3,borderRadius:999,background:u.handleColor,boxShadow:`0 0 0 1px ${h.accent}38, 0 0 12px ${h.accent}18`,opacity:ae,pointerEvents:"none"}})}),j]})});function S4(n){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=n,e.setAttribute("readonly","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.border="0",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,n.length);try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(e)}}function j7(){if(typeof navigator>"u")return!1;const n=navigator.userAgent;return/Safari/i.test(n)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(n)}async function xu(n){const e=j7();if(e&&S4(n))return!0;const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t!=null&&t.writeText)try{return await t.writeText(n),!0}catch{}return!e&&S4(n)}function Z7({rangeStart:n,rangeEnd:e,anchorX:t,anchorY:r,onClose:i}){const s=Re(T=>T.elements),[a,c]=d.useState(""),[u,h]=d.useState(!1),[m,O]=d.useState(!1),x=d.useRef(null),v=d.useRef(null),w=Math.min(n,e),k=Math.max(n,e),$=d.useMemo(()=>s.filter(T=>{const N=T.start+T.duration;return T.start<k&&N>w}),[s,w,k]);On(()=>{setTimeout(()=>{var T;return(T=v.current)==null?void 0:T.focus()},50)}),On(()=>{const T=N=>{N.key==="Escape"&&i()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)}),On(()=>{const T=N=>{x.current&&!x.current.contains(N.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",T),100),()=>window.removeEventListener("mousedown",T)});const M=d.useCallback(()=>T7({rangeStart:w,rangeEnd:k,elements:$,prompt:a}),[w,k,$,a]),V=d.useCallback(async()=>{await xu(M())&&(h(!0),setTimeout(()=>{h(!1),i()},800))},[M,i]),A=d.useCallback(async()=>{const T=b4(a);!T||!await xu(T)||(O(!0),setTimeout(()=>{O(!1)},800))},[a]),Q={position:"fixed",left:Math.max(8,Math.min(t-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return p.jsx("div",{ref:x,style:Q,children:p.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),p.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[$r(w)," — ",$r(k)]})]}),p.jsxs("span",{className:"text-[10px] text-neutral-600",children:[$.length," element",$.length!==1?"s":""]})]}),$.length>0&&p.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:$.map(T=>p.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[p.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",T.id]}),p.jsx("span",{className:"text-[10px] text-neutral-600",children:T.tag})]},T.id))}),p.jsx("div",{className:"p-3",children:p.jsx("textarea",{ref:v,value:a,onChange:T=>c(T.target.value),onKeyDown:T=>{T.key==="Enter"&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),V())},placeholder:"What should change?",rows:2,className:"w-full px-3 py-2 text-xs bg-neutral-800/60 border border-neutral-700/40 rounded-lg text-neutral-200 placeholder:text-neutral-600 resize-none focus:outline-none focus:border-studio-accent/40 transition-colors"})}),p.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[p.jsx("button",{onClick:A,disabled:!b4(a),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${m?"bg-green-500/20 text-green-400 border-green-500/30":"bg-neutral-800/70 text-neutral-200 border-neutral-700/50 hover:bg-neutral-800"} disabled:opacity-50 disabled:cursor-not-allowed`,children:m?"Prompt Copied!":"Copy Prompt"}),p.jsxs("button",{onClick:V,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${u?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-studio-accent/15 text-studio-accent border border-studio-accent/25 hover:bg-studio-accent/25"}`,children:[u?"Copied!":"Copy to Agent",!u&&p.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}const R7=10,N7=2e3,L7=.8,V7=1.25,_7=.0035;function tg(n){return Number.isFinite(n)?Math.max(R7,Math.min(N7,Math.round(n))):100}function Id(n,e){return n==="fit"?100:tg(e)}function D7(n,e,t){if(!Number.isFinite(n)||n<=0)return 100;const r=Id(e,t);return e==="fit"?n:n*(r/100)}function k4(n,e,t){const r=Id(e,t),i=n==="in"?r*V7:r*L7;return tg(i)}function I7(n,e,t){const r=Id(e,t);return!Number.isFinite(n)||n===0?r:tg(r*Math.exp(-n*_7))}const yu=/\.(jpg|jpeg|png|gif|webp|svg|ico)$/i,ng=/\.(mp4|webm|mov)$/i,rg=/\.(mp3|wav|ogg|m4a|aac)$/i,n1=/\.(woff|woff2|ttf|ttc|otf|eot)$/i,Ly=/\.(mp4|webm|mov|mp3|wav|ogg|m4a|aac|jpg|jpeg|png|gif|webp|svg|ico)$/i;function P4(n){return Ly.test(n)}const Mm="application/x-hyperframes-asset",X7=5;function A4(n){return yu.test(n)?"image":ng.test(n)?"video":rg.test(n)?"audio":null}function F7(n,e){const i=(n.split("/").pop()??"asset").replace(/\.[^.]+$/,"").replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").toLowerCase()||"asset",s=new Set(e);if(!s.has(i))return i;let a=2;for(;s.has(`${i}_${a}`);)a+=1;return`${i}_${a}`}function z7(n,e){const t=n.includes("/")?n.slice(0,n.lastIndexOf("/")):"";if(!t)return e;const r=t.split("/").filter(Boolean),i=e.split("/").filter(Boolean);for(;r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();return[...r.map(()=>".."),...i].join("/")||e.split("/").pop()||e}function H7(n,e,t=[]){let r=Math.round(Math.max(0,n.start)*100)/100;const i=r,s=e.map(h=>Number.isFinite(h)&&h>0?h:X7),a=s.reduce((h,m)=>Math.round((h+m)*100)/100,i),u=t.some(h=>{if(h.track!==n.track)return!1;const m=Math.max(0,h.start),O=m+Math.max(0,h.duration);return i<O&&a>m})?Math.max(n.track,...t.map(h=>h.track))+1:n.track;return s.map(h=>{const m=r;return r=Math.round((r+h)*100)/100,{start:m,track:u}})}function W7(n){var r,i;const e=Number.parseFloat(((r=n.match(/\bdata-width=(["'])([^"']+)\1/i))==null?void 0:r[2])??""),t=Number.parseFloat(((i=n.match(/\bdata-height=(["'])([^"']+)\1/i))==null?void 0:i[2])??"");return{left:0,top:0,width:Number.isFinite(e)&&e>0?Math.round(e):640,height:Number.isFinite(t)&&t>0?Math.round(t):360}}function B7(n){const e=`id="${n.id}" class="clip" src="${n.assetPath}" data-start="${n.start}" data-duration="${n.duration}" data-track-index="${n.track}"`,t=n.geometry??{left:0,top:0,width:640,height:360},r=`position: absolute; left: ${t.left}px; top: ${t.top}px; width: ${t.width}px; height: ${t.height}px; object-fit: contain; z-index: ${n.zIndex}`;return n.kind==="image"?`<img ${e} style="${r}" />`:n.kind==="video"?`<video ${e} muted playsinline style="${r}"></video>`:`<audio ${e} style="z-index: ${n.zIndex}"></audio>`}function Y7(n,e){const r=/<[^>]*data-composition-id="[^"]+"[^>]*>/i.exec(n);if(!r||r.index==null)throw new Error("No composition root found in target source");const i=r.index+r[0].length;return`${n.slice(0,i)}${e}${n.slice(i)}`}const Vy=.08,q7=new Set(["audio","music","sfx","sound","narration"]),U7=/\.(aac|flac|m4a|mp3|ogg|opus|wav)(?:[?#].*)?$/i;function Ol(n){return n?n.key??n.id:null}function _y(n){if(!n)return!1;const e=n.tag.trim().toLowerCase();return q7.has(e)?!0:!!(n.src&&U7.test(n.src))}function Qm(n){return!_y(n)}function $4(n,e,t=Vy){if(!e||!Number.isFinite(n)||!Number.isFinite(e.start)||!Number.isFinite(e.duration))return!1;const r=Math.max(0,e.start),i=Math.max(r,r+Math.max(0,e.duration)),s=Math.max(0,t);return Math.abs(n-r)<=s||Math.abs(n-i)<=s}function G7(n,e,t=Vy){if(!e||!Number.isFinite(n)||!Number.isFinite(e.start)||!Number.isFinite(e.duration))return!1;const r=Math.max(0,e.start),i=Math.max(r,r+Math.max(0,e.duration)),s=Math.max(0,t);return n>=r-s&&n<=i+s}function Dy(n,e={}){const t={visible:!1,compositeOpacity:0,hasBox:!1,inViewport:!1};if(!n.isConnected)return t;const r=n.ownerDocument,i=r.defaultView;if(!i)return t;const s=e.minCompositeOpacity??.01;let a=1,c=n;for(;c&&c!==r.body&&c!==r.documentElement;){const v=i.getComputedStyle(c);if(v.display==="none"||v.visibility==="hidden")return{...t,compositeOpacity:a};if(a*=Number.parseFloat(v.opacity||"1"),a<=s)return{...t,compositeOpacity:a};c=c.parentElement}const u=n.getBoundingClientRect(),h=u.width>.5&&u.height>.5;if(!h)return{visible:!1,compositeOpacity:a,hasBox:h,inViewport:!1};const m=i.innerWidth||r.documentElement.clientWidth,O=i.innerHeight||r.documentElement.clientHeight,x=u.right>0&&u.bottom>0&&u.left<m&&u.top<O;return{visible:x,compositeOpacity:a,hasBox:h,inViewport:x}}function K7(n,e={}){return Dy(n,e).visible}const Rn=32,xl=72,kl=24,C4=3,J7=18,e9=20,Kl="/icons/timeline";function Jl({src:n}){return p.jsx("img",{src:n,alt:"",width:12,height:12,style:{filter:"brightness(0) invert(1)"},draggable:!1})}const t9=p.jsx(Jl,{src:`${Kl}/captions.svg`}),E4=p.jsx(Jl,{src:`${Kl}/image.svg`}),n9=p.jsx(Jl,{src:`${Kl}/music.svg`}),T4=p.jsx(Jl,{src:`${Kl}/text.svg`}),jm=p.jsx(Jl,{src:`${Kl}/composition.svg`}),r9=p.jsx(Jl,{src:`${Kl}/audio.svg`}),M4={video:E4,audio:n9,img:E4,div:jm,span:t9,p:T4,h1:T4,section:jm,sfx:r9};function zc(n){const e=v7(n),t=n.toLowerCase(),r=t.startsWith("h")&&t.length===2&&"123456".includes(t[1]??"")?M4.h1:M4[t]??jm;return{...e,icon:r}}function i9(n,e){const t=[.25,.5,1,2,5,10,15,30,60,120,300,600];if(Number.isFinite(e)&&(e??0)>0)return t.find(a=>a*(e??0)>=128)??600;const r=[.25,.5,1,2,5,10,15,30,60],i=n/6;return r.find(s=>s>=i)??60}function s9(n,e){let t=n/2;return n>=30?t=n/6:n>=15?t=n/3:n>=5?t=n/5:n>=1&&(t=n/4),Number.isFinite(e)&&(e??0)>0&&t*(e??0)<20?Math.max(.25,n/2):Math.max(.25,t)}function o9(n,e){if(n<=0||!Number.isFinite(n)||n>7200)return{major:[],minor:[]};const t=i9(n,e),r=s9(t,e),i=[],s=[],a=2e3;for(let c=0;c<=n+.001&&i.length+s.length<a;c+=r){const u=Math.round(c*100)/100;Math.abs(u%t)<.01||Math.abs(u%t-t)<.01?i.push(u):s.push(u)}return{major:i,minor:s}}function a9(n,e,t){if(!Number.isFinite(n))return"0:00";const r=Math.max(0,n);if(t<1){const i=Math.round(r*10),s=Math.floor(i/10),a=i%10;return`${$r(s)}.${a}`}if(e>=3600||r>=3600){const i=Math.floor(r),s=Math.floor(i/3600),a=Math.floor(i%3600/60),c=i%60;return`${s}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`}return $r(r)}function Q4(n,e,t){return n==="fit"||!Number.isFinite(e)||!Number.isFinite(t)?!1:e-t>1}function l9(n,e,t){return n==="manual"&&e==="fit"?0:t}function c9(n){const e=Math.max(0,n.currentPixelsPerSecond),t=Math.max(0,n.nextPixelsPerSecond);if(!Number.isFinite(n.pointerX)||!Number.isFinite(n.currentScrollLeft)||!Number.isFinite(n.duration)||n.duration<=0||e<=0||t<=0)return Math.max(0,n.currentScrollLeft);const r=Math.max(0,n.currentScrollLeft+n.pointerX-n.gutter),i=Math.max(0,Math.min(n.duration,r/e));return Math.max(0,n.gutter+i*t-n.pointerX)}function j4(n,e){return!Number.isFinite(n)||!Number.isFinite(e)?Rn:Rn+Math.max(0,n)*Math.max(0,e)}function u9(n){return kl+Math.max(0,n)*xl+e9}function d9(n,e){return!Number.isFinite(n)||!Number.isFinite(e)?!0:n-e<=1}function f9(n,e){return n.length===0?0:e==null||e<0?n[0]:e>=n.length?Math.max(...n)+1:n[e]??n[n.length-1]??0}function Z4(n,e,t){const r=e-n.rectLeft+n.scrollLeft-Rn,i=t-n.rectTop+n.scrollTop-kl,s=Math.max(0,Math.min(n.duration,Math.round(r/Math.max(n.pixelsPerSecond,1)*100)/100)),a=Math.floor(i/Math.max(n.trackHeight,1));return{start:s,track:f9(n.trackOrder,a)}}const h9=d.memo(function({onSeek:e,onDrillDown:t,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:a,onDeleteElement:c,onMoveElement:u,onResizeElement:h,onBlockedEditAttempt:m,onSelectElement:O,onInspectElement:x,inspectedElementId:v,layerChildCounts:w,thumbnailedElementIds:k,onToggleElementThumbnail:$,disabled:M=!1,theme:V}={}){const A=d.useMemo(()=>({...Ry,...V}),[V]),Q=Re(B=>B.elements),T=Re(B=>B.duration),N=Re(B=>B.timelineReady),j=Re(B=>B.selectedElementId),W=Re(B=>B.setSelectedElementId),K=Re(B=>B.updateElement),ae=Re(B=>B.currentTime),ie=Re(B=>B.zoomMode),L=Re(B=>B.manualZoomPercent),le=Re(B=>B.setZoomMode),ye=Re(B=>B.setManualZoomPercent),Oe=d.useRef(null),$e=d.useRef(null),pe=d.useRef(null),[D,z]=d.useState(null),q=d.useRef(!1),E=d.useRef(M);E.current=M;const X=d.useRef(null),[ee,Ce]=d.useState(!1);On(()=>{const B=xe=>xe.key==="Shift"&&Ce(!0),Pe=xe=>xe.key==="Shift"&&Ce(!1),ke=()=>Ce(!1);return window.addEventListener("keydown",B),window.addEventListener("keyup",Pe),window.addEventListener("blur",ke),()=>{window.removeEventListener("keydown",B),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",ke)}});const Te=d.useRef(!1),tt=d.useRef(0),[De,G]=d.useState(null),[oe,fe]=d.useState(null),Ee=d.useRef(null);Ee.current=oe;const[Le,Fe]=d.useState(null),Ve=d.useRef(null);Ve.current=Le;const qe=d.useRef(null),Ue=d.useRef(u);Ue.current=u;const ce=d.useRef(h);ce.current=h;const je=d.useRef(c);je.current=c;const Se=d.useRef(!1),[Me,ct]=d.useState(!1),[fn,Mn]=d.useState(!0),[ze,Pt]=d.useState(0),pt=d.useRef(null),vt=d.useRef(0),dt=d.useCallback(()=>{const B=pe.current;Mn(B?d9(B.scrollHeight,B.clientHeight):!0)},[]),Rt=d.useCallback(()=>{vt.current&&cancelAnimationFrame(vt.current),vt.current=requestAnimationFrame(()=>{vt.current=0,dt()})},[dt]),en=d.useCallback(B=>{pt.current&&(pt.current.disconnect(),pt.current=null),$e.current=B,B&&(Pt(B.clientWidth),Rt(),pt.current=new ResizeObserver(([Pe])=>{Pt(Pe.contentRect.width),Rt()}),pt.current.observe(B))},[Rt]);On(()=>()=>{var B;(B=pt.current)==null||B.disconnect(),vt.current&&cancelAnimationFrame(vt.current)}),d.useEffect(()=>{M&&(io.current(),q.current=!1,Te.current=!1,qe.current=null,fe(null),Fe(null),G(null),ct(!1),it(!1))},[M]);const Qt=d.useMemo(()=>{const B=Number.isFinite(T)?T:0;if(Q.length===0)return B;const Pe=Math.max(...Q.map(xe=>xe.start+xe.duration)),ke=Math.max(B,Pe);return Number.isFinite(ke)?ke:B},[Q,T]),te=d.useMemo(()=>{const B=new Map;for(const Pe of Q){const ke=B.get(Pe.track)??[];ke.push(Pe),B.set(Pe.track,ke)}return Array.from(B.entries()).sort(([Pe],[ke])=>Pe-ke)},[Q]),ne=d.useMemo(()=>{var Pe;const B=new Map;for(const[ke,xe]of te)B.set(ke,zc(((Pe=xe[0])==null?void 0:Pe.tag)??""));return B},[te]),Ke=d.useMemo(()=>te.map(([B])=>B),[te]),Ze=d.useRef(Ke);Ze.current=Ke;const Je=d.useMemo(()=>!(oe!=null&&oe.started)||Ke.length===0||Ke.includes(oe.previewTrack)?Ke:[...Ke,oe.previewTrack].sort((B,Pe)=>B-Pe),[oe,Ke]),Et=u9(Je.length),mt=d.useMemo(()=>Q.find(B=>(B.key??B.id)===j)??null,[Q,j]),wt=d.useRef(mt);wt.current=mt;const ft=ze>Rn&&Qt>0?(ze-Rn-2)/Qt:100,st=D7(ft,ie,L),_e=Math.max(0,Qt*st),At=d.useRef(ie);At.current=ie;const ut=d.useRef(L);ut.current=L;const zt=d.useRef(ie),Tt=d.useRef(ft);Tt.current=ft;const jt=d.useRef(Qt);jt.current=Qt;const cn=d.useRef(st);cn.current=st;const yn=d.useCallback(B=>{!Oe.current||jt.current<=0||(Oe.current.style.left=`${j4(B,cn.current)}px`)},[]);d.useEffect(()=>{yn(ae)},[ae,st,yn]),d.useEffect(()=>{const B=pe.current;if(!B){zt.current=ie;return}B.scrollLeft=l9(zt.current,ie,B.scrollLeft),zt.current=ie},[ie]),On(()=>Ni.subscribe(Pe=>{const ke=jt.current;if(!Oe.current||ke<=0)return;const xe=j4(Pe,cn.current);Oe.current.style.left=`${xe}px`;const We=pe.current;if(We&&!q.current&&Q4(At.current,We.scrollWidth,We.clientWidth)){const be=We.scrollLeft+We.clientWidth,Lt=We.scrollLeft,pn=We.clientWidth*.12;xe>be-pn?We.scrollLeft=xe-We.clientWidth*.15:xe<Lt+Rn&&(We.scrollLeft=Math.max(0,xe-Rn))}}));const hn=d.useRef(0),Nt=d.useRef(0),Yn=d.useRef(null),Or=d.useCallback((B,Pe,ke)=>{const xe=pe.current,We=S7({start:B.element.start,track:B.element.track,duration:B.element.duration,originClientX:B.originClientX,originClientY:B.originClientY,originScrollLeft:B.originScrollLeft,originScrollTop:B.originScrollTop,currentScrollLeft:(xe==null?void 0:xe.scrollLeft)??B.originScrollLeft,currentScrollTop:(xe==null?void 0:xe.scrollTop)??B.originScrollTop,pixelsPerSecond:cn.current,trackHeight:xl,maxStart:Math.max(0,jt.current-B.element.duration),trackOrder:Ze.current},Pe,ke);return{...B,started:!0,pointerClientX:Pe,pointerClientY:ke,previewStart:We.start,previewTrack:We.track}},[]),Br=d.useCallback(()=>{Yn.current=null,Nt.current&&(cancelAnimationFrame(Nt.current),Nt.current=0)},[]),tr=d.useCallback(()=>{Nt.current=0;const B=Ee.current,Pe=Yn.current,ke=pe.current;if(!B||!Pe||!ke)return;const xe=ke.getBoundingClientRect(),We=v4(xe,Pe.clientX,Pe.clientY);if(We.x===0&&We.y===0)return;const be=Math.max(0,ke.scrollWidth-ke.clientWidth),Lt=Math.max(0,ke.scrollHeight-ke.clientHeight),pn=Math.max(0,Math.min(be,ke.scrollLeft+We.x)),Yt=Math.max(0,Math.min(Lt,ke.scrollTop+We.y));(pn!==ke.scrollLeft||Yt!==ke.scrollTop)&&(ke.scrollLeft=pn,ke.scrollTop=Yt,fe(Ln=>Ln&&Or(Ln,Pe.clientX,Pe.clientY)),Nt.current=requestAnimationFrame(tr))},[Or]),nr=d.useCallback((B,Pe)=>{Yn.current={clientX:B,clientY:Pe};const ke=pe.current;if(!ke)return;const xe=ke.getBoundingClientRect(),We=v4(xe,B,Pe);if(We.x===0&&We.y===0){Nt.current&&(cancelAnimationFrame(Nt.current),Nt.current=0);return}Nt.current||(Nt.current=requestAnimationFrame(tr))},[tr]),Ps=d.useRef(Or);Ps.current=Or;const Xa=d.useRef(nr);Xa.current=nr;const io=d.useRef(Br);io.current=Br;const ki=d.useCallback(B=>{if(E.current)return;const Pe=pe.current;if(!Pe||Qt<=0)return;const ke=Pe.getBoundingClientRect(),xe=Pe.scrollLeft,We=B-ke.left+xe-Rn;if(We<0)return;const be=Math.max(0,Math.min(Qt,We/st));Ni.notify(be),e==null||e(be)},[Qt,e,st]),xr=d.useCallback(B=>{cancelAnimationFrame(hn.current);const Pe=pe.current;if(!Pe||!q.current||!Q4(At.current,Pe.scrollWidth,Pe.clientWidth))return;const ke=Pe.getBoundingClientRect(),xe=40,We=12;let be=0;if(B<ke.left+xe){const Lt=Math.max(0,1-(B-ke.left)/xe);be=-We*Lt}else if(B>ke.right-xe){const Lt=Math.max(0,1-(ke.right-B)/xe);be=We*Lt}be!==0&&(Pe.scrollLeft+=be,ki(B),hn.current=requestAnimationFrame(()=>xr(B)))},[ki]);On(()=>{const B=()=>{requestAnimationFrame(()=>{Se.current=!1})},Pe=xe=>{if(E.current)return;const We=Ee.current,be=Ve.current,Lt=qe.current;if(be){const Yt=Math.abs(xe.clientX-be.originClientX);if(!be.started&&Yt<2)return;ct(!1),G(null);const wn=be.element.sourceDuration!=null?Math.max(0,(be.element.sourceDuration-(be.element.playbackStart??0))/Math.max(be.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,Ln=be.element.tag.toLowerCase(),ir=Ln==="audio"||Ln==="video",qn=k7({start:be.element.start,duration:be.element.duration,originClientX:be.originClientX,pixelsPerSecond:cn.current,minStart:0,maxEnd:Math.min(jt.current,be.element.start+wn),playbackStart:be.edge==="start"&&ir?be.element.playbackStart??0:be.element.playbackStart,playbackRate:be.element.playbackRate},be.edge,xe.clientX);Fe(Tr=>Tr&&{...Tr,started:!0,previewStart:qn.start,previewDuration:qn.duration,previewPlaybackStart:qn.playbackStart});return}if(Lt){const Yt=Math.hypot(xe.clientX-Lt.originClientX,xe.clientY-Lt.originClientY),wn=Lt.intent==="move"?4:2;if(!Lt.started&&Yt<wn)return;Lt.started||(Lt.started=!0,qe.current=Lt,Se.current=!0,ct(!1),G(null),m==null||m(Lt.element,Lt.intent));return}if(!We)return;const pn=Math.hypot(xe.clientX-We.originClientX,xe.clientY-We.originClientY);!We.started&&pn<4||(ct(!1),G(null),fe(Yt=>Yt&&Ps.current(Yt,xe.clientX,xe.clientY)),Xa.current(xe.clientX,xe.clientY))},ke=()=>{var pn,Yt;if(io.current(),E.current)return;const xe=Ve.current;if(xe){if(Ve.current=null,Fe(null),!xe.started||(Se.current=!0,B(),!(xe.previewStart!==xe.element.start||xe.previewDuration!==xe.element.duration||xe.previewPlaybackStart!==xe.element.playbackStart)))return;K(xe.element.key??xe.element.id,{start:xe.previewStart,duration:xe.previewDuration,playbackStart:xe.previewPlaybackStart}),Promise.resolve((pn=ce.current)==null?void 0:pn.call(ce,xe.element,{start:xe.previewStart,duration:xe.previewDuration,playbackStart:xe.previewPlaybackStart})).catch(Ln=>{K(xe.element.key??xe.element.id,{start:xe.element.start,duration:xe.element.duration,playbackStart:xe.element.playbackStart}),console.error("[Timeline] Failed to persist clip resize",Ln)});return}const We=qe.current;if(We){if(qe.current=null,!We.started)return;B();return}const be=Ee.current;!be||(Ee.current=null,fe(null),!be.started)||(Se.current=!0,B(),!(be.previewStart!==be.element.start||be.previewTrack!==be.element.track))||(K(be.element.key??be.element.id,{start:be.previewStart,track:be.previewTrack}),Promise.resolve((Yt=Ue.current)==null?void 0:Yt.call(Ue,be.element,{start:be.previewStart,track:be.previewTrack})).catch(wn=>{K(be.element.key??be.element.id,{start:be.element.start,track:be.element.track}),console.error("[Timeline] Failed to persist clip move",wn)}))};return window.addEventListener("pointermove",Pe),window.addEventListener("pointerup",ke),window.addEventListener("pointercancel",ke),()=>{io.current(),window.removeEventListener("pointermove",Pe),window.removeEventListener("pointerup",ke),window.removeEventListener("pointercancel",ke)}});const As=d.useRef(wt.current);d.useEffect(()=>{const B=As.current,Pe=wt.current;As.current=Pe,B&&!Pe&&(ct(!1),G(null))});const Fi=d.useCallback(B=>{var Pe,ke;if(E.current){B.preventDefault();return}if(B.button===0){if(B.shiftKey){B.currentTarget.setPointerCapture(B.pointerId),Te.current=!0,ct(!1);const xe=(Pe=pe.current)==null?void 0:Pe.getBoundingClientRect();if(xe){const We=B.clientX-xe.left+(((ke=pe.current)==null?void 0:ke.scrollLeft)??0)-Rn,be=Math.max(0,We/st);tt.current=be,G({start:be,end:be,anchorX:B.clientX,anchorY:B.clientY})}return}X.current=null,!B.target.closest("[data-clip]")&&(B.currentTarget.setPointerCapture(B.pointerId),q.current=!0,G(null),ct(!1),ki(B.clientX))}},[ki,st]),ic=d.useCallback(B=>{var Pe,ke;if(!E.current){if(Te.current){const xe=(Pe=pe.current)==null?void 0:Pe.getBoundingClientRect();if(xe){const We=B.clientX-xe.left+(((ke=pe.current)==null?void 0:ke.scrollLeft)??0)-Rn,be=Math.max(0,We/st);G(Lt=>Lt?{...Lt,end:be,anchorX:B.clientX,anchorY:B.clientY}:null)}return}q.current&&(ki(B.clientX),xr(B.clientX))}},[ki,xr,st]),so=d.useCallback(()=>{if(Te.current){Te.current=!1;const B=X.current;X.current=null,G(Pe=>Pe&&B&&Math.abs(Pe.end-Pe.start)<=.2?(ct(!0),E7(B.element,B)):Pe&&Math.abs(Pe.end-Pe.start)>.2?(ct(!0),Pe):null);return}q.current=!1,cancelAnimationFrame(hn.current)},[]),{major:Pi,minor:rr}=d.useMemo(()=>o9(Qt,st),[Qt,st]),zi=Pi.length>=2?Math.max(.25,Pi[1]-Pi[0]):Qt;d.useEffect(()=>{dt()},[dt,N,Q.length,Et]);const Hi=d.useCallback(B=>Le&&(Le.element.key??Le.element.id)===(B.key??B.id)?{...B,start:Le.previewStart,duration:Le.previewDuration,playbackStart:Le.previewPlaybackStart}:B,[Le]),[$s,it]=d.useState(!1),bt=d.useCallback(B=>{if(E.current)return;const Pe=B.dataTransfer.files.length>0,ke=Array.from(B.dataTransfer.types).includes(Mm);!Pe&&!ke||(B.preventDefault(),ke&&(B.dataTransfer.dropEffect="copy"),it(!0))},[]),yr=d.useCallback(B=>{if(B.preventDefault(),it(!1),E.current)return;if(s&&B.dataTransfer.files.length>0){const ke=pe.current,xe=ke==null?void 0:ke.getBoundingClientRect(),We=ke&&xe?Z4({rectLeft:xe.left,rectTop:xe.top,scrollLeft:ke.scrollLeft,scrollTop:ke.scrollTop,pixelsPerSecond:cn.current,duration:jt.current,trackHeight:xl,trackOrder:Ze.current},B.clientX,B.clientY):void 0;s(Array.from(B.dataTransfer.files),We);return}const Pe=B.dataTransfer.getData(Mm);if(!(!Pe||!a))try{const ke=JSON.parse(Pe);if(!ke.path)return;const xe=pe.current,We=xe==null?void 0:xe.getBoundingClientRect();if(!xe||!We)return;const be=Z4({rectLeft:We.left,rectTop:We.top,scrollLeft:xe.scrollLeft,scrollTop:xe.scrollTop,pixelsPerSecond:cn.current,duration:jt.current,trackHeight:xl,trackOrder:Ze.current},B.clientX,B.clientY);a(ke.path,be)}catch{}},[a,s]),ai=d.useCallback(B=>{if(E.current||!B.ctrlKey)return;const Pe=pe.current;if(!Pe||jt.current<=0||Tt.current<=0||cn.current<=0)return;B.preventDefault(),B.stopPropagation();const ke=Pe.getBoundingClientRect(),xe=B.clientX-ke.left,We=I7(B.deltaY,At.current,ut.current);if(We===ut.current&&At.current==="manual")return;const be=Tt.current*(We/100),Lt=c9({pointerX:xe,currentScrollLeft:Pe.scrollLeft,gutter:Rn,currentPixelsPerSecond:cn.current,nextPixelsPerSecond:be,duration:jt.current});le("manual"),ye(We),requestAnimationFrame(()=>{const pn=Math.max(0,Pe.scrollWidth-Pe.clientWidth);Pe.scrollLeft=Math.min(pn,Lt)})},[ye,le]);if(d.useEffect(()=>{const B=pe.current;if(B)return B.addEventListener("wheel",ai,{passive:!1,capture:!0}),()=>{B.removeEventListener("wheel",ai,{capture:!0})}},[ai,N,Q.length]),!N||Q.length===0)return p.jsxs("div",{className:`h-full border-t bg-[#0a0a0b] flex flex-col select-none transition-colors duration-150 ${$s?"border-studio-accent/50 bg-studio-accent/[0.03]":"border-neutral-800/50"}`,"aria-disabled":M||void 0,onDragOver:bt,onDragLeave:()=>it(!1),onDrop:yr,children:[p.jsx("div",{className:"flex-shrink-0 border-b border-neutral-800/40 flex items-end relative",style:{height:kl,paddingLeft:Rn},children:[0,10,20,30,40,50].map(B=>p.jsxs("div",{className:"flex flex-col items-center",style:{position:"absolute",left:Rn+B*14},children:[p.jsx("span",{className:"text-[9px] text-neutral-600 font-mono tabular-nums leading-none mb-0.5",children:`${Math.floor(B/60)}:${(B%60).toString().padStart(2,"0")}`}),p.jsx("div",{className:"w-px h-[5px] bg-neutral-700/40"})]},B))}),p.jsx("div",{className:"flex-1 flex items-center justify-center",children:p.jsx("div",{className:`flex items-center gap-3 px-6 py-3 border border-dashed rounded-lg transition-colors duration-150 ${$s?"border-studio-accent/60 bg-studio-accent/[0.06]":"border-neutral-700/50"}`,children:$s?p.jsxs(p.Fragment,{children:[p.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-studio-accent flex-shrink-0",children:[p.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),p.jsx("polyline",{points:"7 10 12 15 17 10"}),p.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),p.jsx("span",{className:"text-[13px] text-studio-accent",children:"Drop media files to import"})]}):p.jsxs(p.Fragment,{children:[p.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-neutral-600 flex-shrink-0",children:[p.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2"}),p.jsx("path",{d:"M7 2v20"}),p.jsx("path",{d:"M17 2v20"}),p.jsx("path",{d:"M2 7h20"}),p.jsx("path",{d:"M2 17h20"})]}),p.jsx("span",{className:"text-[13px] text-neutral-500",children:s?"Drop media here or describe your video to start":"Describe your video to start creating"})]})})})]});const Ut=(oe==null?void 0:oe.element)??null,vn=(oe==null?void 0:oe.started)===!0&&Ut?w7({element:Ut,draggedElementId:Ut.key??Ut.id,previewStart:oe.previewStart,previewTrack:oe.previewTrack}):null,Wi=(oe==null?void 0:oe.started)===!0&&vn&&pe.current?{left:oe.pointerClientX-pe.current.getBoundingClientRect().left+pe.current.scrollLeft-oe.pointerOffsetX,top:oe.pointerClientY-pe.current.getBoundingClientRect().top+pe.current.scrollTop-oe.pointerOffsetY}:null,bn=(B,Pe)=>p.jsxs(p.Fragment,{children:[i==null?void 0:i(B),p.jsx("div",{className:r?"absolute inset-0 overflow-hidden":"flex flex-col justify-center overflow-hidden flex-1 min-w-0 px-6",children:(r==null?void 0:r(B,Pe))??p.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-between py-3",children:[p.jsx("div",{className:"flex items-start",children:p.jsx("span",{className:"max-w-full truncate rounded-md px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.08em] leading-none",style:{color:Pe.label,background:`${Pe.accent}26`,boxShadow:`inset 0 0 0 1px ${Pe.accent}33`},children:B.tag})}),p.jsx("div",{className:"flex items-center",children:p.jsxs("span",{className:"max-w-full truncate rounded-md px-1.5 py-0.5 text-[10px] font-medium tabular-nums leading-none",style:{color:A.textSecondary,background:"rgba(255,255,255,0.04)"},children:[$r(B.start)," ","→"," ",$r(B.start+B.duration)]})})]})})]});return p.jsxs("div",{ref:en,"aria-label":"Timeline","aria-disabled":M||void 0,className:`relative border-t select-none h-full overflow-hidden transition-opacity ${M?"cursor-not-allowed opacity-45":ee?"cursor-crosshair":"cursor-default"}`,style:{touchAction:"pan-x pan-y",background:A.shellBackground,borderColor:A.shellBorder},children:[p.jsx("div",{ref:pe,className:`${ie==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full`,onDragOver:bt,onDragLeave:()=>it(!1),onDrop:yr,onPointerDown:Fi,onPointerMove:ic,onPointerUp:so,onLostPointerCapture:so,children:p.jsxs("div",{className:"relative",style:{height:Et,width:Rn+_e},children:[p.jsx("svg",{className:"absolute pointer-events-none",style:{left:Rn,width:_e},height:Et,children:Pi.map(B=>{const Pe=B*st;return p.jsx("line",{x1:Pe,y1:kl,x2:Pe,y2:Et,stroke:A.tickMinor,strokeWidth:"1"},`g-${B}`)})}),p.jsxs("div",{className:"relative overflow-hidden",style:{height:kl,marginLeft:Rn,width:_e},children:[ee&&!De&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none z-10",children:p.jsx("span",{className:"text-[9px] font-medium",style:{color:A.textSecondary},children:"Drag or click a clip to edit range"})}),rr.map(B=>p.jsx("div",{className:"absolute bottom-0",style:{left:B*st},children:p.jsx("div",{className:"w-px h-[3px]",style:{background:A.tickMinor}})},`m-${B}`)),Pi.map(B=>p.jsxs("div",{className:"absolute bottom-0 flex flex-col items-center",style:{left:B*st},children:[p.jsx("span",{className:"text-[9px] font-mono tabular-nums leading-none mb-0.5",style:{color:A.tickText},children:a9(B,Qt,zi)}),p.jsx("div",{className:"w-px h-[5px]",style:{background:A.tickMajor}})]},`M-${B}`))]}),Je.map(B=>{var We;const Pe=((We=te.find(([be])=>be===B))==null?void 0:We[1])??[],ke=ne.get(B)??zc(""),xe=(oe==null?void 0:oe.started)===!0&&!Ke.includes(B)&&Pe.length===0;return p.jsxs("div",{className:"relative flex",style:{height:xl,background:A.rowBackground,borderBottom:`1px solid ${A.rowBorder}`},children:[p.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",style:{width:Rn,background:A.gutterBackground,borderRight:`1px solid ${A.gutterBorder}`},children:p.jsx("div",{className:"flex items-center justify-center",style:{width:18,height:18,borderRadius:6,backgroundColor:ke.iconBackground,border:`1px solid ${A.gutterBorder}`,color:"#fff"},children:ke.icon})}),p.jsxs("div",{style:{width:_e},className:"relative",children:[xe&&p.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:ke.label,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",background:`linear-gradient(90deg, ${ke.accent}14, transparent 28%)`,boxShadow:`inset 0 0 0 1px ${ke.accent}24`},children:"New track"}),Pe.map((be,Lt)=>{const pn=zc(be.tag),Yt=be.key??be.id,wn=Ny(be),Ln=j===Yt,ir=Qm(be),qn=ir&&v===Ol(be),Tr=ir?(w==null?void 0:w.get(Yt))??0:0,Zt=(k==null?void 0:k.has(Yt))??!1,li=_y(be)?"waveform":"thumbnail",tn=!!be.compositionSrc,Vn=`${Yt}-${Lt}`,_t=D===Vn,Fa=!!r;if((oe==null?void 0:oe.started)===!0&&((Ut==null?void 0:Ut.key)??(Ut==null?void 0:Ut.id))===Yt)return null;const ht=Hi(be);return p.jsx(w4,{el:ht,pps:st,clipY:C4,isSelected:Ln,isHovered:_t,isDragging:!1,hasCustomContent:Fa,theme:A,trackStyle:pn,isComposition:tn,isInspectorActive:qn,isThumbnailActive:Zt,thumbnailLabel:li,childCount:Tr,onHoverStart:()=>z(Vn),onHoverEnd:()=>z(null),onInspectorClick:ir&&x?Bt=>{Bt.stopPropagation(),!Se.current&&(W(Yt),O==null||O(be),x(be))}:void 0,onThumbnailClick:$&&ir?Bt=>{Bt.stopPropagation(),!Se.current&&$(be)}:void 0,onResizeStart:(Bt,vr)=>{vr.button!==0||vr.shiftKey||!h||Bt==="start"&&!wn.canTrimStart||Bt==="end"&&!wn.canTrimEnd||(vr.stopPropagation(),qe.current=null,ct(!1),G(null),Fe({element:be,edge:Bt,originClientX:vr.clientX,previewStart:be.start,previewDuration:be.duration,previewPlaybackStart:be.playbackStart,started:!1}))},onPointerDown:Bt=>{var Yi,Mr;if(Bt.button!==0)return;if(Bt.shiftKey){X.current={element:be,anchorX:Bt.clientX,anchorY:Bt.clientY};return}const Bi=Bt.currentTarget.getBoundingClientRect(),Ai=C7({width:Bi.width,offsetX:Bt.clientX-Bi.left,handleWidth:J7,capabilities:wn});if(Ai&&(Ai==="move"&&u||Ai!=="move"&&h)){qe.current={element:be,intent:Ai,originClientX:Bt.clientX,originClientY:Bt.clientY,started:!1};return}!u||!wn.canMove||(qe.current=null,ct(!1),G(null),fe({element:be,originClientX:Bt.clientX,originClientY:Bt.clientY,originScrollLeft:((Yi=pe.current)==null?void 0:Yi.scrollLeft)??0,originScrollTop:((Mr=pe.current)==null?void 0:Mr.scrollTop)??0,pointerClientX:Bt.clientX,pointerClientY:Bt.clientY,pointerOffsetX:Bt.clientX-Bi.left,pointerOffsetY:Bt.clientY-Bi.top,previewStart:be.start,previewTrack:be.track,started:!1}))},onClick:Bt=>{if(Bt.stopPropagation(),Se.current)return;const vr=Ln?null:be;W(vr?Yt:null),O==null||O(vr)},onDoubleClick:Bt=>{Bt.stopPropagation(),!Se.current&&tn&&t&&t(be)},children:bn(ht,pn)},Vn)})]})]},B)}),vn&&Wi&&p.jsx("div",{className:"absolute pointer-events-none",style:{top:Wi.top,left:Wi.left,width:Math.max(vn.duration*st,4),height:xl-C4*2,zIndex:40},children:p.jsx(w4,{el:{...vn,start:0},pps:st,clipY:0,isSelected:j===(vn.key??vn.id),isHovered:!1,isDragging:!0,hasCustomContent:!!r,theme:A,trackStyle:zc(vn.tag),isComposition:!!vn.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:bn(vn,zc(vn.tag))})}),De&&p.jsx("div",{className:"absolute pointer-events-none",style:{left:Rn+Math.min(De.start,De.end)*st,width:Math.abs(De.end-De.start)*st,top:kl,bottom:0,backgroundColor:"rgba(59, 130, 246, 0.12)",borderLeft:"1px solid rgba(59, 130, 246, 0.4)",borderRight:"1px solid rgba(59, 130, 246, 0.4)",zIndex:50}}),p.jsxs("div",{ref:Oe,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${Rn}px`,zIndex:100},children:[p.jsx("div",{className:"absolute top-0 bottom-0",style:{left:"50%",width:2,marginLeft:-1,background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 8px rgba(60,230,172,0.5)"}}),p.jsx("div",{className:"absolute",style:{left:"50%",top:0,transform:"translateX(-50%)"},children:p.jsx("div",{style:{width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"8px solid var(--hf-accent, #3CE6AC)",filter:"drop-shadow(0 1px 3px rgba(0,0,0,0.6))"}})})]})]})}),fn&&!Me&&!De&&p.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:p.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-md border",style:{background:"rgba(17,23,35,0.84)",borderColor:A.gutterBorder},children:[p.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:A.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),p.jsx("span",{className:"text-[9px]",style:{color:A.textSecondary},children:"+ drag/click to edit range"})]})}),Me&&De&&p.jsx(Z7,{rangeStart:De.start,rangeEnd:De.end,anchorX:De.anchorX,anchorY:De.anchorY,onClose:()=>{ct(!1),G(null)}})]})}),R4=66,N4=6,p9=d.memo(function({videoSrc:e,label:t,labelColor:r,duration:i=5}){const[s,a]=d.useState(0),[c,u]=d.useState(!1),[h,m]=d.useState([]),[O,x]=d.useState(16/9),v=d.useRef(null),w=d.useRef(null),k=d.useRef(!1),$=d.useCallback(A=>{var N,j,W;if((N=v.current)==null||N.disconnect(),(j=w.current)==null||j.disconnect(),!A)return;const Q=((W=A.parentElement)==null?void 0:W.clientWidth)||A.clientWidth;a(Q),v.current=new IntersectionObserver(([K])=>{var ae;K.isIntersecting&&(u(!0),(ae=v.current)==null||ae.disconnect())},{rootMargin:"200px"}),v.current.observe(A);const T=A.parentElement||A;w.current=new ResizeObserver(([K])=>{a(K.contentRect.width)}),w.current.observe(T)},[]);On(()=>()=>{var A,Q;(A=v.current)==null||A.disconnect(),(Q=w.current)==null||Q.disconnect()}),d.useEffect(()=>{if(!c||k.current)return;k.current=!0;const A=document.createElement("video");A.crossOrigin="anonymous",A.muted=!0,A.preload="auto";const Q=document.createElement("canvas"),T=Q.getContext("2d");if(!T){k.current=!1;return}const N=[],j=Math.min(.4,i*.05);for(let ie=0;ie<N4;ie++){const L=ie/(N4-1)*i;N.push(Math.max(L,j))}let W=0,K=!1;const ae=()=>{if(K||W>=N.length){K||(A.src="",A.load());return}A.currentTime=N[W]};return A.addEventListener("loadedmetadata",()=>{if(A.videoWidth>0&&A.videoHeight>0){x(A.videoWidth/A.videoHeight);const ie=R4*2,L=Math.round(ie*(A.videoWidth/A.videoHeight));Q.width=L,Q.height=ie}ae()}),A.addEventListener("seeked",()=>{if(K)return;T.drawImage(A,0,0,Q.width,Q.height);const ie=Q.toDataURL("image/jpeg",.6);m(L=>[...L,ie]),W++,ae()}),A.addEventListener("error",()=>{}),A.src=e,A.load(),()=>{K=!0,k.current=!1,m([]),A.src="",A.load()}},[c,e,i]);const M=Math.round(R4*O),V=s>0?Math.max(1,Math.ceil(s/M)):1;return p.jsxs("div",{ref:$,className:"absolute inset-0 overflow-hidden",children:[c&&h.length>0&&p.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:V}).map((A,Q)=>{const T=h[Q%h.length];return p.jsx("div",{className:"flex-shrink-0 h-full relative overflow-hidden bg-neutral-900",style:{width:M},children:p.jsx("img",{src:T,alt:"",draggable:!1,className:"absolute inset-0 w-full h-full object-cover"})},Q)})}),c&&h.length===0&&p.jsx("div",{className:"absolute inset-0 animate-pulse",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),p.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-1.5 pb-0.5 pt-3",style:{background:"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)"},children:p.jsx("span",{className:"text-[9px] font-semibold truncate block leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:t})})]})}),m9=66,g9="v3",L4=10;function O9({previewUrl:n,seekTime:e=2,duration:t=5,selector:r,selectorIndex:i,origin:s}){const a=n.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),c=e+t/2,u=new URL(a,s);return u.searchParams.set("t",c.toFixed(2)),u.searchParams.set("v",g9),r&&(u.searchParams.set("selector",r),i!=null&&i>0&&u.searchParams.set("selectorIndex",String(i))),u.toString()}const fp=d.memo(function({previewUrl:e,label:t,labelColor:r,accentColor:i="#6B7280",selector:s,selectorIndex:a,seekTime:c=2,duration:u=5}){const[h,m]=d.useState(0),[O,x]=d.useState(!1),[v,w]=d.useState(16/9),k=d.useRef(null),$=d.useCallback(Q=>{var j,W;if((j=k.current)==null||j.disconnect(),!Q)return;const T=((W=Q.parentElement)==null?void 0:W.clientWidth)||Q.clientWidth;m(T);const N=Q.parentElement||Q;k.current=new ResizeObserver(([K])=>{m(K.contentRect.width)}),k.current.observe(N)},[]);On(()=>()=>{var Q;(Q=k.current)==null||Q.disconnect()});const M=O9({previewUrl:e,seekTime:c,duration:u,selector:s,selectorIndex:a,origin:window.location.origin}),V=Math.max(48,Math.round(m9*v)),A=h>0?Math.max(1,Math.ceil(h/V)):1;return p.jsxs("div",{ref:$,className:"absolute inset-0 overflow-hidden",children:[p.jsx("img",{src:M,alt:"",draggable:!1,loading:"eager",onLoad:Q=>{const T=Q.currentTarget;T.naturalWidth>0&&T.naturalHeight>0&&w(T.naturalWidth/T.naturalHeight),x(!0)},className:"hidden"}),O?p.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:A}).map((Q,T)=>p.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:V},children:p.jsx("img",{src:M,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover opacity-60"})},T))}):p.jsx("div",{className:"absolute inset-0 animate-pulse",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),p.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(120deg, ${i}2e, transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08))`}}),p.jsx("div",{className:"absolute left-2 top-2",style:{zIndex:L4},children:p.jsx("span",{className:"block max-w-full truncate rounded-md px-1.5 py-0.5 text-[9px] font-semibold uppercase leading-none",style:{color:r,background:`${i}2e`,boxShadow:`inset 0 0 0 1px ${i}40`},children:t})}),p.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-1.5 pb-0.5 pt-3",style:{zIndex:L4,background:"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)"},children:p.jsx("span",{className:"block truncate text-[9px] font-semibold leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:t})})]})});let x9=0;const V4={isEditMode:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null},Xt=Zy(n=>({...V4,setEditMode:e=>n({isEditMode:e}),setModel:e=>n({model:e}),setSourceFilePath:e=>n({sourceFilePath:e}),selectSegment:(e,t=!1)=>n(r=>{if(t){const i=new Set(r.selectedSegmentIds);return i.has(e)?i.delete(e):i.add(e),{selectedSegmentIds:i,selectedGroupId:null}}return{selectedSegmentIds:new Set([e]),selectedGroupId:null}}),selectGroup:e=>n(t=>{var i;const r=(i=t.model)==null?void 0:i.groups.get(e);return r?{selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:e}:{}}),selectAll:()=>n(e=>e.model?{selectedSegmentIds:new Set(e.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>n({selectedSegmentIds:new Set,selectedGroupId:null}),updateSegmentStyle:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const s=new Map(r.model.segments);return s.set(e,{...i,style:{...i.style,...t}}),{model:{...r.model,segments:s}}}),updateSegmentText:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const s=new Map(r.model.segments);return s.set(e,{...i,text:t}),{model:{...r.model,segments:s}}}),updateSegmentTiming:(e,t,r)=>n(i=>{if(!i.model)return{};const s=i.model.segments.get(e);if(!s)return{};const a=new Map(i.model.segments);return a.set(e,{...s,start:t,end:r}),{model:{...i.model,segments:a}}}),updateGroupStyle:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=new Map(r.model.groups);return s.set(e,{...i,style:{...i.style,...t}}),{model:{...r.model,groups:s}}}),updateGroupContainer:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=new Map(r.model.groups);return s.set(e,{...i,containerStyle:{...i.containerStyle,...t}}),{model:{...r.model,groups:s}}}),updateGroupAnimation:(e,t,r)=>n(i=>{if(!i.model)return{};const s=i.model.groups.get(e);if(!s)return{};const a=new Map(i.model.groups),c=s.animation[t],u=c!==null?{...c,...r}:r;return a.set(e,{...s,animation:{...s.animation,[t]:u}}),{model:{...i.model,groups:a}}}),splitGroup:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=i.segmentIds.indexOf(t);if(s<=0)return{};const a=i.segmentIds.slice(0,s),c=i.segmentIds.slice(s),u=`group-split-${x9++}`,h=new Map(r.model.groups);h.set(e,{...i,segmentIds:a}),h.set(u,{...i,id:u,segmentIds:c});const m=r.model.groupOrder.indexOf(e),O=[...r.model.groupOrder];O.splice(m+1,0,u);const x=new Map(r.model.segments);return c.forEach((v,w)=>{const k=x.get(v);k&&x.set(v,{...k,groupIndex:w})}),{model:{...r.model,groups:h,segments:x,groupOrder:O}}}),mergeGroups:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e),s=r.model.groups.get(t);if(!i||!s)return{};const a=[...i.segmentIds,...s.segmentIds],c=new Map(r.model.groups);c.set(e,{...i,segmentIds:a}),c.delete(t);const u=r.model.groupOrder.filter(O=>O!==t),h=new Map(r.model.segments);s.segmentIds.forEach((O,x)=>{const v=h.get(O);v&&h.set(O,{...v,groupIndex:i.segmentIds.length+x})});const m=r.selectedGroupId===t?null:r.selectedGroupId;return{model:{...r.model,groups:c,segments:h,groupOrder:u},selectedGroupId:m}}),updateSelectedStyle:e=>n(t=>{if(!t.model||t.selectedSegmentIds.size===0)return{};const r=new Map(t.model.segments);for(const i of t.selectedSegmentIds){const s=r.get(i);s&&r.set(i,{...s,style:{...s.style,...e}})}return{model:{...t.model,segments:r}}}),applyAnimationToAll:e=>n(t=>{if(!t.model)return{};const r=new Map(t.model.groups);for(const[i,s]of r)r.set(i,{...s,animation:e});return{model:{...t.model,groups:r}}}),reset:()=>n({...V4,selectedSegmentIds:new Set})}));function Iy(n){return Number.isFinite(n)&&n>0}function _4(n,e){const t=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(n)?n:0);return t>0?Math.min(r,t):r}function D4(n){if(!n)return 0;const e=Number.parseFloat(n.getAttribute("data-duration")??"")||Number.parseFloat(n.getAttribute("data-hf-authored-duration")??"");return Iy(e)?e:0}function y9(n){if(!n)return 0;const e=D4(n.querySelector("[data-composition-id]"));if(e>0)return e;let t=0;for(const r of Array.from(n.querySelectorAll("[data-start]"))){const i=Number.parseFloat(r.getAttribute("data-start")??""),s=D4(r);!Number.isFinite(i)||i<0||s<=0||(t=Math.max(t,i+s))}return t}function hp(n){if(!n)return 0;try{const e=Number(n.getDuration());return Iy(e)?e:0}catch{return 0}}function v9(n){return{now:()=>n.performance.now(),requestAnimationFrame:e=>n.requestAnimationFrame(e),cancelAnimationFrame:e=>n.cancelAnimationFrame(e)}}function b9(n,e,t,r=()=>1){var v;const i=Math.max(0,Number.isFinite(e)?e:0);let s=_4(Number(((v=n.getTime)==null?void 0:v.call(n))??0),i),a=!1,c=0,u=s,h=t.now();const m=w=>{var k;if(s=_4(w,i),typeof n.renderSeek=="function"){n.renderSeek(s);return}(k=n.seek)==null||k.call(n,s)},O=()=>{c&&(t.cancelAnimationFrame(c),c=0)},x=w=>{if(!a)return;const k=Math.max(.1,Number(r())||1),$=(w-h)/1e3*k;if(m(u+$),s>=i){a=!1,c=0;return}c=t.requestAnimationFrame(x)};return{play:()=>{a||i<=0||(s>=i&&m(0),a=!0,u=s,h=t.now(),O(),c=t.requestAnimationFrame(x))},pause:()=>{a=!1,O()},seek:w=>{m(w),a&&(u=s,h=t.now())},getTime:()=>s,getDuration:()=>i,isPlaying:()=>a}}function I4(n){return{play:()=>n.play(),pause:()=>n.pause(),seek:e=>{n.pause(),n.seek(e)},getTime:()=>n.time(),getDuration:()=>n.duration(),isPlaying:()=>n.isActive()}}function Xy(n){const e=n.ownerDocument.defaultView??window,t=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(n instanceof t||n instanceof r)return n;const i=n.querySelector("video, audio, img");return i instanceof t||i instanceof r?i:null}function Fy(n,e){const t=e.getAttribute("data-playback-start")?"playback-start":e.getAttribute("data-media-start")?"media-start":void 0,r=e.getAttribute("data-playback-start")??e.getAttribute("data-media-start");if(r!=null){const O=parseFloat(r);Number.isFinite(O)&&(n.playbackStart=O)}t&&(n.playbackStartAttr=t);const i=Xy(e);if(!i)return;n.tag=i.tagName.toLowerCase();const s=i.getAttribute("src");s&&(n.src=s);const c=(i.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof c>"u"||!(i instanceof c))return;const u=e.getAttribute("data-source-duration")??i.getAttribute("data-source-duration"),h=u?parseFloat(u):i.duration;Number.isFinite(h)&&h>0&&(n.sourceDuration=h);const m=i.defaultPlaybackRate;Number.isFinite(m)&&m>0&&(n.playbackRate=m)}const X4=[1,2,4],w9=new Set(["ArrowLeft","ArrowRight"]),S9=["input","textarea","select","button","a[href]","[contenteditable='true']","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function k9(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.closest!="function"?!1:e.closest.call(n,S9)!==null}function P9(n,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return n.metaKey||n.ctrlKey||n.altKey||k9(n.target)?!0:w9.has(n.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}function _u(n){var i,s,a;const e=(i=n.label)==null?void 0:i.trim();if(e)return e;const t=(s=n.id)==null?void 0:s.trim();if(t)return t;const r=(a=n.tag)==null?void 0:a.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const A9=new Set(["base","link","meta","noscript","script","style","template"]);function F4(n){return n.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function $9(n){const e=n.getAttribute("data-timeline-label")??n.getAttribute("data-label")??n.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(n.id.trim())return F4(n.id);const t=n.className.split(/\s+/).filter(Boolean),r=t.find(i=>i!=="clip")??t[0];return r?F4(r):_u({tag:n.tagName})}function C9(n,e){if(!Zm(e)||e.parentElement!==n)return!1;const t=e.tagName.toLowerCase();return A9.has(t)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!Pa(e)}function zy(n,e,t=[]){if(!Number.isFinite(e)||e<=0)return[];const r=n.querySelector("[data-composition-id]");if(!r)return[];const i=new Set(t.map(Nm)),s=t.reduce((c,u)=>Math.max(c,Number.isFinite(u.track)?u.track:0),-1),a=[];for(const c of Array.from(r.children)){if(!C9(r,c))continue;const u=Pa(c);if(!u)continue;const h=bu(n,c,u),m=vu(c),O=$9(c),x=wu({preferredId:c.id||null,label:O,fallbackIndex:t.length+a.length,domId:c.id||void 0,selector:u,selectorIndex:h,sourceFile:m});i.has(x.key)||i.has(x.id)||a.push({domId:c.id||void 0,duration:e,id:x.id,key:x.key,label:O,selector:u,selectorIndex:h,sourceFile:m,start:0,tag:c.tagName.toLowerCase(),timingSource:"implicit",track:s+1+a.length})}return a}function z4(n,e){const t=n.querySelector("[data-composition-id]"),r=n.querySelectorAll("[data-start]"),i=[];let s=0;return r.forEach(a=>{if(a===t)return;const c=a,u=c.getAttribute("data-start");if(u==null)return;const h=parseFloat(u);if(isNaN(h)||Number.isFinite(e)&&e>0&&h>=e)return;const m=c.tagName.toLowerCase();let O=0;const x=c.getAttribute("data-duration");if(x!=null&&(O=parseFloat(x)),(isNaN(O)||O<=0)&&(O=Math.max(0,e-h)),Number.isFinite(e)&&e>0&&(O=Math.min(O,Math.max(0,e-h))),!Number.isFinite(O)||O<=0)return;const v=c.getAttribute("data-track-index"),w=v!=null?parseInt(v,10):s++,k=c.getAttribute("data-composition-id"),$=Pa(c),M=vu(c),V=bu(n,c,$),A=_u({id:c.id||k||null,label:c.getAttribute("data-timeline-label")??c.getAttribute("data-label"),tag:m}),Q=wu({preferredId:c.id||k||null,label:A,fallbackIndex:i.length,domId:c.id||void 0,selector:$,selectorIndex:V,sourceFile:M}),T={id:Q.id,label:A,key:Q.key,tag:m,start:h,duration:O,track:isNaN(w)?0:w,domId:c.id||void 0,selector:$,selectorIndex:V,sourceFile:M,timingSource:"authored"},N=Xy(c);if(N){N.tagName==="IMG"&&(T.tag="img");const W=N.getAttribute("src");W&&(T.src=W);const K=c.getAttribute("data-volume")??N.getAttribute("data-volume");K&&(T.volume=parseFloat(K)),Fy(T,c)}const j=c.getAttribute("data-composition-src")||c.getAttribute("data-composition-file");if(j)T.compositionSrc=j;else if(k&&k!==(t==null?void 0:t.getAttribute("data-composition-id"))){const W=c.querySelector("video[src]");W&&(T.src=W.getAttribute("src")||void 0,T.tag="video")}i.push(T)}),[...i,...zy(n,e,i)]}function Zm(n){var t;const e=((t=n.ownerDocument.defaultView)==null?void 0:t.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&n instanceof e}function Pa(n){if(Zm(n)&&n.id)return`#${n.id}`;const e=n.getAttribute("data-composition-id");if(e)return`[data-composition-id="${e}"]`;if(Zm(n)){const t=n.className.split(/\s+/).filter(Boolean),r=t.find(i=>i!=="clip")??t[0];if(r)return`.${r}`}}function vu(n){var t;const e=(t=n.parentElement)==null?void 0:t.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function bu(n,e,t){if(!(!t||t.startsWith("#")||t.startsWith("[data-composition-id=")))try{const i=Array.from(n.querySelectorAll(t)).indexOf(e);return i>=0?i:void 0}catch{return}}function Rm(n){const e=n.sourceFile??"index.html";return n.domId?`${e}#${n.domId}`:n.selector?`${e}:${n.selector}:${n.selectorIndex??0}`:`${e}:${n.id}:${n.fallbackIndex}`}function wu(n){var r;const e=((r=n.preferredId)==null?void 0:r.trim())||Rm({id:n.label,fallbackIndex:n.fallbackIndex,domId:n.domId,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:n.sourceFile}),t=Rm({id:e,fallbackIndex:n.fallbackIndex,domId:n.domId,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:n.sourceFile});return{id:e,key:t}}function Nm(n){return n.key??n.id}function E9(n){const e=n.querySelector("[data-composition-id]");return Array.from(n.querySelectorAll("[data-start]")).filter(t=>t!==e)}function H4(n,e){return Math.abs(n-e)<.001}function T9(n,e){var a;const t=(a=e.tagName)==null?void 0:a.toLowerCase();if(t&&n.tagName.toLowerCase()!==t)return!1;const r=Number.parseFloat(n.getAttribute("data-start")??"");if(Number.isFinite(r)&&!H4(r,e.start))return!1;const i=Number.parseFloat(n.getAttribute("data-duration")??"");if(Number.isFinite(i)&&!H4(i,e.duration))return!1;const s=Number.parseInt(n.getAttribute("data-track-index")??"",10);return!(Number.isFinite(s)&&s!==e.track)}function M9(n,e,t,r=new Set){const i=e.id?j9(n,e.id):null;if(i&&!r.has(i))return i;const s=E9(n).filter(c=>!r.has(c)),a=s.find(c=>T9(c,e));return a||(s[t]??null)}function Q9(n){const{clip:e,fallbackIndex:t,doc:r}=n;let i=n.hostEl??null;const s=_u({id:e.id,label:e.label,tag:e.tagName||e.kind});let a,c,u,h;i&&(a=i.id||void 0,c=Pa(i),u=r&&c?bu(r,i,c):void 0,h=vu(i));const m=wu({preferredId:e.id,label:s,fallbackIndex:t,domId:a,selector:c,selectorIndex:u,sourceFile:h}),O={id:m.id,label:s,key:m.key,tag:e.tagName||e.kind,start:e.start,duration:e.duration,track:e.track,domId:a,selector:c,selectorIndex:u,sourceFile:h};if(i&&Fy(O,i),e.assetUrl&&(O.src=e.assetUrl),e.kind==="composition"&&e.compositionId){let x=e.compositionSrc;if(x||(i=(r==null?void 0:r.querySelector(`[data-composition-id="${e.compositionId}"]`))??i,x=(i==null?void 0:i.getAttribute("data-composition-src"))??(i==null?void 0:i.getAttribute("data-composition-file"))??null),x)O.compositionSrc=x;else if(i){const v=i.querySelector("video[src]");v&&(O.src=v.getAttribute("src")||void 0,O.tag="video")}if(i){O.domId=i.id||void 0,O.selector=Pa(i),O.selectorIndex=r&&O.selector?bu(r,i,O.selector):void 0,O.sourceFile=vu(i);const v=wu({preferredId:e.id,label:s,fallbackIndex:t,domId:O.domId,selector:O.selector,selectorIndex:O.selectorIndex,sourceFile:O.sourceFile});O.id=v.id,O.key=v.key}}return O}function j9(n,e){return n.getElementById(e)??n.querySelector(`[data-composition-id="${e}"]`)??n.querySelector(`.${e}`)??null}function Z9(n){const e=n.match(/\/preview\/comp\/(.+?)(?:\?|$)/);return e?decodeURIComponent(e[1]):void 0}function R9(n){if(!Number.isFinite(n.rootDuration)||n.rootDuration<=0)return null;const e=Z9(n.iframeSrc);return{id:n.compositionId,label:_u({id:n.compositionId,tag:n.tagName}),key:Rm({id:n.compositionId,fallbackIndex:0,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:e}),tag:n.tagName.toLowerCase()||"div",start:0,duration:n.rootDuration,track:0,compositionSrc:e,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:e}}function N9(n,e){n.documentElement&&(n.documentElement.style.overflow="hidden",n.documentElement.style.margin="0"),n.body&&(n.body.style.overflow="hidden",n.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function L9(n){const e=/data-composition-id=["']([^"']+)["']/gi,t=new Set,r=Array.from(n.querySelectorAll("style, script"));for(const a of r){const c=a.textContent||"";if(!c)continue;let u;for(;(u=e.exec(c))!==null;){const h=(u[1]||"").trim();h&&t.add(h)}}if(t.size===0)return;const i=new Set,s=Array.from(n.querySelectorAll("[data-composition-id]"));for(const a of s){const c=a.getAttribute("data-composition-id");c&&i.add(c)}for(const a of t){if(a==="root"||i.has(a))continue;const c=n.getElementById(`${a}-layer`)||n.getElementById(`${a}-comp`)||n.getElementById(a);c&&(c.getAttribute("data-composition-id")||c.setAttribute("data-composition-id",a))}}function pp(n){var e;if(n)try{(e=n.contentWindow)==null||e.postMessage({source:"hf-parent",type:"control",action:"set-muted",muted:!1},"*")}catch(t){console.warn("[useTimelinePlayer] Failed to unmute preview media",t)}}function V9(n,e,t,r){const i=Number.isFinite(t)?t:0,s=Number.isFinite(r)?r:0;if(n.length===0||e.length>=n.length||s>i)return e;const a=new Set(e.map(Nm)),c=n.filter(u=>!a.has(Nm(u)));return c.length===0?e:[...e,...c]}function _9(){const n=d.useRef(null),e=d.useRef(0),t=d.useRef(void 0),r=d.useRef(null),i=d.useRef(!1),s=d.useRef(0),a=d.useRef(null),c=d.useRef(0),u=d.useRef(new Set),h=d.useRef(null),m=d.useRef(()=>{}),O=d.useRef(()=>{}),x=d.useRef(null),{setIsPlaying:v,setCurrentTime:w,setDuration:k,setTimelineReady:$,setElements:M}=Re.getState(),V=d.useCallback((G,oe)=>{const fe=Re.getState(),Ee=V9(fe.elements,G,fe.duration,oe??fe.duration);M(Ee),Number.isFinite(oe)&&(oe??0)>0&&k(oe??0),$(!0)},[M,$,k]),A=d.useCallback(()=>{var G,oe;try{const fe=n.current,Ee=fe==null?void 0:fe.contentWindow;if(!fe||!Ee)return null;const Le=Ee.__player&&typeof Ee.__player.play=="function"?Ee.__player:null;if(hp(Le)>0)return Le;if(Ee.__timeline){const Ve=I4(Ee.__timeline);if(hp(Ve)>0)return Ve}if(Ee.__timelines){const Ve=Object.keys(Ee.__timelines);if(Ve.length>0){const qe=(oe=(G=fe==null?void 0:fe.contentDocument)==null?void 0:G.querySelector("[data-composition-id]"))==null?void 0:oe.getAttribute("data-composition-id"),Ue=qe&&qe in Ee.__timelines?qe:Ve[Ve.length-1],ce=I4(Ee.__timelines[Ue]);if(hp(ce)>0)return ce}}const Fe=Math.max(Re.getState().duration,y9(fe.contentDocument));if(Le&&Fe>0&&(typeof Le.renderSeek=="function"||typeof Le.seek=="function")){const Ve=x.current;if((Ve==null?void 0:Ve.player)===Le&&Ve.duration===Fe)return Ve.adapter;Ve==null||Ve.adapter.pause();const qe=b9(Le,Fe,v9(Ee),()=>Re.getState().playbackRate);return x.current={player:Le,duration:Fe,adapter:qe},qe}return Le}catch(fe){return console.warn("[useTimelinePlayer] Could not get playback adapter (cross-origin)",fe),null}},[]),Q=d.useCallback(()=>{cancelAnimationFrame(s.current)},[]),T=d.useCallback(()=>{const G=()=>{const oe=A();if(oe){const fe=oe.getTime(),Ee=oe.getDuration();if(Ni.notify(fe),fe>=Ee&&!oe.isPlaying()){if(Re.getState().loopEnabled&&Ee>0){oe.seek(0),Ni.notify(0),oe.play(),v(!0),e.current=requestAnimationFrame(G);return}w(fe),v(!1),cancelAnimationFrame(e.current);return}}e.current=requestAnimationFrame(G)};e.current=requestAnimationFrame(G)},[A,w,v]),N=d.useCallback(()=>{cancelAnimationFrame(e.current)},[]),j=d.useCallback(G=>{var fe;const oe=n.current;if(oe){(fe=oe.contentWindow)==null||fe.postMessage({source:"hf-parent",type:"control",action:"set-playback-rate",playbackRate:G},"*");try{const Ee=oe.contentWindow;if(Ee!=null&&Ee.__timelines)for(const Le of Object.values(Ee.__timelines))Le&&typeof Le.timeScale=="function"&&Le.timeScale(G)}catch(Ee){console.warn("[useTimelinePlayer] Could not set playback rate (cross-origin)",Ee)}}},[]),W=d.useCallback(()=>{N(),Q();const G=A();G&&(G.getTime()>=G.getDuration()&&G.seek(0),pp(n.current),j(Re.getState().playbackRate),G.play(),a.current="forward",v(!0),T())},[A,v,T,j,N,Q]),K=d.useCallback(G=>{N(),Q();const oe=A();if(!oe)return;const fe=Math.max(0,oe.getDuration()),Ee=oe.getTime()<=0&&fe>0?fe:oe.getTime();oe.pause(),Ee!==oe.getTime()&&oe.seek(Ee),pp(n.current);const Le=Math.max(.1,Math.min(4,G));let Fe=Ee,Ve=performance.now();const qe=Ue=>{const ce=(Ue-Ve)/1e3*Le;let je=Fe-ce;if(je<=0)if(Re.getState().loopEnabled&&fe>0)Fe=fe,Ve=Ue,je=fe;else{oe.seek(0),Ni.notify(0),w(0),v(!1),a.current=null,s.current=0;return}oe.seek(Math.max(0,je)),Ni.notify(Math.max(0,je)),v(!0),s.current=requestAnimationFrame(qe)};v(!0),a.current="backward",s.current=requestAnimationFrame(qe)},[A,w,v,N,Q]),ae=d.useCallback(()=>{Q();const G=A();G&&(G.pause(),w(G.getTime()),v(!1),a.current=null,c.current=0,N())},[A,w,v,N,Q]),ie=d.useCallback(()=>{Re.getState().isPlaying?ae():W()},[W,ae]),L=d.useCallback(G=>{Q();const oe=A();if(!oe)return;const fe=Math.max(0,oe.getDuration()),Ee=Math.max(0,fe>0?Math.min(fe,G):G);oe.seek(Ee),Ni.notify(Ee),w(Ee),N(),Re.getState().isPlaying&&v(!1),a.current=null,c.current=0},[A,w,v,N,Q]),le=d.useCallback(G=>{const oe=A(),fe=(oe==null?void 0:oe.getTime())??Re.getState().currentTime;L(Tm(fe,G,Vu))},[A,L]),ye=d.useCallback(G=>{a.current===G?c.current=Math.min(c.current+1,X4.length-1):c.current=0;const oe=X4[c.current];Re.getState().setPlaybackRate(oe),G==="forward"?W():K(oe)},[W,K]),Oe=d.useCallback(G=>{if(G.defaultPrevented)return;const oe=Xt.getState();if(!P9(G,{isCaptionEditMode:oe.isEditMode,selectedCaptionSegmentCount:oe.selectedSegmentIds.size})){if(u.current.add(G.code),G.code==="Space"){G.preventDefault(),ie();return}if(G.code==="ArrowLeft"){G.preventDefault(),le(G.shiftKey?-10:-1);return}if(G.code==="ArrowRight"){G.preventDefault(),le(G.shiftKey?10:1);return}if(!G.repeat){if(G.code==="KeyK"){G.preventDefault(),ae();return}if(G.code==="KeyJ"){if(G.preventDefault(),u.current.has("KeyK")){le(-1);return}ye("backward");return}if(G.code==="KeyL"){if(G.preventDefault(),u.current.has("KeyK")){le(1);return}ye("forward")}}}},[ae,ye,le,ie]),$e=d.useCallback(G=>{u.current.delete(G.code)},[]);m.current=Oe,O.current=$e;const pe=d.useCallback(()=>{var Le,Fe,Ve;(Le=h.current)==null||Le.call(h),h.current=null;const G=(Fe=n.current)==null?void 0:Fe.contentWindow,oe=(Ve=n.current)==null?void 0:Ve.contentDocument;if(!G&&!oe)return;const fe=qe=>m.current(qe),Ee=qe=>O.current(qe);G==null||G.addEventListener("keydown",fe,!0),G==null||G.addEventListener("keyup",Ee,!0),oe==null||oe.addEventListener("keydown",fe,!0),oe==null||oe.addEventListener("keyup",Ee,!0),h.current=()=>{G==null||G.removeEventListener("keydown",fe,!0),G==null||G.removeEventListener("keyup",Ee,!0),oe==null||oe.removeEventListener("keydown",fe,!0),oe==null||oe.removeEventListener("keyup",Ee,!0)}},[]),D=d.useCallback(G=>{var Se;if(!G.clips||G.clips.length===0)return;const oe=new Set(G.clips.map(Me=>Me.compositionId).filter(Boolean)),fe=G.clips.filter(Me=>!Me.parentCompositionId||!oe.has(Me.parentCompositionId));let Ee=null;try{Ee=((Se=n.current)==null?void 0:Se.contentDocument)??null}catch{Ee=null}const Le=new Set,Fe=fe.map((Me,ct)=>{const fn=Ee?M9(Ee,Me,ct,Le):null;return fn&&Le.add(fn),Q9({clip:Me,fallbackIndex:ct,doc:Ee,hostEl:fn})}),Ve=G.durationInFrames/30,qe=Number.isFinite(Ve)&&Ve<7200?Ve:0,Ue=qe>0?qe:Re.getState().duration,ce=Ue>0?Fe.filter(Me=>Me.start<Ue).map(Me=>({...Me,duration:Math.min(Me.duration,Ue-Me.start)})).filter(Me=>Me.duration>0):Fe,je=Ee&&Ue>0?[...ce,...zy(Ee,Ue,ce)]:ce;je.length>0&&V(je,qe>0?qe:void 0)},[V]),z=d.useCallback(()=>{try{const G=n.current,oe=G==null?void 0:G.contentDocument,fe=G==null?void 0:G.contentWindow;if(!oe||!fe)return;const Ee=Re.getState().elements,Le=new Set(Ee.map(Se=>Se.id)),Fe=oe.querySelector("[data-composition-id]"),Ve=Fe==null?void 0:Fe.getAttribute("data-composition-id"),qe=oe.querySelectorAll("[data-composition-id][data-start]"),Ue=[];qe.forEach(Se=>{var Ze,Je,Et,mt,wt,ft,st,_e,At;const Me=Se,ct=Me.getAttribute("data-composition-id");if(!ct||ct===Ve||Le.has(Me.id)||Le.has(ct))return;const fn=Me.getAttribute("data-start")??"0";let Mn=parseFloat(fn);if(isNaN(Mn)){const ut=oe.getElementById(fn)||oe.querySelector(`[data-composition-id="${fn}"]`);if(ut){const zt=ut.getAttribute("data-start")??"0";let Tt=parseFloat(zt);if(isNaN(Tt)){const yn=oe.getElementById(zt)||oe.querySelector(`[data-composition-id="${zt}"]`),hn=parseFloat((yn==null?void 0:yn.getAttribute("data-start"))??"0")||0,Nt=yn==null?void 0:yn.getAttribute("data-composition-id"),Yn=parseFloat((yn==null?void 0:yn.getAttribute("data-duration"))??"")||(Nt?((Et=(Je=(Ze=fe.__timelines)==null?void 0:Ze[Nt])==null?void 0:Je.duration)==null?void 0:Et.call(Je))??0:0);Tt=hn+Yn}const jt=ut.getAttribute("data-composition-id"),cn=parseFloat(ut.getAttribute("data-duration")??"")||(jt?((ft=(wt=(mt=fe.__timelines)==null?void 0:mt[jt])==null?void 0:wt.duration)==null?void 0:ft.call(wt))??0:0);Mn=Tt+cn}else Mn=0}let ze=parseFloat(Me.getAttribute("data-duration")??"");if((isNaN(ze)||ze<=0)&&(ze=((At=(_e=(st=fe.__timelines)==null?void 0:st[ct])==null?void 0:_e.duration)==null?void 0:At.call(_e))??0),!Number.isFinite(ze)||ze<=0)return;Number.isFinite(Mn)||(Mn=0);const Pt=Re.getState().duration;if(Number.isFinite(Pt)&&Pt>0&&(Mn>=Pt||(ze=Math.min(ze,Math.max(0,Pt-Mn)),ze<=0)))return;const pt=Me.getAttribute("data-track-index"),vt=pt!=null?parseInt(pt,10):0,dt=Me.getAttribute("data-composition-src")||Me.getAttribute("data-composition-file"),Rt=Pa(Me),en=vu(Me),Qt=bu(oe,Me,Rt),te=_u({id:Me.id||ct||null,label:Me.getAttribute("data-timeline-label")??Me.getAttribute("data-label"),tag:Me.tagName}),ne=wu({preferredId:Me.id||ct||null,label:te,fallbackIndex:Ue.length,domId:Me.id||void 0,selector:Rt,selectorIndex:Qt,sourceFile:en}),Ke={id:ne.id,label:te,key:ne.key,tag:Me.tagName.toLowerCase(),start:Mn,duration:ze,track:isNaN(vt)?0:vt,domId:Me.id||void 0,selector:Rt,selectorIndex:Qt,sourceFile:en};if(dt)Ke.compositionSrc=dt;else{const ut=Me.querySelector("video[src]");ut&&(Ke.src=ut.getAttribute("src")||void 0,Ke.tag="video")}Ue.push(Ke)});let ce=!1;const je=Ee.map(Se=>{if(Se.compositionSrc)return Se;const Me=oe.getElementById(Se.id)??oe.querySelector(`[data-composition-id="${Se.id}"]`);if(!Me)return Se;const ct=Me.getAttribute("data-composition-src")||Me.getAttribute("data-composition-file");return ct?(ce=!0,{...Se,compositionSrc:ct}):Se});if(Ue.length>0||ce){const Se=new Set(je.map(ct=>ct.id)),Me=Ue.filter(ct=>!Se.has(ct.id));V([...je,...Me])}}catch(G){console.warn("[useTimelinePlayer] enrichMissingCompositions failed",G)}},[V]),q=d.useCallback(()=>{pp(n.current);let G=0;const oe=25;t.current&&clearInterval(t.current),t.current=setInterval(()=>{G++;const fe=A();if(fe&&fe.getDuration()>0){clearInterval(t.current),fe.pause();const Ee=r.current;r.current=null;const Le=Ee!=null?Math.min(Ee,fe.getDuration()):0;fe.seek(Le);const Fe=fe.getDuration();Number.isFinite(Fe)&&Fe>0&&Fe<7200&&k(Fe),w(Le),i.current||$(!0),i.current=!1,v(!1);try{const Ve=n.current,qe=Ve==null?void 0:Ve.contentDocument,Ue=Ve==null?void 0:Ve.contentWindow;qe&&Ue&&(N9(qe,Ue),L9(qe),pe());const ce=Ue==null?void 0:Ue.__clipManifest;if(ce&&ce.clips.length>0&&D(ce),z(),Re.getState().elements.length===0&&qe){const je=z4(qe,fe.getDuration());je.length>0&&V(je)}if(Re.getState().elements.length===0&&qe){const je=qe.querySelector("[data-composition-id]"),Se=fe.getDuration();if(je&&Se>0){const Me=R9({compositionId:je.getAttribute("data-composition-id")||"composition",tagName:je.tagName||"div",rootDuration:Se,iframeSrc:(Ve==null?void 0:Ve.src)||"",selector:Pa(je)});Me&&V([Me])}}}catch(Ve){console.warn("[useTimelinePlayer] Could not read timeline elements from iframe",Ve)}return}G>=oe&&(clearInterval(t.current),console.warn("Could not find __player, __timeline, or __timelines on iframe after 5s"))},200)},[A,k,w,$,v,D,z,V,pe]),E=d.useCallback(()=>{const G=A();r.current=G?G.getTime():Re.getState().currentTime??0,i.current=!0,N(),Q(),v(!1)},[A,N,v,Q]),X=d.useRef(ie);X.current=ie;const ee=d.useCallback(()=>{const G=n.current;if(!G)return;E();const oe=G.src,fe=new URL(oe,window.location.origin);fe.searchParams.set("_t",String(Date.now())),G.src=fe.toString()},[E]),Ce=d.useRef(A);Ce.current=A;const Te=d.useRef(D);Te.current=D;const tt=d.useRef(z);tt.current=z,On(()=>{const G=Le=>m.current(Le),oe=Le=>O.current(Le),fe=Le=>{const Fe=Le.data,Ve=n.current;if(!(Le.source&&Ve&&Le.source!==Ve.contentWindow)){if((Fe==null?void 0:Fe.source)==="hf-preview"&&(Fe==null?void 0:Fe.type)==="state")try{if(Re.getState().elements.length===0){const qe=Ve==null?void 0:Ve.contentWindow,Ue=qe==null?void 0:qe.__clipManifest;Ue&&Ue.clips.length>0&&Te.current(Ue)}tt.current()}catch(qe){console.warn("[useTimelinePlayer] Could not read clip manifest from iframe",qe)}if((Fe==null?void 0:Fe.source)==="hf-preview"&&(Fe==null?void 0:Fe.type)==="timeline"&&Array.isArray(Fe.clips)){if(Te.current(Fe),tt.current(),Fe.durationInFrames>0&&Number.isFinite(Fe.durationInFrames)){const Ue=Fe.durationInFrames/30;Ue>0&&Ue<7200&&Re.getState().setDuration(Ue)}if(Re.getState().elements.length===0)try{const qe=Ve==null?void 0:Ve.contentDocument,Ue=A();if(qe&&Ue){const ce=z4(qe,Ue.getDuration());ce.length>0&&V(ce)}}catch(qe){console.warn("[useTimelinePlayer] Could not read timeline elements on navigate (cross-origin)",qe)}}}},Ee=()=>{var Le;if(document.hidden&&Re.getState().isPlaying){const Fe=(Le=Ce.current)==null?void 0:Le.call(Ce);Fe&&(Fe.pause(),v(!1),N())}};return window.addEventListener("keydown",G,!0),window.addEventListener("keyup",oe,!0),window.addEventListener("message",fe),document.addEventListener("visibilitychange",Ee),()=>{var Le;window.removeEventListener("keydown",G,!0),window.removeEventListener("keyup",oe,!0),(Le=h.current)==null||Le.call(h),h.current=null,window.removeEventListener("message",fe),document.removeEventListener("visibilitychange",Ee),N(),Q(),t.current&&clearInterval(t.current)}});const De=d.useCallback(()=>{N(),Q(),t.current&&clearInterval(t.current),Re.getState().reset()},[N,Q]);return{iframeRef:n,play:W,pause:ae,togglePlay:ie,seek:L,onIframeLoad:q,refreshPlayer:ee,saveSeekPosition:E,resetPlayer:De}}function D9({projectId:n,directUrl:e}){return e??n}const I9=d.memo(function({projectId:e,iframeRef:t,onIframeLoad:r,onCompositionLoadingChange:i,portrait:s,directUrl:a,refreshKey:c,suppressLoadingOverlay:u}){const h=D9({projectId:e,directUrl:a}),m=d.useRef(c),[O,x]=d.useState(null),v=d.useRef(null);if(c!==m.current){const $=`${h}:${m.current??0}`;m.current=c,x($)}const w=`${h}:${c??0}`,k=()=>{r(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{x(null),v.current=null},160)};return p.jsx("div",{className:"flex flex-col h-full min-h-0",children:p.jsxs("div",{className:"relative flex-1 flex items-center justify-center p-2 overflow-hidden min-h-0 outline-none focus:ring-1 focus:ring-studio-accent/40",tabIndex:0,"aria-label":"Composition preview",children:[O&&p.jsx(Cm,{projectId:a?void 0:e,directUrl:a,onLoad:()=>{},portrait:s,style:{position:"absolute",inset:0,zIndex:0,opacity:1}},O),p.jsx(Cm,{ref:t,projectId:a?void 0:e,directUrl:a,onLoad:O?k:r,onCompositionLoadingChange:i,portrait:s,style:O?{position:"absolute",inset:0,zIndex:1}:void 0,suppressLoadingOverlay:u},w)]})})}),X9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),F9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),z9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),d.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),H9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.51,64.49a12,12,0,0,1,0-17l32-32a12,12,0,0,1,17,0l32,32a12,12,0,0,1-17,17L140,53V96a12,12,0,0,1-24,0V53L104.49,64.49A12,12,0,0,1,87.51,64.49Zm64,127L140,203V160a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm89-72-32-32a12,12,0,0,0-17,17L203,116H160a12,12,0,0,0,0,24h43l-11.52,11.51a12,12,0,0,0,17,17l32-32A12,12,0,0,0,240.49,119.51ZM53,140H96a12,12,0,0,0,0-24H53l11.52-11.51a12,12,0,1,0-17-17l-32,32a12,12,0,0,0,0,17l32,32a12,12,0,1,0,17-17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,128,128,232,24,128,128,24Z",opacity:"0.2"}),d.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,136H64v24a8,8,0,0,1-13.66,5.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,64,96v24H96a8,8,0,0,1,0,16Zm0-72h24V96a8,8,0,0,0,16,0V64h24a8,8,0,0,0,5.66-13.66l-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,64Zm141.66,58.34-32-32A8,8,0,0,0,192,96v24H160a8,8,0,0,0,0,16h32v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,237.66,122.34ZM160,192H136V160a8,8,0,0,0-16,0v32H96a8,8,0,0,0-5.66,13.66l32,32a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,160,192Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M91.76,60.24a6,6,0,0,1,0-8.48l32-32a6,6,0,0,1,8.48,0l32,32a6,6,0,1,1-8.48,8.48L134,38.49V96a6,6,0,0,1-12,0V38.49L100.24,60.24A6,6,0,0,1,91.76,60.24Zm64,135.52L134,217.51V160a6,6,0,0,0-12,0v57.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Zm80.48-72-32-32a6,6,0,0,0-8.48,8.48L217.51,122H160a6,6,0,0,0,0,12h57.51l-21.75,21.76a6,6,0,1,0,8.48,8.48l32-32A6,6,0,0,0,236.24,123.76ZM38.49,134H96a6,6,0,0,0,0-12H38.49l21.75-21.76a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48l32,32a6,6,0,0,0,8.48-8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M93.17,58.83a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,0l32,32a4,4,0,0,1-5.66,5.66L132,33.66V96a4,4,0,0,1-8,0V33.66L98.83,58.83A4,4,0,0,1,93.17,58.83Zm64,138.34L132,222.34V160a4,4,0,0,0-8,0v62.34L98.83,197.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Zm77.66-72-32-32a4,4,0,0,0-5.66,5.66L222.34,124H160a4,4,0,0,0,0,8h62.34l-25.17,25.17a4,4,0,0,0,5.66,5.66l32-32A4,4,0,0,0,234.83,125.17ZM33.66,132H96a4,4,0,0,0,0-8H33.66L58.83,98.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66l32,32a4,4,0,1,0,5.66-5.66Z"}))]]),W9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),B9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),d.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Y9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),q9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M84,100A12,12,0,0,1,96,88h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,100Zm12,52h64a12,12,0,0,0,0-24H96a12,12,0,0,0,0,24ZM236,56V184a20,20,0,0,1-20,20H157.89l-12.52,21.92a20,20,0,0,1-34.74,0L98.11,204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V180h61.07a12,12,0,0,1,10.42,6.05L128,207.94l12.51-21.89A12,12,0,0,1,150.93,180H212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V184a8,8,0,0,1-8,8H150.93l-16,28a8,8,0,0,1-13.9,0l-16-28H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.createElement("path",{d:"M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16h60.43l13.68,23.94a16,16,0,0,0,27.78,0L155.57,200H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM160,144H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M166,104a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,104Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-74V184a14,14,0,0,1-14,14H154.41L140.16,223a14,14,0,0,1-24.32,0L101.59,198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2h65.07a6,6,0,0,1,5.21,3l16,28a2,2,0,0,0,3.48,0l16-28a6,6,0,0,1,5.21-3H216a2,2,0,0,0,2-2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M164,104a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,104Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-76V184a12,12,0,0,1-12,12H153.25L138.42,222a12,12,0,0,1-20.84,0L102.75,196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4h65.07a4,4,0,0,1,3.47,2l16,28a4,4,0,0,0,6.94,0l16-28a4,4,0,0,1,3.47-2H216a4,4,0,0,0,4-4Z"}))]]),U9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),G9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),K9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),J9=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),eP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),tP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,8.67,5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.5,164,48,171.31,48,180Zm97.51-5.71c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,125.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.33,179.53,145.51,174.27Zm68,0c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.2,14.2,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.18,14.18,0,0,0,10.06-4.5,8.2,8.2,0,0,1,10.9-.91,8,8,0,0,1,.81,11.81A30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.38,9.19,8.26,8.26,0,0,1,.74,11.09,8,8,0,0,1-11.9.38A14.2,14.2,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M46,180c0,12.13,8.07,22,18,22a16.21,16.21,0,0,0,11.66-5.28,6,6,0,0,1,8.67,8.3A28.09,28.09,0,0,1,64,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.09,28.09,0,0,1,20.33,9,6,6,0,0,1-8.67,8.3A16.21,16.21,0,0,0,64,158C54.07,158,46,167.86,46,180Zm81-6.77c-10.85-3.13-13.4-4.69-13-7.91a6.56,6.56,0,0,1,2.88-5.08c5.59-3.79,17.66-1.82,21.44-.84a6,6,0,1,0,3.06-11.6c-2-.53-20.09-5-31.2,2.48a18.62,18.62,0,0,0-8.09,13.54c-1.79,14.19,12.27,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.21,9.76a6.89,6.89,0,0,1-3,5.34c-5.6,3.73-17.48,1.64-21.18.62A6,6,0,1,0,110.48,212a59.29,59.29,0,0,0,14.67,2c5.49,0,11.55-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C151.83,180.39,136.92,176.08,127,173.22Zm64,0c-10.85-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.65-1.83,21.44-.84a6,6,0,0,0,3.07-11.6c-2-.54-20.1-5-31.21,2.48a18.64,18.64,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.77,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,174.47,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C215.83,180.39,200.91,176.08,191,173.22ZM202,94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,1,1-12,0ZM193.5,82,158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,0,1,5.78,5.54A26.13,26.13,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.13,26.13,0,0,1,18.89,8.36,4,4,0,0,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.25,3.25,16.47,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.79,57.79,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm64,0c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z"}))]]),nP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,128a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v12a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v76A12,12,0,0,0,48,128ZM183,80H160V57ZM68,160v48a12,12,0,0,1-24,0V196H32v12a12,12,0,0,1-24,0V160a12,12,0,0,1,24,0v12H44V160a12,12,0,0,1,24,0Zm60,0a12,12,0,0,1-12,12h-4v36a12,12,0,0,1-24,0V172H84a12,12,0,0,1,0-24h32A12,12,0,0,1,128,160Zm72,0v48a12,12,0,0,1-24,0v-9.36l-.11.16a12,12,0,0,1-19.78,0l-.11-.16V208a12,12,0,0,1-24,0V160a12,12,0,0,1,21.89-6.8L166,170.82l12.11-17.62A12,12,0,0,1,200,160Zm56,48a12,12,0,0,1-12,12H220a12,12,0,0,1-12-12V160a12,12,0,0,1,24,0v36h12A12,12,0,0,1,256,208Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,128H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v84A4,4,0,0,0,44,128ZM152,44l44,44H152ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M214,120V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v80a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v26a6,6,0,0,0,12,0ZM158,46.48,193.52,82H158ZM66,160v48a6,6,0,0,1-12,0V190H30v18a6,6,0,0,1-12,0V160a6,6,0,0,1,12,0v18H54V160a6,6,0,0,1,12,0Zm56,0a6,6,0,0,1-6,6H106v42a6,6,0,0,1-12,0V166H84a6,6,0,0,1,0-12h32A6,6,0,0,1,122,160Zm72,0v48a6,6,0,0,1-12,0V178l-13.2,17.6a6,6,0,0,1-9.6,0L146,178v30a6,6,0,0,1-12,0V160a6,6,0,0,1,10.8-3.6L164,182l19.2-25.6A6,6,0,0,1,194,160Zm56,48a6,6,0,0,1-6,6H216a6,6,0,0,1-6-6V160a6,6,0,0,1,12,0v42h22A6,6,0,0,1,250,208Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212,88a4,4,0,0,0-1.17-2.83l-2-2h0l-54-54A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v28a4,4,0,0,0,8,0ZM156,41.65,198.34,84H156ZM64,160v48a4,4,0,0,1-8,0V188H28v20a4,4,0,0,1-8,0V160a4,4,0,0,1,8,0v20H56V160a4,4,0,0,1,8,0Zm56,0a4,4,0,0,1-4,4H104v44a4,4,0,0,1-8,0V164H84a4,4,0,0,1,0-8h32A4,4,0,0,1,120,160Zm72,0v48a4,4,0,0,1-8,0V172l-16.8,22.4a4,4,0,0,1-6.4,0L144,172v36a4,4,0,0,1-8,0V160a4,4,0,0,1,7.2-2.4L164,185.33l20.8-27.73A4,4,0,0,1,192,160Zm56,48a4,4,0,0,1-4,4H216a4,4,0,0,1-4-4V160a4,4,0,0,1,8,0v44h24A4,4,0,0,1,248,208Z"}))]]),rP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,140H104a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm104,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4a12,12,0,0,1,12,12ZM80,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM120,144H104a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.13-11.92,28.59-27.15A28,28,0,0,0,120,144Zm-.35,40H112V160h8a12,12,0,0,1,11.94,13.16A12.23,12.23,0,0,1,119.65,184ZM216,200.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H208a8,8,0,0,1,8,8ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,146H104a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H110V158h10a14,14,0,0,1,0,28Zm94-2v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,192,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,148H104a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H108V156h12a16,16,0,0,1,0,32Zm92-4v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),iP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.84,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM84,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.09,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0Z"}))]]),sP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M151.78,196.8a24.73,24.73,0,0,1-10.95,18c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.81,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.63-4.92-11.21-12.45-10.11-21.19a24.45,24.45,0,0,1,10.69-17.76c6.06-4.09,14.17-5.83,24.1-5.17A69,69,0,0,1,139,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.47,1.58,11.68,3.37,16.8,6.82C149.33,179.53,153,187.53,151.78,196.8ZM68,140a12,12,0,0,0-12,12v38a6,6,0,0,1-12,0,12,12,0,0,0-24,0,30,30,0,0,0,60,0V152A12,12,0,0,0,68,140Zm138.75,40,15-21a12,12,0,0,0-19.53-14L192,159.34,181.76,145a12,12,0,0,0-19.53,14l15,21-15,21A12,12,0,1,0,181.76,215L192,200.62,202.23,215A12,12,0,0,0,221.76,201ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.4c0,14.23-11.18,26.27-25.41,26.59A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.76,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Zm134.51,4.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M145.83,196.05a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a59.41,59.41,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.08,147.84,180.39,145.83,196.05ZM72,146a6,6,0,0,0-6,6v38a12,12,0,0,1-24,0,6,6,0,0,0-12,0,24,24,0,0,0,48,0V152A6,6,0,0,0,72,146Zm139.49,1.12a6,6,0,0,0-8.37,1.39L188,169.67,172.88,148.5a6,6,0,0,0-9.76,7L180.63,180,163.12,204.5a6,6,0,1,0,9.76,7L188,190.31l15.12,21.16a6,6,0,1,0,9.76-7L195.37,180l17.51-24.51A6,6,0,0,0,211.49,147.11ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM72,148a4,4,0,0,0-4,4v38a14,14,0,0,1-28,0,4,4,0,0,0-8,0,22,22,0,0,0,44,0V152A4,4,0,0,0,72,148Zm138.32.75a4,4,0,0,0-5.58.92L188,173.12l-16.75-23.45a4,4,0,0,0-6.51,4.66L183.08,180l-18.34,25.67a4,4,0,0,0,.93,5.58,4,4,0,0,0,5.58-.92L188,186.88l16.74,23.45A4,4,0,0,0,208,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L192.92,180l18.33-25.67A4,4,0,0,0,210.32,148.75ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),oP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H196a4,4,0,0,1,4,4V224a8,8,0,0,0,9.19,7.91,8.15,8.15,0,0,0,6.81-8.16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-8,56H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,144,144Zm-.49,56H136V160h8a20,20,0,0,1,20,20.77C163.58,191.59,154.34,200,143.51,200ZM104,152v55.73A8.17,8.17,0,0,1,96.53,216,8,8,0,0,1,88,208V177.38l-13.32,19a8.3,8.3,0,0,1-4.2,3.2,8,8,0,0,1-9-3L48,177.38v30.35A8.17,8.17,0,0,1,40.53,216,8,8,0,0,1,32,208V152.31a8.27,8.27,0,0,1,4.56-7.53,8,8,0,0,1,10,2.63L68,178.05l21.27-30.39a8.28,8.28,0,0,1,8.06-3.55A8,8,0,0,1,104,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V224a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM144,146H128a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6h16a34,34,0,0,0,0-68Zm0,56H134V158h10a22,22,0,0,1,0,44Zm-42-50v56a6,6,0,0,1-12,0V171L72.92,195.44a6,6,0,0,1-9.84,0L46,171v37a6,6,0,0,1-12,0V152a6,6,0,0,1,10.92-3.44l23.08,33,23.08-33A6,6,0,0,1,102,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z"}))]]),aP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm104-60a12,12,0,0,1-12,12H140v12a12,12,0,0,1-24,0V164H104a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,164,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,160H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Zm0-72V43.31L196.69,88Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-42-66a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V158H104a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-44-68a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V156H104a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,152Z"}))]]),lP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M56,140H40a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40H52V164h4a8,8,0,0,1,0,16Zm176,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,204,220c-19.85,0-36-17.95-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,216,176h4a12,12,0,0,1,12,12ZM160,152v56a12,12,0,0,1-8.34,11.43A12.15,12.15,0,0,1,148,220a12,12,0,0,1-9.76-5L120,189.44V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.76-7L136,170.55V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM60,144H44a8,8,0,0,0-8,8v55.72A8.17,8.17,0,0,0,43.47,216,8,8,0,0,0,52,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,60,144Zm-.35,40H52V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,59.65,184ZM224,200.87a8,8,0,0,1-2.26,5.57A30.07,30.07,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H216a8,8,0,0,1,8,8ZM156,152v55.76a8.22,8.22,0,0,1-4.12,7.24,8,8,0,0,1-10.39-2.35L116,177v30.76a8.17,8.17,0,0,1-7.47,8.26,8,8,0,0,1-8.53-8V152.31a8.27,8.27,0,0,1,4.53-7.52,8,8,0,0,1,10,2.56L140,183V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,156,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,146H44a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198H60a26,26,0,0,0,0-52Zm0,40H50V158H60a14,14,0,0,1,0,28Zm162,14.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8a6,6,0,0,1,6,6ZM154,152v56a6,6,0,0,1-4.17,5.71A5.78,5.78,0,0,1,148,214a6,6,0,0,1-4.88-2.51L114,170.72V208a6,6,0,0,1-12,0V152a6,6,0,0,1,10.88-3.49L142,189.28V152a6,6,0,0,1,12,0ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,148H44a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196H60a24,24,0,0,0,0-48Zm0,40H48V156H60a16,16,0,0,1,0,32Zm160,12.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8a4,4,0,0,1,4,4ZM152,152v56a4,4,0,0,1-2.78,3.81A3.93,3.93,0,0,1,148,212a4,4,0,0,1-3.25-1.67L112,164.48V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.25-2.33L144,195.52V152a4,4,0,0,1,8,0Zm52-40a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,84V41.65L198.34,84Z"}))]]),cP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,1,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57ZM87.78,196.8a24.72,24.72,0,0,1-10.94,18c-6,4-13.27,5.15-19.74,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.82,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.82-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.62-4.92-11.21-12.45-10.1-21.19a24.44,24.44,0,0,1,10.68-17.76c6.07-4.09,14.17-5.82,24.1-5.17A69,69,0,0,1,75,142a12,12,0,0,1-6.1,23.21c-6.35-1.63-13.61-1.51-16.07-.33a79.69,79.69,0,0,0,7.92,2.59c5.47,1.58,11.67,3.37,16.8,6.82C85.33,179.53,89,187.53,87.78,196.8ZM155.3,156l-20,56a12,12,0,0,1-22.6,0l-20-56A12,12,0,1,1,115.3,148L124,172.3,132.7,148A12,12,0,1,1,155.3,156ZM224,188v12.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4A12,12,0,0,1,224,188Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,1,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-72.18,145a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-20,56a8,8,0,0,1-15.07,0l-20-56a8,8,0,1,1,15.06-5.38L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-8.95,13.26A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44ZM87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-19.9,55.72a8.25,8.25,0,0,1-6.5,5.51,8,8,0,0,1-8.67-5.23L96.59,155a8.21,8.21,0,0,1,4.5-10.45,8,8,0,0,1,10.45,4.76L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.22,8.22,0,0,1,3,10.64,8,8,0,0,1-11.54,2.88A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.18,8.18,0,0,1,8.26-7.47H208A8,8,0,0,1,216,184Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.75l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,1,0,12,0V88A6,6,0,0,0,212.24,83.75ZM158,46.48,193.52,82H158ZM85.83,196.05a18.85,18.85,0,0,1-8.3,13.81C72.71,213.05,66.66,214,61.16,214a59.38,59.38,0,0,1-14.67-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.57-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.2-2.48a6,6,0,0,1-3,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C72.93,176.08,87.85,180.39,85.83,196.05Zm63.82-42-20,56a6,6,0,0,1-11.3,0l-20-56a6,6,0,1,1,11.3-4L124,190.15,138.35,150a6,6,0,0,1,11.3,4ZM214,184v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,10A15.25,15.25,0,0,0,192,158c-9.92,0-18,9.87-18,22s8.08,22,18,22a15.7,15.7,0,0,0,10-3.74V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,1,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.65,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm-13.3,64.47a8,8,0,0,0-10.23,4.84L124,184.21l-12.47-34.9a8,8,0,1,0-15.06,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,146.7,144.47ZM208,176h-8a8,8,0,0,0,0,16v5.29a13.38,13.38,0,0,1-8,2.71c-8.82,0-16-9-16-20s7.18-20,16-20a13.27,13.27,0,0,1,7.53,2.38,8,8,0,0,0,8.95-13.26A29.38,29.38,0,0,0,192,144c-17.64,0-32,16.15-32,36s14.36,36,32,36a30.06,30.06,0,0,0,21.78-9.6,8,8,0,0,0,2.22-5.53V184A8,8,0,0,0,208,176Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,1,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM83.85,195.8a17,17,0,0,1-7.43,12.41C72,211.12,66.38,212,61.2,212A57.89,57.89,0,0,1,47,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.11,61.11,0,0,1,10.47,1.61,4,4,0,0,1-2,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C72.27,178,85.65,181.84,83.85,195.8Zm63.92-42.45-20,56a4,4,0,0,1-7.53,0l-20-56a4,4,0,1,1,7.53-2.7L124,196.11l16.23-45.46a4,4,0,1,1,7.53,2.7ZM212,184v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.43,17.43,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184Z"}))]]),uP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.83,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152a8,8,0,0,1-8,8H68v48a8,8,0,0,1-16,0V160H40a8,8,0,0,1,0-16H80A8,8,0,0,1,88,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152.53A8.17,8.17,0,0,1,79.73,160H68v47.73A8.17,8.17,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.17,8.17,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM86,152a6,6,0,0,1-6,6H66v50a6,6,0,0,1-12,0V158H40a6,6,0,0,1,0-12H80A6,6,0,0,1,86,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM216,88V216a16,16,0,0,1-16,16H176a8,8,0,0,1,0-16h24V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM84,152a4,4,0,0,1-4,4H64v52a4,4,0,0,1-8,0V156H40a4,4,0,0,1,0-8H80A4,4,0,0,1,84,152Z"}))]]),dP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.76,201A12,12,0,1,1,202.23,215L192,200.62,181.76,215A12,12,0,1,1,162.23,201l15-21-15-21a12,12,0,0,1,19.53-14L192,159.34,202.23,145a12,12,0,0,1,19.53,14l-15,21Zm-80.25-26.73c-5.12-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,139,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,121.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C153,187.53,149.33,179.53,141.51,174.27ZM76,140H36a12,12,0,0,0,0,24h8v44a12,12,0,0,0,24,0V164h8a12,12,0,0,0,0-24ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.94c-2,15.89,13.65,20.42,23,23.12,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,1,0,106,214a60.43,60.43,0,0,0,15.18,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm62.51,68.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm-66.7,39.66a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM88,152.53A8.18,8.18,0,0,1,79.73,160H68v47.72A8.18,8.18,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.18,8.18,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.88,155.48,195.37,180l17.51,24.51a6,6,0,1,1-9.76,7L188,190.31l-15.12,21.16a6,6,0,1,1-9.76-7L180.63,180l-17.51-24.51a6,6,0,0,1,9.76-7L188,169.67l15.12-21.17a6,6,0,1,1,9.76,7Zm-89.83,17.74c-10.86-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.66-1.83,21.45-.84a6,6,0,0,0,3.06-11.6c-2-.53-20.1-5-31.21,2.48a18.61,18.61,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,106.48,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C147.84,180.39,132.92,176.08,123.05,173.22ZM80,146H40a6,6,0,0,0,0,12H54v50a6,6,0,0,0,12,0V158H80a6,6,0,0,0,0-12ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,0,0,105.94,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.25,154.33,192.92,180l18.33,25.67a4,4,0,0,1-.93,5.58A3.91,3.91,0,0,1,208,212a4,4,0,0,1-3.26-1.67L188,186.88l-16.75,23.45a4,4,0,0,1-6.51-4.66L183.08,180l-18.34-25.67a4,4,0,0,1,6.51-4.66L188,173.12l16.74-23.45a4,4,0,0,1,6.51,4.66Zm-88.76,20.82c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2.05-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,121.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C145.64,181.84,132.26,178,122.49,175.15ZM80,148H40a4,4,0,0,0,0,8H56v52a4,4,0,0,0,8,0V156H80a4,4,0,0,0,0-8ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),fP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57Zm-25.27,79-15,21,15,21A12,12,0,1,1,138.24,215L128,200.65,117.76,215A12,12,0,1,1,98.24,201l15-21-15-21A12,12,0,1,1,117.76,145L128,159.35,138.24,145A12,12,0,1,1,157.76,159ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Zm136,0a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,228,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M154.31,156.92,137.83,180l16.53,23.14a8.18,8.18,0,0,1-1.22,11,8,8,0,0,1-11.65-1.48L128,193.76l-13.49,18.89a8,8,0,0,1-11.64,1.49,8.17,8.17,0,0,1-1.23-11L118.17,180l-16.48-23.08a8.22,8.22,0,0,1,1.46-11.28,8,8,0,0,1,11.36,1.71L128,166.24l13.49-18.89a8,8,0,0,1,11.36-1.71A8.22,8.22,0,0,1,154.31,156.92ZM84,144H44.27A8.18,8.18,0,0,0,36,151.47,8,8,0,0,0,44,160H56v47.73A8.17,8.17,0,0,0,63.47,216,8,8,0,0,0,72,208V160H83.73A8.18,8.18,0,0,0,92,152.53,8,8,0,0,0,84,144Zm128,0H172.27a8.18,8.18,0,0,0-8.25,7.47,8,8,0,0,0,8,8.53h12v47.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V160h11.73a8.18,8.18,0,0,0,8.25-7.47A8,8,0,0,0,212,144ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Zm-5.12,109L135.37,180l17.51,24.51a6,6,0,1,1-9.76,7L128,190.32l-15.12,21.17a6,6,0,0,1-9.76-7L120.63,180l-17.51-24.51a6,6,0,1,1,9.76-7L128,169.68l15.12-21.17a6,6,0,0,1,9.76,7ZM90,152a6,6,0,0,1-6,6H70v50a6,6,0,0,1-12,0V158H44a6,6,0,0,1,0-12H84A6,6,0,0,1,90,152Zm128,0a6,6,0,0,1-6,6H198v50a6,6,0,0,1-12,0V158H172a6,6,0,0,1,0-12h40A6,6,0,0,1,218,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204,112a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,41.65,198.34,84H156Zm-4.75,112.67L132.92,180l18.33,25.67a4,4,0,1,1-6.5,4.65L128,186.88l-16.75,23.44a4,4,0,1,1-6.5-4.65L123.08,180l-18.33-25.68a4,4,0,1,1,6.5-4.65L128,173.12l16.75-23.45a4,4,0,1,1,6.5,4.65ZM88,152a4,4,0,0,1-4,4H68v52a4,4,0,0,1-8,0V156H44a4,4,0,0,1,0-8H84A4,4,0,0,1,88,152Zm128,0a4,4,0,0,1-4,4H196v52a4,4,0,0,1-8,0V156H172a4,4,0,0,1,0-8h40A4,4,0,0,1,216,152Z"}))]]),hP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Zm-88,72a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V196l32,20V152l-32,20Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM144,201.57l-16-10V176.43l16-10Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Zm-3.09,100.27a6,6,0,0,0-6.09.16L126,161.17V160a14,14,0,0,0-14-14H48a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h64a14,14,0,0,0,14-14v-1.17l22.82,14.26A6,6,0,0,0,158,216V152A6,6,0,0,0,154.91,146.75ZM114,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V160a2,2,0,0,1,2-2h64a2,2,0,0,1,2,2Zm32-2.83-20-12.5V175.33l20-12.5Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z"}))]]),pP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),mP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Zm-84-88a12,12,0,0,1,12,12v12h12a12,12,0,0,1,0,24H140v12a12,12,0,0,1-24,0V156H104a12,12,0,0,1,0-24h12V120A12,12,0,0,1,128,108Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm-64,80H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2ZM158,144a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V150H104a6,6,0,0,1,0-12h18V120a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,144Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4ZM156,144a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V148H104a4,4,0,0,1,0-8h20V120a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,144Z"}))]]),gP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),OP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),xP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),yP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),vP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),bP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),wP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,176H52V52H204Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34Zm2,174a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36Zm4,172a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),SP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),d.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),d.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),d.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),kP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M90.86,50.89a12,12,0,0,0-21.72,0l-64,136a12,12,0,0,0,21.71,10.22L42.44,164h75.12l15.58,33.11a12,12,0,0,0,21.72-10.22ZM53.74,140,80,84.18,106.27,140ZM200,84c-13.85,0-24.77,3.86-32.45,11.48a12,12,0,1,0,16.9,17c3-3,8.26-4.52,15.55-4.52,11,0,20,7.18,20,16v4.39A47.28,47.28,0,0,0,200,124c-24.26,0-44,17.94-44,40s19.74,40,44,40a47.18,47.18,0,0,0,22-5.38A12,12,0,0,0,244,192V124C244,101.94,224.26,84,200,84Zm0,96c-11,0-20-7.18-20-16s9-16,20-16,20,7.18,20,16S211,180,200,180Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,164c0,15.46-14.33,28-32,28s-32-12.54-32-28,14.33-28,32-28S232,148.54,232,164ZM34.82,152h90.36L80,56Z",opacity:"0.2"}),d.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,156c0,6.5-7.33,12-16,12s-16-5.5-16-12,7.33-12,16-12S200,149.5,200,156ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM143.37,172.88l-44-104a8,8,0,0,0-14.74,0l-44,104a8,8,0,0,0,14.74,6.24L66.84,152h50.32l11.47,27.12a8,8,0,0,0,14.74-6.24ZM216,124c0-15.44-14.36-28-32-28a34.86,34.86,0,0,0-20.78,6.68,8,8,0,0,0,9.56,12.83A18.84,18.84,0,0,1,184,112c8.56,0,15.8,5.36,16,11.76v8A35.24,35.24,0,0,0,184,128c-17.64,0-32,12.56-32,28s14.36,28,32,28a35.13,35.13,0,0,0,16.93-4.26A8,8,0,0,0,216,176ZM73.61,136h36.78L92,92.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M85.43,53.45a6,6,0,0,0-10.86,0l-64,136a6,6,0,1,0,10.86,5.11L38.63,158h82.74l17.2,36.55a6,6,0,1,0,10.86-5.11ZM44.28,146,80,70.09,115.72,146ZM200,98c-12.21,0-21.71,3.28-28.23,9.74a6,6,0,0,0,8.46,8.52c4.18-4.15,10.84-6.26,19.77-6.26,14.34,0,26,9.87,26,22v7.24A40.36,40.36,0,0,0,200,130c-20.95,0-38,15.25-38,34s17.05,34,38,34a40.36,40.36,0,0,0,26-9.24V192a6,6,0,0,0,12,0V132C238,113.25,221,98,200,98Zm0,88c-14.34,0-26-9.87-26-22s11.66-22,26-22,26,9.87,26,22S214.34,186,200,186Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M83.62,54.3a4,4,0,0,0-7.24,0l-64,136a4,4,0,0,0,7.24,3.4L37.36,156h85.28l17.74,37.7a4,4,0,1,0,7.24-3.4ZM41.13,148,80,65.39,118.87,148ZM200,100c-11.67,0-20.69,3.08-26.82,9.16a4,4,0,1,0,5.64,5.68c4.57-4.54,11.7-6.84,21.18-6.84,15.44,0,28,10.77,28,24v11.92A37.78,37.78,0,0,0,200,132c-19.85,0-36,14.35-36,32s16.15,32,36,32a37.78,37.78,0,0,0,28-11.92V192a4,4,0,0,0,8,0V132C236,114.36,219.85,100,200,100Zm0,88c-15.44,0-28-10.77-28-24s12.56-24,28-24,28,10.77,28,24S215.44,188,200,188Z"}))]]),PP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212,56V88a12,12,0,0,1-24,0V68H140V188h20a12,12,0,0,1,0,24H96a12,12,0,0,1,0-24h20V68H68V88a12,12,0,0,1-24,0V56A12,12,0,0,1,56,44H200A12,12,0,0,1,212,56Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V184a16,16,0,0,1-16,16H72a16,16,0,0,1-16-16V56Z",opacity:"0.2"}),d.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,96a8,8,0,0,1-16,0V88H136v88h12a8,8,0,0,1,0,16H108a8,8,0,0,1,0-16h12V88H88v8a8,8,0,0,1-16,0V80a8,8,0,0,1,8-8h96a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M206,56V88a6,6,0,0,1-12,0V62H134V194h26a6,6,0,0,1,0,12H96a6,6,0,0,1,0-12h26V62H62V88a6,6,0,0,1-12,0V56a6,6,0,0,1,6-6H200A6,6,0,0,1,206,56Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204,56V88a4,4,0,0,1-8,0V60H132V196h28a4,4,0,0,1,0,8H96a4,4,0,0,1,0-8h28V60H60V88a4,4,0,0,1-8,0V56a4,4,0,0,1,4-4H200A4,4,0,0,1,204,56Z"}))]]),AP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),$P=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),CP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,96v64a12,12,0,0,1-24,0V96a12,12,0,0,1,24,0ZM88,20A12,12,0,0,0,76,32V224a12,12,0,0,0,24,0V32A12,12,0,0,0,88,20Zm40,32a12,12,0,0,0-12,12V192a12,12,0,0,0,24,0V64A12,12,0,0,0,128,52Zm40,32a12,12,0,0,0-12,12v64a12,12,0,0,0,24,0V96A12,12,0,0,0,168,84Zm40-16a12,12,0,0,0-12,12v96a12,12,0,0,0,24,0V80A12,12,0,0,0,208,68Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),d.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM72,152a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,32a8,8,0,0,1-16,0V72a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V88a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,8a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M54,96v64a6,6,0,0,1-12,0V96a6,6,0,0,1,12,0ZM88,26a6,6,0,0,0-6,6V224a6,6,0,0,0,12,0V32A6,6,0,0,0,88,26Zm40,32a6,6,0,0,0-6,6V192a6,6,0,0,0,12,0V64A6,6,0,0,0,128,58Zm40,32a6,6,0,0,0-6,6v64a6,6,0,0,0,12,0V96A6,6,0,0,0,168,90Zm40-16a6,6,0,0,0-6,6v96a6,6,0,0,0,12,0V80A6,6,0,0,0,208,74Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M52,96v64a4,4,0,0,1-8,0V96a4,4,0,0,1,8,0ZM88,28a4,4,0,0,0-4,4V224a4,4,0,0,0,8,0V32A4,4,0,0,0,88,28Zm40,32a4,4,0,0,0-4,4V192a4,4,0,0,0,8,0V64A4,4,0,0,0,128,60Zm40,32a4,4,0,0,0-4,4v64a4,4,0,0,0,8,0V96A4,4,0,0,0,168,92Zm40-16a4,4,0,0,0-4,4v96a4,4,0,0,0,8,0V80A4,4,0,0,0,208,76Z"}))]]),EP=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),TP=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),yt=d.forwardRef((n,e)=>{const{alt:t,color:r,size:i,weight:s,mirrored:a,children:c,weights:u,...h}=n,{color:m="currentColor",size:O,weight:x="regular",mirrored:v=!1,...w}=d.useContext(TP);return d.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:i??O,height:i??O,fill:r??m,viewBox:"0 0 256 256",transform:a||v?"scale(-1, 1)":void 0,...w,...h},!!t&&d.createElement("title",null,t),c,u.get(s??x))});yt.displayName="IconBase";const Hy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:X9}));Hy.displayName="ArrowClockwiseIcon";const MP=Hy,Wy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:F9}));Wy.displayName="ArrowCounterClockwiseIcon";const QP=Wy,By=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:z9}));By.displayName="ArrowLeftIcon";const jP=By,Yy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:H9}));Yy.displayName="ArrowsOutCardinalIcon";const ZP=Yy,qy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:W9}));qy.displayName="CameraIcon";const RP=qy,Uy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:B9}));Uy.displayName="CaretDownIcon";const NP=Uy,nd=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:Y9}));nd.displayName="CaretRightIcon";const Gy=nd,Ky=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:q9}));Ky.displayName="ChatCenteredTextIcon";const LP=Ky,Jy=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:U9}));Jy.displayName="CheckCircleIcon";const e3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:G9}));e3.displayName="CopyIcon";const VP=e3,t3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:K9}));t3.displayName="EyeIcon";const _P=t3,n3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:J9}));n3.displayName="FileIcon";const DP=n3,r3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:eP}));r3.displayName="FileCodeIcon";const IP=r3,i3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:tP}));i3.displayName="FileCssIcon";const XP=i3,s3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:nP}));s3.displayName="FileHtmlIcon";const FP=s3,o3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:rP}));o3.displayName="FileJpgIcon";const zP=o3,a3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:iP}));a3.displayName="FileJsIcon";const HP=a3,l3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:sP}));l3.displayName="FileJsxIcon";const WP=l3,c3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:oP}));c3.displayName="FileMdIcon";const BP=c3,u3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:aP}));u3.displayName="FilePlusIcon";const W4=u3,d3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:lP}));d3.displayName="FilePngIcon";const YP=d3,f3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:cP}));f3.displayName="FileSvgIcon";const qP=f3,h3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:uP}));h3.displayName="FileTsIcon";const UP=h3,p3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:dP}));p3.displayName="FileTsxIcon";const GP=p3,m3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:fP}));m3.displayName="FileTxtIcon";const KP=m3,g3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:hP}));g3.displayName="FileVideoIcon";const JP=g3,O3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:pP}));O3.displayName="FolderSimpleIcon";const eA=O3,x3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:mP}));x3.displayName="FolderSimplePlusIcon";const y3=x3,v3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:gP}));v3.displayName="GearIcon";const tA=v3,b3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:OP}));b3.displayName="ImageIcon";const nA=b3,w3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:xP}));w3.displayName="LightningIcon";const rA=w3,S3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:yP}));S3.displayName="PaletteIcon";const iA=S3,k3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:vP}));k3.displayName="PencilSimpleIcon";const sA=k3,P3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:bP}));P3.displayName="PlusIcon";const A3=P3,$3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:wP}));$3.displayName="SquareIcon";const oA=$3,C3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:SP}));C3.displayName="StackIcon";const aA=C3,E3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:kP}));E3.displayName="TextAaIcon";const lA=E3,T3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:PP}));T3.displayName="TextTIcon";const cA=T3,M3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:AP}));M3.displayName="TrashIcon";const uA=M3,X1=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:$P}));X1.displayName="WarningIcon";const Q3=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:CP}));Q3.displayName="WaveformIcon";const dA=Q3,ig=d.forwardRef((n,e)=>d.createElement(yt,{ref:e,...n,weights:EP}));ig.displayName="XIcon";const fA=ig;function hA({stack:n,onNavigate:e}){return n.length<=1?null:p.jsxs("nav",{"aria-label":"Composition navigation",className:"flex items-center gap-1 px-2 h-8 border-b border-neutral-800/50 bg-neutral-900/50 flex-shrink-0",children:[p.jsx("button",{type:"button",onClick:()=>e(n.length-2),className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-xs text-neutral-400 hover:text-white hover:bg-neutral-800 transition-colors",title:"Back (Esc)",children:p.jsx(jP,{size:12,weight:"bold"})}),n.map((t,r)=>{const i=r===n.length-1;return p.jsxs("span",{className:"flex items-center gap-1",children:[r>0&&p.jsx(Gy,{size:10,className:"text-neutral-600 flex-shrink-0"}),i?p.jsx("span",{className:"text-xs text-neutral-200 font-medium",children:t.label}):p.jsx("button",{type:"button",onClick:()=>e(r),className:"text-xs text-neutral-500 hover:text-neutral-200 transition-colors",children:t.label})]},t.id)})]})}const j3="Shift+T";function Z3(n){var i,s,a;if(!n||typeof n!="object")return!1;const e=n,t=(i=e.tagName)==null?void 0:i.toLowerCase();if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return!0;const r=(s=e.getAttribute)==null?void 0:s.call(e,"role");return r==="textbox"||r==="searchbox"||r==="combobox"?!0:!!((a=e.closest)!=null&&a.call(e,"input, textarea, select, [contenteditable='true'], [role='textbox'], .cm-editor"))}function pA(n){return n.metaKey||n.ctrlKey||n.altKey||!n.shiftKey||n.key.toLowerCase()!=="t"?!1:!Z3(n.target)}function R3(n){return`${n?"Hide":"Show"} timeline editor (${j3})`}const mA=100,gA=220,OA=120;const xA=d.memo(function({projectId:e,portrait:t,previewOverlay:r,timelineToolbar:i,timelineFooter:s,refreshKey:a,activeCompositionPath:c,onIframeRef:u,onCompositionChange:h,renderClipContent:m,onFileDrop:O,onDeleteElement:x,onAssetDrop:v,onMoveElement:w,onResizeElement:k,onBlockedEditAttempt:$,onSelectTimelineElement:M,onInspectTimelineElement:V,inspectedTimelineElementId:A,timelineLayerChildCounts:Q,onCompIdToSrcChange:T,timelineVisible:N,onToggleTimeline:j,onCompositionLoadingChange:W}){const{iframeRef:K,togglePlay:ae,seek:ie,onIframeLoad:L,saveSeekPosition:le}=_9(),ye=d.useRef(e);ye.current!==e&&(ye.current=e,Re.getState().reset());const Oe=d.useRef(a);d.useEffect(()=>{a!==Oe.current&&(Oe.current=a,le())},[a,le]);const $e=d.useCallback(()=>{L(),u==null||u(K.current)},[L,K,u]),[pe,D]=d.useState(new Map);On(()=>{fetch(`/api/projects/${e}/files/index.html`).then(ze=>ze.json()).then(ze=>{const Pt=ze.content||"",pt=new Map,vt=/data-composition-id=["']([^"']+)["'][^>]*data-composition-src=["']([^"']+)["']|data-composition-src=["']([^"']+)["'][^>]*data-composition-id=["']([^"']+)["']/g;let dt;for(;(dt=vt.exec(Pt))!==null;){const Rt=dt[1]||dt[4],en=dt[2]||dt[3];Rt&&en&&pt.set(Rt,en)}D(pt),T==null||T(pt)}).catch(()=>{})});const z=d.useRef(pe);z.current=pe,d.useEffect(()=>{if(pe.size===0)return;const ze=vt=>{const dt=z.current;if(dt.size===0)return null;let Rt=!1;const en=vt.map(Qt=>{if(Qt.compositionSrc)return Qt;const te=dt.get(Qt.id)??dt.get(Qt.id.replace(/-(host|comp|layer)$/,""));return te?(Rt=!0,{...Qt,compositionSrc:te}):Qt});return Rt?en:null},Pt=ze(Re.getState().elements);Pt&&Re.getState().setElements(Pt);let pt=!1;return Re.subscribe((vt,dt)=>{if(pt||vt.elements===dt.elements||vt.elements.length===0||vt.elements.every(en=>en.compositionSrc))return;pt=!0;const Rt=ze(vt.elements);Rt&&vt.setElements(Rt),pt=!1})},[pe]);const[q,E]=d.useState([{id:"master",label:"Master",previewUrl:`/api/projects/${e}/preview`}]),X=d.useRef(h);X.current=h;const ee=d.useCallback(ze=>{E(Pt=>{var dt;const pt=typeof ze=="function"?ze(Pt):ze,vt=(dt=pt[pt.length-1])==null?void 0:dt.id;return queueMicrotask(()=>{var Rt;return(Rt=X.current)==null?void 0:Rt.call(X,vt==="master"?null:vt)}),pt})},[]),[Ce,Te]=d.useState(gA),tt=d.useRef(!1),[De,G]=d.useState(!0),oe=d.useCallback(ze=>{ze||(tt.current=!0),!(ze&&tt.current)&&G(ze)},[]),fe=De;d.useEffect(()=>{W==null||W(De)},[De,W]);const Ee=N??!0,Le=d.useRef(!1),Fe=d.useRef(null),Ve=q[q.length-1],qe=q.length>1?Ve.previewUrl:void 0;d.useEffect(()=>{u==null||u(K.current)},[q.length,u,a,K]);const Ue=d.useRef(0),ce=K,je=d.useCallback(ze=>{var vt;if(!ze.compositionSrc)return;Ue.current=Re.getState().currentTime,le();const Pt=ze.id;let pt=pe.get(Pt);if(!pt)try{const dt=(vt=ce.current)==null?void 0:vt.contentDocument;if(dt){const Rt=dt.querySelector(`[data-composition-id="${Pt}"][data-composition-src]`);Rt&&(pt=Rt.getAttribute("data-composition-src")||void 0)}}catch{}if(!pt){const dt=ze.compositionSrc,Rt=dt.match(/compositions\/.*\.html/);pt=Rt?Rt[0]:dt}Re.getState().setElements([]),ee(dt=>{var te;if(dt[dt.length-1].id===pt&&dt.length>1)return dt.slice(0,-1);const en=((te=pt.split("/").pop())==null?void 0:te.replace(/\.html$/,""))||pt,Qt=`/api/projects/${e}/preview/comp/${pt}`;return[...dt,{id:pt,label:en,previewUrl:Qt}]})},[e,pe]),Se=d.useCallback(ze=>{ze===0&&Ue.current>0&&Re.getState().setCurrentTime(Ue.current),le(),Re.getState().setElements([]),ee(Pt=>Pt.slice(0,ze+1))},[]);d.useEffect(()=>{if(c==="index.html")Re.getState().setElements([]),ee(ze=>ze.length>1?[ze[0]]:ze);else if(c&&c.startsWith("compositions/")){const ze=c.replace(/^compositions\//,"").replace(/\.html$/,""),Pt=`/api/projects/${e}/preview/comp/${c}`;Re.getState().setElements([]),ee(pt=>{var vt;return((vt=pt[pt.length-1])==null?void 0:vt.id)===c?pt:[{id:"master",label:"Master",previewUrl:`/api/projects/${e}/preview`},{id:c,label:ze,previewUrl:Pt}]})}else c||Re.getState().setElements([])},[c,e,ee]);const Me=d.useCallback(ze=>{fe||(ze.preventDefault(),Le.current=!0,ze.target.setPointerCapture(ze.pointerId))},[fe]),ct=d.useCallback(ze=>{if(fe||!Le.current||!Fe.current)return;const Pt=Fe.current.getBoundingClientRect(),pt=ze.clientY-Pt.top,vt=Pt.height,dt=Math.max(mA,Math.min(vt-OA,vt-pt));Te(dt)},[fe]),fn=d.useCallback(()=>{Le.current=!1},[]),Mn=d.useCallback(ze=>{ze.key==="Escape"&&q.length>1&&ee(Pt=>Pt.slice(0,-1))},[q.length]);return p.jsxs("div",{ref:Fe,className:"flex flex-col h-full min-h-0 bg-neutral-950",onKeyDown:Mn,tabIndex:-1,children:[p.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[p.jsxs("div",{className:"flex-1 min-h-0 relative",children:[p.jsx(I9,{projectId:e,iframeRef:K,onIframeLoad:$e,onCompositionLoadingChange:oe,portrait:t,directUrl:qe,refreshKey:a,suppressLoadingOverlay:tt.current}),r]}),p.jsxs("div",{className:"bg-neutral-950 border-t border-neutral-800/50 flex-shrink-0",children:[q.length>1&&p.jsx(hA,{stack:q,onNavigate:Se}),p.jsx(g7,{onTogglePlay:ae,onSeek:ie,disabled:fe})]})]}),Ee?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"group h-2 flex-shrink-0 cursor-row-resize flex items-center justify-center z-10",style:{touchAction:"none"},onPointerDown:Me,onPointerMove:ct,onPointerUp:fn,children:p.jsx("div",{className:"h-px w-full bg-white/10 transition-colors group-hover:bg-white/16 group-active:bg-white/22"})}),p.jsxs("div",{className:"relative flex flex-col flex-shrink-0",style:{height:Ce},"aria-disabled":fe||void 0,children:[p.jsxs("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden bg-neutral-950",onDoubleClick:ze=>{ze.target.closest("[data-clip]")||fe||q.length>1&&ee(Pt=>Pt.slice(0,-1))},children:[p.jsx("div",{className:"flex-shrink-0",children:i}),p.jsx(h9,{onSeek:ie,onDrillDown:je,renderClipContent:m,onFileDrop:O,onDeleteElement:x,onAssetDrop:v,onMoveElement:w,onResizeElement:k,onBlockedEditAttempt:$,onSelectElement:M,onInspectElement:V,inspectedElementId:A,layerChildCounts:Q,disabled:fe})]}),s&&p.jsx("div",{className:"flex-shrink-0",children:s}),fe&&p.jsx("div",{className:"absolute inset-0 z-30 cursor-not-allowed bg-black/18","data-testid":"timeline-loading-disabled-overlay","aria-hidden":"true",onPointerDown:ze=>ze.preventDefault(),onDragOver:ze=>ze.preventDefault(),onDrop:ze=>ze.preventDefault()})]})]}):j?p.jsx("div",{className:"flex-shrink-0 border-t border-neutral-800/50 bg-neutral-950/96",children:p.jsxs("div",{className:"flex h-10 items-center justify-between px-3",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-500",children:"Timeline"}),p.jsxs("button",{type:"button",onClick:j,className:"flex h-7 items-center gap-1.5 rounded-md border border-neutral-800 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:bg-neutral-900 hover:text-neutral-100",title:R3(!1),"aria-label":"Show timeline editor",children:[p.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),p.jsx("path",{d:"M7 9h10"}),p.jsx("path",{d:"M8 5h8"})]}),p.jsx("span",{children:"Show"}),p.jsx("span",{className:"hidden rounded bg-white/5 px-1 py-0.5 font-mono text-[9px] text-neutral-500 sm:inline",children:j3})]})]})}):null]})});let Lm=[],N3=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?N3:Lm).push(t=t+n[e])})();function yA(n){if(n<768)return!1;for(let e=0,t=Lm.length;;){let r=e+t>>1;if(n<Lm[r])t=r;else if(n>=N3[r])e=r+1;else return!0;if(e==t)return!1}}function B4(n){return n>=127462&&n<=127487}const Y4=8205;function vA(n,e,t=!0,r=!0){return(t?L3:bA)(n,e,r)}function L3(n,e,t){if(e==n.length)return e;e&&V3(n.charCodeAt(e))&&_3(n.charCodeAt(e-1))&&e--;let r=mp(n,e);for(e+=q4(r);e<n.length;){let i=mp(n,e);if(r==Y4||i==Y4||t&&yA(i))e+=q4(i),r=i;else if(B4(i)){let s=0,a=e-2;for(;a>=0&&B4(mp(n,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function bA(n,e,t){for(;e>0;){let r=L3(n,e-2,t);if(r<e)return r;e--}return 0}function mp(n,e){let t=n.charCodeAt(e);if(!_3(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return V3(r)?(t-55296<<10)+(r-56320)+65536:t}function V3(n){return n>=56320&&n<57344}function _3(n){return n>=55296&&n<56320}function q4(n){return n<65536?1:2}class Vt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Il(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),ps.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Il(this,e,t);let r=[];return this.decompose(e,t,r,0),ps.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new uu(this),s=new uu(e);for(let a=t,c=t;;){if(i.next(a),s.next(a),a=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(c+=i.value.length,i.done||c>=r)return!0}}iter(e=1){return new uu(this,e)}iterRange(e,t=this.length){return new D3(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new I3(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Vt.empty:e.length<=32?new kn(e):ps.from(kn.split(e,[]))}}class kn extends Vt{constructor(e,t=wA(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let a=this.text[s],c=i+a.length;if((t?r:c)>=e)return new SA(i,c,r,a);i=c+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new kn(U4(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),c=F1(s.text,a.text.slice(),0,s.length);if(c.length<=32)r.push(new kn(c,a.length+s.length));else{let u=c.length>>1;r.push(new kn(c.slice(0,u)),new kn(c.slice(u)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof kn))return super.replace(e,t,r);[e,t]=Il(this,e,t);let i=F1(this.text,F1(r.text,U4(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new kn(i,s):ps.from(kn.split(i,[]),s)}sliceString(e,t=this.length,r=`
|
|
55
|
-
`){[e,t]=Il(this,e,t);let i="";for(let s=0,a=0;s<=t&&a<this.text.length;a++){let c=this.text[a],u=s+c.length;s>e&&a&&(i+=r),e<u&&t>s&&(i+=c.slice(Math.max(0,e-s),t-s)),s=u+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new kn(r,i)),r=[],i=-1);return i>-1&&t.push(new kn(r,i)),t}}class ps extends Vt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let a=this.children[s],c=i+a.length,u=r+a.lines-1;if((t?u:c)>=e)return a.lineInner(e,t,r,i);i=c+1,r=u+1}}decompose(e,t,r,i){for(let s=0,a=0;a<=t&&s<this.children.length;s++){let c=this.children[s],u=a+c.length;if(e<=u&&t>=a){let h=i&((a<=e?1:0)|(u>=t?2:0));a>=e&&u<=t&&!h?r.push(c):c.decompose(e-a,t-a,r,h)}a=u+1}}replace(e,t,r){if([e,t]=Il(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let a=this.children[i],c=s+a.length;if(e>=s&&t<=c){let u=a.replace(e-s,t-s,r),h=this.lines-a.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let m=this.children.slice();return m[i]=u,new ps(m,this.length-(t-e)+r.length)}return super.replace(s,c,u)}s=c+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
|
|
56
|
-
`){[e,t]=Il(this,e,t);let i="";for(let s=0,a=0;s<this.children.length&&a<=t;s++){let c=this.children[s],u=a+c.length;a>e&&s&&(i+=r),e<u&&t>a&&(i+=c.sliceString(e-a,t-a,r)),a=u+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ps))return 0;let r=0,[i,s,a,c]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==a||s==c)return r;let u=this.children[i],h=e.children[s];if(u!=h)return r+u.scanIdentical(h,t);r+=u.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let w of e)w.flatten(v);return new kn(v,t)}let i=Math.max(32,r>>5),s=i<<1,a=i>>1,c=[],u=0,h=-1,m=[];function O(v){let w;if(v.lines>s&&v instanceof ps)for(let k of v.children)O(k);else v.lines>a&&(u>a||!u)?(x(),c.push(v)):v instanceof kn&&u&&(w=m[m.length-1])instanceof kn&&v.lines+w.lines<=32?(u+=v.lines,h+=v.length+1,m[m.length-1]=new kn(w.text.concat(v.text),w.length+1+v.length)):(u+v.lines>i&&x(),u+=v.lines,h+=v.length+1,m.push(v))}function x(){u!=0&&(c.push(m.length==1?m[0]:ps.from(m,h)),h=-1,u=m.length=0)}for(let v of e)O(v);return x(),c.length==1?c[0]:new ps(c,t)}}Vt.empty=new kn([""],0);function wA(n){let e=-1;for(let t of n)e+=t.length+1;return e}function F1(n,e,t=0,r=1e9){for(let i=0,s=0,a=!0;s<n.length&&i<=r;s++){let c=n[s],u=i+c.length;u>=t&&(u>r&&(c=c.slice(0,r-i)),i<t&&(c=c.slice(t-i)),a?(e[e.length-1]+=c,a=!1):e.push(c)),i=u+1}return e}function U4(n,e,t){return F1(n,[""],e,t)}class uu{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof kn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],a=s>>1,c=i instanceof kn?i.text.length:i.children.length;if(a==(t>0?c:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
57
|
-
`,this;e--}else if(i instanceof kn){let u=i.text[a+(t<0?-1:0)];if(this.offsets[r]+=t,u.length>Math.max(0,e))return this.value=e==0?u:t>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=i.children[a+(t<0?-1:0)];e>u.length?(e-=u.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(u),this.offsets.push(t>0?1:(u instanceof kn?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class D3{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new uu(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class I3{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Vt.prototype[Symbol.iterator]=function(){return this.iter()},uu.prototype[Symbol.iterator]=D3.prototype[Symbol.iterator]=I3.prototype[Symbol.iterator]=function(){return this});class SA{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function Il(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Bn(n,e,t=!0,r=!0){return vA(n,e,t,r)}function kA(n){return n>=56320&&n<57344}function PA(n){return n>=55296&&n<56320}function Na(n,e){let t=n.charCodeAt(e);if(!PA(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return kA(r)?(t-55296<<10)+(r-56320)+65536:t}function X3(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Du(n){return n<65536?1:2}const Vm=/\r\n?|\n/;var fr=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(fr||(fr={}));class bs{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],a=this.sections[t++];a<0?(e(r,i,s),i+=s):i+=a,r+=s}}iterChangedRanges(e,t=!1){_m(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new bs(e)}composeDesc(e){return this.empty?e:e.empty?this:F3(this,e)}mapDesc(e,t=!1){return e.empty?this:Dm(this,e,t)}mapPos(e,t=-1,r=fr.Simple){let i=0,s=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],u=this.sections[a++],h=i+c;if(u<0){if(h>e)return s+(e-i);s+=c}else{if(r!=fr.Simple&&h>=e&&(r==fr.TrackDel&&i<e&&h>e||r==fr.TrackBefore&&i<e||r==fr.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!c)return e==i||t<0?s:s+u;s+=u}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],a=this.sections[r++],c=i+s;if(a>=0&&i<=t&&c>=e)return i<e&&c>t?"cover":!0;i=c}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new bs(e)}static create(e){return new bs(e)}}class Nn extends bs{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return _m(this,(t,r,i,s,a)=>e=e.replace(i,i+(r-t),a),!1),e}mapDesc(e,t=!1){return Dm(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let a=t[i],c=t[i+1];if(c>=0){t[i]=c,t[i+1]=a;let u=i>>1;for(;r.length<u;)r.push(Vt.empty);r.push(a?e.slice(s,s+a):Vt.empty)}s+=a}return new Nn(t,r)}compose(e){return this.empty?e:e.empty?this:F3(this,e,!0)}map(e,t=!1){return e.empty?this:Dm(this,e,t,!0)}iterChanges(e,t=!1){_m(this,e,t)}get desc(){return bs.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new Su(this);e:for(let a=0,c=0;;){let u=a==e.length?1e9:e[a++];for(;c<u||c==u&&s.len==0;){if(s.done)break e;let m=Math.min(s.len,u-c);dr(i,m,-1);let O=s.ins==-1?-1:s.off==0?s.ins:0;dr(t,m,O),O>0&&Lo(r,t,s.text),s.forward(m),c+=m}let h=e[a++];for(;c<h;){if(s.done)break e;let m=Math.min(s.len,h-c);dr(t,m,-1),dr(i,m,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(m),c+=m}}return{changes:new Nn(t,r),filtered:bs.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],a=0,c=null;function u(m=!1){if(!m&&!i.length)return;a<t&&dr(i,t-a,-1);let O=new Nn(i,s);c=c?c.compose(O.map(c)):O,i=[],s=[],a=0}function h(m){if(Array.isArray(m))for(let O of m)h(O);else if(m instanceof Nn){if(m.length!=t)throw new RangeError(`Mismatched change set length (got ${m.length}, expected ${t})`);u(),c=c?c.compose(m.map(c)):m}else{let{from:O,to:x=O,insert:v}=m;if(O>x||O<0||x>t)throw new RangeError(`Invalid change range ${O} to ${x} (in doc of length ${t})`);let w=v?typeof v=="string"?Vt.of(v.split(r||Vm)):v:Vt.empty,k=w.length;if(O==x&&k==0)return;O<a&&u(),O>a&&dr(i,O-a,-1),dr(i,x-O,k),Lo(s,i,w),a=x}}return h(e),u(!c),c}static empty(e){return new Nn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Vt.empty);r[i]=Vt.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new Nn(t,r)}static createSet(e,t){return new Nn(e,t)}}function dr(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function Lo(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Vt.empty);n.push(t)}}function _m(n,e,t){let r=n.inserted;for(let i=0,s=0,a=0;a<n.sections.length;){let c=n.sections[a++],u=n.sections[a++];if(u<0)i+=c,s+=c;else{let h=i,m=s,O=Vt.empty;for(;h+=c,m+=u,u&&r&&(O=O.append(r[a-2>>1])),!(t||a==n.sections.length||n.sections[a+1]<0);)c=n.sections[a++],u=n.sections[a++];e(i,h,s,m,O),i=h,s=m}}}function Dm(n,e,t,r=!1){let i=[],s=r?[]:null,a=new Su(n),c=new Su(e);for(let u=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let h=Math.min(a.len,c.len);dr(i,h,-1),a.forward(h),c.forward(h)}else if(c.ins>=0&&(a.ins<0||u==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!t))){let h=c.len;for(dr(i,c.ins,-1);h;){let m=Math.min(a.len,h);a.ins>=0&&u<a.i&&a.len<=m&&(dr(i,0,a.ins),s&&Lo(s,i,a.text),u=a.i),a.forward(m),h-=m}c.next()}else if(a.ins>=0){let h=0,m=a.len;for(;m;)if(c.ins==-1){let O=Math.min(m,c.len);h+=O,m-=O,c.forward(O)}else if(c.ins==0&&c.len<m)m-=c.len,c.next();else break;dr(i,h,u<a.i?a.ins:0),s&&u<a.i&&Lo(s,i,a.text),u=a.i,a.forward(a.len-m)}else{if(a.done&&c.done)return s?Nn.createSet(i,s):bs.create(i);throw new Error("Mismatched change set lengths")}}}function F3(n,e,t=!1){let r=[],i=t?[]:null,s=new Su(n),a=new Su(e);for(let c=!1;;){if(s.done&&a.done)return i?Nn.createSet(r,i):bs.create(r);if(s.ins==0)dr(r,s.len,0,c),s.next();else if(a.len==0&&!a.done)dr(r,0,a.ins,c),i&&Lo(i,r,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,a.len),h=r.length;if(s.ins==-1){let m=a.ins==-1?-1:a.off?0:a.ins;dr(r,u,m,c),i&&m&&Lo(i,r,a.text)}else a.ins==-1?(dr(r,s.off?0:s.len,u,c),i&&Lo(i,r,s.textBit(u))):(dr(r,s.off?0:s.len,a.off?0:a.ins,c),i&&!a.off&&Lo(i,r,a.text));c=(s.ins>u||a.ins>=0&&a.len>u)&&(c||r.length>h),s.forward2(u),a.forward(u)}}}}class Su{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Vt.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Vt.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Oa{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Oa(r,i,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return ue.range(e,t,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ue.range(this.anchor,i,void 0,void 0,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(e.anchor,e.head)}static create(e,t,r){return new Oa(e,t,r)}}class ue{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ue.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(e,t=!0){return ue.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,ue.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(e.ranges.map(t=>Oa.fromJSON(t)),e.main)}static single(e,t=e){return new ue([ue.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return ue.normalized(e.slice(),t);r=s.to}return new ue(e,t)}static cursor(e,t=0,r,i){return Oa.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i,s){let a=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=t&&(s=t<e?1:-1),t<e?Oa.create(t,e,48|a):Oa.create(e,t,(s?s<0?8:16:0)|a)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],a=e[i-1];if(s.empty?s.from<=a.to:s.from<a.to){let c=a.from,u=Math.max(s.to,a.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?ue.range(u,c):ue.range(c,u))}}return new ue(e,t)}}function z3(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let sg=0;class Ye{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=sg++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ye(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:og),!!e.static,e.enables)}of(e){return new z1([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new z1(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new z1(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function og(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class z1{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=sg++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,a=e[s]>>1,c=this.type==2,u=!1,h=!1,m=[];for(let O of this.dependencies)O=="doc"?u=!0:O=="selection"?h=!0:(((t=e[O.id])!==null&&t!==void 0?t:1)&1)==0&&m.push(e[O.id]);return{create(O){return O.values[a]=r(O),1},update(O,x){if(u&&x.docChanged||h&&(x.docChanged||x.selection)||Im(O,m)){let v=r(O);if(c?!G4(v,O.values[a],i):!i(v,O.values[a]))return O.values[a]=v,1}return 0},reconfigure:(O,x)=>{let v,w=x.config.address[s];if(w!=null){let k=id(x,w);if(this.dependencies.every($=>$ instanceof Ye?x.facet($)===O.facet($):$ instanceof si?x.field($,!1)==O.field($,!1):!0)||(c?G4(v=r(O),k,i):i(v=r(O),k)))return O.values[a]=k,0}else v=r(O);return O.values[a]=v,1}}}}function G4(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function Im(n,e){let t=!1;for(let r of e)du(n,r)&1&&(t=!0);return t}function AA(n,e,t){let r=t.map(u=>n[u.id]),i=t.map(u=>u.type),s=r.filter(u=>!(u&1)),a=n[e.id]>>1;function c(u){let h=[];for(let m=0;m<r.length;m++){let O=id(u,r[m]);if(i[m]==2)for(let x of O)h.push(x);else h.push(O)}return e.combine(h)}return{create(u){for(let h of r)du(u,h);return u.values[a]=c(u),1},update(u,h){if(!Im(u,s))return 0;let m=c(u);return e.compare(m,u.values[a])?0:(u.values[a]=m,1)},reconfigure(u,h){let m=Im(u,r),O=h.config.facets[e.id],x=h.facet(e);if(O&&!m&&og(t,O))return u.values[a]=x,0;let v=c(u);return e.compare(v,x)?(u.values[a]=x,0):(u.values[a]=v,1)}}}const r1=Ye.define({static:!0});class si{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new si(sg++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(r1).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],a=this.updateF(s,i);return this.compareF(s,a)?0:(r.values[t]=a,1)},reconfigure:(r,i)=>{let s=r.facet(r1),a=i.facet(r1),c;return(c=s.find(u=>u.field==this))&&c!=a.find(u=>u.field==this)?(r.values[t]=c.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,r1.of({field:this,create:e})]}get extension(){return this}}const ga={lowest:4,low:3,default:2,high:1,highest:0};function Hc(n){return e=>new H3(e,n)}const Iu={highest:Hc(ga.highest),high:Hc(ga.high),default:Hc(ga.default),low:Hc(ga.low),lowest:Hc(ga.lowest)};class H3{constructor(e,t){this.inner=e,this.prec=t}}class Xd{of(e){return new Xm(this,e)}reconfigure(e){return Xd.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Xm{constructor(e,t){this.compartment=e,this.inner=t}}class rd{constructor(e,t,r,i,s,a){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),a=new Map;for(let x of $A(e,t,a))x instanceof si?i.push(x):(s[x.facet.id]||(s[x.facet.id]=[])).push(x);let c=Object.create(null),u=[],h=[];for(let x of i)c[x.id]=h.length<<1,h.push(v=>x.slot(v));let m=r==null?void 0:r.config.facets;for(let x in s){let v=s[x],w=v[0].facet,k=m&&m[x]||[];if(v.every($=>$.type==0))if(c[w.id]=u.length<<1|1,og(k,v))u.push(r.facet(w));else{let $=w.combine(v.map(M=>M.value));u.push(r&&w.compare($,r.facet(w))?r.facet(w):$)}else{for(let $ of v)$.type==0?(c[$.id]=u.length<<1|1,u.push($.value)):(c[$.id]=h.length<<1,h.push(M=>$.dynamicSlot(M)));c[w.id]=h.length<<1,h.push($=>AA($,w,v))}}let O=h.map(x=>x(c));return new rd(e,a,O,c,u,s)}}function $A(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(a,c){let u=i.get(a);if(u!=null){if(u<=c)return;let h=r[u].indexOf(a);h>-1&&r[u].splice(h,1),a instanceof Xm&&t.delete(a.compartment)}if(i.set(a,c),Array.isArray(a))for(let h of a)s(h,c);else if(a instanceof Xm){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(a.compartment)||a.inner;t.set(a.compartment,h),s(h,c)}else if(a instanceof H3)s(a.inner,a.prec);else if(a instanceof si)r[c].push(a),a.provides&&s(a.provides,c);else if(a instanceof z1)r[c].push(a),a.facet.extensions&&s(a.facet.extensions,ga.default);else{let h=a.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,c)}}return s(n,ga.default),r.reduce((a,c)=>a.concat(c))}function du(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function id(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const W3=Ye.define(),Fm=Ye.define({combine:n=>n.some(e=>e),static:!0}),B3=Ye.define({combine:n=>n.length?n[0]:void 0,static:!0}),Y3=Ye.define(),q3=Ye.define(),U3=Ye.define(),G3=Ye.define({combine:n=>n.length?n[0]:!1});class no{constructor(e,t){this.type=e,this.value=t}static define(){return new CA}}class CA{of(e){return new no(this,e)}}class EA{constructor(e){this.map=e}of(e){return new Ft(this,e)}}class Ft{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Ft(this.type,t)}is(e){return this.type==e}static define(e={}){return new EA(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}Ft.reconfigure=Ft.define();Ft.appendConfig=Ft.define();class Tn{constructor(e,t,r,i,s,a){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,r&&z3(r,t.newLength),s.some(c=>c.type==Tn.time)||(this.annotations=s.concat(Tn.time.of(Date.now())))}static create(e,t,r,i,s,a){return new Tn(e,t,r,i,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Tn.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Tn.time=no.define();Tn.userEvent=no.define();Tn.addToHistory=no.define();Tn.remote=no.define();function TA(n,e){let t=[];for(let r=0,i=0;;){let s,a;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],a=n[r++];else if(i<e.length)s=e[i++],a=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function K3(n,e,t){var r;let i,s,a;return t?(i=e.changes,s=Nn.empty(e.changes.length),a=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),a=n.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:Ft.mapEffects(n.effects,i).concat(Ft.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function zm(n,e,t){let r=e.selection,i=Zl(e.annotations);return e.userEvent&&(i=i.concat(Tn.userEvent.of(e.userEvent))),{changes:e.changes instanceof Nn?e.changes:Nn.of(e.changes||[],t,n.facet(B3)),selection:r&&(r instanceof ue?r:ue.single(r.anchor,r.head)),effects:Zl(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function J3(n,e,t){let r=zm(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let a=!!e[s].sequential;r=K3(r,zm(n,e[s],a?r.changes.newLength:n.doc.length),a)}let i=Tn.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return QA(t?MA(i):i)}function MA(n){let e=n.startState,t=!0;for(let i of e.facet(Y3)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:TA(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=Nn.empty(e.doc.length);else{let a=n.changes.filter(t);i=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}n=Tn.create(e,i,n.selection&&n.selection.map(s),Ft.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(q3);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof Tn?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Tn?n=s[0]:n=J3(e,Zl(s),!1)}return n}function QA(n){let e=n.startState,t=e.facet(U3),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=K3(r,zm(e,s,n.changes.newLength),!0))}return r==n?n:Tn.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const jA=[];function Zl(n){return n==null?jA:Array.isArray(n)?n:[n]}var an=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(an||(an={}));const ZA=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Hm;try{Hm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function RA(n){if(Hm)return Hm.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||ZA.test(t)))return!0}return!1}function NA(n){return e=>{if(!/\S/.test(e))return an.Space;if(RA(e))return an.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return an.Word;return an.Other}}class It{constructor(e,t,r,i,s,a){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)du(this,c<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return du(this,r),id(this,r)}update(...e){return J3(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let c of e.effects)c.is(Xd.reconfigure)?(t&&(i=new Map,t.compartments.forEach((u,h)=>i.set(h,u)),t=null),i.set(c.value.compartment,c.value.extension)):c.is(Ft.reconfigure)?(t=null,r=c.value):c.is(Ft.appendConfig)&&(t=null,r=Zl(r).concat(c.value));let s;t?s=e.startState.values.slice():(t=rd.resolve(r,i,this),s=new It(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let a=e.startState.facet(Fm)?e.newSelection:e.newSelection.asSingle();new It(t,e.newDoc,a,s,(c,u)=>u.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ue.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],a=Zl(r.effects);for(let c=1;c<t.ranges.length;c++){let u=e(t.ranges[c]),h=this.changes(u.changes),m=h.map(i);for(let x=0;x<c;x++)s[x]=s[x].map(m);let O=i.mapDesc(h,!0);s.push(u.range.map(O)),i=i.compose(m),a=Ft.mapEffects(a,m).concat(Ft.mapEffects(Zl(u.effects),O))}return{changes:i,selection:ue.create(s,t.mainIndex),effects:a}}changes(e=[]){return e instanceof Nn?e:Nn.of(e,this.doc.length,this.facet(It.lineSeparator))}toText(e){return Vt.of(e.split(this.facet(It.lineSeparator)||Vm))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(du(this,t),id(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof si&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let a=r[s],c=e[s];i.push(a.init(u=>a.spec.fromJSON(c,u)))}}return It.create({doc:e.doc,selection:ue.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=rd.resolve(e.extensions||[],new Map),r=e.doc instanceof Vt?e.doc:Vt.of((e.doc||"").split(t.staticFacet(It.lineSeparator)||Vm)),i=e.selection?e.selection instanceof ue?e.selection:ue.single(e.selection.anchor,e.selection.head):ue.single(0);return z3(i,r.length),t.staticFacet(Fm)||(i=i.asSingle()),new It(t,r,i,t.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(It.tabSize)}get lineBreak(){return this.facet(It.lineSeparator)||`
|
|
58
|
-
`}get readOnly(){return this.facet(G3)}phrase(e,...t){for(let r of this.facet(It.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(W3))for(let a of s(this,t,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return NA(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-r,c=e-r;for(;a>0;){let u=Bn(t,a,!1);if(s(t.slice(u,a))!=an.Word)break;a=u}for(;c<i;){let u=Bn(t,c);if(s(t.slice(c,u))!=an.Word)break;c=u}return a==c?null:ue.range(a+r,c+r)}}It.allowMultipleSelections=Fm;It.tabSize=Ye.define({combine:n=>n.length?n[0]:4});It.lineSeparator=B3;It.readOnly=G3;It.phrases=Ye.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});It.languageData=W3;It.changeFilter=Y3;It.transactionFilter=q3;It.transactionExtender=U3;Xd.reconfigure=Ft.define();function ec(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let a=i[s],c=r[s];if(c===void 0)r[s]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](c,a);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Do{eq(e){return this==e}range(e,t=e){return Wm.create(e,t,this)}}Do.prototype.startSide=Do.prototype.endSide=0;Do.prototype.point=!1;Do.prototype.mapMode=fr.TrackDel;function ag(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Wm=class ev{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new ev(e,t,r)}};function Bm(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class lg{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let a=i,c=s.length;;){if(a==c)return a;let u=a+c>>1,h=s[u]-e||(r?this.value[u].endSide:this.value[u].startSide)-t;if(u==a)return h>=0?a:c;h>=0?c=u:a=u+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),a=this.findIndex(r,1e9,!1,s);s<a;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],a=-1,c=-1;for(let u=0;u<this.value.length;u++){let h=this.value[u],m=this.from[u]+e,O=this.to[u]+e,x,v;if(m==O){let w=t.mapPos(m,h.startSide,h.mapMode);if(w==null||(x=v=w,h.startSide!=h.endSide&&(v=t.mapPos(m,h.endSide),v<x)))continue}else if(x=t.mapPos(m,h.startSide),v=t.mapPos(O,h.endSide),x>v||x==v&&h.startSide>0&&h.endSide<=0)continue;(v-x||h.endSide-h.startSide)<0||(a<0&&(a=x),h.point&&(c=Math.max(c,v-x)),r.push(h),i.push(x-a),s.push(v-a))}return{mapped:r.length?new lg(i,s,r,c):null,pos:a}}}class Mt{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Mt(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,a=e.filter;if(t.length==0&&!a)return this;if(r&&(t=t.slice().sort(Bm)),this.isEmpty)return t.length?Mt.of(t):this;let c=new tv(this,null,-1).goto(0),u=0,h=[],m=new Aa;for(;c.value||u<t.length;)if(u<t.length&&(c.from-t[u].from||c.startSide-t[u].value.startSide)>=0){let O=t[u++];m.addInner(O.from,O.to,O.value)||h.push(O)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(u==t.length||this.chunkEnd(c.chunkIndex)<t[u].from)&&(!a||i>this.chunkEnd(c.chunkIndex)||s<this.chunkPos[c.chunkIndex])&&m.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||i>c.to||s<c.from||a(c.from,c.to,c.value))&&(m.addInner(c.from,c.to,c.value)||h.push(Wm.create(c.from,c.to,c.value))),c.next());return m.finishInner(this.nextLayer.isEmpty&&!h.length?Mt.empty:this.nextLayer.update({add:h,filter:a,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let a=0;a<this.chunk.length;a++){let c=this.chunkPos[a],u=this.chunk[a],h=e.touchesRange(c,c+u.length);if(h===!1)i=Math.max(i,u.maxPoint),t.push(u),r.push(e.mapPos(c));else if(h===!0){let{mapped:m,pos:O}=u.map(c,e);m&&(i=Math.max(i,m.maxPoint),t.push(m),r.push(O))}}let s=this.nextLayer.map(e);return t.length==0?s:new Mt(r,t,s||Mt.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],a=this.chunk[i];if(t>=s&&e<=s+a.length&&a.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return ku.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ku.from(e).goto(t)}static compare(e,t,r,i,s=-1){let a=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),c=t.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),u=K4(a,c,r),h=new Wc(a,u,s),m=new Wc(c,u,s);r.iterGaps((O,x,v)=>J4(h,O,m,x,v,i)),r.empty&&r.length==0&&J4(h,0,m,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(m=>!m.isEmpty&&t.indexOf(m)<0),a=t.filter(m=>!m.isEmpty&&e.indexOf(m)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let c=K4(s,a),u=new Wc(s,c,0).goto(r),h=new Wc(a,c,0).goto(r);for(;;){if(u.to!=h.to||!Ym(u.active,h.active)||u.point&&(!h.point||!ag(u.point,h.point)))return!1;if(u.to>i)return!0;u.next(),h.next()}}static spans(e,t,r,i,s=-1){let a=new Wc(e,null,s).goto(t),c=t,u=a.openStart;for(;;){let h=Math.min(a.to,r);if(a.point){let m=a.activeForPoint(a.to),O=a.pointFrom<t?m.length+1:a.point.startSide<0?m.length:Math.min(m.length,u);i.point(c,h,a.point,m,O,a.pointRank),u=Math.min(a.openEnd(h),m.length)}else h>c&&(i.span(c,h,a.active,u),u=a.openEnd(h));if(a.to>r)return u+(a.point&&a.to>r?1:0);c=a.to,a.next()}}static of(e,t=!1){let r=new Aa;for(let i of e instanceof Wm?[e]:t?LA(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Mt.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Mt.empty;i=i.nextLayer)t=new Mt(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Mt.empty=new Mt([],[],null,-1);function LA(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(Bm(e,r)>0)return n.slice().sort(Bm);e=r}return n}Mt.empty.nextLayer=Mt.empty;class Aa{finishChunk(e){this.chunks.push(new lg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Aa)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Mt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Mt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function K4(n,e,t){let r=new Map;for(let s of n)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&r.set(s.chunk[a],s.chunkPos[a]);let i=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let c=r.get(s.chunk[a]);c!=null&&(t?t.mapPos(c):c)==s.chunkPos[a]&&!(t!=null&&t.touchesRange(c,c+s.chunk[a].length))&&i.add(s.chunk[a])}return i}class tv{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class ku{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new tv(a,t,r,s));return i.length==1?i[0]:new ku(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)gp(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)gp(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),gp(this.heap,0)}}}function gp(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Wc{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ku.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){i1(this.active,e),i1(this.activeTo,e),i1(this.activeRank,e),this.minActive=e6(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;s1(this.active,t,r),s1(this.activeTo,t,i),s1(this.activeRank,t,s),e&&s1(e,t,this.cursor.from),this.minActive=e6(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&i1(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function J4(n,e,t,r,i,s){n.goto(e),t.goto(r);let a=r+i,c=r,u=r-e,h=!!s.boundChange;for(let m=!1;;){let O=n.to+u-t.to,x=O||n.endSide-t.endSide,v=x<0?n.to+u:t.to,w=Math.min(v,a);if(n.point||t.point?(n.point&&t.point&&ag(n.point,t.point)&&Ym(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(c,w,n.point,t.point),m=!1):(m&&s.boundChange(c),w>c&&!Ym(n.active,t.active)&&s.compareRange(c,w,n.active,t.active),h&&w<a&&(O||n.openEnd(v)!=t.openEnd(v))&&(m=!0)),v>a)break;c=v,x<=0&&n.next(),x>=0&&t.next()}}function Ym(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!ag(n[t],e[t]))return!1;return!0}function i1(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function s1(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function e6(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function Fd(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Bn(n,i));return r}function VA(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Bn(n,i)}return n.length}const qm="ͼ",t6=typeof Symbol>"u"?"__"+qm:Symbol.for(qm),Um=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),n6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Io{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,c,u,h){let m=[],O=/^@(\w+)\b/.exec(a[0]),x=O&&O[1]=="keyframes";if(O&&c==null)return u.push(a[0]+";");for(let v in c){let w=c[v];if(/&/.test(v))s(v.split(/,\s*/).map(k=>a.map($=>k.replace(/&/,$))).reduce((k,$)=>k.concat($)),w,u);else if(w&&typeof w=="object"){if(!O)throw new RangeError("The value of a property ("+v+") should be a primitive value.");s(i(v),w,m,x)}else w!=null&&m.push(v.replace(/_.*/,"").replace(/[A-Z]/g,k=>"-"+k.toLowerCase())+": "+w+";")}(m.length||x)&&u.push((r&&!O&&!h?a.map(r):a).join(", ")+" {"+m.join(" ")+"}")}for(let a in e)s(i(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
59
|
-
`)}static newName(){let e=n6[t6]||1;return n6[t6]=e+1,qm+e.toString(36)}static mount(e,t,r){let i=e[Um],s=r&&r.nonce;i?s&&i.setNonce(s):i=new _A(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let r6=new Map;class _A{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=r6.get(r);if(s)return e[Um]=s;this.sheet=new i.CSSStyleSheet,r6.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Um]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let a=0;a<e.length;a++){let c=e[a],u=this.modules.indexOf(c);if(u<s&&u>-1&&(this.modules.splice(u,1),s--,u=-1),u==-1){if(this.modules.splice(s++,0,c),r)for(let h=0;h<c.rules.length;h++)r.insertRule(c.rules[h],i++)}else{for(;s<u;)i+=this.modules[s++].rules.length;i+=c.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let u=0;u<this.modules.length;u++)a+=this.modules[u].getRules()+`
|
|
60
|
-
`;this.styleTag.textContent=a;let c=t.head||t;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Xo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Pu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},DA=typeof navigator<"u"&&/Mac/.test(navigator.platform),IA=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var er=0;er<10;er++)Xo[48+er]=Xo[96+er]=String(er);for(var er=1;er<=24;er++)Xo[er+111]="F"+er;for(var er=65;er<=90;er++)Xo[er]=String.fromCharCode(er+32),Pu[er]=String.fromCharCode(er);for(var Op in Xo)Pu.hasOwnProperty(Op)||(Pu[Op]=Xo[Op]);function XA(n){var e=DA&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||IA&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Pu:Xo)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Wn(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)nv(n,arguments[e]);return n}function nv(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)nv(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let Ar=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Gm=typeof document<"u"?document:{documentElement:{style:{}}};const Km=/Edge\/(\d+)/.exec(Ar.userAgent),rv=/MSIE \d/.test(Ar.userAgent),Jm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ar.userAgent),zd=!!(rv||Jm||Km),i6=!zd&&/gecko\/(\d+)/i.test(Ar.userAgent),xp=!zd&&/Chrome\/(\d+)/.exec(Ar.userAgent),FA="webkitFontSmoothing"in Gm.documentElement.style,e2=!zd&&/Apple Computer/.test(Ar.vendor),s6=e2&&(/Mobile\/\w+/.test(Ar.userAgent)||Ar.maxTouchPoints>2);var Xe={mac:s6||/Mac/.test(Ar.platform),windows:/Win/.test(Ar.platform),linux:/Linux|X11/.test(Ar.platform),ie:zd,ie_version:rv?Gm.documentMode||6:Jm?+Jm[1]:Km?+Km[1]:0,gecko:i6,gecko_version:i6?+(/Firefox\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,chrome:!!xp,chrome_version:xp?+xp[1]:0,ios:s6,android:/Android\b/.test(Ar.userAgent),webkit_version:FA?+(/\bAppleWebKit\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,safari:e2,safari_version:e2?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ar.userAgent)||[0,0])[1]:0,tabSize:Gm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function cg(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const sd=Object.create(null);function ug(n,e,t){if(n==e)return!0;n||(n=sd),e||(e=sd);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function zA(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function o6(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function HA(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class La{eq(e){return!1}updateDOM(e,t,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var zr=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(zr||(zr={}));class Ot extends Do{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Xu(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new $a(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:a}=iv(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(a?t?2e8:1:-6e8)+1}return new $a(e,r,i,t,e.widget||null,!0)}static line(e){return new Fu(e)}static set(e,t=!1){return Mt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ot.none=Mt.empty;class Xu extends Ot{constructor(e){let{start:t,end:r}=iv(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?cg(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||sd}eq(e){return this==e||e instanceof Xu&&this.tagName==e.tagName&&ug(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Xu.prototype.point=!1;class Fu extends Ot{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Fu&&this.spec.class==e.spec.class&&ug(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Fu.prototype.mapMode=fr.TrackBefore;Fu.prototype.point=!0;class $a extends Ot{constructor(e,t,r,i,s,a){super(t,r,s,e),this.block=i,this.isReplace=a,this.mapMode=i?t<=0?fr.TrackBefore:fr.TrackAfter:fr.TrackDel}get type(){return this.startSide!=this.endSide?zr.WidgetRange:this.startSide<=0?zr.WidgetBefore:zr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof $a&&WA(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}$a.prototype.point=!0;function iv(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function WA(n,e){return n==e||!!(n&&e&&n.compare(e))}function Rl(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Au extends Do{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Au&&this.tagName==e.tagName&&ug(this.attributes,e.attributes)}static create(e){return new Au(e.tagName,e.attributes||sd)}static set(e,t=!1){return Mt.of(e,t)}}Au.prototype.startSide=Au.prototype.endSide=-1;function $u(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function t2(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function fu(n,e){if(!e.anchorNode)return!1;try{return t2(n,e.anchorNode)}catch{return!1}}function H1(n){return n.nodeType==3?Cu(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function hu(n,e,t,r){return t?a6(n,e,t,r,-1)||a6(n,e,t,r,1):!1}function Fo(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function od(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function a6(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Ks(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Fo(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?Ks(n):0}else return!1}}function Ks(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ad(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function BA(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function sv(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function YA(n,e,t,r,i,s,a,c){let u=n.ownerDocument,h=u.defaultView||window;for(let m=n,O=!1;m&&!O;)if(m.nodeType==1){let x,v=m==u.body,w=1,k=1;if(v)x=BA(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(m).position)&&(O=!0),m.scrollHeight<=m.clientHeight&&m.scrollWidth<=m.clientWidth){m=m.assignedSlot||m.parentNode;continue}let V=m.getBoundingClientRect();({scaleX:w,scaleY:k}=sv(m,V)),x={left:V.left,right:V.left+m.clientWidth*w,top:V.top,bottom:V.top+m.clientHeight*k}}let $=0,M=0;if(i=="nearest")e.top<x.top?(M=e.top-(x.top+a),t>0&&e.bottom>x.bottom+M&&(M=e.bottom-x.bottom+a)):e.bottom>x.bottom&&(M=e.bottom-x.bottom+a,t<0&&e.top-M<x.top&&(M=e.top-(x.top+a)));else{let V=e.bottom-e.top,A=x.bottom-x.top;M=(i=="center"&&V<=A?e.top+V/2-A/2:i=="start"||i=="center"&&t<0?e.top-a:e.bottom-A+a)-x.top}if(r=="nearest"?e.left<x.left?($=e.left-(x.left+s),t>0&&e.right>x.right+$&&($=e.right-x.right+s)):e.right>x.right&&($=e.right-x.right+s,t<0&&e.left<x.left+$&&($=e.left-(x.left+s))):$=(r=="center"?e.left+(e.right-e.left)/2-(x.right-x.left)/2:r=="start"==c?e.left-s:e.right-(x.right-x.left)+s)-x.left,$||M)if(v)h.scrollBy($,M);else{let V=0,A=0;if(M){let Q=m.scrollTop;m.scrollTop+=M/k,A=(m.scrollTop-Q)*k}if($){let Q=m.scrollLeft;m.scrollLeft+=$/w,V=(m.scrollLeft-Q)*w}e={left:e.left-V,top:e.top-A,right:e.right-V,bottom:e.bottom-A},V&&Math.abs(V-$)<1&&(r="nearest"),A&&Math.abs(A-M)<1&&(i="nearest")}if(v)break;(e.top<x.top||e.bottom>x.bottom||e.left<x.left||e.right>x.right)&&(e={left:Math.max(e.left,x.left),right:Math.min(e.right,x.right),top:Math.max(e.top,x.top),bottom:Math.min(e.bottom,x.bottom)}),m=m.assignedSlot||m.parentNode}else if(m.nodeType==11)m=m.host;else break}function ov(n,e=!0){let t=n.ownerDocument,r=null,i=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class qA{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?Ks(t):0),r,Math.min(e.focusOffset,r?Ks(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let ma=null;Xe.safari&&Xe.safari_version>=26&&(ma=!1);function av(n){if(n.setActive)return n.setActive();if(ma)return n.focus(ma);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(ma==null?{get preventScroll(){return ma={preventScroll:!0},!0}}:void 0),!ma){ma=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let l6;function Cu(n,e,t=e){let r=l6||(l6=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function Nl(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,n.dispatchEvent(a),s.defaultPrevented||a.defaultPrevented}function UA(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function GA(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ks(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=Ks(t))}else{if(t==n)return!0;r=Fo(t),t=t.parentNode}}function lv(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function cv(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=Ks(t)}else if(t.parentNode&&!od(t))r=Fo(t),t=t.parentNode;else return null}}function uv(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!od(t))r=Fo(t)+1,t=t.parentNode;else return null}}class Vi{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new Vi(e.parentNode,Fo(e),t)}static after(e,t){return new Vi(e.parentNode,Fo(e)+1,t)}}var Pn=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(Pn||(Pn={}));const Ca=Pn.LTR,dg=Pn.RTL;function dv(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const KA=dv("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),JA=dv("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),n2=Object.create(null),ls=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);n2[e]=t,n2[t]=-e}function fv(n){return n<=247?KA[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?JA[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const e$=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class gs{get dir(){return this.level%2?dg:Ca}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let a=0;a<e.length;a++){let c=e[a];if(c.from<=t&&c.to>=t){if(c.level==r)return a;(s<0||(i!=0?i<0?c.from<t:c.to>t:e[s].level>c.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function hv(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!hv(r.inner,i.inner))return!1}return!0}const Gt=[];function t$(n,e,t,r,i){for(let s=0;s<=r.length;s++){let a=s?r[s-1].to:e,c=s<r.length?r[s].from:t,u=s?256:i;for(let h=a,m=u,O=u;h<c;h++){let x=fv(n.charCodeAt(h));x==512?x=m:x==8&&O==4&&(x=16),Gt[h]=x==4?2:x,x&7&&(O=x),m=x}for(let h=a,m=u,O=u;h<c;h++){let x=Gt[h];if(x==128)h<c-1&&m==Gt[h+1]&&m&24?x=Gt[h]=m:Gt[h]=256;else if(x==64){let v=h+1;for(;v<c&&Gt[v]==64;)v++;let w=h&&m==8||v<t&&Gt[v]==8?O==1?1:8:256;for(let k=h;k<v;k++)Gt[k]=w;h=v-1}else x==8&&O==1&&(Gt[h]=1);m=x,x&7&&(O=x)}}}function n$(n,e,t,r,i){let s=i==1?2:1;for(let a=0,c=0,u=0;a<=r.length;a++){let h=a?r[a-1].to:e,m=a<r.length?r[a].from:t;for(let O=h,x,v,w;O<m;O++)if(v=n2[x=n.charCodeAt(O)])if(v<0){for(let k=c-3;k>=0;k-=3)if(ls[k+1]==-v){let $=ls[k+2],M=$&2?i:$&4?$&1?s:i:0;M&&(Gt[O]=Gt[ls[k]]=M),c=k;break}}else{if(ls.length==189)break;ls[c++]=O,ls[c++]=x,ls[c++]=u}else if((w=Gt[O])==2||w==1){let k=w==i;u=k?0:1;for(let $=c-3;$>=0;$-=3){let M=ls[$+2];if(M&2)break;if(k)ls[$+2]|=2;else{if(M&4)break;ls[$+2]|=4}}}}}function r$(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let a=i?t[i-1].to:n,c=i<t.length?t[i].from:e;for(let u=a;u<c;){let h=Gt[u];if(h==256){let m=u+1;for(;;)if(m==c){if(i==t.length)break;m=t[i++].to,c=i<t.length?t[i].from:e}else if(Gt[m]==256)m++;else break;let O=s==1,x=(m<e?Gt[m]:r)==1,v=O==x?O?1:2:r;for(let w=m,k=i,$=k?t[k-1].to:n;w>u;)w==$&&(w=t[--k].from,$=k?t[k-1].to:n),Gt[--w]=v;u=m}else s=h,u++}}}function r2(n,e,t,r,i,s,a){let c=r%2?2:1;if(r%2==i%2)for(let u=e,h=0;u<t;){let m=!0,O=!1;if(h==s.length||u<s[h].from){let k=Gt[u];k!=c&&(m=!1,O=k==16)}let x=!m&&c==1?[]:null,v=m?r:r+1,w=u;e:for(;;)if(h<s.length&&w==s[h].from){if(O)break e;let k=s[h];if(!m)for(let $=k.to,M=h+1;;){if($==t)break e;if(M<s.length&&s[M].from==$)$=s[M++].to;else{if(Gt[$]==c)break e;break}}if(h++,x)x.push(k);else{k.from>u&&a.push(new gs(u,k.from,v));let $=k.direction==Ca!=!(v%2);i2(n,$?r+1:r,i,k.inner,k.from,k.to,a),u=k.to}w=k.to}else{if(w==t||(m?Gt[w]!=c:Gt[w]==c))break;w++}x?r2(n,u,w,r+1,i,x,a):u<w&&a.push(new gs(u,w,v)),u=w}else for(let u=t,h=s.length;u>e;){let m=!0,O=!1;if(!h||u>s[h-1].to){let k=Gt[u-1];k!=c&&(m=!1,O=k==16)}let x=!m&&c==1?[]:null,v=m?r:r+1,w=u;e:for(;;)if(h&&w==s[h-1].to){if(O)break e;let k=s[--h];if(!m)for(let $=k.from,M=h;;){if($==e)break e;if(M&&s[M-1].to==$)$=s[--M].from;else{if(Gt[$-1]==c)break e;break}}if(x)x.push(k);else{k.to<u&&a.push(new gs(k.to,u,v));let $=k.direction==Ca!=!(v%2);i2(n,$?r+1:r,i,k.inner,k.from,k.to,a),u=k.from}w=k.from}else{if(w==e||(m?Gt[w-1]!=c:Gt[w-1]==c))break;w--}x?r2(n,w,u,r+1,i,x,a):w<u&&a.push(new gs(w,u,v)),u=w}}function i2(n,e,t,r,i,s,a){let c=e%2?2:1;t$(n,i,s,r,c),n$(n,i,s,r,c),r$(i,s,r,c),r2(n,i,s,e,t,r,a)}function i$(n,e,t){if(!n)return[new gs(0,0,e==dg?1:0)];if(e==Ca&&!t.length&&!e$.test(n))return pv(n.length);if(t.length)for(;n.length>Gt.length;)Gt[Gt.length]=256;let r=[],i=e==Ca?0:1;return i2(n,i,i,t,0,n.length,r),r}function pv(n){return[new gs(0,n,0)]}let mv="";function s$(n,e,t,r,i){var s;let a=r.head-n.from,c=gs.find(e,a,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),u=e[c],h=u.side(i,t);if(a==h){let x=c+=i?1:-1;if(x<0||x>=e.length)return null;u=e[c=x],a=u.side(!i,t),h=u.side(i,t)}let m=Bn(n.text,a,u.forward(i,t));(m<u.from||m>u.to)&&(m=h),mv=n.text.slice(Math.min(a,m),Math.max(a,m));let O=c==(i?e.length-1:0)?null:e[c+(i?1:-1)];return O&&m==h&&O.level+(i?0:1)<u.level?ue.cursor(O.side(!i,t)+n.from,O.forward(i,t)?1:-1,O.level):ue.cursor(m+n.from,u.forward(i,t)?-1:1,u.level)}function o$(n,e,t){for(let r=e;r<t;r++){let i=fv(n.charCodeAt(r));if(i==1)return Ca;if(i==2||i==4)return dg}return Ca}const gv=Ye.define(),Ov=Ye.define(),xv=Ye.define(),yv=Ye.define(),s2=Ye.define(),vv=Ye.define(),bv=Ye.define(),fg=Ye.define(),hg=Ye.define(),wv=Ye.define({combine:n=>n.some(e=>e)}),a$=Ye.define({combine:n=>n.some(e=>e)}),Sv=Ye.define();class Ll{constructor(e,t="nearest",r="nearest",i=5,s=5,a=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Ll(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ll(ue.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const o1=Ft.define({map:(n,e)=>n.map(e)}),kv=Ft.define();function Os(n,e,t){let r=n.facet(yv);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Bs=Ye.define({combine:n=>n.length?n[0]:!0});let l$=0;const Pl=Ye.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class Hr{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Pl.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Pl.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:a}=t||{};return new Hr(l$++,e,r,i,c=>{let u=[];return a&&u.push(Hd.of(h=>{let m=h.plugin(c);return m?a(m):Ot.none})),s&&u.push(s(c)),u})}static fromClass(e,t){return Hr.define((r,i)=>new e(r,i),t)}}class yp{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(Os(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Os(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){Os(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Pv=Ye.define(),pg=Ye.define(),Hd=Ye.define(),Av=Ye.define(),mg=Ye.define(),zu=Ye.define(),$v=Ye.define();function c6(n,e){let t=n.state.facet($v);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Mt.spans(r,e.from,e.to,{point(){},span(s,a,c,u){let h=s-e.from,m=a-e.from,O=i;for(let x=c.length-1;x>=0;x--,u--){let v=c[x].spec.bidiIsolate,w;if(v==null&&(v=o$(e.text,h,m)),u>0&&O.length&&(w=O[O.length-1]).to==h&&w.direction==v)w.to=m,O=w.inner;else{let k={from:h,to:m,direction:v,inner:[]};O.push(k),O=k.inner}}}}),i}const Cv=Ye.define();function Ev(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(Cv)){let a=s(n);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:t,top:r,bottom:i}}const nu=Ye.define();class vi{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new vi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,a=0;;){let c=i<e.length?e[i].fromB:1e9,u=s<t.length?t[s]:1e9,h=Math.min(c,u);if(h==1e9)break;let m=h+a,O=h,x=m;for(;;)if(s<t.length&&t[s]<=O){let v=t[s+1];s+=2,O=Math.max(O,v);for(let w=i;w<e.length&&e[w].fromB<=O;w++)a=e[w].toA-e[w].toB;x=Math.max(x,v+a)}else if(i<e.length&&e[i].fromB<=O){let v=e[i++];O=Math.max(O,v.toB),x=Math.max(x,v.toA),a=v.toA-v.toB}else break;r.push(new vi(m,x,h,O))}return r}}class ld{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Nn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,a,c,u)=>i.push(new vi(s,a,c,u))),this.changedRanges=i}static create(e,t,r){return new ld(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const c$=[];class xn{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return c$}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&zA(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=Fo(this.dom),i=this.length?e>0:t>0;return new Vi(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Bd)return e;return null}static get(e){return e.cmTile}}class Wd extends xn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=(e==null?void 0:e.node)==t?e:null,a=0;for(let c of this.children){if(c.sync(e),a+=c.length+c.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=c.dom&&(s.written=!0),c.dom.parentNode==t)for(;i&&i!=c.dom;)i=u6(i);else t.insertBefore(c.dom,i);r=c.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=u6(i);this.length=a}}function u6(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Bd extends Wd{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=xn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let a=r.children[i++];if(a instanceof qs)t.push(i),r=a,i=0;else{let c=s+a.length,u=e(a,s);if(u!==void 0)return u;s=c+a.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,a=-1;if(this.blockTiles((c,u)=>{let h=u+c.length;if(e>=u&&e<=h){if(c.isWidget()&&t>=-1&&t<=1){if(c.flags&32)return!0;c.flags&16&&(r=void 0)}(u<e||e==h&&(t<-1?c.length:c.covers(1)))&&(!r||!c.isWidget()&&r.isWidget())&&(r=c,i=e-u),(h>e||e==u&&(t>1?c.length:c.covers(-1)))&&(!s||!c.isWidget()&&s.isWidget())&&(s=c,a=e-u)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:a}}}class qs extends Wd{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new qs(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Xl extends Wd{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Xl(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,a=null,c=-1;function u(m,O){for(let x=0,v=0;x<m.children.length&&v<=O;x++){let w=m.children[x],k=v+w.length;k>=O&&(w.isComposite()?u(w,O-v):(!a||a.isHidden&&(t>0||r&&d$(a,w)))&&(k>O||w.flags&32)?(a=w,c=O-v):(v<O||w.flags&16&&!w.isHidden)&&(i=w,s=O-v)),v=k}}u(this,e);let h=(t<0?i:a)||i||a;return h?{tile:h,offset:h==i?s:c}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):u$(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Vi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let a=r.tile.parent,c=!1;for(let u of a.children){if(c)return new Vi(u.dom,0);u==r.tile&&(c=!0)}}return new Vi(this.dom,0)}}function u$(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=H1(e);return t[t.length-1]||null}function d$(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class Xr extends Wd{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new Xr(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class xa extends xn{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,a=0;e==0&&t<0||e==r&&t>=0?Xe.chrome||Xe.gecko||(e?(i--,a=1):s<r&&(s++,a=-1)):t<0?i--:s<r&&s++;let c=Cu(this.dom,i,s).getClientRects();if(!c.length)return null;let u=c[(a?a<0:t>=0)?0:c.length-1];return Xe.safari&&!a&&u.width==0&&(u=Array.prototype.find.call(c,h=>h.width)||u),a?ad(u,a<0):u||null}static of(e,t){let r=new xa(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Ea extends xn{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return ad(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),a=null;if(!s.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=c?s.length-1:0;a=s[u],!(e>0?u==0:u==s.length-1||a.top<a.bottom);u+=c?-1:1);return ad(a,!c)}}get overrideDOMText(){if(!this.length)return Vt.empty;let{root:e}=this;if(!e)return Vt.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Ea(s,r,e,i)}}class cd extends xn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Vt.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class f${constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:a,parents:c}=this;for(;e||t>0;)if(i.isComposite())if(a){if(!e)break;r&&r.break(),e--,a=!1}else if(s==i.children.length){if(!e&&!c.length)break;r&&r.leave(i),a=!!i.breakAfter,{tile:i,index:s}=c.pop(),s++}else{let u=i.children[s],h=u.breakAfter;(t>0?u.length<=e:u.length<e)&&(!r||r.skip(u,0,u.length)!==!1||!u.isComposite)?(a=!!h,s++,e-=u.length):(c.push({tile:i,index:s}),i=u,s=0,r&&u.isComposite()&&r.enter(u))}else if(s==i.length)a=!!i.breakAfter,{tile:i,index:s}=c.pop(),s++;else if(e){let u=Math.min(e,i.length-s);r&&r.skip(i,s,s+u),e-=u,s+=u}else break;return this.tile=i,this.index=s,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class h${constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class p${constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let a=this.ensureMarks(t,r),c=a.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let u=a.children[a.children.length-1]=new xa(c.dom,c.text+e);u.parent=a}else a.append(i||xa.of(e,(s=this.cache.find(xa))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?vp(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let c=t.marks.length-1;c>=0;c--){let u=t.marks[c],h=i.lastChild;if(h instanceof Xr&&h.mark.eq(u.mark))h.dom!=u.dom&&h.setDOM(vp(u.dom)),i=h;else{if(this.cache.reused.get(u)){let O=xn.get(u.dom);O&&O.setDOM(vp(u.dom))}let m=Xr.of(u.mark,u.dom);i.append(m),i=m}this.cache.reused.set(u,2)}let s=xn.get(e.text);s&&this.cache.reused.set(s,2);let a=new xa(e.text,e.text.nodeValue);a.flags|=8,i.append(a)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=Tv);let i=Xl.start(e,t||((r=this.cache.find(Xl))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let a=e[s],c;if(t>0&&(c=i.lastChild)&&c instanceof Xr&&c.mark.eq(a))i=c,t--;else{let u=Xr.of(a,(r=this.cache.find(Xr,h=>h.mark.eq(a)))===null||r===void 0?void 0:r.dom);i.append(u),i=u,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!d6(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Xe.ios&&d6(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(bp,0,32)||new Ea(bp.toDOM(),0,bp,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new h$(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof qs&&i.wrapper.eq(r.wrapper))t=i;else{let s=qs.of(r.wrapper,(e=this.cache.find(qs,a=>a.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(cd,void 0,1);return r&&(r.flags=t),r||new cd(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class m${constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=i;let c=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,c)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const ud=[Ea,Xl,xa,Xr,cd,qs,Bd];for(let n=0;n<ud.length;n++)ud[n].bucket=n;class g${constructor(e){this.view=e,this.buckets=ud.map(()=>[]),this.index=ud.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],a=this.index[i];for(let c=s.length-1;c>=0;c--){let u=(c+a)%s.length,h=s[u];if((!t||t(h))&&!this.reused.has(h))return s.splice(u,1),u<a&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,a=0;;s++){if(s==i.length){if(a)return null;a=1,s=0}let c=i[s];if(!this.reused.has(c)&&(a==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view,c.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,c.widget==e&&c.length==t&&(c.flags&497)==r?(this.reused.set(c,1),c):(this.reused.set(c,2),new Ea(c.dom,t,e,c.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class O${constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new g$(e),this.text=new m$(e.state.doc),this.builder=new p$(this.cache,new Bd(e,e.contentDOM),Mt.iter(r)),this.cache.reused.set(t,2),this.old=new f$(t),this.reuseWalker={skip:(a,c,u)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,a=0;;){let c=a<e.length?e[a++]:null,u=c?c.fromA:this.old.root.length;if(u>i){let h=u-i;this.preserve(h,!a,!c),i=u,s+=h}if(!c)break;t&&c.fromA<=t.range.fromA&&c.toA>=t.range.toA?(this.forward(c.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,c.toA),this.emit(t.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(s,c.toB)),s=c.toB,i=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=v$(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(a,c,u)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(u-c);else{let h=u>0||c<a.length?Ea.of(a.widget,this.view,u-c,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(a.isText())this.builder.ensureLine(null),!c&&u==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,i,s,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(c,u),i,s)),s=i.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof cd)this.cache.add(a);else if(a instanceof Xr)this.builder.ensureLine(null),this.builder.addMark(a,i,s),this.cache.reused.set(a,1),s=i.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof Xr&&i.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?i.length&&(i.length=s=0):a instanceof Xr&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,a=Mt.spans(this.decorations,e,t,{point:(c,u,h,m,O,x)=>{if(h instanceof $a){if(this.disallowBlockEffectsFor[x]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=m.length,O>m.length)i.continueWidget(u-c);else{let v=h.widget||(h.block?Fl.block:Fl.inline),w=x$(h),k=this.cache.findWidget(v,u-c,w)||Ea.of(v,this.view,u-c,w);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(k)):(i.ensureLine(r),i.addInlineWidget(k,m,O))}r=null}else r=y$(r,h);u>c&&this.text.skip(u-c)},span:(c,u,h,m)=>{for(let O=c;O<u;){let x=this.text.next(Math.min(512,u-O));x==null?(i.addLineStartIfNotCovered(r),i.addBreak(),O++):(i.ensureLine(r),i.addText(x,h,O==c?m:h.length),O+=x.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=a>s,this.openMarks=a}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=xn.get(i);if(i==this.view.contentDOM)break;s instanceof Xr?t.push(s):s!=null&&s.isLine()?r=s:s instanceof qs||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Xl(i,Tv):r||t.push(Xr.of(new Xu({tagName:i.nodeName.toLowerCase(),attributes:HA(i)}),i)))}return{line:r,marks:t}}}function d6(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function x$(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const Tv={class:"cm-line"};function y$(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&cg(t,n),r&&(n.class+=" "+r)),n}function v$(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof Xr&&e.push(r.mark)}return e}function vp(n){let e=xn.get(n);return e&&e.setDOM(n.cloneNode()),n}class Fl extends La{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Fl.inline=new Fl("span");Fl.block=new Fl("div");const bp=new class extends La{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class f6{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Ot.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Bd(e,e.contentDOM),this.updateInner([new vi(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:m,toA:O})=>O<this.minWidthFrom||m>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!E$(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?w$(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:m,to:O}=this.hasComposition;r=new vi(m,O,e.changes.mapPos(m,-1),e.changes.mapPos(O,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Xe.ie||Xe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.blockWrappers;this.updateDeco();let u=P$(a,this.decorations,e.changes);u.length&&(r=vi.extendWithRanges(r,u));let h=$$(c,this.blockWrappers,e.changes);return h.length&&(r=vi.extendWithRanges(r,h)),s&&!r.some(m=>m.fromA<=s.range.fromA&&m.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let a=this.tile,c=new O$(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&xn.get(t.text)&&c.cache.reused.set(xn.get(t.text),2),this.tile=c.run(e,t),o2(a,c.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Xe.chrome||Xe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof wp&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(kv)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,a=!s&&!(this.view.state.facet(Bs)||r.tabIndex>-1)&&fu(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||a))return;let c=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,h,m;if(u.empty?m=h=this.inlineDOMNearPos(u.anchor,u.assoc||1):(m=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),h=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),Xe.gecko&&u.empty&&!this.hasComposition&&b$(h)){let x=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(x,h.node.childNodes[h.offset]||null)),h=m=new Vi(x,0),c=!0}let O=this.view.observer.selectionRange;(c||!O.focusNode||(!hu(h.node,h.offset,O.anchorNode,O.anchorOffset)||!hu(m.node,m.offset,O.focusNode,O.focusOffset))&&!this.suppressWidgetCursorChange(O,u))&&(this.view.observer.ignore(()=>{Xe.android&&Xe.chrome&&r.contains(O.focusNode)&&C$(O.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let x=$u(this.view.root);if(x)if(u.empty){if(Xe.gecko){let v=S$(h.node,h.offset);if(v&&v!=3){let w=(v==1?cv:uv)(h.node,h.offset);w&&(h=new Vi(w.node,w.offset))}}x.collapse(h.node,h.offset),u.bidiLevel!=null&&x.caretBidiLevel!==void 0&&(x.caretBidiLevel=u.bidiLevel)}else if(x.extend){x.collapse(h.node,h.offset);try{x.extend(m.node,m.offset)}catch{}}else{let v=document.createRange();u.anchor>u.head&&([h,m]=[m,h]),v.setEnd(m.node,m.offset),v.setStart(h.node,h.offset),x.removeAllRanges(),x.addRange(v)}a&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,m)),this.impreciseAnchor=h.precise?null:new Vi(O.anchorNode,O.anchorOffset),this.impreciseHead=m.precise?null:new Vi(O.focusNode,O.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&hu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=$u(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let c=a.posAtStart;if(t.head==c||t.head==c+a.length)return;let u=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!u||!h||u.bottom>h.top)return;let m=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(m.node,m.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let a=Ks(e)==0?0:t==0?-1:1;for(;;){let c=e.parentNode;if(c==r.dom)break;a==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?a=-1:a=1),e=c}a<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!xn.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let a=0,c=i;;a++){let u=r.children[a];if(u.dom==s)return c;c+=u.length+u.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,a,c=-1,u=!1;return this.tile.blockTiles((h,m)=>{if(h.isWidget()){if(h.flags&32&&m>=e)return!0;h.flags&16&&(s=!0)}else{let O=m+h.length;if(m<=e&&(r=h,i=e-m,s=O<e),O>=e&&!a&&(a=h,c=e-m,u=m>e),m>e&&a)return!0}}),!r&&!a?this.domAtPos(e,t):(s&&a?r=null:u&&r&&(a=null),r&&t<0||!a?r.domIn(i,t):a.domIn(c,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof wp?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,a){if(s.isComposite())for(let c of s.children){if(c.length>=a){let u=i(c,a);if(u)return u}if(a-=c.length,a<0)break}else if(s.isText()&&a<s.length){let c=Bn(s.text,a);if(c==a)return null;let u=Cu(s.dom,a,c).getClientRects();for(let h=0;h<u.length;h++){let m=u[h];if(h==u.length-1||m.top<m.bottom&&m.left<m.right)return m}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==Pn.LTR,h=0,m=(O,x,v)=>{for(let w=0;w<O.children.length&&!(x>i);w++){let k=O.children[w],$=x+k.length,M=k.dom.getBoundingClientRect(),{height:V}=M;if(v&&!w&&(h+=M.top-v.top),k instanceof qs)$>r&&m(k,x,M);else if(x>=r&&(h>0&&t.push(-h),t.push(V+h),h=0,a)){let A=k.dom.lastChild,Q=A?H1(A):[];if(Q.length){let T=Q[Q.length-1],N=u?T.right-M.left:M.right-T.left;N>c&&(c=N,this.minWidth=s,this.minWidthFrom=x,this.minWidthTo=$)}}v&&w==O.children.length-1&&(h+=v.bottom-M.bottom),x=$+k.breakAfter}};return m(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?Pn.RTL:Pn.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let c=0,u;for(let h of a.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let m=H1(h.dom);if(m.length!=1)return;c+=m[0].width,u=m[0].height}if(c)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:c/a.length,textHeight:u}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let a=H1(t.firstChild)[0];r=t.getBoundingClientRect().height,i=a&&a.width?a.width/27:7,s=a&&a.height?a.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],a=s?s.from-1:this.view.state.doc.length;if(a>r){let c=(t.lineBlockAt(a).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ot.replace({widget:new wp(c),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!s)break;r=s.to+1}return Ot.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Hd).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(mg).map((s,a)=>{let c=typeof s=="function";return c&&(r=!0),c?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Mt.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Av).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var t;if(e.isSnapshot){let m=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=m.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let m of this.view.state.facet(Sv))try{if(m(this.view,e.range,e))return!0}catch(O){Os(this.view.state,O,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(t=r.assoc)!==null&&t!==void 0?t:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let a=Ev(this.view),c={left:i.left-a.left,top:i.top-a.top,right:i.right+a.right,bottom:i.bottom+a.bottom},{offsetWidth:u,offsetHeight:h}=this.view.scrollDOM;if(YA(this.view.scrollDOM,c,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,u),-u),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==Pn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let m=this.view.docView.lineAt(r.head,1);m&&m.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){o2(this.tile)}}function o2(n,e){let t=e==null?void 0:e.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)o2(r,e)}}function b$(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function Mv(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=cv(t.focusNode,t.focusOffset),i=uv(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let c=xn.get(i.node);if(!c||c.isText()&&c.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let u=xn.get(r.node);!u||u.isText()&&u.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let a=e-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function w$(n,e,t){let r=Mv(n,t);if(!r)return null;let{node:i,from:s,to:a}=r,c=i.nodeValue;if(/[\n\r]/.test(c)||n.state.doc.sliceString(r.from,r.to)!=c)return null;let u=e.invertedDesc;return{range:new vi(u.mapPos(s),u.mapPos(a),s,a),text:i}}function S$(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let k$=class{constructor(){this.changes=[]}compareRange(e,t){Rl(e,t,this.changes)}comparePoint(e,t){Rl(e,t,this.changes)}boundChange(e){Rl(e,e,this.changes)}};function P$(n,e,t){let r=new k$;return Mt.compare(n,e,t,r),r.changes}class A${constructor(){this.changes=[]}compareRange(e,t){Rl(e,t,this.changes)}comparePoint(){}boundChange(e){Rl(e,e,this.changes)}}function $$(n,e,t){let r=new A$;return Mt.compare(n,e,t,r),r.changes}function C$(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function E$(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class wp extends La{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function T$(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return ue.cursor(e);s==0?t=1:s==i.length&&(t=-1);let a=s,c=s;t<0?a=Bn(i.text,s,!1):c=Bn(i.text,s);let u=r(i.text.slice(a,c));for(;a>0;){let h=Bn(i.text,a,!1);if(r(i.text.slice(h,a))!=u)break;a=h}for(;c<i.length;){let h=Bn(i.text,c);if(r(i.text.slice(c,h))!=u)break;c=h}return ue.range(a+i.from,c+i.from)}function M$(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let c=n.viewState.heightOracle.textHeight,u=Math.floor((i-t.top-(n.defaultLineHeight-c)*.5)/c);s+=u*n.viewState.heightOracle.lineLength}let a=n.state.sliceDoc(t.from,t.to);return t.from+VA(a,s,n.state.tabSize)}function Q$(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==zr.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function j$(n,e,t,r){let i=Q$(n,e.head,e.assoc||-1),s=!r||i.type!=zr.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let a=n.dom.getBoundingClientRect(),c=n.textDirectionAt(i.from),u=n.posAtCoords({x:t==(c==Pn.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(u!=null)return ue.cursor(u,t?-1:1)}return ue.cursor(t?i.to:i.from,t?-1:1)}function h6(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),a=n.textDirectionAt(i.from);for(let c=e,u=null;;){let h=s$(i,s,a,c,t),m=mv;if(!h){if(i.number==(t?n.state.doc.lines:1))return c;m=`
|
|
61
|
-
`,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),h=n.visualLineSide(i,!t)}if(u){if(!u(m))return c}else{if(!r)return h;u=r(m)}c=h}}function Z$(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let a=r(s);return i==an.Space&&(i=a),i==a}}function R$(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return ue.cursor(i,e.assoc);let a=e.goalColumn,c,u=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(i,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),m=n.documentTop;if(h)a==null&&(a=h.left-u.left),c=s<0?h.top:h.bottom;else{let w=n.viewState.lineBlockAt(i);a==null&&(a=Math.min(u.right-u.left,n.defaultCharacterWidth*(i-w.from))),c=(s<0?w.top:w.bottom)+m}let O=u.left+a,x=n.viewState.heightOracle.textHeight>>1,v=r??x;for(let w=0;;w+=x){let k=c+(v+w)*s,$=a2(n,{x:O,y:k},!1,s);if(t?k>u.bottom:k<u.top)return ue.cursor($.pos,$.assoc);let M=n.coordsAtPos($.pos,$.assoc),V=M?(M.top+M.bottom)/2:0;if(!M||(t?V>c:V<c))return ue.cursor($.pos,$.assoc,void 0,a)}}function pu(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,a,c)=>{if(e>s&&e<a){let u=r||t||(e-s<a-e?-1:1);e=u<0?s:a,r=u}});if(!r)return e}}function Qv(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let a=pu(n,i.from,0);a!=i.from&&(s=ue.cursor(a,-1))}else{let a=pu(n,i.from,-1),c=pu(n,i.to,1);(a!=i.from||c!=i.to)&&(s=ue.range(i.from==i.anchor?a:c,i.from==i.head?a:c))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?ue.create(t,e.mainIndex):e}function Sp(n,e,t){let r=pu(n.state.facet(zu).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:ue.cursor(r,r<t.from?1:-1)}class ms{constructor(e,t){this.pos=e,this.assoc=t}}function a2(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:a,y:c}=e,u=c-s,h;for(;;){if(u<0)return new ms(0,1);if(u>n.viewState.docHeight)return new ms(n.state.doc.length,-1);if(h=n.elementAtHeight(u),r==null)break;if(h.type==zr.Text){if(r<0?h.to<n.viewport.from:h.from>n.viewport.to)break;let x=n.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(x&&(r<0?x.top<=u+s:x.bottom>=u+s))break}let O=n.viewState.heightOracle.textHeight/2;u=r>0?h.bottom+O:h.top-O}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==zr.Text){let O=M$(n,i,h,a,c);return new ms(O,O==h.from?1:-1)}}if(h.type!=zr.Text)return u<(h.top+h.bottom)/2?new ms(h.from,1):new ms(h.to,-1);let m=n.docView.lineAt(h.from,2);return(!m||m.length!=h.length)&&(m=n.docView.lineAt(h.from,-2)),new N$(n,a,c,n.textDirectionAt(h.from)).scanTile(m,h.from)}class N${constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gs.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gs.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,a=this.bidiIn(e[0],e[i]),c,u,h=-1,m=1e9,O;e:for(;r<i;){let v=i-r,w=r+i>>1;t:if(s.has(w)){let $=r+Math.floor(Math.random()*v);for(let M=0;M<v;M++){if(!s.has($)){w=$;break t}$++,$==i&&($=r)}break e}s.add(w);let k=t(w);if(k)for(let $=0;$<k.length;$++){let M=k[$],V=0;if(!(M.width==0&&k.length>1)){if(M.bottom<this.y)(!c||c.bottom<M.bottom)&&(c=M),V=1;else if(M.top>this.y)(!u||u.top>M.top)&&(u=M),V=-1;else{let A=M.left>this.x?this.x-M.left:M.right<this.x?this.x-M.right:0,Q=Math.abs(A);Q<m&&(h=w,m=Q,O=M),A&&(V=A<0==(this.baseDir==Pn.LTR)?-1:1)}V==-1&&(!a||this.baseDirAt(e[w],1))?i=w:V==1&&(!a||this.baseDirAt(e[w+1],-1))&&(r=w+1)}}}if(!O){let v=c&&(!u||this.y-c.bottom<u.top-this.y)?c:u;return this.y=(v.top+v.bottom)/2,this.scan(e,t)}let x=(a?this.dirAt(e[h],1):this.baseDir)==Pn.LTR;return{i:h,after:this.x>(O.left+O.right)/2==x}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Bn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let a=r[s]-t,c=r[s+1]-t;return Cu(e.dom,a,c).getClientRects()});return i.after?new ms(r[i.i+1],-1):new ms(r[i.i],1)}scanTile(e,t){if(!e.length)return new ms(t,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,t);if(c.isComposite())return this.scanTile(c,t)}let r=[t];for(let c=0,u=t;c<e.children.length;c++)r.push(u+=e.children[c].length);let i=this.scan(r,c=>{let u=e.children[c];return u.flags&48?null:(u.dom.nodeType==1?u.dom:Cu(u.dom,0,u.length)).getClientRects()}),s=e.children[i.i],a=r[i.i];return s.isText()?this.scanText(s,a):s.isComposite()?this.scanTile(s,a):i.after?new ms(r[i.i+1],-1):new ms(a,1)}}const yl="";class L${constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(It.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=yl}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let a=xn.get(i),c=i.nextSibling;if(c==t){a!=null&&a.breakAfter&&!c&&r!=this.view.contentDOM&&this.lineBreak();break}let u=xn.get(c);(a&&u?a.breakAfter:(a?a.breakAfter:od(i))||od(c)&&(i.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>s)&&!_$(c,t)&&this.lineBreak(),i=c}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,c;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(c=i.exec(t))&&(s=c.index,a=c[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=a-1);r=s+a}}readNode(e){let t=xn.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(V$(e,r.node,r.offset)?t:0))}}function V$(n,e,t){for(;;){if(!e||t<Ks(e))return!1;if(e==n)return!0;t=Fo(e)+1,e=e.parentNode}}function _$(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=xn.get(n);if(!(r!=null&&r.isWidget()))return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class p6{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class D${constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:a}=e.docView,c=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=jv(e.docView.tile,t,r,0))){let u=s||a?[]:X$(e),h=new L$(u,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=F$(u,this.bounds.from)}else{let u=e.observer.selectionRange,h=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!t2(e.contentDOM,u.focusNode)?c.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),m=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!t2(e.contentDOM,u.anchorNode)?c.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),O=e.viewport;if((Xe.ios||Xe.chrome)&&c.main.empty&&h!=m&&(O.from>0||O.to<e.state.doc.length)){let x=Math.min(h,m),v=Math.max(h,m),w=O.from-x,k=O.to-v;(w==0||w==1||x==0)&&(k==0||k==-1||v==e.state.doc.length)&&(h=0,m=e.state.doc.length)}if(e.inputState.composing>-1&&c.ranges.length>1)this.newSel=c.replaceRange(ue.range(m,h));else if(e.lineWrapping&&m==h&&!(c.main.empty&&c.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let x=e.coordsAtPos(h,-1),v=0;x&&(v=e.inputState.lastTouchY<=x.bottom?-1:1),this.newSel=ue.create([ue.cursor(h,v)])}else this.newSel=ue.single(m,h)}}}function jv(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,a=-1,c=-1;for(let u=0,h=r,m=r;u<n.children.length;u++){let O=n.children[u],x=h+O.length;if(h<e&&x>t)return jv(O,e,t,h);if(x>=e&&i==-1&&(i=u,s=h),h>t&&O.dom.parentNode==n.dom){a=u,c=m;break}m=x,h=x+O.breakAfter}return{from:s,to:c<0?r+n.length:c,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:a<n.children.length&&a>=0?n.children[a].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function Zv(n,e){let t,{newSel:r}=e,{state:i}=n,s=i.selection.main,a=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:c,to:u}=e.bounds,h=s.from,m=null;(a===8||Xe.android&&e.text.length<u-c)&&(h=s.to,m="end");let O=i.doc.sliceString(c,u,yl),x,v;!s.empty&&s.from>=c&&s.to<=u&&(e.typeOver||O!=e.text)&&O.slice(0,s.from-c)==e.text.slice(0,s.from-c)&&O.slice(s.to-c)==e.text.slice(x=e.text.length-(O.length-(s.to-c)))?t={from:s.from,to:s.to,insert:Vt.of(e.text.slice(s.from-c,x).split(yl))}:(v=Rv(O,e.text,h-c,m))&&(Xe.chrome&&a==13&&v.toB==v.from+2&&e.text.slice(v.from,v.toB)==yl+yl&&v.toB--,t={from:c+v.from,to:c+v.toA,insert:Vt.of(e.text.slice(v.from,v.toB).split(yl))})}else r&&(!n.hasFocus&&i.facet(Bs)||dd(r,s))&&(r=null);if(!t&&!r)return!1;if((Xe.mac||Xe.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=ue.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Vt.of([t.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&n.docView.lineHasWidget(s.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.toText(n.inputState.insertingText)}:Xe.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
|
|
62
|
-
`&&n.lineWrapping&&(r&&(r=ue.single(r.main.anchor-1,r.main.head-1)),t={from:s.from,to:s.to,insert:Vt.of([" "])}),t)return gg(n,t,r,a);if(r&&!dd(r,s)){let c=!1,u="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(c=!0),u=n.inputState.lastSelectionOrigin,u=="select.pointer"&&(r=Qv(i.facet(zu).map(h=>h(n)),r))),n.dispatch({selection:r,scrollIntoView:c,userEvent:u}),!0}else return!1}function gg(n,e,t,r=-1){if(Xe.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Xe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Nl(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Nl(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Nl(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let a,c=()=>a||(a=I$(n,e,t));return n.state.facet(vv).some(u=>u(n,e.from,e.to,s,c))||n.dispatch(c()),!0}function I$(n,e,t){let r,i=n.state,s=i.selection.main,a=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,h=u<0?s.from:s.to,m=pu(i.facet(zu).map(O=>O(n)),h,u);e.from==m&&(a=m)}if(a>-1)r={changes:e,selection:ue.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let u=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(u+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let u=i.changes(e),h=t&&t.main.to<=u.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let m=n.state.sliceDoc(e.from,e.to),O,x=t&&Mv(n,t.main.head);if(x){let w=e.insert.length-(e.to-e.from);O={from:x.from,to:x.to-w}}else O=n.state.doc.lineAt(s.head);let v=s.to-e.to;r=i.changeByRange(w=>{if(w.from==s.from&&w.to==s.to)return{changes:u,range:h||w.map(u)};let k=w.to-v,$=k-m.length;if(n.state.sliceDoc($,k)!=m||k>=O.from&&$<=O.to)return{range:w};let M=i.changes({from:$,to:k,insert:e.insert}),V=w.to-s.to;return{changes:M,range:h?ue.range(Math.max(0,h.anchor+V),Math.max(0,h.head+V)):w.map(M)}})}else r={changes:u,selection:h&&i.selection.replaceRange(h)}}let c="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,c+=".compose",n.inputState.compositionFirstChange&&(c+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:c,scrollIntoView:!0})}function Rv(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let a=n.length,c=e.length;for(;a>0&&c>0&&n.charCodeAt(a-1)==e.charCodeAt(c-1);)a--,c--;if(r=="end"){let u=Math.max(0,s-Math.min(a,c));t-=a+u-s}if(a<s&&n.length<e.length){let u=t<=s&&t>=a?s-t:0;s-=u,c=s+(c-a),a=s}else if(c<s){let u=t<=s&&t>=c?s-t:0;s-=u,a=s+(a-c),c=s}return{from:s,toA:a,toB:c}}function X$(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new p6(t,r)),(i!=t||s!=r)&&e.push(new p6(i,s))),e}function F$(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?ue.single(t+e,r+e):null}function dd(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class z${setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Xe.safari&&e.contentDOM.addEventListener("input",()=>null),Xe.gecko&&sC(e.contentDOM.ownerDocument)}handleEvent(e){!K$(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=H$(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let a=!t[s].handlers.length,c=r[s];c&&a!=!c.handlers.length&&(i.removeEventListener(s,this.handleEvent),c=null),c||i.addEventListener(s,this.handleEvent,{passive:a})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Lv.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Xe.android&&Xe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Xe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=Nv.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||W$.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Nl(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Xe.safari&&!Xe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function m6(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){Os(t.state,i)}}}function H$(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,a=i&&i.plugin.domEventObservers;if(s)for(let c in s){let u=s[c];u&&t(c).handlers.push(m6(r.value,u))}if(a)for(let c in a){let u=a[c];u&&t(c).observers.push(m6(r.value,u))}}for(let r in Di)t(r).handlers.push(Di[r]);for(let r in Wr)t(r).observers.push(Wr[r]);return e}const Nv=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],W$="dthko",Lv=[16,17,18,20,91,92,224,225],a1=6;function l1(n){return Math.max(0,n)*.7+8}function B$(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class Y${constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=ov(e.contentDOM),this.atoms=e.state.facet(zu).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(It.allowMultipleSelections)&&q$(e,t),this.dragging=G$(e,t)&&Dv(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&B$(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:c}=this.scrollParents.y.getBoundingClientRect());let u=Ev(this.view);e.clientX-u.left<=i+a1?t=-l1(i-e.clientX):e.clientX+u.right>=a-a1&&(t=l1(e.clientX-a)),e.clientY-u.top<=s+a1?r=-l1(s-e.clientY):e.clientY+u.bottom>=c-a1&&(r=l1(e.clientY-c)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=Qv(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function q$(n,e){let t=n.state.facet(gv);return t.length?t[0](e):Xe.mac?e.metaKey:e.ctrlKey}function U$(n,e){let t=n.state.facet(Ov);return t.length?t[0](e):Xe.mac?!e.altKey:!e.ctrlKey}function G$(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=$u(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let a=i[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function K$(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=xn.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Di=Object.create(null),Wr=Object.create(null),Vv=Xe.ie&&Xe.ie_version<15||Xe.ios&&Xe.webkit_version<604;function J$(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),_v(n,t.value)},50)}function Yd(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function _v(n,e){e=Yd(n.state,fg,e);let{state:t}=n,r,i=1,s=t.toText(e),a=s.lines==t.selection.ranges.length;if(l2!=null&&t.selection.ranges.every(u=>u.empty)&&l2==s.toString()){let u=-1;r=t.changeByRange(h=>{let m=t.doc.lineAt(h.from);if(m.from==u)return{range:h};u=m.from;let O=t.toText((a?s.line(i++).text:e)+t.lineBreak);return{changes:{from:m.from,insert:O},range:ue.cursor(h.from+O.length)}})}else a?r=t.changeByRange(u=>{let h=s.line(i++);return{changes:{from:u.from,to:u.to,insert:h.text},range:ue.cursor(u.from+h.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Wr.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};Wr.wheel=Wr.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Di.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Wr.touchstart=(n,e)=>{let t=n.inputState,r=e.targetTouches[0];t.lastTouchTime=Date.now(),r&&(t.lastTouchX=r.clientX,t.lastTouchY=r.clientY),t.setSelectionOrigin("select.pointer")};Wr.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Di.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(xv))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=tC(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new Y$(n,e,t,r)),r&&n.observer.ignore(()=>{av(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function g6(n,e,t,r){if(r==1)return ue.cursor(e,t);if(r==2)return T$(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:s.from,c=i?i.posAtEnd:s.to;return c<n.state.doc.length&&c==s.to&&c++,ue.range(a,c)}}const eC=Xe.ie&&Xe.ie_version<=11;let O6=null,x6=0,y6=0;function Dv(n){if(!eC)return n.detail;let e=O6,t=y6;return O6=n,y6=Date.now(),x6=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(x6+1)%3:1}function tC(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=Dv(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,a,c){let u=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,m=g6(n,u.pos,u.assoc,r);if(t.pos!=u.pos&&!a){let O=g6(n,t.pos,t.assoc,r),x=Math.min(O.from,m.from),v=Math.max(O.to,m.to);m=x<m.from?ue.range(x,v,m.assoc):ue.range(v,x,m.assoc)}return a?i.replaceRange(i.main.extend(m.from,m.to,m.assoc)):c&&r==1&&i.ranges.length>1&&(h=nC(i,u.pos))?h:c?i.addRange(m):ue.create([m])}}}function nC(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return ue.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Di.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,a=s+i.length;(s>=t.to||a<=t.from)&&(t=ue.range(s,a))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Yd(n.state,hg,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Di.dragend=n=>(n.inputState.draggedContent=null,!1);function v6(n,e,t,r){if(t=Yd(n.state,fg,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,a=r&&s&&U$(n,e)?{from:s.from,to:s.to}:null,c={from:i,insert:t},u=n.state.changes(a?[a,c]:c);n.focus(),n.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Di.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&v6(n,e,r.filter(a=>a!=null).join(n.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let c=new FileReader;c.onerror=s,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(r[a]=c.result),s()},c.readAsText(t[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return v6(n,e,r,!0),!0}return!1};Di.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Vv?null:e.clipboardData;return t?(_v(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(J$(n),!1)};function rC(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function iC(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let a=n.doc.lineAt(s);a.number>i&&(e.push(a.text),t.push({from:a.from,to:Math.min(n.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Yd(n,hg,e.join(n.lineBreak)),ranges:t,linewise:r}}let l2=null;Di.copy=Di.cut=(n,e)=>{if(!fu(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=iC(n.state);if(!t&&!i)return!1;l2=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Vv?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(rC(n,t),!1)};const Iv=no.define();function Xv(n,e){let t=[];for(let r of n.facet(bv)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:Iv.of(!0)}):null}function Fv(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=Xv(n.state,e);t?n.dispatch(t):n.update([])}},10)}Wr.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Fv(n)};Wr.blur=n=>{n.observer.clearSelectionRange(),Fv(n)};Wr.compositionstart=Wr.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Wr.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Xe.chrome&&Xe.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Wr.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Di.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),a=e.getTargetRanges();if(s&&a.length){let c=a[0],u=n.posAtDOM(c.startContainer,c.startOffset),h=n.posAtDOM(c.endContainer,c.endOffset);return gg(n,{from:u,to:h,insert:n.state.toText(s)},null),!0}}let i;if(Xe.chrome&&Xe.android&&(i=Nv.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Xe.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Xe.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Wr.compositionend(n,e),20),!1};const b6=new Set;function sC(n){b6.has(n)||(b6.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const w6=["pre-wrap","normal","pre-line","break-spaces"];let zl=!1;function S6(){zl=!1}class oC{constructor(e){this.lineWrapping=e,this.doc=Vt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return w6.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,a){let c=w6.indexOf(e)>-1,u=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,u){this.heightSamples={};for(let h=0;h<a.length;h++){let m=a[h];m<0?h++:this.heightSamples[Math.floor(m*10)]=!0}}return u}}class aC{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Li{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?zr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof $a?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Li(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Jt=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(Jt||(Jt={}));const W1=.001;class Cr{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>W1&&(zl=!0),this.height=e)}replace(e,t,r){return Cr.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,a=r.doc;for(let c=i.length-1;c>=0;c--){let{fromA:u,toA:h,fromB:m,toB:O}=i[c],x=s.lineAt(u,Jt.ByPosNoHeight,r.setDoc(t),0,0),v=x.to>=h?x:s.lineAt(h,Jt.ByPosNoHeight,r,0,0);for(O+=v.to-h,h=v.to;c>0&&x.from<=i[c-1].toA;)u=i[c-1].fromA,m=i[c-1].fromB,c--,u<x.from&&(x=s.lineAt(u,Jt.ByPosNoHeight,r,0,0));m+=x.from-u,u=x.from;let w=Og.build(r.setDoc(a),e,m,O);s=fd(s,s.replace(u,h,w))}return s.updateHeight(r,0)}static empty(){return new ri(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let c=e[t-1];c.break?e.splice(--t,1,c.left,null,c.right):e.splice(--t,1,c.left,c.right),r+=1+c.break,i-=c.size}else if(s>i*2){let c=e[r];c.break?e.splice(r,1,c.left,null,c.right):e.splice(r,1,c.left,c.right),r+=2+c.break,s-=c.size}else break;else if(i<s){let c=e[t++];c&&(i+=c.size)}else{let c=e[--r];c&&(s+=c.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,r++),new cC(Cr.of(e.slice(0,t)),a,Cr.of(e.slice(r)))}}function fd(n,e){return n==e?n:(n.constructor!=e.constructor&&(zl=!0),e)}Cr.prototype.size=1;const lC=Ot.replace({});class zv extends Cr{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new Li(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Li(i,0,r,this.spaceAbove,lC):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let a=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(a):a}forEachLine(e,t,r,i,s,a){e<=s+this.length&&t>=s&&a(this.lineAt(0,Jt.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ri extends zv{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new Li(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof ri||i instanceof Jn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Jn?i=new ri(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Cr.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Jn extends Cr{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,a,c=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);a=u/s,this.length>s+1&&(c=(this.height-u)/(this.length-s-1))}else a=this.height/s;return{firstLine:r,lastLine:i,perLine:a,perChar:c}}blockAt(e,t,r,i){let{firstLine:s,lastLine:a,perLine:c,perChar:u}=this.heightMetrics(t,i);if(t.lineWrapping){let h=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),m=t.doc.lineAt(h),O=c+m.length*u,x=Math.max(r,e-O/2);return new Li(m.from,m.length,x,O,0)}else{let h=Math.max(0,Math.min(a-s,Math.floor((e-r)/c))),{from:m,length:O}=t.doc.line(s+h);return new Li(m,O,r+c*h,c,0)}}lineAt(e,t,r,i,s){if(t==Jt.ByHeight)return this.blockAt(e,r,i,s);if(t==Jt.ByPosNoHeight){let{from:v,to:w}=r.doc.lineAt(e);return new Li(v,w-v,0,0,0)}let{firstLine:a,perLine:c,perChar:u}=this.heightMetrics(r,s),h=r.doc.lineAt(e),m=c+h.length*u,O=h.number-a,x=i+c*O+u*(h.from-s-O);return new Li(h.from,h.length,Math.max(i,Math.min(x,i+this.height-m)),m,0)}forEachLine(e,t,r,i,s,a){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:c,perLine:u,perChar:h}=this.heightMetrics(r,s);for(let m=e,O=i;m<=t;){let x=r.doc.lineAt(m);if(m==e){let w=x.number-c;O+=u*w+h*(e-s-w)}let v=u+h*x.length;a(new Li(x.from,x.length,O,v,0)),O+=v,m=x.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Jn?r[r.length-1]=new Jn(s.length+i):r.push(null,new Jn(i-1))}if(e>0){let s=r[0];s instanceof Jn?r[0]=new Jn(e+s.length):r.unshift(new Jn(e-1),null)}return Cr.of(r)}decomposeLeft(e,t){t.push(new Jn(e-1),null)}decomposeRight(e,t){t.push(null,new Jn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let a=[],c=Math.max(t,i.from),u=-1;for(i.from>t&&a.push(new Jn(i.from-t-1).updateHeight(e,t));c<=s&&i.more;){let m=e.doc.lineAt(c).length;a.length&&a.push(null);let O=i.heights[i.index++],x=0;O<0&&(x=-O,O=i.heights[i.index++]),u==-1?u=O:Math.abs(O-u)>=W1&&(u=-2);let v=new ri(m,O,x);v.outdated=!1,a.push(v),c+=m+1}c<=s&&a.push(null,new Jn(s-c).updateHeight(e,c));let h=Cr.of(a);return(u<0||Math.abs(h.height-this.height)>=W1||Math.abs(u-this.heightMetrics(e,t).perLine)>=W1)&&(zl=!0),fd(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class cC extends Cr{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let a=i+this.left.height,c=s+this.left.length+this.break,u=t==Jt.ByHeight?e<a:e<c,h=u?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,a,c);if(this.break||(u?h.to<c:h.from>c))return h;let m=t==Jt.ByPosNoHeight?Jt.ByPosNoHeight:Jt.ByPos;return u?h.join(this.right.lineAt(c,m,r,a,c)):this.left.lineAt(c,m,r,i,s).join(h)}forEachLine(e,t,r,i,s,a){let c=i+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,t,r,i,s,a),t>=u&&this.right.forEachLine(e,t,r,c,u,a);else{let h=this.lineAt(u,Jt.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,a),h.to>=e&&h.from<=t&&a(h),t>h.to&&this.right.forEachLine(h.to+1,t,r,c,u,a)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let c of r)s.push(c);if(e>0&&k6(s,a-1),t<this.length){let c=s.length;this.decomposeRight(t,s),k6(s,c)}return Cr.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Cr.of(this.break?[e,null,t]:[e,t]):(this.left=fd(this.left,e),this.right=fd(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:a}=this,c=t+s.length+this.break,u=null;return i&&i.from<=t+s.length&&i.more?u=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=c+a.length&&i.more?u=a=a.updateHeight(e,c,r,i):a.updateHeight(e,c,r),u?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function k6(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Jn&&(r=n[e+1])instanceof Jn&&n.splice(e-1,3,new Jn(t.length+1+r.length))}const uC=5;class Og{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof ri?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new ri(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let a=t-e;r.block?this.addBlock(new zv(a,i,r)):(a||s||i>=uC)&&this.addLineDeco(i,s,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new ri(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Jn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ri)return e;let t=new ri(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof ri)&&!this.isCovered?this.nodes.push(new ri(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof ri&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new Og(r,e);return Mt.spans(t,r,i,s,0),s.finish(r)}}function dC(n,e,t){let r=new fC;return Mt.compare(n,e,t,r,0),r.changes}class fC{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&Rl(e,t,this.changes,5)}}function hC(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),a=Math.min(i.innerWidth,t.right),c=Math.max(0,t.top),u=Math.min(i.innerHeight,t.bottom);for(let h=n.parentNode;h&&h!=r.body;)if(h.nodeType==1){let m=h,O=window.getComputedStyle(m);if((m.scrollHeight>m.clientHeight||m.scrollWidth>m.clientWidth)&&O.overflow!="visible"){let x=m.getBoundingClientRect();s=Math.max(s,x.left),a=Math.min(a,x.right),c=Math.max(c,x.top),u=Math.min(h==n.parentNode?i.innerHeight:u,x.bottom)}h=O.position=="absolute"||O.position=="fixed"?m.offsetParent:m.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-t.left,right:Math.max(s,a)-t.left,top:c-(t.top+e),bottom:Math.max(c,u)-(t.top+e)}}function pC(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function mC(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class kp{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return Ot.replace({widget:new gC(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class gC extends La{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class P6{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=A6,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Pn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(pg).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new oC(r),this.stateDeco=$6(t),this.heightMap=Cr.empty().applyChanges(this.stateDeco,Vt.empty,this.heightOracle.setDoc(t.doc),[new vi(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ot.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:a})=>i>=s&&i<=a)){let{from:s,to:a}=this.lineBlockAt(i);e.push(new c1(s,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?A6:new xg(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ru(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=$6(this.state);let i=e.changedRanges,s=vi.extendWithRanges(i,dC(r,this.stateDeco,e?e.changes:Nn.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);S6(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||zl)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<u.from||t.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,t));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(a$)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Pn.RTL:Pn.LTR;let a=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",c=t.getBoundingClientRect(),u=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,m=0;if(c.width&&c.height){let{scaleX:T,scaleY:N}=sv(t,c);(T>.005&&Math.abs(this.scaleX-T)>.005||N>.005&&Math.abs(this.scaleY-N)>.005)&&(this.scaleX=T,this.scaleY=N,h|=16,a=u=!0)}let O=(parseInt(r.paddingTop)||0)*this.scaleY,x=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=x)&&(this.paddingTop=O,this.paddingBottom=x,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let v=ov(this.view.contentDOM,!1).y;v!=this.scrollParent&&(this.scrollParent=v,this.scrollAnchorHeight=-1,this.scrollOffset=0);let w=this.getScrollOffset();this.scrollOffset!=w&&(this.scrollAnchorHeight=-1,this.scrollOffset=w),this.scrolledToBottom=lv(this.scrollParent||e.win);let k=(this.printing?mC:hC)(t,this.paddingTop),$=k.top-this.pixelViewport.top,M=k.bottom-this.pixelViewport.bottom;this.pixelViewport=k;let V=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(V!=this.inView&&(this.inView=V,V&&(u=!0)),!this.inView&&!this.scrollTarget&&!pC(e.dom))return 0;let A=c.width;if((this.contentDOMWidth!=A||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),u){let T=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(T)&&(a=!0),a||i.lineWrapping&&Math.abs(A-this.contentDOMWidth)>i.charWidth){let{lineHeight:N,charWidth:j,textHeight:W}=e.docView.measureTextSize();a=N>0&&i.refresh(s,N,j,W,Math.max(5,A/j),T),a&&(e.docView.minWidth=0,h|=16)}$>0&&M>0?m=Math.max($,M):$<0&&M<0&&(m=Math.min($,M)),S6();for(let N of this.viewports){let j=N.from==this.viewport.from?T:e.docView.measureVisibleLineHeights(N);this.heightMap=(a?Cr.empty().applyChanges(this.stateDeco,Vt.empty,this.heightOracle,[new vi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new aC(N.from,j))}zl&&(h|=2)}let Q=!this.viewportIsAppropriate(this.viewport,m)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return Q&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(m,this.scrollTarget),h|=this.updateForViewport()),(h&2||Q)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,u=new c1(i.lineAt(a-r*1e3,Jt.ByHeight,s,0,0).from,i.lineAt(c+(1-r)*1e3,Jt.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<u.from||h>u.to){let m=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=i.lineAt(h,Jt.ByPos,s,0,0),x;t.y=="center"?x=(O.top+O.bottom)/2-m/2:t.y=="start"||t.y=="nearest"&&h<u.from?x=O.top:x=O.bottom-m,u=new c1(i.lineAt(x-1e3/2,Jt.ByHeight,s,0,0).from,i.lineAt(x+m+1e3/2,Jt.ByHeight,s,0,0).to)}}return u}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new c1(this.heightMap.lineAt(r,Jt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Jt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Jt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Jt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(e==0||i<=a-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=c+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&s<c+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new kp(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,a=i<<1;if(this.defaultTextDirection!=Pn.LTR&&!r)return[];let c=[],u=(m,O,x,v)=>{if(O-m<s)return;let w=this.state.selection.main,k=[w.from];w.empty||k.push(w.to);for(let M of k)if(M>m&&M<O){u(m,M-10,x,v),u(M+10,O,x,v);return}let $=xC(e,M=>M.from>=x.from&&M.to<=x.to&&Math.abs(M.from-m)<s&&Math.abs(M.to-O)<s&&!k.some(V=>M.from<V&&M.to>V));if(!$){if(O<x.to&&t&&r&&t.visibleRanges.some(A=>A.from<=O&&A.to>=O)){let A=t.moveToLineBoundary(ue.cursor(O),!1,!0).head;A>m&&(O=A)}let M=this.gapSize(x,m,O,v),V=r||M<2e6?M:2e6;$=new kp(m,O,M,V)}c.push($)},h=m=>{if(m.length<a||m.type!=zr.Text)return;let O=OC(m.from,m.to,this.stateDeco);if(O.total<a)return;let x=this.scrollTarget?this.scrollTarget.range.head:null,v,w;if(r){let k=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,$,M;if(x!=null){let V=d1(O,x),A=((this.visibleBottom-this.visibleTop)/2+k)/m.height;$=V-A,M=V+A}else $=(this.visibleTop-m.top-k)/m.height,M=(this.visibleBottom-m.top+k)/m.height;v=u1(O,$),w=u1(O,M)}else{let k=O.total*this.heightOracle.charWidth,$=i*this.heightOracle.charWidth,M=0;if(k>2e6)for(let N of e)N.from>=m.from&&N.from<m.to&&N.size!=N.displaySize&&N.from*this.heightOracle.charWidth+M<this.pixelViewport.left&&(M=N.size-N.displaySize);let V=this.pixelViewport.left+M,A=this.pixelViewport.right+M,Q,T;if(x!=null){let N=d1(O,x),j=((A-V)/2+$)/k;Q=N-j,T=N+j}else Q=(V-$)/k,T=(A+$)/k;v=u1(O,Q),w=u1(O,T)}v>m.from&&u(m.from,v,m,O),w<m.to&&u(w,m.to,m,O)};for(let m of this.viewportLines)Array.isArray(m.type)?m.type.forEach(h):h(m);return c}gapSize(e,t,r,i){let s=d1(i,r)-d1(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){kp.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ot.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Mt.spans(t,this.viewport.from,this.viewport.to,{span(s,a){r.push({from:s,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let a=this.visibleRanges[s],c=r[s];(a.from!=c.from||a.to!=c.to)&&(i|=4,e&&e.mapPos(a.from,-1)==c.from&&e.mapPos(a.to,1)==c.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ru(this.heightMap.lineAt(e,Jt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||ru(this.heightMap.lineAt(this.scaler.fromDOM(e),Jt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ru(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class c1{constructor(e,t){this.from=e,this.to=t}}function OC(n,e,t){let r=[],i=n,s=0;return Mt.spans(t,n,e,{span(){},point(a,c){a>i&&(r.push({from:i,to:a}),s+=a-i),i=c}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function u1({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:a}=e[i],c=a-s;if(r<=c)return s+r;r-=c}}function d1(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function xC(n,e){for(let t of n)if(e(t))return t}const A6={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function $6(n){let e=n.facet(Hd).filter(r=>typeof r!="function"),t=n.facet(mg).filter(r=>typeof r!="function");return t.length&&e.push(Mt.join(t)),e}class xg{constructor(e,t,r){let i=0,s=0,a=0;this.viewports=r.map(({from:c,to:u})=>{let h=t.lineAt(c,Jt.ByPos,e,0,0).top,m=t.lineAt(u,Jt.ByPos,e,0,0).bottom;return i+=m-h,{from:c,to:u,top:h,bottom:m,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let c of this.viewports)c.domTop=a+(c.top-s)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),s=c.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof xg?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function ru(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Li(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>ru(i,e)):n._content)}const f1=Ye.define({combine:n=>n.join(" ")}),c2=Ye.define({combine:n=>n.indexOf(!0)>-1}),u2=Io.newName(),Hv=Io.newName(),Wv=Io.newName(),Bv={"&light":"."+Hv,"&dark":"."+Wv};function d2(n,e,t){return new Io(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const yC=d2("."+u2,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Bv),vC={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Pp=Xe.ie&&Xe.ie_version<=11;class bC{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new qA,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Xe.ie&&Xe.ie_version<=11||Xe.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Xe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Xe.chrome&&Xe.chrome_version<126)&&(this.editContext=new SC(e),e.state.facet(Bs)&&(e.contentDOM.editContext=this.editContext.editContext)),Pp&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Bs)?r.root.activeElement!=this.dom:!fu(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Xe.ie&&Xe.ie_version<=11||Xe.android&&Xe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&hu(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=$u(e.root);if(!t)return!1;let r=Xe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&wC(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=fu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&GA(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,vC),Pp&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Pp&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Nl(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(i=!0),t==-1?{from:t,to:r}=a:(t=Math.min(a.from,t),r=Math.max(a.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&fu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new D$(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=Zv(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!dd(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=C6(t,e.previousSibling||e.target.previousSibling,-1),i=C6(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Bs)!=e.state.facet(Bs)&&(e.view.contentDOM.editContext=e.state.facet(Bs)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function C6(n,e,t){for(;e;){let r=xn.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function E6(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,a=n.docView.domAtPos(n.state.selection.main.anchor,1);return hu(a.node,a.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function wC(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return E6(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?E6(n,t):null}class SC{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:a}=i,c=this.toEditorPos(r.updateRangeStart),u=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:c,drifted:!1});let h=u-c>r.text.length;c==this.from&&s<this.from?c=s:u==this.to&&s>this.to&&(u=s);let m=Rv(e.state.sliceDoc(c,u),r.text,(h?i.from:i.to)-c,h?"end":null);if(!m){let x=ue.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));dd(x,i)||e.dispatch({selection:x,userEvent:"select"});return}let O={from:m.from+c,to:m.toA+c,insert:Vt.of(r.text.slice(m.from,m.toB).split(`
|
|
63
|
-
`))};if((Xe.mac||Xe.android)&&O.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(O={from:c,to:u,insert:Vt.of([r.text.replace("."," ")])}),this.pendingContextChange=O,!e.state.readOnly){let x=this.to-this.from+(O.to-O.from+O.insert.length);gg(e,O,ue.single(this.toEditorPos(r.selectionStart,x),this.toEditorPos(r.selectionEnd,x)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),O.from<O.to&&!O.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let a=this.toEditorPos(r.rangeStart),c=this.toEditorPos(r.rangeEnd);a<c;a++){let u=e.coordsForChar(a);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let a=s.underlineStyle,c=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(c)){let u=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(u<h){let m=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;i.push(Ot.mark({attributes:{style:m}}).range(u,h))}}}e.dispatch({effects:kv.of(Ot.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=$u(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,a,c,u,h)=>{if(r)return;let m=h.length-(a-s);if(i&&a>=i.to)if(i.from==s&&i.to==a&&i.insert.eq(h)){i=this.pendingContextChange=null,t+=m,this.to+=m;return}else i=null,this.revertPending(e.state);if(s+=t,a+=t,a<=this.from)this.from+=m,this.to+=m;else if(s<this.to){if(s<this.from||a>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),h.toString()),this.to+=m}t+=m}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Be{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||UA(e.parent)||document,this.viewState=new P6(this,e.state||It.create(e)),e.scrollTo&&e.scrollTo.is(o1)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Pl).map(i=>new yp(i));for(let i of this.plugins)i.update(this);this.observer=new bC(this),this.inputState=new z$(this),this.inputState.ensureHandlers(this.plugins),this.docView=new f6(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Tn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let x of e){if(x.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=x.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,c=0,u=null;e.some(x=>x.annotation(Iv))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,u=Xv(s,a),u||(c=1));let h=this.observer.delayedAndroidKey,m=null;if(h?(this.observer.clearDelayedAndroidKey(),m=this.observer.readChange(),(m&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(m=null)):this.observer.clear(),s.facet(It.phrases)!=this.state.facet(It.phrases))return this.setState(s);i=ld.create(this,s,e),i.flags|=c;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let x of e){if(O&&(O=O.map(x.changes)),x.scrollIntoView){let{main:v}=x.state.selection;O=new Ll(v.empty?v:ue.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of x.effects)v.is(o1)&&(O=v.value.clip(this.state))}this.viewState.update(i,O),this.bidiCache=hd.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(nu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(x=>x.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(f1)!=i.state.facet(f1)&&(this.viewState.mustMeasureContent=!0),(t||r||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let x of this.state.facet(s2))try{x(i)}catch(v){Os(this.state,v,"update listener")}(u||m)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),m&&!Zv(this,m)&&h.force&&Nl(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new P6(this,e),this.plugins=e.facet(Pl).map(r=>new yp(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new f6(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Pl),r=e.state.facet(Pl);if(t!=r){let i=[];for(let s of r){let a=t.indexOf(s);if(a<0)i.push(new yp(s));else{let c=this.plugins[a];c.mustUpdate=e,i.push(c)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){Os(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(a<0)if(lv(r||this.win))s=-1,a=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);s=v.from,a=v.top}this.updateState=1;let u=this.viewState.measure();if(!u&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];u&4||([this.measureRequests,h]=[h,this.measureRequests]);let m=h.map(v=>{try{return v.read(this)}catch(w){return Os(this.state,w),T6}}),O=ld.create(this,this.state,[]),x=!1;O.flags|=u,t?t.flags|=u:t=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),x=this.docView.update(O),x&&this.docViewUpdate());for(let v=0;v<h.length;v++)if(m[v]!=T6)try{let w=h[v];w.write&&w.write(m[v],this)}catch(w){Os(this.state,w)}if(x&&this.docView.updateSelection(!0),!O.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let w=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a)/this.scaleY;if((w>1||w<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+w,r?r.scrollTop+=w:this.win.scrollBy(0,w),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let c of this.state.facet(s2))c(t)}get themeClasses(){return u2+" "+(this.state.facet(c2)?Wv:Hv)+" "+this.state.facet(f1)}updateAttrs(){let e=M6(this,Pv,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Bs)?"true":"false",class:"cm-content",style:`${Xe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),M6(this,pg,t);let r=this.observer.ignore(()=>{let i=o6(this.contentDOM,this.contentAttrs,t),s=o6(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Be.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(nu);let e=this.state.facet(Be.cspNonce);Io.mount(this.root,this.styleModules.concat(yC).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Sp(this,e,h6(this,e,t,r))}moveByGroup(e,t){return Sp(this,e,h6(this,e,t,r=>Z$(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return ue.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return j$(this,e,t,r)}moveVertically(e,t,r){return Sp(this,e,R$(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=a2(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),a2(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),a=s[gs.find(s,e-i.from,-1,t)];return ad(r,a.dir==Pn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(wv)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>kC)return pv(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||hv(s.isolates,r=c6(this,e))))return s.order;r||(r=c6(this,e));let i=i$(e.text,t,r);return this.bidiCache.push(new hd(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Xe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{av(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return o1.of(new Ll(typeof e=="number"?ue.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return o1.of(new Ll(ue.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Hr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Hr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Io.newName(),i=[f1.of(r),nu.of(d2(`.${r}`,e))];return t&&t.dark&&i.push(c2.of(!0)),i}static baseTheme(e){return Iu.lowest(nu.of(d2("."+u2,e,Bv)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&xn.get(r)||xn.get(e);return((t=i==null?void 0:i.root)===null||t===void 0?void 0:t.view)||null}}Be.styleModule=nu;Be.inputHandler=vv;Be.clipboardInputFilter=fg;Be.clipboardOutputFilter=hg;Be.scrollHandler=Sv;Be.focusChangeEffect=bv;Be.perLineTextDirection=wv;Be.exceptionSink=yv;Be.updateListener=s2;Be.editable=Bs;Be.mouseSelectionStyle=xv;Be.dragMovesSelection=Ov;Be.clickAddsSelectionRange=gv;Be.decorations=Hd;Be.blockWrappers=Av;Be.outerDecorations=mg;Be.atomicRanges=zu;Be.bidiIsolatedRanges=$v;Be.scrollMargins=Cv;Be.darkTheme=c2;Be.cspNonce=Ye.define({combine:n=>n.length?n[0]:""});Be.contentAttributes=pg;Be.editorAttributes=Pv;Be.lineWrapping=Be.contentAttributes.of({class:"cm-lineWrapping"});Be.announce=Ft.define();const kC=4096,T6={};class hd{constructor(e,t,r,i,s,a){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=a}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Pn.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==i&&!t.touchesRange(a.from,a.to)&&r.push(new hd(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return r}}function M6(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],a=typeof s=="function"?s(n):s;a&&cg(a,t)}return t}const PC=Xe.mac?"mac":Xe.windows?"win":Xe.linux?"linux":"key";function AC(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,a,c;for(let u=0;u<t.length-1;++u){const h=t[u];if(/^(cmd|meta|m)$/i.test(h))c=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))a=!0;else if(/^mod$/i.test(h))e=="mac"?c=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),c&&(r="Meta-"+r),a&&(r="Shift-"+r),r}function h1(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const $C=Iu.default(Be.domEventHandlers({keydown(n,e){return qv(Yv(e.state),n,e,"editor")}})),yg=Ye.define({enables:$C}),Q6=new WeakMap;function Yv(n){let e=n.facet(yg),t=Q6.get(e);return t||Q6.set(e,t=TC(e.reduce((r,i)=>r.concat(i),[]))),t}function CC(n,e,t){return qv(Yv(n.state),e,n,t)}let Ro=null;const EC=4e3;function TC(n,e=PC){let t=Object.create(null),r=Object.create(null),i=(a,c)=>{let u=r[a];if(u==null)r[a]=c;else if(u!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,c,u,h,m)=>{var O,x;let v=t[a]||(t[a]=Object.create(null)),w=c.split(/ (?!$)/).map(M=>AC(M,e));for(let M=1;M<w.length;M++){let V=w.slice(0,M).join(" ");i(V,!0),v[V]||(v[V]={preventDefault:!0,stopPropagation:!1,run:[A=>{let Q=Ro={view:A,prefix:V,scope:a};return setTimeout(()=>{Ro==Q&&(Ro=null)},EC),!0}]})}let k=w.join(" ");i(k,!1);let $=v[k]||(v[k]={preventDefault:!1,stopPropagation:!1,run:((x=(O=v._any)===null||O===void 0?void 0:O.run)===null||x===void 0?void 0:x.slice())||[]});u&&$.run.push(u),h&&($.preventDefault=!0),m&&($.stopPropagation=!0)};for(let a of n){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let h of c){let m=t[h]||(t[h]=Object.create(null));m._any||(m._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:O}=a;for(let x in m)m[x].run.push(v=>O(v,f2))}let u=a[e]||a.key;if(u)for(let h of c)s(h,u,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(h,"Shift-"+u,a.shift,a.preventDefault,a.stopPropagation)}return t}let f2=null;function qv(n,e,t,r){f2=e;let i=XA(e),s=Na(i,0),a=Du(s)==i.length&&i!=" ",c="",u=!1,h=!1,m=!1;Ro&&Ro.view==t&&Ro.scope==r&&(c=Ro.prefix+" ",Lv.indexOf(e.keyCode)<0&&(h=!0,Ro=null));let O=new Set,x=$=>{if($){for(let M of $.run)if(!O.has(M)&&(O.add(M),M(t)))return $.stopPropagation&&(m=!0),!0;$.preventDefault&&($.stopPropagation&&(m=!0),h=!0)}return!1},v=n[r],w,k;return v&&(x(v[c+h1(i,e,!a)])?u=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Xe.windows&&e.ctrlKey&&e.altKey)&&!(Xe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(w=Xo[e.keyCode])&&w!=i?(x(v[c+h1(w,e,!0)])||e.shiftKey&&(k=Pu[e.keyCode])!=i&&k!=w&&x(v[c+h1(k,e,!1)]))&&(u=!0):a&&e.shiftKey&&x(v[c+h1(i,e,!0)])&&(u=!0),!u&&x(v._any)&&(u=!0)),h&&(u=!0),u&&m&&e.stopPropagation(),f2=null,u}function MC(){return jC}const QC=Ot.line({class:"cm-activeLine"}),jC=Hr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(QC.range(i.from)),e=i.from)}return Ot.set(t)}},{decorations:n=>n.decorations}),j6=Ye.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Uv(n,e){let t=n.plugin(Gv),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const Gv=Hr.fromClass(class{constructor(n){this.input=n.state.facet(pd),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(j6);this.top=new p1(n,!0,e.topContainer),this.bottom=new p1(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(j6);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new p1(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new p1(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(pd);if(t!=this.input){let r=t.filter(u=>u),i=[],s=[],a=[],c=[];for(let u of r){let h=this.specs.indexOf(u),m;h<0?(m=u(n.view),c.push(m)):(m=this.panels[h],m.update&&m.update(n)),i.push(m),(m.top?s:a).push(m)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(a);for(let u of c)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Be.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class p1{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Z6(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Z6(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Z6(n){let e=n.nextSibling;return n.remove(),e}const pd=Ye.define({enables:Gv});function ZC(n,e){let t,r=new Promise(a=>t=a),i=a=>RC(a,e,t);n.state.field(Ap,!1)?n.dispatch({effects:Kv.of(i)}):n.dispatch({effects:Ft.appendConfig.of(Ap.init(()=>[i]))});let s=Jv.of(i);return{close:s,result:r.then(a=>((n.win.queueMicrotask||(u=>n.win.setTimeout(u,10)))(()=>{n.state.field(Ap).indexOf(i)>-1&&n.dispatch({effects:s})}),a))}}const Ap=si.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(Kv)?n=[t.value].concat(n):t.is(Jv)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>pd.computeN([n],e=>e.field(n))}),Kv=Ft.define(),Jv=Ft.define();function RC(n,e,t){let r=e.content?e.content(n,()=>a(null)):null;if(!r){if(r=Wn("form"),e.input){let c=Wn("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),r.appendChild(Wn("label",(e.label||"")+": ",c))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(Wn("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let c=0;c<i.length;c++){let u=i[c];u.addEventListener("keydown",h=>{h.keyCode==27?(h.preventDefault(),a(null)):h.keyCode==13&&(h.preventDefault(),a(u))}),u.addEventListener("submit",h=>{h.preventDefault(),a(u)})}let s=Wn("div",r,Wn("button",{onclick:()=>a(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function a(c){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(c)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=r.querySelector(e.focus):c=r.querySelector("input")||r.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class Js extends Do{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Js.prototype.elementClass="";Js.prototype.toDOM=void 0;Js.prototype.mapMode=fr.TrackBefore;Js.prototype.startSide=Js.prototype.endSide=-1;Js.prototype.point=!0;const B1=Ye.define(),NC=Ye.define(),LC={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Mt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},mu=Ye.define();function VC(n){return[eb(),mu.of({...LC,...n})]}const R6=Ye.define({combine:n=>n.some(e=>e)});function eb(n){return[_C]}const _C=Hr.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(mu).map(e=>new L6(n,e)),this.fixed=!n.state.facet(R6);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(R6)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Mt.iter(this.view.state.facet(B1),this.view.viewport.from),r=[],i=this.gutters.map(s=>new DC(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let a=!0;for(let c of s.type)if(c.type==zr.Text&&a){h2(t,r,c.from);for(let u of i)u.line(this.view,c,r);a=!1}else if(c.widget)for(let u of i)u.widget(this.view,c)}else if(s.type==zr.Text){h2(t,r,s.from);for(let a of i)a.line(this.view,s,r)}else if(s.widget)for(let a of i)a.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(mu),t=n.state.facet(mu),r=n.docChanged||n.heightChanged||n.viewportChanged||!Mt.eq(n.startState.facet(B1),n.state.facet(B1),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let a=e.indexOf(s);a<0?i.push(new L6(this.view,s)):(this.gutters[a].update(n),i.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>Be.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Pn.LTR?{left:r,right:i}:{right:r,left:i}})});function N6(n){return Array.isArray(n)?n:[n]}function h2(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class DC{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Mt.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==i.elements.length){let c=new tb(e,a,s,r);i.elements.push(c),i.dom.appendChild(c.dom)}else i.elements[this.i].update(e,a,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];h2(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(NC)){let a=s(e,t.widget,t);a&&(i||(i=[])).push(a)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class L6{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();a=(u.top+u.bottom)/2}else a=i.clientY;let c=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[r](e,c,i)&&i.preventDefault()});this.markers=N6(t.markers(e)),t.initialSpacer&&(this.spacer=new tb(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=N6(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Mt.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class tb{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),IC(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,a=0;;){let c=a,u=s<t.length?t[s++]:null,h=!1;if(u){let m=u.elementClass;m&&(r+=" "+m);for(let O=a;O<this.markers.length;O++)if(this.markers[O].compare(u)){c=O,h=!0;break}}else c=this.markers.length;for(;a<c;){let m=this.markers[a++];if(m.toDOM){m.destroy(i);let O=i.nextSibling;i.remove(),i=O}}if(!u)break;u.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(u.toDOM(e),i)),h&&a++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function IC(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const XC=Ye.define(),FC=Ye.define(),Al=Ye.define({combine(n){return ec(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],a=t[i];r[i]=s?(c,u,h)=>s(c,u,h)||a(c,u,h):a}return r}})}});class $p extends Js{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Cp(n,e){return n.state.facet(Al).formatNumber(e,n.state)}const zC=mu.compute([Al],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(XC)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new $p(Cp(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(FC)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Al)!=e.state.facet(Al),initialSpacer(e){return new $p(Cp(e,V6(e.state.doc.lines)))},updateSpacer(e,t){let r=Cp(t.view,V6(t.view.state.doc.lines));return r==e.number?e:new $p(r)},domEventHandlers:n.facet(Al).domEventHandlers,side:"before"}));function HC(n={}){return[Al.of(n),eb(),zC]}function V6(n){let e=9;for(;e<n;)e=e*10+9;return e}const WC=new class extends Js{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},BC=B1.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(WC.range(i)))}return Mt.of(e)});function YC(){return BC}const nb=1024;let qC=0;class bi{constructor(e,t){this.from=e,this.to=t}}class kt{constructor(e={}){this.id=qC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Er.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}kt.closedBy=new kt({deserialize:n=>n.split(" ")});kt.openedBy=new kt({deserialize:n=>n.split(" ")});kt.group=new kt({deserialize:n=>n.split(" ")});kt.isolate=new kt({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});kt.contextHash=new kt({perNode:!0});kt.lookAhead=new kt({perNode:!0});kt.mounted=new kt({perNode:!0});class Vl{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[kt.mounted.id]}}const UC=Object.create(null);class Er{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):UC,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Er(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(kt.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(kt.group),s=-1;s<(i?i.length:0);s++){let a=t[s<0?r.name:i[s]];if(a)return a}}}}Er.none=new Er("",Object.create(null),0,8);class vg{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let a=s(r);if(a){i||(i=Object.assign({},r.props));let c=a[1],u=a[0];u.combine&&u.id in i&&(c=u.combine(i[u.id],c)),i[u.id]=c}}t.push(i?new Er(r.name,i,r.id,r.flags):r)}return new vg(t)}}const m1=new WeakMap,_6=new WeakMap;var qt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(qt||(qt={}));class ln{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,c]of s)this.props[typeof a=="number"?a:a.id]=c}}toString(){let e=Vl.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new md(this.topNode,e)}cursorAt(e,t=0,r=0){let i=m1.get(this)||this.topNode,s=new md(i);return s.moveTo(e,t),m1.set(this,s._tree),s}get topNode(){return new pr(this,0,0,null)}resolve(e,t=0){let r=Eu(m1.get(this)||this.topNode,e,t,!1);return m1.set(this,r),r}resolveInner(e,t=0){let r=Eu(_6.get(this)||this.topNode,e,t,!0);return _6.set(this,r),r}resolveStack(e,t=0){return JC(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,a=e.mode||0,c=(a&qt.IncludeAnonymous)>0;for(let u=this.cursor(a|qt.IncludeAnonymous);;){let h=!1;if(u.from<=s&&u.to>=i&&(!c&&u.type.isAnonymous||t(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&r&&(c||!u.type.isAnonymous)&&r(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Sg(Er.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new ln(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new ln(Er.none,t,r,i)))}static build(e){return eE(e)}}ln.empty=new ln(Er.none,[],[],0);class bg{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new bg(this.buffer,this.index)}}class zo{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Er.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let a=[];for(;e<r;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,t,r,i,s){let{buffer:a}=this,c=-1;for(let u=e;u!=t&&!(rb(s,i,a[u+1],a[u+2])&&(c=u,r>0));u=a[u+3]);return c}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),a=0;for(let c=e,u=0;c<t;){s[u++]=i[c++],s[u++]=i[c++]-r;let h=s[u++]=i[c++]-r;s[u++]=i[c++]-e,a=Math.max(a,h)}return new zo(s,a,this.set)}}function rb(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function Eu(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let a=!r&&n instanceof pr&&n.index<0?null:n.parent;if(!a)return n;n=a}let s=r?0:qt.IgnoreOverlays;if(r)for(let a=n,c=a.parent;c;a=c,c=a.parent)a instanceof pr&&a.index<0&&((i=c.enter(e,t,s))===null||i===void 0?void 0:i.from)!=a.from&&(n=c);for(;;){let a=n.enter(e,t,s);if(!a)return n;n=a}}class ib{cursor(e=0){return new md(this,e)}getChild(e,t=null,r=null){let i=D6(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return D6(this,e,t,r)}resolve(e,t=0){return Eu(this,e,t,!1)}resolveInner(e,t=0){return Eu(this,e,t,!0)}matchContext(e){return p2(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class pr extends ib{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let a=this;;){for(let{children:c,positions:u}=a._tree,h=t>0?c.length:-1;e!=h;e+=t){let m=c[e],O=u[e]+a.from,x;if(!(!(s&qt.EnterBracketed&&m instanceof ln&&(x=Vl.get(m))&&!x.overlay&&x.bracketed&&r>=O&&r<=O+m.length)&&!rb(i,r,O,O+m.length))){if(m instanceof zo){if(s&qt.ExcludeBuffers)continue;let v=m.findChild(0,m.buffer.length,t,r-O,i);if(v>-1)return new xs(new GC(a,m,e,O),null,v)}else if(s&qt.IncludeAnonymous||!m.type.isAnonymous||wg(m)){let v;if(!(s&qt.IgnoreMounts)&&(v=Vl.get(m))&&!v.overlay)return new pr(v.tree,O,e,a);let w=new pr(m,O,e,a);return s&qt.IncludeAnonymous||!w.type.isAnonymous?w:w.nextChild(t<0?m.children.length-1:0,t,r,i,s)}}}if(s&qt.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&qt.IgnoreOverlays)&&(i=Vl.get(this._tree))&&i.overlay){let s=e-this.from,a=r&qt.EnterBracketed&&i.bracketed;for(let{from:c,to:u}of i.overlay)if((t>0||a?c<=s:c<s)&&(t<0||a?u>=s:u>s))return new pr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function D6(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let a=!1;!a;)if(a=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function p2(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class GC{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class xs extends ib{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new xs(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&qt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new xs(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new xs(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new xs(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let a=r.buffer[this.index+1];e.push(r.slice(i,s,a)),t.push(0)}return new ln(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function sb(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let a=n[s];(a.from>t.from||a.to<t.to)&&(t=a,e=s)}let r=t instanceof pr&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new KC(i,t)}class KC{constructor(e,t){this.heads=e,this.node=t}get next(){return sb(this.heads)}}function JC(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof pr?r:r.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(i||(i=[r])).push(a.resolve(e,t)),s=a}else{let a=Vl.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let c=new pr(a.tree,a.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(Eu(c,e,t,!1))}}return i?sb(i):r}class md{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~qt.EnterBracketed,e instanceof pr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof pr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&qt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&qt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&qt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,a=e<0?-1:r._tree.children.length;s!=a;s+=e){let c=r._tree.children[s];if(this.mode&qt.IncludeAnonymous||c instanceof zo||!c.type.isAnonymous||wg(c))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;t=a,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new xs(this.buffer,t,this.stack[i]);return this.bufferNode=new xs(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return p2(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return p2(this._tree,e,i);let a=r[t.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function wg(n){return n.children.some(e=>e instanceof zo||!e.type.isAnonymous||wg(e))}function eE(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=nb,reused:s=[],minRepeatType:a=r.types.length}=n,c=Array.isArray(t)?new bg(t,t.length):t,u=r.types,h=0,m=0;function O(T,N,j,W,K,ae){let{id:ie,start:L,end:le,size:ye}=c,Oe=m,$e=h;if(ye<0)if(c.next(),ye==-1){let E=s[ie];j.push(E),W.push(L-T);return}else if(ye==-3){h=ie;return}else if(ye==-4){m=ie;return}else throw new RangeError(`Unrecognized record size: ${ye}`);let pe=u[ie],D,z,q=L-T;if(le-L<=i&&(z=$(c.pos-N,K))){let E=new Uint16Array(z.size-z.skip),X=c.pos-z.size,ee=E.length;for(;c.pos>X;)ee=M(z.start,E,ee);D=new zo(E,le-z.start,r),q=z.start-T}else{let E=c.pos-ye;c.next();let X=[],ee=[],Ce=ie>=a?ie:-1,Te=0,tt=le;for(;c.pos>E;)Ce>=0&&c.id==Ce&&c.size>=0?(c.end<=tt-i&&(w(X,ee,L,Te,c.end,tt,Ce,Oe,$e),Te=X.length,tt=c.end),c.next()):ae>2500?x(L,E,X,ee):O(L,E,X,ee,Ce,ae+1);if(Ce>=0&&Te>0&&Te<X.length&&w(X,ee,L,Te,L,tt,Ce,Oe,$e),X.reverse(),ee.reverse(),Ce>-1&&Te>0){let De=v(pe,$e);D=Sg(pe,X,ee,0,X.length,0,le-L,De,De)}else D=k(pe,X,ee,le-L,Oe-le,$e)}j.push(D),W.push(q)}function x(T,N,j,W){let K=[],ae=0,ie=-1;for(;c.pos>N;){let{id:L,start:le,end:ye,size:Oe}=c;if(Oe>4)c.next();else{if(ie>-1&&le<ie)break;ie<0&&(ie=ye-i),K.push(L,le,ye),ae++,c.next()}}if(ae){let L=new Uint16Array(ae*4),le=K[K.length-2];for(let ye=K.length-3,Oe=0;ye>=0;ye-=3)L[Oe++]=K[ye],L[Oe++]=K[ye+1]-le,L[Oe++]=K[ye+2]-le,L[Oe++]=Oe;j.push(new zo(L,K[2]-le,r)),W.push(le-T)}}function v(T,N){return(j,W,K)=>{let ae=0,ie=j.length-1,L,le;if(ie>=0&&(L=j[ie])instanceof ln){if(!ie&&L.type==T&&L.length==K)return L;(le=L.prop(kt.lookAhead))&&(ae=W[ie]+L.length+le)}return k(T,j,W,K,ae,N)}}function w(T,N,j,W,K,ae,ie,L,le){let ye=[],Oe=[];for(;T.length>W;)ye.push(T.pop()),Oe.push(N.pop()+j-K);T.push(k(r.types[ie],ye,Oe,ae-K,L-ae,le)),N.push(K-j)}function k(T,N,j,W,K,ae,ie){if(ae){let L=[kt.contextHash,ae];ie=ie?[L].concat(ie):[L]}if(K>25){let L=[kt.lookAhead,K];ie=ie?[L].concat(ie):[L]}return new ln(T,N,j,W,ie)}function $(T,N){let j=c.fork(),W=0,K=0,ae=0,ie=j.end-i,L={size:0,start:0,skip:0};e:for(let le=j.pos-T;j.pos>le;){let ye=j.size;if(j.id==N&&ye>=0){L.size=W,L.start=K,L.skip=ae,ae+=4,W+=4,j.next();continue}let Oe=j.pos-ye;if(ye<0||Oe<le||j.start<ie)break;let $e=j.id>=a?4:0,pe=j.start;for(j.next();j.pos>Oe;){if(j.size<0)if(j.size==-3||j.size==-4)$e+=4;else break e;else j.id>=a&&($e+=4);j.next()}K=pe,W+=ye,ae+=$e}return(N<0||W==T)&&(L.size=W,L.start=K,L.skip=ae),L.size>4?L:void 0}function M(T,N,j){let{id:W,start:K,end:ae,size:ie}=c;if(c.next(),ie>=0&&W<a){let L=j;if(ie>4){let le=c.pos-(ie-4);for(;c.pos>le;)j=M(T,N,j)}N[--j]=L,N[--j]=ae-T,N[--j]=K-T,N[--j]=W}else ie==-3?h=W:ie==-4&&(m=W);return j}let V=[],A=[];for(;c.pos>0;)O(n.start||0,n.bufferStart||0,V,A,-1,0);let Q=(e=n.length)!==null&&e!==void 0?e:V.length?A[0]+V[0].length:0;return new ln(u[n.topID],V.reverse(),A.reverse(),Q)}const I6=new WeakMap;function Y1(n,e){if(!n.isAnonymous||e instanceof zo||e.type!=n)return 1;let t=I6.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof ln)){t=1;break}t+=Y1(n,r)}I6.set(e,t)}return t}function Sg(n,e,t,r,i,s,a,c,u){let h=0;for(let w=r;w<i;w++)h+=Y1(n,e[w]);let m=Math.ceil(h*1.5/8),O=[],x=[];function v(w,k,$,M,V){for(let A=$;A<M;){let Q=A,T=k[A],N=Y1(n,w[A]);for(A++;A<M;A++){let j=Y1(n,w[A]);if(N+j>=m)break;N+=j}if(A==Q+1){if(N>m){let j=w[Q];v(j.children,j.positions,0,j.children.length,k[Q]+V);continue}O.push(w[Q])}else{let j=k[A-1]+w[A-1].length-T;O.push(Sg(n,w,k,Q,A,T,j,null,u))}x.push(T+V-s)}}return v(e,t,r,i,0),(c||u)(O,x,a)}class ob{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof xs?this.setBuffer(e.context.buffer,e.index,t):e instanceof pr&&this.map.set(e.tree,t)}get(e){return e instanceof xs?this.getBuffer(e.context.buffer,e.index):e instanceof pr?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Us{constructor(e,t,r,i,s=!1,a=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new Us(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,a=e.length?e[0]:null;for(let c=0,u=0,h=0;;c++){let m=c<t.length?t[c]:null,O=m?m.fromA:1e9;if(O-u>=r)for(;a&&a.from<O;){let x=a;if(u>=x.from||O<=x.to||h){let v=Math.max(x.from,u)-h,w=Math.min(x.to,O)-h;x=v>=w?null:new Us(v,w,x.tree,x.offset+h,c>0,!!m)}if(x&&i.push(x),a.to>O)break;a=s<e.length?e[s++]:null}if(!m)break;u=m.toA,h=m.toA-m.toB}return i}}class ab{startParse(e,t,r){return typeof e=="string"&&(e=new tE(e)),r=r?r.length?r.map(i=>new bi(i.from,i.to)):[new bi(0,0)]:[new bi(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class tE{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function nE(n){return(e,t,r,i)=>new iE(e,n,t,r,i)}class X6{constructor(e,t,r,i,s,a){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=a}}function F6(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class rE{constructor(e,t,r,i,s,a,c,u){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=a,this.target=c,this.prev=u,this.depth=0,this.ranges=[]}}const m2=new kt({perNode:!0});class iE{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new ln(r.type,r.children,r.positions,r.length,r.propValues.concat([[m2,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[kt.mounted.id]=new Vl(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new aE(this.fragments),t=null,r=null,i=new md(new pr(this.baseTree,this.ranges[0].from,0,null),qt.IncludeAnonymous|qt.IgnoreMounts);e:for(let s,a;;){let c=!0,u;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)c=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(m=>m.frag.from<=i.from&&m.frag.to>=i.to&&m.mount.overlay);if(h)for(let m of h.mount.overlay){let O=m.from+h.pos,x=m.to+h.pos;O>=i.from&&x<=i.to&&!t.ranges.some(v=>v.from<x&&v.to>O)&&t.ranges.push({from:O,to:x})}}c=!1}else if(r&&(a=sE(r.ranges,i.from,i.to)))c=a!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(oE(i),t&&t.depth++,r&&r.depth++);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new rE(s.parser,s.overlay,h,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let m=W6(this.ranges,s.overlay||(i.from<i.to?[new bi(i.from,i.to)]:[]));m.length&&F6(m),(m.length||!s.overlay)&&this.inner.push(new X6(s.parser,m.length?s.parser.startParse(this.input,B6(h,m),m):s.parser.startParse(""),s.overlay?s.overlay.map(O=>new bi(O.from-i.from,O.to-i.from)):null,!!s.bracketed,i.tree,m.length?m[0].from:i.from)),s.overlay?m.length&&(r={ranges:m,depth:0,prev:r}):c=!1}}else if(t&&(u=t.predicate(i))&&(u===!0&&(u=new bi(i.from,i.to)),u.from<u.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==u.from?t.ranges[h]={from:t.ranges[h].from,to:u.to}:t.ranges.push(u)}if(c&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=W6(this.ranges,t.ranges);h.length&&(F6(h),this.inner.splice(t.index,0,new X6(t.parser,t.parser.startParse(this.input,B6(t.mounts,h),h),t.ranges.map(m=>new bi(m.from-t.start,m.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function sE(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function z6(n,e,t,r,i,s){if(e<t){let a=n.buffer[e+1];r.push(n.slice(e,t,a)),i.push(a-s)}}function oE(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),a=i.children[s],c=a.buffer,u=[s];function h(m,O,x,v,w,k){let $=t[k],M=[],V=[];z6(a,m,$,M,V,v);let A=c[$+1],Q=c[$+2];u.push(M.length);let T=k?h($+4,c[$+3],a.set.types[c[$]],A,Q-A,k-1):e.toTree();return M.push(T),V.push(A-v),z6(a,c[$+3],O,M,V,v),new ln(x,M,V,w)}i.children[s]=h(0,c.length,Er.none,0,a.length,t.length-1);for(let m of u){let O=n.tree.children[m],x=n.tree.positions[m];n.yield(new pr(O,x+n.from,m,n._tree))}}class H6{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(qt.IncludeAnonymous|qt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,qt.IgnoreOverlays|qt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof ln)t=t.children[0];else break}return!1}}let aE=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(m2))!==null&&t!==void 0?t:r.to,this.inner=new H6(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(m2))!==null&&e!==void 0?e:t.to,this.inner=new H6(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(r=s.tree)===null||r===void 0?void 0:r.prop(kt.mounted);if(a&&a.parser==t)for(let c=this.fragI;c<this.fragments.length;c++){let u=this.fragments[c];if(u.from>=s.to)break;u.tree==this.curFrag.tree&&i.push({frag:u,pos:s.from-u.offset,mount:a})}}}return i}};function W6(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let a=n[i-1].to,c=n[i].from;for(;s<r.length;s++){let u=r[s];if(u.from>=c)break;u.to<=a||(t||(r=t=e.slice()),u.from<a?(t[s]=new bi(u.from,a),u.to>c&&t.splice(s+1,0,new bi(c,u.to))):u.to>c?t[s--]=new bi(c,u.to):t.splice(s--,1))}}return r}function lE(n,e,t,r){let i=0,s=0,a=!1,c=!1,u=-1e9,h=[];for(;;){let m=i==n.length?1e9:a?n[i].to:n[i].from,O=s==e.length?1e9:c?e[s].to:e[s].from;if(a!=c){let x=Math.max(u,t),v=Math.min(m,O,r);x<v&&h.push(new bi(x,v))}if(u=Math.min(m,O),u==1e9)break;m==u&&(a?(a=!1,i++):a=!0),O==u&&(c?(c=!1,s++):c=!0)}return h}function B6(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let a=r+(i.overlay?i.overlay[0].from:0),c=a+i.tree.length,u=Math.max(s.from,a),h=Math.min(s.to,c);if(i.overlay){let m=i.overlay.map(x=>new bi(x.from+r,x.to+r)),O=lE(e,m,u,h);for(let x=0,v=u;;x++){let w=x==O.length,k=w?h:O[x].from;if(k>v&&t.push(new Us(v,k,i.tree,-a,s.from>=v||s.openStart,s.to<=k||s.openEnd)),w)break;v=O[x].to}}else t.push(new Us(u,h,i.tree,-a,s.from>=a||s.openStart,s.to<=c||s.openEnd))}return t}let cE=0;class yi{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=cE++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof yi&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new yi(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new gd(e);return r=>r.modified.indexOf(t)>-1?r:gd.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let uE=0;class gd{constructor(e){this.name=e,this.instances=[],this.id=uE++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(c=>c.base==e&&dE(t,c.modified));if(r)return r;let i=[],s=new yi(e.name,i,e,t);for(let c of t)c.instances.push(s);let a=fE(t);for(let c of e.set)if(!c.modified.length)for(let u of a)i.push(gd.get(c,u));return s}}function dE(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function fE(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function qd(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],a=2,c=i;for(let O=0;;){if(c=="..."&&O>0&&O+3==i.length){a=1;break}let x=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!x)throw new RangeError("Invalid path: "+i);if(s.push(x[0]=="*"?"":x[0][0]=='"'?JSON.parse(x[0]):x[0]),O+=x[0].length,O==i.length)break;let v=i[O++];if(O==i.length&&v=="!"){a=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);c=i.slice(O)}let u=s.length-1,h=s[u];if(!h)throw new RangeError("Invalid path: "+i);let m=new Tu(r,a,u>0?s.slice(0,u):null);e[h]=m.sort(e[h])}}return lb.add(e)}const lb=new kt({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new Tu(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class Tu{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Tu.empty=new Tu([],2,null);function cb(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let a of s.tag)t[a.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let a=i;for(let c of s)for(let u of c.set){let h=t[u.id];if(h){a=a?a+" "+h:h;break}}return a},scope:r}}function hE(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function pE(n,e,t,r=0,i=n.length){let s=new mE(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class mE{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:a,from:c,to:u}=e;if(c>=r||u<=t)return;a.isTop&&(s=this.highlighters.filter(v=>!v.scope||v.scope(a)));let h=i,m=gE(e)||Tu.empty,O=hE(s,m.tags);if(O&&(h&&(h+=" "),h+=O,m.mode==1&&(i+=(i?" ":"")+O)),this.startSpan(Math.max(t,c),h),m.opaque)return;let x=e.tree&&e.tree.prop(kt.mounted);if(x&&x.overlay){let v=e.node.enter(x.overlay[0].from+c,1),w=this.highlighters.filter($=>!$.scope||$.scope(x.tree.type)),k=e.firstChild();for(let $=0,M=c;;$++){let V=$<x.overlay.length?x.overlay[$]:null,A=V?V.from+c:u,Q=Math.max(t,M),T=Math.min(r,A);if(Q<T&&k)for(;e.from<T&&(this.highlightRange(e,Q,T,i,s),this.startSpan(Math.min(T,e.to),h),!(e.to>=A||!e.nextSibling())););if(!V||A>r)break;M=V.to+c,M>t&&(this.highlightRange(v.cursor(),Math.max(t,V.from+c),Math.min(r,M),"",w),this.startSpan(Math.min(r,M),h))}k&&e.parent()}else if(e.firstChild()){x&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function gE(n){let e=n.type.prop(lb);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Qe=yi.define,g1=Qe(),Mo=Qe(),Y6=Qe(Mo),q6=Qe(Mo),Qo=Qe(),O1=Qe(Qo),Ep=Qe(Qo),fs=Qe(),ha=Qe(fs),cs=Qe(),us=Qe(),g2=Qe(),Bc=Qe(g2),x1=Qe(),F={comment:g1,lineComment:Qe(g1),blockComment:Qe(g1),docComment:Qe(g1),name:Mo,variableName:Qe(Mo),typeName:Y6,tagName:Qe(Y6),propertyName:q6,attributeName:Qe(q6),className:Qe(Mo),labelName:Qe(Mo),namespace:Qe(Mo),macroName:Qe(Mo),literal:Qo,string:O1,docString:Qe(O1),character:Qe(O1),attributeValue:Qe(O1),number:Ep,integer:Qe(Ep),float:Qe(Ep),bool:Qe(Qo),regexp:Qe(Qo),escape:Qe(Qo),color:Qe(Qo),url:Qe(Qo),keyword:cs,self:Qe(cs),null:Qe(cs),atom:Qe(cs),unit:Qe(cs),modifier:Qe(cs),operatorKeyword:Qe(cs),controlKeyword:Qe(cs),definitionKeyword:Qe(cs),moduleKeyword:Qe(cs),operator:us,derefOperator:Qe(us),arithmeticOperator:Qe(us),logicOperator:Qe(us),bitwiseOperator:Qe(us),compareOperator:Qe(us),updateOperator:Qe(us),definitionOperator:Qe(us),typeOperator:Qe(us),controlOperator:Qe(us),punctuation:g2,separator:Qe(g2),bracket:Bc,angleBracket:Qe(Bc),squareBracket:Qe(Bc),paren:Qe(Bc),brace:Qe(Bc),content:fs,heading:ha,heading1:Qe(ha),heading2:Qe(ha),heading3:Qe(ha),heading4:Qe(ha),heading5:Qe(ha),heading6:Qe(ha),contentSeparator:Qe(fs),list:Qe(fs),quote:Qe(fs),emphasis:Qe(fs),strong:Qe(fs),link:Qe(fs),monospace:Qe(fs),strikethrough:Qe(fs),inserted:Qe(),deleted:Qe(),changed:Qe(),invalid:Qe(),meta:x1,documentMeta:Qe(x1),annotation:Qe(x1),processingInstruction:Qe(x1),definition:yi.defineModifier("definition"),constant:yi.defineModifier("constant"),function:yi.defineModifier("function"),standard:yi.defineModifier("standard"),local:yi.defineModifier("local"),special:yi.defineModifier("special")};for(let n in F){let e=F[n];e instanceof yi&&(e.name=n)}cb([{tag:F.link,class:"tok-link"},{tag:F.heading,class:"tok-heading"},{tag:F.emphasis,class:"tok-emphasis"},{tag:F.strong,class:"tok-strong"},{tag:F.keyword,class:"tok-keyword"},{tag:F.atom,class:"tok-atom"},{tag:F.bool,class:"tok-bool"},{tag:F.url,class:"tok-url"},{tag:F.labelName,class:"tok-labelName"},{tag:F.inserted,class:"tok-inserted"},{tag:F.deleted,class:"tok-deleted"},{tag:F.literal,class:"tok-literal"},{tag:F.string,class:"tok-string"},{tag:F.number,class:"tok-number"},{tag:[F.regexp,F.escape,F.special(F.string)],class:"tok-string2"},{tag:F.variableName,class:"tok-variableName"},{tag:F.local(F.variableName),class:"tok-variableName tok-local"},{tag:F.definition(F.variableName),class:"tok-variableName tok-definition"},{tag:F.special(F.variableName),class:"tok-variableName2"},{tag:F.definition(F.propertyName),class:"tok-propertyName tok-definition"},{tag:F.typeName,class:"tok-typeName"},{tag:F.namespace,class:"tok-namespace"},{tag:F.className,class:"tok-className"},{tag:F.macroName,class:"tok-macroName"},{tag:F.propertyName,class:"tok-propertyName"},{tag:F.operator,class:"tok-operator"},{tag:F.comment,class:"tok-comment"},{tag:F.meta,class:"tok-meta"},{tag:F.invalid,class:"tok-invalid"},{tag:F.punctuation,class:"tok-punctuation"}]);var Tp;const $l=new kt;function ub(n){return Ye.define({combine:n?e=>e.concat(n):void 0})}const kg=new kt;class _i{constructor(e,t,r=[],i=""){this.data=e,this.name=i,It.prototype.hasOwnProperty("tree")||Object.defineProperty(It.prototype,"tree",{get(){return An(this)}}),this.parser=t,this.extension=[Ho.of(this),It.languageData.of((s,a,c)=>{let u=U6(s,a,c),h=u.type.prop($l);if(!h)return[];let m=s.facet(h),O=u.type.prop(kg);if(O){let x=u.resolve(a-u.from,c);for(let v of O)if(v.test(x,s)){let w=s.facet(v.facet);return v.type=="replace"?w:w.concat(m)}}return m})].concat(r)}isActiveAt(e,t,r=-1){return U6(e,t,r).type.prop($l)==this.data}findRegions(e){let t=e.facet(Ho);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,a)=>{if(s.prop($l)==this.data){r.push({from:a,to:a+s.length});return}let c=s.prop(kt.mounted);if(c){if(c.tree.prop($l)==this.data){if(c.overlay)for(let u of c.overlay)r.push({from:u.from+a,to:u.to+a});else r.push({from:a,to:a+s.length});return}else if(c.overlay){let u=r.length;if(i(c.tree,c.overlay[0].from+a),r.length>u)return}}for(let u=0;u<s.children.length;u++){let h=s.children[u];h instanceof ln&&i(h,s.positions[u]+a)}};return i(An(e),0),r}get allowsNesting(){return!0}}_i.setState=Ft.define();function U6(n,e,t){let r=n.facet(Ho),i=An(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,qt.ExcludeBuffers|qt.EnterBracketed))s.type.isTop&&(i=s);return i}class Hl extends _i{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=ub(e.languageData);return new Hl(t,e.parser.configure({props:[$l.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new Hl(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function An(n){let e=n.field(_i.state,!1);return e?e.tree:ln.empty}class OE{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Yc=null;class Od{constructor(e,t,r=[],i,s,a,c,u){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=a,this.skipped=c,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Od(e,t,[],ln.empty,0,r,[],null)}startParse(){return this.parser.startParse(new OE(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=ln.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Us.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Us.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Yc;Yc=this;try{return e()}finally{Yc=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=G6(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:a,skipped:c}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((h,m,O,x)=>u.push({fromA:h,toA:m,fromB:O,toB:x})),r=Us.applyChanges(r,u),i=ln.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){c=[];for(let h of this.skipped){let m=e.mapPos(h.from,1),O=e.mapPos(h.to,-1);m<O&&c.push({from:m,to:O})}}}return new Od(this.parser,t,r,i,s,a,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=G6(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ab{createParse(t,r,i){let s=i[0].from,a=i[i.length-1].to;return{parsedPos:s,advance(){let u=Yc;if(u){for(let h of i)u.tempSkipped.push(h);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=a,new ln(Er.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Yc}}function G6(n,e,t){return Us.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Wl{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Wl(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Od.create(e.facet(Ho).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Wl(r)}}_i.state=si.define({create:Wl.init,update(n,e){for(let t of e.effects)if(t.is(_i.setState))return t.value;return e.startState.facet(Ho)!=e.state.facet(Ho)?Wl.init(e.state):n.apply(e)}});let db=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(db=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Mp=typeof navigator<"u"&&(!((Tp=navigator.scheduling)===null||Tp===void 0)&&Tp.isInputPending)?()=>navigator.scheduling.isInputPending():null,xE=Hr.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(_i.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(_i.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=db(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(_i.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Mp?Math.max(25,e.timeRemaining()-5):1e9),c=s.context.treeLen<i&&r.doc.length>i+1e3,u=s.context.work(()=>Mp&&Mp()||Date.now()>a,i+(c?0:1e5));this.chunkBudget-=Date.now()-t,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:_i.setState.of(new Wl(s.context))})),this.chunkBudget>0&&!(u&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Os(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ho=Ye.define({combine(n){return n.length?n[0]:null},enables:n=>[_i.state,xE,Be.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Pg{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const yE=Ye.define(),Ud=Ye.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function xd(n){let e=n.facet(Ud);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Mu(n,e){let t="",r=n.tabSize,i=n.facet(Ud)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function Ag(n,e){n instanceof It&&(n=new Gd(n));for(let r of n.state.facet(yE)){let i=r(n,e);if(i!==void 0)return i}let t=An(n.state);return t.length>=e?vE(n,t,e):null}class Gd{constructor(e,t={}){this.state=e,this.options=t,this.unit=xd(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return Fd(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let a=s(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Kd=new kt;function vE(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let a=i;a&&!(a.from<r.node.from||a.to>r.node.to||a.from==r.node.from&&a.type==r.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)r={node:s[a],next:r}}return fb(r,n,t)}function fb(n,e,t){for(let r=n;r;r=r.next){let i=wE(r.node);if(i)return i($g.create(e,t,r))}return 0}function bE(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function wE(n){let e=n.type.prop(Kd);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(kt.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return a=>hb(a,!0,1,void 0,s&&!bE(a)?i.from:void 0)}return n.parent==null?SE:null}function SE(){return 0}class $g extends Gd{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new $g(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(kE(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return fb(this.context.next,this.base,this.pos)}}function kE(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function PE(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),a=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let c=t.to;;){let u=e.childAfter(c);if(!u||u==r)return null;if(!u.type.isSkipped){if(u.from>=a)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}c=u.to}}function AE({closing:n,align:e=!0,units:t=1}){return r=>hb(r,e,t,n)}function hb(n,e,t,r,i){let s=n.textAfter,a=s.match(/^\s*/)[0].length,c=r&&s.slice(a,a+r.length)==r||i==n.pos+a,u=e?PE(n):null;return u?c?n.column(u.from):n.column(u.to):n.baseIndent+(c?0:n.unit*t)}const $E=n=>n.baseIndent;function q1({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const CE=200;function EE(){return It.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+CE)return n;let s=t.sliceString(i.from,r);if(!e.some(h=>h.test(s)))return n;let{state:a}=n,c=-1,u=[];for(let{head:h}of a.selection.ranges){let m=a.doc.lineAt(h);if(m.from==c)continue;c=m.from;let O=Ag(a,m.from);if(O==null)continue;let x=/^\s*/.exec(m.text)[0],v=Mu(a,O);x!=v&&u.push({from:m.from,to:m.from+x.length,insert:v})}return u.length?[n,{changes:u,sequential:!0}]:n})}const TE=Ye.define(),Jd=new kt;function pb(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function ME(n,e,t){let r=An(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let a=i;a;a=a.next){let c=a.node;if(c.to<=t||c.from>t)continue;if(s&&c.from<e)break;let u=c.type.prop(Jd);if(u&&(c.to<r.length-50||r.length==n.doc.length||!QE(c))){let h=u(c,n);h&&h.from<=t&&h.from>=e&&h.to>t&&(s=h)}}return s}function QE(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function K6(n,e,t){for(let r of n.facet(TE)){let i=r(n,e,t);if(i)return i}return ME(n,e,t)}function mb(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const gb=Ft.define({map:mb}),Cg=Ft.define({map:mb}),yd=si.define({create(){return Ot.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=J6(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(gb)&&!jE(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(Ob),i=r?Ot.replace({widget:new NE(r(e.state,t.value))}):ex;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(Cg)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=J6(n,e.selection.main.head)),n},provide:n=>Be.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(ex.range(r,i))}return Ot.set(e,!0)}});function J6(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function O2(n,e,t){var r;let i=null;return(r=n.field(yd,!1))===null||r===void 0||r.between(e,t,(s,a)=>{(!i||i.from>s)&&(i={from:s,to:a})}),i}function jE(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}const ZE={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Ob=Ye.define({combine(n){return ec(n,ZE)}});function RE(n){return[yd,_E]}function xb(n,e){let{state:t}=n,r=t.facet(Ob),i=a=>{let c=n.lineBlockAt(n.posAtDOM(a.target)),u=O2(n.state,c.from,c.to);u&&n.dispatch({effects:Cg.of(u)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const ex=Ot.replace({widget:new class extends La{toDOM(n){return xb(n,null)}}});class NE extends La{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return xb(e,this.value)}}const LE={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Qp extends Js{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function VE(n={}){let e={...LE,...n},t=new Qp(e,!0),r=new Qp(e,!1),i=Hr.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Ho)!=a.state.facet(Ho)||a.startState.field(yd,!1)!=a.state.field(yd,!1)||An(a.startState)!=An(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new Aa;for(let u of a.viewportLineBlocks){let h=O2(a.state,u.from,u.to)?r:K6(a.state,u.from,u.to)?t:null;h&&c.add(u.from,u.from,h)}return c.finish()}}),{domEventHandlers:s}=e;return[i,VC({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(i))===null||c===void 0?void 0:c.markers)||Mt.empty},initialSpacer(){return new Qp(e,!1)},domEventHandlers:{...s,click:(a,c,u)=>{if(s.click&&s.click(a,c,u))return!0;let h=O2(a.state,c.from,c.to);if(h)return a.dispatch({effects:Cg.of(h)}),!0;let m=K6(a.state,c.from,c.to);return m?(a.dispatch({effects:gb.of(m)}),!0):!1}}}),RE()]}const _E=Be.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ef{constructor(e,t){this.specs=e;let r;function i(c){let u=Io.newName();return(r||(r=Object.create(null)))["."+u]=c,u}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,a=t.scope;this.scope=a instanceof _i?c=>c.prop($l)==a.data:a?c=>c==a:void 0,this.style=cb(e.map(c=>({tag:c.tag,class:c.class||i(Object.assign({},c,{tag:null}))})),{all:s}).style,this.module=r?new Io(r):null,this.themeType=t.themeType}static define(e,t){return new ef(e,t||{})}}const x2=Ye.define(),DE=Ye.define({combine(n){return n.length?[n[0]]:null}});function jp(n){let e=n.facet(x2);return e.length?e:n.facet(DE)}function IE(n,e){let t=[FE],r;return n instanceof ef&&(n.module&&t.push(Be.styleModule.of(n.module)),r=n.themeType),r?t.push(x2.computeN([Be.darkTheme],i=>i.facet(Be.darkTheme)==(r=="dark")?[n]:[])):t.push(x2.of(n)),t}class XE{constructor(e){this.markCache=Object.create(null),this.tree=An(e.state),this.decorations=this.buildDeco(e,jp(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=An(e.state),r=jp(e.state),i=r!=jp(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ot.none;let r=new Aa;for(let{from:i,to:s}of e.visibleRanges)pE(this.tree,t,(a,c,u)=>{r.add(a,c,this.markCache[u]||(this.markCache[u]=Ot.mark({class:u})))},i,s);return r.finish()}}const FE=Iu.high(Hr.fromClass(XE,{decorations:n=>n.decorations})),zE=Be.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),yb=1e4,vb="()[]{}",bb=Ye.define({combine(n){return ec(n,{afterCursor:!0,brackets:vb,maxScanDistance:yb,renderMatch:BE})}}),HE=Ot.mark({class:"cm-matchingBracket"}),WE=Ot.mark({class:"cm-nonmatchingBracket"});function BE(n){let e=[],t=n.matched?HE:WE;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}function tx(n){let e=[],t=n.facet(bb);for(let r of n.selection.ranges){if(!r.empty)continue;let i=ys(n,r.head,-1,t)||r.head>0&&ys(n,r.head-1,1,t)||t.afterCursor&&(ys(n,r.head,1,t)||r.head<n.doc.length&&ys(n,r.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,n)))}return Ot.set(e,!0)}const YE=Hr.fromClass(class{constructor(n){this.paused=!1,this.decorations=tx(n.state)}update(n){(n.docChanged||n.selectionSet||this.paused)&&(n.view.composing?(this.decorations=this.decorations.map(n.changes),this.paused=!0):(this.decorations=tx(n.state),this.paused=!1))}},{decorations:n=>n.decorations}),qE=[YE,zE];function UE(n={}){return[bb.of(n),qE]}const wb=new kt;function y2(n,e,t){let r=n.prop(e<0?kt.openedBy:kt.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function v2(n){let e=n.type.prop(wb);return e?e(n.node):n}function ys(n,e,t,r={}){let i=r.maxScanDistance||yb,s=r.brackets||vb,a=An(n),c=a.resolveInner(e,t);for(let u=c;u;u=u.parent){let h=y2(u.type,t,s);if(h&&u.from<u.to){let m=v2(u);if(m&&(t>0?e>=m.from&&e<m.to:e>m.from&&e<=m.to))return GE(n,e,t,u,m,h,s)}}return KE(n,e,t,a,c.type,i,s)}function GE(n,e,t,r,i,s,a){let c=r.parent,u={from:i.from,to:i.to},h=0,m=c==null?void 0:c.cursor();if(m&&(t<0?m.childBefore(r.from):m.childAfter(r.to)))do if(t<0?m.to<=r.from:m.from>=r.to){if(h==0&&s.indexOf(m.type.name)>-1&&m.from<m.to){let O=v2(m);return{start:u,end:O?{from:O.from,to:O.to}:void 0,matched:!0}}else if(y2(m.type,t,a))h++;else if(y2(m.type,-t,a)){if(h==0){let O=v2(m);return{start:u,end:O&&O.from<O.to?{from:O.from,to:O.to}:void 0,matched:!1}}h--}}while(t<0?m.prevSibling():m.nextSibling());return{start:u,matched:!1}}function KE(n,e,t,r,i,s,a){let c=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),u=a.indexOf(c);if(u<0||u%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},m=n.doc.iterRange(e,t>0?n.doc.length:0),O=0;for(let x=0;!m.next().done&&x<=s;){let v=m.value;t<0&&(x+=v.length);let w=e+x*t;for(let k=t>0?0:v.length-1,$=t>0?v.length:-1;k!=$;k+=t){let M=a.indexOf(v[k]);if(!(M<0||r.resolveInner(w+k,1).type!=i))if(M%2==0==t>0)O++;else{if(O==1)return{start:h,end:{from:w+k,to:w+k+1},matched:M>>1==u>>1};O--}}t>0&&(x+=v.length)}return m.done?{start:h,matched:!1}:null}const JE=Object.create(null),nx=[Er.none],rx=[],ix=Object.create(null),eT=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])eT[n]=tT(JE,e);function Zp(n,e){rx.indexOf(n)>-1||(rx.push(n),console.warn(e))}function tT(n,e){let t=[];for(let c of e.split(" ")){let u=[];for(let h of c.split(".")){let m=n[h]||F[h];m?typeof m=="function"?u.length?u=u.map(m):Zp(h,`Modifier ${h} used at start of tag`):u.length?Zp(h,`Tag ${h} used as modifier`):u=Array.isArray(m)?m:[m]:Zp(h,`Unknown highlighting tag ${h}`)}for(let h of u)t.push(h)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(c=>c.id),s=ix[i];if(s)return s.id;let a=ix[i]=Er.define({id:nx.length,name:r,props:[qd({[r]:t})]});return nx.push(a),a.id}Pn.RTL,Pn.LTR;const nT=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=Tg(n.state,t.from);return r.line?rT(n):r.block?sT(n):!1};function Eg(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const rT=Eg(lT,0),iT=Eg(Sb,0),sT=Eg((n,e)=>Sb(n,e,aT(e)),0);function Tg(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const qc=50;function oT(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-qc,r),a=n.sliceDoc(i,i+qc),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(a)[0].length,h=s.length-c;if(s.slice(h-e.length,h)==e&&a.slice(u,u+t.length)==t)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};let m,O;i-r<=2*qc?m=O=n.sliceDoc(r,i):(m=n.sliceDoc(r,r+qc),O=n.sliceDoc(i-qc,i));let x=/^\s*/.exec(m)[0].length,v=/\s*$/.exec(O)[0].length,w=O.length-v-t.length;return m.slice(x,x+e.length)==e&&O.slice(w,w+t.length)==t?{open:{pos:r+x+e.length,margin:/\s/.test(m.charAt(x+e.length))?1:0},close:{pos:i-v-t.length,margin:/\s/.test(O.charAt(w-1))?1:0}}:null}function aT(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function Sb(n,e,t=e.selection.ranges){let r=t.map(s=>Tg(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,a)=>oT(e,r[a],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,a)=>i[a]?[]:[{from:s.from,insert:r[a].open+" "},{from:s.to,insert:" "+r[a].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let a=0,c;a<i.length;a++)if(c=i[a]){let u=r[a],{open:h,close:m}=c;s.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:m.pos-m.margin,to:m.pos+u.close.length})}return{changes:s}}return null}function lT(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:a}of t){let c=r.length,u=1e9,h;for(let m=s;m<=a;){let O=e.doc.lineAt(m);if(h==null&&(h=Tg(e,O.from).line,!h))continue e;if(O.from>i&&(s==a||a>O.from)){i=O.from;let x=/^\s*/.exec(O.text)[0].length,v=x==O.length,w=O.text.slice(x,x+h.length)==h?x:-1;x<O.text.length&&x<u&&(u=x),r.push({line:O,comment:w,token:h,indent:x,empty:v,single:!1})}m=O.to+1}if(u<1e9)for(let m=c;m<r.length;m++)r[m].indent<r[m].line.text.length&&(r[m].indent=u);r.length==c+1&&(r[c].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:c,token:u,indent:h,empty:m,single:O}of r)(O||!m)&&s.push({from:c.from+h,insert:u+" "});let a=e.changes(s);return{changes:a,selection:e.selection.map(a,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:c,token:u}of r)if(c>=0){let h=a.from+c,m=h+u.length;a.text[m-a.from]==" "&&m++,s.push({from:h,to:m})}return{changes:s}}return null}const b2=no.define(),cT=no.define(),uT=Ye.define(),kb=Ye.define({combine(n){return ec(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),Pb=si.define({create(){return vs.empty},update(n,e){let t=e.state.facet(kb),r=e.annotation(b2);if(r){let u=Fr.fromTransaction(e,r.selection),h=r.side,m=h==0?n.undone:n.done;return u?m=vd(m,m.length,t.minDepth,u):m=Cb(m,e.startState.selection),new vs(h==0?r.rest:m,h==0?m:r.rest)}let i=e.annotation(cT);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(Tn.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=Fr.fromTransaction(e),a=e.annotation(Tn.time),c=e.annotation(Tn.userEvent);return s?n=n.addChanges(s,a,c,t,e):e.selection&&(n=n.addSelection(e.startState.selection,a,c,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new vs(n.done.map(Fr.fromJSON),n.undone.map(Fr.fromJSON))}});function dT(n={}){return[Pb,kb.of(n),Be.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?Ab:e.inputType=="historyRedo"?w2:null;return r?(e.preventDefault(),r(t)):!1}})]}function tf(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(Pb,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const Ab=tf(0,!1),w2=tf(1,!1),fT=tf(0,!0),hT=tf(1,!0);class Fr{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new Fr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Fr(e.changes&&Nn.fromJSON(e.changes),[],e.mapped&&bs.fromJSON(e.mapped),e.startSelection&&ue.fromJSON(e.startSelection),e.selectionsAfter.map(ue.fromJSON))}static fromTransaction(e,t){let r=wi;for(let i of e.startState.facet(uT)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new Fr(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,wi)}static selection(e){return new Fr(void 0,wi,void 0,void 0,e)}}function vd(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function pT(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,a,c)=>{for(let u=0;u<t.length;){let h=t[u++],m=t[u++];c>=h&&a<=m&&(r=!0)}}),r}function mT(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function $b(n,e){return n.length?e.length?n.concat(e):n:e}const wi=[],gT=200;function Cb(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-gT));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),vd(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Fr.selection([e])]}function OT(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Rp(n,e){if(!n.length)return n;let t=n.length,r=wi;for(;t;){let i=xT(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Fr.selection(r)]:wi}function xT(n,e,t){let r=$b(n.selectionsAfter.length?n.selectionsAfter.map(c=>c.map(e)):wi,t);if(!n.changes)return Fr.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),a=n.mapped?n.mapped.composeDesc(s):s;return new Fr(i,Ft.mapEffects(n.effects,e),a,n.startSelection.map(s),r)}const yT=/^(input\.type|delete)($|\.)/;class vs{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new vs(this.done,this.undone):this}addChanges(e,t,r,i,s){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!r||yT.test(r))&&(!c.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,pT(c.changes,e.changes))||r=="input.type.compose")?a=vd(a,a.length-1,i.minDepth,new Fr(e.changes.compose(c.changes),$b(Ft.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,wi)):a=vd(a,a.length,i.minDepth,e),new vs(a,wi,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:wi;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&mT(s[s.length-1],e)?this:new vs(Cb(this.done,e),this.undone,t,r)}addMapping(e){return new vs(Rp(this.done,e),Rp(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],a=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:b2.of({side:e,rest:OT(i),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let c=i.length==1?wi:i.slice(0,i.length-1);return s.mapped&&(c=Rp(c,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:b2.of({side:e,rest:c,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}vs.empty=new vs(wi,wi);const vT=[{key:"Mod-z",run:Ab,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:w2,preventDefault:!0},{linux:"Ctrl-Shift-z",run:w2,preventDefault:!0},{key:"Mod-u",run:fT,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:hT,preventDefault:!0}];function tc(n,e){return ue.create(n.ranges.map(e),n.mainIndex)}function Ii(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Xi({state:n,dispatch:e},t){let r=tc(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Ii(n,r)),!0)}function nf(n,e){return ue.cursor(e?n.to:n.from)}function Eb(n,e){return Xi(n,t=>t.empty?n.moveByChar(t,e):nf(t,e))}function mr(n){return n.textDirectionAt(n.state.selection.main.head)==Pn.LTR}const Tb=n=>Eb(n,!mr(n)),Mb=n=>Eb(n,mr(n));function Qb(n,e){return Xi(n,t=>t.empty?n.moveByGroup(t,e):nf(t,e))}const bT=n=>Qb(n,!mr(n)),wT=n=>Qb(n,mr(n));function ST(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function rf(n,e,t){let r=An(n).resolveInner(e.head),i=t?kt.closedBy:kt.openedBy;for(let u=e.head;;){let h=t?r.childAfter(u):r.childBefore(u);if(!h)break;ST(n,h,i)?r=h:u=t?h.to:h.from}let s=r.type.prop(i),a,c;return s&&(a=t?ys(n,r.from,1):ys(n,r.to,-1))&&a.matched?c=t?a.end.to:a.end.from:c=t?r.to:r.from,ue.cursor(c,t?-1:1)}const kT=n=>Xi(n,e=>rf(n.state,e,!mr(n))),PT=n=>Xi(n,e=>rf(n.state,e,mr(n)));function jb(n,e){return Xi(n,t=>{if(!t.empty)return nf(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const Zb=n=>jb(n,!1),Rb=n=>jb(n,!0);function Nb(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(Be.scrollMargins)){let a=s(n);a!=null&&a.top&&(t=Math.max(a==null?void 0:a.top,t)),a!=null&&a.bottom&&(r=Math.max(a==null?void 0:a.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function Lb(n,e){let t=Nb(n),{state:r}=n,i=tc(r.selection,a=>a.empty?n.moveVertically(a,e,t.height):nf(a,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let a=n.coordsAtPos(r.selection.main.head),c=n.scrollDOM.getBoundingClientRect(),u=c.top+t.marginTop,h=c.bottom-t.marginBottom;a&&a.top>u&&a.bottom<h&&(s=Be.scrollIntoView(i.main.head,{y:"start",yMargin:a.top-u}))}return n.dispatch(Ii(r,i),{effects:s}),!0}const sx=n=>Lb(n,!1),S2=n=>Lb(n,!0);function Uo(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=ue.cursor(r.from+s))}return i}const AT=n=>Xi(n,e=>Uo(n,e,!0)),$T=n=>Xi(n,e=>Uo(n,e,!1)),CT=n=>Xi(n,e=>Uo(n,e,!mr(n))),ET=n=>Xi(n,e=>Uo(n,e,mr(n))),TT=n=>Xi(n,e=>ue.cursor(n.lineBlockAt(e.head).from,1)),MT=n=>Xi(n,e=>ue.cursor(n.lineBlockAt(e.head).to,-1));function QT(n,e,t){let r=!1,i=tc(n.selection,s=>{let a=ys(n,s.head,-1)||ys(n,s.head,1)||s.head>0&&ys(n,s.head-1,1)||s.head<n.doc.length&&ys(n,s.head+1,-1);if(!a||!a.end)return s;r=!0;let c=a.start.from==s.head?a.end.to:a.end.from;return ue.cursor(c)});return r?(e(Ii(n,i)),!0):!1}const jT=({state:n,dispatch:e})=>QT(n,e);function Si(n,e){let t=tc(n.state.selection,r=>{let i=e(r);return ue.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return t.eq(n.state.selection)?!1:(n.dispatch(Ii(n.state,t)),!0)}function Vb(n,e){return Si(n,t=>n.moveByChar(t,e))}const _b=n=>Vb(n,!mr(n)),Db=n=>Vb(n,mr(n));function Ib(n,e){return Si(n,t=>n.moveByGroup(t,e))}const ZT=n=>Ib(n,!mr(n)),RT=n=>Ib(n,mr(n)),NT=n=>Si(n,e=>rf(n.state,e,!mr(n))),LT=n=>Si(n,e=>rf(n.state,e,mr(n)));function Xb(n,e){return Si(n,t=>n.moveVertically(t,e))}const Fb=n=>Xb(n,!1),zb=n=>Xb(n,!0);function Hb(n,e){return Si(n,t=>n.moveVertically(t,e,Nb(n).height))}const ox=n=>Hb(n,!1),ax=n=>Hb(n,!0),VT=n=>Si(n,e=>Uo(n,e,!0)),_T=n=>Si(n,e=>Uo(n,e,!1)),DT=n=>Si(n,e=>Uo(n,e,!mr(n))),IT=n=>Si(n,e=>Uo(n,e,mr(n))),XT=n=>Si(n,e=>ue.cursor(n.lineBlockAt(e.head).from)),FT=n=>Si(n,e=>ue.cursor(n.lineBlockAt(e.head).to)),lx=({state:n,dispatch:e})=>(e(Ii(n,{anchor:0})),!0),cx=({state:n,dispatch:e})=>(e(Ii(n,{anchor:n.doc.length})),!0),ux=({state:n,dispatch:e})=>(e(Ii(n,{anchor:n.selection.main.anchor,head:0})),!0),dx=({state:n,dispatch:e})=>(e(Ii(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),zT=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),HT=({state:n,dispatch:e})=>{let t=sf(n).map(({from:r,to:i})=>ue.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:ue.create(t),userEvent:"select"})),!0},WT=({state:n,dispatch:e})=>{let t=tc(n.selection,r=>{let i=An(n),s=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:c}=a;if((c.from<r.from&&c.to>=r.to||c.to>r.to&&c.from<=r.from)&&a.next)return ue.range(c.to,c.from)}return r});return t.eq(n.selection)?!1:(e(Ii(n,t)),!0)};function Wb(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let a=t.doc.lineAt(s.head);if(e?a.to<n.state.doc.length:a.from>0)for(let c=s;;){let u=n.moveVertically(c,e);if(u.head<a.from||u.head>a.to){i.some(h=>h.head==u.head)||i.push(u);break}else{if(u.head==c.head)break;c=u}}}return i.length==r.ranges.length?!1:(n.dispatch(Ii(t,ue.create(i,i.length-1))),!0)}const BT=n=>Wb(n,!1),YT=n=>Wb(n,!0),qT=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=ue.create([t.main]):t.main.empty||(r=ue.create([ue.cursor(t.main.head)])),r?(e(Ii(n,r)),!0):!1};function Hu(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:a,to:c}=s;if(a==c){let u=e(s);u<a?(t="delete.backward",u=y1(n,u,!1)):u>a&&(t="delete.forward",u=y1(n,u,!0)),a=Math.min(a,u),c=Math.max(c,u)}else a=y1(n,a,!1),c=y1(n,c,!0);return a==c?{range:s}:{changes:{from:a,to:c},range:ue.cursor(a,a<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Be.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function y1(n,e,t){if(n instanceof Be)for(let r of n.state.facet(Be.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const Bb=(n,e,t)=>Hu(n,r=>{let i=r.from,{state:s}=n,a=s.doc.lineAt(i),c,u;if(t&&!e&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,i-a.from))){if(c[c.length-1]==" ")return i-1;let h=Fd(c,s.tabSize),m=h%xd(s)||xd(s);for(let O=0;O<m&&c[c.length-1-O]==" ";O++)i--;u=i}else u=Bn(a.text,i-a.from,e,e)+a.from,u==i&&a.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(u-a.from,i-a.from))&&(u=Bn(a.text,u-a.from,!1,!1)+a.from);return u}),k2=n=>Bb(n,!1,!0),Yb=n=>Bb(n,!0,!1),qb=(n,e)=>Hu(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),a=i.charCategorizer(r);for(let c=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let u=Bn(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,u)-s.from,Math.max(r,u)-s.from),m=a(h);if(c!=null&&m!=c)break;(h!=" "||r!=t.head)&&(c=m),r=u}return r}),Ub=n=>qb(n,!1),UT=n=>qb(n,!0),GT=n=>Hu(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),KT=n=>Hu(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),JT=n=>Hu(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),eM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Vt.of(["",""])},range:ue.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},tM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),a=i==s.from?i-1:Bn(s.text,i-s.from,!1)+s.from,c=i==s.to?i+1:Bn(s.text,i-s.from,!0)+s.from;return{changes:{from:a,to:c,insert:n.doc.slice(i,c).append(n.doc.slice(a,i))},range:ue.cursor(c)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function sf(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let a=e[e.length-1];a.to=s.to,a.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function Gb(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of sf(n)){if(t?s.to==n.doc.length:s.from==0)continue;let a=n.doc.lineAt(t?s.to+1:s.from-1),c=a.length+1;if(t){r.push({from:s.to,to:a.to},{from:s.from,insert:a.text+n.lineBreak});for(let u of s.ranges)i.push(ue.range(Math.min(n.doc.length,u.anchor+c),Math.min(n.doc.length,u.head+c)))}else{r.push({from:a.from,to:s.from},{from:s.to,insert:n.lineBreak+a.text});for(let u of s.ranges)i.push(ue.range(u.anchor-c,u.head-c))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:ue.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const nM=({state:n,dispatch:e})=>Gb(n,e,!1),rM=({state:n,dispatch:e})=>Gb(n,e,!0);function Kb(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of sf(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const iM=({state:n,dispatch:e})=>Kb(n,e,!1),sM=({state:n,dispatch:e})=>Kb(n,e,!0),oM=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(sf(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=tc(e.selection,i=>{let s;if(n.lineWrapping){let a=n.lineBlockAt(i.head),c=n.coordsAtPos(i.head,i.assoc||1);c&&(s=a.bottom+n.documentTop-c.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function aM(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=An(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(kt.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const fx=Jb(!1),lM=Jb(!0);function Jb(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:a}=i,c=e.doc.lineAt(s),u=!n&&s==a&&aM(e,s);n&&(s=a=(a<=c.to?c:e.doc.lineAt(a)).to);let h=new Gd(e,{simulateBreak:s,simulateDoubleBreak:!!u}),m=Ag(h,s);for(m==null&&(m=Fd(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;u?{from:s,to:a}=u:s>c.from&&s<c.from+100&&!/\S/.test(c.text.slice(0,s))&&(s=c.from);let O=["",Mu(e,m)];return u&&O.push(Mu(e,h.lineIndent(c.from,-1))),{changes:{from:s,to:a,insert:Vt.of(O)},range:ue.cursor(s+1+O[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Mg(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let c=n.doc.lineAt(a);c.number>t&&(r.empty||r.to>c.from)&&(e(c,i,r),t=c.number),a=c.to+1}let s=n.changes(i);return{changes:i,range:ue.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const cM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Gd(n,{overrideIndentation:s=>{let a=t[s];return a??-1}}),i=Mg(n,(s,a,c)=>{let u=Ag(r,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let h=/^\s*/.exec(s.text)[0],m=Mu(n,u);(h!=m||c.from<s.from+h.length)&&(t[s.from]=u,a.push({from:s.from,to:s.from+h.length,insert:m}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},uM=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Mg(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Ud)})}),{userEvent:"input.indent"})),!0),dM=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Mg(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=Fd(i,n.tabSize),a=0,c=Mu(n,Math.max(0,s-xd(n)));for(;a<i.length&&a<c.length&&i.charCodeAt(a)==c.charCodeAt(a);)a++;r.push({from:t.from+a,to:t.from+i.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),fM=n=>(n.setTabFocusMode(),!0),hM=[{key:"Ctrl-b",run:Tb,shift:_b,preventDefault:!0},{key:"Ctrl-f",run:Mb,shift:Db},{key:"Ctrl-p",run:Zb,shift:Fb},{key:"Ctrl-n",run:Rb,shift:zb},{key:"Ctrl-a",run:TT,shift:XT},{key:"Ctrl-e",run:MT,shift:FT},{key:"Ctrl-d",run:Yb},{key:"Ctrl-h",run:k2},{key:"Ctrl-k",run:GT},{key:"Ctrl-Alt-h",run:Ub},{key:"Ctrl-o",run:eM},{key:"Ctrl-t",run:tM},{key:"Ctrl-v",run:S2}],pM=[{key:"ArrowLeft",run:Tb,shift:_b,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:bT,shift:ZT,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:CT,shift:DT,preventDefault:!0},{key:"ArrowRight",run:Mb,shift:Db,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:wT,shift:RT,preventDefault:!0},{mac:"Cmd-ArrowRight",run:ET,shift:IT,preventDefault:!0},{key:"ArrowUp",run:Zb,shift:Fb,preventDefault:!0},{mac:"Cmd-ArrowUp",run:lx,shift:ux},{mac:"Ctrl-ArrowUp",run:sx,shift:ox},{key:"ArrowDown",run:Rb,shift:zb,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cx,shift:dx},{mac:"Ctrl-ArrowDown",run:S2,shift:ax},{key:"PageUp",run:sx,shift:ox},{key:"PageDown",run:S2,shift:ax},{key:"Home",run:$T,shift:_T,preventDefault:!0},{key:"Mod-Home",run:lx,shift:ux},{key:"End",run:AT,shift:VT,preventDefault:!0},{key:"Mod-End",run:cx,shift:dx},{key:"Enter",run:fx,shift:fx},{key:"Mod-a",run:zT},{key:"Backspace",run:k2,shift:k2,preventDefault:!0},{key:"Delete",run:Yb,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ub,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:UT,preventDefault:!0},{mac:"Mod-Backspace",run:KT,preventDefault:!0},{mac:"Mod-Delete",run:JT,preventDefault:!0}].concat(hM.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),mM=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:kT,shift:NT},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:PT,shift:LT},{key:"Alt-ArrowUp",run:nM},{key:"Shift-Alt-ArrowUp",run:iM},{key:"Alt-ArrowDown",run:rM},{key:"Shift-Alt-ArrowDown",run:sM},{key:"Mod-Alt-ArrowUp",run:BT},{key:"Mod-Alt-ArrowDown",run:YT},{key:"Escape",run:qT},{key:"Mod-Enter",run:lM},{key:"Alt-l",mac:"Ctrl-l",run:HT},{key:"Mod-i",run:WT,preventDefault:!0},{key:"Mod-[",run:dM},{key:"Mod-]",run:uM},{key:"Mod-Alt-\\",run:cM},{key:"Shift-Mod-k",run:oM},{key:"Shift-Mod-\\",run:jT},{key:"Mod-/",run:nT},{key:"Alt-A",run:iT},{key:"Ctrl-m",mac:"Shift-Alt-m",run:fM}].concat(pM);function hx(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function gM(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=hx(e)+hx(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function OM(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:gM(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function xM(n,e){return t=>{for(let r=An(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}const yM=no.define(),vM=Be.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class bM{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class Qg{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,fr.TrackDel),r=e.mapPos(this.to,1,fr.TrackDel);return t==null||r==null?null:new Qg(this.field,t,r)}}class jg{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),a=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(r.length){let h=a,m=/^\t*/.exec(u)[0].length;for(let O=0;O<m;O++)h+=e.facet(Ud);i.push(t+h.length-m),u=h+u.slice(m)}r.push(u),t+=u.length+1}let c=this.fieldPositions.map(u=>new Qg(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:r,ranges:c}}static parse(e){let t=[],r=[],i=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let c=s[1]?+s[1]:null,u=s[2]||s[3]||"",h=-1,m=u.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O<t.length;O++)(c!=null?t[O].seq==c:m&&t[O].name==m)&&(h=O);if(h<0){let O=0;for(;O<t.length&&(c==null||t[O].seq!=null&&t[O].seq<c);)O++;t.splice(O,0,{seq:c,name:m}),h=O;for(let x of i)x.field>=h&&x.field++}for(let O of i)if(O.line==r.length&&O.from>s.index){let x=s[2]?3+(s[1]||"").length:2;O.from-=x,O.to-=x}i.push(new bM(h,r.length,s.index,s.index+m.length)),a=a.slice(0,s.index)+u+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(c,u,h)=>{for(let m of i)m.line==r.length&&m.from>h&&(m.from--,m.to--);return u}),r.push(a)}return new jg(r,i)}}let wM=Ot.widget({widget:new class extends La{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),SM=Ot.mark({class:"cm-snippetField"});class nc{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ot.set(e.map(r=>(r.from==r.to?wM:SM).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new nc(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Wu=Ft.define({map(n,e){return n&&n.map(e)}}),kM=Ft.define(),Qu=si.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Wu))return t.value;if(t.is(kM)&&n)return new nc(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Be.decorations.from(n,e=>e?e.deco:Ot.none)});function Zg(n,e){return ue.create(n.filter(t=>t.field==e).map(t=>ue.range(t.from,t.to)))}function PM(n){let e=jg.parse(n);return(t,r,i,s)=>{let{text:a,ranges:c}=e.instantiate(t.state,i),{main:u}=t.state.selection,h={changes:{from:i,to:s==u.from?u.to:s,insert:Vt.of(a)},scrollIntoView:!0,annotations:r?[yM.of(r),Tn.userEvent.of("input.complete")]:void 0};if(c.length&&(h.selection=Zg(c,0)),c.some(m=>m.field>0)){let m=new nc(c,0),O=h.effects=[Wu.of(m)];t.state.field(Qu,!1)===void 0&&O.push(Ft.appendConfig.of([Qu,TM,MM,vM]))}t.dispatch(t.state.update(h))}}function ew(n){return({state:e,dispatch:t})=>{let r=e.field(Qu,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(a=>a.field==i+n);return t(e.update({selection:Zg(r.ranges,i),effects:Wu.of(s?null:new nc(r.ranges,i)),scrollIntoView:!0})),!0}}const AM=({state:n,dispatch:e})=>n.field(Qu,!1)?(e(n.update({effects:Wu.of(null)})),!0):!1,$M=ew(1),CM=ew(-1),EM=[{key:"Tab",run:$M,shift:CM},{key:"Escape",run:AM}],px=Ye.define({combine(n){return n.length?n[0]:EM}}),TM=Iu.highest(yg.compute([px],n=>n.facet(px)));function Ir(n,e){return{...e,apply:PM(n)}}const MM=Be.domEventHandlers({mousedown(n,e){let t=e.state.field(Qu,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:Zg(t.ranges,i.field),effects:Wu.of(t.ranges.some(s=>s.field>i.field)?new nc(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),ju={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ya=Ft.define({map(n,e){let t=e.mapPos(n,-1,fr.TrackAfter);return t??void 0}}),Rg=new class extends Do{};Rg.startSide=1;Rg.endSide=-1;const tw=si.define({create(){return Mt.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(ya)&&(n=n.update({add:[Rg.range(t.value,t.value+1)]}));return n}});function QM(){return[ZM,tw]}const Np="()[]{}<>«»»«[]{}";function nw(n){for(let e=0;e<Np.length;e+=2)if(Np.charCodeAt(e)==n)return Np.charAt(e+1);return X3(n<128?n:n+1)}function rw(n,e){return n.languageDataAt("closeBrackets",e)[0]||ju}const jM=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ZM=Be.inputHandler.of((n,e,t,r)=>{if((jM?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Du(Na(r,0))==1||e!=i.from||t!=i.to)return!1;let s=LM(n.state,r);return s?(n.dispatch(s),!0):!1}),RM=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=rw(n,n.selection.main.head).brackets||ju.brackets,i=null,s=n.changeByRange(a=>{if(a.empty){let c=VM(n.doc,a.head);for(let u of r)if(u==c&&of(n.doc,a.head)==nw(Na(u,0)))return{changes:{from:a.head-u.length,to:a.head+u.length},range:ue.cursor(a.head-u.length)}}return{range:i=a}});return i||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},NM=[{key:"Backspace",run:RM}];function LM(n,e){let t=rw(n,n.selection.main.head),r=t.brackets||ju.brackets;for(let i of r){let s=nw(Na(i,0));if(e==i)return s==i?IM(n,i,r.indexOf(i+i+i)>-1,t):_M(n,i,s,t.before||ju.before);if(e==s&&iw(n,n.selection.main.from))return DM(n,i,s)}return null}function iw(n,e){let t=!1;return n.field(tw).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function of(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Du(Na(t,0)))}function VM(n,e){let t=n.sliceString(e-2,e);return Du(Na(t,0))==t.length?t:t.slice(1)}function _M(n,e,t,r){let i=null,s=n.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:t,from:a.to}],effects:ya.of(a.to+e.length),range:ue.range(a.anchor+e.length,a.head+e.length)};let c=of(n.doc,a.head);return!c||/\s/.test(c)||r.indexOf(c)>-1?{changes:{insert:e+t,from:a.head},effects:ya.of(a.head+e.length),range:ue.cursor(a.head+e.length)}:{range:i=a}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function DM(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&of(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:ue.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function IM(n,e,t,r){let i=r.stringPrefixes||ju.stringPrefixes,s=null,a=n.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:ya.of(c.to+e.length),range:ue.range(c.anchor+e.length,c.head+e.length)};let u=c.head,h=of(n.doc,u),m;if(h==e){if(mx(n,u))return{changes:{insert:e+e,from:u},effects:ya.of(u+e.length),range:ue.cursor(u+e.length)};if(iw(n,u)){let x=t&&n.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+x.length,insert:x},range:ue.cursor(u+x.length)}}}else{if(t&&n.sliceDoc(u-2*e.length,u)==e+e&&(m=gx(n,u-2*e.length,i))>-1&&mx(n,m))return{changes:{insert:e+e+e+e,from:u},effects:ya.of(u+e.length),range:ue.cursor(u+e.length)};if(n.charCategorizer(u)(h)!=an.Word&&gx(n,u,i)>-1&&!XM(n,u,e,i))return{changes:{insert:e+e,from:u},effects:ya.of(u+e.length),range:ue.cursor(u+e.length)}}return{range:s=c}});return s?null:n.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function mx(n,e){let t=An(n).resolveInner(e+1);return t.parent&&t.from==e}function XM(n,e,t,r){let i=An(n).resolveInner(e,-1),s=r.reduce((a,c)=>Math.max(a,c.length),0);for(let a=0;a<5;a++){let c=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),u=c.indexOf(t);if(!u||u>-1&&r.indexOf(c.slice(0,u))>-1){let m=i.firstChild;for(;m&&m.from==i.from&&m.to-m.from>t.length+u;){if(n.sliceDoc(m.to-t.length,m.to)==t)return!1;m=m.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function gx(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=an.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=an.Word)return s}return-1}const Ox=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class Bl{constructor(e,t,r=0,i=e.length,s,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?c=>s(Ox(c)):Ox,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Na(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=X3(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Du(e);let i=this.normalize(t);if(i.length)for(let s=0,a=r;;s++){let c=i.charCodeAt(s),u=this.match(c,a,this.bufferPos+this.bufferStart);if(s==i.length-1){if(u)return this.value=u,this;break}a==r&&s<t.length&&t.charCodeAt(s)==c&&a++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let a=this.matches[s],c=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,c=!0)),c||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Bl.prototype[Symbol.iterator]=function(){return this});const sw={from:-1,to:-1,match:/.*/.exec("")},Ng="gm"+(/x/.unicode==null?"":"u");class ow{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=sw,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new aw(e,t,r,i,s);this.re=new RegExp(t,Ng+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=bd(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=bd(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Lp=new WeakMap;class _l{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=Lp.get(e);if(!i||i.from>=r||i.to<=t){let c=new _l(t,e.sliceString(t,r));return Lp.set(e,c),c}if(i.from==t&&i.to==r)return i;let{text:s,from:a}=i;return a>t&&(s=e.sliceString(t,a)+s,a=t),i.to<r&&(s+=e.sliceString(i.to,r)),Lp.set(e,new _l(a,s)),new _l(t,s.slice(t-a,r-a))}}class aw{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=sw,this.matchPos=bd(e,i),this.re=new RegExp(t,Ng+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=_l.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=bd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_l.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(ow.prototype[Symbol.iterator]=aw.prototype[Symbol.iterator]=function(){return this});function FM(n){try{return new RegExp(n,Ng),!0}catch{return!1}}function bd(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const zM=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=ZC(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let a=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!a){n.dispatch({effects:r});return}let c=e.doc.lineAt(e.selection.main.head),[,u,h,m,O]=a,x=m?+m.slice(1):0,v=h?+h:c.number;if(h&&O){let $=v/100;u&&($=$*(u=="-"?-1:1)+c.number/e.doc.lines),v=Math.round(e.doc.lines*$)}else h&&u&&(v=v*(u=="-"?-1:1)+c.number);let w=e.doc.line(Math.max(1,Math.min(e.doc.lines,v))),k=ue.cursor(w.from+Math.max(0,Math.min(x,w.length)));n.dispatch({effects:[r,Be.scrollIntoView(k.from,{y:"center"})],selection:k})}),!0},HM={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},WM=Ye.define({combine(n){return ec(n,HM,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function BM(n){return[KM,GM]}const YM=Ot.mark({class:"cm-selectionMatch"}),qM=Ot.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function xx(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=an.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=an.Word)}function UM(n,e,t,r){return n(e.sliceDoc(t,t+1))==an.Word&&n(e.sliceDoc(r-1,r))==an.Word}const GM=Hr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(WM),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ot.none;let i=r.main,s,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ot.none;let u=t.wordAt(i.head);if(!u)return Ot.none;a=t.charCategorizer(i.head),s=t.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<e.minSelectionLength||u>200)return Ot.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),a=t.charCategorizer(i.head),!(xx(a,t,i.from,i.to)&&UM(a,t,i.from,i.to)))return Ot.none}else if(s=t.sliceDoc(i.from,i.to),!s)return Ot.none}let c=[];for(let u of n.visibleRanges){let h=new Bl(t.doc,s,u.from,u.to);for(;!h.next().done;){let{from:m,to:O}=h.value;if((!a||xx(a,t,m,O))&&(i.empty&&m<=i.from&&O>=i.to?c.push(qM.range(m,O)):(m>=i.to||O<=i.from)&&c.push(YM.range(m,O)),c.length>e.maxMatches))return Ot.none}}return Ot.set(c)}},{decorations:n=>n.decorations}),KM=Be.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),JM=({state:n,dispatch:e})=>{let{selection:t}=n,r=ue.create(t.ranges.map(i=>n.wordAt(i.head)||ue.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function eQ(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let a=!1,c=new Bl(n.doc,e,r[r.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new Bl(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(u=>u.from==c.value.from))continue;if(s){let u=n.wordAt(c.value.from);if(!u||u.from!=c.value.from||u.to!=c.value.to)continue}return c.value}}const tQ=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return JM({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=eQ(n,r);return i?(e(n.update({selection:n.selection.addRange(ue.range(i.from,i.to),!1),effects:Be.scrollIntoView(i.to)})),!0):!1},rc=Ye.define({combine(n){return ec(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new mQ(e),scrollToMatch:e=>Be.scrollIntoView(e)})}});class lw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||FM(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?`
|
|
64
|
-
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new aQ(this):new iQ(this)}getCursor(e,t=0,r){let i=e.doc?e:It.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?bl(this,i,t,r):vl(this,i,t,r)}}class cw{constructor(e){this.spec=e}}function nQ(n,e,t){return(r,i,s,a)=>{if(t&&!t(r,i,s,a))return!1;let c=r>=a&&i<=a+s.length?s.slice(r-a,i-a):e.doc.sliceString(r,i);return n(c,e,r,i)}}function vl(n,e,t,r){let i;return n.wholeWord&&(i=rQ(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=nQ(n.test,e,i)),new Bl(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function rQ(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(wd(i,t-s))!=an.Word||e(Sd(i,t-s))!=an.Word)&&(e(Sd(i,r-s))!=an.Word||e(wd(i,r-s))!=an.Word))}class iQ extends cw{constructor(e){super(e)}nextMatch(e,t,r){let i=vl(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=vl(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),a=vl(this.spec,e,s,i),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=vl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=vl(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function sQ(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function bl(n,e,t,r){let i;return n.wholeWord&&(i=oQ(e.charCategorizer(e.selection.main.head))),n.test&&(i=sQ(n.test,e,i)),new ow(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function wd(n,e){return n.slice(Bn(n,e,!1),e)}function Sd(n,e){return n.slice(e,Bn(n,e))}function oQ(n){return(e,t,r)=>!r[0].length||(n(wd(r.input,r.index))!=an.Word||n(Sd(r.input,r.index))!=an.Word)&&(n(Sd(r.input,r.index+r[0].length))!=an.Word||n(wd(r.input,r.index+r[0].length))!=an.Word)}class aQ extends cw{nextMatch(e,t,r){let i=bl(this.spec,e,r,e.doc.length).next();return i.done&&(i=bl(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),a=bl(this.spec,e,s,r),c=null;for(;!a.next().done;)c=a.value;if(c&&(s==t||c.from>s+10))return c;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=bl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=bl(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Zu=Ft.define(),Lg=Ft.define(),_o=si.define({create(n){return new Vp(P2(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Zu)?n=new Vp(t.value.create(),n.panel):t.is(Lg)&&(n=new Vp(n.query,t.value?Vg:null));return n},provide:n=>pd.from(n,e=>e.panel)});class Vp{constructor(e,t){this.query=e,this.panel=t}}const lQ=Ot.mark({class:"cm-searchMatch"}),cQ=Ot.mark({class:"cm-searchMatch cm-searchMatch-selected"}),uQ=Hr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(_o))}update(n){let e=n.state.field(_o);(e!=n.startState.field(_o)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ot.none;let{view:t}=this,r=new Aa;for(let i=0,s=t.visibleRanges,a=s.length;i<a;i++){let{from:c,to:u}=s[i];for(;i<a-1&&u>s[i+1].from-500;)u=s[++i].to;n.highlight(t.state,c,u,(h,m)=>{let O=t.state.selection.ranges.some(x=>x.from==h&&x.to==m);r.add(h,m,O?cQ:lQ)})}return r.finish()}},{decorations:n=>n.decorations});function Bu(n){return e=>{let t=e.state.field(_o,!1);return t&&t.query.spec.valid?n(e,t):fw(e)}}const kd=Bu((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=ue.single(r.from,r.to),s=n.state.facet(rc);return n.dispatch({selection:i,effects:[_g(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),dw(n),!0}),Pd=Bu((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=ue.single(i.from,i.to),a=n.state.facet(rc);return n.dispatch({selection:s,effects:[_g(n,i),a.scrollToMatch(s.main,n)],userEvent:"select.search"}),dw(n),!0}),dQ=Bu((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:ue.create(t.map(r=>ue.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),fQ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],a=0;for(let c=new Bl(n.doc,n.sliceDoc(r,i));!c.next().done;){if(s.length>1e3)return!1;c.value.from==r&&(a=s.length),s.push(ue.range(c.value.from,c.value.to))}return e(n.update({selection:ue.create(s,a),userEvent:"select.search.matches"})),!0},yx=Bu((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let a=s,c=[],u,h,m=[];a.from==r&&a.to==i&&(h=t.toText(e.getReplacement(a)),c.push({from:a.from,to:a.to,insert:h}),a=e.nextMatch(t,a.from,a.to),m.push(Be.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+".")));let O=n.state.changes(c);return a&&(u=ue.single(a.from,a.to).map(O),m.push(_g(n,a)),m.push(t.facet(rc).scrollToMatch(u.main,n))),n.dispatch({changes:O,selection:u,effects:m,userEvent:"input.replace"}),!0}),hQ=Bu((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:s,to:a}=i;return{from:s,to:a,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Be.announce.of(r),userEvent:"input.replace.all"}),!0});function Vg(n){return n.state.facet(rc).createPanel(n)}function P2(n,e){var t,r,i,s,a;let c=n.selection.main,u=c.empty||c.to>c.from+100?"":n.sliceDoc(c.from,c.to);if(e&&!u)return e;let h=n.facet(rc);return new lw({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:h.wholeWord})}function uw(n){let e=Uv(n,Vg);return e&&e.dom.querySelector("[main-field]")}function dw(n){let e=uw(n);e&&e==n.root.activeElement&&e.select()}const fw=n=>{let e=n.state.field(_o,!1);if(e&&e.panel){let t=uw(n);if(t&&t!=n.root.activeElement){let r=P2(n.state,e.query.spec);r.valid&&n.dispatch({effects:Zu.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[Lg.of(!0),e?Zu.of(P2(n.state,e.query.spec)):Ft.appendConfig.of(OQ)]});return!0},hw=n=>{let e=n.state.field(_o,!1);if(!e||!e.panel)return!1;let t=Uv(n,Vg);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:Lg.of(!1)}),!0},pQ=[{key:"Mod-f",run:fw,scope:"editor search-panel"},{key:"F3",run:kd,shift:Pd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:kd,shift:Pd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:hw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:fQ},{key:"Mod-Alt-g",run:zM},{key:"Mod-d",run:tQ,preventDefault:!0}];class mQ{constructor(e){this.view=e;let t=this.query=e.state.field(_o).query.spec;this.commit=this.commit.bind(this),this.searchField=Wn("input",{value:t.search,placeholder:ei(e,"Find"),"aria-label":ei(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Wn("input",{value:t.replace,placeholder:ei(e,"Replace"),"aria-label":ei(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Wn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Wn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Wn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,a){return Wn("button",{class:"cm-button",name:i,onclick:s,type:"button"},a)}this.dom=Wn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>kd(e),[ei(e,"next")]),r("prev",()=>Pd(e),[ei(e,"previous")]),r("select",()=>dQ(e),[ei(e,"all")]),Wn("label",null,[this.caseField,ei(e,"match case")]),Wn("label",null,[this.reField,ei(e,"regexp")]),Wn("label",null,[this.wordField,ei(e,"by word")]),...e.state.readOnly?[]:[Wn("br"),this.replaceField,r("replace",()=>yx(e),[ei(e,"replace")]),r("replaceAll",()=>hQ(e),[ei(e,"replace all")])],Wn("button",{name:"close",onclick:()=>hw(e),"aria-label":ei(e,"close"),type:"button"},["×"])])}commit(){let e=new lw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Zu.of(e)}))}keydown(e){CC(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Pd:kd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),yx(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(Zu)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(rc).top}}function ei(n,e){return n.state.phrase(e)}const v1=30,b1=/[\s\.,:;?!]/;function _g(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-v1),a=Math.min(i,t+v1),c=n.state.sliceDoc(s,a);if(s!=r.from){for(let u=0;u<v1;u++)if(!b1.test(c[u+1])&&b1.test(c[u])){c=c.slice(u);break}}if(a!=i){for(let u=c.length-1;u>c.length-v1;u--)if(!b1.test(c[u-1])&&b1.test(c[u])){c=c.slice(0,u);break}}return Be.announce.of(`${n.state.phrase("current match")}. ${c} ${n.state.phrase("on line")} ${r.number}.`)}const gQ=Be.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),OQ=[_o,Iu.low(uQ),gQ],xQ="#e5c07b",vx="#e06c75",yQ="#56b6c2",vQ="#ffffff",U1="#abb2bf",A2="#7d8799",bQ="#61afef",wQ="#98c379",bx="#d19a66",SQ="#c678dd",kQ="#21252b",wx="#2c313a",Sx="#282c34",_p="#353a42",PQ="#3E4451",kx="#528bff",AQ=Be.theme({"&":{color:U1,backgroundColor:Sx},".cm-content":{caretColor:kx},".cm-cursor, .cm-dropCursor":{borderLeftColor:kx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:PQ},".cm-panels":{backgroundColor:kQ,color:U1},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Sx,color:A2,border:"none"},".cm-activeLineGutter":{backgroundColor:wx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:_p},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:_p,borderBottomColor:_p},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:wx,color:U1}}},{dark:!0}),$Q=ef.define([{tag:F.keyword,color:SQ},{tag:[F.name,F.deleted,F.character,F.propertyName,F.macroName],color:vx},{tag:[F.function(F.variableName),F.labelName],color:bQ},{tag:[F.color,F.constant(F.name),F.standard(F.name)],color:bx},{tag:[F.definition(F.name),F.separator],color:U1},{tag:[F.typeName,F.className,F.number,F.changed,F.annotation,F.modifier,F.self,F.namespace],color:xQ},{tag:[F.operator,F.operatorKeyword,F.url,F.escape,F.regexp,F.link,F.special(F.string)],color:yQ},{tag:[F.meta,F.comment],color:A2},{tag:F.strong,fontWeight:"bold"},{tag:F.emphasis,fontStyle:"italic"},{tag:F.strikethrough,textDecoration:"line-through"},{tag:F.link,color:A2,textDecoration:"underline"},{tag:F.heading,fontWeight:"bold",color:vx},{tag:[F.atom,F.bool,F.special(F.variableName)],color:bx},{tag:[F.processingInstruction,F.string,F.inserted],color:wQ},{tag:F.invalid,color:vQ}]),CQ=[AQ,IE($Q)];var Px={};class Ad{constructor(e,t,r,i,s,a,c,u,h,m=0,O){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=a,this.buffer=c,this.bufferBase=u,this.curContext=h,this.lookAhead=m,this.parent=O}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Ad(e,[],t,r,r,0,[],0,i?new Ax(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=s.dynamicPrecedence(i);if(c&&(this.score+=c),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(r-1)*3-(e&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from,m=this.reducePos-h;m>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=m):this.p.lastBigReductionSize<m&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=m));let O=u?this.stack[u-1]:0,x=this.bufferBase+this.buffer.length-O;if(i<s.minRepeatTerm||e&131072){let v=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,v,x+4,!0)}if(e&262144)this.state=this.stack[u];else{let v=this.stack[u-3];this.state=s.getGoto(v,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,c=this.buffer.length;if(c==0&&a.parent&&(c=a.bufferBase-a.parent.bufferBase,a=a.parent),c>0&&a.buffer[c-4]==0&&a.buffer[c-1]>-1){if(t==r)return;if(a.buffer[c-2]>=t){a.buffer[c-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let c=!1;for(let u=a;u>0&&this.buffer[u-2]>r;u-=4)if(this.buffer[u-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=i;let c=a.stateFlag(s,1);!c&&(i>r||t<=a.maxNode)&&(this.reducePos=i),this.pushState(s,c?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=a.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Ad(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new EQ(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,a;s<t.length;s+=2)(a=t[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(t[s],a);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let a=t[s+1];i.some((c,u)=>u&1&&c==a)||i.push(t[s],a)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(t[i],this.pos),a.reducePos=this.pos,a.score-=200,r.push(a)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-s;if(c>1){let u=a&65535,h=this.stack.length-c*3;if(h>=0&&e.getGoto(this.stack[h],u,!1)>=0)return c<<19|65536|u}}else{let c=r(a,s+1);if(c!=null)return c}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Ax(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ax{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class EQ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class $d{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new $d(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new $d(this.stack,this.pos,this.index)}}function iu(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let a=n.charCodeAt(r++),c=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let u=a-32;if(u>=46&&(u-=46,c=!0),s+=u,c)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class G1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const $x=new G1;class TQ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=$x,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let a=this.ranges[--i];s-=r.from-a.to,r=a}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];s+=a.from-r.to,r=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=r;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=$x,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Dl{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;pw(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Dl.prototype.contextual=Dl.prototype.fallback=Dl.prototype.extend=!1;class Cd{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?iu(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(pw(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Cd.prototype.contextual=Dl.prototype.fallback=Dl.prototype.extend=!1;class oi{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function pw(n,e,t,r,i,s){let a=0,c=1<<r,{dialect:u}=t.p.parser;e:for(;(c&n[a])!=0;){let h=n[a+1];for(let v=a+3;v<h;v+=2)if((n[v+1]&c)>0){let w=n[v];if(u.allows(w)&&(e.token.value==-1||e.token.value==w||MQ(w,e.token.value,i,s))){e.acceptToken(w);break}}let m=e.next,O=0,x=n[a+2];if(e.next<0&&x>O&&n[h+x*3-3]==65535){a=n[h+x*3-1];continue e}for(;O<x;){let v=O+x>>1,w=h+v+(v<<1),k=n[w],$=n[w+1]||65536;if(m<k)x=v;else if(m>=$)O=v+1;else{a=n[w+2],e.advance();continue e}}break}}function Cx(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function MQ(n,e,t,r){let i=Cx(t,r,e);return i<0||Cx(t,r,n)<i}const ti=typeof process<"u"&&Px&&/\bparse\b/.test(Px.LOG);let Dp=null;function Ex(n,e,t){let r=n.cursor(qt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class QQ{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ex(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ex(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],a=this.start[t]+r.positions[i];if(a>e)return this.nextStart=a,null;if(s instanceof ln){if(a==e){if(a<this.safeFrom)return null;let c=a+s.length;if(c<=this.safeTo){let u=s.prop(kt.lookAhead);if(!u||c+u<this.fragment.to)return s}}this.index[t]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+s.length}}}class jQ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new G1)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,a=i.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,u=0;for(let h=0;h<s.length;h++){if((1<<h&a)==0)continue;let m=s[h],O=this.tokens[h];if(!(r&&!m.fallback)&&((m.contextual||O.start!=e.pos||O.mask!=a||O.context!=c)&&(this.updateCachedToken(O,m,e),O.mask=a,O.context=c),O.lookAhead>O.end+25&&(u=Math.max(O.lookAhead,u)),O.value!=0)){let x=t;if(O.extended>-1&&(t=this.addActions(e,O.extended,O.end,t)),t=this.addActions(e,O.value,O.end,t),!m.extend&&(r=O,t>x))break}}for(;this.actions.length>t;)this.actions.pop();return u&&e.setLookAhead(u),!r&&e.pos==this.stream.end&&(r=new G1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new G1,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let c=s.specializers[a](this.stream.read(e.start,e.end),r);if(c>=0&&r.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:a}=e.p,{data:c}=a;for(let u=0;u<2;u++)for(let h=a.stateSlot(s,u?2:1);;h+=3){if(c[h]==65535)if(c[h+1]==1)h=Ws(c,h+2);else{i==0&&c[h+1]==2&&(i=this.putAction(Ws(c,h+2),t,r,i));break}c[h]==t&&(i=this.putAction(Ws(c,h+1),t,r,i))}return i}}class ZQ{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new TQ(t,i),this.tokens=new jQ(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Ad.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new QQ(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let c=e[a];for(;;){if(this.tokens.mainToken=null,c.pos>t)r.push(c);else{if(this.advanceStack(c,r,e))continue;{i||(i=[],s=[]),i.push(c);let u=this.tokens.getMainToken(c);s.push(u.value,u.end)}}break}}if(!r.length){let a=i&&NQ(i);if(a)return ti&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw ti&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(a)return ti&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((c,u)=>u.score-c.score);r.length>a;)r.pop();r.some(c=>c.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let a=0;a<r.length-1;a++){let c=r[a];for(let u=a+1;u<r.length;u++){let h=r[u];if(c.sameState(h)||c.buffer.length>500&&h.buffer.length>500)if((c.score-h.score||c.buffer.length-h.buffer.length)>0)r.splice(u--,1);else{r.splice(a--,1);continue e}}}r.length>12&&(r.sort((a,c)=>c.score-a.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let a=1;a<r.length;a++)r[a].pos<this.minStackPos&&(this.minStackPos=r[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,a=ti?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,m=h?e.curContext.hash:0;for(let O=this.fragments.nodeAt(i);O;){let x=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(x>-1&&O.length&&(!h||(O.prop(kt.contextHash)||0)==m))return e.useNode(O,x),ti&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof ln)||O.children.length==0||O.positions[0]>0)break;let v=O.children[0];if(v instanceof ln&&O.positions[0]==0)O=v;else break}}let c=s.stateSlot(e.state,4);if(c>0)return e.reduce(c),ti&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let h=0;h<u.length;){let m=u[h++],O=u[h++],x=u[h++],v=h==u.length||!r,w=v?e:e.split(),k=this.tokens.mainToken;if(w.apply(m,O,k?k.start:w.pos,x),ti&&console.log(a+this.stackID(w)+` (via ${(m&65536)==0?"shift":`reduce of ${s.getName(m&65535)}`} for ${s.getName(O)} @ ${i}${w==e?"":", split"})`),v)return!0;w.pos>i?t.push(w):r.push(w)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Tx(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let a=0;a<e.length;a++){let c=e[a],u=t[a<<1],h=t[(a<<1)+1],m=ti?this.stackID(c)+" -> ":"";if(c.deadEnd&&(s||(s=!0,c.restart(),ti&&console.log(m+this.stackID(c)+" (restarted)"),this.advanceFully(c,r))))continue;let O=c.split(),x=m;for(let v=0;v<10&&O.forceReduce()&&(ti&&console.log(x+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,r));v++)ti&&(x=this.stackID(O)+" -> ");for(let v of c.recoverByInsert(u))ti&&console.log(m+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>c.pos?(h==c.pos&&(h++,u=0),c.recoverByDelete(u,h),ti&&console.log(m+this.stackID(c)+` (via recover-delete ${this.parser.getName(u)})`),Tx(c,r)):(!i||i.score<O.score)&&(i=O)}return i}stackToTree(e){return e.close(),ln.build({buffer:$d.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Dp||(Dp=new WeakMap)).get(e);return t||Dp.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Tx(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class RQ{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Ip=n=>n;class mw{constructor(e){this.start=e.start,this.shift=e.shift||Ip,this.reduce=e.reduce||Ip,this.reuse=e.reuse||Ip,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Yl extends ab{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let c=0;c<e.repeatNodeCount;c++)t.push("");let r=Object.keys(e.topRules).map(c=>e.topRules[c][1]),i=[];for(let c=0;c<t.length;c++)i.push([]);function s(c,u,h){i[c].push([u,u.deserialize(String(h))])}if(e.nodeProps)for(let c of e.nodeProps){let u=c[0];typeof u=="string"&&(u=kt[u]);for(let h=1;h<c.length;){let m=c[h++];if(m>=0)s(m,u,c[h++]);else{let O=c[h+-m];for(let x=-m;x>0;x--)s(c[h++],u,O);h++}}}this.nodeSet=new vg(t.map((c,u)=>Er.define({name:u>=this.minRepeatTerm?void 0:c,id:u,props:i[u],top:r.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=nb;let a=iu(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(Mx),this.states=iu(e.states,Uint32Array),this.data=iu(e.stateData),this.goto=iu(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new Dl(a,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new ZQ(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let a=i[s++],c=a&1,u=i[s++];if(c&&r)return u;for(let h=s+(a>>1);s<h;s++)if(i[s]==e)return u;if(c)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),a;;s+=3){if((a=r[s])==65535)if(r[s+1]==1)a=r[s=Ws(r,s+2)];else{if(r[s+1]==2)return Ws(r,s+2);break}if(a==t||a==0)return Ws(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Ws(this.data,s+2);else break;i=t(Ws(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ws(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,a)=>a&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Yl.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(c=>c.from==r.external);if(!s)return r;let a=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=Mx(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let a=t.indexOf(s);a>=0&&(r[a]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let a=this.dialects[t[s]],c;(c=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[c]=1;return new RQ(e,r,i)}static deserialize(e){return new Yl(e)}}function Ws(n,e){return n[e]|n[e+1]<<16}function NQ(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Mx(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const LQ=55,VQ=1,_Q=56,DQ=2,IQ=57,XQ=3,Qx=4,FQ=5,Dg=6,gw=7,Ow=8,xw=9,yw=10,zQ=11,HQ=12,WQ=13,Xp=58,BQ=14,YQ=15,jx=59,vw=21,qQ=23,bw=24,UQ=25,$2=27,ww=28,GQ=29,KQ=32,JQ=35,ej=37,tj=38,nj=0,rj=1,ij={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},sj={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Zx={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function oj(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let Rx=null,Nx=null,Lx=0;function C2(n,e){let t=n.pos+e;if(Lx==t&&Nx==n)return Rx;let r=n.peek(e),i="";for(;oj(r);)i+=String.fromCharCode(r),r=n.peek(++e);return Nx=n,Lx=t,Rx=i?i.toLowerCase():r==aj||r==lj?void 0:null}const Sw=60,Ed=62,Ig=47,aj=63,lj=33,cj=45;function Vx(n,e){this.name=n,this.parent=e}const uj=[Dg,yw,gw,Ow,xw],dj=new mw({start:null,shift(n,e,t,r){return uj.indexOf(e)>-1?new Vx(C2(r,1)||"",n):n},reduce(n,e){return e==vw&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==Dg||i==ej?new Vx(C2(r,1)||"",n):n},strict:!1}),fj=new oi((n,e)=>{if(n.next!=Sw){n.next<0&&e.context&&n.acceptToken(Xp);return}n.advance();let t=n.next==Ig;t&&n.advance();let r=C2(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?YQ:BQ);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(zQ);if(i&&sj[i])return n.acceptToken(Xp,-2);if(e.dialectEnabled(nj))return n.acceptToken(HQ);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(WQ)}else{if(r=="script")return n.acceptToken(gw);if(r=="style")return n.acceptToken(Ow);if(r=="textarea")return n.acceptToken(xw);if(ij.hasOwnProperty(r))return n.acceptToken(yw);i&&Zx[i]&&Zx[i][r]?n.acceptToken(Xp,-1):n.acceptToken(Dg)}},{contextual:!0}),hj=new oi(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(jx);break}if(n.next==cj)e++;else if(n.next==Ed&&e>=2){t>=3&&n.acceptToken(jx,-2);break}else e=0;n.advance()}});function pj(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const mj=new oi((n,e)=>{if(n.next==Ig&&n.peek(1)==Ed){let t=e.dialectEnabled(rj)||pj(e.context);n.acceptToken(t?FQ:Qx,2)}else n.next==Ed&&n.acceptToken(Qx,1)});function Xg(n,e,t){let r=2+n.length;return new oi(i=>{for(let s=0,a=0,c=0;;c++){if(i.next<0){c&&i.acceptToken(e);break}if(s==0&&i.next==Sw||s==1&&i.next==Ig||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,a++;else if(s==r&&i.next==Ed){c>a?i.acceptToken(e,-a):i.acceptToken(t,-(a-2));break}else if((i.next==10||i.next==13)&&c){i.acceptToken(e,1);break}else s=a=0;i.advance()}})}const gj=Xg("script",LQ,VQ),Oj=Xg("style",_Q,DQ),xj=Xg("textarea",IQ,XQ),yj=qd({"Text RawText IncompleteTag IncompleteCloseTag":F.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":F.angleBracket,TagName:F.tagName,"MismatchedCloseTag/TagName":[F.tagName,F.invalid],AttributeName:F.attributeName,"AttributeValue UnquotedAttributeValue":F.attributeValue,Is:F.definitionOperator,"EntityReference CharacterReference":F.character,Comment:F.blockComment,ProcessingInst:F.processingInstruction,DoctypeDecl:F.documentMeta}),vj=Yl.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,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sX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:dj,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity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S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[gj,Oj,xj,mj,fj,hj,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function kw(n,e){let t=Object.create(null);for(let r of n.getChildren(bw)){let i=r.getChild(UQ),s=r.getChild($2)||r.getChild(ww);i&&(t[e.read(i.from,i.to)]=s?s.type.id==$2?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function _x(n,e){let t=n.getChild(qQ);return t?e.read(t.from,t.to):" "}function Fp(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=kw(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function Pw(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let c of n)(c.tag=="script"?t:c.tag=="style"?r:c.tag=="textarea"?i:s).push(c);let a=e.length?Object.create(null):null;for(let c of e)(a[c.name]||(a[c.name]=[])).push(c);return nE((c,u)=>{let h=c.type.id;if(h==GQ)return Fp(c,u,t);if(h==KQ)return Fp(c,u,r);if(h==JQ)return Fp(c,u,i);if(h==vw&&s.length){let m=c.node,O=m.firstChild,x=O&&_x(O,u),v;if(x){for(let w of s)if(w.tag==x&&(!w.attrs||w.attrs(v||(v=kw(O,u))))){let k=m.lastChild,$=k.type.id==tj?k.from:m.to;if($>O.to)return{parser:w.parser,overlay:[{from:O.to,to:$}]}}}}if(a&&h==bw){let m=c.node,O;if(O=m.firstChild){let x=a[u.read(O.from,O.to)];if(x)for(let v of x){if(v.tagName&&v.tagName!=_x(m.parent,u))continue;let w=m.lastChild;if(w.type.id==$2){let k=w.from+1,$=w.lastChild,M=w.to-($&&$.isError?0:1);if(M>k)return{parser:v.parser,overlay:[{from:k,to:M}],bracketed:!0}}else if(w.type.id==ww)return{parser:v.parser,overlay:[{from:w.from,to:w.to}]}}}}return null})}const bj=132,Dx=1,wj=133,Sj=134,Aw=2,kj=135,Pj=3,Aj=4,$w=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$j=58,Cj=40,Cw=95,Ej=91,K1=45,Tj=46,Mj=35,Qj=37,jj=38,Zj=92,Rj=10,Nj=42;function Ru(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function Fg(n){return n>=48&&n<=57}function Ix(n){return Fg(n)||n>=97&&n<=102||n>=65&&n<=70}const Ew=(n,e,t)=>(r,i)=>{for(let s=!1,a=0,c=0;;c++){let{next:u}=r;if(Ru(u)||u==K1||u==Cw||s&&Fg(u))!s&&(u!=K1||c>0)&&(s=!0),a===c&&u==K1&&a++,r.advance();else if(u==Zj&&r.peek(1)!=Rj){if(r.advance(),Ix(r.next)){do r.advance();while(Ix(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(a==2&&i.canShift(Aw)?e:u==Cj?t:n);break}}},Lj=new oi(Ew(wj,Aw,Sj),{contextual:!0}),Vj=new oi(Ew(kj,Pj,Aj),{contextual:!0}),_j=new oi(n=>{if($w.includes(n.peek(-1))){let{next:e}=n;(Ru(e)||e==Cw||e==Mj||e==Tj||e==Nj||e==Ej||e==$j&&Ru(n.peek(1))||e==K1||e==jj)&&n.acceptToken(bj)}}),Dj=new oi(n=>{if(!$w.includes(n.peek(-1))){let{next:e}=n;if(e==Qj&&(n.advance(),n.acceptToken(Dx)),Ru(e)){do n.advance();while(Ru(n.next)||Fg(n.next));n.acceptToken(Dx)}}}),Ij=qd({"AtKeyword import charset namespace keyframes media supports font-feature-values":F.definitionKeyword,"from to selector scope MatchFlag":F.keyword,NamespaceName:F.namespace,KeyframeName:F.labelName,KeyframeRangeName:F.operatorKeyword,TagName:F.tagName,ClassName:F.className,PseudoClassName:F.constant(F.className),IdName:F.labelName,"FeatureName PropertyName":F.propertyName,AttributeName:F.attributeName,NumberLiteral:F.number,KeywordQuery:F.keyword,UnaryQueryOp:F.operatorKeyword,"CallTag ValueName FontName":F.atom,VariableName:F.variableName,Callee:F.operatorKeyword,Unit:F.unit,"UniversalSelector NestingSelector":F.definitionOperator,"MatchOp CompareOp":F.compareOperator,"ChildOp SiblingOp, LogicOp":F.logicOperator,BinOp:F.arithmeticOperator,Important:F.modifier,Comment:F.blockComment,ColorLiteral:F.color,"ParenthesizedContent StringLiteral":F.string,":":F.punctuation,"PseudoOp #":F.derefOperator,"; , |":F.separator,"( )":F.paren,"[ ]":F.squareBracket,"{ }":F.brace}),Xj={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},Fj={__proto__:null,or:104,and:104,not:112,only:112,layer:180},zj={__proto__:null,selector:118,layer:176},Hj={__proto__:null,"@import":172,"@media":184,"@charset":188,"@namespace":192,"@keyframes":198,"@supports":210,"@scope":214,"@font-feature-values":220},Wj={__proto__:null,to:217},Bj=Yl.deserialize({version:14,states:"HhQYQdOOO#wQdOOP$OO`OOO$xQaO'#CfOOQP'#Ce'#CeO%PQ`O'#CgO%UQdO'#CkO%uQaO'#CcO&PQdO'#CnO&[QdO'#DtO&aQdO'#DvO&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Q#XoR$x#XQaOSmP}U!eam$uR$u#TQ%R#kY&V%R&]&{'T'jQ&]%UQ&{&WQ'T&bR'j'bQ$Q!gQ$S!hQ$U!iV%a$Q$S$UQ%k$_R&k%kQ&a%^S'S&a'cR'c'TQ&X%RR&|&XQ&T%OR&z&TQ|VR#g|Q%}$qR&u%}Q#UlS$v#U$wR$w#VQ'V&eR'e'VQ$c!rR%o$cQ%v$hR&q%vQ&o%uR'^&oQ#QiR$o#QQ#v!^R%Z#v_`OPam}#T$u^VOPam}#T$uQ!YZQ!Z[Q#cxQ#dyQ#ezQ#f{Q$k!{Q%O#jR&y&SR%S#kQ!kbQ!td[#}!g!h!i$Q$S$UQ$q#Sd%Q#k%R%U&W&]&b&{'T'b'jQ%T#mQ%e$XS%{$q%}Q&R$|Q&t%|R'X&g]$P!g!h!i$Q$S$UQ!^^U!rc!k$]Q!zgQ#p!]S#s!^#vQ#x!_Q%X#tQ%Y#uQ%^#yS%i$_%kQ%n$bR'Q&`Q#r!]Q&_%VR'a'PR%`#yR%P#jQnPR#i}Q!scQ$[!kR%h$]",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:156,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[Ij],skippedNodes:[0,5,114],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!e`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh#}~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh#}~!e`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;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term:134,get:n=>Xj[n]||-1},{term:135,get:n=>Fj[n]||-1},{term:4,get:n=>zj[n]||-1},{term:28,get:n=>Hj[n]||-1},{term:133,get:n=>Wj[n]||-1}],tokenPrec:2182});let zp=null;function Hp(){if(!zp&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));zp=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return zp||[]}const Xx=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),Fx=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),Yj=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),qj=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),Ds=/^(\w[\w-]*|-\w[\w-]*|)$/,Uj=/^-(-[\w-]*)?$/;function Gj(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const zx=new ob,Kj=["Declaration"];function Jj(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function Tw(n,e,t){if(e.to-e.from>4096){let r=zx.get(e);if(r)return r;let i=[],s=new Set,a=e.cursor(qt.IncludeAnonymous);if(a.firstChild())do for(let c of Tw(n,a.node,t))s.has(c.label)||(s.add(c.label),i.push(c));while(a.nextSibling());return zx.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var a;if(t(s)&&s.matchContext(Kj)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let c=n.sliceString(s.from,s.to);i.has(c)||(i.add(c),r.push({label:c,type:"variable"}))}}),r}}const eZ=n=>e=>{let{state:t,pos:r}=e,i=An(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Hp(),validFor:Ds};if(i.name=="ValueName")return{from:i.from,options:Fx,validFor:Ds};if(i.name=="PseudoClassName")return{from:i.from,options:Xx,validFor:Ds};if(n(i)||(e.explicit||s)&&Gj(i,t.doc))return{from:n(i)||s?i.from:r,options:Tw(t.doc,Jj(i),n),validFor:Uj};if(i.name=="TagName"){for(let{parent:u}=i;u;u=u.parent)if(u.name=="Block")return{from:i.from,options:Hp(),validFor:Ds};return{from:i.from,options:Yj,validFor:Ds}}if(i.name=="AtKeyword")return{from:i.from,options:qj,validFor:Ds};if(!e.explicit)return null;let a=i.resolve(r),c=a.childBefore(r);return c&&c.name==":"&&a.name=="PseudoClassSelector"?{from:r,options:Xx,validFor:Ds}:c&&c.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:r,options:Fx,validFor:Ds}:a.name=="Block"||a.name=="Styles"?{from:r,options:Hp(),validFor:Ds}:null},tZ=eZ(n=>n.name=="VariableName"),Td=Hl.define({name:"css",parser:Bj.configure({props:[Kd.add({Declaration:q1()}),Jd.add({"Block KeyframeList":pb})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Mw(){return new Pg(Td,Td.data.of({autocomplete:tZ}))}const nZ=316,rZ=317,Hx=1,iZ=2,sZ=3,oZ=4,aZ=318,lZ=320,cZ=321,uZ=5,dZ=6,fZ=0,E2=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Qw=125,hZ=59,T2=47,pZ=42,mZ=43,gZ=45,OZ=60,xZ=44,yZ=63,vZ=46,bZ=91,wZ=new mw({start:!1,shift(n,e){return e==uZ||e==dZ||e==lZ?n:e==cZ},strict:!1}),SZ=new oi((n,e)=>{let{next:t}=n;(t==Qw||t==-1||e.context)&&n.acceptToken(aZ)},{contextual:!0,fallback:!0}),kZ=new oi((n,e)=>{let{next:t}=n,r;E2.indexOf(t)>-1||t==T2&&((r=n.peek(1))==T2||r==pZ)||t!=Qw&&t!=hZ&&t!=-1&&!e.context&&n.acceptToken(nZ)},{contextual:!0}),PZ=new oi((n,e)=>{n.next==bZ&&!e.context&&n.acceptToken(rZ)},{contextual:!0}),AZ=new oi((n,e)=>{let{next:t}=n;if(t==mZ||t==gZ){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(Hx);n.acceptToken(r?Hx:iZ)}}else t==yZ&&n.peek(1)==vZ&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(sZ))},{contextual:!0});function Wp(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const $Z=new oi((n,e)=>{if(n.next!=OZ||!e.dialectEnabled(fZ)||(n.advance(),n.next==T2))return;let t=0;for(;E2.indexOf(n.next)>-1;)n.advance(),t++;if(Wp(n.next,!0)){for(n.advance(),t++;Wp(n.next,!1);)n.advance(),t++;for(;E2.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==xZ)return;for(let r=0;;r++){if(r==7){if(!Wp(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(oZ,-t)}),CZ=qd({"get set async static":F.modifier,"for while do if else switch try catch finally return throw break continue default case defer":F.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":F.operatorKeyword,"let var const using function class extends":F.definitionKeyword,"import export from":F.moduleKeyword,"with debugger new":F.keyword,TemplateString:F.special(F.string),super:F.atom,BooleanLiteral:F.bool,this:F.self,null:F.null,Star:F.modifier,VariableName:F.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":F.function(F.variableName),VariableDefinition:F.definition(F.variableName),Label:F.labelName,PropertyName:F.propertyName,PrivatePropertyName:F.special(F.propertyName),"CallExpression/MemberExpression/PropertyName":F.function(F.propertyName),"FunctionDeclaration/VariableDefinition":F.function(F.definition(F.variableName)),"ClassDeclaration/VariableDefinition":F.definition(F.className),"NewExpression/VariableName":F.className,PropertyDefinition:F.definition(F.propertyName),PrivatePropertyDefinition:F.definition(F.special(F.propertyName)),UpdateOp:F.updateOperator,"LineComment Hashbang":F.lineComment,BlockComment:F.blockComment,Number:F.number,String:F.string,Escape:F.escape,ArithOp:F.arithmeticOperator,LogicOp:F.logicOperator,BitOp:F.bitwiseOperator,CompareOp:F.compareOperator,RegExp:F.regexp,Equals:F.definitionOperator,Arrow:F.function(F.punctuation),": Spread":F.punctuation,"( )":F.paren,"[ ]":F.squareBracket,"{ }":F.brace,"InterpolationStart InterpolationEnd":F.special(F.brace),".":F.derefOperator,", ;":F.separator,"@":F.meta,TypeName:F.typeName,TypeDefinition:F.definition(F.typeName),"type enum interface implements namespace module declare":F.definitionKeyword,"abstract global Privacy readonly override":F.modifier,"is keyof unique infer asserts":F.operatorKeyword,JSXAttributeValue:F.attributeValue,JSXText:F.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":F.angleBracket,"JSXIdentifier JSXNameSpacedName":F.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":F.attributeName,"JSXBuiltin/JSXIdentifier":F.standard(F.tagName)}),EZ={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},TZ={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},MZ={__proto__:null,"<":193},QZ=Yl.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!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s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:wZ,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[CZ],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#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ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[kZ,PZ,AZ,$Z,2,3,4,5,6,7,8,9,10,11,12,13,14,SZ,new Cd("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Cd("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>EZ[n]||-1},{term:343,get:n=>TZ[n]||-1},{term:95,get:n=>MZ[n]||-1}],tokenPrec:15201}),jw=[Ir("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ir("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ir("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ir("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ir("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ir(`try {
|
|
65
|
-
\${}
|
|
66
|
-
} catch (\${error}) {
|
|
67
|
-
\${}
|
|
68
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ir("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ir(`if (\${}) {
|
|
69
|
-
\${}
|
|
70
|
-
} else {
|
|
71
|
-
\${}
|
|
72
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),Ir(`class \${name} {
|
|
73
|
-
constructor(\${params}) {
|
|
74
|
-
\${}
|
|
75
|
-
}
|
|
76
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),Ir('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ir('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],jZ=jw.concat([Ir("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ir("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ir("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Wx=new ob,Zw=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Uc(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const ZZ=["FunctionDeclaration"],RZ={FunctionDeclaration:Uc("function"),ClassDeclaration:Uc("class"),ClassExpression:()=>!0,EnumDeclaration:Uc("constant"),TypeAliasDeclaration:Uc("type"),NamespaceDeclaration:Uc("namespace"),VariableDefinition(n,e){n.matchContext(ZZ)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Rw(n,e){let t=Wx.get(e);if(t)return t;let r=[],i=!0;function s(a,c){let u=n.sliceString(a.from,a.to);r.push({label:u,type:c})}return e.cursor(qt.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let c=RZ[a.name];if(c&&c(a,s)||Zw.has(a.name))return!1}else if(a.to-a.from>8192){for(let c of Rw(n,a.node))r.push(c);return!1}}),Wx.set(e,r),r}const Bx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Nw=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function NZ(n){let e=An(n.state).resolveInner(n.pos,-1);if(Nw.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Bx.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)Zw.has(i.name)&&(r=r.concat(Rw(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Bx}}const ws=Hl.define({name:"javascript",parser:QZ.configure({props:[Kd.add({IfStatement:q1({except:/^\s*({|else\b)/}),TryStatement:q1({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:$E,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:AE({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":q1({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Jd.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":pb,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,r=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:r.type.isError?n.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Lw={test:n=>/^JSX/.test(n.name),facet:ub({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Vw=ws.configure({dialect:"ts"},"typescript"),_w=ws.configure({dialect:"jsx",props:[kg.add(n=>n.isTop?[Lw]:void 0)]}),Dw=ws.configure({dialect:"jsx ts",props:[kg.add(n=>n.isTop?[Lw]:void 0)]},"typescript");let Iw=n=>({label:n,type:"keyword"});const Xw="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Iw),LZ=Xw.concat(["declare","implements","private","protected","public"].map(Iw));function Fw(n={}){let e=n.jsx?n.typescript?Dw:_w:n.typescript?Vw:ws,t=n.typescript?jZ.concat(LZ):jw.concat(Xw);return new Pg(e,[ws.data.of({autocomplete:xM(Nw,OM(t))}),ws.data.of({autocomplete:NZ}),n.jsx?DZ:[]])}function VZ(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function Yx(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const _Z=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),DZ=Be.inputHandler.of((n,e,t,r,i)=>{if((_Z?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!ws.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:a}=s,c=a.changeByRange(u=>{var h;let{head:m}=u,O=An(a).resolveInner(m-1,-1),x;if(O.name=="JSXStartTag"&&(O=O.parent),!(a.doc.sliceString(m-1,m)!=r||O.name=="JSXAttributeValue"&&O.to>m)){if(r==">"&&O.name=="JSXFragmentTag")return{range:u,changes:{from:m,insert:"</>"}};if(r=="/"&&O.name=="JSXStartCloseTag"){let v=O.parent,w=v.parent;if(w&&v.from==m-2&&((x=Yx(a.doc,w.firstChild,m))||((h=w.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let k=`${x}>`;return{range:ue.cursor(m+k.length,-1),changes:{from:m,insert:k}}}}else if(r==">"){let v=VZ(O);if(v&&v.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(m,m+2))&&(x=Yx(a.doc,v,m)))return{range:u,changes:{from:m,insert:`</${x}>`}}}}return{range:u}});return c.changes.empty?!1:(n.dispatch([s,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Gc=["_blank","_self","_top","_parent"],Bp=["ascii","utf-8","utf-16","latin1","latin1"],Yp=["get","post","put","delete"],qp=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],ni=["true","false"],nt={},IZ={a:{attrs:{href:null,ping:null,type:null,media:null,target:Gc,hreflang:null}},abbr:nt,address:nt,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:nt,aside:nt,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:nt,base:{attrs:{href:null,target:Gc}},bdi:nt,bdo:nt,blockquote:{attrs:{cite:null}},body:nt,br:nt,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:qp,formmethod:Yp,formnovalidate:["novalidate"],formtarget:Gc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:nt,center:nt,cite:nt,code:nt,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:nt,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:nt,div:nt,dl:nt,dt:nt,em:nt,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:nt,figure:nt,footer:nt,form:{attrs:{action:null,name:null,"accept-charset":Bp,autocomplete:["on","off"],enctype:qp,method:Yp,novalidate:["novalidate"],target:Gc}},h1:nt,h2:nt,h3:nt,h4:nt,h5:nt,h6:nt,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:nt,hgroup:nt,hr:nt,html:{attrs:{manifest:null}},i:nt,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:qp,formmethod:Yp,formnovalidate:["novalidate"],formtarget:Gc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:nt,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:nt,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:nt,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Bp,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:nt,noscript:nt,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:nt,param:{attrs:{name:null,value:null}},pre:nt,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:nt,rt:nt,ruby:nt,samp:nt,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Bp}},section:nt,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:nt,source:{attrs:{src:null,type:null,media:null}},span:nt,strong:nt,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:nt,summary:nt,sup:nt,table:nt,tbody:nt,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:nt,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:nt,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:nt,time:{attrs:{datetime:null}},title:nt,tr:nt,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:nt,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:nt},zw={accesskey:null,class:null,contenteditable:ni,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:ni,autocorrect:ni,autocapitalize:ni,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":ni,"aria-autocomplete":["inline","list","both","none"],"aria-busy":ni,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":ni,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":ni,"aria-hidden":ni,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":ni,"aria-multiselectable":ni,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":ni,"aria-relevant":null,"aria-required":ni,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Hw="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of Hw)zw[n]=null;class Md{constructor(e,t){this.tags={...IZ,...e},this.globalAttrs={...zw,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Md.default=new Md;function ql(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Ul(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function Ww(n,e,t){let r=t.tags[ql(n,Ul(e))];return(r==null?void 0:r.children)||t.allTags}function zg(n,e){let t=[];for(let r=Ul(e);r&&!r.type.isTop;r=Ul(r.parent)){let i=ql(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const Bw=/^[:\-\.\w\u00b7-\uffff]*$/;function qx(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",a=Ul(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:Ww(n.doc,a,e).map(c=>({label:c,type:"type"})).concat(zg(n.doc,t).map((c,u)=>({label:"/"+c,apply:"/"+c+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ux(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:zg(n.doc,e).map((s,a)=>({label:s,apply:s+i,type:"type",boost:99-a})),validFor:Bw}}function XZ(n,e,t,r){let i=[],s=0;for(let a of Ww(n.doc,t,e))i.push({label:"<"+a,type:"type"});for(let a of zg(n.doc,t))i.push({label:"</"+a+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function FZ(n,e,t,r,i){let s=Ul(t),a=s?e.tags[ql(n.doc,s)]:null,c=a&&a.attrs?Object.keys(a.attrs):[],u=a&&a.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:u.map(h=>({label:h,type:"property"})),validFor:Bw}}function zZ(n,e,t,r,i){var s;let a=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),c=[],u;if(a){let h=n.sliceDoc(a.from,a.to),m=e.globalAttrs[h];if(!m){let O=Ul(t),x=O?e.tags[ql(n.doc,O)]:null;m=(x==null?void 0:x.attrs)&&x.attrs[h]}if(m){let O=n.sliceDoc(r,i).toLowerCase(),x='"',v='"';/^['"]/.test(O)?(u=O[0]=='"'?/^[^"]*$/:/^[^']*$/,x="",v=n.sliceDoc(i,i+1)==O[0]?"":O[0],O=O.slice(1),r++):u=/^[^\s<>='"]*$/;for(let w of m)c.push({label:w,apply:x+w+v,type:"constant"})}}return{from:r,to:i,options:c,validFor:u}}function HZ(n,e){let{state:t,pos:r}=e,i=An(t).resolveInner(r,-1),s=i.resolve(r);for(let a=r,c;s==i&&(c=i.childBefore(a));){let u=c.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=i=c,a=u.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Ux(t,i,i.from,r):qx(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?qx(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Ux(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?FZ(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?zZ(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?XZ(t,n,i,r):null}function WZ(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new Md(e,t):Md.default;return i=>HZ(r,i)}const BZ=ws.parser.configure({top:"SingleExpression"}),Yw=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Vw.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:_w.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Dw.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:BZ},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:ws.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:Td.parser}],qw=[{name:"style",parser:Td.parser.configure({top:"Styles"})}].concat(Hw.map(n=>({name:n,parser:ws.parser}))),Uw=Hl.define({name:"html",parser:vj.configure({props:[Kd.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Jd.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),wb.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),J1=Uw.configure({wrap:Pw(Yw,qw)});function Gx(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=Pw((n.nestedLanguages||[]).concat(Yw),(n.nestedAttributes||[]).concat(qw)));let r=t?Uw.configure({wrap:t,dialect:e}):e?J1.configure({dialect:e}):J1;return new Pg(r,[J1.data.of({autocomplete:WZ(n)}),n.autoCloseTags!==!1?YZ:[],Fw().support,Mw().support])}const Kx=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),YZ=Be.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!J1.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:a}=s,c=a.changeByRange(u=>{var h,m,O;let x=a.doc.sliceString(u.from-1,u.to)==r,{head:v}=u,w=An(a).resolveInner(v,-1),k;if(x&&r==">"&&w.name=="EndTag"){let $=w.parent;if(((m=(h=$.parent)===null||h===void 0?void 0:h.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(k=ql(a.doc,$.parent,v))&&!Kx.has(k)){let M=v+(a.doc.sliceString(v,v+1)===">"?1:0),V=`</${k}>`;return{range:u,changes:{from:v,to:M,insert:V}}}}else if(x&&r=="/"&&w.name=="IncompleteCloseTag"){let $=w.parent;if(w.from==v-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(k=ql(a.doc,$,v))&&!Kx.has(k)){let M=v+(a.doc.sliceString(v,v+1)===">"?1:0),V=`${k}>`;return{range:ue.cursor(v+V.length,-1),changes:{from:v,to:M,insert:V}}}}return{range:u}});return c.changes.empty?!1:(n.dispatch([s,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function qZ(n){switch(n){case"html":return Gx();case"css":return Mw();case"javascript":case"js":case"typescript":case"ts":return Fw({typescript:n==="typescript"||n==="ts"});default:return Gx()}}function UZ(n){var r;const e=((r=n.split(".").pop())==null?void 0:r.toLowerCase())??"";return{html:"html",htm:"html",css:"css",js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",json:"javascript"}[e]??"html"}const GZ=d.memo(function({content:e,filePath:t,language:r,onChange:i,readOnly:s=!1}){const a=d.useRef(null),c=d.useRef(null),u=d.useRef(i);u.current=i;const h=d.useCallback(m=>{if(a.current&&(a.current.destroy(),a.current=null),!m)return;c.current=m;const O=r??(t?UZ(t):"html"),x=Be.updateListener.of(w=>{w.docChanged&&u.current&&u.current(w.state.doc.toString())}),v=It.create({doc:e,extensions:[HC(),MC(),YC(),dT(),VE(),EE(),UE(),QM(),BM(),yg.of([...NM,...mM,...pQ,...vT]),qZ(O),CQ,x,It.readOnly.of(s),Be.theme({"&":{height:"100%"},".cm-scroller":{overflow:"auto"}})]});a.current=new Be({state:v,parent:m})},[e,t,r,s]);return p.jsx("div",{ref:h,className:"h-full w-full overflow-hidden"})}),Cl={width:1920,height:1080},Jx=3,KZ=10;function JZ(n){const e=Number.isFinite(n.stageWidth)&&n.stageWidth>0?n.stageWidth:Cl.width,t=Number.isFinite(n.stageHeight)&&n.stageHeight>0?n.stageHeight:Cl.height,r=n.cardWidth/e,i=n.cardHeight/t;return Math.min(r,i)}function eR(n){return Number.isFinite(n)&&n!=null&&n>0&&n<Jx?n/2:Jx}function e5(n){if(n==null)return null;const e=Number.parseFloat(n);return Number.isFinite(e)&&e>0?e:null}function tR(n){var s,a;const e=n==null?void 0:n.contentWindow,t=(a=(s=e==null?void 0:e.__player)==null?void 0:s.getDuration)==null?void 0:a.call(s);if(Number.isFinite(t)&&t!=null&&t>0)return t;const r=n==null?void 0:n.contentDocument,i=(r==null?void 0:r.querySelector("[data-composition-id]"))??(r==null?void 0:r.documentElement)??null;return e5((i==null?void 0:i.getAttribute("data-composition-duration"))??null)??e5((i==null?void 0:i.getAttribute("data-duration"))??null)}function nR(n,e){var r,i,s,a;const t=(r=n==null?void 0:n.contentWindow)==null?void 0:r.__player;return t?e?((i=t.play)==null||i.call(t),!0):((s=t.pause)==null||s.call(t),(a=t.seek)==null||a.call(t,eR(tR(n))),!0):!1}function rR({projectId:n,comp:e,isActive:t,onSelect:r}){const[i,s]=d.useState(!1),[a,c]=d.useState(Cl),u=d.useRef(null),h=d.useRef(null),m=d.useRef(null),O=d.useCallback(M=>{m.current&&(clearTimeout(m.current),m.current=null);const V=A=>{nR(u.current,M)||A<=0||(m.current=setTimeout(()=>V(A-1),100))};V(KZ)},[]),x=()=>{h.current=setTimeout(()=>s(!0),300)},v=()=>{h.current&&(clearTimeout(h.current),h.current=null),s(!1)},w=e.replace(/^compositions\//,"").replace(/\.html$/,""),k=`/api/projects/${n}/preview/comp/${e}`,$=JZ({cardWidth:80,cardHeight:45,stageWidth:a.width,stageHeight:a.height});return d.useEffect(()=>{O(i)},[i,O]),d.useEffect(()=>()=>{h.current&&clearTimeout(h.current),m.current&&clearTimeout(m.current)},[]),p.jsxs("div",{onClick:r,onPointerEnter:x,onPointerLeave:v,className:`w-full text-left px-2 py-1.5 flex items-center gap-2.5 transition-colors cursor-pointer ${t?"bg-studio-accent/10 border-l-2 border-studio-accent":"border-l-2 border-transparent hover:bg-neutral-800/50"}`,children:[p.jsx("div",{className:"w-20 h-[45px] rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:p.jsx("iframe",{ref:u,src:k,sandbox:"allow-scripts allow-same-origin",loading:"lazy",className:"absolute left-0 top-0 border-none pointer-events-none",style:{transformOrigin:"0 0",width:a.width,height:a.height,transform:`scale(${$})`},onLoad:M=>{var V;try{const Q=(V=M.currentTarget.contentDocument)==null?void 0:V.querySelector("[data-composition-id]"),T=Number(Q==null?void 0:Q.getAttribute("data-width"))||Cl.width,N=Number(Q==null?void 0:Q.getAttribute("data-height"))||Cl.height;c({width:T,height:N}),O(i)}catch{c(Cl)}},title:`${w} preview`,tabIndex:-1})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate block",children:w}),p.jsx("span",{className:"text-[9px] text-neutral-600 truncate block",children:e})]})]})}const iR=d.memo(function({projectId:e,compositions:t,activeComposition:r,onSelect:i}){return t.length===0?p.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:p.jsx("p",{className:"text-xs text-neutral-600 text-center",children:"No compositions found"})}):p.jsx("div",{className:"flex-1 overflow-y-auto",children:t.map(s=>p.jsx(rR,{projectId:e,comp:s,isActive:r===s,onSelect:()=>i(s)},s))})});function Gw({src:n}){const[e,t]=d.useState(null);return d.useEffect(()=>{const r=document.createElement("video");r.crossOrigin="anonymous",r.muted=!0,r.preload="metadata";const i=document.createElement("canvas"),s=i.getContext("2d"),a=()=>{r.src="",r.load()};return r.addEventListener("loadedmetadata",()=>{r.currentTime=Math.min(2,r.duration*.1||2)}),r.addEventListener("seeked",()=>{s&&(i.width=r.videoWidth,i.height=r.videoHeight,s.drawImage(r,0,0),t(i.toDataURL("image/jpeg",.7)),a())}),r.addEventListener("error",a),r.src=n,r.load(),a},[n]),e?p.jsx("img",{src:e,alt:"",draggable:!1,className:"w-full h-full object-contain"}):p.jsx("div",{className:"w-full h-full bg-neutral-800 animate-pulse"})}function sR({serveUrl:n,name:e,isImage:t,isVideo:r,isAudio:i}){return p.jsxs(p.Fragment,{children:[t&&p.jsx("img",{src:n,alt:e,loading:"lazy",className:"w-full h-full object-contain",onError:s=>{s.target.style.display="none"}}),r&&p.jsx(Gw,{src:n}),i&&p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-purple-400",children:[p.jsx("path",{d:"M9 18V5l12-2v13",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("circle",{cx:"6",cy:"18",r:"3"}),p.jsx("circle",{cx:"18",cy:"16",r:"3"})]})}),!t&&!r&&!i&&p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[p.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("polyline",{points:"14 2 14 8 20 8",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}function oR({projectId:n,asset:e,onCopy:t,isCopied:r,onDelete:i,onRename:s}){const[a,c]=d.useState(!1),[u,h]=d.useState(null),[m,O]=d.useState(!1),[x,v]=d.useState(""),[w,k]=d.useState(!1),$=e.split("/").pop()??e,M=`/api/projects/${n}/preview/${e}`,V=ng.test(e);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{draggable:!0,onClick:()=>t(e),onDragStart:A=>{A.dataTransfer.effectAllowed="copy",A.dataTransfer.setData(Mm,JSON.stringify({path:e})),A.dataTransfer.setData("text/plain",e)},onContextMenu:A=>{A.preventDefault(),h({x:A.clientX,y:A.clientY})},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),className:`w-full text-left px-2 py-1.5 flex items-center gap-2.5 transition-colors cursor-pointer ${r?"bg-studio-accent/10 border-l-2 border-studio-accent":"border-l-2 border-transparent hover:bg-neutral-800/50"}`,children:[p.jsxs("div",{className:"w-16 h-10 rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:[p.jsx(sR,{serveUrl:M,name:$,isImage:yu.test(e),isVideo:V,isAudio:rg.test(e)}),V&&a&&p.jsx("video",{src:M,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-contain"})]}),p.jsx("div",{className:"min-w-0 flex-1",children:m?p.jsx("input",{autoFocus:!0,value:x,onChange:A=>v(A.target.value),onKeyDown:A=>{if(A.key==="Enter"){A.preventDefault();const Q=x.trim();if(Q&&Q!==$){const T=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";s==null||s(e,T+Q)}O(!1)}else A.key==="Escape"&&O(!1)},onBlur:()=>{const A=x.trim();if(A&&A!==$){const Q=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";s==null||s(e,Q+A)}O(!1)},onClick:A=>A.stopPropagation(),className:"w-full bg-neutral-800 text-neutral-200 text-[11px] px-1.5 py-0.5 rounded border border-neutral-600 outline-none focus:border-studio-accent",spellCheck:!1}):p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate block",children:$}),r?p.jsx("span",{className:"text-[9px] text-studio-accent",children:"Copied!"}):p.jsx("span",{className:"text-[9px] text-neutral-600 truncate block",children:e})]})})]}),u&&p.jsx("div",{className:"fixed inset-0 z-[200]",onClick:()=>h(null),onContextMenu:A=>{A.preventDefault(),h(null)},children:p.jsxs("div",{className:"absolute bg-neutral-900 border border-neutral-700 rounded-lg shadow-xl py-1 min-w-[140px] text-xs",style:{left:u.x,top:u.y},children:[p.jsx("button",{onClick:A=>{A.stopPropagation(),t(e),h(null)},className:"w-full text-left px-3 py-1.5 text-neutral-300 hover:bg-neutral-800 transition-colors",children:"Copy path"}),s&&p.jsx("button",{onClick:A=>{A.stopPropagation(),v($),O(!0),h(null)},className:"w-full text-left px-3 py-1.5 text-neutral-300 hover:bg-neutral-800 transition-colors",children:"Rename"}),i&&p.jsx("button",{onClick:A=>{A.stopPropagation(),k(!0),h(null)},className:"w-full text-left px-3 py-1.5 text-red-400 hover:bg-neutral-800 transition-colors",children:"Delete"})]})}),w&&p.jsxs("div",{className:"px-2 py-1.5 bg-red-950/30 border-l-2 border-red-500 flex items-center justify-between gap-2",children:[p.jsxs("span",{className:"text-[10px] text-red-400 truncate",children:["Delete ",$,"?"]}),p.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[p.jsx("button",{onClick:A=>{A.stopPropagation(),i==null||i(e),k(!1)},className:"px-2 py-0.5 text-[10px] rounded bg-red-600 text-white hover:bg-red-500 transition-colors",children:"Delete"}),p.jsx("button",{onClick:A=>{A.stopPropagation(),k(!1)},className:"px-2 py-0.5 text-[10px] rounded text-neutral-400 hover:text-neutral-200 transition-colors",children:"Cancel"})]})]})]})}const aR=d.memo(function({projectId:e,assets:t,onImport:r,onDelete:i,onRename:s}){const a=d.useRef(null),[c,u]=d.useState(!1),[h,m]=d.useState(null),O=d.useCallback(w=>{w.preventDefault(),u(!1),w.dataTransfer.files.length&&(r==null||r(w.dataTransfer.files))},[r]),x=d.useCallback(async w=>{await xu(w)&&(m(w),setTimeout(()=>m(null),1500))},[]),v=t.filter(w=>Ly.test(w));return p.jsxs("div",{className:`flex-1 flex flex-col min-h-0 transition-colors ${c?"bg-studio-accent/[0.05]":""}`,onDragOver:w=>{w.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:O,children:[r&&p.jsxs("div",{className:"px-3 py-2 border-b border-neutral-800/40 flex-shrink-0",children:[p.jsxs("button",{onClick:()=>{var w;return(w=a.current)==null?void 0:w.click()},className:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 text-[11px] rounded-lg border border-dashed border-neutral-700/50 text-neutral-500 hover:text-neutral-300 hover:border-neutral-600 transition-colors",children:[p.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),"Import media"]}),p.jsx("input",{ref:a,type:"file",accept:"video/*,image/*,audio/*",multiple:!0,className:"hidden",onChange:w=>{var k;(k=w.target.files)!=null&&k.length&&(r(w.target.files),w.target.value="")}})]}),p.jsx("div",{className:"flex-1 overflow-y-auto",children:v.length===0?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 gap-2",children:[p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-700",children:[p.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("polyline",{points:"17 8 12 3 7 8",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15",strokeLinecap:"round"})]}),p.jsx("p",{className:"text-[10px] text-neutral-600 text-center",children:"Drop media files here"})]}):v.map(w=>p.jsx(oR,{projectId:e,asset:w,onCopy:x,isCopied:h===w,onDelete:i,onRename:s},w))})]})}),gr=n=>({title:t,...r})=>p.jsx(n,{alt:t,"aria-label":t,"aria-hidden":t?void 0:!0,...r}),t5=gr(_P),Up=gr(aA),lR=gr(LP),cR=gr(ZP),uR=gr(iA),Hg=gr(A3),dR=gr(oA),fR=gr(cA),af=gr(fA),Wg=gr(rA),hR=gr(NP),pR=gr(Gy),lf=gr(QP),mR=gr(RP),gR=gr(MP),OR=gr(tA),zn=14,Kn="duotone";function Kw({path:n}){var r;const e=((r=n.split(".").pop())==null?void 0:r.toLowerCase())??"",t="flex-shrink-0";return e==="html"?p.jsx(FP,{size:zn,weight:Kn,color:"#E44D26",className:t}):e==="css"?p.jsx(XP,{size:zn,weight:Kn,color:"#264DE4",className:t}):e==="js"||e==="mjs"||e==="cjs"?p.jsx(HP,{size:zn,weight:Kn,color:"#F0DB4F",className:t}):e==="jsx"?p.jsx(WP,{size:zn,weight:Kn,color:"#61DAFB",className:t}):e==="ts"||e==="mts"?p.jsx(UP,{size:zn,weight:Kn,color:"#3178C6",className:t}):e==="tsx"?p.jsx(GP,{size:zn,weight:Kn,color:"#3178C6",className:t}):e==="json"?p.jsx(IP,{size:zn,weight:Kn,color:"#4ADE80",className:t}):e==="svg"?p.jsx(qP,{size:zn,weight:Kn,color:"#F97316",className:t}):e==="md"||e==="mdx"?p.jsx(BP,{size:zn,weight:Kn,color:"#9CA3AF",className:t}):e==="txt"?p.jsx(KP,{size:zn,weight:Kn,color:"#9CA3AF",className:t}):e==="png"?p.jsx(YP,{size:zn,weight:Kn,color:"#22C55E",className:t}):e==="jpg"||e==="jpeg"?p.jsx(zP,{size:zn,weight:Kn,color:"#22C55E",className:t}):e==="webp"||e==="gif"||e==="ico"?p.jsx(nA,{size:zn,weight:Kn,color:"#22C55E",className:t}):e==="mp4"||e==="webm"||e==="mov"?p.jsx(JP,{size:zn,weight:Kn,color:"#A855F7",className:t}):e==="mp3"||e==="wav"||e==="ogg"||e==="m4a"?p.jsx(dA,{size:zn,weight:Kn,color:"#3CE6AC",className:t}):e==="woff"||e==="woff2"||e==="ttf"||e==="otf"?p.jsx(lA,{size:zn,weight:Kn,color:"#6B7280",className:t}):p.jsx(DP,{size:zn,weight:Kn,color:"#6B7280",className:t})}function xR(n){const e={name:"",fullPath:"",children:new Map,isFile:!1};for(const t of n){const r=t.split("/");let i=e;for(let s=0;s<r.length;s++){const a=r[s],c=s===r.length-1,u=r.slice(0,s+1).join("/");i.children.has(a)||i.children.set(a,{name:a,fullPath:u,children:new Map,isFile:c}),i=i.children.get(a),c&&(i.isFile=!0)}}return e}function Jw(n){return Array.from(n.values()).sort((e,t)=>e.name==="index.html"?-1:t.name==="index.html"?1:!e.isFile&&t.isFile?-1:e.isFile&&!t.isFile?1:e.name.localeCompare(t.name))}function Bg(n,e){if(!e)return!1;if(n.fullPath===e)return!0;for(const t of n.children.values())if(Bg(t,e))return!0;return!1}function yR({state:n,onClose:e,onNewFile:t,onNewFolder:r,onRename:i,onDuplicate:s,onDelete:a}){const c=d.useRef(null);d.useEffect(()=>{const O=v=>{c.current&&!c.current.contains(v.target)&&e()},x=v=>{v.key==="Escape"&&e()};return document.addEventListener("mousedown",O),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",x)}},[e]);const u=Math.min(n.x,window.innerWidth-180),h=Math.min(n.y,window.innerHeight-200),m=n.targetIsFolder?n.targetPath:n.targetPath.includes("/")?n.targetPath.slice(0,n.targetPath.lastIndexOf("/")):"";return p.jsxs("div",{ref:c,className:"fixed z-50 bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[160px]",style:{left:u,top:h},children:[n.targetIsFolder&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{t(n.targetPath),e()},children:[p.jsx(W4,{size:12,weight:"duotone",className:"text-neutral-500"}),"New File"]}),p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{r(n.targetPath),e()},children:[p.jsx(y3,{size:12,weight:"duotone",className:"text-neutral-500"}),"New Folder"]}),p.jsx("div",{className:"border-t border-neutral-700 my-1"})]}),!n.targetIsFolder&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{t(m),e()},children:[p.jsx(W4,{size:12,weight:"duotone",className:"text-neutral-500"}),"New File"]}),p.jsx("div",{className:"border-t border-neutral-700 my-1"})]}),p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{i(n.targetPath),e()},children:[p.jsx(sA,{size:12,weight:"duotone",className:"text-neutral-500"}),"Rename"]}),!n.targetIsFolder&&p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{s(n.targetPath),e()},children:[p.jsx(VP,{size:12,weight:"duotone",className:"text-neutral-500"}),"Duplicate"]}),p.jsx("div",{className:"border-t border-neutral-700 my-1"}),p.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-900/30 cursor-pointer text-left",onClick:()=>{a(n.targetPath),e()},children:[p.jsx(uA,{size:12,weight:"duotone"}),"Delete"]})]})}function Qd({defaultValue:n,depth:e,isFolder:t,onCommit:r,onCancel:i}){const s=d.useRef(null),a=d.useRef(!1),[c,u]=d.useState(n);d.useEffect(()=>{const x=s.current;if(x)if(x.focus(),n&&n.includes(".")){const v=n.lastIndexOf(".");x.setSelectionRange(0,v)}else x.select()},[n]);const h=x=>{a.current||(a.current=!0,r(x))},m=x=>{if(x.key==="Enter"){x.preventDefault();const v=c.trim();v&&!(/[/\\]/.test(v)||v.includes(".."))?h(v):i()}else x.key==="Escape"&&(x.preventDefault(),i())},O=()=>{const x=c.trim();x&&x!==n&&!(/[/\\]/.test(x)||x.includes(".."))?h(x):i()};return p.jsxs("div",{className:"flex items-center gap-2 py-0.5 min-h-7",style:{paddingLeft:`${8+e*12+(t?0:14)}px`},children:[t?p.jsx(eA,{size:zn,weight:"duotone",color:"#6B7280",className:"flex-shrink-0"}):p.jsx(Kw,{path:c}),p.jsx("input",{ref:s,value:c,onChange:x=>u(x.target.value),onKeyDown:m,onBlur:O,className:"flex-1 min-w-0 bg-neutral-800 text-neutral-200 text-xs px-1.5 py-0.5 rounded border border-neutral-600 outline-none focus:border-[#3CE6AC]",spellCheck:!1})]})}function vR({name:n,onConfirm:e,onCancel:t}){const r=d.useRef(null);return d.useEffect(()=>{const i=a=>{a.key==="Escape"&&t()},s=a=>{r.current&&!r.current.contains(a.target)&&t()};return document.addEventListener("keydown",i),document.addEventListener("mousedown",s),()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",s)}},[t]),p.jsxs("div",{ref:r,className:"mx-1 my-0.5 p-2 bg-neutral-800 border border-neutral-700 rounded-md text-xs",children:[p.jsxs("p",{className:"text-neutral-300 mb-2",children:["Delete ",p.jsx("span",{className:"font-medium text-neutral-100",children:n}),"?"]}),p.jsxs("div",{className:"flex gap-1.5",children:[p.jsx("button",{onClick:t,className:"flex-1 px-2 py-1 rounded bg-neutral-700 text-neutral-300 hover:bg-neutral-600 transition-colors",children:"Cancel"}),p.jsx("button",{onClick:e,className:"flex-1 px-2 py-1 rounded bg-red-900/60 text-red-300 hover:bg-red-800/60 transition-colors",children:"Delete"})]})]})}function eS({node:n,depth:e,activeFile:t,onSelectFile:r,defaultOpen:i,onContextMenu:s,inlineInput:a,onDragStart:c,onDragOver:u,onDrop:h,onDragLeave:m,dragOverFolder:O}){const[x,v]=d.useState(i),w=d.useCallback(()=>v(A=>!A),[]),k=d.useMemo(()=>Jw(n.children),[n.children]),$=x?hR:pR,M=O===n.fullPath;return(a==null?void 0:a.mode)==="rename"&&a.originalPath===n.fullPath?p.jsx(Qd,{defaultValue:a.originalName??n.name,depth:e,isFolder:!0,onCommit:A=>{var Q;(Q=a==null?void 0:a.onCommit)==null||Q.call(a,A)},onCancel:()=>{var A;(A=a==null?void 0:a.onCancel)==null||A.call(a)}}):p.jsxs(p.Fragment,{children:[p.jsxs("button",{draggable:!0,onDragStart:A=>c(A,n.fullPath),onClick:w,onContextMenu:A=>{A.preventDefault(),s(A,n.fullPath,!0)},onDragOver:A=>{A.preventDefault(),A.stopPropagation(),u(A,n.fullPath)},onDrop:A=>{A.preventDefault(),A.stopPropagation(),h(A,n.fullPath)},onDragLeave:m,className:`w-full flex items-center gap-1.5 px-2.5 py-1 min-h-7 text-left text-xs text-neutral-400 hover:bg-neutral-800/30 hover:text-neutral-300 transition-colors ${M?"bg-[#3CE6AC]/10 outline outline-1 outline-[#3CE6AC]/40":""}`,style:{paddingLeft:`${8+e*12}px`},children:[p.jsx($,{size:10,className:"flex-shrink-0 text-neutral-600"}),p.jsx("span",{className:"truncate font-medium",children:n.name})]}),x&&p.jsxs(p.Fragment,{children:[a&&(a.mode==="new-file"||a.mode==="new-folder")&&a.parentPath===n.fullPath&&p.jsx(Qd,{defaultValue:"",depth:e+1,isFolder:a.mode==="new-folder",onCommit:A=>{var Q;(Q=a==null?void 0:a.onCommit)==null||Q.call(a,A)},onCancel:()=>{var A;(A=a==null?void 0:a.onCancel)==null||A.call(a)}}),k.map(A=>A.isFile&&A.children.size===0?p.jsx(M2,{node:A,depth:e+1,activeFile:t,onSelectFile:r,onContextMenu:s,inlineInput:a,onDragStart:c},A.fullPath):A.children.size>0?p.jsx(eS,{node:A,depth:e+1,activeFile:t,onSelectFile:r,defaultOpen:Bg(A,t),onContextMenu:s,inlineInput:a,onDragStart:c,onDragOver:u,onDrop:h,onDragLeave:m,dragOverFolder:O},A.fullPath):p.jsx(M2,{node:A,depth:e+1,activeFile:t,onSelectFile:r,onContextMenu:s,inlineInput:a,onDragStart:c},A.fullPath))]})]})}function M2({node:n,depth:e,activeFile:t,onSelectFile:r,onContextMenu:i,inlineInput:s,onDragStart:a}){const c=n.fullPath===t;return(s==null?void 0:s.mode)==="rename"&&s.originalPath===n.fullPath?p.jsx(Qd,{defaultValue:s.originalName??n.name,depth:e,isFolder:!1,onCommit:h=>{var m;(m=s==null?void 0:s.onCommit)==null||m.call(s,h)},onCancel:()=>{var h;(h=s==null?void 0:s.onCancel)==null||h.call(s)}}):p.jsxs("button",{draggable:!0,onDragStart:h=>a(h,n.fullPath),onClick:()=>r(n.fullPath),onContextMenu:h=>{h.preventDefault(),i(h,n.fullPath,!1)},className:`w-full flex items-center gap-2 py-1 min-h-7 text-left transition-all text-xs ${c?"bg-neutral-800/60 text-neutral-200":"text-neutral-500 hover:bg-neutral-800/30 hover:text-neutral-300"}`,style:{paddingLeft:`${8+e*12+14}px`},children:[p.jsx(Kw,{path:n.name}),p.jsx("span",{className:"truncate",children:n.name})]})}const bR=d.memo(function({files:e,activeFile:t,onSelectFile:r,onCreateFile:i,onCreateFolder:s,onDeleteFile:a,onRenameFile:c,onDuplicateFile:u,onMoveFile:h,onImportFiles:m}){const O=d.useMemo(()=>xR(e),[e]),x=d.useMemo(()=>Jw(O.children),[O]),[v,w]=d.useState(null),[k,$]=d.useState(null),[M,V]=d.useState(null),[A,Q]=d.useState(null),T=d.useRef(null),N=!!(i||s||a||c||u),j=d.useCallback((E,X,ee)=>{N&&(E.preventDefault(),w({x:E.clientX,y:E.clientY,targetPath:X,targetIsFolder:ee}))},[N]),W=d.useCallback(()=>w(null),[]),K=d.useCallback(E=>{$({parentPath:E,mode:"new-file",onCommit:X=>{const ee=E?`${E}/${X}`:X;i==null||i(ee),$(null)},onCancel:()=>$(null)})},[i]),ae=d.useCallback(E=>{$({parentPath:E,mode:"new-folder",onCommit:X=>{const ee=E?`${E}/${X}`:X;s==null||s(ee),$(null)},onCancel:()=>$(null)})},[s]),ie=d.useCallback(E=>{const X=E.includes("/")?E.slice(E.lastIndexOf("/")+1):E,ee=E.includes("/")?E.slice(0,E.lastIndexOf("/")):"";$({parentPath:ee,mode:"rename",originalPath:E,originalName:X,onCommit:Ce=>{if(Ce!==X){const Te=ee?`${ee}/${Ce}`:Ce;c==null||c(E,Te)}$(null)},onCancel:()=>$(null)})},[c]),L=d.useCallback(E=>{u==null||u(E)},[u]),le=d.useCallback(E=>{V(E)},[]),ye=d.useCallback(()=>{M&&(a==null||a(M),V(null))},[M,a]),Oe=d.useCallback(()=>{V(null)},[]),$e=d.useCallback((E,X)=>{T.current=X,E.dataTransfer.effectAllowed="move",E.dataTransfer.setData("text/plain",X)},[]),pe=d.useCallback((E,X)=>{Q(X)},[]),D=d.useCallback((E,X)=>{if(E.dataTransfer.files.length>0&&!T.current){E.preventDefault(),m==null||m(E.dataTransfer.files,X||void 0),Q(null);return}const ee=T.current;if(!ee||!h){Q(null);return}const Ce=ee.includes("/")?ee.slice(ee.lastIndexOf("/")+1):ee,Te=X?`${X}/${Ce}`:Ce;Te!==ee&&!X.startsWith(ee+"/")&&h(ee,Te),Q(null),T.current=null},[h,m]),z=d.useCallback(()=>{Q(null)},[]),q=d.useCallback(E=>{N&&E.target===E.currentTarget&&(E.preventDefault(),w({x:E.clientX,y:E.clientY,targetPath:"",targetIsFolder:!0}))},[N]);return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[N&&p.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-b border-neutral-800/50 flex-shrink-0",children:[p.jsx("span",{className:"text-[10px] font-semibold tracking-wider text-neutral-600 uppercase",children:"Files"}),p.jsxs("div",{className:"flex items-center gap-0.5",children:[p.jsx("button",{onClick:()=>K(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New File",children:p.jsx(A3,{size:12,weight:"bold"})}),p.jsx("button",{onClick:()=>ae(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New Folder",children:p.jsx(y3,{size:12,weight:"duotone"})})]})]}),p.jsxs("div",{className:`flex-1 overflow-y-auto py-1 transition-colors ${A===""?"bg-[#3CE6AC]/5 outline outline-1 outline-[#3CE6AC]/30 -outline-offset-1":""}`,onContextMenu:q,onDragOver:E=>{E.preventDefault(),E.target===E.currentTarget&&Q("")},onDragLeave:E=>{E.target===E.currentTarget&&Q(null)},onDrop:E=>{E.preventDefault(),D(E,"")},children:[k&&(k.mode==="new-file"||k.mode==="new-folder")&&k.parentPath===""&&p.jsx(Qd,{defaultValue:"",depth:0,isFolder:k.mode==="new-folder",onCommit:E=>{var X;return(X=k.onCommit)==null?void 0:X.call(k,E)},onCancel:()=>{var E;return(E=k.onCancel)==null?void 0:E.call(k)}}),x.map(E=>E.isFile&&E.children.size===0?p.jsx(M2,{node:E,depth:0,activeFile:t,onSelectFile:r,onContextMenu:j,inlineInput:k,onDragStart:$e},E.fullPath):p.jsx(eS,{node:E,depth:0,activeFile:t,onSelectFile:r,defaultOpen:Bg(E,t),onContextMenu:j,inlineInput:k,onDragStart:$e,onDragOver:pe,onDrop:D,onDragLeave:z,dragOverFolder:A},E.fullPath))]}),M&&p.jsx("div",{className:"border-t border-neutral-800/50 flex-shrink-0",children:p.jsx(vR,{name:M.includes("/")?M.slice(M.lastIndexOf("/")+1):M,onConfirm:ye,onCancel:Oe})}),v&&p.jsx(yR,{state:v,onClose:W,onNewFile:K,onNewFolder:ae,onRename:ie,onDuplicate:L,onDelete:le})]})}),tS="hf-studio-sidebar-tab";function wR(){const n=localStorage.getItem(tS);return n==="assets"?"assets":n==="code"?"code":"compositions"}const SR=d.memo(d.forwardRef(function({width:e=240,projectId:t,compositions:r,assets:i,activeComposition:s,onSelectComposition:a,onImportFiles:c,fileTree:u,editingFile:h,onSelectFile:m,onCreateFile:O,onCreateFolder:x,onDeleteFile:v,onRenameFile:w,onDuplicateFile:k,onMoveFile:$,codeChildren:M,onLint:V,linting:A,onToggleCollapse:Q,takeoverContent:T},N){const[j,W]=d.useState(wR),K=d.useCallback(ae=>{W(ae),localStorage.setItem(tS,ae)},[]);return d.useImperativeHandle(N,()=>({selectTab:K}),[K]),p.jsx("div",{className:"flex flex-col h-full bg-neutral-950 border-r border-neutral-800/50",style:{width:e},children:T?p.jsx("div",{className:"flex min-h-0 flex-1",children:T}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"border-b border-neutral-800/50 px-3 py-3 flex-shrink-0",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5 rounded-[18px] bg-neutral-900 p-1 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",style:{gridTemplateColumns:"1fr 1fr 1fr"},children:[p.jsx("button",{type:"button",onClick:()=>K("code"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${j==="code"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Code"}),p.jsx("button",{type:"button",onClick:()=>K("compositions"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${j==="compositions"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Comps"}),p.jsx("button",{type:"button",onClick:()=>K("assets"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${j==="assets"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Assets"})]}),Q&&p.jsx("button",{type:"button",onClick:Q,className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-transparent text-neutral-500 transition-colors hover:border-neutral-800 hover:bg-neutral-900 hover:text-neutral-300",title:"Hide sidebar","aria-label":"Hide sidebar",children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("path",{d:"m14 7-5 5 5 5"}),p.jsx("path",{d:"M19 4v16"})]})})]})}),j==="compositions"&&p.jsx(iR,{projectId:t,compositions:r,activeComposition:s,onSelect:a}),j==="assets"&&p.jsx(aR,{projectId:t,assets:i,onImport:c,onDelete:v,onRename:w}),j==="code"&&p.jsxs("div",{className:"flex flex-1 min-h-0",children:[((u==null?void 0:u.length)??0)>0&&p.jsx("div",{className:"w-[160px] flex-shrink-0 border-r border-neutral-800 overflow-y-auto",children:p.jsx(bR,{files:u??[],activeFile:(h==null?void 0:h.path)??null,onSelectFile:m??(()=>{}),onCreateFile:O,onCreateFolder:x,onDeleteFile:v,onRenameFile:w,onDuplicateFile:k,onMoveFile:$,onImportFiles:c})}),p.jsx("div",{className:"flex-1 overflow-hidden min-w-0",children:M??p.jsx("div",{className:"flex items-center justify-center h-full text-neutral-600 text-sm",children:"Select a file to edit"})})]}),V&&p.jsx("div",{className:"border-t border-neutral-800 p-2 flex-shrink-0",children:p.jsxs("button",{onClick:V,disabled:A,className:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 rounded-md text-[11px] font-medium text-neutral-500 hover:text-amber-300 hover:bg-neutral-800 transition-colors disabled:opacity-40",children:[p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("path",{d:"M9 11l3 3L22 4"}),p.jsx("path",{d:"M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"})]}),A?"Linting…":"Lint"]})})]})})}));function kR(n){if(n<1e3)return`${n}ms`;const e=Math.round(n/1e3);return e<60?`${e}s`:`${Math.floor(e/60)}m ${e%60}s`}function PR(n){const e=Date.now()-n;return e<6e4?"just now":e<36e5?`${Math.floor(e/6e4)}m ago`:`${Math.floor(e/36e5)}h ago`}const AR=d.memo(function({job:e,projectId:t,onDelete:r}){const[i,s]=d.useState(!1),a=`/api/projects/${t}/renders/file/${e.filename}`,c=d.useCallback(()=>{window.open(a,"_blank")},[a]),u=d.useCallback(O=>{O.stopPropagation();const x=document.createElement("a");x.href=a,x.download=e.filename,x.click()},[a,e.filename]),h=a,m=e.status==="complete";return p.jsx("div",{onPointerEnter:()=>s(!0),onPointerLeave:()=>s(!1),onClick:m?c:void 0,className:["px-3 py-2.5 border-b border-neutral-800/30 last:border-0 transition-colors duration-150",m?"cursor-pointer hover:bg-neutral-800/30":""].filter(Boolean).join(" "),children:p.jsxs("div",{className:"flex items-center gap-2.5",children:[p.jsxs("div",{className:"w-20 h-[45px] rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:[m&&p.jsxs(p.Fragment,{children:[i&&p.jsx("video",{src:h,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-contain"}),p.jsx("div",{className:"absolute inset-0 transition-opacity duration-150",style:{opacity:i?0:1},children:p.jsx(Gw,{src:h})})]}),e.status==="rendering"&&p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{className:"w-2 h-2 rounded-full bg-studio-accent animate-pulse"})}),e.status==="failed"&&p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{className:"w-2 h-2 rounded-full bg-red-400"})}),e.status==="cancelled"&&p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{className:"w-2 h-2 rounded-full bg-neutral-600"})})]}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate",children:e.filename}),e.durationMs&&p.jsx("span",{className:"text-[9px] text-neutral-600 flex-shrink-0",children:kR(e.durationMs)})]}),e.status==="rendering"&&p.jsxs("div",{className:"mt-1",children:[p.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[p.jsx("span",{className:"text-[9px] text-neutral-500",children:e.stage||"Rendering"}),p.jsxs("span",{className:"text-[9px] font-mono text-studio-accent",children:[e.progress,"%"]})]}),p.jsx("div",{className:"w-full h-1 bg-neutral-800 rounded-full overflow-hidden",children:p.jsx("div",{className:"h-full bg-studio-accent rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),e.status==="failed"&&e.error&&p.jsx("span",{className:"text-[9px] text-red-400 mt-0.5 block",children:e.error}),e.status!=="rendering"&&p.jsx("span",{className:"text-[9px] text-neutral-600",children:PR(e.createdAt)})]}),i&&p.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[m&&p.jsx("button",{onClick:u,className:"p-1 rounded text-neutral-500 hover:text-green-400 transition-colors",title:"Download",children:p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),p.jsx("polyline",{points:"7 10 12 15 17 10"}),p.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}),p.jsx("button",{onClick:O=>{O.stopPropagation(),r()},className:"p-1 rounded text-neutral-500 hover:text-red-400 transition-colors",title:"Remove",children:p.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:p.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]})})}),$R=[{value:"auto",label:"Auto"},{value:"landscape",label:"1080p"},{value:"landscape-4k",label:"4K"},{value:"portrait",label:"1080p ↕"},{value:"portrait-4k",label:"4K ↕"},{value:"square",label:"Square"},{value:"square-4k",label:"Square 4K"}],Gp={mp4:{label:"MP4",desc:"Best for general use. Smallest file, universal playback."},mov:{label:"MOV (ProRes 4444)",desc:"Transparent video. Works in CapCut, Final Cut Pro, Premiere, DaVinci Resolve, After Effects. Large files."},webm:{label:"WebM (VP9)",desc:"Transparent video for web. Smaller than MOV but limited editor support."}};function CR({format:n}){const[e,t]=d.useState(!1),r=d.useRef(void 0),i=()=>{clearTimeout(r.current),t(!0)},s=()=>{r.current=setTimeout(()=>t(!1),120)};d.useEffect(()=>()=>clearTimeout(r.current),[]);const a=Gp[n];return p.jsxs("div",{className:"relative",onPointerEnter:i,onPointerLeave:s,children:[p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-neutral-600 hover:text-neutral-400 transition-colors cursor-help",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10"}),p.jsx("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),p.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),e&&p.jsxs("div",{className:"absolute top-full right-0 mt-1.5 w-52 p-2 rounded bg-neutral-900 border border-neutral-700 shadow-lg z-50",children:[p.jsx("p",{className:"text-[10px] font-semibold text-neutral-200 mb-0.5",children:a.label}),p.jsx("p",{className:"text-[9px] text-neutral-400 leading-tight",children:a.desc}),p.jsx("div",{className:"mt-1.5 pt-1.5 border-t border-neutral-800",children:["mp4","mov","webm"].filter(c=>c!==n).map(c=>p.jsxs("p",{className:"text-[9px] text-neutral-500 leading-relaxed",children:[p.jsx("span",{className:"text-neutral-400 font-medium",children:Gp[c].label})," — ",Gp[c].desc]},c))})]})]})}const n5=[{value:"draft",label:"Draft",title:"Fast render, smaller file"},{value:"standard",label:"Standard",title:"Good quality, balanced file size"},{value:"high",label:"High Quality",title:"Best quality, larger file"}];function ER({onStartRender:n,isRendering:e}){var O;const[t,r]=d.useState("mp4"),[i,s]=d.useState("standard"),[a,c]=d.useState("auto"),[u,h]=d.useState(30),m=t!=="mov";return p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(CR,{format:t}),p.jsx("select",{value:a,onChange:x=>c(x.target.value),disabled:e,className:"h-5 px-1 text-[10px] rounded-l bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:$R.map(x=>p.jsx("option",{value:x.value,children:x.label},x.value))}),m&&p.jsx("select",{value:i,onChange:x=>s(x.target.value),disabled:e,title:(O=n5.find(x=>x.value===i))==null?void 0:O.title,className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:n5.map(x=>p.jsx("option",{value:x.value,title:x.title,children:x.label},x.value))}),p.jsxs("select",{value:u,onChange:x=>h(Number(x.target.value)),disabled:e,title:"Frames per second",className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:[p.jsx("option",{value:24,children:"24fps"}),p.jsx("option",{value:30,children:"30fps"}),p.jsx("option",{value:60,children:"60fps"})]}),p.jsxs("select",{value:t,onChange:x=>r(x.target.value),disabled:e,className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:[p.jsx("option",{value:"mp4",children:"MP4"}),p.jsx("option",{value:"mov",children:"MOV"}),p.jsx("option",{value:"webm",children:"WebM"})]}),p.jsx("button",{onClick:()=>{n(t,i,a,u)},disabled:e,className:"flex items-center gap-1 px-2 py-0.5 text-[10px] font-semibold rounded-r bg-studio-accent text-[#09090B] hover:brightness-110 transition-colors disabled:opacity-50",children:e?"Rendering...":"Export"})]})}const TR=d.memo(function({jobs:e,projectId:t,onDelete:r,onClearCompleted:i,onStartRender:s,isRendering:a}){const c=d.useRef(null);d.useEffect(()=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:"smooth"})},[e.length]);const u=e.filter(h=>h.status!=="rendering").length;return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsx("div",{className:"flex items-center justify-end px-3 py-2 border-b border-neutral-800/50 flex-shrink-0",children:p.jsxs("div",{className:"flex items-center gap-1.5",children:[u>0&&p.jsx("button",{onClick:i,className:"text-[10px] text-neutral-600 hover:text-neutral-400 transition-colors",children:"Clear"}),p.jsx(ER,{onStartRender:s,isRendering:a})]})}),p.jsx("div",{ref:c,className:"flex-1 overflow-y-auto",children:e.length===0?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 gap-2",children:[p.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-700",children:[p.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2.18",ry:"2.18",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("path",{d:"M7 2v20M17 2v20M2 12h20M2 7h5M2 17h5M17 17h5M17 7h5",strokeLinecap:"round",strokeLinejoin:"round"})]}),p.jsx("p",{className:"text-[10px] text-neutral-600 text-center",children:"No renders yet"})]}):e.map(h=>p.jsx(AR,{job:h,projectId:t,onDelete:()=>r(h.id)},h.id))})]})});function MR(n){const[e,t]=d.useState([]),r=d.useRef(null),i=d.useRef(null),s=d.useCallback(async()=>{if(n)try{const h=await fetch(`/api/projects/${n}/renders`);if(!h.ok)return;const m=await h.json();Array.isArray(m.renders)&&t(O=>{const x=new Set(O.map(w=>w.id)),v=m.renders.filter(w=>!x.has(w.id)).map(w=>({id:w.id,status:w.status==="failed"?"failed":"complete",progress:100,filename:w.filename,createdAt:w.createdAt,durationMs:w.durationMs}));return[...O,...v]})}catch{}},[n]);d.useEffect(()=>{s()},[s]);const a=d.useCallback(async(h={})=>{if(!n)return;const m=h.fps??30,O=h.quality??"standard",x=h.format??"mp4",v=h.resolution,w=Date.now(),k={fps:m,quality:O,format:x};v&&v!=="auto"&&(k.resolution=v);let $;try{$=await fetch(`/api/projects/${n}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})}catch{const N={id:crypto.randomUUID(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:w};t(j=>[...j,N]);return}if(!$.ok){const N={id:crypto.randomUUID(),status:"failed",progress:0,error:`Server error (${$.status}). Check the terminal for details.`,filename:"Export failed",createdAt:w};t(j=>[...j,N]);return}const{jobId:M}=await $.json(),A={mp4:".mp4",webm:".webm",mov:".mov"}[x]??".mp4",Q={id:M,status:"rendering",progress:0,filename:`${M}${A}`,createdAt:w};t(N=>[...N,Q]),i.current=M;const T=new EventSource(`/api/render/${M}/progress`);return r.current=T,T.addEventListener("progress",N=>{try{const j=JSON.parse(N.data);t(W=>W.map(K=>K.id===M?{...K,progress:j.progress??K.progress,stage:j.stage??j.message??K.stage,status:j.status==="complete"?"complete":j.status==="failed"?"failed":K.status,durationMs:j.status==="complete"?Date.now()-w:void 0,error:j.error??K.error}:K)),(j.status==="complete"||j.status==="failed")&&(T.close(),i.current=null)}catch{}}),T.onerror=()=>{T.close(),t(N=>N.map(j=>j.id===M&&j.status==="rendering"?{...j,status:"failed",error:"Connection lost. Is the render server running?"}:j)),i.current=null},M},[n]),c=d.useCallback(async h=>{try{await fetch(`/api/render/${h}`,{method:"DELETE"})}catch{}t(m=>m.filter(O=>O.id!==h))},[]),u=d.useCallback(()=>{t(h=>h.filter(m=>m.status==="rendering"))},[]);return d.useEffect(()=>()=>{var h;(h=r.current)==null||h.close(),r.current=null},[n]),{jobs:e,startRender:a,deleteRender:c,clearCompleted:u,isRendering:e.some(h=>h.status==="rendering")}}const nS=2,QR=1,r5=nS+QR;function jR(n,e){const t=[],r=Math.floor(n.length/e);if(r===0)return Array(e).fill(0);for(let s=0;s<e;s++){let a=0;const c=s*r,u=Math.min(c+r,n.length);for(let h=c;h<u;h++){const m=Math.abs(n[h]??0);m>a&&(a=m)}t.push(a)}const i=Math.max(...t,.001);return t.map(s=>s/i)}function ZR(n,e){let t=0;for(let s=0;s<n.length;s++)t=(t<<5)-t+n.charCodeAt(s)|0;t=Math.abs(t)||42;const r=()=>(t=t*16807%2147483647,(t&2147483647)/2147483647),i=[];for(let s=0;s<e;s++){const a=s/e,c=.3+.3*Math.sin(a*Math.PI*3.2)+.2*Math.sin(a*Math.PI*7.1);i.push(Math.max(.05,Math.min(1,c*(.4+.6*r()))))}return i}const i5=new Map,Kp=new Map,RR=d.memo(function({audioUrl:e,waveformUrl:t,label:r,labelColor:i}){const s=d.useRef(null),a=d.useRef(null),c=d.useRef(null),u=t??e,[h,m]=d.useState(i5.get(u)??null);d.useEffect(()=>{if(h||!u)return;let v=!1,w=Kp.get(u);return w||(w=(t?fetch(t).then(k=>k.json()).then(k=>{if(!Array.isArray(k.peaks))throw new Error("bad response");return k.peaks}):fetch(e).then(k=>k.arrayBuffer()).then(k=>{const $=new AudioContext;return $.decodeAudioData(k).finally(()=>$.close())}).then(k=>jR(k.getChannelData(0),4e3))).catch(()=>ZR(u,4e3)).then(k=>(i5.set(u,k),k)).finally(()=>Kp.delete(u)),Kp.set(u,w)),w.then(k=>{v||m(k)}),()=>{v=!0}},[e,t,u,h]);const O=d.useCallback(()=>{const v=s.current,w=a.current;if(!v||!w||!h)return;const k=v.clientWidth||400,$=Math.min(Math.floor(k/r5),h.length);let M="";for(let V=0;V<$;V++){const A=Math.floor(V/$*h.length),Q=h[A]??0,T=Math.max(3,Math.round(Q*100)),N=(.45+Q*.4).toFixed(2);M+=`<div style="position:absolute;bottom:0;left:${V*r5}px;width:${nS}px;height:${T}%;background:rgba(75,163,210,${N})"></div>`}w.innerHTML=M},[h]),x=d.useCallback(v=>{var w;(w=c.current)==null||w.disconnect(),s.current=v,v&&(O(),c.current=new ResizeObserver(()=>O()),c.current.observe(v))},[O]);return d.useEffect(()=>{O()},[O]),d.useEffect(()=>()=>{var v;(v=c.current)==null||v.disconnect()},[]),p.jsxs("div",{ref:x,className:"absolute inset-0 overflow-hidden",children:[p.jsx("div",{ref:a,className:"absolute left-0 right-0 bottom-0",style:{top:16}}),!h&&p.jsx("div",{className:"absolute left-0 right-0 bottom-0 animate-pulse",style:{top:16,background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),p.jsx("div",{className:"absolute top-0 left-0 right-0 px-1.5 py-0.5 z-10",children:p.jsx("span",{className:"text-[9px] font-semibold truncate block leading-tight",style:{color:i,textShadow:"0 1px 3px rgba(0,0,0,0.9)"},children:r})})]})});function s5({findings:n,projectId:e,onClose:t}){const r=n.filter(h=>h.severity==="error"),i=n.filter(h=>h.severity==="warning"),s=n.length>0,[a,c]=d.useState(!1),u=async()=>{const h=n.map(x=>{let v=`[${x.severity}] ${x.message}`;return x.file&&(v+=`
|
|
77
|
-
File: ${x.file}`),x.fixHint&&(v+=`
|
|
78
|
-
Fix: ${x.fixHint}`),v}),m=`Fix these HyperFrames lint issues for project "${e}":
|
|
79
|
-
|
|
80
|
-
Project path: ${window.location.href}
|
|
81
|
-
|
|
82
|
-
${h.join(`
|
|
83
|
-
|
|
84
|
-
`)}`;await xu(m)&&(c(!0),setTimeout(()=>c(!1),2e3))};return p.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:p.jsxs("div",{className:"bg-neutral-950 border border-neutral-800 rounded-xl shadow-2xl w-full max-w-xl max-h-[80vh] flex flex-col overflow-hidden",onClick:h=>h.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-neutral-800",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[s?p.jsx("div",{className:"w-8 h-8 rounded-full bg-red-500/10 flex items-center justify-center",children:p.jsx(X1,{size:18,className:"text-red-400",weight:"fill"})}):p.jsx("div",{className:"w-8 h-8 rounded-full bg-studio-accent/10 flex items-center justify-center",children:p.jsx(Jy,{size:18,className:"text-studio-accent",weight:"fill"})}),p.jsxs("div",{children:[p.jsx("h2",{className:"text-sm font-semibold text-neutral-200",children:s?`${r.length} error${r.length!==1?"s":""}, ${i.length} warning${i.length!==1?"s":""}`:"All checks passed"}),p.jsx("p",{className:"text-xs text-neutral-500",children:"HyperFrame Lint Results"})]})]}),p.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-neutral-500 hover:text-neutral-200 hover:bg-neutral-800 transition-colors",children:p.jsx(ig,{size:16})})]}),s&&p.jsx("div",{className:"flex items-center justify-end px-5 py-2 border-b border-neutral-800/50",children:p.jsx("button",{onClick:u,className:`px-3 py-1 text-xs font-medium rounded-lg transition-colors ${a?"bg-green-600 text-white":"bg-studio-accent hover:bg-studio-accent/80 text-white"}`,children:a?"Copied!":"Copy to Agent"})}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-3",children:[!s&&p.jsx("div",{className:"py-8 text-center text-neutral-500 text-sm",children:"No errors or warnings found. Your composition looks good!"}),r.map((h,m)=>p.jsx("div",{className:"py-3 border-b border-neutral-800/50 last:border-0",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx(X1,{size:14,className:"text-red-400 flex-shrink-0 mt-0.5",weight:"fill"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"text-sm text-neutral-200",children:h.message}),h.file&&p.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:h.file}),h.fixHint&&p.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[p.jsx(nd,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),p.jsx("p",{className:"text-xs text-studio-accent",children:h.fixHint})]})]})]})},`e-${m}`)),i.map((h,m)=>p.jsx("div",{className:"py-3 border-b border-neutral-800/50 last:border-0",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx(X1,{size:14,className:"text-amber-400 flex-shrink-0 mt-0.5"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"text-sm text-neutral-300",children:h.message}),h.file&&p.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:h.file}),h.fixHint&&p.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[p.jsx(nd,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),p.jsx("p",{className:"text-xs text-studio-accent",children:h.fixHint})]})]})]})},`w-${m}`))]})]})})}function NR({projectId:n,filePath:e}){const t=`/api/projects/${n}/preview/${e}`,r=e.split("/").pop()??e;return yu.test(e)?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950",children:[p.jsx("img",{src:t,alt:r,className:"max-w-full max-h-[70%] object-contain rounded border border-neutral-800"}),p.jsx("span",{className:"mt-3 text-[11px] text-neutral-500 font-mono",children:e})]}):ng.test(e)?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950",children:[p.jsx("video",{src:t,controls:!0,className:"max-w-full max-h-[70%] rounded border border-neutral-800"}),p.jsx("span",{className:"mt-3 text-[11px] text-neutral-500 font-mono",children:e})]}):rg.test(e)?p.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950 gap-3",children:[p.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[p.jsx("path",{d:"M9 18V5l12-2v13",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("circle",{cx:"6",cy:"18",r:"3"}),p.jsx("circle",{cx:"18",cy:"16",r:"3"})]}),p.jsx("audio",{src:t,controls:!0,className:"w-full max-w-[280px]"}),p.jsx("span",{className:"text-[11px] text-neutral-500 font-mono",children:e})]}):p.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950 gap-2",children:[p.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[p.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("polyline",{points:"14 2 14 8 20 8",strokeLinecap:"round",strokeLinejoin:"round"})]}),p.jsx("span",{className:"text-sm text-neutral-400 font-medium",children:r}),p.jsx("span",{className:"text-[11px] text-neutral-600 font-mono",children:e}),p.jsx("span",{className:"text-[10px] text-neutral-600",children:"Binary file — preview not available"})]})}const LR=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function VR(n){return n.metaKey||n.ctrlKey||n.altKey?!1:LR.has(n.key)}function _R(n,e,t){var v,w;let r=null,i=null;try{r=n.contentDocument,i=n.contentWindow}catch{return[]}if(!r||!i)return[];const s=n.getBoundingClientRect(),a=t.getBoundingClientRect(),c=parseFloat(n.style.width)||s.width,u=s.width/c,h=s.left-a.left,m=s.top-a.top,O=r.querySelectorAll(".caption-group"),x=[];for(let k=0;k<e.groupOrder.length;k++){const $=e.groupOrder[k],M=e.groups.get($);if(!M)continue;const V=O[k];if(!V)continue;const A=i.getComputedStyle(V);if(parseFloat(A.opacity)<=.01||A.visibility==="hidden")continue;const Q=[];for(const T of V.children){const N=T;if(N.dataset.captionWrapper==="true"){const j=N.querySelector(":scope > span");j&&Q.push(j)}else N.tagName==="SPAN"&&Q.push(N)}if(Q.length===0&&((v=V.textContent)!=null&&v.trim())){const T=V.childNodes[0];if(T&&T.nodeType===Node.TEXT_NODE){const N=(T.textContent||"").split(/\s+/).filter(Boolean),j=r.createDocumentFragment();for(const W of N){const K=r.createElement("span");K.textContent=W+" ",K.style.display="inline",j.appendChild(K),Q.push(K)}V.replaceChild(j,T)}else{const N=V.querySelector(":scope > span");if(N&&((w=N.textContent)!=null&&w.trim())){const j=N.textContent.split(/\s+/).filter(Boolean),W=r.createDocumentFragment();for(const K of j){const ae=r.createElement("span");ae.textContent=K+" ",ae.style.display="inline",W.appendChild(ae),Q.push(ae)}N.replaceWith(W)}}}for(let T=0;T<M.segmentIds.length;T++){const N=M.segmentIds[T],j=Q[T];if(!j)continue;const W=j.getBoundingClientRect();x.push({segmentId:N,groupId:$,groupIndex:k,wordIndex:T,x:W.left*u+h,y:W.top*u+m,width:W.width*u,height:W.height*u})}}return x}function w1(n,e,t){let r=null;try{r=n.contentDocument}catch{return null}if(!r)return null;const i=r.querySelectorAll(".caption-group")[e];if(!i)return null;const s=[];for(const a of i.children){const c=a;if(c.dataset.captionWrapper==="true"){const u=c.querySelector(":scope > span");u&&s.push(u)}else c.tagName==="SPAN"&&s.push(c)}return s[t]??null}function su(n,e){const t=e.gsap;if(t&&t.getProperty)return{x:t.getProperty(n,"x")||0,y:t.getProperty(n,"y")||0,scale:t.getProperty(n,"scale")||1,rotation:t.getProperty(n,"rotation")||0};const r=n.style.transform||"",i=r.match(/scale\(([^)]+)\)/),s=r.match(/rotate\(([^)]+)deg\)/),a=r.match(/translate\(([^,]+)px,\s*([^)]+)px\)/);return{x:a?parseFloat(a[1]):0,y:a?parseFloat(a[2]):0,scale:i?parseFloat(i[1]):1,rotation:s?parseFloat(s[1]):0}}function El(n){var i;if(n.dataset.captionWrapper==="true")return n;const e=n.parentElement;if(e&&e.dataset.captionWrapper==="true")return e;const r=n.ownerDocument.createElement("span");return r.style.display="inline-block",r.dataset.captionWrapper="true",(i=n.parentNode)==null||i.insertBefore(r,n),r.appendChild(n),r}function S1(n,e,t,r,i,s){const a=El(n),c=e.gsap;c&&c.set?c.set(a,{x:t,y:r,scale:i,rotation:s}):a.style.transform=`translate(${t.toFixed(1)}px, ${r.toFixed(1)}px) rotate(${s.toFixed(1)}deg) scale(${i.toFixed(3)})`}function o5(n,e,t){const r=El(e),{x:i,y:s,scale:a,rotation:c}=su(r,t),u={};Math.abs(i)>.5&&(u.x=i),Math.abs(s)>.5&&(u.y=s),Math.abs(a-1)>.001&&(u.scaleX=a,u.scaleY=a),Math.abs(c)>.1&&(u.rotation=c),Object.keys(u).length>0&&Xt.getState().updateSegmentStyle(n,u)}const Dr=8,Jp=20,DR=d.memo(function({iframeRef:e}){const t=Xt(Q=>Q.isEditMode),r=Xt(Q=>Q.model),i=Xt(Q=>Q.selectedSegmentIds),s=Xt(Q=>Q.selectSegment),a=Xt(Q=>Q.clearSelection),[c,u]=d.useState([]),h=d.useRef(null),m=d.useRef(r);m.current=r;const O=d.useRef(null);On(()=>{if(!t)return;let Q=[];const T=()=>{const W=e.current,K=m.current,ae=h.current;if(!W||!K||!ae)return;const ie=_R(W,K,ae);ie.length===Q.length&&ie.every((L,le)=>Math.abs(L.x-Q[le].x)<.5&&Math.abs(L.y-Q[le].y)<.5)||(Q=ie,u(ie))},N=setInterval(T,66);T();const j=W=>{const{selectedSegmentIds:K,model:ae}=Xt.getState();if(K.size===0||!ae)return;const ie=W.key;if(!VR(W))return;W.preventDefault();const L=W.shiftKey?10:1,le=ie==="ArrowLeft"?-L:ie==="ArrowRight"?L:0,ye=ie==="ArrowUp"?-L:ie==="ArrowDown"?L:0,Oe=e.current,$e=Oe==null?void 0:Oe.contentWindow;if(!(!Oe||!$e))for(const pe of K)for(let D=0;D<ae.groupOrder.length;D++){const z=ae.groups.get(ae.groupOrder[D]);if(!z)continue;const q=z.segmentIds.indexOf(pe);if(q<0)continue;const E=w1(Oe,D,q);if(!E)continue;const X=El(E),ee=su(X,$e);S1(E,$e,ee.x+le,ee.y+ye,ee.scale,ee.rotation),o5(pe,E,$e);break}};return window.addEventListener("keydown",j),()=>{clearInterval(N),window.removeEventListener("keydown",j)}});const x=d.useCallback(()=>{const Q=e.current;if(!Q)return 1;const T=Q.getBoundingClientRect(),N=parseFloat(Q.style.width)||T.width;return T.width/N},[e]),v=d.useCallback((Q,T,N,j)=>{j.stopPropagation(),j.currentTarget.setPointerCapture(j.pointerId);const W=e.current;if(!W)return;const K=w1(W,Q,T),ae=W.contentWindow;if(!K||!ae)return;const ie=su(El(K),ae);O.current={type:"move",wordEl:K,segmentId:N,startMX:j.clientX,startMY:j.clientY,origTX:ie.x,origTY:ie.y,origScale:ie.scale,origRotation:ie.rotation}},[e]),w=d.useCallback((Q,T,N,j)=>{var Oe;j.stopPropagation(),j.preventDefault(),j.currentTarget.setPointerCapture(j.pointerId);const W=e.current;if(!W)return;const K=w1(W,Q,T),ae=W.contentWindow;if(!K||!ae)return;const ie=K.getBoundingClientRect(),L=x(),le=ie.left*L+(((Oe=e.current)==null?void 0:Oe.getBoundingClientRect().left)??0)+ie.width*L/2,ye=su(El(K),ae);O.current={type:"scale",wordEl:K,segmentId:N,startMX:j.clientX,startDxFromCenter:j.clientX-le,origTX:ye.x,origTY:ye.y,origScale:ye.scale,origRotation:ye.rotation}},[e,x]),k=d.useCallback((Q,T)=>{T.stopPropagation(),T.preventDefault(),T.currentTarget.setPointerCapture(T.pointerId);const N=e.current;if(!N)return;const j=w1(N,Q.groupIndex,Q.wordIndex),W=N.contentWindow;if(!j||!W)return;const K=su(El(j),W);O.current={type:"rotate",wordEl:j,segmentId:Q.segmentId,startMX:T.clientX,origTX:K.x,origTY:K.y,origRotation:K.rotation,origScale:K.scale}},[e]),$=d.useCallback(()=>{var Q;try{return((Q=e.current)==null?void 0:Q.contentWindow)??null}catch{return null}},[e]),M=d.useCallback(Q=>{const T=O.current;if(!T)return;const N=$();if(N){if(T.type==="move"){const j=x(),W=(Q.clientX-T.startMX)/j,K=(Q.clientY-T.startMY)/j;S1(T.wordEl,N,T.origTX+W,T.origTY+K,T.origScale,T.origRotation)}else if(T.type==="scale"){const j=T.startMX-T.startDxFromCenter,W=Math.abs(T.startDxFromCenter),K=Math.abs(Q.clientX-j),ae=W>5?K/W:1,ie=Math.max(.1,T.origScale*ae);S1(T.wordEl,N,T.origTX,T.origTY,ie,T.origRotation)}else if(T.type==="rotate"){const W=(Q.clientX-T.startMX)/200*90;S1(T.wordEl,N,T.origTX,T.origTY,T.origScale,T.origRotation+W)}}},[x,$]),V=d.useCallback(()=>{const Q=O.current;if(Q){const T=$();T&&o5(Q.segmentId,Q.wordEl,T),O.current=null}},[$]),A=d.useCallback(Q=>{Q.target===Q.currentTarget&&a()},[a]);return t?p.jsx("div",{ref:h,className:"absolute inset-0 z-50",style:{pointerEvents:"auto"},onClick:A,onPointerMove:M,onPointerUp:V,onLostPointerCapture:V,children:c.map(Q=>{const T=i.has(Q.segmentId);return p.jsx("div",{className:["absolute",T?"ring-2 ring-studio-accent":"hover:ring-1 hover:ring-white/30"].join(" "),style:{left:Q.x,top:Q.y,width:Q.width,height:Q.height,cursor:T?"move":"pointer",touchAction:"none",borderRadius:2},onClick:N=>{N.stopPropagation(),s(Q.segmentId,N.shiftKey)},onPointerDown:N=>{T&&v(Q.groupIndex,Q.wordIndex,Q.segmentId,N)},children:T&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"absolute",left:"50%",top:-Jp-Dr,marginLeft:-Dr/2,width:Dr,height:Dr,borderRadius:"50%",backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",cursor:"grab",touchAction:"none"},onPointerDown:N=>k(Q,N)}),p.jsx("div",{style:{position:"absolute",left:"50%",top:-Jp,width:1,height:Jp,marginLeft:-.5,backgroundColor:"var(--hf-accent, #3CE6AC)",opacity:.5,pointerEvents:"none"}}),[{right:-Dr/2,bottom:-Dr/2,cursor:"nwse-resize"},{left:-Dr/2,top:-Dr/2,cursor:"nwse-resize"},{right:-Dr/2,top:-Dr/2,cursor:"nesw-resize"},{left:-Dr/2,bottom:-Dr/2,cursor:"nesw-resize"}].map((N,j)=>p.jsx("div",{style:{position:"absolute",...N,width:Dr,height:Dr,backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",borderRadius:2,touchAction:"none"},onPointerDown:W=>w(Q.groupIndex,Q.wordIndex,Q.segmentId,W)},j))]})},Q.segmentId)})}):null}),Vo="w-full bg-neutral-900 border border-neutral-800 rounded px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-none focus:border-neutral-600";function Q2({label:n,children:e}){return p.jsxs("div",{className:"mb-3",children:[p.jsx("div",{className:"flex items-center gap-1.5 mt-2 mb-1.5",children:p.jsx("span",{className:"text-2xs font-medium text-neutral-500 uppercase tracking-wider",children:n})}),p.jsx("div",{className:"space-y-1",children:e})]})}function Ys({label:n,children:e}){return p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-2xs text-neutral-600 w-14 text-right flex-shrink-0",children:n}),p.jsx("div",{className:"flex-1 min-w-0",children:e})]})}const IR=["none","fade","slide-up","slide-down","slide-left","slide-right","pop","slam","bounce","typewriter","blur-in","flip","drop"],XR=["none","color-change","scale-pop","glow-pulse","underline-sweep","background-fill","bounce"],FR=["none","fade","slide-up","slide-down","slide-left","slide-right","scatter","drop","collapse","blur-out","shrink"],zR=["power1.out","power2.out","power3.out","power4.out","power1.in","power2.in","power3.in","power1.inOut","power2.inOut","back.out(1.7)","elastic.out(1,0.3)","bounce.out"];function em({label:n,presets:e,animation:t,showIntensity:r,onChange:i}){const s=(t==null?void 0:t.preset)??"none",a=(t==null?void 0:t.duration)??.2,c=(t==null?void 0:t.ease)??"power2.out",u=(t==null?void 0:t.stagger)??0,h=(t==null?void 0:t.intensity)??1;return p.jsxs(Q2,{label:n,children:[p.jsx(Ys,{label:"Preset",children:p.jsx("select",{value:s,onChange:m=>i({preset:m.target.value}),className:Vo,children:e.map(m=>p.jsx("option",{value:m,children:m},m))})}),p.jsx(Ys,{label:"Duration",children:p.jsx("input",{type:"number",value:a,step:.05,min:0,max:2,onChange:m=>i({duration:Number(m.target.value)}),className:Vo})}),p.jsx(Ys,{label:"Ease",children:p.jsx("select",{value:c,onChange:m=>i({ease:m.target.value}),className:Vo,children:zR.map(m=>p.jsx("option",{value:m,children:m},m))})}),p.jsx(Ys,{label:"Stagger",children:p.jsx("input",{type:"number",value:u,step:.02,min:0,max:.5,onChange:m=>i({stagger:Number(m.target.value)}),className:Vo})}),r&&p.jsx(Ys,{label:"Intensity",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"range",min:0,max:1,step:.01,value:h,onChange:m=>i({intensity:Number(m.target.value)}),className:"flex-1 accent-studio-accent"}),p.jsx("span",{className:"text-2xs text-neutral-400 font-mono w-8 text-right flex-shrink-0",children:h.toFixed(2)})]})})]})}const HR=d.memo(function(){const e=Xt(v=>v.model),t=Xt(v=>v.selectedGroupId),r=Xt(v=>v.selectedSegmentIds),i=Xt(v=>v.updateGroupAnimation),s=Xt(v=>v.applyAnimationToAll);let a=t;if(!a&&e&&r.size>0){const v=[...r][0];if(v){for(const[w,k]of e.groups)if(k.segmentIds.includes(v)){a=w;break}}}const c=a?e==null?void 0:e.groups.get(a):void 0,u=c==null?void 0:c.animation,h=d.useCallback(v=>{a&&i(a,"entrance",v)},[a,i]),m=d.useCallback(v=>{a&&i(a,"highlight",v)},[a,i]),O=d.useCallback(v=>{a&&i(a,"exit",v)},[a,i]),x=d.useCallback(()=>{u&&s(u)},[u,s]);return!c||!a||!u?p.jsx("div",{className:"flex items-center justify-center h-full px-4 text-center",children:p.jsx("p",{className:"text-xs text-neutral-500",children:"Select a caption group to edit animations"})}):p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[p.jsx(em,{label:"Entrance",presets:IR,animation:u.entrance,onChange:h}),p.jsx(em,{label:"Highlight",presets:XR,animation:u.highlight,showIntensity:!0,onChange:m}),p.jsx(em,{label:"Exit",presets:FR,animation:u.exit,onChange:O})]}),p.jsx("div",{className:"flex-shrink-0 px-3 py-2 border-t border-neutral-800",children:p.jsx("button",{type:"button",onClick:x,className:"w-full py-1.5 rounded border border-neutral-700 text-2xs text-neutral-300 hover:border-studio-accent/50 hover:text-studio-accent transition-colors",children:"Apply to all groups"})})]})}),WR=d.memo(function({iframeRef:e}){var N;const t=Xt(j=>j.model),r=Xt(j=>j.selectedSegmentIds),i=Xt(j=>j.selectedGroupId),s=Xt(j=>j.updateSelectedStyle),a=Xt(j=>j.updateGroupStyle),[c,u]=d.useState("style"),h=r.size>0?[...r][0]:void 0,m=t==null?void 0:t.segments.get(h??"");let O=null;if(t&&h)for(const j of t.groupOrder){const W=t.groups.get(j);if(W&&W.segmentIds.includes(h)){O=j;break}}const x=O?(N=t==null?void 0:t.groups.get(O))==null?void 0:N.style:void 0,v=(m==null?void 0:m.style)??{},w={...x,...v},k=d.useCallback(j=>{var le,ye,Oe;const W=e.current;if(!W||!t)return;let K=null;try{K=W.contentDocument}catch{return}if(!K)return;const ae=K.querySelectorAll(".caption-group"),ie=[];for(const $e of r)for(let pe=0;pe<t.groupOrder.length;pe++){const D=t.groups.get(t.groupOrder[pe]);if(!D)continue;const z=D.segmentIds.indexOf($e);if(z<0)continue;const q=ae[pe];if(!q)continue;const E=q.children;let X=0;for(const ee of E){const Ce=ee;if(Ce.dataset.captionWrapper==="true"){const Te=Ce.querySelector(":scope > span");if(Te&&X===z){ie.push(Te);break}}else if(Ce.tagName==="SPAN"&&X===z){ie.push(Ce);break}X++}break}if(j.x!==void 0||j.y!==void 0||j.scaleX!==void 0||j.scaleY!==void 0||j.rotation!==void 0)try{const $e=(ye=(le=e.current)==null?void 0:le.contentWindow)==null?void 0:ye.gsap;if($e)for(const pe of ie){let D=pe.parentElement;(!D||D.dataset.captionWrapper!=="true")&&(D=K.createElement("span"),D.style.display="inline-block",D.dataset.captionWrapper="true",(Oe=pe.parentNode)==null||Oe.insertBefore(D,pe),D.appendChild(pe));const z=$e.getProperty(D,"x")||0,q=$e.getProperty(D,"y")||0,E=$e.getProperty(D,"scale")||1,X=$e.getProperty(D,"rotation")||0;$e.set(D,{x:j.x??z,y:j.y??q,scale:j.scaleX??E,rotation:j.rotation??X})}}catch{}},[e,t,r]),$=d.useCallback(j=>{i?a(i,j):s(j),k(j)},[i,a,s,k]);if(r.size===0)return p.jsx("div",{className:"flex items-center justify-center h-full px-4 text-center",children:p.jsx("p",{className:"text-xs text-neutral-500",children:"Select caption words to edit their style"})});const M=w.x??0,V=w.y??0,A=w.rotation??0,Q=w.scaleX??1,T=r.size===1?"1 word":`${r.size} words`;return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"px-3 py-2 border-b border-neutral-800 flex-shrink-0",children:[p.jsx("div",{className:"flex items-center justify-between mb-1.5",children:p.jsx("span",{className:"text-2xs text-neutral-500",children:T})}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx("button",{type:"button",onClick:()=>u("style"),className:["flex-1 py-0.5 rounded text-2xs font-medium transition-colors",c==="style"?"bg-studio-accent/20 text-studio-accent border border-studio-accent/50":"text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600"].join(" "),children:"Style"}),p.jsx("button",{type:"button",onClick:()=>u("animation"),className:["flex-1 py-0.5 rounded text-2xs font-medium transition-colors",c==="animation"?"bg-studio-accent/20 text-studio-accent border border-studio-accent/50":"text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600"].join(" "),children:"Animation"})]})]}),c==="animation"&&p.jsx(HR,{}),c==="style"&&p.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[p.jsxs(Q2,{label:"Position",children:[p.jsx(Ys,{label:"X",children:p.jsx("input",{type:"number",value:M,onChange:j=>$({x:Number(j.target.value)}),className:Vo})}),p.jsx(Ys,{label:"Y",children:p.jsx("input",{type:"number",value:V,onChange:j=>$({y:Number(j.target.value)}),className:Vo})})]}),p.jsxs(Q2,{label:"Transform",children:[p.jsx(Ys,{label:"Scale",children:p.jsx("input",{type:"number",value:Q,step:.1,onChange:j=>$({scaleX:Number(j.target.value),scaleY:Number(j.target.value)}),className:Vo})}),p.jsx(Ys,{label:"Rotation",children:p.jsx("input",{type:"number",value:A,onChange:j=>$({rotation:Number(j.target.value)}),className:Vo})})]})]})]})}),a5=["#3CE6AC","#FF6B6B","#4ECDC4","#FFE66D","#A78BFA","#F472B6","#34D399","#FB923C","#60A5FA","#C084FC"],BR=d.memo(function({pixelsPerSecond:e,onSeek:t}){const r=Xt(k=>k.model),i=Xt(k=>k.selectedSegmentIds),s=Xt(k=>k.selectSegment),a=Xt(k=>k.updateSegmentTiming),c=Xt(k=>k.splitGroup),u=d.useRef(null),h=d.useCallback((k,$,M,V,A)=>{k.stopPropagation(),k.preventDefault(),k.target.setPointerCapture(k.pointerId),u.current={segId:$,edge:M,originalStart:V,originalEnd:A,startX:k.clientX}},[]),m=d.useCallback(k=>{const $=u.current;if(!$)return;const M=(k.clientX-$.startX)/e;if($.edge==="start"){const V=Math.max(0,$.originalStart+M),A=Math.min(V,$.originalEnd-.05);a($.segId,A,$.originalEnd)}else{const V=Math.max($.originalStart+.05,$.originalEnd+M),A=Math.max(0,V);a($.segId,$.originalStart,A)}},[e,a]),O=d.useCallback(()=>{u.current=null},[]),x=d.useCallback((k,$)=>{k.stopPropagation(),s($,k.shiftKey)},[s]),v=d.useCallback((k,$,M)=>{k.stopPropagation(),c($,M)},[c]),w=d.useCallback(k=>{if(!t)return;const $=k.currentTarget.getBoundingClientRect(),M=k.clientX-$.left-32,V=Math.max(0,M/e);t(V)},[t,e]);return r?p.jsx("div",{className:"relative select-none overflow-x-auto",style:{height:40,minWidth:"100%"},onPointerMove:m,onPointerUp:O,onPointerLeave:O,onClick:w,children:r.groupOrder.map((k,$)=>{const M=r.groups.get(k);if(!M)return null;const V=a5[$%a5.length];return M.segmentIds.map(A=>{const Q=r.segments.get(A);if(!Q)return null;const T=32+Q.start*e,N=Math.max((Q.end-Q.start)*e,4),j=i.has(A);return p.jsxs("div",{className:`absolute top-1 bottom-1 rounded flex items-center overflow-hidden cursor-pointer${j?" ring-1 ring-white/50 z-10":""}`,style:{left:T,width:N,backgroundColor:V,zIndex:j?10:1},onClick:W=>x(W,A),onDoubleClick:W=>v(W,k,A),children:[p.jsx("div",{className:"absolute left-0 top-0 bottom-0 cursor-col-resize z-20",style:{width:6},onPointerDown:W=>h(W,A,"start",Q.start,Q.end)}),p.jsx("span",{className:"flex-1 truncate px-2 pointer-events-none",style:{fontSize:9,color:"#000000",lineHeight:1},children:Q.text}),p.jsx("div",{className:"absolute right-0 top-0 bottom-0 cursor-col-resize z-20",style:{width:6},onPointerDown:W=>h(W,A,"end",Q.start,Q.end)})]},A)})})}):null});function YR(n){const e=[];let t=0;for(const r of n.groupOrder){const i=n.groups.get(r);if(i)for(const s of i.segmentIds){const a=n.segments.get(s);if(a&&Object.keys(a.style).length>0){const c={wordIndex:t};a.wordId&&(c.wordId=a.wordId);const u=a.style;u.x!==void 0&&(c.x=u.x),u.y!==void 0&&(c.y=u.y),u.scaleX!==void 0&&(c.scale=u.scaleX),u.rotation!==void 0&&(c.rotation=u.rotation),u.activeColor!==void 0&&(c.activeColor=u.activeColor),u.dimColor!==void 0&&(c.dimColor=u.dimColor),u.opacity!==void 0&&(c.opacity=u.opacity),u.fontSize!==void 0&&(c.fontSize=u.fontSize),u.fontWeight!==void 0&&(c.fontWeight=u.fontWeight),u.fontFamily!==void 0&&(c.fontFamily=u.fontFamily),e.push(c)}t++}}return e}function qR(n){const e=d.useRef(n);e.current=n;const t=d.useRef(null),r=d.useRef(!1),i=d.useCallback(()=>{const a=Xt.getState();if(!a.model||!a.sourceFilePath||!a.isEditMode)return;const c=e.current;if(!c)return;const u=YR(a.model);fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:JSON.stringify(u,null,2)}).catch(h=>console.warn("[captions] auto-save failed:",h))},[]);On(()=>{let a=Xt.getState().model;const c=Xt.subscribe(u=>{if(!(!u.isEditMode||u.model===a||!u.model)){if(a=u.model,r.current){r.current=!1;return}t.current&&clearTimeout(t.current),t.current=setTimeout(i,800)}});return()=>{c(),t.current&&clearTimeout(t.current)}});const s=d.useCallback(async()=>{const a=Xt.getState();if(!a.model||!a.sourceFilePath)return;const c=e.current;if(c)try{const u=await fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`);if(!u.ok)return;const h=await u.json();if(!h.content)return;const m=JSON.parse(h.content);if(!Array.isArray(m))return;const O=a.model,x=[],v=new Map;for(const k of O.groupOrder){const $=O.groups.get(k);if($)for(const M of $.segmentIds){x.push(M);const V=O.segments.get(M);V!=null&&V.wordId&&v.set(V.wordId,M)}}const w=new Map(O.segments);for(const k of m){const $=(k.wordId?v.get(k.wordId):void 0)??x[k.wordIndex];if(!$)continue;const M=w.get($);if(!M)continue;const V={...M.style};k.x!==void 0&&(V.x=k.x),k.y!==void 0&&(V.y=k.y),k.scale!==void 0&&(V.scaleX=k.scale,V.scaleY=k.scale),k.rotation!==void 0&&(V.rotation=k.rotation),k.activeColor!==void 0&&(V.activeColor=k.activeColor),k.dimColor!==void 0&&(V.dimColor=k.dimColor),k.opacity!==void 0&&(V.opacity=k.opacity),k.fontSize!==void 0&&(V.fontSize=k.fontSize),k.fontWeight!==void 0&&(V.fontWeight=k.fontWeight),k.fontFamily!==void 0&&(V.fontFamily=k.fontFamily),w.set($,{...M,style:V})}r.current=!0,Xt.getState().setModel({...O,segments:w})}catch{}},[]);return{save:i,loadOverrides:s}}const rS={fontFamily:"sans-serif",fontSize:48,fontWeight:700,fontStyle:"normal",textDecoration:"none",textTransform:"none",letterSpacing:0,lineHeight:1.2,color:"#ffffff",activeColor:"#ffffff",dimColor:"rgba(255, 255, 255, 0.3)",opacity:1,gradientFill:null,strokeWidth:0,strokeColor:"#000000",shadows:[],glow:null,x:0,y:0,rotation:0,scaleX:1,scaleY:1,skewX:0,skewY:0,transformOrigin:"center center",blendMode:"normal"},UR={backgroundColor:"transparent",backgroundOpacity:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,borderRadius:0,borderWidth:0,borderColor:"transparent",borderStyle:"solid",boxShadow:"none"},l5={preset:"fade",duration:.2,ease:"power2.out",stagger:0,staggerDirection:"start",intensity:1},ml={entrance:l5,highlight:null,exit:{...l5}};function GR(n,e){const{width:t,height:r,duration:i,wordsPerGroup:s=5}=e,a=new Map,c=new Map,u=[];for(let h=0;h<n.length;h+=s){const m=n.slice(h,h+s),O=`group-${h/s}`,x=[];m.forEach((w,k)=>{const $=`segment-${h+k}`,M={id:$,wordId:w.id??`w${h+k}`,text:w.text,start:w.start,end:w.end,groupIndex:k,style:{},animation:{}};a.set($,M),x.push($)});const v={id:O,segmentIds:x,style:{...rS},animation:{entrance:{...ml.entrance},highlight:ml.highlight,exit:{...ml.exit}},containerStyle:{...UR}};c.set(O,v),u.push(O)}return{width:t,height:r,duration:i,segments:a,groups:c,groupOrder:u,defaultAnimation:{entrance:{...ml.entrance},highlight:ml.highlight,exit:{...ml.exit}}}}function KR(n){const e=/(?:const|let|var)\s+(?:TRANSCRIPT|script)\s*=\s*(\[[\s\S]*?\]);/,t=n.match(e);if(!t)return[];const r=t[1];try{return eN(r)}catch{return[]}}function JR(n,e,t,r,i,s){const a=KR(t);if(a.length===0)return null;const c=n.querySelectorAll(".caption-group, .caption-line, .caption-block"),u=n.querySelectorAll(".word, .caption-word");let h=5;c.length>0&&u.length>0&&(h=Math.round(u.length/c.length),h<1&&(h=1));const m=GR(a,{width:r,height:i,duration:s,wordsPerGroup:h}),O=u.item(0),x=c.item(0),v=O??x;if(v){const w=e.getComputedStyle(v),k={},$=parseFloat(w.fontSize);!isNaN($)&&$>0&&(k.fontSize=$);const M=w.fontWeight;if(M){const j=parseInt(M,10);k.fontWeight=isNaN(j)?M:j}const V=w.fontFamily;V&&(k.fontFamily=V);const A=w.color;A&&(k.color=A);const Q=w.textTransform;(Q==="none"||Q==="uppercase"||Q==="lowercase"||Q==="capitalize")&&(k.textTransform=Q);const T=w.letterSpacing;if(T&&T!=="normal"){const j=parseFloat(T),W=k.fontSize??rS.fontSize;!isNaN(j)&&W>0&&(k.letterSpacing=j/W)}const N={};if(x){const j=e.getComputedStyle(x),W=j.backgroundColor;W&&W!=="rgba(0, 0, 0, 0)"&&W!=="transparent"&&(N.backgroundColor=W,N.backgroundOpacity=1);const K=parseFloat(j.borderRadius);!isNaN(K)&&K>0&&(N.borderRadius=K);const ae=parseFloat(j.paddingTop),ie=parseFloat(j.paddingRight),L=parseFloat(j.paddingBottom),le=parseFloat(j.paddingLeft);isNaN(ae)||(N.paddingTop=ae),isNaN(ie)||(N.paddingRight=ie),isNaN(L)||(N.paddingBottom=L),isNaN(le)||(N.paddingLeft=le)}for(const j of m.groupOrder){const W=m.groups.get(j);W&&(W.style={...W.style,...k},W.containerStyle={...W.containerStyle,...N})}}return m}function eN(n){let e;try{e=JSON.parse(n)}catch{let r=n;r=r.replace(/'((?:[^'\\]|\\.)*)'/g,(i,s)=>`"${s.replace(/\\'/g,"'").replace(/"/g,'\\"')}"`),r=r.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,'$1"$2":'),r=r.replace(/,(\s*[}\]])/g,"$1"),e=JSON.parse(r)}if(!Array.isArray(e))return[];const t=[];for(const r of e)if(r!==null&&typeof r=="object"&&typeof r.text=="string"&&typeof r.start=="number"&&typeof r.end=="number"){const i=r;t.push({...typeof i.id=="string"?{id:i.id}:{},text:i.text,start:i.start,end:i.end})}return t}const tN=100,nN=1500;function j2(n){let e=2166136261;for(let t=0;t<n.length;t+=1)e^=n.charCodeAt(t),e=Math.imul(e,16777619);return(e>>>0).toString(16).padStart(8,"0")}function Z2(n){return{version:1,updatedAt:0,undo:[],redo:[]}}function rN(n){const e={};for(const[t,r]of Object.entries(n.files))r.before!==r.after&&(e[t]={before:r.before,after:r.after,beforeHash:j2(r.before),afterHash:j2(r.after)});return{id:n.id,projectId:n.projectId,label:n.label,kind:n.kind??"manual",coalesceKey:n.coalesceKey,createdAt:n.now,files:e}}function iN(n,e,t){if(Object.keys(e.files).length===0)return n;const r=nN,i=tN,s=n.undo[n.undo.length-1];let a=n.undo;if(s&&s.coalesceKey&&s.coalesceKey===e.coalesceKey&&e.createdAt-s.createdAt<=r){const c={};for(const[u,h]of Object.entries(e.files)){const m=s.files[u];c[u]=m?{before:m.before,after:h.after,beforeHash:m.beforeHash,afterHash:h.afterHash}:h}a=[...n.undo.slice(0,-1),{...e,files:c}]}else a=[...n.undo,e];return{version:1,updatedAt:e.createdAt,undo:a.slice(Math.max(0,a.length-i)),redo:[]}}function iS(n,e,t){for(const[r,i]of Object.entries(n.files)){const s=e==="undo"?i.afterHash:i.beforeHash;if(t[r]!==s)return{ok:!1,reason:"content-mismatch",path:r}}return{ok:!0}}function sN(n,e,t){const r=n.undo[n.undo.length-1];if(!r)return{ok:!1,reason:"empty",state:n,filesToWrite:{}};const i=iS(r,"undo",e);return i.ok?{ok:!0,entry:r,filesToWrite:Object.fromEntries(Object.entries(r.files).map(([s,a])=>[s,a.before])),state:{version:1,updatedAt:t,undo:n.undo.slice(0,-1),redo:[...n.redo,r]}}:{ok:!1,reason:i.reason,path:i.path,state:n,filesToWrite:{}}}function oN(n,e,t){const r=n.redo[n.redo.length-1];if(!r)return{ok:!1,reason:"empty",state:n,filesToWrite:{}};const i=iS(r,"redo",e);return i.ok?{ok:!0,entry:r,filesToWrite:Object.fromEntries(Object.entries(r.files).map(([s,a])=>[s,a.after])),state:{version:1,updatedAt:t,undo:[...n.undo,r],redo:n.redo.slice(0,-1)}}:{ok:!1,reason:i.reason,path:i.path,state:n,filesToWrite:{}}}const aN="hyperframes-studio-edit-history",lN=1,jd="project-history";function cN(){return new Promise((n,e)=>{if(!globalThis.indexedDB){e(new Error("IndexedDB is not available"));return}const t=globalThis.indexedDB.open(aN,lN);t.onupgradeneeded=()=>{const r=t.result;r.objectStoreNames.contains(jd)||r.createObjectStore(jd)},t.onerror=()=>e(t.error??new Error("Failed to open edit history db")),t.onsuccess=()=>n(t.result)})}function tm(n,e){return cN().then(t=>new Promise((r,i)=>{const s=t.transaction(jd,n),a=e(s.objectStore(jd));a.onerror=()=>i(a.error??new Error("IndexedDB request failed")),a.onsuccess=()=>r(a.result),s.oncomplete=()=>t.close(),s.onerror=()=>{t.close(),i(s.error??new Error("IndexedDB transaction failed"))}}))}function uN(){return{async get(n){return await tm("readonly",e=>e.get(n))??null},async set(n,e){await tm("readwrite",t=>t.put(e,n))},async delete(n){await tm("readwrite",e=>e.delete(n))}}}async function dN(n,e){return await n.get(e)??Z2()}async function fN(n,e,t){await n.set(e,t)}function hN(n){return`edit-${n.toString(36)}-${Math.random().toString(36).slice(2,10)}`}function sS(n){const e=n.undo[n.undo.length-1]??null,t=n.redo[n.redo.length-1]??null;return{canUndo:!!e,canRedo:!!t,undoLabel:(e==null?void 0:e.label)??null,redoLabel:(t==null?void 0:t.label)??null,undoPaths:e?Object.keys(e.files):[],redoPaths:t?Object.keys(t.files):[],state:n}}async function c5(n,e){const t={},r={};for(const i of n){const s=await e(i);t[i]=s,r[i]=j2(s)}return{currentFiles:t,currentHashes:r}}async function u5({files:n,rollbackFiles:e,writeFile:t}){const r=[];try{for(const[i,s]of Object.entries(n))await t(i,s),r.push(i)}catch(i){try{for(const s of r.reverse())await t(s,e[s])}catch(s){throw new AggregateError([i,s],"Failed to apply edit history and rollback did not complete")}throw i}}function d5({projectId:n,storage:e,initialState:t,now:r=Date.now,onChange:i}){let s=t,a=Promise.resolve();const c=async h=>{s=h,i(h);try{await fN(e,n,h)}catch{}},u=async h=>{const m=a.then(async()=>{const{state:O,result:x}=await h(s);return O!==s&&await c(O),x});return a=m.then(()=>{},()=>{}),m};return{snapshot:()=>sS(s),async recordEdit(h){await u(async m=>{const O=r(),x=rN({...h,id:hN(O),projectId:n,now:O});return{state:iN(m,x),result:void 0}})},async undo(h){return u(async m=>{const O=m.undo[m.undo.length-1];if(!O)return{state:m,result:{ok:!1,reason:"empty"}};const{currentFiles:x,currentHashes:v}=await c5(Object.keys(O.files),h.readFile),w=sN(m,v,r());return w.ok?(await u5({files:w.filesToWrite,rollbackFiles:x,writeFile:h.writeFile}),{state:w.state,result:{ok:!0,label:w.entry.label,paths:Object.keys(w.entry.files)}}):{state:m,result:{ok:!1,reason:w.reason}}})},async redo(h){return u(async m=>{const O=m.redo[m.redo.length-1];if(!O)return{state:m,result:{ok:!1,reason:"empty"}};const{currentFiles:x,currentHashes:v}=await c5(Object.keys(O.files),h.readFile),w=oN(m,v,r());return w.ok?(await u5({files:w.filesToWrite,rollbackFiles:x,writeFile:h.writeFile}),{state:w.state,result:{ok:!0,label:w.entry.label,paths:Object.keys(w.entry.files)}}):{state:m,result:{ok:!1,reason:w.reason}}})}}}function pN(n){const e=d.useMemo(()=>n.storage??uN(),[n.storage]),t=n.now??Date.now,[r,i]=d.useState(()=>Z2()),[s,a]=d.useState(!1),c=n.projectId,u=d.useRef(null);d.useEffect(()=>{let x=!1;const v=Z2();if(u.current=null,i(v),a(!1),!c){a(!0);return}return dN(e,c).then(w=>{x||(u.current=d5({projectId:c,storage:e,initialState:w,now:t,onChange:i}),i(w))}).catch(()=>{x||(u.current=d5({projectId:c,storage:e,initialState:v,now:t,onChange:i}),i(v))}).finally(()=>{x||a(!0)}),()=>{x=!0}},[t,c,e]);const h=d.useCallback(async x=>{var v;await((v=u.current)==null?void 0:v.recordEdit(x))},[]),m=d.useCallback(async x=>{var v;return((v=u.current)==null?void 0:v.undo(x))??{ok:!1,reason:"empty"}},[]),O=d.useCallback(async x=>{var v;return((v=u.current)==null?void 0:v.redo(x))??{ok:!1,reason:"empty"}},[]);return{loaded:s,...sS(r),recordEdit:h,undo:m,redo:O}}function Sa(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f5(n,e){return e==='"'?n.replace(/"/g,"""):n.replace(/'/g,"'")}function mN(n){const e=[];let t="",r=null,i=!1,s=0;for(const a of n){if(i){t+=a,a===";"&&(i=!1);continue}if(a==="&"){i=!0,t+=a;continue}if(r){t+=a,a===r&&(r=null);continue}if(a==='"'||a==="'"){r=a,t+=a;continue}if(a==="("){s+=1,t+=a;continue}if(a===")"){s=Math.max(0,s-1),t+=a;continue}if(a===";"&&s===0){e.push(t),t="";continue}t+=a}return t&&e.push(t),e}function gN(n,e,t,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${Sa(e)}\\2[^>]*)>`,"i").exec(n);if(!s)return n;const a=s[1];return oS(n,a,t,r)}function oS(n,e,t,r){if(!e)return n;const i=/\bstyle=(["'])([\s\S]*?)\1/.exec(e);if(i){const s=i[2],a=i[1],c=new Map;for(const m of mN(s)){const O=m.indexOf(":");if(O<0)continue;const x=m.slice(0,O).trim(),v=m.slice(O+1).trim();x&&c.set(x,v)}c.set(t,r);const u=Array.from(c.entries()).map(([m,O])=>`${m}: ${f5(O,a)}`).join("; "),h=e.replace(i[0],`style=${a}${u}${a}`);return n.replace(e,h)}else{const s=e.replace(/>$/,"")+` style="${t}: ${f5(r,'"')}"`;return n.replace(e,s)}}function ON(n,e,t,r){const i=Yu(n,e);if(!i)return n;const s=oS(i.tag,i.tag,t,r);return R2(n,i,s)}function R2(n,e,t){return`${n.slice(0,e.start)}${t}${n.slice(e.end)}`}function Yu(n,e){if(e.id){const s=new RegExp(`(<[^>]*\\bid=(["'])${Sa(e.id)}\\2[^>]*)>`,"i").exec(n);if((s==null?void 0:s.index)!=null)return{tag:s[1],start:s.index,end:s.index+s[1].length}}if(!e.selector)return null;const t=e.selector.match(/^\[data-composition-id="([^"]+)"\]$/);if(t){const i=t[1],a=new RegExp(`(<[^>]*\\bdata-composition-id=(["'])${Sa(i)}\\2[^>]*)>`,"i").exec(n);if((a==null?void 0:a.index)!=null)return{tag:a[1],start:a.index,end:a.index+a[1].length}}const r=e.selector.match(/^\.([a-zA-Z0-9_-]+)$/);if(r){const i=r[1],s=new RegExp(`(<[^>]*\\bclass=(["'])[^"']*\\b${Sa(i)}\\b[^"']*\\2[^>]*)>`,"gi"),a=e.selectorIndex??0;let c,u=0;for(;(c=s.exec(n))!==null;){if(u===a&&c.index!=null)return{tag:c[1],start:c.index,end:c.index+c[1].length};u+=1}}return null}function h5(n,e,t){const r=Yu(n,e);if(!r)return;const i=t.startsWith("data-")?t:`data-${t}`,s=new RegExp(`\\b${i}=(["'])([^"']*)\\1`).exec(r.tag);return s==null?void 0:s[2]}function xN(n,e){const t=Yu(n,e);return t==null?void 0:t.tag}function yN(n,e,t,r){const i=Yu(n,e);if(!i)return n;const s=t.startsWith("data-")?t:`data-${t}`,a=new RegExp(`\\b${s}=(["'])([^"']*)\\1`),c=i.tag;if(a.test(c)){const h=c.replace(a,`${s}="${r}"`);return R2(n,i,h)}const u=c+` ${s}="${r}"`;return R2(n,i,u)}function vN(n,e,t,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${Sa(e)}\\2[^>]*)>`,"i").exec(n);if(!s)return n;const a=s[1],c=t.startsWith("data-")?t:`data-${t}`,u=new RegExp(`\\b${c}=(["'])([^"']*)\\1`);if(u.test(a)){const h=a.replace(u,`${c}="${r}"`);return n.replace(a,h)}else{const h=a+` ${c}="${r}"`;return n.replace(a,h)}}function bN(n,e,t){const i=new RegExp(`(<([a-z0-9-]+)[^>]*\\bid=(["'])${Sa(e)}\\3[^>]*>)`,"i").exec(n);if(!i||i.index==null)return n;const s=i[1],a=i[2],c=i.index+s.length,u=aS(n,a,c);return u<0?n:`${n.slice(0,c)}${t}${n.slice(u)}`}function aS(n,e,t){const r=new RegExp(`</?${Sa(e)}\\b[^>]*>`,"gi");r.lastIndex=t;let i=1,s;for(;(s=r.exec(n))!==null;){const a=s[0];if(a.startsWith("</")){if(i-=1,i===0)return s.index;continue}a.endsWith("/>")||(i+=1)}return-1}function wN(n,e,t){const r=Yu(n,e);if(!r)return n;const i=/^<([a-z0-9-]+)/i.exec(r.tag),s=i==null?void 0:i[1];if(!s)return n;const a=aS(n,s,r.end+1);return a<0?n:`${n.slice(0,r.end+1)}${t}${n.slice(a)}`}function SN(n,e,t){switch(t.type){case"inline-style":return gN(n,e,t.property,t.value);case"attribute":return vN(n,e,t.property,t.value);case"text-content":return bN(n,e,t.value);default:return n}}function Is(n,e,t){if(e.id){const r=SN(n,e.id,t);if(r!==n||!e.selector)return r}switch(t.type){case"inline-style":return ON(n,e,t.property,t.value);case"attribute":return yN(n,e,t.property,t.value);case"text-content":return wN(n,e,t.value);default:return n}}const N2="#project/";function lS(n){return encodeURIComponent(n)}function kN(n){return`${N2}${lS(n)}`}function PN(n){if(!n.startsWith(N2))return null;const e=n.slice(N2.length);if(!e||e.includes("/"))return null;try{return decodeURIComponent(e)}catch{return e}}function AN(n,e=""){const t=e&&!e.startsWith("/")?`/${e}`:e;return`/api/projects/${lS(n)}${t}`}function cS(n){return n&&n!=="master"?n:"index.html"}function p5({projectId:n,compositionPath:e,currentTime:t,origin:r=window.location.origin}){const i=cS(e),s=new URL(AN(n,`/thumbnail/${encodeURIComponent(i)}`),r);return s.searchParams.set("t",Math.max(0,t).toFixed(3)),s.searchParams.set("format","png"),s.searchParams.set("v",String(Date.now())),s.toString()}function m5(n,e){var s;const r=((s=cS(n).split("/").pop())==null?void 0:s.replace(/\.html$/i,""))||"frame",i=Math.max(0,e).toFixed(3).replace(".","-");return`${r}-${i}s.png`}var $N=My();function ii(n){return Math.max(0,Math.min(255,Math.round(n)))}function Yg(n){return Math.max(0,Math.min(1,n))}function nm(n){return ii(n).toString(16).padStart(2,"0")}function CN(n){return`${Math.round(Yg(n)*100)/100}`}function uS(n){const e=n.trim().toLowerCase();if(!e)return null;if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const t=e.match(/^#([0-9a-f]{3})$/i);if(t){const[s,a,c]=t[1].split("");return{red:Number.parseInt(s+s,16),green:Number.parseInt(a+a,16),blue:Number.parseInt(c+c,16),alpha:1}}const r=e.match(/^#([0-9a-f]{6})$/i);if(r)return{red:Number.parseInt(r[1].slice(0,2),16),green:Number.parseInt(r[1].slice(2,4),16),blue:Number.parseInt(r[1].slice(4,6),16),alpha:1};const i=e.match(/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i);return i?{red:ii(Number.parseFloat(i[1])),green:ii(Number.parseFloat(i[2])),blue:ii(Number.parseFloat(i[3])),alpha:Yg(i[4]!=null?Number.parseFloat(i[4]):1)}:null}function rm(n){return`#${nm(n.red)}${nm(n.green)}${nm(n.blue)}`}function k1(n){const e=ii(n.red),t=ii(n.green),r=ii(n.blue),i=Yg(n.alpha);return i>=1?`rgb(${e}, ${t}, ${r})`:`rgba(${e}, ${t}, ${r}, ${CN(i)})`}function EN(n){const e=ii(n.red)/255,t=ii(n.green)/255,r=ii(n.blue)/255,i=Math.max(e,t,r),s=Math.min(e,t,r),a=i-s;let c=0;return a!==0&&(i===e?c=60*((t-r)/a%6):i===t?c=60*((r-e)/a+2):c=60*((e-t)/a+4)),c<0&&(c+=360),{hue:c,saturation:i===0?0:a/i,value:i}}function g5(n){const e=(n.hue%360+360)%360/60,t=Math.max(0,Math.min(1,n.saturation)),r=Math.max(0,Math.min(1,n.value)),i=r*t,s=i*(1-Math.abs(e%2-1)),a=r-i;let c=0,u=0,h=0;return e>=0&&e<1?(c=i,u=s):e>=1&&e<2?(c=s,u=i):e>=2&&e<3?(u=i,h=s):e>=3&&e<4?(u=s,h=i):e>=4&&e<5?(c=s,h=i):(c=i,h=s),{red:ii((c+a)*255),green:ii((u+a)*255),blue:ii((h+a)*255)}}const TN=["closest-side","closest-corner","farthest-side","farthest-corner"];function dS(n){return n===" "||n===`
|
|
85
|
-
`||n==="\r"||n===" "||n==="\f"}function L2(n){return n!=null&&n>="0"&&n<="9"}function fS(n){if(!n)return!1;let e=n[0]==="-"?1:0,t=0;for(;L2(n[e]);)e+=1,t+=1;if(n[e]===".")for(e+=1;L2(n[e]);)e+=1,t+=1;return t>0&&e===n.length}function qg(n){if(!n)return null;const e=n.trim();if(!fS(e))return null;const t=Number(e);return Number.isFinite(t)?t:null}function Ug(n){const e=[];let t="";for(const r of n){if(dS(r)){t&&(e.push(t),t="");continue}t+=r}return t&&e.push(t),e}function Tl(n,e){return Ug(n.toLowerCase()).includes(e)}function Zd(n,e){if(!(n!=null&&n.endsWith("%")))return e;const t=qg(n.slice(0,-1));return t==null?e:qu(t,0,100)}function hS(n){const e=n==null?void 0:n.trim().toLowerCase();return e!=null&&e.endsWith("deg")?qg(e.slice(0,-3)):null}function MN(n){if(!n.endsWith("%"))return null;const e=n.slice(0,-1).trimEnd();let t=e.length;for(;t>0&&(L2(e[t-1])||e[t-1]===".");)t-=1;t>0&&e[t-1]==="-"&&(t-=1);const r=e.slice(t);return!fS(r)||t===0||!dS(e[t-1])?null:t}function qu(n,e,t){return Math.min(t,Math.max(e,n))}function hs(n){return Math.round(n*100)/100}function QN(n,e){const t=qg(n);return t==null?e:qu(t,0,100)}function Gg(n){const e=n.trim(),t=MN(e);if(t==null)return{color:e,position:null};const r=e.slice(0,-1).trimEnd();return{color:r.slice(0,t).trim(),position:QN(r.slice(t),0)}}function cf(n){return n.length===0?[{color:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}]:n.length===1?[{color:n[0].color,position:0},{color:n[0].color,position:100}]:n.map((t,r)=>({color:t.color,position:t.position??r/(n.length-1)*100})).map(t=>({color:t.color,position:hs(qu(t.position,0,100))}))}function jN(n){const e=[];let t="",r=0;for(const i of n){if(i==="("&&(r+=1),i===")"&&(r=Math.max(0,r-1)),i===","&&r===0){t.trim()&&e.push(t.trim()),t="";continue}t+=i}return t.trim()&&e.push(t.trim()),e}function ZN(n){const e=n.trim().toLowerCase(),t={"to top":0,"to top right":45,"to right top":45,"to right":90,"to bottom right":135,"to right bottom":135,"to bottom":180,"to bottom left":225,"to left bottom":225,"to left":270,"to top left":315,"to left top":315};return e in t?t[e]:null}function RN(n){const e=n[0]??"",t=ZN(e),r=hS(e),i=r!=null,s=r??t??180,a=i||t!=null?n.slice(1):n;return{kind:"linear",repeating:!1,angle:s,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:cf(a.map(Gg))}}function NN(n){const e=n[0]??"",t=e.toLowerCase(),r=Tl(t,"at")||Tl(t,"circle")||Tl(t,"ellipse")||t.includes("closest-")||t.includes("farthest-"),i=r?e:"",s=r?n.slice(1):n,a=i.toLowerCase(),c=Ug(a),u=c.indexOf("at"),h=Tl(a,"circle")?"circle":"ellipse",m=TN.find(O=>c.includes(O))??"farthest-corner";return{kind:"radial",repeating:!1,angle:180,centerX:Zd(c[u+1],50),centerY:Zd(c[u+2],50),shape:h,radialSize:m,stops:cf(s.map(Gg))}}function LN(n){const e=n[0]??"",t=e.toLowerCase(),r=Tl(t,"from")||Tl(t,"at"),i=r?e:"",s=r?n.slice(1):n,a=Ug(i.toLowerCase()),c=a.indexOf("from"),u=a.indexOf("at");return{kind:"conic",repeating:!1,angle:hS(a[c+1])??0,centerX:Zd(a[u+1],50),centerY:Zd(a[u+2],50),shape:"ellipse",radialSize:"farthest-corner",stops:cf(s.map(Gg))}}function V2(n){return{kind:"linear",repeating:!1,angle:135,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:cf([{color:n&&n!=="transparent"?n:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}])}}function VN(n){if(!n||n==="none")return null;const e=n.trim(),t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return null;const r=e.slice(0,t).toLowerCase(),s={"linear-gradient":{kind:"linear",repeating:!1},"radial-gradient":{kind:"radial",repeating:!1},"conic-gradient":{kind:"conic",repeating:!1},"repeating-linear-gradient":{kind:"linear",repeating:!0},"repeating-radial-gradient":{kind:"radial",repeating:!0},"repeating-conic-gradient":{kind:"conic",repeating:!0}}[r];if(!s)return null;const{kind:a,repeating:c}=s,u=jN(e.slice(t+1,-1));return{...a==="linear"?RN(u):a==="radial"?NN(u):LN(u),repeating:c}}function _N(n){return`${n.color} ${hs(n.position)}%`}function Rd(n){const e=`${n.repeating?"repeating-":""}${n.kind}-gradient`,t=n.stops.map(_N).join(", ");return n.kind==="linear"?`${e}(${hs(n.angle)}deg, ${t})`:n.kind==="radial"?`${e}(${n.shape} ${n.radialSize} at ${hs(n.centerX)}% ${hs(n.centerY)}%, ${t})`:`${e}(from ${hs(n.angle)}deg at ${hs(n.centerX)}% ${hs(n.centerY)}%, ${t})`}function im(n,e,t){return Math.round(n+(e-n)*t)}function sm(n){return n.toString(16).padStart(2,"0")}function DN(n,e){var $;const t=qu(e,0,100),r=[...n.stops].sort((M,V)=>M.position-V.position),i=r.find(M=>Math.abs(M.position-t)<.001);if(i)return i.color;const s=r.find(M=>M.position>t)??r.at(-1),a=[...r].reverse().find(M=>M.position<t)??r[0];if(!a||!s)return(($=r[0])==null?void 0:$.color)??"rgba(255, 255, 255, 1)";if(a===s)return a.color;const c=a.color,u=s.color,h=c?x5(c):null,m=u?x5(u):null;if(!h||!m)return a.color;const O=(t-a.position)/Math.max(1,s.position-a.position),x=im(h.red,m.red,O),v=im(h.green,m.green,O),w=im(h.blue,m.blue,O),k=hs(h.alpha+(m.alpha-h.alpha)*O);return k>=1?`#${sm(x)}${sm(v)}${sm(w)}`.toUpperCase():`rgba(${x}, ${v}, ${w}, ${k})`}function O5(n,e){const t=hs(qu(e,0,100)),r=DN(n,t),i=[...n.stops,{color:r,position:t}].sort((s,a)=>s.position-a.position);return{...n,stops:i}}function x5(n){const e=n.trim().toLowerCase();if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const t=e.match(/^#([0-9a-f]{6})$/i);if(t)return{red:Number.parseInt(t[1].slice(0,2),16),green:Number.parseInt(t[1].slice(2,4),16),blue:Number.parseInt(t[1].slice(4,6),16),alpha:1};const r=e.match(/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i);return r?{red:Number.parseFloat(r[1]),green:Number.parseFloat(r[2]),blue:Number.parseFloat(r[3]),alpha:r[4]!=null?Number.parseFloat(r[4]):1}:null}const pS=["position","display","top","left","right","bottom","inset","width","height","gap","justify-content","align-items","flex-direction","font-size","font-style","font-weight","font-family","line-height","letter-spacing","text-align","text-transform","color","background-color","background-image","opacity","mix-blend-mode","border-radius","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","outline-color","overflow","clip-path","box-shadow","filter","backdrop-filter","z-index","transform"];function Ss(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"&&n.nodeType===1}function Co(n){if(!n)return null;const e=n.trim();if(!e.endsWith("px"))return null;const t=parseFloat(e);return Number.isFinite(t)?t:null}function IN(n){const e=(n??"none").trim();if(!e||e==="none")return!0;const t=e.match(/^matrix\(([^)]+)\)$/i);if(t){const a=t[1].split(",").map(c=>Number.parseFloat(c.trim()));return a.length!==6||a.some(c=>!Number.isFinite(c))?!1:Math.abs(a[0]-1)<1e-4&&Math.abs(a[1])<1e-4&&Math.abs(a[2])<1e-4&&Math.abs(a[3]-1)<1e-4&&Math.abs(a[4])<1e-4&&Math.abs(a[5])<1e-4}const r=e.match(/^matrix3d\(([^)]+)\)$/i);if(!r)return!1;const i=r[1].split(",").map(a=>Number.parseFloat(a.trim()));if(i.length!==16||i.some(a=>!Number.isFinite(a)))return!1;const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return i.every((a,c)=>Math.abs(a-s[c])<1e-4)}function XN(n){return["div","span","p","strong","h1","h2","h3","h4","h5","h6"].includes(n)}function mS(n){var r;const e={},t=(r=n.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(n);if(!t)return e;for(const i of pS){const s=t.getPropertyValue(i);s&&(e[i]=s)}return e}function y5(n,e){let t=n;for(;t;){const r=t;if(e.some(i=>r.hasAttribute(i)))return r;t=t.parentElement}return null}function ka(n,e){const t=y5(n,["data-composition-file","data-composition-src"]),r=y5(n,["data-composition-id"]),i=(t==null?void 0:t.getAttribute("data-composition-file"))??(t==null?void 0:t.getAttribute("data-composition-src"))??(r==null?void 0:r.getAttribute("data-composition-file"))??(r==null?void 0:r.getAttribute("data-composition-src"))??e??"index.html";return{sourceFile:i,compositionPath:i}}function FN(n){let e=n;for(;e;){if(e.classList.contains("clip")&&(!(e.hasAttribute("data-composition-src")||e.hasAttribute("data-composition-file"))||e===n))return e;e=e.parentElement}return null}function zN(n,e){if(e.preferClipAncestor){const t=FN(n);if(t)return t}return n}function gS(n){const e=Array.from(n.classList).map(r=>r.trim()).filter(Boolean);if(e.length===0)return;const t=e.find(r=>r!=="clip"&&!r.startsWith("__hf-"))??e[0];return t?`.${OS(t)}`:void 0}function OS(n){const e=globalThis.CSS;if(typeof(e==null?void 0:e.escape)=="function")return e.escape(n);if(n==="-")return"\\-";let t="";for(let r=0;r<n.length;r+=1){const i=n[r]??"",s=i.charCodeAt(0);if(s===0){t+="�";continue}const a=s>=48&&s<=57,c=s>=65&&s<=90,u=s>=97&&s<=122,h=s>=1&&s<=31||s===127,m=r===0&&a,O=r===1&&n.startsWith("-")&&a;if(h||m||O){t+=`\\${s.toString(16)} `;continue}if(c||u||a||i==="-"||i==="_"||s>=128){t+=i;continue}t+=`\\${i}`}return t}function _2(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}function v5(n){const e=n==null?void 0:n.trim();if(!e)return;let t=e;try{t=new URL(e,"http://studio.local").pathname}catch{t=e}for(const r of["/preview/comp/","/preview/"]){const i=t.indexOf(r);if(i<0)continue;return t.slice(i+r.length).replace(/^\/+/,"")||e}return e}function D2(n,e){try{return Array.from(n.querySelectorAll(e))}catch{return[]}}function P1(n){var e;return((e=n.replace(/\.html$/i,"").replace(/^compositions\//i,"").split("/").at(-1))==null?void 0:e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()))??n}function xS(n){if(n.id)return`#${OS(n.id)}`;const e=n.getAttribute("data-composition-id");return e?`[data-composition-id="${_2(e)}"]`:gS(n)}function yS(n,e,t,r,i){if(!(t!=null&&t.startsWith(".")))return;const a=D2(n,t).filter(c=>Ss(c)&&ka(c,i).sourceFile===r).indexOf(e);return a>=0?a:void 0}function vS(n){const e=n.selectorIndex??0;return`${n.sourceFile}:${n.id??n.selector??"layer"}:${e}`}function bS(n){const e=n.getAttribute("data-composition-id");if(e&&e!=="main")return P1(e);const t=n.getAttribute("data-composition-src")??n.getAttribute("data-composition-file");if(t)return P1(t);if(n.id)return P1(n.id);const r=gS(n);if(r)return P1(r.replace(/^\./,""));const i=(n.textContent??"").trim().replace(/\s+/g," ");return i?i.length>40?`${i.slice(0,39)}…`:i:n.tagName.toLowerCase()}const HN=new Set(["base","br","canvas","link","meta","script","source","style","template","track","wbr"]);function WN(n){var r;const e=n.tagName.toLowerCase();if(HN.has(e))return!1;const t=(r=n.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(n);return!((t==null?void 0:t.display)==="none"||(t==null?void 0:t.visibility)==="hidden")}function uf(n,e){if(!WN(n))return null;const t=xS(n);if(!t)return null;const{sourceFile:r}=ka(n,e);return{id:n.id||void 0,selector:t,selectorIndex:yS(n.ownerDocument,n,t,r,e),sourceFile:r}}function BN(n){let e=0,t=n.parentElement;for(;t;)e+=1,t=t.parentElement;return e}function YN(n){var i;const e=n.getBoundingClientRect();if(e.width<=1||e.height<=1)return!1;const t=(i=n.ownerDocument.defaultView)==null?void 0:i.getComputedStyle(n);if(!t)return!0;if(t.display==="none"||t.visibility==="hidden")return!1;const r=Number.parseFloat(t.opacity);return!(Number.isFinite(r)&&r<=.01)}function qN(n,e){const t=n.tagName.toLowerCase(),r=n.getBoundingClientRect(),i=Math.max(1,r.width*r.height),s=Math.max(0,1e6-Math.min(i,1e6))/1e3,a=I2(n)||["img","video","canvas","svg"].includes(t)?2e3:0;return BN(n)*1e4+a+s-e}function UN(n,e){let t=null,r=0;for(const i of n){if(!Ss(i)){r+=1;continue}if(YN(i)&&uf(i,e.activeCompositionPath)){const s=qN(i,r);(!t||s>t.score)&&(t={element:i,score:s})}r+=1}return(t==null?void 0:t.element)??null}function GN(n){var t;const e=(t=n.computedStyles["background-image"])==null?void 0:t.trim();return!!(e&&e!=="none")}function KN(n,e){if(!(n.tagName.toLowerCase()==="img"||GN(n)))return!1;const{width:i,height:s}=n.boundingBox;if(i<=1||s<=1)return!1;if(!e||e.width<=1||e.height<=1)return i>=960&&s>=540;const a=i*s/(e.width*e.height),c=i/e.width,u=s/e.height;return a>=.4||c>=.7&&u>=.5}function JN(n,e){return Array.from(n.children).filter(t=>Ss(t)&&uf(t,e.activeCompositionPath)!==null)}function eL(n,e,t=99){if(!n)return 0;let r=0;const i=s=>{for(const a of Array.from(s.children))if(Ss(a)&&(uf(a,e.activeCompositionPath)&&(r+=1,r>=t)||(i(a),r>=t)))return};return i(n),r}function tL(n,e,t=80){if(!n)return[];const r=[],i=(s,a)=>{if(r.length>=t)return;const c=uf(s,e.activeCompositionPath);c&&r.push({key:vS(c),element:s,label:bS(s),tagName:s.tagName.toLowerCase(),depth:a,childCount:JN(s,e).length,id:c.id??void 0,selector:c.selector??void 0,selectorIndex:c.selectorIndex,sourceFile:c.sourceFile});const u=c?a+1:a;for(const h of Array.from(s.children))if(Ss(h)&&(i(h,u),r.length>=t))return};return i(n,0),r}function nL(n){const e={};for(const t of n.attributes)t.name.startsWith("data-")&&(e[t.name.slice(5)]=t.value);return e}function wS(n){const e={};for(const t of pS){const r=n.style.getPropertyValue(t);r&&(e[t]=r)}return e}function I2(n){return XN(n.tagName.toLowerCase())&&n.children.length===0}function rL(n,e,t,r){return r==="self"||t===1?"Content":`Text ${e+1}`}function b5(n,e,t,r){const i=n.tagName.toLowerCase();return{key:n.getAttribute("data-hf-text-key")??`${r}:${e}:${i}`,label:rL(i,e,t,r),value:n.textContent??"",tagName:i,attributes:Array.from(n.attributes).filter(a=>a.name!=="style").map(a=>({name:a.name,value:a.value})),inlineStyles:wS(n),computedStyles:mS(n),source:r}}function iL(n){const e=Array.from(n.children).filter(Ss).filter(I2);return e.length>0?e.map((t,r)=>b5(t,r,e.length,"child")):I2(n)?[b5(n,0,1,"self")]:[]}function sL(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function oL(n){const e=Object.entries(n.inlineStyles).filter(([,t])=>!!t);return e.length===0?"":e.map(([t,r])=>`${t}: ${r}`).join("; ")}function w5(n){return n.filter(e=>e.source==="child").map(e=>{const t=[...e.attributes.filter(s=>s.name!=="data-hf-text-key"),{name:"data-hf-text-key",value:e.key}].map(s=>` ${s.name}="${s.value.replace(/"/g,""")}"`).join(""),r=oL(e),i=r?` style="${r.replace(/"/g,""")}"`:"";return`<${e.tagName}${t}${i}>${sL(e.value)}</${e.tagName}>`}).join("")}function aL(n){var e,t,r,i;return{key:`child:new:${Date.now()}`,label:"Text",value:"New text",tagName:"span",attributes:[],inlineStyles:{"font-family":((e=n==null?void 0:n.computedStyles)==null?void 0:e["font-family"])??"inherit","font-size":((t=n==null?void 0:n.computedStyles)==null?void 0:t["font-size"])??"16px","font-weight":((r=n==null?void 0:n.computedStyles)==null?void 0:r["font-weight"])??"400",color:((i=n==null?void 0:n.computedStyles)==null?void 0:i.color)??"inherit"},computedStyles:{},source:"child"}}function lL(n){if(!n.selector)return{canSelect:!1,canEditStyles:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:"Studio could not resolve a stable patch target for this element."};const e=n.computedStyles.position,t=Co(n.inlineStyles.left)??Co(n.computedStyles.left),r=Co(n.inlineStyles.top)??Co(n.computedStyles.top),i=Co(n.inlineStyles.width)??Co(n.computedStyles.width),s=Co(n.inlineStyles.height)??Co(n.computedStyles.height),a=!IN(n.computedStyles.transform),c=(e==="absolute"||e==="fixed")&&t!=null&&r!=null&&!a,u=c&&(i!=null||s!=null),h=!n.isCompositionHost,m=h,O=h,x=h,v=h?void 0:"Select an internal layer to transform it.";return n.isCompositionHost&&n.isMasterView?{canSelect:!0,canEditStyles:!1,canMove:c,canResize:u,canApplyManualOffset:m,canApplyManualSize:O,canApplyManualRotation:x,reasonIfDisabled:v}:{canSelect:!0,canEditStyles:!0,canMove:c,canResize:u,canApplyManualOffset:m,canApplyManualSize:O,canApplyManualRotation:x,reasonIfDisabled:v}}function cL(n,e){var i;if(!n)return null;const t=n.ownerDocument;let r=zN(n,e);for(;r&&r!==t.body&&r!==t.documentElement;){const s=xS(r);if(!s){r=r.parentElement;continue}const{sourceFile:a,compositionPath:c}=ka(r,e.activeCompositionPath),u=yS(t,r,s,a,e.activeCompositionPath),h=r.getAttribute("data-composition-src")??r.getAttribute("data-composition-file")??void 0,m=wS(r),O=mS(r),x=iL(r),v=lL({selector:s,tagName:r.tagName.toLowerCase(),className:r.className,inlineStyles:m,computedStyles:O,isCompositionHost:!!h,isMasterView:e.isMasterView}),w=r.getBoundingClientRect();return{element:r,id:r.id||void 0,selector:s,selectorIndex:u,sourceFile:a,compositionPath:c,compositionSrc:h,isCompositionHost:!!h,label:bS(r),tagName:r.tagName.toLowerCase(),boundingBox:{x:w.left,y:w.top,width:w.width,height:w.height},textContent:((i=r.textContent)==null?void 0:i.trim())||null,dataAttributes:nL(r),inlineStyles:m,computedStyles:O,textFields:x,capabilities:v}}return null}function zs(n){return[n.sourceFile||"index.html",n.id??"",n.selector??"",n.selectorIndex??""].join("|")}function ji(n,e,t=null){if(e.id){const i=n.getElementById(e.id);if(Ss(i)&&(!e.sourceFile||ka(i,t).sourceFile===e.sourceFile))return i}return e.selector?e.selector.startsWith(".")&&e.selectorIndex!=null?D2(n,e.selector).filter(s=>Ss(s)&&(!e.sourceFile||ka(s,t).sourceFile===e.sourceFile))[e.selectorIndex]??null:D2(n,e.selector).filter(i=>Ss(i)&&(!e.sourceFile||ka(i,t).sourceFile===e.sourceFile))[0]??null:null}function uL(n,e,t){var O;const r=typeof e.id=="string"?e.id:"",i=v5(e.compositionSrc)??((O=t.compIdToSrc)==null?void 0:O.get(r)),s=i??v5(e.sourceFile)??t.activeCompositionPath??"index.html",a=_2(r),c=i?_2(i):null,u=e.selector??(i?`[data-composition-src="${c}"],[data-composition-file="${c}"],[data-composition-id="${a}"]`:a?`[data-composition-id="${a}"]`:void 0);if(u||e.domId){const x=ji(n,{id:e.domId??void 0,selector:u,selectorIndex:e.selectorIndex,sourceFile:s},t.activeCompositionPath);if(x)return x}const h=!!(e.domId||e.selector||i);if(t.isMasterView||h||!t.activeCompositionPath)return null;const m=n.querySelector("[data-composition-id]");return Ss(m)&&ka(m,t.activeCompositionPath).sourceFile===s?m:null}function A1(n,e){return{type:"inline-style",property:n,value:e}}function S5(n){return{type:"text-content",property:"text",value:n}}function dL(n){return`x=${Math.round(n.x)}, y=${Math.round(n.y)}, width=${Math.round(n.width)}, height=${Math.round(n.height)}`}function k5(n){return Object.entries(n).filter(([,e])=>e&&e!=="initial").map(([e,t])=>`${e}: ${t}`).join(`
|
|
86
|
-
`)}function fL(n){return n.map(e=>`- key=${e.key}; tag=<${e.tagName}>; source=${e.source}; text=${JSON.stringify(e.value)}`).join(`
|
|
87
|
-
`)}function hL({selection:n,currentTime:e,tagSnippet:t,selectionContext:r,userInstruction:i,sourceFilePath:s}){const a=(s==null?void 0:s.trim())||n.sourceFile,c=["## HyperFrames element edit request v1","Schema version: 1","",(i==null?void 0:i.trim())||"Edit this selected HyperFrames element.","",`Composition: ${n.compositionPath}`,`Playback time: ${$r(e)}`,`Source file: ${a}`,`DOM id: ${n.id??"(none)"}`,`Selector: ${n.selector??"(none)"}`,`Selector index: ${n.selectorIndex??0}`,`Tag: <${n.tagName}>`,`Bounds: ${dL(n.boundingBox)}`];n.textContent&&c.push(`Text: ${n.textContent}`);const u=r==null?void 0:r.trim();u&&c.push("","Selection context:",u);const h=fL(n.textFields);h&&c.push("","Text fields:",h);const m=k5(n.inlineStyles);m&&c.push("","Inline styles:",m);const O=k5(n.computedStyles);return O&&c.push("","Computed styles (browser-resolved):",O),t&&c.push("","Target HTML:",t),c.push("","Guardrails:","- Make a targeted change to this element only.","- Preserve the rest of the composition and its timing.","- Do not modify other elements' data-* attributes or positioning.","- Prefer existing inline styles or existing CSS rules for this element over adding unrelated selectors."),c.join(`
|
|
88
|
-
`)}function SS(n){return n.textFields.length>0&&!n.isCompositionHost}const jo=".hyperframes/studio-manual-edits.json",eo="--hf-studio-offset-x",to="--hf-studio-offset-y",Va="--hf-studio-width",_a="--hf-studio-height",ro="--hf-studio-rotation",Ta="data-hf-studio-path-offset",Gl="data-hf-studio-manual-edit-gesture",Ma="data-hf-studio-box-size",Qa="data-hf-studio-rotation",Wo="data-hf-studio-original-translate",ja="data-hf-studio-original-inline-translate",df="data-hf-studio-original-width",ff="data-hf-studio-original-height",Uu="data-hf-studio-original-min-width",hf="data-hf-studio-original-min-height",pf="data-hf-studio-original-max-width",mf="data-hf-studio-original-max-height",Gu="data-hf-studio-original-flex-basis",gf="data-hf-studio-original-flex-grow",Of="data-hf-studio-original-flex-shrink",xf="data-hf-studio-original-box-sizing",Bo="data-hf-studio-original-scale",Ku="data-hf-studio-original-transform-origin",yf="data-hf-studio-original-display",Yo="data-hf-studio-original-rotate",Za="data-hf-studio-original-inline-rotate",Ra="data-hf-studio-original-rotation-transform-origin",Da="data-hf-studio-rotation-draft",pL="__hfStudioManualEditsApply",X2="__hfStudioManualEditsWrapped",$1="__hfStudioManualEditsPlaybackFrame",mL="center center";let P5=0;function Ml(){return{version:1,edits:[]}}function Gs(n){return typeof n=="number"&&Number.isFinite(n)?n:null}function gL(n){if(!n||typeof n!="object")return null;const e=n;if(e.kind!=="path-offset")return null;const t=e.target;if(!t||typeof t!="object")return null;const r=t,i=typeof r.sourceFile=="string"?r.sourceFile:"";if(!i)return null;const s=typeof r.selector=="string"?r.selector:void 0,a=typeof r.id=="string"?r.id:void 0;if(!s&&!a)return null;const c=Gs(e.x),u=Gs(e.y);return c==null||u==null?null:{kind:"path-offset",target:{sourceFile:i,selector:s,selectorIndex:Gs(r.selectorIndex)??void 0,id:a},x:c,y:u,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:void 0}}function OL(n){if(!n||typeof n!="object")return null;const e=n;if(e.kind!=="box-size")return null;const t=e.target;if(!t||typeof t!="object")return null;const r=t,i=typeof r.sourceFile=="string"?r.sourceFile:"";if(!i)return null;const s=typeof r.selector=="string"?r.selector:void 0,a=typeof r.id=="string"?r.id:void 0;if(!s&&!a)return null;const c=Gs(e.width),u=Gs(e.height);return c==null||u==null||c<=0||u<=0?null:{kind:"box-size",target:{sourceFile:i,selector:s,selectorIndex:Gs(r.selectorIndex)??void 0,id:a},width:c,height:u,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:void 0}}function xL(n){if(!n||typeof n!="object")return null;const e=n;if(e.kind!=="rotation")return null;const t=e.target;if(!t||typeof t!="object")return null;const r=t,i=typeof r.sourceFile=="string"?r.sourceFile:"";if(!i)return null;const s=typeof r.selector=="string"?r.selector:void 0,a=typeof r.id=="string"?r.id:void 0;if(!s&&!a)return null;const c=Gs(e.angle);return c==null?null:{kind:"rotation",target:{sourceFile:i,selector:s,selectorIndex:Gs(r.selectorIndex)??void 0,id:a},angle:c,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:void 0}}function yL(n){return gL(n)??OL(n)??xL(n)}function A5(n){if(!n.trim())return Ml();try{const e=JSON.parse(n);if(!e||typeof e!="object")return Ml();const t=e.edits;return Array.isArray(t)?{version:1,edits:t.map(yL).filter(r=>r!==null)}:Ml()}catch{return Ml()}}function om(n){return`${JSON.stringify(n,null,2)}
|
|
89
|
-
`}function ou(n){return n.trim().replace(/\\/g,"/").replace(/^\.?\//,"")}function F2(n){if(typeof n=="string"){const t=n.trim();if(!t)return null;if(t.startsWith("{"))try{return F2(JSON.parse(t))}catch{return ou(t)}return ou(t)}if(!n||typeof n!="object")return null;const e=n;return typeof e.path=="string"?ou(e.path):typeof e.filePath=="string"?ou(e.filePath):"data"in e?F2(e.data):null}function vL(n){return F2(n)}function bL(n){if(!n)return!1;const e=ou(n);return e===jo||e.endsWith(`/${jo}`)}function vf(n){return{sourceFile:n.sourceFile||"index.html",selector:n.selector,selectorIndex:n.selectorIndex,id:n.id??void 0}}function qo(n){return[n.sourceFile,n.id??"",n.selector??"",n.selectorIndex??""].join("|")}function Kg(n){return Math.round(n*10)/10}function $5(n,e,t){const r=vf(e),i=qo(r),s={kind:"path-offset",target:r,x:Math.round(t.x),y:Math.round(t.y),updatedAt:new Date().toISOString()},a=n.edits.filter(c=>c.kind!=="path-offset"||qo(c.target)!==i);return a.push(s),{version:1,edits:a}}function wL(n,e,t){const r=vf(e),i=qo(r),s={kind:"box-size",target:r,width:Math.round(Math.max(1,t.width)),height:Math.round(Math.max(1,t.height)),updatedAt:new Date().toISOString()},a=n.edits.filter(c=>c.kind!=="box-size"||qo(c.target)!==i);return a.push(s),{version:1,edits:a}}function SL(n,e,t){const r=vf(e),i=qo(r),s={kind:"rotation",target:r,angle:Kg(t.angle),updatedAt:new Date().toISOString()},a=n.edits.filter(c=>c.kind!=="rotation"||qo(c.target)!==i);return a.push(s),{version:1,edits:a}}function kL(n,e){const t=qo(vf(e)),r=n.edits.filter(i=>qo(i.target)!==t);return r.length===n.edits.length?n:{version:1,edits:r}}function Nd(n,e){const t=Number.parseFloat(n.style.getPropertyValue(e));return Number.isFinite(t)?t:0}function PL(n,e){const t=Number.parseFloat(n.style.getPropertyValue(e));return Number.isFinite(t)?t:0}function z2(n){return{x:Nd(n,eo),y:Nd(n,to)}}function Ld(n){return{width:Nd(n,Va),height:Nd(n,_a)}}function AL(n){return{angle:PL(n,ro)}}function kS(n){P5+=1;const e=`gesture-${P5}`;return n.setAttribute(Gl,e),e}function Zi(n,e){e&&n.getAttribute(Gl)!==e||n.removeAttribute(Gl)}function Vd(n){return n.hasAttribute(Gl)}function C1(n,e){return n.getAttribute(Gl)===e}function $L(n){const e=[];let t=0,r="";for(const i of n.trim())i==="("&&(t+=1),i===")"&&(t=Math.max(0,t-1)),/\s/.test(i)&&t===0?(r&&e.push(r),r=""):r+=i;return r&&e.push(r),e}function PS(n,e,t){var s;const r=(s=n.getAttribute(Wo))==null?void 0:s.trim();if(!r||r==="none")return`${e} ${t}`;const i=$L(r);return i.length===1?`calc(${i[0]} + ${e}) ${t}`:i.length===2?`calc(${i[0]} + ${e}) calc(${i[1]} + ${t})`:i.length===3?`calc(${i[0]} + ${e}) calc(${i[1]} + ${t}) ${i[2]}`:`${e} ${t}`}function AS(n,e){const t=H2(n,e).trim();return t==="none"?"":t}function CL(n,e){const t=n.style.getPropertyValue("translate"),r=AS(n,"translate"),i=n.hasAttribute(Ta),s=!W2(r);i?e&&s&&!Vd(n)&&n.setAttribute(Wo,r):(n.setAttribute(ja,W2(t)?"":t),n.setAttribute(Wo,s?r:""))}function $S(n,e,t={}){CL(n,t.updateBase??!0),n.setAttribute(Ta,"true"),n.style.setProperty(eo,`${Math.round(e.x)}px`),n.style.setProperty(to,`${Math.round(e.y)}px`)}function EL(n,e){n.hasAttribute(Ma)||(n.setAttribute(df,n.style.getPropertyValue("width")),n.setAttribute(ff,n.style.getPropertyValue("height")),n.setAttribute(Uu,n.style.getPropertyValue("min-width")),n.setAttribute(hf,n.style.getPropertyValue("min-height")),n.setAttribute(pf,n.style.getPropertyValue("max-width")),n.setAttribute(mf,n.style.getPropertyValue("max-height")),n.setAttribute(Gu,n.style.getPropertyValue("flex-basis")),n.setAttribute(gf,n.style.getPropertyValue("flex-grow")),n.setAttribute(Of,n.style.getPropertyValue("flex-shrink")),n.setAttribute(xf,n.style.getPropertyValue("box-sizing")),n.setAttribute(Bo,n.style.getPropertyValue("scale")),n.setAttribute(Ku,n.style.getPropertyValue("transform-origin")),n.setAttribute(yf,n.style.getPropertyValue("display"))),n.setAttribute(Ma,"true"),n.style.setProperty(Va,`${Math.round(Math.max(1,e.width))}px`),n.style.setProperty(_a,`${Math.round(Math.max(1,e.height))}px`)}function TL(n,e){const t=n.style.getPropertyValue("rotate"),r=AS(n,"rotate"),i=n.hasAttribute(Qa),s=!B2(r)&&!ZL(n,r);i?e&&s&&!Vd(n)&&n.setAttribute(Yo,r):(n.setAttribute(Za,B2(t)?"":t),n.setAttribute(Yo,s?r:"")),n.hasAttribute(Ra)||n.setAttribute(Ra,n.style.getPropertyValue("transform-origin"))}function CS(n,e,t={}){TL(n,t.updateBase??!0),n.setAttribute(Qa,"true"),n.style.setProperty(ro,`${Kg(e.angle)}deg`),n.style.setProperty("transform-origin",mL)}function ML(n){return/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:deg|rad|turn|grad)$/.test(n.trim())}function Jg(n,e){var r;const t=(r=n.getAttribute(Yo))==null?void 0:r.trim();return!t||t==="none"||!ML(t)?e:`calc(${t} + ${e})`}function ES(n,e){var t;try{return((t=n.ownerDocument.defaultView)==null?void 0:t.getComputedStyle(n).getPropertyValue(e))??""}catch{return""}}function H2(n,e){return n.style.getPropertyValue(e)||ES(n,e)}function QL(n,e){const t=n.parentElement;if(!t)return null;const r=H2(t,"display").trim();if(r!=="flex"&&r!=="inline-flex")return null;const i=H2(t,"flex-direction").trim();return Math.round(Math.max(1,i.startsWith("column")?e.height:e.width))}function jL(n){n.hasAttribute(Bo)&&(Pr(n,"scale",Bo),Pr(n,"transform-origin",Ku))}function TS(n,e){EL(n,e),jL(n);const t=Math.round(Math.max(1,e.width)),r=Math.round(Math.max(1,e.height));n.style.setProperty("box-sizing","border-box"),n.style.setProperty("width",`${t}px`),n.style.setProperty("height",`${r}px`),n.style.setProperty("min-width","0px"),n.style.setProperty("min-height","0px"),n.style.setProperty("max-width","none"),n.style.setProperty("max-height","none");const i=QL(n,e);i!=null&&(n.style.setProperty("flex-basis",`${i}px`),n.style.setProperty("flex-grow","0"),n.style.setProperty("flex-shrink","0")),ES(n,"display")==="inline"&&n.style.setProperty("display","inline-block")}function W2(n){return n.includes(eo)||n.includes(to)}function C5(n){return n.includes(Va)||n.includes(_a)}function B2(n){return n.includes(ro)}function E5(n){return n.replace(/\s+/g,"").toLowerCase()}function ZL(n,e){if(!n.hasAttribute(Da))return!1;const t=n.style.getPropertyValue(ro).trim();return!t||!e.trim()?!1:E5(e)===E5(Jg(n,t))}function MS(n,e){$S(n,e),n.style.setProperty("translate",PS(n,`var(${eo}, 0px)`,`var(${to}, 0px)`))}function ed(n,e){$S(n,e,{updateBase:!1}),n.style.setProperty("translate",PS(n,`${Math.round(e.x)}px`,`${Math.round(e.y)}px`))}function QS(n,e){TS(n,e)}function RL(n,e){TS(n,e)}function jS(n,e){CS(n,e),n.removeAttribute(Da),n.style.setProperty("rotate",Jg(n,`var(${ro}, 0deg)`))}function NL(n,e){CS(n,e,{updateBase:!1}),n.setAttribute(Da,"true"),n.style.setProperty("rotate",Jg(n,`${Kg(e.angle)}deg`))}function LL(n){(n.hasAttribute(Ta)||W2(n.style.getPropertyValue("translate")))&&DL(n),n.style.removeProperty(eo),n.style.removeProperty(to),n.removeAttribute(Ta),n.removeAttribute(Wo),n.removeAttribute(ja)}function VL(n){(n.hasAttribute(Qa)||B2(n.style.getPropertyValue("rotate")))&&_L(n),n.style.removeProperty(ro),n.removeAttribute(Qa),n.removeAttribute(Da),n.removeAttribute(Yo),n.removeAttribute(Za),n.removeAttribute(Ra)}function Pr(n,e,t){const r=n.getAttribute(t);r==null||r===""?n.style.removeProperty(e):n.style.setProperty(e,r),n.removeAttribute(t)}function _L(n){const e=n.getAttribute(Za);e==null||e===""?n.style.removeProperty("rotate"):n.style.setProperty("rotate",e),n.removeAttribute(Za),n.removeAttribute(Yo);const t=n.getAttribute(Ra);t!=null&&(t===""?n.style.removeProperty("transform-origin"):n.style.setProperty("transform-origin",t)),n.removeAttribute(Ra)}function DL(n){const e=n.getAttribute(ja);e==null||e===""?n.style.removeProperty("translate"):n.style.setProperty("translate",e),n.removeAttribute(ja),n.removeAttribute(Wo)}function IL(n){(n.hasAttribute(Ma)||C5(n.style.getPropertyValue("width"))||C5(n.style.getPropertyValue("height"))||n.hasAttribute(Bo))&&(Pr(n,"width",df),Pr(n,"height",ff),Pr(n,"min-width",Uu),Pr(n,"min-height",hf),Pr(n,"max-width",pf),Pr(n,"max-height",mf),Pr(n,"flex-basis",Gu),Pr(n,"flex-grow",gf),Pr(n,"flex-shrink",Of),Pr(n,"box-sizing",xf),Pr(n,"scale",Bo),Pr(n,"transform-origin",Ku),Pr(n,"display",yf)),n.style.removeProperty(Va),n.style.removeProperty(_a),n.removeAttribute(Ma)}function XL(n){return{width:n.style.getPropertyValue("width"),height:n.style.getPropertyValue("height"),minWidth:n.style.getPropertyValue("min-width"),minHeight:n.style.getPropertyValue("min-height"),maxWidth:n.style.getPropertyValue("max-width"),maxHeight:n.style.getPropertyValue("max-height"),flexBasis:n.style.getPropertyValue("flex-basis"),flexGrow:n.style.getPropertyValue("flex-grow"),flexShrink:n.style.getPropertyValue("flex-shrink"),boxSizing:n.style.getPropertyValue("box-sizing"),scale:n.style.getPropertyValue("scale"),transformOrigin:n.style.getPropertyValue("transform-origin"),display:n.style.getPropertyValue("display"),studioWidth:n.style.getPropertyValue(Va),studioHeight:n.style.getPropertyValue(_a),marker:n.getAttribute(Ma),originalWidth:n.getAttribute(df),originalHeight:n.getAttribute(ff),originalMinWidth:n.getAttribute(Uu),originalMinHeight:n.getAttribute(hf),originalMaxWidth:n.getAttribute(pf),originalMaxHeight:n.getAttribute(mf),originalFlexBasis:n.getAttribute(Gu),originalFlexGrow:n.getAttribute(gf),originalFlexShrink:n.getAttribute(Of),originalBoxSizing:n.getAttribute(xf),originalScale:n.getAttribute(Bo),originalTransformOrigin:n.getAttribute(Ku),originalDisplay:n.getAttribute(yf)}}function FL(n){return{rotate:n.style.getPropertyValue("rotate"),transformOrigin:n.style.getPropertyValue("transform-origin"),studioRotation:n.style.getPropertyValue(ro),marker:n.getAttribute(Qa),draftMarker:n.getAttribute(Da),originalRotate:n.getAttribute(Yo),originalInlineRotate:n.getAttribute(Za),originalTransformOrigin:n.getAttribute(Ra)}}function eO(n){return{translate:n.style.getPropertyValue("translate"),x:n.style.getPropertyValue(eo),y:n.style.getPropertyValue(to),marker:n.getAttribute(Ta),originalTranslate:n.getAttribute(Wo),originalInlineTranslate:n.getAttribute(ja)}}function gn(n,e,t){t==null?n.removeAttribute(e):n.setAttribute(e,t)}function Hn(n,e,t){t?n.style.setProperty(e,t):n.style.removeProperty(e)}function am(n,e){Hn(n,"width",e.width),Hn(n,"height",e.height),Hn(n,"min-width",e.minWidth),Hn(n,"min-height",e.minHeight),Hn(n,"max-width",e.maxWidth),Hn(n,"max-height",e.maxHeight),Hn(n,"flex-basis",e.flexBasis),Hn(n,"flex-grow",e.flexGrow),Hn(n,"flex-shrink",e.flexShrink),Hn(n,"box-sizing",e.boxSizing),Hn(n,"scale",e.scale),Hn(n,"transform-origin",e.transformOrigin),Hn(n,"display",e.display),Hn(n,Va,e.studioWidth),Hn(n,_a,e.studioHeight),gn(n,Ma,e.marker),gn(n,df,e.originalWidth),gn(n,ff,e.originalHeight),gn(n,Uu,e.originalMinWidth),gn(n,hf,e.originalMinHeight),gn(n,pf,e.originalMaxWidth),gn(n,mf,e.originalMaxHeight),gn(n,Gu,e.originalFlexBasis),gn(n,gf,e.originalFlexGrow),gn(n,Of,e.originalFlexShrink),gn(n,xf,e.originalBoxSizing),gn(n,Bo,e.originalScale),gn(n,Ku,e.originalTransformOrigin),gn(n,yf,e.originalDisplay)}function lm(n,e){Hn(n,"rotate",e.rotate),Hn(n,"transform-origin",e.transformOrigin),Hn(n,ro,e.studioRotation),gn(n,Qa,e.marker),gn(n,Da,e.draftMarker),gn(n,Yo,e.originalRotate),gn(n,Za,e.originalInlineRotate),gn(n,Ra,e.originalTransformOrigin)}function va(n,e){e.translate?n.style.setProperty("translate",e.translate):n.style.removeProperty("translate"),e.x?n.style.setProperty(eo,e.x):n.style.removeProperty(eo),e.y?n.style.setProperty(to,e.y):n.style.removeProperty(to),gn(n,Ta,e.marker),gn(n,Wo,e.originalTranslate),gn(n,ja,e.originalInlineTranslate)}function tO(n){try{Object.defineProperty(n,X2,{configurable:!1,enumerable:!1,value:!0})}catch{try{n[X2]=!0}catch{}}}function nO(n){return!!n[X2]}function Kc(n,e,t){const r=e==null?void 0:e[t];if(!e||typeof r!="function")return!1;const i=r;if(nO(i))return!0;const s=function(...a){var u;const c=i.apply(this,a);return(u=n.__hfStudioManualEditsApply)==null||u.call(n),c};tO(s);try{e[t]=s}catch{return!1}return!0}function Jc(n,e){const t=n[e];if(typeof t!="function")return null;try{return Gs(t.call(n))}catch{return null}}function zL(n){const e=Jc(n,"duration")??Jc(n,"getDuration");if(e==null)return!0;if(e<=0)return!1;const t=Jc(n,"time")??Jc(n,"totalTime")??Jc(n,"getTime");return t==null?!0:t<e}function cm(n){if(!n)return!1;const e=n.isPlaying;if(typeof e=="function")try{return!!e.call(n)}catch{return!1}const t=n.paused;if(typeof t=="function"){try{if(t.call(n))return!1}catch{return!1}const i=n.isActive;if(typeof i=="function")try{if(i.call(n))return!0}catch{return!1}return zL(n)}const r=n.isActive;if(typeof r=="function")try{return!!r.call(n)}catch{return!1}return!1}function ZS(n){return cm(n.__player)||cm(n.__timeline)?!0:Object.values(n.__timelines??{}).some(cm)}function RS(n){var t;if((t=n.__hfStudioManualEditsApply)==null||t.call(n),n[$1]!=null)return;const e=()=>{var r;if((r=n.__hfStudioManualEditsApply)==null||r.call(n),!ZS(n)){n[$1]=null;return}n[$1]=n.requestAnimationFrame(e)};n[$1]=n.requestAnimationFrame(e)}function um(n,e,t){const r=e==null?void 0:e[t];if(!e||typeof r!="function")return!1;const i=r;if(nO(i))return!0;const s=function(...a){const c=i.apply(this,a);return RS(n),c};tO(s);try{e[t]=s}catch{return!1}return!0}function dm(n,e,t){const r=e==null?void 0:e[t];if(!e||typeof r!="function")return!1;const i=r;if(nO(i))return!0;const s=function(...a){var u;const c=i.apply(this,a);return(u=n.__hfStudioManualEditsApply)==null||u.call(n),c};tO(s);try{e[t]=s}catch{return!1}return!0}function HL(n,e){const t=n;t[pL]=e;const r=Kc(t,t.__hf,"seek"),i=Kc(t,t.__player,"seek"),s=Kc(t,t.__player,"renderSeek"),a=Kc(t,t.__timeline,"seek"),c=um(t,t.__player,"play"),u=um(t,t.__timeline,"play"),h=dm(t,t.__player,"pause"),m=dm(t,t.__timeline,"pause");let O=!1,x=!1,v=!1;for(const w of Object.values(t.__timelines??{}))O=Kc(t,w,"seek")||O,x=um(t,w,"play")||x,v=dm(t,w,"pause")||v;return ZS(t)&&RS(t),r||i||s||a||c||u||h||m||O||x||v}function WL(n,e){let t=n;for(;t;){const r=t.getAttribute("data-composition-file")??t.getAttribute("data-composition-src");if(r)return r;t=t.parentElement}return e??"index.html"}function fm(n,e,t){return WL(n,t)===e}function BL(n,e,t){var s;const r=a=>a instanceof t,i=(s=e.match(/^\.([A-Za-z0-9_-]+)$/))==null?void 0:s[1];return i?Array.from(n.getElementsByTagName("*")).filter(a=>r(a)&&a.classList.contains(i)):/^[A-Za-z][A-Za-z0-9-]*$/.test(e)?Array.from(n.getElementsByTagName(e)).filter(r):Array.from(n.querySelectorAll(e)).filter(r)}function YL(n,e,t){var i;const r=(i=n.defaultView)==null?void 0:i.HTMLElement;if(!r)return null;if(e.target.id){const s=n.getElementById(e.target.id);if(s instanceof r&&fm(s,e.target.sourceFile,t))return s;const a=[n.documentElement,...Array.from(n.getElementsByTagName("*"))].filter(c=>c instanceof r&&c.id===e.target.id&&fm(c,e.target.sourceFile,t));if(a[0])return a[0]}if(!e.target.selector)return null;try{return BL(n,e.target.selector,r).filter(a=>fm(a,e.target.sourceFile,t))[e.target.selectorIndex??0]??null}catch{return null}}function qL(n){var r;const e=(r=n.defaultView)==null?void 0:r.HTMLElement;return e?[n.documentElement,...Array.from(n.getElementsByTagName("*"))].filter(i=>i instanceof e).filter(i=>i.hasAttribute(Ta)||i.hasAttribute(Gl)||i.hasAttribute(Ma)||i.hasAttribute(Qa)||i.hasAttribute(Da)||i.hasAttribute(Wo)||i.hasAttribute(ja)||i.hasAttribute(Uu)||i.hasAttribute(Gu)||i.hasAttribute(Bo)||i.hasAttribute(Yo)||i.hasAttribute(Za)||!!i.style.getPropertyValue(eo)||!!i.style.getPropertyValue(to)||!!i.style.getPropertyValue(Va)||!!i.style.getPropertyValue(_a)||!!i.style.getPropertyValue(ro)):[]}function UL(n,e,t){const r=[],i=new Set,s=new Set,a=new Set;for(const u of e.edits){const h=YL(n,u,t);h&&(Vd(h)||(r.push({edit:u,element:h}),u.kind==="path-offset"&&i.add(h),u.kind==="box-size"&&s.add(h),u.kind==="rotation"&&a.add(h)))}for(const u of qL(n))Vd(u)||(i.has(u)||LL(u),s.has(u)||IL(u),a.has(u)||VL(u));let c=0;for(const{edit:u,element:h}of r)u.kind==="path-offset"?MS(h,{x:u.x,y:u.y}):u.kind==="box-size"?QS(h,{width:u.width,height:u.height}):jS(h,{angle:u.angle}),c+=1;return c}const T5=["ABeeZee","Abel","Abril Fatface","Alegreya","Alegreya Sans","Anton","Archivo","Archivo Black","Arimo","Assistant","Barlow","Barlow Condensed","Bebas Neue","Bitter","Bricolage Grotesque","Cabin","Cardo","Catamaran","Caveat","Chivo","Cormorant Garamond","Crimson Text","Dancing Script","DM Sans","DM Serif Display","Domine","EB Garamond","Exo 2","Figtree","Fira Code","Fira Sans","Fraunces","Fredoka","IBM Plex Mono","IBM Plex Sans","IBM Plex Serif","Inconsolata","Instrument Sans","Instrument Serif","Inter","JetBrains Mono","Josefin Sans","Jost","Kanit","Karla","Lato","League Gothic","Lexend","Libre Baskerville","Libre Franklin","Lora","Manrope","Merriweather","Montserrat","Mukta","Mulish","Newsreader","Noto Sans","Noto Sans JP","Noto Serif","Nunito","Nunito Sans","Open Sans","Oswald","Outfit","Overpass","Pacifico","Pathway Extreme","Permanent Marker","Playfair Display","Plus Jakarta Sans","Poppins","Prata","PT Sans","PT Serif","Public Sans","Quicksand","Raleway","Red Hat Display","Roboto","Roboto Condensed","Roboto Mono","Roboto Serif","Rubik","Schibsted Grotesk","Signika","Source Code Pro","Source Sans 3","Source Serif 4","Space Grotesk","Space Mono","Spectral","Sora","Syne","Teko","Titillium Web","Ubuntu","Ubuntu Mono","Unbounded","Urbanist","Varela Round","Work Sans","Young Serif","Zilla Slab"],Y2=["TT Norms Pro","SF Pro Display","SF Pro Text","Avenir","Avenir Next","Helvetica Neue","Arial","Georgia","Times New Roman","Menlo","Monaco","Courier New"];function NS(n){return`https://fonts.googleapis.com/css2?family=${encodeURIComponent(n.trim()).replace(/%20/g,"+")}:wght@300;400;500;600;700;800;900&display=swap`}const GL=/\.(eot|otf|ttc|ttf|woff2?)$/i,M5=/\s+(thin|extralight|extra light|light|regular|roman|medium|semibold|semi bold|bold|extrabold|extra bold|black|italic|oblique|variable)$/i;function Q5(n){return JSON.stringify(n)}function Ql(n){const e=decodeURIComponent(n.split(/[\\/]/).pop()??n).replace(GL,"");let t=e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim();for(;M5.test(t);)t=t.replace(M5,"").trim();return t||e}function rO(n,e=n.url){return`@font-face { font-family: ${Q5(n.family)}; src: url(${Q5(e)}); font-display: swap; }`}function hm(n,e,t){return Math.max(e,Math.min(t,n))}function KL(n,e,t,r){const a=Math.max(12,e.width-t.width-12),c=n.left+n.width/2-t.width/2,u=hm(c,12,a),h=n.bottom+8,m=n.top-t.height-8,O=h+t.height<=e.height-12,x=m>=12;return O||!x?{left:u,top:hm(h,12,Math.max(12,e.height-t.height-12)),placement:"bottom"}:{left:u,top:hm(m,12,Math.max(12,e.height-t.height-12)),placement:"top"}}const ks="min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600",hr="text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",Ri="grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3",JL={},LS=new Set(["inherit","initial","revert","revert-layer","serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]),eV=[...Y2,"Inter","system-ui","sans-serif","serif","monospace"],j5={width:292,height:386},q2="none",VS={none:"none",soft:"0 12px 36px rgba(0, 0, 0, 0.28)",lift:"0 18px 54px rgba(0, 0, 0, 0.38)",glow:"0 0 0 1px rgba(60, 230, 172, 0.34), 0 18px 56px rgba(60, 230, 172, 0.2)"};function pm(n){return uS(n)??{red:0,green:0,blue:0,alpha:1}}function Z5(n){return n.replace(/[^\w .-]+/g," ").replace(/\s+/g," ").trim()}function E1(n){var r,i;const e=((r=n.style)==null?void 0:r.toLowerCase())??"",t=((i=n.fullName)==null?void 0:i.toLowerCase())??"";return e==="regular"||t.endsWith(" regular")?0:e==="normal"||t.endsWith(" normal")?1:e==="medium"||t.endsWith(" medium")?2:3}function R5(n){if(!n)return null;const e=Number.parseFloat(n);return Number.isFinite(e)?e:null}function En(n){const e=Math.round(n*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function Ia(n){if(!n)return null;const e=n.trim().match(/^(-?\d+(?:\.\d+)?)([a-z%]*)$/i);if(!e)return null;const t=Number.parseFloat(e[1]);return Number.isFinite(t)?{value:t,unit:e[2]??""}:null}function Eo(n){const e=Ia(n);return!e||e.unit&&e.unit.toLowerCase()!=="px"?null:e.value}function _S(n,e,t,r){return Number.isFinite(n)?Math.max(e,Math.min(t,n)):r}function tV(n,e={}){const t=Ia(n.trim());if(!t||t.unit&&t.unit.toLowerCase()!=="px")return null;const r=_S(t.value,e.min??Number.NEGATIVE_INFINITY,e.max??Number.POSITIVE_INFINITY,e.fallback??0);return`${En(r)}px`}function gl(n){return`${En(n)}px`}function N5(n,e){const t=e.trim();if(!t||t==="normal")return t||"normal";const r=Ia(t);return r?n==="letter-spacing"?r.unit?t:`${En(r.value)}px`:r.unit?t:r.value>4?`${En(r.value)}px`:En(r.value):t}function nV(n){const e=[];let t="",r=0;for(const i of n.trim()){if(i==="("&&(r+=1),i===")"&&(r=Math.max(0,r-1)),/\s/.test(i)&&r===0){t.trim()&&e.push(t.trim()),t="";continue}t+=i}return t.trim()&&e.push(t.trim()),e}function L5(n,e){const t=n==null?void 0:n.trim();if(!t||t===q2)return 0;const r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`(?:^|\\s)${r}\\((-?\\d+(?:\\.\\d+)?)px\\)`,"i").exec(t);if(!i)return 0;const s=Number.parseFloat(i[1]);return Number.isFinite(s)?Math.max(0,s):0}function V5(n,e,t){const r=_S(t,0,200,0),i=nV(n&&n.trim()!==q2?n:""),s=e.toLowerCase(),a=i.filter(c=>!c.toLowerCase().startsWith(`${s}(`));return r>0&&a.push(`${e}(${En(r)}px)`),a.length>0?a.join(" "):q2}function rV(n){const e=(n==null?void 0:n.trim())||"none";for(const[t,r]of Object.entries(VS))if(e===r)return t;return e==="none"?"none":"custom"}function iV(n,e){return n==="custom"?(e==null?void 0:e.trim())||"none":VS[n]}function sV(n){const e=n==null?void 0:n.trim();return!e||e==="none"?"none":/^inset\(/i.test(e)?"inset":/^circle\(/i.test(e)?"circle":"custom"}function oV(n){const e=/^inset\(\s*(-?\d+(?:\.\d+)?)px\b/i.exec((n==null?void 0:n.trim())??"");if(!e)return 0;const t=Number.parseFloat(e[1]);return Number.isFinite(t)?Math.max(0,t):0}function aV(n,e){const t=[["border-width",n]],r=Ia(n),i=(e==null?void 0:e.trim().toLowerCase())||"none";return r&&r.value>0&&(i==="none"||i==="hidden")&&t.push(["border-style","solid"]),t}function lV(n,e){const t=[["border-style",n]],r=n.trim().toLowerCase();if(!r||r==="none"||r==="hidden")return t;const i=Ia((e==null?void 0:e.trim())||"0");return(!i||i.value<=0)&&t.push(["border-width","1px"]),t}function cV(n,e,t){return n==="custom"?(t==null?void 0:t.trim())||"none":n==="circle"?"circle(50% at 50% 50%)":n==="inset"?`inset(0 round ${En(Math.max(0,e))}px)`:"none"}function uV(n,e){return`inset(${En(Math.max(0,n))}px round ${En(Math.max(0,e))}px)`}function _5(n,e,t){const r=Ia(n);if(!r)return null;const i=t!=null&&t.altKey?.1:t!=null&&t.shiftKey?10:1,s=r.value+i*e;return`${En(s)}${r.unit}`}function dV(n){if(!n)return"";const t=n.toLowerCase().indexOf("url(");if(t<0)return"";let r=t+4;for(;r<n.length&&(n[r]===" "||n[r]===`
|
|
90
|
-
`||n[r]==="\r"||n[r]===" "||n[r]==="\f");)r+=1;const i=n[r]==='"'||n[r]==="'"?n[r]:null;if(i){r+=1;const a=n.indexOf(i,r);return a>=r?n.slice(r,a):""}const s=n.indexOf(")",r);return s<r?"":n.slice(r,s).trim()}function Nu(n){const e=n.trim(),t=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(t).replace(/\\/g,"/").replace(/^\.?\//,"")}function fV(n,e){const t=Nu(n).split("/").filter(Boolean),r=Nu(e).split("/").filter(Boolean);for(t.pop();t.length>0&&r.length>0&&t[0]===r[0];)t.shift(),r.shift();return[...t.map(()=>".."),...r].join("/")||e}function D5(n){return Nu(n)}function hV(n,e,t){const r=Nu(n);if(!r)return null;for(const i of t){const s=Nu(i),a=fV(e,i);if(r===s||r===a||r.endsWith(`/${s}`)||r.endsWith(`/${a}`))return i}return null}function DS({value:n,disabled:e,liveCommit:t,onCommit:r}){const[i,s]=d.useState(n),a=d.useRef(null),c=d.useRef(n),u=d.useRef(i),h=d.useRef(null);c.current=n,u.current=i,d.useEffect(()=>{s(n)},[n]),d.useEffect(()=>{const v=h.current;if(!v)return;const w=k=>{if(e)return;const $=k.deltaY===0?k.deltaX:k.deltaY;if($===0)return;const M=_5(u.current,$<0?1:-1,k);M&&(k.preventDefault(),k.stopPropagation(),s(M),x.current(M))};return v.addEventListener("wheel",w,{passive:!1}),()=>v.removeEventListener("wheel",w)},[e]),d.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const m=v=>{a.current&&clearTimeout(a.current),v!==c.current&&r(v)},O=v=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{v!==c.current&&r(v)},120)},x=d.useRef(O);return x.current=O,p.jsx("input",{ref:h,type:"text",value:i,disabled:e,onChange:v=>{s(v.target.value),t&&O(v.target.value)},onBlur:()=>m(i),onKeyDown:v=>{if(v.key==="Enter"){v.target.blur();return}if(v.key!=="ArrowUp"&&v.key!=="ArrowDown")return;const w=_5(i,v.key==="ArrowUp"?1:-1,v);w&&(v.preventDefault(),s(w),O(w))},title:Ia(n)?"Scroll or use Arrow keys to adjust":void 0,className:"min-w-0 w-full bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})}function Hs({label:n,value:e,disabled:t,liveCommit:r,onCommit:i}){return p.jsx("div",{className:ks,children:p.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[p.jsx("span",{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500",children:n}),p.jsx(DS,{value:e,disabled:t,liveCommit:r,onCommit:i})]})})}function iO({label:n,value:e,disabled:t,onCommit:r}){return p.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:n}),p.jsx("div",{className:ks,children:p.jsx(DS,{value:e,disabled:t,onCommit:r})})]})}function I5({label:n,value:e,disabled:t,autoFocus:r,onCommit:i}){const[s,a]=d.useState(e),c=d.useRef(null),u=d.useRef(null),h=d.useRef(!1),m=d.useRef(e);m.current=e,d.useEffect(()=>{h.current||a(e)},[e]),d.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),d.useEffect(()=>{var v;r&&((v=c.current)==null||v.focus())},[r]);const O=v=>{u.current&&clearTimeout(u.current),v!==m.current&&i(v)},x=v=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{v!==m.current&&i(v)},120)};return p.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:n}),p.jsx("div",{className:ks,children:p.jsx("textarea",{ref:c,value:s,disabled:t,rows:4,onFocus:()=>{h.current=!0},onChange:v=>{a(v.target.value),x(v.target.value)},onBlur:()=>{h.current=!1,O(s)},className:"w-full resize-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})})]})}function mm(n){const e=n.trim().replace(/\s+/g," ");return e.length<=56?e:`${e.slice(0,55)}…`}function gm(n,e){return n.computedStyles.color||e.color||"rgb(0, 0, 0)"}function pV(n){const e=[];let t="",r=null;for(const i of n){if((i==='"'||i==="'")&&!r){r=i;continue}if(i===r){r=null;continue}if(i===","&&!r){t.trim()&&e.push(t.trim()),t="";continue}t+=i}return t.trim()&&e.push(t.trim()),e.map(i=>i.replace(/^["']|["']$/g,"").trim()).filter(Boolean)}function mV(n){return pV(n)[0]??"inherit"}function gV(n){const e=n.trim();return LS.has(e.toLowerCase())?e:`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function T1(n){const e=n.trim();return e?LS.has(e.toLowerCase())?e:`${gV(e)}, ui-sans-serif, system-ui, sans-serif`:"inherit"}function OV(){if(typeof document>"u")return[];const n=document.fonts;return n?Array.from(n,e=>e.family.replace(/^["']|["']$/g,"").trim()).filter(Boolean).sort((e,t)=>e.localeCompare(t)):[]}function Om(n){const e=new Set,t=[];for(const r of n){const i=r.trim();if(!i)continue;const s=i.toLowerCase();e.has(s)||(e.add(s),t.push(i))}return t}function X5(n){const e=new Set,t=[];for(const r of n){const i=r.family.trim();if(!i)continue;const s=i.toLowerCase();e.has(s)||(e.add(s),t.push({family:i,source:r.source}))}return t}function F5(n){return n==="Current"?0:n==="Document"?1:n==="Imported"?2:n==="Local"?3:n==="Google"?4:5}function xV(n){return[...n].sort((e,t)=>{const r=F5(e.source)-F5(t.source);if(r!==0)return r;const i=Y2.findIndex(c=>c.toLowerCase()===e.family.toLowerCase()),s=Y2.findIndex(c=>c.toLowerCase()===t.family.toLowerCase()),a=(i===-1?Number.MAX_SAFE_INTEGER:i)-(s===-1?Number.MAX_SAFE_INTEGER:s);return a===0?e.family.localeCompare(t.family):a})}function z5(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"")}function yV(n,e){const t=e.trim().toLowerCase();return!t||n.toLowerCase().includes(t)?!0:z5(n).includes(z5(t))}function H5(n){if(typeof document>"u")return;const e=n.trim();if(!e)return;const t=`studio-google-font-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(t))return;if(!document.querySelector('link[data-studio-google-font-preconnect="true"]')){const s=document.createElement("link");s.setAttribute("data-studio-google-font-preconnect","true"),s.rel="preconnect",s.href="https://fonts.gstatic.com",s.crossOrigin="anonymous",document.head.appendChild(s)}const i=document.createElement("link");i.id=t,i.rel="stylesheet",i.href=NS(e),document.head.appendChild(i)}function M1(n){if(typeof document>"u")return;const e=`studio-imported-font-${n.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=rO(n),document.head.appendChild(t)}function W5({value:n,disabled:e,onCommit:t}){const r=["300","400","500","600","700","800"];return p.jsx("div",{className:ks,children:p.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[p.jsx("span",{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500",children:"Weight"}),p.jsx("select",{value:n,disabled:e,onChange:i=>t(i.target.value),className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:r.map(i=>p.jsx("option",{value:i,children:i},i))})]})})}function B5({value:n,disabled:e,importedFonts:t,onImportFonts:r,onCommit:i}){const s=mV(n),a=d.useRef(null),c=d.useRef(null),u=d.useRef(null),[h,m]=d.useState(!1),[O,x]=d.useState(""),[v,w]=d.useState([]),[k,$]=d.useState([]),[M,V]=d.useState(()=>[...T5]),[A,Q]=d.useState(!1),[T,N]=d.useState(!1),[j,W]=d.useState(!1),[K,ae]=d.useState(null),ie=typeof window<"u"&&typeof window.queryLocalFonts=="function";d.useEffect(()=>{if(!h)return;const z=q=>{var X;const E=q.target;E instanceof Node&&((X=a.current)!=null&&X.contains(E)||m(!1))};return document.addEventListener("pointerdown",z),()=>{document.removeEventListener("pointerdown",z)}},[h]),d.useEffect(()=>{h&&requestAnimationFrame(()=>{var z;return(z=c.current)==null?void 0:z.focus()})},[h]),d.useEffect(()=>{let z=!1;return fetch("/api/fonts").then(q=>q.ok?q.json():null).then(q=>{const E=q==null?void 0:q.fonts;z||!Array.isArray(E)||w(X=>Om([...X,...E]))}).catch(()=>{}),()=>{z=!0}},[]),d.useEffect(()=>{let z=!1;return N(!0),fetch("/api/fonts/google").then(q=>q.ok?q.json():null).then(q=>{const E=q==null?void 0:q.fonts;z||!Array.isArray(E)||V(Om([...E,...T5]))}).catch(()=>{}).finally(()=>{z||N(!1)}),()=>{z=!0}},[]),d.useEffect(()=>{M.some(q=>q.toLowerCase()===s.toLowerCase())&&H5(s);const z=t.find(q=>q.family.toLowerCase()===s.toLowerCase());z&&M1(z)},[s,M,t]);const L=async()=>{if(!ie||!window.queryLocalFonts){ae("This browser does not expose installed fonts. Import a font file instead.");return}Q(!0),ae(null);try{const z=await window.queryLocalFonts(),q=[...z].sort((X,ee)=>E1(X)-E1(ee)),E=q.map(X=>X.family).filter(X=>!!X).map(X=>Ql(`${X}.ttf`));$(q),w(X=>Om([...X,...E])),ae(z.length===0?"No browser-local fonts were returned.":null)}catch(z){const q=z instanceof Error?z.name:"";ae(q==="NotAllowedError"?"Local font access was denied. Import a font file instead.":"Local font access is unavailable. Import a font file instead.")}finally{Q(!1)}},le=async z=>{if(!(!(z!=null&&z.length)||!r)){W(!0),ae(null);try{const q=await r(z);for(const X of q)M1(X);const E=q[0];E?(i(T1(E.family)),x(""),m(!1)):ae("No supported font files were imported.")}finally{W(!1)}}},ye=d.useMemo(()=>X5(t.map(z=>({family:z.family,source:"Imported"}))),[t]),Oe=d.useMemo(()=>{const z=OV();return xV(X5([{family:s,source:"Current"},...z.map(q=>({family:q,source:"Document"})),...ye,...v.map(q=>({family:q,source:"Local"})),...M.map(q=>({family:q,source:"Google"})),...eV.map(q=>({family:q,source:"System"}))]))},[s,M,v,ye]),$e=d.useMemo(()=>Oe.filter(q=>yV(q.family,O)).slice(0,O.trim()?120:160),[Oe,O]),pe=async z=>{if(!r)return null;const E=k.filter(De=>Ql(`${De.family}.ttf`)===z).sort((De,G)=>E1(De)-E1(G)).find(De=>typeof De.blob=="function");if(!(E!=null&&E.blob))return null;const X=await E.blob(),ee=Z5(E.style??"Regular")||"Regular",Ce=Z5(`${z} ${ee}`)||z,Te=new File([X],`${Ce}.ttf`,{type:X.type||"font/ttf"}),tt=await r([Te]);return tt.find(De=>De.family.toLowerCase()===z.toLowerCase())??tt[0]??null},D=async z=>{if(z.source==="Local"){W(!0),ae(null);try{const E=await pe(z.family);if(E){M1(E),i(T1(E.family)),x(""),m(!1);return}i(T1(z.family)),x(""),m(!1)}finally{W(!1)}return}z.source==="Google"&&H5(z.family);const q=t.find(E=>E.family.toLowerCase()===z.family.toLowerCase());q&&M1(q),i(T1(z.family)),x(""),m(!1)};return p.jsxs("div",{ref:a,className:"relative grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Font family"}),p.jsxs("button",{type:"button",disabled:e,onClick:()=>m(z=>!z),className:`${ks} flex h-10 items-center justify-between gap-3 text-left hover:border-neutral-700 disabled:cursor-not-allowed`,children:[p.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-neutral-100",style:{fontFamily:n},children:s}),p.jsx("span",{className:"flex-shrink-0 text-[10px] uppercase tracking-[0.14em] text-neutral-600",children:"Font"})]}),h&&p.jsxs("div",{className:"absolute left-0 right-0 top-[calc(100%+6px)] z-50 overflow-hidden rounded-xl border border-neutral-700 bg-neutral-950 shadow-2xl",children:[p.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] gap-2 border-b border-neutral-800 p-2",children:[p.jsx("input",{ref:c,type:"text",value:O,disabled:e,placeholder:T?"Loading Google Fonts...":"Search fonts",onChange:z=>x(z.target.value),onKeyDown:z=>{z.key==="Escape"&&(z.preventDefault(),m(!1)),z.key==="Enter"&&$e[0]&&(z.preventDefault(),D($e[0]))},className:"min-w-0 rounded-lg border border-neutral-800 bg-neutral-900 px-2.5 py-2 text-[11px] font-medium text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-neutral-600"}),ie&&p.jsx("button",{type:"button",disabled:e||A,onClick:L,className:"rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700",children:A?"...":"Local"}),p.jsx("button",{type:"button",disabled:e||j||!r,onClick:()=>{var z;return(z=u.current)==null?void 0:z.click()},className:"rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700",children:j?"...":"Import"}),p.jsx("input",{ref:u,type:"file",accept:".ttf,.otf,.ttc,.woff,.woff2,.eot,font/*",multiple:!0,"aria-label":"Import local font files",disabled:e||j||!r,className:"hidden",onChange:async z=>{await le(z.target.files),z.target.value=""}})]}),K&&p.jsx("div",{className:"border-b border-neutral-800 px-3 py-2 text-[10px] leading-4 text-neutral-500",children:K}),p.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:$e.length===0?p.jsx("div",{className:"px-2 py-3 text-[11px] text-neutral-500",children:"No fonts found."}):$e.map(z=>p.jsxs("button",{type:"button",onClick:()=>D(z),className:`flex w-full min-w-0 items-center justify-between gap-3 rounded-lg px-2 py-2 text-left text-[11px] transition-colors ${z.family===s?"bg-studio-accent/15 text-neutral-50":"text-neutral-300 hover:bg-neutral-900 hover:text-neutral-100"}`,children:[p.jsx("span",{className:"min-w-0 truncate font-medium",children:z.family}),p.jsx("span",{className:"flex-shrink-0 text-[9px] uppercase tracking-[0.14em] text-neutral-600",children:z.source})]},`${z.source}-${z.family}`))})]})]})}function eu(n,e,t,r){return n.computedStyles[t]||e[t]||r}function Y5({field:n,inheritedStyles:e,disabled:t,onCommit:r}){return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:Ri,children:[p.jsx(Hs,{label:"Line",value:eu(n,e,"line-height","normal"),disabled:t,liveCommit:!0,onCommit:i=>r("line-height",N5("line-height",i))}),p.jsx(Hs,{label:"Track",value:eu(n,e,"letter-spacing","0px"),disabled:t,liveCommit:!0,onCommit:i=>r("letter-spacing",N5("letter-spacing",i))})]}),p.jsxs("div",{className:Ri,children:[p.jsx(xi,{label:"Align",value:eu(n,e,"text-align","start"),disabled:t,onChange:i=>r("text-align",i),options:["start","left","center","right","justify","end"]}),p.jsx(xi,{label:"Case",value:eu(n,e,"text-transform","none"),disabled:t,onChange:i=>r("text-transform",i),options:["none","uppercase","lowercase","capitalize"]})]}),p.jsx(xi,{label:"Style",value:eu(n,e,"font-style","normal"),disabled:t,onChange:i=>r("font-style",i),options:["normal","italic","oblique"]})]})}function wl({label:n,value:e,disabled:t,onCommit:r}){const i=d.useRef(null),s=d.useRef(null),[a,c]=d.useState(!1),[u,h]=d.useState(null),[m,O]=d.useState(()=>pm(e)),[x,v]=d.useState(()=>rm(pm(e)).toUpperCase()),w=EN(m),k=k1({...g5({hue:w.hue,saturation:1,value:1}),alpha:1}),$=k1({...m,alpha:1}),M=k1(m),V=Math.round(w.saturation*100),A=Math.round(w.value*100),Q=Math.round(m.alpha*100);d.useEffect(()=>{const L=pm(e);O(L),v(rm(L).toUpperCase())},[e]);const T=d.useCallback(()=>{var ye,Oe;const L=(ye=i.current)==null?void 0:ye.getBoundingClientRect();if(!L)return;const le=(Oe=s.current)==null?void 0:Oe.getBoundingClientRect();h(KL(L,{width:window.innerWidth,height:window.innerHeight},{width:(le==null?void 0:le.width)||j5.width,height:(le==null?void 0:le.height)||j5.height}))},[]);d.useLayoutEffect(()=>{if(!a)return;T();const L=()=>T();return window.addEventListener("resize",L),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}},[a,T]),d.useEffect(()=>{if(!a)return;const L=ye=>{var $e,pe;const Oe=ye.target;Oe&&(($e=s.current)!=null&&$e.contains(Oe)||(pe=i.current)!=null&&pe.contains(Oe)||c(!1))},le=ye=>{ye.key==="Escape"&&c(!1)};return document.addEventListener("pointerdown",L),document.addEventListener("keydown",le),()=>{document.removeEventListener("pointerdown",L),document.removeEventListener("keydown",le)}},[a]);const N=L=>{O(L),v(rm(L).toUpperCase()),r(k1(L))},j=L=>{const le=g5({hue:L.hue??w.hue,saturation:L.saturation??w.saturation,value:L.value??w.value});N({...le,alpha:m.alpha})},W=(L,le,ye)=>{const Oe=ye.getBoundingClientRect(),$e=Math.max(0,Math.min(1,(L-Oe.left)/Oe.width)),pe=Math.max(0,Math.min(1,1-(le-Oe.top)/Oe.height));j({saturation:$e,value:pe})},K=L=>{v(L);const le=L.trim().startsWith("#")?L.trim():`#${L.trim()}`,ye=uS(le);ye&&N({...ye,alpha:m.alpha})},ae=a?$N.createPortal(p.jsxs("div",{ref:s,className:"fixed z-[9999] w-[292px] overflow-hidden rounded-2xl border border-neutral-700 bg-neutral-950 shadow-2xl shadow-black/50",style:{left:(u==null?void 0:u.left)??-9999,top:(u==null?void 0:u.top)??-9999},children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-neutral-800 px-3 py-2",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:n}),p.jsx("div",{className:"text-[9px] uppercase tracking-[0.16em] text-neutral-600",children:"Color"})]}),p.jsx("button",{type:"button",onClick:()=>c(!1),className:"flex h-7 w-7 items-center justify-center rounded-lg text-neutral-500 transition-colors hover:bg-neutral-900 hover:text-neutral-200","aria-label":"Close color picker",children:p.jsx(af,{size:13})})]}),p.jsxs("div",{className:"space-y-3 p-3",children:[p.jsxs("div",{className:"relative h-36 cursor-crosshair overflow-hidden rounded-xl border border-neutral-700 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]",style:{backgroundColor:k},onPointerDown:L=>{L.currentTarget.setPointerCapture(L.pointerId),W(L.clientX,L.clientY,L.currentTarget)},onPointerMove:L=>{L.buttons===1&&W(L.clientX,L.clientY,L.currentTarget)},children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white to-transparent"}),p.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black to-transparent"}),p.jsx("div",{className:"pointer-events-none absolute top-0 h-full w-px -translate-x-1/2 bg-white/70 shadow-[0_0_0_1px_rgba(0,0,0,0.45)] mix-blend-difference",style:{left:`${w.saturation*100}%`}}),p.jsx("div",{className:"pointer-events-none absolute left-0 h-px w-full -translate-y-1/2 bg-white/70 shadow-[0_0_0_1px_rgba(0,0,0,0.45)] mix-blend-difference",style:{top:`${(1-w.value)*100}%`}}),p.jsx("div",{className:"pointer-events-none absolute h-6 w-6 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.85),0_8px_18px_rgba(0,0,0,0.45)]",style:{left:`${w.saturation*100}%`,top:`${(1-w.value)*100}%`,backgroundColor:$}})]}),p.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[p.jsx("div",{className:"h-9 w-9 flex-shrink-0 rounded-xl border border-neutral-600 shadow-[inset_0_1px_0_rgba(255,255,255,0.08)]",style:{backgroundColor:M}}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:M}),p.jsxs("div",{className:"mt-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-600",children:["S ",V,"% · B ",A,"% · A ",Q,"%"]})]})]}),p.jsx(q5,{label:"Hue",value:w.hue,min:0,max:360,step:1,displayValue:`${Math.round(w.hue)}°`,background:"linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)",thumbColor:k,disabled:t,onCommit:L=>j({hue:L})}),p.jsx(q5,{label:"Alpha",value:m.alpha,min:0,max:1,step:.01,displayValue:`${Q}%`,background:`linear-gradient(90deg, transparent, ${$})`,thumbColor:M,disabled:t,onCommit:L=>N({...m,alpha:L})}),p.jsxs("label",{className:"grid gap-1.5",children:[p.jsx("span",{className:hr,children:"Hex"}),p.jsx("input",{value:x,onChange:L=>K(L.target.value),className:`${ks} h-10 w-full text-[11px] font-medium outline-none`,spellCheck:!1})]})]})]}),document.body):null,ie=()=>{t||(c(L=>!L),a||requestAnimationFrame(T))};return p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:n}),p.jsxs("button",{type:"button",disabled:t,"aria-label":`Pick ${n.toLowerCase()} color`,ref:i,onClick:ie,className:`${ks} flex items-center gap-3 text-left hover:border-neutral-700 disabled:cursor-not-allowed ${a?"border-neutral-600":""}`,children:[p.jsx("div",{className:"relative h-7 w-7 flex-shrink-0 overflow-hidden rounded-lg border border-neutral-700 bg-neutral-950 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]",style:{backgroundColor:e||"transparent"}}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-neutral-100",children:e})]}),ae]})}function q5({label:n,value:e,min:t,max:r,step:i,displayValue:s,background:a,thumbColor:c,disabled:u,onCommit:h}){const m=d.useRef(null),O=(e-t)/(r-t)*100,x=w=>{var V;const k=(V=m.current)==null?void 0:V.getBoundingClientRect();if(!k||k.width<=0)return;const $=t+(w-k.left)/k.width*(r-t),M=Math.round($/i)*i;h(Math.max(t,Math.min(r,M)))},v=w=>{h(Math.max(t,Math.min(r,w)))};return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:hr,children:n}),p.jsx("span",{className:"text-[10px] font-medium text-neutral-400",children:s})]}),p.jsx("div",{ref:m,role:"slider",tabIndex:u?-1:0,"aria-label":n,"aria-valuemin":t,"aria-valuemax":r,"aria-valuenow":e,"aria-disabled":u,className:`relative h-4 rounded-full border border-neutral-700 shadow-[inset_0_1px_2px_rgba(0,0,0,0.55)] outline-none focus:border-[#f5a400] focus:ring-2 focus:ring-[#f5a400]/40 ${u?"cursor-not-allowed opacity-50":"cursor-ew-resize"}`,style:{background:a},onPointerDown:w=>{u||(w.currentTarget.setPointerCapture(w.pointerId),x(w.clientX))},onPointerMove:w=>{u||w.buttons!==1||x(w.clientX)},onKeyDown:w=>{u||(w.key==="ArrowRight"||w.key==="ArrowUp"?(w.preventDefault(),v(e+i)):w.key==="ArrowLeft"||w.key==="ArrowDown"?(w.preventDefault(),v(e-i)):w.key==="Home"?(w.preventDefault(),v(t)):w.key==="End"&&(w.preventDefault(),v(r)))},children:p.jsx("div",{className:"pointer-events-none absolute top-1/2 h-6 w-6 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.85),0_6px_14px_rgba(0,0,0,0.5)]",style:{left:`${Math.max(0,Math.min(100,O))}%`,backgroundColor:c}})})]})}function vV({projectId:n,sourceFile:e,value:t,assets:r,disabled:i,onCommit:s,onImportAssets:a}){const c=d.useRef(null),[u,h]=d.useState(!1),m=d.useMemo(()=>r.filter(w=>yu.test(w)),[r]),O=d.useMemo(()=>hV(t,e,m),[m,e,t]),x=O?"":t,v=async w=>{if(!(!(w!=null&&w.length)||!a)){h(!0);try{const $=(await a(w)).find(M=>yu.test(M));$&&s(`url("${D5($)}")`)}finally{h(!1)}}};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2",children:[p.jsx("span",{className:hr,children:"Project asset"}),p.jsxs("button",{type:"button",disabled:i||u,onClick:()=>{var w;return(w=c.current)==null?void 0:w.click()},className:`inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors ${i||u?"cursor-not-allowed text-neutral-600":"cursor-pointer hover:border-neutral-600 hover:text-white"}`,children:[p.jsx(Hg,{size:12,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:u?"Uploading…":"Upload image"})]}),p.jsx("input",{ref:c,type:"file",accept:"image/*","aria-label":"Upload image asset",disabled:i||u,className:"hidden",onChange:async w=>{await v(w.target.files),w.target.value=""}})]}),m.length>0?p.jsxs("div",{className:"space-y-3",children:[O&&p.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-800 bg-neutral-900/80",children:p.jsx("img",{src:`/api/projects/${n}/preview/${O}`,alt:O.split("/").pop()??O,className:"h-28 w-full object-contain bg-neutral-950/80"})}),p.jsx("div",{className:ks,children:p.jsxs("select",{value:O??"",disabled:i,onChange:w=>{const k=w.target.value;if(!k){s("none");return}s(`url("${D5(k)}")`)},className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:[p.jsx("option",{value:"",children:"None"}),m.map(w=>p.jsx("option",{value:w,children:w},w))]})})]}):p.jsx("div",{className:"rounded-xl border border-dashed border-neutral-800 bg-neutral-900/50 px-3 py-3 text-[11px] leading-5 text-neutral-500",children:"No image assets yet. Upload one here and Studio will also add it to the Assets tab."})]}),p.jsx(iO,{label:"External URL",value:x,disabled:i,onCommit:w=>s(w.trim()?`url("${w.trim()}")`:"none")})]})}function bV({value:n,fallbackColor:e,disabled:t,onCommit:r}){const i=d.useRef(null),s=VN(n)??V2(e),a=x=>r(Rd(x)),c=x=>a({...s,...x}),u=(x,v)=>{const w=s.stops.map((k,$)=>$===x?{...k,...v}:k);a({...s,stops:w})},h=x=>{var w,k;const v=x!=null?O5(s,x):O5(s,((w=s.stops.at(-1))==null?void 0:w.position)!=null?Math.min(100,(((k=s.stops.at(-1))==null?void 0:k.position)??90)+10):100);a(v)},m=x=>{s.stops.length<=2||a({...s,stops:s.stops.filter((v,w)=>w!==x)})},O={backgroundImage:Rd(s)};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:`${ks} space-y-3 p-3`,children:[p.jsx("div",{ref:i,className:"relative h-11 overflow-hidden rounded-lg border border-neutral-700",style:O,onClick:x=>{var k;if(t)return;const v=(k=i.current)==null?void 0:k.getBoundingClientRect();if(!v||v.width<=0)return;const w=(x.clientX-v.left)/v.width*100;h(w)},children:s.stops.map((x,v)=>p.jsx("div",{className:"absolute top-1/2 h-4 w-4 -translate-y-1/2 rounded-full border-2 border-white/90 shadow-[0_0_0_1px_rgba(0,0,0,0.35)]",style:{left:`calc(${x.position}% - 8px)`,backgroundColor:x.color}},`stop-preview-${v}`))}),p.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[p.jsx(U2,{disabled:t,value:s.kind,onChange:x=>c({kind:x}),options:[{label:"Linear",value:"linear"},{label:"Radial",value:"radial"},{label:"Conic",value:"conic"}]}),p.jsxs("label",{className:"flex items-center gap-2 text-[11px] font-medium text-neutral-400",children:[p.jsx("input",{type:"checkbox",checked:s.repeating,disabled:t,onChange:x=>c({repeating:x.target.checked}),className:"h-4 w-4 rounded border-neutral-700 bg-neutral-950 text-[#3ce6ac] focus:ring-[#3ce6ac]"}),"Repeat"]}),p.jsxs("button",{type:"button",disabled:t,onClick:()=>a({...s,stops:[...s.stops].reverse().map(x=>({...x,position:100-x.position}))}),className:"inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-600",children:[p.jsx(lf,{size:12}),"Reverse"]})]})]}),(s.kind==="linear"||s.kind==="conic")&&p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("span",{className:hr,children:s.kind==="linear"?"Angle":"Start angle"}),p.jsx(No,{value:s.angle,min:0,max:360,step:1,disabled:t,displayValue:`${Math.round(s.angle)}°`,formatDisplayValue:x=>`${Math.round(x)}°`,onCommit:x=>c({angle:x})})]}),s.kind==="radial"&&p.jsxs("div",{className:Ri,children:[p.jsx(xi,{label:"Shape",value:s.shape,disabled:t,onChange:x=>c({shape:x}),options:["ellipse","circle"]}),p.jsx(xi,{label:"Size",value:s.radialSize,disabled:t,onChange:x=>c({radialSize:x}),options:["closest-side","closest-corner","farthest-side","farthest-corner"]})]}),(s.kind==="radial"||s.kind==="conic")&&p.jsxs("div",{className:Ri,children:[p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Center X"}),p.jsx(No,{value:s.centerX,min:0,max:100,step:1,disabled:t,displayValue:`${Math.round(s.centerX)}%`,formatDisplayValue:x=>`${Math.round(x)}%`,onCommit:x=>c({centerX:x})})]}),p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Center Y"}),p.jsx(No,{value:s.centerY,min:0,max:100,step:1,disabled:t,displayValue:`${Math.round(s.centerY)}%`,formatDisplayValue:x=>`${Math.round(x)}%`,onCommit:x=>c({centerY:x})})]})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:hr,children:"Stops"}),p.jsxs("button",{type:"button",disabled:t||s.stops.length>=6,onClick:()=>h(),className:"inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-600",children:[p.jsx(Hg,{size:12}),"Add stop"]})]}),p.jsx("div",{className:"space-y-3",children:s.stops.map((x,v)=>p.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_68px_28px] gap-2",children:[p.jsx(wl,{label:`Stop ${v+1}`,value:x.color,disabled:t,onCommit:w=>u(v,{color:w})}),p.jsx(iO,{label:"Pos",value:`${Math.round(x.position)}%`,disabled:t,onCommit:w=>u(v,{position:Number.parseFloat(w.replace("%",""))||0})}),p.jsx("button",{type:"button",disabled:t||s.stops.length<=2,onClick:()=>m(v),className:"mt-[22px] flex h-10 items-center justify-center rounded-lg border border-neutral-700 bg-neutral-950 text-neutral-400 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-700","aria-label":`Remove stop ${v+1}`,children:p.jsx(af,{size:12})})]},`stop-editor-${v}`))})]})]})}function No({value:n,min:e,max:t,step:r,displayValue:i,formatDisplayValue:s,disabled:a,onCommit:c}){const[u,h]=d.useState(n),m=d.useRef(null),O=d.useRef(n);O.current=n,d.useEffect(()=>{h(n)},[n]),d.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const x=k=>{m.current&&clearTimeout(m.current),k!==O.current&&c(k)},v=k=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{k!==O.current&&c(k)},40)},w=(s==null?void 0:s(u))??i;return p.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2",children:[p.jsx("input",{type:"range",min:e,max:t,step:r,value:u,disabled:a,onChange:k=>{const $=Number(k.target.value);h($),v($)},onMouseUp:()=>x(u),onTouchEnd:()=>x(u),onBlur:()=>x(u),className:"h-2 min-w-0 w-full cursor-pointer appearance-none rounded-full bg-neutral-800 accent-[#3ce6ac] disabled:cursor-not-allowed"}),p.jsx("div",{className:"min-w-[52px] rounded-xl border border-neutral-800 bg-neutral-900 px-2 py-2 text-right text-[11px] font-medium text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",children:w})]})}function U2({options:n,value:e,disabled:t,onChange:r}){return p.jsx("div",{className:"grid min-w-0 gap-1 rounded-xl bg-neutral-900 p-1 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",style:{gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map(i=>{const s=i.value===e;return p.jsx("button",{type:"button",disabled:t,onClick:()=>r(i.value),className:`min-w-0 truncate rounded-lg px-2 py-1.5 text-[11px] font-medium transition-colors disabled:cursor-not-allowed ${s?"bg-neutral-800 text-white shadow-[0_1px_3px_rgba(0,0,0,0.28)]":"text-neutral-500 hover:text-neutral-200"}`,children:i.label},i.value)})})}function xi({label:n,value:e,disabled:t,options:r,onChange:i}){const s=e&&!r.includes(e)?[e,...r]:r;return p.jsxs("label",{className:`${ks} flex items-center gap-3`,children:[p.jsx("span",{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500",children:n}),p.jsx("select",{value:e,disabled:t,onChange:a=>i(a.target.value),className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:s.map(a=>p.jsx("option",{value:a,children:a},a))})]})}function Xs({title:n,icon:e,children:t,accessory:r}){return p.jsxs("section",{className:"min-w-0 border-t border-neutral-800/80 px-4 py-4",children:[p.jsxs("div",{className:"mb-3 flex min-w-0 flex-wrap items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[p.jsx("span",{className:"flex-shrink-0 text-neutral-500",children:e}),p.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-neutral-300",children:n})]}),r]}),t]})}const wV=d.memo(function({projectId:e,assets:t,element:r,multiSelectCount:i=0,copiedAgentPrompt:s,onClearSelection:a,onSetStyle:c,onSetManualOffset:u,onSetManualSize:h,onSetText:m,onSetTextFieldStyle:O,onAddTextField:x,onRemoveTextField:v,onResetManualEdits:w,onAskAgent:k,onImportAssets:$,fontAssets:M=[],onImportFonts:V}){var Ue;const A=(r==null?void 0:r.computedStyles)??JL,Q=A["background-image"]??"none",T=Q&&Q!=="none"?Q.includes("gradient")?"Gradient":"Image":"Solid",[N,j]=d.useState(T),W=dV(Q),[K,ae]=d.useState(((Ue=r==null?void 0:r.textFields[0])==null?void 0:Ue.key)??null),ie=r!=null&&SS(r);if(d.useEffect(()=>{j(T)},[T,r==null?void 0:r.id,r==null?void 0:r.selector,Q]),d.useEffect(()=>{const ce=(r==null?void 0:r.textFields)??[];ae(je=>{var Se;return je&&ce.some(Me=>Me.key===je)?je:((Se=ce[0])==null?void 0:Se.key)??null})},[r==null?void 0:r.id,r==null?void 0:r.selector,r==null?void 0:r.textFields]),!r)return p.jsx("div",{className:"flex h-full flex-col items-center justify-center bg-neutral-900 px-6 text-center",children:i>1?p.jsxs(p.Fragment,{children:[p.jsx(Up,{size:18,className:"mb-3 text-neutral-600"}),p.jsxs("p",{className:"text-sm font-medium text-neutral-200",children:[i," elements selected"]}),p.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"Select a single element to edit its properties. Click an element in the preview or use the timeline layer panel."})]}):p.jsxs(p.Fragment,{children:[p.jsx(t5,{size:18,className:"mb-3 text-neutral-600"}),p.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Select an element in the preview."}),p.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"The inspector is tuned for element edits with safer geometry controls, color picking, and cleaner grouped layer controls."})]})});const L=!r.capabilities.canEditStyles,le=!r.capabilities.canApplyManualOffset,ye=!r.capabilities.canApplyManualSize,Oe=A.display==="flex"||A.display==="inline-flex",$e=R5(A["border-radius"])??0,pe=Math.round((R5(A.opacity)??1)*100),D=Eo(A["border-width"]??"")??Eo(A["border-top-width"]??"")??0,z=A["border-style"]||A["border-top-style"]||"none",q=A["border-color"]||A["border-top-color"]||"rgba(255, 255, 255, 0.18)",E=rV(A["box-shadow"]),X=L5(A.filter,"blur"),ee=L5(A["backdrop-filter"],"blur"),Ce=A["clip-path"]||"none",Te=sV(Ce),tt=oV(Ce),De=r.id?`#${r.id}`:r.selector,G=r.capabilities.canEditStyles,oe=z2(r.element),fe=Ld(r.element),Ee=fe.width>0?fe.width:Eo(A.width??"")??r.boundingBox.width,Le=fe.height>0?fe.height:Eo(A.height??"")??r.boundingBox.height,Fe=(ce,je)=>{const Se=Eo(je);if(Se==null)return;const Me=z2(r.element);u(r,{x:ce==="x"?Se:Me.x,y:ce==="y"?Se:Me.y})},Ve=(ce,je)=>{const Se=Eo(je);if(Se==null||Se<=0)return;const Me=Ld(r.element),ct=Me.width>0?Me.width:Eo(A.width??"")??r.boundingBox.width,fn=Me.height>0?Me.height:Eo(A.height??"")??r.boundingBox.height;h(r,{width:ce==="width"?Se:ct,height:ce==="height"?Se:fn})},qe=ce=>{if(j(ce),ce==="Solid"){c("background-image","none");return}ce==="Gradient"&&!Q.includes("gradient")&&c("background-image",Rd(V2(A["background-color"])))};return p.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-900 text-neutral-100",children:[p.jsxs("div",{className:"border-b border-neutral-800 px-4 py-5",children:[p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:hr,children:"Document"}),p.jsx("div",{className:"mt-3 truncate text-[12px] font-semibold text-neutral-100",children:r.label}),p.jsx("div",{className:"mt-1 truncate text-[11px] text-neutral-500",children:De})]}),p.jsx("button",{type:"button","aria-label":"Clear selection",onClick:a,className:"flex h-9 w-9 items-center justify-center rounded-full border border-neutral-700 bg-neutral-950 text-neutral-500 shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-colors hover:border-neutral-600 hover:text-neutral-200",children:p.jsx(af,{size:13})})]}),p.jsxs("div",{className:"mt-4 flex min-w-0 flex-wrap items-center gap-2",children:[p.jsxs("button",{type:"button",onClick:k,className:"inline-flex h-8 items-center justify-center gap-2 rounded-xl border border-neutral-700 bg-neutral-950 px-3.5 text-[11px] font-medium text-neutral-100 transition-colors hover:border-studio-accent/40 hover:text-studio-accent",children:[p.jsx(lR,{size:15}),p.jsx("span",{children:s?"Prompt copied":"Ask agent"})]}),p.jsxs("button",{type:"button",onClick:()=>w(r),title:"Reset move, size, and rotation edits",className:"inline-flex h-8 items-center justify-center gap-2 rounded-xl border border-neutral-700 bg-neutral-950 px-3.5 text-[11px] font-medium text-neutral-100 transition-colors hover:border-neutral-500 hover:text-white",children:[p.jsx(lf,{size:14}),p.jsx("span",{children:"Reset edits"})]})]})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto",children:[ie&&p.jsx(Xs,{title:"Text",icon:p.jsx(fR,{size:15}),children:(()=>{const ce=r.textFields,je=ce.find(Se=>Se.key===K)??ce[0];return je?ce.length===1?p.jsxs("div",{className:"space-y-4 rounded-xl border border-neutral-800 bg-neutral-900/60 p-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:mm(je.value)||"Text"}),p.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:je.tagName})]}),p.jsx(I5,{label:"Content",value:je.value,disabled:!1,onCommit:Se=>m(Se,je.key)},je.key),p.jsx(wl,{label:"Text color",value:gm(je,A),disabled:!1,onCommit:Se=>O(je.key,"color",Se)}),p.jsxs("div",{className:Ri,children:[p.jsx(Hs,{label:"Size",value:je.computedStyles["font-size"]||A["font-size"]||"16px",disabled:!1,liveCommit:!0,onCommit:Se=>O(je.key,"font-size",Se)}),p.jsx(W5,{value:je.computedStyles["font-weight"]||A["font-weight"]||"400",disabled:!1,onCommit:Se=>O(je.key,"font-weight",Se)})]}),p.jsx(B5,{value:je.computedStyles["font-family"]||A["font-family"]||"inherit",disabled:!1,importedFonts:M,onImportFonts:V,onCommit:Se=>O(je.key,"font-family",Se)}),p.jsx(Y5,{field:je,inheritedStyles:A,disabled:!1,onCommit:(Se,Me)=>O(je.key,Se,Me)})]}):p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"grid gap-1.5",children:[p.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2",children:[p.jsx("span",{className:hr,children:"Text layers"}),p.jsxs("button",{type:"button",onClick:()=>{Promise.resolve(x(je.key)).then(Se=>{Se&&ae(Se)})},className:"inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white",children:[p.jsx(Hg,{size:12,className:"flex-shrink-0"}),p.jsx("span",{className:"truncate",children:"Add text"})]})]}),p.jsx("div",{className:"grid gap-2",children:ce.map((Se,Me)=>{const ct=Se.key===je.key;return p.jsx("button",{type:"button",onClick:()=>ae(Se.key),className:`min-w-0 w-full rounded-xl border px-3 py-2 text-left transition-colors ${ct?"border-studio-accent/50 bg-studio-accent/10":"border-neutral-800 bg-neutral-900/80 hover:border-neutral-700 hover:bg-neutral-900"}`,children:p.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[p.jsx("span",{className:"h-4 w-4 flex-shrink-0 rounded border border-neutral-700 bg-neutral-950",style:{backgroundColor:gm(Se,A)}}),p.jsx("span",{className:"min-w-0 truncate text-[11px] font-medium text-neutral-100",children:mm(Se.value)||`Text ${Me+1}`})]}),p.jsx("span",{className:"flex-shrink-0 rounded-md border border-neutral-700 bg-neutral-950 px-1.5 py-0.5 text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:Se.tagName})]})},Se.key)})})]}),p.jsxs("div",{className:"space-y-4 rounded-xl border border-neutral-800 bg-neutral-900/60 p-3",children:[p.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:mm(je.value)||"Text"}),p.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:je.tagName})]}),p.jsx("button",{type:"button",onClick:()=>v(je.key),className:"inline-flex h-7 flex-shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white",children:"Remove"})]}),p.jsx(I5,{label:"Content",value:je.value,disabled:!1,autoFocus:!0,onCommit:Se=>m(Se,je.key)},je.key),p.jsx(wl,{label:"Text color",value:gm(je,A),disabled:!1,onCommit:Se=>O(je.key,"color",Se)}),p.jsxs("div",{className:Ri,children:[p.jsx(Hs,{label:"Size",value:je.computedStyles["font-size"]||"16px",disabled:!1,liveCommit:!0,onCommit:Se=>O(je.key,"font-size",Se)}),p.jsx(W5,{value:je.computedStyles["font-weight"]||"400",disabled:!1,onCommit:Se=>O(je.key,"font-weight",Se)})]}),p.jsx(B5,{value:je.computedStyles["font-family"]||A["font-family"]||"inherit",disabled:!1,importedFonts:M,onImportFonts:V,onCommit:Se=>O(je.key,"font-family",Se)}),p.jsx(Y5,{field:je,inheritedStyles:A,disabled:!1,onCommit:(Se,Me)=>O(je.key,Se,Me)})]})]}):null})()}),p.jsx(Xs,{title:"Layout",icon:p.jsx(cR,{size:15}),children:p.jsxs("div",{className:Ri,children:[p.jsx(Hs,{label:"X",value:gl(oe.x),disabled:le,onCommit:ce=>Fe("x",ce)}),p.jsx(Hs,{label:"Y",value:gl(oe.y),disabled:le,onCommit:ce=>Fe("y",ce)}),p.jsx(Hs,{label:"W",value:gl(Ee),disabled:ye,onCommit:ce=>Ve("width",ce)}),p.jsx(Hs,{label:"H",value:gl(Le),disabled:ye,onCommit:ce=>Ve("height",ce)})]})}),G&&Oe&&p.jsx(Xs,{title:"Flex",icon:p.jsx(Up,{size:15}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(U2,{disabled:L,value:A["flex-direction"]||"row",onChange:ce=>c("flex-direction",ce),options:[{label:"→ Row",value:"row"},{label:"↓ Column",value:"column"}]}),p.jsxs("div",{className:Ri,children:[p.jsx(xi,{label:"Justify",value:A["justify-content"]||"flex-start",disabled:L,onChange:ce=>c("justify-content",ce),options:["flex-start","center","space-between","space-around","space-evenly","flex-end"]}),p.jsx(xi,{label:"Align",value:A["align-items"]||"stretch",disabled:L,onChange:ce=>c("align-items",ce),options:["stretch","flex-start","center","flex-end","baseline"]})]}),p.jsx(iO,{label:"Gap",value:A.gap??"0px",disabled:L,onCommit:ce=>c("gap",ce.endsWith("px")?ce:`${ce}px`)})]})}),G&&p.jsxs(p.Fragment,{children:[p.jsx(Xs,{title:"Radius",icon:p.jsx(OR,{size:15}),children:p.jsx(No,{value:$e,min:0,max:Math.max(240,Math.ceil($e)),step:1,disabled:L,displayValue:`${En($e)}px`,formatDisplayValue:ce=>`${En(ce)}px`,onCommit:ce=>c("border-radius",`${En(ce)}px`)})}),p.jsx(Xs,{title:"Stroke",icon:p.jsx(dR,{size:15}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:Ri,children:[p.jsx(Hs,{label:"Width",value:gl(D),disabled:L,liveCommit:!0,onCommit:async ce=>{const je=tV(ce,{min:0,max:200,fallback:D});if(je)for(const[Se,Me]of aV(je,z))await c(Se,Me)}}),p.jsx(xi,{label:"Style",value:z,disabled:L,onChange:async ce=>{for(const[je,Se]of lV(ce,gl(D)))await c(je,Se)},options:["none","solid","dashed","dotted","double","hidden","groove","ridge","inset","outset"]})]}),p.jsx(wl,{label:"Stroke color",value:q,disabled:L,onCommit:ce=>c("border-color",ce)})]})}),p.jsx(Xs,{title:"Effects",icon:p.jsx(Wg,{size:15}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(xi,{label:"Shadow",value:E,disabled:L,onChange:ce=>{ce!=="custom"&&c("box-shadow",iV(ce,A["box-shadow"]))},options:["custom","none","soft","lift","glow"]}),p.jsxs("div",{className:Ri,children:[p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Layer blur"}),p.jsx(No,{value:X,min:0,max:Math.max(40,Math.ceil(X)),step:1,disabled:L,displayValue:`${En(X)}px`,formatDisplayValue:ce=>`${En(ce)}px`,onCommit:ce=>c("filter",V5(A.filter,"blur",ce))})]}),p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Backdrop"}),p.jsx(No,{value:ee,min:0,max:Math.max(60,Math.ceil(ee)),step:1,disabled:L,displayValue:`${En(ee)}px`,formatDisplayValue:ce=>`${En(ce)}px`,onCommit:ce=>c("backdrop-filter",V5(A["backdrop-filter"],"blur",ce))})]})]})]})}),p.jsx(Xs,{title:"Clip",icon:p.jsx(Up,{size:15}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:Ri,children:[p.jsx(xi,{label:"Overflow",value:A.overflow||"visible",disabled:L,onChange:ce=>c("overflow",ce),options:["visible","hidden","clip","auto","scroll"]}),p.jsx(xi,{label:"Mask",value:Te,disabled:L,onChange:ce=>{ce!=="custom"&&c("clip-path",cV(ce,$e,Ce))},options:["custom","none","inset","circle"]})]}),p.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:hr,children:"Mask inset"}),p.jsx(No,{value:tt,min:0,max:Math.max(120,Math.ceil(tt)),step:1,disabled:L,displayValue:`${En(tt)}px`,formatDisplayValue:ce=>`${En(ce)}px`,onCommit:ce=>c("clip-path",uV(ce,$e))})]})]})}),p.jsx(Xs,{title:"Transparency",icon:p.jsx(t5,{size:15}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(No,{value:pe,min:0,max:100,step:1,disabled:L,displayValue:`${pe}%`,formatDisplayValue:ce=>`${Math.round(ce)}%`,onCommit:ce=>c("opacity",En(ce/100))}),p.jsx(xi,{label:"Mode",value:A["mix-blend-mode"]||"normal",disabled:L,onChange:ce=>c("mix-blend-mode",ce),options:["normal","multiply","screen","overlay","darken","lighten"]})]})}),p.jsx(Xs,{title:"Fill",icon:p.jsx(uR,{size:15}),accessory:p.jsx("div",{className:"rounded-full border border-neutral-700 bg-neutral-900 px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-400",children:N}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(U2,{disabled:L,value:N,onChange:qe,options:[{label:"Solid",value:"Solid"},{label:"Gradient",value:"Gradient"},{label:"Image",value:"Image"}]}),N==="Solid"?p.jsx(wl,{label:"Fill color",value:A["background-color"]??"transparent",disabled:L,onCommit:ce=>c("background-color",ce)}):N==="Gradient"?p.jsx(bV,{value:Q!=="none"?Q:Rd(V2(A["background-color"])),fallbackColor:A["background-color"],disabled:L,onCommit:ce=>c("background-image",ce)}):p.jsx(vV,{projectId:e,sourceFile:r.sourceFile,value:W,assets:t,disabled:L,onCommit:ce=>c("background-image",ce),onImportAssets:$}),!ie&&p.jsx(wl,{label:"Text color",value:A.color??"rgb(0, 0, 0)",disabled:L,onCommit:ce=>c("color",ce)})]})})]})]})]})}),Zo=".hyperframes/studio-motion.json",xm="studio-motion",Lu="data-hf-studio-motion",G2="data-hf-studio-motion-original-transform",K2="data-hf-studio-motion-original-opacity",J2="data-hf-studio-motion-original-visibility",Q1=["none","power1.in","power1.out","power1.inOut","power2.in","power2.out","power2.inOut","power3.in","power3.out","power3.inOut","power4.in","power4.out","power4.inOut","sine.in","sine.out","sine.inOut","expo.in","expo.out","expo.inOut","circ.in","circ.out","circ.inOut","back.in(1.7)","back.out(1.7)","back.inOut(1.7)","elastic.out(1, 0.45)","bounce.out"],au={x1:.215,y1:.61,x2:.355,y2:1},SV={none:{x1:0,y1:0,x2:1,y2:1},"power1.in":{x1:.55,y1:.085,x2:.68,y2:.53},"power1.out":{x1:.25,y1:.46,x2:.45,y2:.94},"power1.inOut":{x1:.455,y1:.03,x2:.515,y2:.955},"power2.in":{x1:.55,y1:.055,x2:.675,y2:.19},"power2.out":{x1:.215,y1:.61,x2:.355,y2:1},"power2.inOut":{x1:.645,y1:.045,x2:.355,y2:1},"power3.in":{x1:.895,y1:.03,x2:.685,y2:.22},"power3.out":{x1:.165,y1:.84,x2:.44,y2:1},"power3.inOut":{x1:.77,y1:0,x2:.175,y2:1},"power4.in":{x1:.755,y1:.05,x2:.855,y2:.06},"power4.out":{x1:.23,y1:1,x2:.32,y2:1},"power4.inOut":{x1:.86,y1:0,x2:.07,y2:1},"sine.in":{x1:.47,y1:0,x2:.745,y2:.715},"sine.out":{x1:.39,y1:.575,x2:.565,y2:1},"sine.inOut":{x1:.445,y1:.05,x2:.55,y2:.95},"expo.in":{x1:.95,y1:.05,x2:.795,y2:.035},"expo.out":{x1:.19,y1:1,x2:.22,y2:1},"expo.inOut":{x1:1,y1:0,x2:0,y2:1},"circ.in":{x1:.6,y1:.04,x2:.98,y2:.335},"circ.out":{x1:.075,y1:.82,x2:.165,y2:1},"circ.inOut":{x1:.785,y1:.135,x2:.15,y2:.86},"back.in(1.7)":{x1:.6,y1:-.28,x2:.735,y2:.045},"back.out(1.7)":{x1:.175,y1:.885,x2:.32,y2:1.275},"back.inOut(1.7)":{x1:.68,y1:-.55,x2:.265,y2:1.55},"elastic.out(1, 0.45)":{x1:.16,y1:1.32,x2:.28,y2:.86},"bounce.out":{x1:.34,y1:1.56,x2:.64,y2:.74}},kV=/^M\s*0\s*,\s*0\s*C\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s+1\s*,\s*1\s*$/i;function jl(){return{version:1,motions:[]}}function U5(n,e){return Number.isFinite(n)&&n>0?n:e}function PV(n,e){return Number.isFinite(n)&&n>=0?n:e}function AV(n){return n.trim()||"none"}function lu(n){return Math.round(n*1e3)/1e3}function j1(n,e,t,r){return Number.isFinite(n)?Math.min(t,Math.max(e,n)):r}function sO(n){return{x1:lu(j1(n.x1??au.x1,0,1,.215)),y1:lu(j1(n.y1??au.y1,-.6,1.6,.61)),x2:lu(j1(n.x2??au.x2,0,1,.355)),y2:lu(j1(n.y2??au.y2,-.6,1.6,1))}}function G5(n){if(!n)return null;const e=n.trim().match(kV);if(!e)return null;const t={x1:Number.parseFloat(e[1]??""),y1:Number.parseFloat(e[2]??""),x2:Number.parseFloat(e[3]??""),y2:Number.parseFloat(e[4]??"")};return Object.values(t).every(Number.isFinite)?sO(t):null}function Z1(n){const e=lu(n);return Object.is(e,-0)?"0":`${e}`}function IS(n){const e=sO(n);return`M0,0 C${Z1(e.x1)},${Z1(e.y1)} ${Z1(e.x2)},${Z1(e.y2)} 1,1`}function XS(n){return SV[n]??au}function $V(n,e){const t=PV(e.start,0),r=U5(e.duration,.6),i=U5(e.distance,32),s=AV(e.ease),a=e.direction??"up",c={start:t,duration:r,ease:s,customEase:e.customEase};if(n==="pop")return{...c,from:{scale:.88,autoAlpha:0},to:{scale:1,autoAlpha:1}};if(n==="slide"){const u=a==="right"?-i:a==="left"?i:0,h=a==="down"?-i:a==="up"?i:0;return{...c,from:{x:u,y:h,autoAlpha:0},to:{x:0,y:0,autoAlpha:1}}}return{...c,from:{y:a==="down"?-i:i,autoAlpha:0},to:{y:0,autoAlpha:1}}}function _d(n){return typeof n=="number"&&Number.isFinite(n)?n:null}function K5(n){if(!n||typeof n!="object")return null;const e=n,t={};for(const r of["x","y","scale","rotation","opacity","autoAlpha"]){const i=_d(e[r]);i!=null&&(t[r]=i)}return Object.keys(t).length>0?t:null}function CV(n){if(!n||typeof n!="object")return null;const e=n,t=typeof e.sourceFile=="string"?e.sourceFile:"";if(!t)return null;const r=typeof e.selector=="string"?e.selector:void 0,i=typeof e.id=="string"?e.id:void 0;return!r&&!i?null:{sourceFile:t,selector:r,selectorIndex:_d(e.selectorIndex)??void 0,id:i}}function EV(n){if(!n||typeof n!="object")return;const e=n,t=typeof e.id=="string"?e.id.trim():"",r=typeof e.data=="string"?e.data.trim():"";if(!(!t||!r))return{id:t,data:r}}function TV(n){if(!n||typeof n!="object")return null;const e=n;if(e.kind!=="gsap-motion")return null;const t=CV(e.target);if(!t)return null;const r=_d(e.start),i=_d(e.duration);if(r==null||i==null||r<0||i<=0)return null;const s=typeof e.ease=="string"&&e.ease.trim()?e.ease.trim():"none",a=K5(e.from),c=K5(e.to);return!a||!c?null:{kind:"gsap-motion",target:t,start:r,duration:i,ease:s,customEase:EV(e.customEase),from:a,to:c,updatedAt:typeof e.updatedAt=="string"?e.updatedAt:void 0}}function J5(n){if(!n.trim())return jl();try{const e=JSON.parse(n);if(!e||typeof e!="object")return jl();const t=e.motions;return Array.isArray(t)?{version:1,motions:t.map(TV).filter(r=>r!==null)}:jl()}catch{return jl()}}function ym(n){return`${JSON.stringify(n,null,2)}
|
|
91
|
-
`}function MV(n){return n.trim().replace(/\\/g,"/").replace(/^\.?\//,"")}function QV(n){if(!n)return!1;const e=MV(n);return e===Zo||e.endsWith(`/${Zo}`)}function FS(n){return{sourceFile:n.sourceFile||"index.html",selector:n.selector,selectorIndex:n.selectorIndex,id:n.id??void 0}}function Dd(n){return[n.sourceFile,n.id?`id:${n.id}`:"",n.selector?`selector:${n.selector}`:"",n.selectorIndex!=null?`index:${n.selectorIndex}`:""].join("|")}function zS(n,e){const t=FS(e);return n.target.sourceFile!==t.sourceFile?!1:n.target.id&&t.id&&n.target.id===t.id?!0:Dd(n.target)===Dd(t)}function jV(n,e,t){const r=FS(e),i={kind:"gsap-motion",target:r,...t,updatedAt:new Date().toISOString()};return{version:1,motions:[...n.motions.filter(s=>Dd(s.target)!==Dd(r)),i]}}function ZV(n,e){return{version:1,motions:n.motions.filter(t=>!zS(t,e))}}function RV(n,e){return n.motions.find(t=>zS(t,e))??null}function NV(n,e){let t=n;for(;t;){const r=t.getAttribute("data-composition-file")??t.getAttribute("data-composition-src");if(r)return r;t=t.parentElement}return e??"index.html"}function ey(n,e,t){return NV(n,t)===e}function LV(n,e){var i;const t=s=>{var c;const a=(c=s.ownerDocument.defaultView)==null?void 0:c.HTMLElement;return!!(a&&s instanceof a)},r=(i=e.match(/^\.([A-Za-z0-9_-]+)$/))==null?void 0:i[1];return r?Array.from(n.getElementsByTagName("*")).filter(s=>t(s)&&s.classList.contains(r)):/^[A-Za-z][A-Za-z0-9-]*$/.test(e)?Array.from(n.getElementsByTagName(e)).filter(t):Array.from(n.querySelectorAll(e)).filter(t)}function VV(n,e,t){var i;const r=(i=n.defaultView)==null?void 0:i.HTMLElement;if(e.id){const s=n.getElementById(e.id);if(r&&s instanceof r&&ey(s,e.sourceFile,t))return s}if(!e.selector)return null;try{return LV(n,e.selector).filter(a=>ey(a,e.sourceFile,t))[Math.max(0,Math.floor(e.selectorIndex??0))]??null}catch{return null}}function _V(n){n.hasAttribute(Lu)||(n.setAttribute(G2,n.style.transform),n.setAttribute(K2,n.style.opacity),n.setAttribute(J2,n.style.visibility))}function DV(n,e){var t;n.hasAttribute(Lu)&&((t=e==null?void 0:e.set)==null||t.call(e,n,{clearProps:"transform,opacity,visibility"}),n.style.transform=n.getAttribute(G2)??"",n.style.opacity=n.getAttribute(K2)??"",n.style.visibility=n.getAttribute(J2)??"",n.removeAttribute(Lu),n.removeAttribute(G2),n.removeAttribute(K2),n.removeAttribute(J2))}function IV(n,e){var r;const t=(r=n.defaultView)==null?void 0:r.HTMLElement;if(t)for(const i of Array.from(n.querySelectorAll(`[${Lu}]`)))i instanceof t&&DV(i,e)}function XV(n,e){var i,s;const t=e.customEase;if(!t)return e.ease;const r=n.CustomEase;if(typeof(r==null?void 0:r.create)!="function")return e.ease;try{return(s=(i=n.gsap)==null?void 0:i.registerPlugin)==null||s.call(i,r),r.create(t.id,t.data),t.id}catch{return e.ease}}function FV(n,e){var t,r,i,s;try{const a=(r=(t=n.__player)==null?void 0:t.getTime)==null?void 0:r.call(t);if(typeof a=="number"&&Number.isFinite(a))return Math.max(0,a)}catch{}try{const a=(s=(i=n.__timeline)==null?void 0:i.time)==null?void 0:s.call(i);if(typeof a=="number"&&Number.isFinite(a))return Math.max(0,a)}catch{}return 0}function zV(n,e,t=null,r){var h,m,O,x,v;const i=n.defaultView;if(!i)return 0;const s=i.gsap;if(i.__timelines=i.__timelines??{},(m=(h=i.__timelines[xm])==null?void 0:h.kill)==null||m.call(h),delete i.__timelines[xm],IV(n,s),!(s!=null&&s.timeline)||e.motions.length===0)return 0;const a=s.timeline({paused:!0,defaults:{overwrite:"auto"}});let c=0;for(const w of e.motions){const k=VV(n,w.target,t);if(!k||!a.fromTo)continue;_V(k),k.setAttribute(Lu,"true");const $={...w.from},M={...w.to,duration:w.duration,ease:XV(i,w),overwrite:"auto",immediateRender:!1};a.fromTo(k,$,M,w.start),c+=1}if(c===0)return(O=a.kill)==null||O.call(a),0;i.__timelines[xm]=a,(x=a.pause)==null||x.call(a);const u=FV(i);return a.totalTime?a.totalTime(u,!1):(v=a.time)==null||v.call(a,u),c}function HV(n,e){const t=n;if(t.__hfStudioMotionApply=()=>(e(),0),t.__hfStudioMotionWrapped)return!1;const r=t.__player;if(!r)return!1;const i=s=>{const a=r[s];typeof a=="function"&&(r[s]=c=>{var u;a.call(r,c),(u=t.__hfStudioMotionApply)==null||u.call(t)})};return i("renderSeek"),i("seek"),t.__hfStudioMotionWrapped=!0,!0}const HS="min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600",bf="text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",ty="grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3",WV=[{label:"Fade Up",value:"fade-up"},{label:"Slide",value:"slide"},{label:"Pop",value:"pop"}],BV=["up","down","left","right"];function ba(n){const e=Math.round(n*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function vm(n,e,t,r){return n==null||!Number.isFinite(n)?r:Math.min(t,Math.max(e,n))}function bm(n){const e=Number.parseFloat(n.trim());return Number.isFinite(e)?e:null}function YV(n){return n?Math.max(Math.abs(n.from.x??0),Math.abs(n.from.y??0),1):32}function qV(n){return n?n.from.scale!=null||n.to.scale!=null?"pop":n.from.x!=null||n.to.x!=null?"slide":"fade-up":"fade-up"}function UV(n){if(!n)return"up";const e=n.from.x??0,t=n.from.y??0;return Math.abs(e)>Math.abs(t)?e<0?"right":"left":t<0?"down":"up"}function ny(n){return`studio-${(n.id||n.selector||n.label||"layer").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"layer"}-ease`}function GV({value:n,disabled:e,onCommit:t}){const[r,i]=d.useState(n),s=d.useRef(!1);d.useEffect(()=>{s.current||i(n)},[n]);const a=()=>{s.current=!1;const c=r.trim();c!==n&&t(c)};return p.jsx("input",{type:"text",value:r,disabled:e,onFocus:()=>{s.current=!0},onChange:c=>i(c.target.value),onBlur:a,onKeyDown:c=>{c.key==="Enter"&&c.target.blur()},className:"w-full min-w-0 bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})}function R1({label:n,value:e,disabled:t,onCommit:r}){return p.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:bf,children:n}),p.jsx("div",{className:HS,children:p.jsx(GV,{value:e,disabled:t,onCommit:r})})]})}function KV({value:n,options:e,onChange:t}){return p.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-2xl border border-neutral-800 bg-neutral-950 p-1",children:e.map(r=>p.jsx("button",{type:"button",onClick:()=>t(r.value),className:`h-9 rounded-xl text-[11px] font-semibold transition-colors ${r.value===n?"bg-neutral-800 text-white shadow-sm":"text-neutral-500 hover:bg-neutral-900 hover:text-neutral-200"}`,children:r.label},r.value))})}function ry({label:n,value:e,options:t,onChange:r}){return p.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[p.jsx("span",{className:bf,children:n}),p.jsx("div",{className:HS,children:p.jsx("select",{value:e,onChange:i=>r(i.target.value),className:"w-full min-w-0 appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none",children:t.map(i=>p.jsx("option",{value:i,children:i},i))})})]})}function iy({title:n,children:e,accessory:t}){return p.jsxs("section",{className:"border-b border-neutral-800 px-4 py-5",children:[p.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Wg,{size:15,className:"text-neutral-500"}),p.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-neutral-300",children:n})]}),t]}),e]})}function JV(n,e){const t=1-n,r=t*t,i=n*n;return{x:3*r*n*e.x1+3*t*i*e.x2+i*n,y:3*r*n*e.y1+3*t*i*e.y2+i*n}}function e_(n,e){const t=[];for(let r=0;r<=48;r+=1){const i=e(JV(r/48,n));t.push(`${r===0?"M":"L"}${i.x.toFixed(2)},${i.y.toFixed(2)}`)}return t.join(" ")}function t_({points:n,onCommit:e}){const t=d.useRef(null),[r,i]=d.useState(n),s=d.useRef(null);d.useEffect(()=>{i(n)},[n]);const a=324,c=214,u={left:46,top:24,width:242,height:146},h=-.4,m=1.4,O=T=>({x:u.left+T.x*u.width,y:u.top+(m-T.y)/(m-h)*u.height}),x=T=>{var K;const N=(K=t.current)==null?void 0:K.getBoundingClientRect();if(!N)return null;const j=(T.clientX-N.left)/N.width*a,W=(T.clientY-N.top)/N.height*c;return sO({x1:s.current==="p1"?(j-u.left)/u.width:r.x1,y1:s.current==="p1"?m-(W-u.top)/u.height*(m-h):r.y1,x2:s.current==="p2"?(j-u.left)/u.width:r.x2,y2:s.current==="p2"?m-(W-u.top)/u.height*(m-h):r.y2})},v=O({x:0,y:0}),w=O({x:1,y:1}),k=O({x:r.x1,y:r.y1}),$=O({x:r.x2,y:r.y2}),M=e_(r,O),V=T=>{if(!s.current)return;T.preventDefault();const N=x(T);N&&i(N)},A=()=>{s.current&&(s.current=null,e(r))},Q=(T,N)=>{N.preventDefault(),N.stopPropagation(),s.current=T,N.currentTarget.setPointerCapture(N.pointerId)};return p.jsxs("div",{className:"overflow-hidden rounded-2xl border border-neutral-800 bg-black/40",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-800 px-3 py-2",children:[p.jsxs("div",{children:[p.jsx("div",{className:bf,children:"CustomEase"}),p.jsx("div",{className:"mt-1 font-mono text-[10px] text-neutral-500",children:IS(r)})]}),p.jsxs("button",{type:"button",onClick:()=>{const T=XS("power3.out");i(T),e(T)},className:"inline-flex h-8 items-center justify-center gap-2 rounded-xl border border-neutral-800 bg-neutral-950 px-3 text-[10px] font-semibold uppercase tracking-[0.14em] text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-100",children:[p.jsx(lf,{size:13}),"Reset"]})]}),p.jsxs("svg",{ref:t,viewBox:`0 0 ${a} ${c}`,className:"block w-full select-none touch-none",onPointerMove:V,onPointerUp:A,onPointerCancel:A,children:[p.jsx("rect",{x:"0",y:"0",width:a,height:c,fill:"transparent"}),[0,.5,1].map(T=>{const N=O({x:0,y:T});return p.jsxs("g",{children:[p.jsx("line",{x1:u.left,x2:u.left+u.width,y1:N.y,y2:N.y,stroke:"rgba(255,255,255,0.12)",strokeDasharray:"5 8"}),p.jsx("text",{x:u.left-12,y:N.y+4,textAnchor:"end",className:"fill-neutral-500 text-[10px] font-semibold",children:T})]},T)}),p.jsx("line",{x1:u.left,x2:u.left+u.width,y1:u.top+u.height,y2:u.top+u.height,stroke:"rgba(255,255,255,0.18)"}),p.jsx("line",{x1:u.left,x2:u.left,y1:u.top,y2:u.top+u.height,stroke:"rgba(255,255,255,0.18)"}),p.jsx("line",{x1:v.x,y1:v.y,x2:k.x,y2:k.y,stroke:"rgba(255,221,87,0.34)"}),p.jsx("line",{x1:w.x,y1:w.y,x2:$.x,y2:$.y,stroke:"rgba(255,221,87,0.34)"}),p.jsx("path",{d:M,fill:"none",stroke:"#ffdd57",strokeWidth:"4",strokeLinecap:"round"}),p.jsx("circle",{cx:v.x,cy:v.y,r:"5",fill:"#ffdd57"}),p.jsx("circle",{cx:w.x,cy:w.y,r:"5",fill:"#ffdd57"}),p.jsx("circle",{cx:k.x,cy:k.y,r:"9",fill:"#141414",stroke:"#ffdd57",strokeWidth:"4",className:"cursor-grab active:cursor-grabbing",onPointerDown:T=>Q("p1",T)}),p.jsx("circle",{cx:$.x,cy:$.y,r:"9",fill:"#141414",stroke:"#ffdd57",strokeWidth:"4",className:"cursor-grab active:cursor-grabbing",onPointerDown:T=>Q("p2",T)}),p.jsx("text",{x:k.x+12,y:k.y-10,className:"fill-neutral-400 text-[10px] font-semibold",children:"P1"}),p.jsx("text",{x:$.x+12,y:$.y-10,className:"fill-neutral-400 text-[10px] font-semibold",children:"P2"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-neutral-800 p-3",children:[p.jsxs("div",{className:"rounded-xl border border-neutral-800 bg-neutral-950 px-3 py-2 font-mono text-[10px] text-neutral-400",children:["P1 ",ba(r.x1),", ",ba(r.y1)]}),p.jsxs("div",{className:"rounded-xl border border-neutral-800 bg-neutral-950 px-3 py-2 font-mono text-[10px] text-neutral-400",children:["P2 ",ba(r.x2),", ",ba(r.y2)]})]})]})}const n_=d.memo(function({element:e,motion:t,onClearSelection:r,onSetMotion:i,onClearMotion:s}){var Q;const a=qV(t),c=UV(t),u=(t==null?void 0:t.start)??0,h=(t==null?void 0:t.duration)??.6,m=YV(t),O=(t==null?void 0:t.ease)??"power3.out",x=((Q=t==null?void 0:t.customEase)==null?void 0:Q.data)??"",v=x.trim().length>0,w=d.useMemo(()=>G5(x)??XS(Q1.includes(O)?O:"power3.out"),[O,x]);if(!e)return p.jsxs("div",{className:"flex h-full flex-col items-center justify-center bg-neutral-900 px-6 text-center",children:[p.jsx(Wg,{size:18,className:"mb-3 text-neutral-600"}),p.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Select an element for motion."}),p.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"Timeline layers and inspector selections can receive Studio-authored GSAP motion."})]});const k=e.id?`#${e.id}`:e.selector,$=v?"CustomEase":Q1.includes(O)?O:"power3.out",M=v?["CustomEase",...Q1]:Q1,V=T=>{var K;const N=T.customEaseData??x,j=N.trim()?{id:((K=t==null?void 0:t.customEase)==null?void 0:K.id)??ny(e),data:N.trim()}:void 0,W=j?j.id:(T.ease??O).trim()||"none";i(e,$V(T.preset??a,{start:vm(T.start??u,0,3600,0),duration:vm(T.duration??h,.01,3600,.6),distance:vm(T.distance??m,1,2e3,32),direction:T.direction??c,ease:W,customEase:j}))},A=T=>{V({ease:ny(e),customEaseData:IS(T)})};return p.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-900 text-neutral-100",children:[p.jsx("div",{className:"border-b border-neutral-800 px-4 py-5",children:p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:bf,children:"Motion Target"}),p.jsx("div",{className:"mt-3 truncate text-[12px] font-semibold text-neutral-100",children:e.label}),p.jsx("div",{className:"mt-1 truncate text-[11px] text-neutral-500",children:k})]}),p.jsx("button",{type:"button","aria-label":"Clear selection",onClick:r,className:"flex h-9 w-9 items-center justify-center rounded-full border border-neutral-700 bg-neutral-950 text-neutral-500 shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-colors hover:border-neutral-600 hover:text-neutral-200",children:p.jsx(af,{size:13})})]})}),p.jsxs("div",{className:"flex-1 overflow-y-auto",children:[p.jsx(iy,{title:"GSAP Motion",accessory:p.jsx("div",{className:"rounded-full border border-studio-accent/40 bg-studio-accent/10 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-studio-accent",children:"GSAP"}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(KV,{value:a,onChange:T=>V({preset:T}),options:WV}),p.jsxs("div",{className:ty,children:[p.jsx(ry,{label:"Direction",value:c,onChange:T=>V({direction:T}),options:BV}),p.jsx(ry,{label:"Ease",value:$,onChange:T=>{T!=="CustomEase"&&V({ease:T,customEaseData:""})},options:M})]}),p.jsxs("div",{className:ty,children:[p.jsx(R1,{label:"Start",value:ba(u),onCommit:T=>V({start:bm(T)??0})}),p.jsx(R1,{label:"Duration",value:ba(h),onCommit:T=>V({duration:bm(T)??.6})}),p.jsx(R1,{label:"Distance",value:ba(m),onCommit:T=>V({distance:bm(T)??32})})]})]})}),p.jsx(iy,{title:"Ease Curve",accessory:p.jsx("div",{className:"rounded-full border border-yellow-400/30 bg-yellow-400/10 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-yellow-300",children:"CustomEase"}),children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(t_,{points:w,onCommit:A}),p.jsx(R1,{label:"CustomEase path",value:x,onCommit:T=>{const N=G5(T);N&&A(N)}}),p.jsx("div",{className:"flex justify-end",children:p.jsx("button",{type:"button",onClick:()=>s(e),disabled:!t,className:"inline-flex h-8 items-center rounded-xl border border-neutral-700 bg-neutral-950 px-3 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:border-neutral-800 disabled:text-neutral-600",children:"Clear motion"})})]})})]})]})}),r_=100,sy=.01,i_=1e-6;function oy(n){return Number.isFinite(n.x)&&Number.isFinite(n.y)}function ay(n){return Math.hypot(n.x,n.y)}function ly(n){return Number.isFinite(n.left)&&Number.isFinite(n.top)&&Number.isFinite(n.width)&&Number.isFinite(n.height)}function s_(n){const e=n.document.documentElement,t=n.innerWidth||e.clientWidth||1,r=n.innerHeight||e.clientHeight||1;return{width:t>0?t:1,height:r>0?r:1}}function o_(n){try{const e=n.frameElement;if(!e)return null;const t=e.ownerDocument.defaultView,r=t==null?void 0:t.HTMLElement;return r&&e instanceof r?e:null}catch{return null}}function wm(n){const e=n.getBoundingClientRect();if(!ly(e)||e.width<=0&&e.height<=0)return null;let t={x:e.left+e.width/2,y:e.top+e.height/2},r=n.ownerDocument.defaultView;for(;r;){const i=o_(r);if(!i)break;const s=i.getBoundingClientRect();if(!ly(s)||s.width<=0||s.height<=0)return null;const a=s_(r);t={x:s.left+t.x*(s.width/a.width),y:s.top+t.y*(s.height/a.height)},r=i.ownerDocument.defaultView}return t}function a_(n){const e=n.a*n.d-n.b*n.c;return!Number.isFinite(e)||Math.abs(e)<i_?null:{a:n.d/e,b:-n.b/e,c:-n.c/e,d:n.a/e}}function l_(n,e){return{x:n.a*e.x+n.c*e.y,y:n.b*e.x+n.d*e.y}}function c_(n,e,t={}){const r=t.probeSize??r_;if(!Number.isFinite(r)||r<=0)return{ok:!1,reason:"Invalid movement probe size."};const i=eO(n);try{ed(n,e);const s=wm(n);if(!s)return{ok:!1,reason:"Element has no measurable box."};ed(n,{x:e.x+r,y:e.y});const a=wm(n);if(!a)return{ok:!1,reason:"Element X movement could not be measured."};ed(n,{x:e.x,y:e.y+r});const c=wm(n);if(!c)return{ok:!1,reason:"Element Y movement could not be measured."};const u={x:(a.x-s.x)/r,y:(a.y-s.y)/r},h={x:(c.x-s.x)/r,y:(c.y-s.y)/r};if(!oy(u)||!oy(h)||ay(u)<sy||ay(h)<sy)return{ok:!1,reason:"Element movement response is too small to measure."};const m={a:u.x,b:u.y,c:h.x,d:h.y},O=a_(m);return O?{ok:!0,matrix:O}:{ok:!1,reason:"Element movement response is not invertible."}}finally{va(n,i)}}function u_(n){const e=l_(n.screenToOffset,{x:n.dx,y:n.dy});return{x:n.initialOffset.x+e.x,y:n.initialOffset.y+e.y}}function cy(n){const e=z2(n.element),t=eO(n.element),r=kS(n.element),i=c_(n.element,e);return i.ok?{ok:!0,member:{key:n.key,selection:n.selection,element:n.element,initialOffset:e,initialPathOffset:t,gestureToken:r,screenToOffset:i.matrix,originRect:n.rect}}:(va(n.element,t),Zi(n.element,r),{ok:!1,reason:i.reason,selection:n.selection})}function WS(n,e,t){return u_({initialOffset:n.initialOffset,screenToOffset:n.screenToOffset,dx:e,dy:t})}function uy(n,e,t){const r=WS(n,e,t);return ed(n.element,r),r}function dy(n,e,t){const r=WS(n,e,t);return MS(n.element,r),r}function d_(n){va(n.element,n.initialPathOffset),Zi(n.element,n.gestureToken)}function fy(n){for(const e of n)d_(e)}function hy(n){for(const e of n)Zi(e.element,e.gestureToken)}function N1(n,e,t){const r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),s=e.contentDocument,a=(s==null?void 0:s.querySelector("[data-composition-id]"))??(s==null?void 0:s.documentElement)??null,c=a==null?void 0:a.getBoundingClientRect(),u=c==null?void 0:c.width,h=c==null?void 0:c.height;if(!u||!h)return null;const m=t.getBoundingClientRect(),O=r.width/u,x=r.height/h,v=f_(t),w=v==null?void 0:v.getBoundingClientRect(),k=h_({rootScaleX:O,rootScaleY:x,sourceRectWidth:w==null?void 0:w.width,sourceRectHeight:w==null?void 0:w.height,sourceWidth:py((v==null?void 0:v.getAttribute("data-width"))??null),sourceHeight:py((v==null?void 0:v.getAttribute("data-height"))??null)});return{left:r.left-i.left+(m.left-c.left)*O,top:r.top-i.top+(m.top-c.top)*x,width:m.width*O,height:m.height*x,editScaleX:k.scaleX,editScaleY:k.scaleY}}function py(n){if(!n)return null;const e=Number.parseFloat(n);return Number.isFinite(e)&&e>0?e:null}function f_(n){let e=n;for(;e;){if(e.hasAttribute("data-composition-file")||e.hasAttribute("data-composition-src"))return e;e=e.parentElement}return null}function h_(n){const e=n.rootScaleX>0?n.rootScaleX:1,t=n.rootScaleY>0?n.rootScaleY:1,r=n.sourceRectWidth&&n.sourceRectWidth>0&&n.sourceWidth&&n.sourceWidth>0?n.sourceRectWidth*e/n.sourceWidth:e,i=n.sourceRectHeight&&n.sourceRectHeight>0&&n.sourceHeight&&n.sourceHeight>0?n.sourceRectHeight*t/n.sourceHeight:t;return{scaleX:r>0?r:e,scaleY:i>0?i:t}}const L1=4,V1=20,_1=.5,p_=.05,my=15;function td(n,e){return n===e?!0:!n||!e?!1:Math.abs(n.left-e.left)<_1&&Math.abs(n.top-e.top)<_1&&Math.abs(n.width-e.width)<_1&&Math.abs(n.height-e.height)<_1&&Math.abs(n.editScaleX-e.editScaleX)<.001&&Math.abs(n.editScaleY-e.editScaleY)<.001}function gy(n,e){return n===e?!0:n.length!==e.length?!1:n.every((t,r)=>{const i=e[r];return!!(i&&t.key===i.key&&t.element===i.element&&t.selection===i.selection&&td(t.rect,i.rect))})}function m_(n){const e=n[0];if(!e)return null;let t=e.left,r=e.top,i=e.left+e.width,s=e.top+e.height;for(const a of n.slice(1))t=Math.min(t,a.left),r=Math.min(r,a.top),i=Math.max(i,a.left+a.width),s=Math.max(s,a.top+a.height);return{left:t,top:r,width:i-t,height:s-r,editScaleX:1,editScaleY:1}}function g_(n){return n.filter(e=>!n.some(t=>t!==e&&t.element.contains(e.element)))}function To(n){return[n.sourceFile??"",n.id??"",n.selector??"",n.selectorIndex??""].join("|")}function O_(n){n==null||n.focus({preventScroll:!0})}function x_(n){const e=n.scaleX>0?n.scaleX:1,t=n.scaleY>0?n.scaleY:1;if(n.uniform){const r=n.dx/e,i=n.dy/t,s=Math.abs(r)>=Math.abs(i)?r:i,a=Math.max(1,Math.max(n.actualWidth,n.actualHeight)+s);return{overlayWidth:Math.max(V1,a*e),overlayHeight:Math.max(V1,a*t),width:a,height:a}}return{overlayWidth:Math.max(V1,n.originWidth+n.dx),overlayHeight:Math.max(V1,n.originHeight+n.dy),width:Math.max(1,n.actualWidth+n.dx/e),height:Math.max(1,n.actualHeight+n.dy/t)}}function Oy(n,e,t,r){return Math.atan2(r-e,t-n)*180/Math.PI}function y_(n){return((n+180)%360+360)%360-180}function v_(n){return Math.round(n*10)/10}function xy(n){const e=Oy(n.centerX,n.centerY,n.startX,n.startY),t=Oy(n.centerX,n.centerY,n.currentX,n.currentY),r=y_(t-e),i=n.actualAngle+r;return{angle:n.snap?Math.round(i/my)*my:v_(i)}}function b_(n,e){return Math.abs(e-n)>=p_}const w_=d.memo(function({iframeRef:e,activeCompositionPath:t,selection:r,groupSelections:i=[],hoverSelection:s,allowCanvasMovement:a=!0,onCanvasMouseDown:c,onCanvasPointerMove:u,onCanvasPointerLeave:h,onSelectionChange:m,onBlockedMove:O,onManualDragStart:x,onPathOffsetCommit:v,onGroupPathOffsetCommit:w,onBoxSizeCommit:k,onRotationCommit:$}){const M=d.useRef(null),V=d.useRef(null),[A,Q]=d.useState(null),[T,N]=d.useState(null),[j,W]=d.useState([]),K=d.useRef(null),ae=d.useRef(null),ie=d.useRef(null),L=d.useRef(!1),le=d.useRef(!1),ye=d.useRef(!1),Oe=d.useRef(!1),$e=d.useRef(null),pe=d.useRef(null),D=d.useRef(new Map),z=d.useRef(r);z.current=r;const q=d.useRef(t);q.current=t;const E=d.useRef(i);E.current=i;const X=d.useRef(s);X.current=s;const ee=d.useRef(A);ee.current=A;const Ce=d.useRef(T);Ce.current=T;const Te=d.useRef(j);Te.current=j;const tt=d.useRef(v);tt.current=v;const De=d.useRef(w);De.current=w;const G=d.useRef(k);G.current=k;const oe=d.useRef($);oe.current=$;const fe=d.useRef(O);fe.current=O;const Ee=d.useRef(x);Ee.current=x;const Le=d.useRef(u);Le.current=u;const Fe=d.useRef(h);Fe.current=h;const Ve=d.useRef(m);Ve.current=m,On(()=>{let te=0;const ne=()=>{ee.current&&(ee.current=null,Q(null))},Ke=_e=>{td(ee.current,_e)||(ee.current=_e,Q(_e))},Ze=()=>{Ce.current&&(Ce.current=null,N(null))},Je=_e=>{td(Ce.current,_e)||(Ce.current=_e,N(_e))},Et=()=>{Te.current.length!==0&&(Te.current=[],W([]))},mt=_e=>{gy(Te.current,_e)||(Te.current=_e,W(_e))},wt=(_e,At,ut)=>{const zt=To(At),Tt=ut.current;if((Tt==null?void 0:Tt.key)===zt&&Tt.element.isConnected&&Tt.element.ownerDocument===_e)return Tt.element;const jt=ji(_e,At,q.current);return ut.current=jt?{key:zt,element:jt}:null,jt},ft=(_e,At)=>{const ut=To(At),zt=D.current.get(ut);if(zt!=null&&zt.isConnected&&zt.ownerDocument===_e)return zt;const Tt=ji(_e,At,q.current);return Tt?D.current.set(ut,Tt):D.current.delete(ut),Tt},st=()=>{if(te=requestAnimationFrame(st),Oe.current)return;const _e=z.current,At=e.current,ut=M.current;if(!At||!ut){$e.current=null,pe.current=null,D.current.clear(),ne(),Ze(),Et();return}const zt=At.contentDocument;if(!zt){$e.current=null,pe.current=null,D.current.clear(),ne(),Ze(),Et();return}if(_e){const Nt=wt(zt,_e,$e);Nt?Ke(N1(ut,At,Nt)):ne()}else $e.current=null,ne();const Tt=E.current;if(Tt.length>0){const Nt=[],Yn=new Set;for(const Or of Tt){const Br=To(Or);Yn.add(Br);const tr=ft(zt,Or),nr=tr?N1(ut,At,tr):null;tr&&nr&&Nt.push({key:Br,selection:Or,element:tr,rect:nr})}for(const Or of D.current.keys())Yn.has(Or)||D.current.delete(Or);mt(Nt)}else D.current.clear(),Et();const jt=X.current,cn=!!(_e&&jt&&To(_e)===To(jt)),yn=!!(jt&&Tt.some(Nt=>To(Nt)===To(jt)));if(!jt||cn||yn){pe.current=null,Ze();return}const hn=wt(zt,jt,pe);if(!hn){Ze();return}Je(N1(ut,At,hn))};return te=requestAnimationFrame(st),()=>cancelAnimationFrame(te)});const qe=d.useMemo(()=>r?`${r.sourceFile}:${r.id??r.selector??r.label}:${r.selectorIndex??0}`:"none",[r]),Ue=d.useMemo(()=>m_(j.map(te=>te.rect)),[j]),ce=i.length>1,je=ce&&j.length>1&&j.every(te=>te.selection.capabilities.canApplyManualOffset),Se=te=>{td(ee.current,te)||(ee.current=te,Q(te))},Me=te=>{Se({left:te.originLeft,top:te.originTop,width:te.originWidth,height:te.originHeight,editScaleX:te.editScaleX,editScaleY:te.editScaleY})},ct=te=>{gy(Te.current,te)||(Te.current=te,W(te))},fn=te=>{ct(te.originItems)},Mn=te=>{var Et,mt;const ne=Te.current;if(ne.length<=1)return!1;const Ke=(Et=ne.find(wt=>!wt.selection.capabilities.canApplyManualOffset))==null?void 0:Et.selection;if(Ke)return te.preventDefault(),te.stopPropagation(),fe.current(Ke),!1;(mt=Ee.current)==null||mt.call(Ee);const Ze=g_(ne),Je=[];for(const wt of Ze){const ft=cy({key:wt.key,selection:wt.selection,element:wt.element,rect:wt.rect});if(!ft.ok)return fy(Je),te.preventDefault(),te.stopPropagation(),fe.current(ft.selection),!1;Je.push(ft.member)}return te.preventDefault(),te.stopPropagation(),te.currentTarget.setPointerCapture(te.pointerId),Oe.current=!0,ae.current={startX:te.clientX,startY:te.clientY,originItems:ne,members:Je},!0},ze=te=>{fy(te.members),fn(te)},Pt=(te,ne,Ke)=>{var hn;const Ze=(Ke==null?void 0:Ke.selection)??z.current,Je=(Ke==null?void 0:Ke.rect)??ee.current,Et=V.current,mt=M.current;if(!Ze||!Je||te!=="drag"&&!Et)return!1;const wt=te==="rotate"?"rotation":te==="drag"?"path-offset":"box-size";if(te==="drag"&&!Ze.capabilities.canApplyManualOffset||te==="resize"&&!Ze.capabilities.canApplyManualSize||te==="rotate"&&!Ze.capabilities.canApplyManualRotation||te==="resize"&&(!Number.isFinite(Je.width)||!Number.isFinite(Je.height)))return!1;const ft=Ld(Ze.element),st=AL(Ze.element),_e=ft.width>0?ft.width:Je.width/Je.editScaleX,At=ft.height>0?ft.height:Je.height/Je.editScaleY;let ut=eO(Ze.element),zt,Tt;if(te==="drag"){(hn=Ee.current)==null||hn.call(Ee);const Nt=cy({key:To(Ze),selection:Ze,element:Ze.element,rect:Je});if(!Nt.ok)return fe.current(Nt.selection),!1;Tt=Nt.member,ut=Nt.member.initialPathOffset,zt=Nt.member.gestureToken}else zt=kS(Ze.element);const jt=mt==null?void 0:mt.getBoundingClientRect(),cn=((jt==null?void 0:jt.left)??0)+Je.left+Je.width/2,yn=((jt==null?void 0:jt.top)??0)+Je.top+Je.height/2;return ne.preventDefault(),ne.stopPropagation(),ne.currentTarget.setPointerCapture(ne.pointerId),Oe.current=!0,K.current={kind:te,mode:wt,selection:Ze,startX:ne.clientX,startY:ne.clientY,centerX:cn,centerY:yn,initialPathOffset:ut,initialRotation:FL(Ze.element),initialBoxSize:XL(Ze.element),pathOffsetMember:Tt,originLeft:Je.left,originTop:Je.top,originWidth:Je.width,originHeight:Je.height,actualWidth:_e,actualHeight:At,actualRotation:st.angle,editScaleX:Je.editScaleX,editScaleY:Je.editScaleY,manualEditDragToken:zt},!0},pt=te=>{const ne=K.current,Ke=ae.current,Ze=(ne==null?void 0:ne.selection)??z.current,Je=V.current,Et=ie.current;if(!Et&&!ne&&!Ke&&Le.current(te,{preferClipAncestor:!1}),Et&&Ze){const ft=te.clientX-Et.startX,st=te.clientY-Et.startY;!Et.notified&&Math.hypot(ft,st)>=L1&&(Et.notified=!0,L.current=!0,fe.current(Ze));return}if(Ke){const ft=te.clientX-Ke.startX,st=te.clientY-Ke.startY;ct(Ke.originItems.map(_e=>({..._e,rect:{..._e.rect,left:_e.rect.left+ft,top:_e.rect.top+st}})));for(const _e of Ke.members)uy(_e,ft,st);return}if(!ne||!Ze)return;const mt=te.clientX-ne.startX,wt=te.clientY-ne.startY;if(ne.kind==="rotate"){const ft=xy({centerX:ne.centerX,centerY:ne.centerY,startX:ne.startX,startY:ne.startY,currentX:te.clientX,currentY:te.clientY,actualAngle:ne.actualRotation,snap:te.shiftKey});NL(Ze.element,ft);return}if(ne.kind==="drag"){const ft=ne.originLeft+mt,st=ne.originTop+wt;Se({left:ft,top:st,width:ne.originWidth,height:ne.originHeight,editScaleX:ne.editScaleX,editScaleY:ne.editScaleY}),Je&&(Je.style.left=`${ft}px`,Je.style.top=`${st}px`),ne.pathOffsetMember&&uy(ne.pathOffsetMember,mt,wt)}else{if(!Je)return;const ft=x_({originWidth:ne.originWidth,originHeight:ne.originHeight,actualWidth:ne.actualWidth,actualHeight:ne.actualHeight,scaleX:ne.editScaleX,scaleY:ne.editScaleY,dx:mt,dy:wt,uniform:te.shiftKey});Se({left:ne.originLeft,top:ne.originTop,width:ft.overlayWidth,height:ft.overlayHeight,editScaleX:ne.editScaleX,editScaleY:ne.editScaleY}),Je.style.width=`${ft.overlayWidth}px`,Je.style.height=`${ft.overlayHeight}px`,RL(Ze.element,ft)}},vt=te=>{const ne=K.current,Ke=ae.current,Ze=(ne==null?void 0:ne.selection)??z.current,Je=V.current;if(ie.current=null,Ke){ae.current=null,Oe.current=!1;const mt=te.clientX-Ke.startX,wt=te.clientY-Ke.startY;if(Math.hypot(te.clientX-Ke.startX,te.clientY-Ke.startY)<L1){ze(Ke),L.current=!0;return}ct(Ke.originItems.map(_e=>({..._e,rect:{..._e.rect,left:_e.rect.left+mt,top:_e.rect.top+wt}})));const st=Ke.members.map(_e=>{const At=dy(_e,mt,wt);return{selection:_e.selection,next:At}});Promise.resolve(De.current(st)).catch(()=>{for(const _e of Ke.members)_e.gestureToken&&C1(_e.element,_e.gestureToken)&&va(_e.element,_e.initialPathOffset)}).finally(()=>{hy(Ke.members)});return}if(!ne||!Ze){K.current=null,Oe.current=!1;return}K.current=null,Oe.current=!1;const Et=Math.hypot(te.clientX-ne.startX,te.clientY-ne.startY);if(ne.kind==="drag"&&Et<L1){va(Ze.element,ne.initialPathOffset),Zi(Ze.element,ne.manualEditDragToken),Je&&(Je.style.left=`${ne.originLeft}px`,Je.style.top=`${ne.originTop}px`),Me(ne),L.current=!0,c(te,{preferClipAncestor:!1});return}if(ne.kind==="resize"&&Et<L1){am(Ze.element,ne.initialBoxSize),Zi(Ze.element,ne.manualEditDragToken),Je&&(Je.style.width=`${ne.originWidth}px`,Je.style.height=`${ne.originHeight}px`),Me(ne);return}if(ne.kind==="rotate"){const mt=xy({centerX:ne.centerX,centerY:ne.centerY,startX:ne.startX,startY:ne.startY,currentX:te.clientX,currentY:te.clientY,actualAngle:ne.actualRotation,snap:te.shiftKey});if(!b_(ne.actualRotation,mt.angle)){lm(Ze.element,ne.initialRotation),Zi(Ze.element,ne.manualEditDragToken);return}jS(Ze.element,mt),Promise.resolve(oe.current(Ze,mt)).catch(()=>{ne.manualEditDragToken&&C1(Ze.element,ne.manualEditDragToken)&&lm(Ze.element,ne.initialRotation)}).finally(()=>{Zi(Ze.element,ne.manualEditDragToken)})}else if(ne.kind==="drag"){const mt=te.clientX-ne.startX,wt=te.clientY-ne.startY;if(!ne.pathOffsetMember)return;const ft=dy(ne.pathOffsetMember,mt,wt),st=ne.originLeft+mt,_e=ne.originTop+wt;Se({left:st,top:_e,width:ne.originWidth,height:ne.originHeight,editScaleX:ne.editScaleX,editScaleY:ne.editScaleY}),Je&&(Je.style.left=`${st}px`,Je.style.top=`${_e}px`),Promise.resolve(tt.current(Ze,ft)).catch(()=>{var At;(At=ne.pathOffsetMember)!=null&&At.gestureToken&&C1(Ze.element,ne.pathOffsetMember.gestureToken)&&va(Ze.element,ne.initialPathOffset)}).finally(()=>{ne.pathOffsetMember&&hy([ne.pathOffsetMember])})}else{const mt=Ld(Ze.element);QS(Ze.element,mt),Promise.resolve(G.current(Ze,mt)).catch(()=>{ne.manualEditDragToken&&C1(Ze.element,ne.manualEditDragToken)&&am(Ze.element,ne.initialBoxSize)}).finally(()=>{Zi(Ze.element,ne.manualEditDragToken)})}},dt=te=>{if(ye.current){ye.current=!1,le.current=!1,L.current=!1,te.preventDefault(),te.stopPropagation();return}const ne=te.target;ne!=null&&ne.closest('[data-dom-edit-selection-box="true"]')||(c(te,{preferClipAncestor:!1}),te.shiftKey&&(le.current=!0,L.current=!0))},Rt=te=>{if(!a||te.button!==0)return;if(te.shiftKey){const ft=Le.current(te,{preferClipAncestor:!1})??X.current;if(!ft)return;te.preventDefault(),te.stopPropagation(),ye.current=!0,le.current=!0,L.current=!0,Ve.current(ft,{additive:!0});return}const ne=te.target;if(ne!=null&&ne.closest('[data-dom-edit-selection-box="true"]'))return;const Ze=Le.current(te,{preferClipAncestor:!1})??X.current;if(!(Ze!=null&&Ze.capabilities.canApplyManualOffset))return;const Je=M.current,Et=e.current,mt=Je&&Et?N1(Je,Et,Ze.element):null;if(!mt)return;if(ye.current=!0,z.current=Ze,ee.current=mt,Ce.current=null,Q(mt),N(null),!Pt("drag",te,{selection:Ze,rect:mt})){ye.current=!1;return}Ve.current(Ze)},en=te=>{if(!(K.current||ae.current)){if(L.current){L.current=!1,te.stopPropagation();return}c(te,{preferClipAncestor:!1})}},Qt=()=>{const te=ae.current;te&&ze(te);const ne=K.current,Ke=(ne==null?void 0:ne.selection)??z.current;(ne==null?void 0:ne.mode)==="path-offset"&&Ke&&(va(Ke.element,ne.initialPathOffset),Zi(Ke.element,ne.manualEditDragToken),Me(ne)),(ne==null?void 0:ne.mode)==="box-size"&&Ke&&(am(Ke.element,ne.initialBoxSize),Zi(Ke.element,ne.manualEditDragToken),Me(ne)),(ne==null?void 0:ne.mode)==="rotation"&&Ke&&(lm(Ke.element,ne.initialRotation),Zi(Ke.element,ne.manualEditDragToken)),ie.current=null,ae.current=null,K.current=null,Oe.current=!1};return p.jsxs("div",{ref:M,className:"absolute inset-0 z-10 pointer-events-auto outline-none",tabIndex:-1,"aria-label":"Composition canvas",onPointerDownCapture:te=>O_(te.currentTarget),onPointerDown:Rt,onMouseDown:dt,onPointerMove:pt,onPointerLeave:()=>Fe.current(),onPointerUp:vt,onPointerCancel:Qt,children:[s&&T&&p.jsx("div",{"aria-hidden":"true","data-dom-edit-hover-box":"true",className:"pointer-events-none absolute rounded-xl border border-studio-accent/80 bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.25)]",style:{left:T.left,top:T.top,width:T.width,height:T.height}}),ce&&j.length>1&&Ue&&p.jsxs(p.Fragment,{children:[j.map(te=>p.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute rounded-xl border border-studio-accent/70 bg-studio-accent/[0.03]",style:{left:te.rect.left,top:te.rect.top,width:te.rect.width,height:te.rect.height}},te.key)),p.jsx("div",{"data-dom-edit-selection-box":"true",className:"pointer-events-auto absolute rounded-xl border border-studio-accent bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.3)]",style:{left:Ue.left,top:Ue.top,width:Ue.width,height:Ue.height,cursor:a&&je?"move":"default"},onPointerDown:te=>{a&&(te.shiftKey||Mn(te))},onMouseDown:te=>{le.current&&(le.current=!1,te.preventDefault(),te.stopPropagation())},onClick:en})]}),!ce&&r&&A&&p.jsxs(p.Fragment,{children:[a&&r.capabilities.canApplyManualRotation&&p.jsxs("div",{className:"pointer-events-none absolute",style:{left:A.left+A.width/2,top:A.top-34,width:28,height:34,transform:"translateX(-50%)"},children:[p.jsx("div",{className:"absolute left-1/2 top-3 bottom-0 w-px -translate-x-1/2 bg-studio-accent/60"}),p.jsx("button",{type:"button",className:"pointer-events-auto absolute left-1/2 top-0 h-3 w-3 -translate-x-1/2 rounded-full border border-studio-accent bg-studio-accent p-0 shadow-[0_0_0_2px_rgba(60,230,172,0.18)]",style:{cursor:"grab",touchAction:"none"},title:"Rotate","aria-label":"Rotate selection",onPointerDown:te=>{te.stopPropagation(),Pt("rotate",te)}})]}),p.jsx("div",{ref:V,"data-dom-edit-selection-box":"true",className:"pointer-events-auto absolute rounded-xl border border-studio-accent/80 bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.25)]",style:{left:A.left,top:A.top,width:A.width,height:A.height,cursor:a&&r.capabilities.canApplyManualOffset?"move":"default"},onPointerDown:te=>{if(a&&!te.shiftKey){if(r.capabilities.canApplyManualOffset){Pt("drag",te);return}te.preventDefault(),te.stopPropagation(),te.currentTarget.setPointerCapture(te.pointerId),ie.current={pointerId:te.pointerId,startX:te.clientX,startY:te.clientY,notified:!1}}},onMouseDown:te=>{le.current&&(le.current=!1,te.preventDefault(),te.stopPropagation())},onClick:en,children:a&&r.capabilities.canApplyManualSize&&p.jsx("div",{className:"absolute -right-1.5 -bottom-1.5 w-3 h-3 rounded-sm bg-studio-accent border border-studio-accent/60",style:{cursor:"se-resize",touchAction:"none"},onPointerDown:te=>{te.stopPropagation(),Pt("resize",te)}})},qe)]})]})}),S_=new Set(["audio","canvas","img","picture","svg","video"]);function k_(n){const e=Math.max(0,n.length-1);if(e>0)return`${e} nested selectable layer${e===1?"":"s"}`;const t=n[0];return t?S_.has(t.tagName.trim().toLowerCase())?"Single selectable media layer":"Single selectable layer":"No selectable layers"}const P_=d.memo(function({clipLabel:e,layers:t,selectedLayerKey:r,onSelectLayer:i,onClose:s}){return p.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-950",children:[p.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-white/10 px-3 py-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.18em] text-neutral-500",children:"Clip layers"}),p.jsx("div",{className:"mt-1 truncate text-sm font-semibold text-neutral-100",children:e})]}),p.jsx("button",{type:"button",onPointerDown:a=>{a.stopPropagation()},onClick:s,className:"flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/20 text-neutral-500 transition-colors hover:border-white/20 hover:text-neutral-200","aria-label":"Close clip layers",children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:[p.jsx("path",{d:"M18 6 6 18"}),p.jsx("path",{d:"m6 6 12 12"})]})})]}),p.jsx("div",{className:"border-b border-white/10 px-3 py-2 text-[11px] text-neutral-500",children:k_(t)}),p.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-1",children:t.map(a=>{const c=a.key===r;return p.jsxs("button",{type:"button","data-timeline-layer-row":a.key,onPointerDown:u=>{u.stopPropagation(),i(a)},onClick:u=>{u.stopPropagation(),i(a)},className:`group flex w-full items-center gap-2 px-2.5 py-1.5 text-left transition-colors ${c?"bg-studio-accent/14 text-studio-accent":"text-neutral-300 hover:bg-white/[0.04] hover:text-neutral-100"}`,style:{paddingLeft:10+a.depth*14},children:[p.jsx("span",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-md border text-[9px] font-bold uppercase ${c?"border-studio-accent/50 bg-studio-accent/18":"border-white/10 bg-black/20 text-neutral-500 group-hover:text-neutral-300"}`,children:a.tagName.slice(0,2)}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:a.label}),a.childCount>0&&p.jsx("span",{className:"rounded-full border border-white/10 bg-black/25 px-1.5 py-0.5 text-[9px] font-semibold tabular-nums text-neutral-500",children:a.childCount})]},a.key)})})]})}),A_={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},$_="VITE_STUDIO_ENABLE_PREVIEW_MANUAL_DRAGGING",C_="VITE_STUDIO_ENABLE_INSPECTOR_PANELS",E_="VITE_STUDIO_ENABLE_MOTION_PANEL",T_="VITE_STUDIO_ENABLE_TIMELINE_LAYER_INSPECTOR",M_=new Set(["1","true","yes","on","enabled"]),Q_=new Set(["0","false","no","off","disabled"]);function wf(n,e,t){for(const r of e){const i=n[r];if(typeof i=="boolean")return i;if(typeof i!="string")continue;const s=i.trim().toLowerCase();if(s){if(M_.has(s))return!0;if(Q_.has(s))return!1}}return t}const Sf=A_,j_=wf(Sf,[$_,"VITE_STUDIO_PREVIEW_MANUAL_EDITING_ENABLED"],!1),Zn=wf(Sf,[C_,"VITE_STUDIO_INSPECTOR_PANELS_ENABLED"],!0),yy=wf(Sf,[E_,"VITE_STUDIO_MOTION_PANEL_ENABLED"],!1),tu=Zn&&wf(Sf,[T_,"VITE_STUDIO_TIMELINE_LAYER_INSPECTOR_ENABLED"],!0),Sm=Zn,vy="Manual editing is temporarily disabled";async function Fs({label:n,kind:e,coalesceKey:t,files:r,readFile:i,writeFile:s,recordEdit:a}){const c={};for(const[m,O]of Object.entries(r)){const x=await i(m);x!==O&&(c[m]={before:x,after:O})}const u=Object.keys(c);if(u.length===0)return[];const h=[];try{for(const m of u)await s(m,c[m].after),h.push(m);await a({label:n,kind:e,coalesceKey:t,files:c})}catch(m){try{for(const O of h.reverse())await s(O,c[O].before)}catch(O){throw new AggregateError([m,O],"Failed to save project files and rollback did not complete")}throw m}return u}function pa(n){return n.label||n.id||n.tag}function by(n,e){return window.confirm(`Delete ${e} "${n}"?
|
|
92
|
-
|
|
93
|
-
This removes it from the project source. You can use Undo to restore it.`)}const Z_=new Set(["inherit","initial","revert","revert-layer","serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function R_(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function wy(n,e){const t=R_(e);if(!t||Z_.has(t.toLowerCase()))return;const r=`studio-preview-google-font-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(n.getElementById(r))return;const i=n.createElement("link");i.id=r,i.rel="stylesheet",i.href=NS(t),n.head.appendChild(i)}function N_(n){var e;return((e=n.split(",")[0])==null?void 0:e.trim().replace(/^["']|["']$/g,"").trim())??""}function Sy(n,e){const t=`studio-imported-font-${e.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(n.getElementById(t))return;const r=n.createElement("style");r.id=t,r.textContent=rO(e),n.head.appendChild(r)}function ky(n){const e=n.trim(),t=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(t).replace(/\\/g,"/").replace(/^\.?\//,"")}function L_(n,e){const t=ky(n).split("/").filter(Boolean),r=ky(e).split("/").filter(Boolean);for(t.pop();t.length>0&&r.length>0&&t[0]===r[0];)t.shift(),r.shift();return[...t.map(()=>".."),...r].join("/")||e}function V_(n){return/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(n)}function __(n,e){const t=e.trim();if(!t)return;const r=t.replace(/\\/g,"/");if(V_(r))return r;const i=n==null?void 0:n.trim().replace(/\\/g,"/").replace(/\/+$/,"");if(i)return`${i}/${r.replace(/^\.?\//,"")}`}function Py(n,e,t){const r=rO(e,L_(t,e.path));if(n.includes(r))return n;const s=/<style\b[^>]*data-hf-studio-fonts=(["'])true\1[^>]*>([\s\S]*?)<\/style>/i.exec(n);if(s){const c=`${s[2].trim()}
|
|
94
|
-
${r}`.trim();return n.replace(s[0],`<style data-hf-studio-fonts="true">
|
|
95
|
-
${c}
|
|
96
|
-
</style>`)}const a=`<style data-hf-studio-fonts="true">
|
|
97
|
-
${r}
|
|
98
|
-
</style>`;return/<\/head>/i.test(n)?n.replace(/<\/head>/i,` ${a}
|
|
99
|
-
</head>`):`${a}
|
|
100
|
-
${n}`}function km(n,e){const t=e.trim();return t&&(["border-radius","border-width","font-size","letter-spacing"].includes(n)&&/^-?\d+(\.\d+)?$/.test(t)?`${t}px`:t)}function Ay(n){return/^url\(/i.test(n.trim())}function BS(n){if(!n||typeof n!="object")return null;const e=n;return e.nodeType===1?n:e.nodeType===3&&e.parentElement?e.parentElement:null}function $y(n){const e=BS(n);return e?!!e.closest("input, textarea, select, [contenteditable='true'], [role='textbox'], .cm-editor"):!1}function D1(n){const t=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform)?"Cmd":"Ctrl";return n==="undo"?`${t}+Z`:`${t}+Shift+Z`}function Cy(n,e){const t=n.sourceFile||"index.html";for(const r of e){const i=r.sourceFile||"index.html";if(n.id&&r.domId===n.id&&i===t||n.isCompositionHost&&n.compositionSrc&&r.compositionSrc===n.compositionSrc||n.selector&&r.selector===n.selector&&(r.selectorIndex??0)===(n.selectorIndex??0)&&(r.sourceFile??"index.html")===n.sourceFile)return r.key??r.id}return null}function D_(n){return n==="left"||n==="top"||n==="width"||n==="height"}function YS(n,e,t,r,i){const s=n.getBoundingClientRect(),a=e.querySelector("[data-composition-id]")??e.documentElement??null,c=a==null?void 0:a.getBoundingClientRect(),u=(c==null?void 0:c.width)||t.innerWidth,h=(c==null?void 0:c.height)||t.innerHeight;if(!u||!h)return null;const m=s.width/u,O=s.height/h;return{x:(r-s.left)/m,y:(i-s.top)/O,viewport:{width:u,height:h}}}function I_(n,e,t){let r=null,i=null;try{r=n.contentDocument,i=n.contentWindow}catch{return null}return!r||!i?null:YS(n,r,i,e,t)}function X_(n,e,t,r){let i=null,s=null;try{i=n.contentDocument,s=n.contentWindow}catch{return null}if(!i||!s)return null;const a=YS(n,i,s,e,t);if(!a)return null;if(typeof i.elementsFromPoint=="function"){const c=UN(i.elementsFromPoint(a.x,a.y),{activeCompositionPath:r});if(c)return c}return BS(i.elementFromPoint(a.x,a.y))}function F_(n,e){return["The user clicked a large raster/background element in the Studio preview.",`Preview click: x=${Math.round(e.x)}px, y=${Math.round(e.y)}px in a ${Math.round(e.viewport.width)}x${Math.round(e.viewport.height)} composition.`,`Selected target: <${n.tagName}> ${n.selector??n.id??n.label}.`,"Visible copy or artwork at that point may be baked into the selected image/background rather than a selectable DOM text layer.","If the request mentions text seen at the click location, inspect or replace the image asset, or recreate that visible copy as editable DOM."].join(`
|
|
101
|
-
`)}function wa(n,e){return n===e?!0:!n||!e?!1:zs(n)===zs(e)}function gu(n,e){return e?n.some(t=>wa(t,e)):!1}function z_(n,e){return gu(n,e)?n.filter(t=>!wa(t,e)):[...n,e]}function H_(n,e){let t=!1;const r=n.map(i=>wa(i,e)?(t=!0,e):i);return t?r:[...n,e]}function W_(n,e){return!e||gu(n,e)?n:[e,...n]}function cu(n){return n&&(typeof n=="object"||typeof n=="function")?n:null}function Pm(n,e){const t=n?Reflect.get(n,e):null;if(typeof t=="function")try{t.call(n)}catch{}}function Am(n,e){const t=n?Reflect.get(n,e):null;if(typeof t!="function")return null;try{const r=t.call(n);return typeof r=="number"&&Number.isFinite(r)?r:null}catch{return null}}function qS(n){const e=cu(n?Reflect.get(n,"__player"):null);if(!e)return null;const t=Reflect.get(e,"getTime"),r=Reflect.get(e,"renderSeek");return typeof t!="function"||typeof r!="function"?null:{getTime:()=>{const i=t.call(e);return typeof i=="number"&&Number.isFinite(i)?i:0},renderSeek:i=>{r.call(e,i)}}}function $m(n,e){const t=qS(n==null?void 0:n.contentWindow);if(!t)return!1;const r=Math.max(0,e);return t.renderSeek(r),Re.getState().setCurrentTime(r),Ni.notify(r),!0}function B_(n){if(n==null||n.trim()==="")return null;const e=Number.parseFloat(n);return Number.isFinite(e)?e:null}function Y_(n,e,t){var k;if(!e||!t)return null;const r=t.getTime(),i=Math.max(0,e.start),s=Math.max(i,i+Math.max(0,e.duration)),a=B_(n.getAttribute("data-start")??((k=n.closest("[data-start]"))==null?void 0:k.getAttribute("data-start"))??null),c=a==null?i:Math.min(s,Math.max(i,i+a)),u=[c,i],h=s-i;if(h>0){const V=Math.max(.041666666666666664,h/24);for(let A=i;A<=s+1e-4;A+=V)u.push(Math.min(s,A))}u.push(s);let m=c,O=null,x=0,v=null;const w=new Set;try{for(const $ of u){const M=Math.min(s,Math.max(i,$)),V=M.toFixed(4);if(w.has(V))continue;w.add(V),m=M,t.renderSeek(M);const A=Dy(n);if(A.visible&&A.compositeOpacity>x&&(O=M,x=A.compositeOpacity),K7(n,{minCompositeOpacity:.9})){v=M;break}}}finally{t.renderSeek(r)}return v??O??m}function q_(n){const e=n==null?void 0:n.contentWindow;if(!e)return null;try{let t=null;const r=cu(Reflect.get(e,"__player"));t=Am(r,"getTime")??t,Pm(r,"pause");const i=cu(Reflect.get(e,"__timeline"));t=t??Am(i,"time"),Pm(i,"pause");const s=cu(Reflect.get(e,"__timelines"));if(s)for(const a of Object.values(s)){const c=cu(a);t=t??Am(c,"time"),Pm(c,"pause")}return t}catch{return null}}function Ey(n,e,t){return t<e?e:Math.min(Math.max(n,e),t)}function U_(n){if(!n||typeof window>"u")return;const e=480,t=270,r=16,i=Ey(n.x,r+e/2,window.innerWidth-r-e/2),s=Ey(n.y+12,r,window.innerHeight-r-t);return{left:i,top:s,transform:"translateX(-50%)"}}function G_({selectionLabel:n,anchorPoint:e=null,onSubmit:t,onClose:r}){const[i,s]=d.useState(""),a=d.useRef(null),c=U_(e);On(()=>{requestAnimationFrame(()=>{var h;return(h=a.current)==null?void 0:h.focus()})});const u=()=>{i.trim()&&t(i.trim())};return p.jsx("div",{className:e?"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm":"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:r,children:p.jsxs("div",{className:`w-[480px] rounded-2xl border border-neutral-800 bg-neutral-950 shadow-2xl ${e?"fixed":""}`,style:c,onClick:h=>h.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-neutral-800/60",children:[p.jsxs("div",{children:[p.jsx("h3",{className:"text-sm font-medium text-neutral-200",children:"Ask agent"}),p.jsx("p",{className:"text-xs text-neutral-500 mt-0.5",children:n.length>50?`${n.slice(0,49)}…`:n})]}),p.jsx("button",{className:"p-1 rounded-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/50",onClick:r,children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[p.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),p.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),p.jsx("div",{className:"px-5 py-4",children:p.jsx("textarea",{ref:a,className:"w-full h-24 px-3 py-2 rounded-lg border border-neutral-800 bg-neutral-900/60 text-sm text-neutral-200 placeholder-neutral-600 resize-none focus:outline-none focus:border-studio-accent/60 focus:ring-1 focus:ring-studio-accent/30",placeholder:"Describe what you want to change…",value:i,onChange:h=>s(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&u(),h.key==="Escape"&&r()}})}),p.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-neutral-800/60",children:[p.jsxs("span",{className:"text-[11px] text-neutral-600",children:[navigator.platform.includes("Mac")?"⌘":"Ctrl","+Enter to copy"]}),p.jsx("button",{className:"px-4 py-1.5 rounded-lg bg-studio-accent/90 text-xs font-medium text-neutral-950 hover:bg-studio-accent disabled:opacity-40 disabled:cursor-not-allowed",disabled:!i.trim(),onClick:u,children:"Copy prompt"})]})]})})}const I1={image:3,video:5,audio:5};function K_(n){return Array.from(n.matchAll(/\bid="([^"]+)"/g),e=>e[1]??"")}async function Ty(n,e,t){if(t==="image")return I1.image;const r=document.createElement(t==="video"?"video":"audio");r.preload="metadata",r.src=`/api/projects/${n}/preview/${e}`;const i=await new Promise(s=>{const a=window.setTimeout(()=>s(I1[t]),3e3),c=u=>{window.clearTimeout(a),s(u)};r.addEventListener("loadedmetadata",()=>{const u=Number(r.duration);c(Number.isFinite(u)&&u>0?Math.round(u*100)/100:I1[t])},{once:!0}),r.addEventListener("error",()=>c(I1[t]),{once:!0})});return r.src="",r.load(),i}function J_(){const[n,e]=d.useState(null),[t,r]=d.useState(!0);On(()=>{const S=PN(window.location.hash);if(S){e(S),r(!1);return}fetch("/api/projects").then(C=>C.json()).then(C=>{const R=(C.projects??[])[0];R&&(e(R.id),window.location.hash=kN(R.id))}).catch(()=>{}).finally(()=>r(!1))});const[i,s]=d.useState(null),[a,c]=d.useState(null),[u,h]=d.useState(null),[m,O]=d.useState([]),[x,v]=d.useState(new Map),w=MR(n),k=Xt(S=>S.isEditMode),$=Xt(S=>S.selectedSegmentIds.size>0),M=qR(n),[V,A]=d.useState(240),[Q,T]=d.useState(400),[N,j]=d.useState(!1),[W,K]=d.useState(!0),[ae,ie]=d.useState("renders"),[L,le]=d.useState(null),[ye,Oe]=d.useState([]),[$e,pe]=d.useState(null),[D,z]=d.useState(),[q,E]=d.useState(),[X,ee]=d.useState(null),[Ce,Te]=d.useState(!1),[tt,De]=d.useState(!1),[G,oe]=d.useState(null),[fe,Ee]=d.useState(null),[Le,Fe]=d.useState(!0),[Ve,qe]=d.useState(0),Ue=d.useCallback(()=>{qe(S=>S+1),window.setTimeout(()=>qe(S=>S+1),80),window.setTimeout(()=>qe(S=>S+1),300)},[]);d.useEffect(()=>{if(!n)return;let S=!1;const C=()=>{if(Xt.getState().isEditMode||S)return;const _=bt.current;let Y=null,se=null;try{Y=(_==null?void 0:_.contentDocument)??null,se=(_==null?void 0:_.contentWindow)??null}catch{return}if(!Y||!se||Y.querySelectorAll(".caption-group").length===0)return;let me=null;const we=Y.querySelectorAll("[data-composition-src], [data-composition-file]");for(const xt of we){const rt=xt.getAttribute("data-composition-src")||xt.getAttribute("data-composition-file");if(rt&&rt.includes("captions")){me=rt;break}}if(!me){for(const[xt,rt]of x)if(xt.includes("caption")||rt.includes("caption")){me=rt;break}}if(!me&&(u!=null&&u.includes("captions"))&&(me=u),!me){const xt=Y.querySelector('[data-composition-id*="caption"]');if(xt){const rt=xt.getAttribute("data-composition-id")||"";me=x.get(rt)||null}}if(!me)return;S=!0;const lt=me;fetch(`/api/projects/${n}/files/${encodeURIComponent(lt)}`).then(xt=>xt.json()).then(xt=>{if(!xt.content||!Y||!se||Xt.getState().isEditMode)return;const rt=Y.querySelector("[data-composition-id]"),St=parseInt((rt==null?void 0:rt.getAttribute("data-width"))??"1920",10),Dn=parseInt((rt==null?void 0:rt.getAttribute("data-height"))??"1080",10),$t=parseFloat((rt==null?void 0:rt.getAttribute("data-duration"))??"0"),Ur=JR(Y,se,xt.content,St,Dn,$t);if(!Ur)return;const di=Xt.getState();di.setModel(Ur),di.setSourceFilePath(lt),di.setEditMode(!0),M.loadOverrides()}).catch(()=>{}).finally(()=>{S=!1})},R=_=>{const Y=_.data;(Y==null?void 0:Y.source)==="hf-preview"&&((Y==null?void 0:Y.type)==="state"||(Y==null?void 0:Y.type)==="timeline")&&C()};return window.addEventListener("message",R),C(),()=>{window.removeEventListener("message",R)}},[u,n,x,M]),d.useEffect(()=>{k&&K(!$)},[$,k]);const[ce,je]=d.useState(null);On(()=>{const S=C=>{const R=C.data;if((R==null?void 0:R.source)!=="hf-preview"||(R==null?void 0:R.type)!=="stage-size")return;const{width:_,height:Y}=R;!(_>0)||!(Y>0)||je(se=>se&&se.width===_&&se.height===Y?se:{width:_,height:Y})};return window.addEventListener("message",S),()=>window.removeEventListener("message",S)});const[Se,Me]=d.useState(!1),[ct,fn]=d.useState(null),[Mn,ze]=d.useState(!0),[Pt,pt]=d.useState(0),vt=d.useRef(0),dt=d.useRef(null),Rt=d.useRef(0),en=d.useRef(0),Qt=d.useRef([]),te=d.useRef(null),ne=d.useRef(void 0),Ke=d.useRef(null),Ze=d.useRef(null),Je=d.useRef(null),Et=u?`/api/projects/${n}/preview/comp/${u}`:null,mt=!u||u==="index.html",wt=Re(S=>S.zoomMode),ft=Re(S=>S.manualZoomPercent),st=Re(S=>S.setZoomMode),_e=Re(S=>S.setManualZoomPercent),At=Re(S=>S.currentTime),ut=Re(S=>S.elements),zt=Re(S=>S.selectedElementId),Tt=Re(S=>S.setSelectedElementId),jt=Re(S=>S.duration),cn=d.useMemo(()=>{const S=ut.length>0?Math.max(...ut.map(C=>C.start+C.duration)):0;return Math.max(jt,S)},[jt,ut]),yn=d.useMemo(()=>Id(wt,ft),[wt,ft]),hn=d.useCallback(()=>{ze(S=>!S)},[]),Nt=d.useCallback(()=>{j(S=>!S)},[]),Yn=d.useCallback(()=>{pt(Re.getState().currentTime)},[]);On(()=>(pt(Re.getState().currentTime),Ni.subscribe(pt)));const Or=n?p5({projectId:n,compositionPath:u,currentTime:Pt}):"#",Br=m5(u,Pt);On(()=>()=>{dt.current&&clearTimeout(dt.current)});const tr=d.useCallback(S=>{pA(S)&&(S.preventDefault(),hn())},[hn]),nr=d.useCallback(S=>{var C;(C=ne.current)==null||C.call(ne,S)},[]),Ps=d.useCallback(S=>{const C=(S==null?void 0:S.contentWindow)??null;te.current!==C&&(te.current&&te.current.removeEventListener("keydown",nr),te.current=C,C==null||C.addEventListener("keydown",nr,!0))},[nr]);d.useEffect(()=>()=>{te.current&&(te.current.removeEventListener("keydown",nr),te.current=null)},[nr]);const Xa=d.useCallback((S,C)=>{var se;const R=it.current;if(!R)return null;let _=S.compositionSrc;if(_&&x.size>0){const de=x.get(S.id)||x.get(_.replace(/^compositions\//,"").replace(/\.html$/,""));de&&(_=de)}if(_)return p.jsx(fp,{previewUrl:`/api/projects/${R}/preview/comp/${_}`,label:pa(S),labelColor:C.label,accentColor:C.clip,seekTime:0,duration:S.duration});if(Et&&S.duration>0)return p.jsx(fp,{previewUrl:Et,label:pa(S),labelColor:C.label,accentColor:C.clip,selector:S.selector,selectorIndex:S.selectorIndex,seekTime:S.start,duration:S.duration});const Y=S.duration>0&&cn>0&&S.duration<cn*.92&&!/(backdrop|background|overlay|scrim|mask)/i.test(S.id);if(S.tag==="audio"){const de=`/api/projects/${R}/preview/`,me=(se=S.src)!=null&&se.startsWith("http")?S.src.indexOf(de):-1,we=S.src?me!==-1?decodeURIComponent(S.src.slice(me+de.length)):S.src.startsWith("http")?null:S.src:null,lt=we?`/api/projects/${R}/preview/${we}`:S.src??"",xt=we?`/api/projects/${R}/waveform/${we}`:void 0;return p.jsx(RR,{audioUrl:lt,waveformUrl:xt,label:pa(S),labelColor:C.label})}if((S.tag==="video"||S.tag==="img")&&S.src){const de=S.src.startsWith("http")?S.src:`/api/projects/${R}/preview/${S.src}`;return p.jsx(p9,{videoSrc:de,label:pa(S),labelColor:C.label,duration:S.duration})}return Y?p.jsx(fp,{previewUrl:`/api/projects/${R}/preview`,label:pa(S),labelColor:C.label,accentColor:C.clip,selector:S.selector,selectorIndex:S.selectorIndex,seekTime:S.start,duration:S.duration}):null},[x,Et,cn]),io=p.jsx("div",{className:"border-b border-neutral-800/40 bg-neutral-950/96",children:p.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-500",children:"Timeline"}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{type:"button",onClick:()=>st("fit"),className:`h-7 px-2.5 rounded-md border text-[11px] font-medium transition-colors ${wt==="fit"?"border-studio-accent/30 bg-studio-accent/10 text-studio-accent":"border-neutral-800 text-neutral-400 hover:border-neutral-700 hover:text-neutral-200"}`,title:"Fit timeline to width",children:"Fit"}),p.jsx("button",{type:"button",onClick:()=>{st("manual"),_e(k4("out",wt,ft))},className:"h-7 w-7 rounded-md border border-neutral-800 text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-200",title:"Zoom out",children:"-"}),p.jsx("div",{className:"min-w-[58px] text-center text-[10px] font-medium tabular-nums text-neutral-500",children:`${yn}%`}),p.jsx("button",{type:"button",onClick:()=>{st("manual"),_e(k4("in",wt,ft))},className:"h-7 w-7 rounded-md border border-neutral-800 text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-200",title:"Zoom in",children:"+"}),p.jsx("button",{type:"button",onClick:hn,className:"ml-1 flex h-7 w-7 items-center justify-center rounded-md text-neutral-500 transition-colors hover:bg-neutral-900 hover:text-neutral-200",title:R3(!0),"aria-label":"Hide timeline editor",children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("path",{d:"M5 7h14"}),p.jsx("path",{d:"m8 11 4 4 4-4"})]})})]})]})}),[ki,xr]=d.useState(null),[As,Fi]=d.useState(null),[ic,so]=d.useState(!1),[Pi,rr]=d.useState(0),[,zi]=d.useState(0),Hi=d.useRef(null),$s=d.useRef(null),it=d.useRef(n),bt=d.useRef(null),yr=d.useRef([]),ai=d.useRef(null),Ut=d.useRef(L),vn=d.useRef(ye),Wi=d.useRef($e),bn=d.useRef(0),B=d.useRef(0),Pe=d.useRef(Promise.resolve()),ke=d.useRef(Ml()),xe=d.useRef(0),We=d.useRef(jl()),be=d.useRef(0),Lt=d.useRef(async()=>{}),pn=d.useRef(async()=>{}),Yt=d.useRef(n),wn=d.useRef(u);wn.current=u;const Ln=d.useCallback(S=>{const C=Pe.current.catch(()=>{}).then(S);return Pe.current=C.then(()=>{},()=>{}),C},[]),ir=d.useCallback(async()=>{await Pe.current.catch(()=>{})},[]);On(()=>{const S=R=>{const _=vL(R),Y=Date.now()-bn.current<1200;if(bL(_)){Y||Lt.current(bt.current,{forceFromDisk:!0});return}if(QV(_)){Y||pn.current(bt.current,{forceFromDisk:!0});return}Y||(Hi.current&&clearTimeout(Hi.current),Hi.current=setTimeout(()=>rr(se=>se+1),400))},C=new EventSource("/api/events");return C.addEventListener("file-change",S),()=>C.close()}),it.current=n,Ut.current=L,vn.current=ye,Wi.current=$e,d.useEffect(()=>{const S=Yt.current;Yt.current=n,!(!S||S===n)&&(ke.current=Ml(),xe.current+=1,We.current=jl(),be.current+=1,zi(C=>C+1))},[n]),d.useEffect(()=>{if(!n)return;let S=!1;return fetch(`/api/projects/${n}`).then(C=>C.json()).then(C=>{!S&&C.files&&O(C.files),S||c(typeof C.dir=="string"?C.dir:null)}).catch(()=>{S||c(null)}),()=>{S=!0}},[n]);const qn=d.useCallback(S=>{const C=it.current;if(C){if(A(R=>Math.max(R,Math.floor(window.innerWidth*.5))),P4(S)){s({path:S,content:null});return}fetch(`/api/projects/${C}/files/${encodeURIComponent(S)}`).then(R=>R.json()).then(R=>{R.content!=null&&s({path:S,content:R.content})}).catch(()=>{})}},[]),Tr=d.useRef(i==null?void 0:i.path);Tr.current=i==null?void 0:i.path;const Zt=pN({projectId:n}),li=d.useCallback(async S=>{const C=it.current;if(!C)throw new Error("No active project");const R=await fetch(`/api/projects/${C}/files/${encodeURIComponent(S)}`);if(!R.ok)throw new Error(`Failed to read ${S}`);const _=await R.json();if(typeof _.content!="string")throw new Error(`Missing file contents for ${S}`);return _.content},[]),tn=d.useCallback(async(S,C)=>{const R=it.current;if(!R)throw new Error("No active project");if(!(await fetch(`/api/projects/${R}/files/${encodeURIComponent(S)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:C})).ok)throw new Error(`Failed to save ${S}`);Tr.current===S&&s({path:S,content:C})},[]),Vn=d.useCallback(async S=>{const C=it.current;if(!C)throw new Error("No active project");const R=await fetch(`/api/projects/${C}/files/${encodeURIComponent(S)}`);if(R.status===404)return"";if(!R.ok)throw new Error(`Failed to read ${S}`);const _=await R.json();return typeof _.content=="string"?_.content:""},[]),_t=d.useCallback(S=>{const C=it.current;if(!C)return;const R=Tr.current;R&&($s.current&&clearTimeout($s.current),$s.current=setTimeout(()=>{bn.current=Date.now(),Fs({projectId:C,label:"Edit source",kind:"source",coalesceKey:`source:${R}`,files:{[R]:S},readFile:li,writeFile:tn,recordEdit:Zt.recordEdit}).then(()=>{Hi.current&&clearTimeout(Hi.current),Hi.current=setTimeout(()=>rr(_=>_+1),600)}).catch(()=>{})},600))},[Zt.recordEdit,li,tn]),Fa=d.useCallback(async(S,C)=>{const R=it.current;if(!R)throw new Error("No active project");const _=S.sourceFile||u||"index.html",Y=await fetch(`/api/projects/${R}/files/${encodeURIComponent(_)}`);if(!Y.ok)throw new Error(`Failed to read ${_}`);const de=(await Y.json()).content;if(typeof de!="string")throw new Error(`Missing file contents for ${_}`);const me=S.domId?{id:S.domId,selector:S.selector,selectorIndex:S.selectorIndex}:S.selector?{selector:S.selector,selectorIndex:S.selectorIndex}:null;if(!me)throw new Error(`Timeline element ${S.id} is missing a patchable target`);const we=_,lt=ut.map(St=>(St.key??St.id)===(S.key??S.id)?{...St,start:C.start,track:C.track}:St).filter(St=>(St.sourceFile||u||"index.html")===we),xt=up(lt.map(St=>St.track));let rt=Is(de,me,{type:"attribute",property:"start",value:fa(C.start)});rt=Is(rt,me,{type:"attribute",property:"track-index",value:String(C.track)});for(const St of lt){const Dn=St.domId?{id:St.domId,selector:St.selector,selectorIndex:St.selectorIndex}:St.selector?{selector:St.selector,selectorIndex:St.selectorIndex}:null;if(!Dn)continue;const $t=xt.get(St.track);$t!=null&&(rt=Is(rt,Dn,{type:"inline-style",property:"z-index",value:String($t)}))}if(rt===de)throw new Error(`Unable to patch timeline element ${S.id} in ${_}`);bn.current=Date.now(),await Fs({projectId:R,label:"Move timeline clip",kind:"timeline",files:{[_]:rt},readFile:async()=>de,writeFile:tn,recordEdit:Zt.recordEdit}),rr(St=>St+1)},[u,Zt.recordEdit,ut,tn]),sc=d.useCallback(async(S,C)=>{const R=it.current;if(!R)throw new Error("No active project");const _=S.sourceFile||u||"index.html",Y=await fetch(`/api/projects/${R}/files/${encodeURIComponent(_)}`);if(!Y.ok)throw new Error(`Failed to read ${_}`);const de=(await Y.json()).content;if(typeof de!="string")throw new Error(`Missing file contents for ${_}`);const me=S.domId?{id:S.domId,selector:S.selector,selectorIndex:S.selectorIndex}:S.selector?{selector:S.selector,selectorIndex:S.selectorIndex}:null;if(!me)throw new Error(`Timeline element ${S.id} is missing a patchable target`);const we=S.playbackStartAttr==="playback-start"?"playback-start":"media-start",lt=h5(de,me,"playback-start")??h5(de,me,"media-start"),xt=lt!=null?parseFloat(lt):void 0,rt=C.start-S.start,St=C.playbackStart==null&&rt!==0&&Number.isFinite(xt)&&xt!=null?Math.max(0,xt+rt*Math.max(S.playbackRate??1,.1)):void 0,Dn=C.playbackStart??St;let $t=de;if($t=Is($t,me,{type:"attribute",property:"start",value:fa(C.start)}),$t=Is($t,me,{type:"attribute",property:"duration",value:fa(C.duration)}),Dn!=null&&($t=Is($t,me,{type:"attribute",property:we,value:fa(Dn)})),$t===de)throw new Error(`Unable to patch timeline element ${S.id} in ${_}`);bn.current=Date.now(),await Fs({projectId:R,label:"Resize timeline clip",kind:"timeline",files:{[_]:$t},readFile:async()=>de,writeFile:tn,recordEdit:Zt.recordEdit}),rr(Ur=>Ur+1)},[u,Zt.recordEdit,tn]),ht=d.useCallback((S,C="error")=>{dt.current&&clearTimeout(dt.current),fn({message:S,tone:C}),dt.current=setTimeout(()=>fn(null),4e3)},[]),Bt=d.useCallback(async S=>{if(!n)return;S.preventDefault();const C=Re.getState().currentTime;pt(C),await ir();const R=p5({projectId:n,compositionPath:u,currentTime:C}),_=m5(u,C);try{const Y=await fetch(R,{cache:"no-store"});if(!Y.ok)throw new Error(`Capture failed (${Y.status})`);const se=await Y.blob(),de=URL.createObjectURL(se),me=document.createElement("a");me.href=de,me.download=_,document.body.appendChild(me),me.click(),me.remove(),setTimeout(()=>URL.revokeObjectURL(de),0)}catch(Y){const se=Y instanceof Error?Y.message:"Capture failed";ht(se)}},[u,n,ht,ir]),vr=d.useCallback(async S=>{const C=it.current;if(!C)throw new Error("No active project");const R=pa(S);if(!by(R,"timeline clip"))return;const _=S.sourceFile||u||"index.html";try{const Y=await fetch(`/api/projects/${C}/files/${encodeURIComponent(_)}`);if(!Y.ok)throw new Error(`Failed to read ${_}`);const de=(await Y.json()).content;if(typeof de!="string")throw new Error(`Missing file contents for ${_}`);const me=S.domId?{id:S.domId,selector:S.selector,selectorIndex:S.selectorIndex}:S.selector?{selector:S.selector,selectorIndex:S.selectorIndex}:null;if(!me)throw new Error(`Timeline element ${S.id} is missing a patchable target`);const we=_||"index.html",lt=ut.filter($t=>($t.key??$t.id)!==(S.key??S.id)&&($t.sourceFile||u||"index.html")===we),xt=up(lt.map($t=>$t.track)),rt=await fetch(`/api/projects/${C}/file-mutations/remove-element/${encodeURIComponent(_)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:me})});if(!rt.ok)throw new Error(`Failed to delete ${S.id} from ${_}`);const St=await rt.json();let Dn=typeof St.content=="string"?St.content:de;for(const $t of lt){const Ur=$t.domId?{id:$t.domId,selector:$t.selector,selectorIndex:$t.selectorIndex}:$t.selector?{selector:$t.selector,selectorIndex:$t.selectorIndex}:null;if(!Ur)continue;const di=xt.get($t.track);di!=null&&(Dn=Is(Dn,Ur,{type:"inline-style",property:"z-index",value:String(di)}))}bn.current=Date.now(),await Fs({projectId:C,label:"Delete timeline clip",kind:"timeline",files:{[_]:Dn},readFile:async()=>de,writeFile:tn,recordEdit:Zt.recordEdit}),Re.getState().setElements(ut.filter($t=>($t.key??$t.id)!==(S.key??S.id))),Re.getState().setSelectedElementId(null),rr($t=>$t+1),ht(`Deleted ${R}. Use Undo to restore it.`,"info")}catch(Y){const se=Y instanceof Error?Y.message:"Failed to delete timeline clip";ht(se)}},[u,Zt.recordEdit,ht,ut,tn]),Bi=d.useCallback(async S=>{const C=it.current;if(!C)return;const R=S.label||S.id||S.selector||S.tagName;if(!by(R,"element"))return;const _=S.sourceFile||u||"index.html";try{const Y=await fetch(`/api/projects/${C}/files/${encodeURIComponent(_)}`);if(!Y.ok)throw new Error(`Failed to read ${_}`);const de=(await Y.json()).content;if(typeof de!="string")throw new Error(`Missing file contents for ${_}`);const me=S.id?{id:S.id,selector:S.selector,selectorIndex:S.selectorIndex}:S.selector?{selector:S.selector,selectorIndex:S.selectorIndex}:{};if(!me.id&&!me.selector)throw new Error("Selected element has no patchable target");const we=await fetch(`/api/projects/${C}/file-mutations/remove-element/${encodeURIComponent(_)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:me})});if(!we.ok)throw new Error(`Failed to delete element from ${_}`);const lt=await we.json(),xt=typeof lt.content=="string"?lt.content:de;bn.current=Date.now(),await Fs({projectId:C,label:"Delete element",kind:"timeline",files:{[_]:xt},readFile:async()=>de,writeFile:tn,recordEdit:Zt.recordEdit}),Ut.current=null,vn.current=[],le(null),Oe([]),Re.getState().setSelectedElementId(null),rr(rt=>rt+1),ht(`Deleted ${R}. Use Undo to restore it.`,"info")}catch(Y){const se=Y instanceof Error?Y.message:"Failed to delete element";ht(se)}},[u,Zt.recordEdit,ht,tn]),Ai=d.useRef(tr);Ai.current=tr;const Yi=d.useRef(vr);Yi.current=vr;const Mr=d.useRef(Bi);Mr.current=Bi,ne.current=S=>{var C,R;if(Ai.current(S),S.metaKey||S.ctrlKey){if(!$y(S.target)){const _=S.key.toLowerCase();if(_==="z"&&!S.shiftKey){S.preventDefault(),ac.current();return}if(_==="z"&&S.shiftKey||S.ctrlKey&&!S.metaKey&&_==="y"){S.preventDefault(),lc.current();return}}if(S.key==="1"){S.preventDefault(),(C=Ke.current)==null||C.selectTab("compositions");return}if(S.key==="2"){S.preventDefault(),(R=Ke.current)==null||R.selectTab("assets");return}}if((S.key==="Delete"||S.key==="Backspace")&&!S.metaKey&&!S.ctrlKey&&!S.altKey&&!Z3(S.target)){const{selectedElementId:_,elements:Y}=Re.getState();if(_){const de=Y.find(me=>(me.key??me.id)===_);if(de){S.preventDefault(),Yi.current(de);return}}const se=Ut.current;se&&(S.preventDefault(),Mr.current(se))}},d.useEffect(()=>{function S(C){var R;(R=ne.current)==null||R.call(ne,C)}return window.addEventListener("keydown",S,!0),()=>window.removeEventListener("keydown",S,!0)},[]);const qi=d.useCallback(S=>{const C=Date.now();C-Rt.current<1500||(Rt.current=C,ht("This clip can’t be moved or resized from the timeline yet.","info"))},[ht]),Ui=d.useCallback(S=>{const C=Date.now();C-en.current<1500||(en.current=C,ht(S.capabilities.reasonIfDisabled??"This element can’t be adjusted directly from the preview.","info"))},[ht]),Ht=d.useCallback((S,C)=>{if(z(void 0),E(void 0),ee(null),Te(!1),!S){Ut.current=null,vn.current=[],le(null),Oe([]),Tt(null);return}if(!Zn){Ut.current=null,vn.current=[],le(null),Oe([]),Tt(null);return}const R=!!(C!=null&&C.additive),_=Ut.current,Y=vn.current,se=R?W_(Y,_):Y,de=gu(se,S),me=C!=null&&C.preserveGroup?H_(se,S):R?z_(se,S):[S],we=C!=null&&C.preserveGroup?S:R&&de?wa(_,S)?me[0]??null:gu(me,_)?_:me[0]??null:S;if(Ut.current=we,vn.current=me,le(we),Oe(me),we){(C==null?void 0:C.revealPanel)!==!1&&(K(!1),ie("design"));const lt=Cy(we,ut);Tt(lt);return}Tt(null)},[Tt,ut]),Yr=d.useCallback(()=>{Ht(null,{revealPanel:!1})},[Ht]),qr=d.useCallback(async S=>S===jo||S===Zo?Vn(S):li(S),[Vn,li]),za=d.useCallback(async(S,C)=>{await tn(S,C),(S===jo||S===Zo)&&(bn.current=Date.now())},[tn]),Qr=d.useCallback((S=bt.current)=>{var de,me,we,lt,xt,rt;if(!S)return;let C=null;try{C=S.contentDocument}catch{return}if(!C)return;const R=C,_=()=>{UL(R,ke.current,wn.current)},Y=()=>{_(),S.contentWindow&&HL(S.contentWindow,_)},se=S.contentWindow;Y(),(de=se==null?void 0:se.requestAnimationFrame)==null||de.call(se,Y),(me=se==null?void 0:se.setTimeout)==null||me.call(se,Y,80),(we=se==null?void 0:se.setTimeout)==null||we.call(se,Y,250),(lt=se==null?void 0:se.setTimeout)==null||lt.call(se,Y,500),(xt=se==null?void 0:se.setTimeout)==null||xt.call(se,Y,1e3),(rt=se==null?void 0:se.setTimeout)==null||rt.call(se,Y,2e3)},[]),$i=d.useCallback(async(S=bt.current,C)=>{const R=xe.current,_=!!(C!=null&&C.forceFromDisk||C!=null&&C.readFromDiskFirst);_||Qr(S);let Y;try{Y=await Vn(jo)}catch(se){const de=se instanceof Error?se.message:"Failed to read manual edit manifest";ht(de),_&&Qr(S);return}if(C!=null&&C.forceFromDisk||R===xe.current){ke.current=A5(Y),C!=null&&C.forceFromDisk&&(xe.current+=1),Qr(S);return}_&&Qr(S)},[Qr,Vn,ht]);Lt.current=$i;const oc=d.useCallback((S=bt.current)=>$i(S,{readFromDiskFirst:!0}),[$i]),jr=d.useCallback((S=bt.current)=>{var de,me;if(!S)return;let C=null;try{C=S.contentDocument}catch{return}if(!C)return;const R=C,_=()=>{zV(R,We.current,wn.current)},Y=()=>{_(),S.contentWindow&&HV(S.contentWindow,_)},se=S.contentWindow;(de=se==null?void 0:se.requestAnimationFrame)==null||de.call(se,Y),(me=se==null?void 0:se.setTimeout)==null||me.call(se,Y,120)},[]),Gi=d.useCallback(async(S=bt.current,C)=>{const R=be.current,_=!!(C!=null&&C.forceFromDisk||C!=null&&C.readFromDiskFirst);_||jr(S);let Y;try{Y=await Vn(Zo)}catch(se){const de=se instanceof Error?se.message:"Failed to read motion manifest";ht(de),_&&jr(S);return}if(C!=null&&C.forceFromDisk||R===be.current){We.current=J5(Y),C!=null&&C.forceFromDisk&&(be.current+=1),zi(se=>se+1),jr(S);return}_&&jr(S)},[jr,Vn,ht]);pn.current=Gi;const Ha=d.useCallback((S=bt.current)=>Gi(S,{readFromDiskFirst:!0}),[Gi]),ci=d.useCallback((S,C)=>{const R=ke.current,_=S(R),Y=om(R);if(om(_)===Y)return;const de=xe.current+1;xe.current=de,ke.current=_,Qr(bt.current),Ln(async()=>{const we=await Vn(jo),lt=A5(we),xt=S(lt),rt=om(xt);if(rt===we)return;const St=it.current;if(!St)throw new Error("No active project");bn.current=Date.now(),await Fs({projectId:St,label:C.label,kind:"manual",coalesceKey:C.coalesceKey,files:{[jo]:rt},readFile:async()=>we,writeFile:tn,recordEdit:Zt.recordEdit}),bn.current=Date.now(),xe.current===de&&(ke.current=xt,Qr(bt.current))}).catch(we=>{xe.current===de&&(xe.current+=1,ke.current=R,Qr(bt.current));const lt=we instanceof Error?we.message:"Failed to save manual edit";ht(lt)})},[Qr,Zt.recordEdit,Ln,Vn,ht,tn]),Ki=d.useCallback((S,C)=>{const R=We.current,_=S(R),Y=ym(R);if(ym(_)===Y)return;const de=be.current+1;be.current=de,We.current=_,zi(we=>we+1),jr(bt.current),Ln(async()=>{const we=await Vn(Zo),lt=J5(we),xt=S(lt),rt=ym(xt);if(rt===we)return;const St=it.current;if(!St)throw new Error("No active project");bn.current=Date.now(),await Fs({projectId:St,label:C.label,kind:"motion",coalesceKey:C.coalesceKey,files:{[Zo]:rt},readFile:async()=>we,writeFile:tn,recordEdit:Zt.recordEdit}),bn.current=Date.now(),be.current===de&&(We.current=xt,zi(Dn=>Dn+1),jr(bt.current))}).catch(we=>{be.current===de&&(be.current+=1,We.current=R,zi(xt=>xt+1),jr(bt.current));const lt=we instanceof Error?we.message:"Failed to save motion edit";ht(lt)})},[jr,Zt.recordEdit,Ln,Vn,ht,tn]),Ji=d.useCallback(async S=>{const C=S??[],R=C.length>0&&C.every(Y=>Y===jo),_=C.length>0&&C.every(Y=>Y===Zo);if(R){await $i(bt.current,{forceFromDisk:!0});return}if(_){await Gi(bt.current,{forceFromDisk:!0});return}rr(Y=>Y+1)},[$i,Gi]),es=d.useCallback(async()=>{await ir();const S=await Zt.undo({readFile:qr,writeFile:za});if(!S.ok&&S.reason==="content-mismatch"){ht("File changed outside Studio. Undo history was not applied.","info");return}S.ok&&S.label&&(Yr(),await Ji(S.paths),ht(`Undid ${S.label}`,"info"))},[Yr,Zt,qr,ht,Ji,ir,za]),oo=d.useCallback(async()=>{await ir();const S=await Zt.redo({readFile:qr,writeFile:za});if(!S.ok&&S.reason==="content-mismatch"){ht("File changed outside Studio. Redo history was not applied.","info");return}S.ok&&S.label&&(Yr(),await Ji(S.paths),ht(`Redid ${S.label}`,"info"))},[Yr,Zt,qr,ht,Ji,ir,za]),ac=d.useRef(es),lc=d.useRef(oo);ac.current=es,lc.current=oo;const Cs=d.useCallback(S=>{if(!(S.metaKey||S.ctrlKey)||$y(S.target))return;const C=S.key.toLowerCase();if(C==="z"&&!S.shiftKey){S.preventDefault(),ac.current();return}(C==="z"&&S.shiftKey||S.ctrlKey&&!S.metaKey&&C==="y")&&(S.preventDefault(),lc.current())},[]),ts=d.useCallback(S=>{var _;(_=Ze.current)==null||_.call(Ze),Ze.current=null;const C=(S==null?void 0:S.contentWindow)??null;let R=null;try{R=(S==null?void 0:S.contentDocument)??null}catch{R=null}!C&&!R||(C==null||C.addEventListener("keydown",Cs,!0),R==null||R.addEventListener("keydown",Cs,!0),Ze.current=()=>{C==null||C.removeEventListener("keydown",Cs,!0),R==null||R.removeEventListener("keydown",Cs,!0)})},[Cs]);d.useEffect(()=>()=>{var S;(S=Ze.current)==null||S.call(Ze),Ze.current=null},[]);const $n=d.useCallback((S,C)=>cL(S,{activeCompositionPath:u,isMasterView:mt,preferClipAncestor:C==null?void 0:C.preferClipAncestor}),[u,mt]),Go=d.useCallback((S,C,R)=>{const _=bt.current;if(!_||k)return null;const Y=X_(_,S,C,u);return Y?$n(Y,{preferClipAncestor:R==null?void 0:R.preferClipAncestor}):null},[u,$n,k]),sn=d.useCallback(S=>{wa(Wi.current,S)||(Wi.current=S,pe(S))},[]),ui=d.useCallback(S=>{const C=bt.current;let R=null;try{R=(C==null?void 0:C.contentDocument)??null}catch{return null}if(!R)return null;const _=uL(R,S,{activeCompositionPath:u,compIdToSrc:x,isMasterView:mt});return _?$n(_,{preferClipAncestor:!1}):null},[u,$n,x,mt]),sr=d.useMemo(()=>ut.find(S=>Ol(S)===fe)??null,[fe,ut]),Ju=d.useMemo(()=>{const S=new Map;if(!tu||!sr)return S;const C=Ol(sr);if(C){const R=ui(sr),_=eL(R==null?void 0:R.element,{activeCompositionPath:u});_>0&&S.set(C,_)}return S},[u,ui,sr,mt,Ve]),Ko=d.useMemo(()=>{if(!tu||!sr)return[];const S=ui(sr);return tL(S==null?void 0:S.element,{activeCompositionPath:u})},[u,ui,sr,mt,Ve]),Wa=d.useMemo(()=>L?vS(L):null,[L]),e0=d.useCallback(S=>{if(!Zn)return;if(!S){Ht(null,{revealPanel:!1}),Ee(null);return}const C=ui(S);C&&Ht(C);const R=Ol(S);if(tu&&R&&Qm(S)){Ee(R),j(!1);const _=bt.current;$4(At,S)||$m(_,S.start)}else Ee(null)},[Ht,ui,At]),br=d.useCallback(S=>{if(!tu||!Zn)return;if(!Qm(S)){ht("Audio clips do not have visual layers.","info");return}const C=Ol(S);if(!C)return;Ee(Y=>Y===C?null:C),j(!1);const R=bt.current;$4(At,S)||$m(R,S.start);const _=ui(S);_&&Ht(_)},[Ht,ui,At,ht]),ao=d.useCallback(S=>{if(!Zn)return;const C=bt.current,R=qS(C==null?void 0:C.contentWindow),_=Y_(S.element,sr,R);_!=null&&$m(C,_);const Y=$n(S.element,{preferClipAncestor:!1});if(!Y){ht("Studio could not resolve this nested layer.","error");return}Ht(Y),requestAnimationFrame(Ue)},[Ht,$n,sr,Ue,ht]),cc=d.useCallback(()=>{Ee(null)},[]),ns=d.useCallback(async S=>{const C=it.current;if(!C)return;const R=S.sourceFile||u||"index.html";try{const _=await fetch(`/api/projects/${C}/files/${encodeURIComponent(R)}`);if(!_.ok)return;const se=(await _.json()).content,de=typeof se=="string"?xN(se,S):void 0;z(me=>Ut.current!==S?me:de)}catch{}},[u]),Ba=d.useCallback(S=>{const C=N_(S);if(!C)return null;const R=Qt.current.find(Y=>Y.family.toLowerCase()===C.toLowerCase());if(R)return R;const _=m.find(Y=>n1.test(Y)&&Ql(Y).toLowerCase()===C.toLowerCase());return _?{family:Ql(_),path:_,url:`/api/projects/${n}/preview/${_}`}:null},[m,n]),rs=d.useCallback(async(S,C,R)=>{const _=it.current;if(!_)throw new Error("No active project");if(R!=null&&R.shouldSave&&!R.shouldSave())return;const Y=S.sourceFile||u||"index.html",se=await fetch(`/api/projects/${_}/files/${encodeURIComponent(Y)}`);if(!se.ok)throw new Error(`Failed to read ${Y}`);const me=(await se.json()).content;if(typeof me!="string")throw new Error(`Missing file contents for ${Y}`);let we=me;for(const lt of C)we=Is(we,S,lt);if(R!=null&&R.prepareContent&&(we=R.prepareContent(we,Y)),!(R!=null&&R.shouldSave&&!R.shouldSave())){if(we===me)throw new Error(`Unable to patch ${S.selector??S.id??"selection"}`);await Fs({projectId:_,label:(R==null?void 0:R.label)??"Edit layer",kind:"manual",coalesceKey:R==null?void 0:R.coalesceKey,files:{[Y]:we},readFile:async()=>me,writeFile:tn,recordEdit:Zt.recordEdit}),R!=null&&R.skipRefresh?bn.current=Date.now():rr(lt=>lt+1)}},[u,Zt.recordEdit,tn]),_n=d.useCallback(S=>{const C=bt.current;let R=null;try{R=(C==null?void 0:C.contentDocument)??null}catch{return}if(!R)return;const _=ji(R,S,u);if(!_)return;const Y=$n(_);Y&&Ht(Y,{revealPanel:!1,preserveGroup:!0})},[u,Ht,$n]),lo=d.useCallback(S=>{const C=bt.current;let R=null;try{R=(C==null?void 0:C.contentDocument)??null}catch{return}if(!R)return;const _=[];for(const de of S){const me=ji(R,de,u);if(!me)continue;const we=$n(me);we&&_.push(we)}if(_.length===0)return;const Y=Ut.current,se=_.find(de=>wa(de,Y))??_[0]??null;z(void 0),Te(!1),Ut.current=se,vn.current=_,le(se),Oe(_),Tt(se?Cy(se,ut):null)},[u,$n,Tt,ut]),Ya=d.useCallback(()=>{const S=q_(bt.current),C=Re.getState();C.setIsPlaying(!1),S!=null&&(C.setCurrentTime(S),Ni.notify(S))},[]),uc=d.useCallback((S,C)=>{ci(R=>$5(R,S,C),{label:"Move layer",coalesceKey:`path-offset:${zs(S)}`}),_n(S)},[ci,_n]),kf=d.useCallback(S=>{if(S.length===0)return;const C=S.map(R=>zs(R.selection)).sort().join(":");ci(R=>S.reduce((_,Y)=>$5(_,Y.selection,Y.next),R),{label:`Move ${S.length} layers`,coalesceKey:`group-path-offset:${C}`}),lo(vn.current)},[ci,lo]),t0=d.useCallback((S,C)=>{ci(R=>wL(R,S,C),{label:"Resize layer box",coalesceKey:`box-size:${zs(S)}`}),_n(S)},[ci,_n]),Pf=d.useCallback((S,C)=>{ci(R=>SL(R,S,C),{label:"Rotate layer",coalesceKey:`rotation:${zs(S)}`}),_n(S)},[ci,_n]),dc=d.useCallback(S=>{ci(C=>kL(C,S),{label:"Reset layer edits",coalesceKey:`manual-reset:${zs(S)}`}),Qr(bt.current),_n(S)},[Qr,ci,_n]),Af=d.useCallback((S,C)=>{Ki(R=>jV(R,S,C),{label:"Set GSAP motion",coalesceKey:`motion:${zs(S)}`}),_n(S)},[Ki,_n]),$f=d.useCallback(S=>{Ki(C=>ZV(C,S),{label:"Clear GSAP motion",coalesceKey:`motion:${zs(S)}`}),jr(bt.current),_n(S)},[jr,Ki,_n]),fc=d.useCallback(async(S,C)=>{if(!L||D_(S)||!L.capabilities.canEditStyles)return;const R=S==="font-family"?Ba(C):null,_=bt.current,Y=_==null?void 0:_.contentDocument;if(Y){const de=ji(Y,L,u);de&&(de.style.setProperty(S,km(S,C)),S==="font-family"&&(wy(Y,C),R&&Sy(Y,R)),S==="background-image"&&Ay(C)&&(de.style.setProperty("background-position","center"),de.style.setProperty("background-repeat","no-repeat"),de.style.setProperty("background-size","contain")))}const se=[A1(S,km(S,C))];S==="background-image"&&Ay(C)&&se.push(A1("background-position","center"),A1("background-repeat","no-repeat"),A1("background-size","contain"));try{await rs(L,se,{label:"Edit layer style",skipRefresh:!0,prepareContent:R?(de,me)=>Py(de,R,me):void 0})}catch(de){console.warn("[Studio] Style persist failed:",de instanceof Error?de.message:de)}_n(L)},[u,L,rs,_n,Ba]),hc=d.useCallback(async(S,C)=>{if(!L||!SS(L))return;const R=B.current+1;B.current=R;const _=L.textFields.length>0?L.textFields.map(me=>me.key===C?{...me,value:S}:me):[],Y=_.length>1||_.some(me=>me.source==="child")?w5(_):S,se=bt.current,de=se==null?void 0:se.contentDocument;if(de){const me=ji(de,L,u);me&&(_.length>1||_.some(we=>we.source==="child")?me.innerHTML=Y:me.textContent=S)}if(await rs(L,[S5(Y)],{label:"Edit text",skipRefresh:!0,shouldSave:()=>B.current===R}),B.current===R&&de){const me=ji(de,L,u);if(me){const we=$n(me);we&&Ht(we,{revealPanel:!1,preserveGroup:!0})}}},[u,Ht,$n,L,rs]),co=d.useCallback(async(S,C,R)=>{var me;const _=C.length>1||C.some(we=>we.source==="child")?w5(C):((me=C[0])==null?void 0:me.value)??"",Y=bt.current,se=Y==null?void 0:Y.contentDocument;if(se){const we=ji(se,S,u);we&&(C.length>1||C.some(lt=>lt.source==="child")?we.innerHTML=_:we.textContent=_)}const de=(R==null?void 0:R.importedFont)??null;if(await rs(S,[S5(_)],{label:"Edit text",skipRefresh:!0,prepareContent:de?(we,lt)=>Py(we,de,lt):void 0}),se){const we=ji(se,S,u);if(we){const lt=$n(we);lt&&Ht(lt,{revealPanel:!1,preserveGroup:!0})}}},[u,Ht,$n,rs]),n0=d.useCallback(async(S,C,R)=>{var me;if(!L)return;const _=L.textFields.find(we=>we.key===S);if(!_)return;if(_.source==="self"){await fc(C,R);return}const Y=km(C,R),se=C==="font-family"?Ba(R):null;if(C==="font-family"){const we=(me=bt.current)==null?void 0:me.contentDocument;we&&(wy(we,Y),se&&Sy(we,se))}const de=L.textFields.map(we=>we.key===S?{...we,inlineStyles:{...we.inlineStyles,[C]:Y},computedStyles:{...we.computedStyles,[C]:Y}}:we);await co(L,de,{importedFont:se})},[co,L,fc,Ba]),Cf=d.useCallback(async S=>{if(!L||!L.textFields.some(se=>se.source==="child"))return null;const C=L.textFields.findIndex(se=>se.key===S),R=L.textFields[C>=0?C:0]??L.textFields[0],_=aL(R),Y=[...L.textFields];return Y.splice(C>=0?C+1:Y.length,0,_),await co(L,Y),_.key},[co,L]),Ef=d.useCallback(async S=>{if(!L)return;const C=L.textFields.find(_=>_.key===S);if(!C)return;if(C.source==="self"){await hc("",S);return}const R=L.textFields.filter(_=>_.key!==S);await co(L,R)},[co,L,hc]),Tf=d.useCallback(()=>{L&&(z(void 0),E(void 0),ee(null),ns(L),De(!0))},[L,ns]),Mf=d.useCallback(async S=>{if(!L)return;const C=L.sourceFile||u||"index.html",R=D??L.element.outerHTML,_=hL({selection:L,currentTime:At,tagSnippet:R,selectionContext:q,userInstruction:S,sourceFilePath:__(a,C)});if(!await xu(_)){ht("Could not copy prompt to clipboard.","error");return}De(!1),E(void 0),ee(null),ai.current&&clearTimeout(ai.current),Te(!0),ai.current=setTimeout(()=>Te(!1),1600)},[u,q,D,At,L,a,ht]),pc=d.useCallback(S=>{bt.current=S,oe(S),Ps(S),ts(S),yr.current=[],Fi(null),Ue()},[Ue,ts,Ps]),Qf=d.useCallback((S,C)=>{if(!Sm||k||Le)return;const R=Go(S.clientX,S.clientY,{preferClipAncestor:(C==null?void 0:C.preferClipAncestor)??!1});if(!R){S.shiftKey||Ht(null,{revealPanel:!1});return}S.preventDefault(),S.stopPropagation();const _=bt.current?I_(bt.current,S.clientX,S.clientY):null;Ht(R,{additive:S.shiftKey}),!S.shiftKey&&_&&KN(R,_.viewport)&&(E(F_(R,_)),ee({x:S.clientX,y:S.clientY}),ns(R),De(!0))},[Ht,k,Le,ns,Go]),jf=d.useCallback((S,C)=>{if(!Sm||k||Le)return sn(null),null;const R=Go(S.clientX,S.clientY,{preferClipAncestor:(C==null?void 0:C.preferClipAncestor)??!1});return sn(R),R},[k,Le,Go,sn]),Zf=d.useCallback(()=>{sn(null)},[sn]);d.useEffect(()=>{k&&sn(null)},[k,sn]),d.useEffect(()=>{sn(null)},[u,n,G,Pi,sn]),d.useEffect(()=>{if(!$e)return;const S=wa($e,L),C=gu(ye,$e);!S&&!C||sn(null)},[ye,$e,L,sn]),d.useEffect(()=>{$e&&($e.element.isConnected||sn(null))},[$e,sn]),d.useEffect(()=>{if(!G)return;const S=()=>{if(!Zn||k)return;const _=Ut.current;if(!_)return;let Y=null;try{Y=G.contentDocument}catch{return}if(!Y)return;const se=ji(Y,_,u);if(!se){Ht(null,{revealPanel:!1});return}const de=$n(se);de&&Ht(de,{revealPanel:!1,preserveGroup:!0})},C=()=>{try{const _=G.contentWindow;if(!_||_.__hfErrorCapture)return;_.__hfErrorCapture=!0;const Y=_.console.error.bind(_.console);_.console.error=function(...se){Y(...se);const de=se.map(me=>me instanceof Error?me.message:String(me)).join(" ");de.includes("favicon")||(yr.current=[...yr.current,{severity:"error",message:de}],Fi([...yr.current]))},_.addEventListener("error",se=>{const de=se.message||String(se);yr.current=[...yr.current,{severity:"error",message:de}],Fi([...yr.current])})}catch{}};C(),ts(G),(async()=>(await oc(G),await Ha(G)))(),S(),Ue();const R=()=>{yr.current=[],Fi(null),C(),ts(G),(async()=>(await oc(G),await Ha(G)))(),S(),Ue()};return G.addEventListener("load",R),()=>{G.removeEventListener("load",R)}},[u,Ht,oc,Ha,$n,k,G,Ue,ts]),d.useEffect(()=>{k&&Ht(null,{revealPanel:!1})},[Ht,k]),d.useEffect(()=>{Zn||(sn(null),Ht(null,{revealPanel:!1}),ae!=="renders"&&ie("renders"))},[Ht,ae,sn]),d.useEffect(()=>()=>{ai.current&&clearTimeout(ai.current)},[]);const wr=d.useCallback(async()=>{const S=it.current;if(!S)return;const R=await(await fetch(`/api/projects/${S}`)).json();R.files&&O(R.files)},[]),uo=d.useCallback(async(S,C)=>{var de,me;const R=it.current,_=Array.from(S);if(!R||_.length===0)return[];const Y=new FormData;for(const we of _)Y.append("file",we);const se=C?`?dir=${encodeURIComponent(C)}`:"";try{const we=await fetch(`/api/projects/${R}/upload${se}`,{method:"POST",body:Y});if(we.ok){const lt=await we.json();if((de=lt.skipped)!=null&&de.length&&ht(`Skipped (too large): ${lt.skipped.join(", ")}`),(me=lt.invalid)!=null&&me.length){const xt=lt.invalid.map(rt=>rt.name).join(", ");ht(`Unsupported media skipped: ${xt}`)}return await wr(),rr(xt=>xt+1),Array.isArray(lt.files)?lt.files:[]}else we.status===413?ht("Upload rejected: payload too large"):ht(`Upload failed (${we.status})`)}catch{ht("Upload failed: network error")}return[]},[wr,ht]),mc=d.useCallback(async(S,C,R)=>{const _=it.current;if(!_)throw new Error("No active project");const Y=A4(S);if(!Y){ht("Only image, video, and audio assets can be dropped onto the timeline.");return}const se=u||"index.html";try{const de=await fetch(`/api/projects/${_}/files/${encodeURIComponent(se)}`);if(!de.ok)throw new Error(`Failed to read ${se}`);const we=(await de.json()).content;if(typeof we!="string")throw new Error(`Missing file contents for ${se}`);const lt=Number(fa(C.start)),xt=Number.isFinite(R)&&R!=null&&R>0?R:await Ty(_,S,Y),rt=Number(fa(xt)),St=F7(S,K_(we)),Dn=z7(se,S),$t=se||"index.html",Ur=ut.filter(or=>(or.sourceFile||u||"index.html")===$t),di=up([...Ur.map(or=>or.track),C.track]);let Ts=we;for(const or of Ur){const a0=or.domId?{id:or.domId,selector:or.selector,selectorIndex:or.selectorIndex}:or.selector?{selector:or.selector,selectorIndex:or.selectorIndex}:null;if(!a0)continue;const Ms=di.get(or.track);Ms!=null&&(Ts=Is(Ts,a0,{type:"inline-style",property:"z-index",value:String(Ms)}))}Ts=Y7(Ts,B7({id:St,assetPath:Dn,kind:Y,start:lt,duration:rt,track:C.track,zIndex:di.get(C.track)??1,geometry:W7(we)})),bn.current=Date.now(),await Fs({projectId:_,label:"Add timeline asset",kind:"timeline",files:{[se]:Ts},readFile:async()=>we,writeFile:tn,recordEdit:Zt.recordEdit}),rr(or=>or+1)}catch(de){const me=de instanceof Error?de.message:"Failed to drop asset onto timeline";ht(me)}},[u,Zt.recordEdit,ht,ut,tn]),Rf=d.useCallback(async(S,C)=>{const R=it.current;if(!R)return;const _=await uo(S);if(_.length===0)return;const Y=[];for(const de of _){const me=A4(de),we=me?await Ty(R,de,me):0;Y.push(Number(fa(we)))}const se=H7(C??{start:0,track:0},Y,ut.filter(de=>(de.sourceFile||u||"index.html")===(u||"index.html")).map(de=>({start:de.start,duration:de.duration,track:de.track})));for(const[de,me]of _.entries())await mc(me,se[de]??se[0],Y[de])},[u,mc,ut,uo]),Nf=d.useCallback(async S=>{const C=it.current;if(!C)return;let R="";S.endsWith(".html")&&(R=`<!DOCTYPE html>
|
|
102
|
-
<html>
|
|
103
|
-
<head>
|
|
104
|
-
<meta charset="UTF-8">
|
|
105
|
-
</head>
|
|
106
|
-
<body>
|
|
107
|
-
|
|
108
|
-
</body>
|
|
109
|
-
</html>
|
|
110
|
-
`);const _=await fetch(`/api/projects/${C}/files/${encodeURIComponent(S)}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:R});if(_.ok)await wr(),qn(S);else{const Y=await _.json().catch(()=>({error:"unknown"}));console.error(`Create file failed: ${Y.error}`)}},[wr,qn]),Lf=d.useCallback(async S=>{const C=it.current;if(!C)return;const R=await fetch(`/api/projects/${C}/files/${encodeURIComponent(S+"/.gitkeep")}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:""});if(R.ok)await wr();else{const _=await R.json().catch(()=>({error:"unknown"}));console.error(`Create folder failed: ${_.error}`)}},[wr]),Vf=d.useCallback(async S=>{const C=it.current;if(!C)return;const R=await fetch(`/api/projects/${C}/files/${encodeURIComponent(S)}`,{method:"DELETE"});if(R.ok)Tr.current===S&&s(null),await wr();else{const _=await R.json().catch(()=>({error:"unknown"}));console.error(`Delete failed: ${_.error}`)}},[wr]),r0=d.useCallback(async(S,C)=>{const R=it.current;if(!R)return;const _=await fetch(`/api/projects/${R}/files/${encodeURIComponent(S)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({newPath:C})});if(_.ok)Tr.current===S&&qn(C),await wr(),rr(Y=>Y+1);else{const Y=await _.json().catch(()=>({error:"unknown"}));console.error(`Rename failed: ${Y.error}`)}},[wr,qn]),gc=d.useCallback(async S=>{const C=it.current;if(!C)return;const R=await fetch(`/api/projects/${C}/duplicate-file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:S})});if(R.ok){const _=await R.json();await wr(),_.path&&qn(_.path)}else{const _=await R.json().catch(()=>({error:"unknown"}));console.error(`Duplicate failed: ${_.error}`)}},[wr,qn]),Jo=r0,Oc=d.useCallback(async(S,C)=>uo(Array.from(S),C),[uo]),i0=d.useCallback(async S=>{const C=await uo(Array.from(S).filter(Y=>n1.test(Y.name)),"assets/fonts"),R=it.current,_=C.filter(Y=>n1.test(Y)).map(Y=>({family:Ql(Y),path:Y,url:`/api/projects/${R}/preview/${Y}`}));return Qt.current=[..._,...Qt.current.filter(Y=>!_.some(se=>se.family.toLowerCase()===Y.family.toLowerCase()))],_},[uo]),s0=d.useCallback(async()=>{const S=it.current;if(S){so(!0);try{const _=((await(await fetch(`/api/projects/${S}/lint`)).json()).findings??[]).map(Y=>({severity:Y.severity==="error"?"error":"warning",message:Y.message??"",file:Y.file,fixHint:Y.fixHint}));xr(_)}catch(C){const R=C instanceof Error?C.message:String(C);xr([{severity:"error",message:`Failed to run lint: ${R}`}])}finally{so(!1)}}},[]),xc=d.useCallback((S,C)=>{C.preventDefault(),C.target.setPointerCapture(C.pointerId),Je.current={side:S,startX:C.clientX,startW:S==="left"?V:Q}},[V,Q]),yc=d.useCallback(S=>{const C=Je.current;if(!C)return;const R=S.clientX-C.startX,_=Math.floor(window.innerWidth*.5),Y=Math.max(160,Math.min(C.side==="left"?_:600,C.startW+(C.side==="left"?R:-R)));C.side==="left"?A(Y):T(Y)},[]),vc=d.useCallback(()=>{Je.current=null},[]),fo=d.useMemo(()=>m.filter(S=>S==="index.html"||S.startsWith("compositions/")),[m]),qa=d.useMemo(()=>m.filter(S=>!S.endsWith(".html")&&!S.endsWith(".md")&&!S.endsWith(".json")),[m]),_f=d.useMemo(()=>qa.filter(S=>n1.test(S)).map(S=>({family:Ql(S),path:S,url:`/api/projects/${n}/preview/${S}`})),[qa,n]),Df=Zn&&L?RV(We.current,L):null,bc=d.useMemo(()=>zt?ut.find(S=>Ol(S)===zt)??null:null,[zt,ut]),wc=Zn&&ae==="design",ho=Zn&&yy&&ae==="motion",Es=wc||ho,o0=Es&&!W&&(!bc||G7(At,bc)),Ua=Zn&&!W&&Es,If=tu&&sr&&Ko.length>0?p.jsx(P_,{clipLabel:pa(sr),layers:Ko,selectedLayerKey:Wa,onSelectLayer:ao,onClose:cc}):null;return t||!n?p.jsx("div",{className:"h-full w-full bg-neutral-950 flex items-center justify-center",children:p.jsx("div",{className:"w-4 h-4 rounded-full bg-studio-accent animate-pulse"})}):p.jsxs("div",{className:"flex flex-col h-full w-full bg-neutral-950 relative",onDragOver:S=>{S.dataTransfer.types.includes("Files")&&S.preventDefault()},onDragEnter:S=>{S.dataTransfer.types.includes("Files")&&(S.preventDefault(),vt.current++,Me(!0))},onDragLeave:()=>{vt.current--,vt.current===0&&Me(!1)},onDrop:S=>{vt.current=0,Me(!1),!S.defaultPrevented&&(S.preventDefault(),S.dataTransfer.files.length&&Oc(S.dataTransfer.files))},children:[p.jsxs("div",{className:"flex items-center justify-between h-10 px-3 bg-neutral-900 border-b border-neutral-800 flex-shrink-0",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("span",{className:"text-[11px] font-medium text-neutral-400",children:n})}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("button",{type:"button",onClick:()=>void es(),disabled:!Zt.canUndo,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${Zt.canUndo?"border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800":"border-neutral-900 text-neutral-700"}`,title:Zt.undoLabel?`Undo ${Zt.undoLabel} (${D1("undo")})`:`Undo (${D1("undo")})`,"aria-label":"Undo",children:p.jsx(lf,{size:14})}),p.jsx("button",{type:"button",onClick:()=>void oo(),disabled:!Zt.canRedo,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${Zt.canRedo?"border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800":"border-neutral-900 text-neutral-700"}`,title:Zt.redoLabel?`Redo ${Zt.redoLabel} (${D1("redo")})`:`Redo (${D1("redo")})`,"aria-label":"Redo",children:p.jsx(gR,{size:14})}),p.jsxs("a",{href:Or,download:Br,onClick:Bt,onFocus:Yn,onPointerDown:Yn,className:"h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border border-neutral-700 text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800",title:"Capture current frame","aria-label":"Capture current frame",children:[p.jsx(mR,{size:14}),p.jsx("span",{children:"Capture"})]}),p.jsxs("button",{type:"button",onClick:()=>{if(Zn){if(W||!Es){ie("design"),K(!1);return}Yr(),K(!0)}},disabled:!Zn,className:`h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border transition-colors ${Ua?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":Zn?"text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 border-transparent":"cursor-not-allowed border-transparent text-neutral-700"}`,title:Zn?"Inspector":vy,"aria-label":Zn?"Inspector":vy,children:[p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10"}),p.jsx("polygon",{points:"10 8 16 12 10 16",fill:"currentColor",stroke:"none"})]}),"Inspector"]})]})]}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[N?p.jsx("div",{className:"flex w-10 flex-shrink-0 flex-col items-center border-r border-neutral-800/50 bg-neutral-950 pt-1",children:p.jsx("button",{type:"button",onClick:Nt,className:"flex h-8 w-8 items-center justify-center rounded-md border border-transparent text-neutral-500 transition-colors hover:border-neutral-800 hover:bg-neutral-900 hover:text-neutral-300",title:"Show sidebar","aria-label":"Show sidebar",children:p.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("path",{d:"M5 4v16"}),p.jsx("path",{d:"m10 7 5 5-5 5"})]})})}):p.jsx(SR,{ref:Ke,width:V,projectId:n,compositions:fo,assets:qa,activeComposition:(i==null?void 0:i.path)??null,onSelectComposition:S=>{h(S==="index.html"||S.startsWith("compositions/")?S:null),s({path:S,content:null}),fetch(`/api/projects/${n}/files/${S}`).then(C=>C.json()).then(C=>s({path:S,content:C.content})).catch(()=>{})},fileTree:m,editingFile:i,onSelectFile:qn,onCreateFile:Nf,onCreateFolder:Lf,onDeleteFile:Vf,onRenameFile:r0,onDuplicateFile:gc,onMoveFile:Jo,onImportFiles:Oc,codeChildren:i?P4(i.path)?p.jsx(NR,{projectId:n??"",filePath:i.path}):p.jsx(GZ,{content:i.content??"",filePath:i.path,onChange:_t}):void 0,onLint:s0,linting:ic,onToggleCollapse:Nt,takeoverContent:If}),!N&&p.jsx("div",{className:"group w-2 flex-shrink-0 cursor-col-resize flex items-center justify-center",style:{touchAction:"none"},onPointerDown:S=>xc("left",S),onPointerMove:yc,onPointerUp:vc,children:p.jsx("div",{className:"h-[52px] w-px bg-white/12 transition-colors group-hover:bg-white/18 group-active:bg-white/24"})}),p.jsx("div",{className:"flex-1 relative min-w-0",children:p.jsx(xA,{projectId:n,refreshKey:Pi,activeCompositionPath:u,timelineToolbar:io,renderClipContent:Xa,onDeleteElement:vr,onAssetDrop:mc,onFileDrop:Rf,onMoveElement:Fa,onResizeElement:sc,onBlockedEditAttempt:qi,onSelectTimelineElement:e0,onInspectTimelineElement:br,inspectedTimelineElementId:fe,timelineLayerChildCounts:Ju,onCompIdToSrcChange:v,onCompositionLoadingChange:Fe,onCompositionChange:S=>{h(S),Ee(null),Ue()},onIframeRef:pc,previewOverlay:k?p.jsx(DR,{iframeRef:bt}):Zn?p.jsx(w_,{iframeRef:bt,activeCompositionPath:u,hoverSelection:Sm&&!k?$e:null,selection:o0?L:null,groupSelections:o0?ye:[],allowCanvasMovement:j_,onCanvasMouseDown:Qf,onCanvasPointerMove:jf,onCanvasPointerLeave:Zf,onSelectionChange:Ht,onBlockedMove:Ui,onManualDragStart:Ya,onPathOffsetCommit:uc,onGroupPathOffsetCommit:kf,onBoxSizeCommit:t0,onRotationCommit:Pf}):null,timelineFooter:k?p.jsxs("div",{className:"border-t border-neutral-800/30 flex-shrink-0",style:{height:60},children:[p.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5",children:p.jsx("span",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider",children:"Captions"})}),p.jsx(BR,{pixelsPerSecond:100})]}):void 0,timelineVisible:Mn,onToggleTimeline:hn})}),!W&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"group w-2 flex-shrink-0 cursor-col-resize flex items-center justify-center",style:{touchAction:"none"},onPointerDown:S=>xc("right",S),onPointerMove:yc,onPointerUp:vc,children:p.jsx("div",{className:"h-[52px] w-px bg-white/12 transition-colors group-hover:bg-white/18 group-active:bg-white/24"})}),p.jsx("div",{className:"flex flex-col border-l border-neutral-800 bg-neutral-900 flex-shrink-0",style:{width:Q},children:k?p.jsx(WR,{iframeRef:bt}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-1 border-b border-neutral-800 px-3 py-2",children:[Zn&&p.jsxs(p.Fragment,{children:[p.jsx("button",{type:"button",onClick:()=>ie("design"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${ae==="design"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:"Design"}),yy&&p.jsx("button",{type:"button",onClick:()=>ie("motion"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${ae==="motion"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:"Motion"})]}),p.jsx("button",{type:"button",onClick:()=>ie("renders"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${ae==="renders"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:w.jobs.length>0?`Renders (${w.jobs.length})`:"Renders"})]}),p.jsx("div",{className:"min-h-0 flex-1",children:wc?p.jsx(wV,{projectId:n,assets:qa,element:ye.length>1?null:L,multiSelectCount:ye.length,copiedAgentPrompt:Ce,onClearSelection:Yr,onSetStyle:fc,onSetManualOffset:uc,onSetManualSize:t0,onSetText:hc,onSetTextFieldStyle:n0,onAddTextField:Cf,onRemoveTextField:Ef,onResetManualEdits:dc,onAskAgent:Tf,onImportAssets:Oc,fontAssets:_f,onImportFonts:i0}):ho?p.jsx(n_,{element:ye.length>1?null:L,motion:Df,onClearSelection:Yr,onSetMotion:Af,onClearMotion:$f}):p.jsx(TR,{jobs:w.jobs,projectId:n,onDelete:w.deleteRender,onClearCompleted:w.clearCompleted,onStartRender:async(S,C,R,_)=>{await ir(),await w.startRender({fps:_,quality:C,format:S,resolution:R})},compositionDimensions:ce,isRendering:w.isRendering})})]})})]})]}),ki!==null&&n&&p.jsx(s5,{findings:ki,projectId:n,onClose:()=>xr(null)}),As!==null&&As.length>0&&n&&p.jsx(s5,{findings:As,projectId:n,onClose:()=>Fi(null)}),tt&&L&&p.jsx(G_,{selectionLabel:L.label,anchorPoint:X,onSubmit:Mf,onClose:()=>{De(!1),E(void 0),ee(null)}}),Se&&p.jsx("div",{className:"absolute inset-0 z-[90] flex items-center justify-center bg-black/50 backdrop-blur-sm pointer-events-none",children:p.jsxs("div",{className:"flex flex-col items-center gap-3 px-8 py-6 rounded-xl border-2 border-dashed border-studio-accent/60 bg-studio-accent/[0.06]",children:[p.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-studio-accent",children:[p.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),p.jsx("polyline",{points:"7 10 12 15 17 10"}),p.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),p.jsx("span",{className:"text-sm font-medium text-studio-accent",children:"Drop files to import into project"})]})}),ct&&p.jsx("div",{className:`absolute bottom-6 left-1/2 -translate-x-1/2 z-[91] px-4 py-2 rounded-lg border text-sm shadow-lg animate-in fade-in slide-in-from-bottom-2 ${ct.tone==="error"?"bg-red-900/90 border-red-700/50 text-red-200":"bg-neutral-900/95 border-neutral-700/60 text-neutral-100"}`,children:ct.message})]})}qk.createRoot(document.getElementById("root")).render(p.jsx(d.StrictMode,{children:p.jsx(J_,{})}));
|